cwh-123456/dsh-handoff-bus ↗★ 0
dsh-handoff-bus
提供跨会话的消息总线以传递指令和报告 适合需要在主对话与子对话之间进行自动化消息路由的复杂任务。
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:cwh-123456/dsh-handoff-bus說明文件
閱讀完整 README ↗Configuration
Configuration is read in this order (later wins):
- built-in defaults (
DEFAULT_CONFIG) - JSON file:
$DSH_HANDOFF_BUS_CONFIG, or/handoff-bus/config.json - the plugin row's
configin your profile patch (advanced)
Example config.json:
{
"handoffDir": "handoff",
"stateDirName": ".bus",
"maxMessageChars": 4000,
"maxSendsPerHour": 30,
"maxPairSendsPer10Min": 8,
"blockSecondInstruction": true,
"pendingInstructionTtlSec": 600,
"requireDone": true,
"routeMaxAttempts": 3,
"retiredRetentionDays": 7,
"digestReports": true,
"digestMinCount": 3,
"digestMaxWaitSec": 900,
"handoffAfterMessages": 40,
"handoffAfterIdleMin": 30,
"briefing": true,
"briefingFiles": ["README.md", "PROTOCOL.md"],
"briefingScan": [],
"briefingScanLimit": 4,
"briefingTailLines": 80,
"contextBudget": true,
"contextWindowTokens": 524288,
"contextWarnRatio": 0.4,
"contextStopRatio": 0.7,
"contextOverheadTokens": 40000,
"requireHandoverOnLeave": true,
"handoverWindowMin": 30
}
centralStateRoot is optional (an absolute path); it defaults to /handoff-bus. Restart the client after editing the file. See config.example.json.
| Key | Default | Meaning |
|---|---|---|
handoffDir | handoff | Coordination directory name; if present, state goes to /.bus/ |
stateDirName | .bus | State subdirectory name |
centralStateRoot | /handoff-bus | State root when the workspace has no coordination directory |
maxMessageChars | 4000 | Per-message limit |
maxSendsPerHour | 30 | Per-conversation hourly limit |
maxPairSendsPer10Min | 8 | Per role-pair limit, to stop ping-pong |
blockSecondInstruction | true | Refuse a 指令 while the previous one to the same target has no 回报 yet |
pendingInstructionTtlSec | 600 | After this long without a 回报, the pending instruction stops blocking |
requireDone | true | kind="指令" must carry done |
routeMaxAttempts | 3 | Candidates probed when target is a line name |
retiredRetentionDays | 7 | How long retired roles are remembered |
digestReports | true | Batch plain reports (disable to wake on every report) |
digestMinCount | 3 | Reports per digest wake-up |
digestMaxWaitSec | 900 | Longest a report waits before the digest fires |
handoffAfterMessages | 40 | suggestHandoff threshold: messages exchanged |
handoffAfterIdleMin | 30 | suggestHandoff threshold: minutes idle |
briefing | true | Inject the start-up briefing before the first request of a conversation |
briefingFiles | ["README.md","PROTOCOL.md"] | Files to read in full, relative to the coordination directory |
briefingScan | [] | Globs read as structure + tail, e.g. ["4*-*.md"] |
briefingScanLimit | 4 | How many matching ledgers to name (newest first) |
briefingTailLines | 80 | Lines in the tail -n suggested by the briefing |
contextBudget | true | Context watermark notices |
contextWindowTokens | 524288 | What counts as 100% (not the declared 1048576) |
contextWarnRatio | 0.4 | Warn: finish the current task, write the ledger, switch conversations |
contextStopRatio | 0.7 | Demand an immediate wrap-up |
contextOverheadTokens | 40000 | Fixed cost of the system prompt and tool definitions |
requireHandoverOnLeave | true | Refuse bus_unregister when the coordination directory is stale |
handoverWindowMin | 30 | Window for the check above, in minutes |
deliveries.jsonl is append-only. Delete it manually if it grows; automatic rotation is planned for a later release.