Warsk-80486/dsh-auto-summary ↗★ 1
dsh-auto-summary
DeepSeek Harness plugin that measures each finished turn, summarizes sessions over a token threshold, and hands the summary to a fresh agent.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Warsk-80486/dsh-auto-summary说明文档
阅读完整 README ↗Configuration
Every field has a default, so the bundle mounts with no configuration. To
configure it, restate the row in the profile's own cordis.patch.yml (this layer
is applied after the bundle's):
- id: auto-summary
config:
thresholdTokens: 100000000
metric: total
onlyCompletedTurns: true
summarizeSubagentSessions: false
maxConsecutiveFailures: 3
dryRun: false
summary:
provider: ''
model: ''
maxInputChars: 48000
maxOutputTokens: 4096
timeoutMs: 120000
handoff:
provider: spawn
delivery: parent
labelPrefix: handoff
promptTemplate: |
You are a continuation agent taking over a task from an earlier DeepSeek Harness session.
...
## Original first user prompt (verbatim)
{{firstPrompt}}
## Handoff summary
{{summary}}
| Field | Default | Meaning |
|---|---|---|
thresholdTokens | 100000000 | Usage figure at which one summary/handoff pass starts. Minimum 1000. |
metric | total | total: cumulative billed tokens (tokenUsage projection). context: current request pressure (ctx.tokenMeter.measure). |
onlyCompletedTurns | true | Trigger only after turn/end with reason completed. |
summarizeSubagentSessions | false | Keep off to prevent handoff agents from triggering further handoffs. |
maxConsecutiveFailures | 3 | Failed passes after which the current threshold is consumed instead of retried every turn; 0 retries forever. |
dryRun | false | Log the pass without any model call or agent creation. |
summary.provider / summary.model | '' | Explicit route for the summary call; set both or neither. Empty means "inherit the session's latest request route". |
summary.maxInputChars | 48000 | Character budget for the rendered transcript. |
summary.maxOutputTokens | 4096 | Output ceiling for the summary call. |
summary.timeoutMs | 120000 | Deadline for the summary call. |
handoff.provider | spawn | Registered subagent provider used to start the fresh agent. |
handoff.delivery | parent | parent: the original agent receives the new agent's completion notice. caller: fire-and-forget. |
handoff.labelPrefix | handoff | Prefix of the catalog label recorded for the fresh agent. |
handoff.promptTemplate | built-in | Continuation task template. See placeholders below. |
Handoff template placeholders
| Placeholder | Substituted value |
|---|---|
{{firstPrompt}} | The session's first direct human prompt, verbatim. |
{{summary}} | The model-written handoff brief. |
{{sessionId}} | The summarized session id. |
{{turn}} | The turn whose completion triggered the handoff. |
{{reason}} | The turn/end reason kind (completed by default). |
If a custom template omits {{firstPrompt}} or {{summary}}, the corresponding
section is appended automatically — the fresh agent can never lose them.