1052326311/dsh-plan-lattice1

dsh-plan-lattice

A stale-mutation firewall for long-running DeepSeek Harness agents

AI 分析

适合对 write/edit 等高风险工具设置约束,防止长期任务中的过期修改。需配置防护策略。

パッケージ
dsh-plan-lattice
バージョン
0.4.0-rc.4
ライセンス
MIT
最終更新
2026/08/17

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1052326311/dsh-plan-lattice

ドキュメント

README 全文を読む ↗

Configuration

- id: plan-lattice
  config:
    activationMode: auto          # off | auto | always
    clarificationPolicy: critical # critical | always | never
    controlCeiling: lattice       # contract | lattice
    longTaskThreshold: 8
    guardedTools: [write, edit, str_replace_editor]
    strictBash: true             # v0.4 default; also guards pwsh
    maxContextBytes: 262144
    topLevelLimit: 2
    nestedLimit: 5
    snapshotEvery: 1024
    # Defaults below DSH_HOME; keep outside every agent-writable workspace.
    # contractAnchorRoot: /absolute/trusted/plan-lattice-anchors

longTaskThreshold is evidence, not the routing decision by itself. controlCeiling: contract provides a lighter deployment and the contract-only ablation arm. v0.4 guards every Bash and PowerShell invocation by default and fails closed unless the host supplies a programmatic precondition adapter. Set strictBash: false only when the host provides a separate shell-effect boundary; this opt-out weakens the mutation-time guarantee. Function adapters are host composition and therefore cannot be expressed in the YAML block above.

Task text can override configuration:

  • Do not use Plan Lattice / 不要使用 Plan Lattice forces bypass.
  • Do not ask; make reasonable assumptions / 不要提问,合理假设 keeps the selected control level but changes clarification to never.
  • Use the full Lattice / 使用完整 Lattice forces the configured maximum control level.

v0.3 Migration

An explicit legacy intakeMode keeps v0.3 behavior when none of the new fields is present. Mixing old and new fields is a configuration error with migration guidance. This compatibility path preserves v0.3 custom-tool behavior; the new external-precondition guarantee applies to the v0.4 controller.

Legacyv0.4 equivalent
intakeMode: offactivationMode: always, clarificationPolicy: never
intakeMode: adaptiveactivationMode: always, clarificationPolicy: critical
intakeMode: guidedactivationMode: always, clarificationPolicy: always

Legacy graphs and intake records remain readable. New contracts are written to v2 paths; old state is never rewritten in place. A resumed v1 graph is treated as full lattice control.