Files
deepseek-harness/packages/plan
_KermanandTianyi Cui f4a32dbd0a refactor(llm): flatten tool results and validate native V4 sessions
Represent tool results as tool-role messages and migrate released wrappers
without losing outer own JSON fields, call identity, error state, or writer
field order. Refuse nested or wrapper-only information that has no lossless
current representation before successor publication.

Validate current event relationships directly instead of projecting V4 data
back into V3. Keep lifecycle, PTC, title/command, compaction, system-field and
retired-syntax checks on catalog restoration and ordinary JSONL opens. The
Worker JSON equality helper must inspect own keys so it cannot admit PTC
arguments that Node rejects.

Keep the source role change, required native admission and consumer fixture
updates in one complete review layer. Explain shared-type changes in the
persistence record and the native reader rationale in its existing note.
Use checked branded fixture identities and discriminant narrowing instead
of unknown double casts; fixture values and assertions remain intact.

This recomposes the original tool-role work by _Kerman with the independently
validated migration and admission repairs by Tianyi Cui. Frozen generations
and snapshot input version selection are retained.

Co-authored-by: Tianyi Cui <[email protected]>
2026-09-18 19:05:32 +08:00
..

description, kind
description kind
Package map for the plan group: the plan-mode feature that guides the agent to explore and design before executing, for users and maintainers navigating the group. package-group

plan/ — plan collaboration state

English | 中文

Summary

The plan/ group provides plan mode: while it is active, the agent explores and designs before executing, guided by instructions the deployment writes, and presents the finished plan for your approval before carrying it out. You can enter and leave plan mode with the /plan command and approve the plan or send the agent back to keep planning. Plan mode guides rather than restricts: every tool stays available, and limits such as sandbox mode and approval prompts are configured separately. The group contains one package, plan-mode.

Table of Contents


Packages

One package provides the whole plan-mode feature; the subsystem reference owns the exhaustive contracts.

Package Role ctx key
plan-mode/ Provides plan mode: /plan enters and leaves it, deployment guidance steers the agent while planning, and exit_plan_mode presents the finished plan for your review ctx.planMode

Start with the subsystem reference for the shared vocabulary, then read the design note for the decisions.

Dev Note

Working context for maintainers — click to expand

None.