1052326311/dsh-plan-lattice ↗★ 3

dsh-plan-lattice

长时任务下的连续性恢复机制,维持会话衔接与续作 适合长耗时任务代理续接;需按阈值与快照策略配置会话控制参数

包名
dsh-plan-lattice
兼容性
待验证
Harness 依赖范围
0.1.0-rc.7
Cordis 依赖范围
^4.0.1
版本
0.4.0-rc.8
许可证
MIT
最近更新
2026年8月31日

安装

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

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 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, 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.

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.