1052326311/dsh-plan-lattice ↗★ 3
dsh-plan-lattice
Native continuity recovery for long-running DeepSeek Harness agents 适合长耗时任务代理续接;需按阈值与快照策略配置会话控制参数
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:1052326311/dsh-plan-latticeREADME
Read the full README ↗Configuration
- id: plan-lattice
config:
activationMode: auto # off | auto | always
clarificationPolicy: critical # critical | always | never
controlCeiling: lattice # contract | lattice
longTaskThreshold: 8
maxTokenContinuations: 0 # opt-in; bounded per durable session
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, clarificationPolicy, controlCeiling, guardedTools, and
strictBash configure explicit full control. They do not activate contracts,
tools, or guards in default auto mode. Under activationMode: always,
controlCeiling: contract provides the contract-only tier and ablation arm;
strictBash: false weakens that tier's mutation-time guarantee. Function
adapters are host composition and therefore cannot be expressed in YAML.
When an explicitly controlled contract or lattice turn ends because the model reached
its output ceiling, maxTokenContinuations uses DSH's native followup() to
queue a clean next turn. It never runs for bypass, never uses same-turn
steer(), stops while a reframe is pending, and counts its own continuation
messages from the durable Session log. The default is zero, preserving DSH's
manual-continuation behavior; set a positive bound to opt in. This can prevent a
known terminal state from abandoning controlled work. It does not improve model
reasoning or turn a vague task into a well-defined one.
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, including no automatic max-token continuation. 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.