1052326311/dsh-plan-lattice ↗★ 1
dsh-plan-lattice
A stale-mutation firewall for long-running DeepSeek Harness agents
AI 분석
适合对 write/edit 等高风险工具设置约束,防止长期任务中的过期修改。需配置防护策略。
설치
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1052326311/dsh-plan-latticeConfiguration
- 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 Latticeforcesbypass.Do not ask; make reasonable assumptions/不要提问,合理假设keeps the selected control level but changes clarification tonever.Use the full Lattice/使用完整 Latticeforces 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.
| Legacy | v0.4 equivalent |
|---|---|
intakeMode: off | activationMode: always, clarificationPolicy: never |
intakeMode: adaptive | activationMode: always, clarificationPolicy: critical |
intakeMode: guided | activationMode: 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.