Leo-Ayh-Oday/dsh-orcana--packages-dsh-governor ↗★ 0
@leooday/dsh-governor
Orcana 运行时包的 DSH 适配器插件,提供进度治理、证据新鲜度、完成度守护及能力路由,将 ProgressFactEngine 挂载至 DSH 扩展点。
AI 分析
核心用途是监控和引导 Agent 的执行进度。适合需要对 Agent 的工具调用、重复尝试和零进展状态进行强力干预与调度的复杂任务。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗@leooday/dsh-governor
DSH adapter plugin for the Orcana runtime pack: mounts the framework-agnostic
ProgressFactEngine on DSH extension points. Function plugin
(name / Config / apply, no default export).
Extension points
| Concern | Hook |
|---|---|
| Observe every tool call | tools/post-execute (waterfall, always next()) |
| In-round repeat reminders | PostToolDecision.additionalContexts (auto-logged as user/message, once per round) |
| Zero-progress escalation + forced continuation | agent/turn-stopping + agent.steer(), bounded by maxForcedContinuations |
| User interjection reset | agent/pre-step (user-source messages reset chains and the budget) |
| Verification-state snapshot | systemPrompt.context (durable user-role snapshot, orcana:verification-state, order 250) |
Translation contract
toEngineEvent is the single DSH→core translation used by both the live
listener and translateSessionEvents (session-log replay): normalized
command, exit-code marker recovery, background-ack exclusion, mutation flag.
Replaying a session log through ProgressFactEngine.rebuild reproduces the
live engine state — covered by tests.
Config
governor.enabled / mode (observe | warn-steer | enforce) / zeroProgressThresholds /
fingerprintWindow / inlineRepeatTools (default read/bash/search, aligned with
the coordinated repeat-tool-reminder exclude); evidence.enabled / freshness /
verifyCommandPatterns;
completion.mode / maxForcedContinuations; tools.disclosure / defaultProfile.
Every field validated by schemastery with defaults; the benchmark treatment
patch overrides them via !!js process.env.ORCANA_* ablation knobs.
Known Limitations
- Bash non-zero exits are reported in the result text, not as
isError(the exit-marker contract); receipts parse the marker. - Background bash acknowledgements carry no terminal exit status and are excluded from verification.
- Mutations inside shell commands are invisible to the generation counter (v0.2: git-probe receipts).
- The verification snapshot renders only commands that produced receipts (matched by verifyCommandPatterns); NONE placeholders are future work.
- Compaction-pruned logs replay to the pruned state (authoritative).