@deepseek-ai/dsh-plan-mode 0.1.5-rc.2 → 0.1.6-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/plan/plan-mode/README.md
5
- README.md: 693273ab4bdfddebd6145046e8354a5a211c8b8b
6
- README.zh.md: 39a7a65c29d3f11dfb9e9f4dc696d59082c82240
5
+ README.md: 642caf0c6db6470e93c7b0583d2bfe145ed99f29
6
+ README.zh.md: 4165d5b925083d10c76312d00293fd0b0ac84ba0
package/README.md CHANGED
@@ -105,6 +105,8 @@ When `ctx.sessionProjections` is composed, the package registers the `plan` unit
105
105
  | [`src/client.ts`](src/client.ts) | Client-namespace re-export of the types outlet |
106
106
  | [`src/invariant.ts`](src/invariant.ts) | Invariant companion: validates the `plan/mode` payload shape |
107
107
 
108
+ The review intent carries the originating tool-call id, so the Web client can reopen the same submitted plan after the review closes. The complete Markdown remains in the existing native call or PTC dispatch log.
109
+
108
110
  </details>
109
111
 
110
112
  -----
package/README.zh.md CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: "面向用户与维护者的计划模式说明:用于选择、配置或排查带部署引导、/plan 命令与经用户评审退出的逐 agent 规划功能。"
2
+ description: "面向用户与维护者的计划模式说明:用于选择、配置或排查带部署引导、/plan 命令与经用户评审退出的逐 agent(智能体)规划功能。"
3
3
  kind: "package-reference"
4
4
  ---
5
5
 
@@ -33,7 +33,7 @@ kind: "package-reference"
33
33
 
34
34
  ### 最小配置
35
35
 
36
- 唯一必需的配置是 agent 规划期间遵循的引导文本;添加任何其他内容都会在加载时失败。
36
+ 唯一必需的配置是 agent 规划期间遵循的引导文本;添加任何其他配置都会在加载时失败。
37
37
 
38
38
  ```yaml
39
39
  - name: '@deepseek-ai/dsh-plan-mode'
@@ -47,7 +47,7 @@ kind: "package-reference"
47
47
  |---|---|---|
48
48
  | `section` | 必填 | 计划模式激活时作为 `plan:policy` 提示词段落渲染的引导 |
49
49
 
50
- 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-plan-mode)是每个受支持字段及其 JSDoc 的穷尽式真源。
50
+ 生成的[配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-plan-mode)完整列出了所有受支持的字段及其 JSDoc。
51
51
 
52
52
  <a id="model-and-human-interactions"></a>
53
53
  ### 进入与离开计划模式
@@ -78,7 +78,7 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
78
78
 
79
79
  ### 设计理念
80
80
 
81
- 计划模式是产品包,而不是能力 seam:没有可替换的后端,因此状态、引导、命令与退出工具都集中在一处。持久姿态是单一仅记日志、整值替换的事件,绝不是实时镜像,因此恢复、fork 与压缩(compaction)都通过折叠日志复原它。引导是软性层——本包注册一个提示词段落和一个工具,通过文本而非过滤能力来约束。
81
+ 计划模式是产品包,而不是能力 seam:没有可替换的后端,因此状态、引导、命令与退出工具都集中在一处。持久化方案采用单一仅记日志、整值替换的事件,绝不使用实时镜像,因此恢复、fork 与压缩(compaction)都通过折叠日志复原它。引导是软性层——本包注册一个提示词段落和一个工具,通过文本而非过滤能力来约束。
82
82
 
83
83
  ### 持久状态与步骤边界追加
84
84
 
@@ -90,7 +90,7 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
90
90
 
91
91
  ### 退出工具
92
92
 
93
- `exit_plan_mode` 在计划模式未激活时仍保持注册,因此进入或离开只改变提示词段落,绝不改变请求的工具目录。经批准的评审会记录一个静默的待生效退出,由下一个被接受的轮内 pre-step 追加,当前这批工具调用剩余部分仍保留计划引导。缺少用户交互通道,或评审等待期间服务重载,调用都会失败关闭,`/plan off` 仍是手动退路。
93
+ `exit_plan_mode` 在计划模式未激活时仍保持注册,因此进入或离开只改变提示词段落,绝不改变请求的工具目录。经批准的评审会记录一个静默的待生效退出,由下一个被接受的轮内 pre-step 追加,当前这批工具调用剩余部分仍保留计划引导。缺少用户交互通道,或评审等待期间服务重载,调用都会以拒绝方式失败,`/plan off` 仍是手动退路。
94
94
 
95
95
  ### 会话投影单元
96
96
 
@@ -105,6 +105,8 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
105
105
  | [`src/client.ts`](src/client.ts) | types 出口的客户端命名空间再导出 |
106
106
  | [`src/invariant.ts`](src/invariant.ts) | 不变式伴生插件:校验 `plan/mode` 载荷结构 |
107
107
 
108
+ 审批意图携带发起工具调用的标识,让 Web 客户端在审批关闭后重新打开同一份计划。完整 Markdown 保留在已有的原生调用或 PTC dispatch 日志中。
109
+
108
110
  </details>
109
111
 
110
112
  -----
@@ -149,15 +151,15 @@ You are in plan mode. Explore and design before presenting the complete plan thr
149
151
 
150
152
  #### 模型看到什么
151
153
 
152
- `/plan`、`/plan off` 及其终端结果留在模型历史之外。除恰好为 `off` 以外的非空后缀会在选择计划模式后,通过 `agent.steer()` 成为一条用户消息:已准入的图片块与文件块按选择顺序排列,之后是去除首尾空白的文本块。不带参数的 `/plan` 若带有已准入附件,会 steer 一条只含这些块的用户消息。计划模式已激活时选择 `/plan off`,只会在最后记录的请求头描述了计划模式的情况下追加标准的已记录用户切换通知;取消待生效条目不贡献通知,因为没有请求观测到它。
154
+ `/plan`、`/plan off` 及其终端结果留在模型历史之外。除恰好为 `off` 以外的非空后缀会在选择计划模式后,通过 `agent.steer()` 成为一条用户消息:已准入的图片块与文件块按选择顺序排列,之后是去除首尾空白的文本块。不带参数的 `/plan` 若带有已准入附件,会通过 `agent.steer()` 提交一条只含这些块的用户消息。计划模式已激活时选择 `/plan off`,只会在最后记录的请求头描述了计划模式的情况下追加标准的已记录用户切换通知;取消待生效条目不贡献通知,因为没有请求观测到它。
153
155
 
154
156
  #### Token 影响
155
157
 
156
- 可选消息的历史 token 成本与单独提交该内容相同。不带附件的 `/plan` 与 `/plan off` 不增加 token;带附件的 `/plan` 产生常规图片与文件句柄成本。一次带叙述的激活状态退出会追加一条简短且会保留的切换通知。
158
+ 可选消息的历史 token 成本与单独提交该内容相同。不带附件的 `/plan` 与 `/plan off` 不增加 token;带附件的 `/plan` 产生常规图片与文件句柄成本。一次带有通知的激活状态退出会追加一条简短且会保留的切换通知。
157
159
 
158
160
  #### KV Cache 影响
159
161
 
160
- 用户块是仅追加的对话增长。进入或离开计划模式会改变更早的策略段落;带叙述的退出通知追加在可复用请求前缀之后。
162
+ 用户块是仅追加的对话增长。进入或离开计划模式会改变更早的策略段落;用于说明退出的通知会追加在可复用请求前缀之后。
161
163
 
162
164
  ### 退出工具 schema 与评审交互
163
165
 
@@ -167,7 +169,7 @@ You are in plan mode. Explore and design before presenting the complete plan thr
167
169
 
168
170
  #### Token 影响
169
171
 
170
- 稳定 schema 的成本取决于 ToolRuntime mode,每次传入的 plan 参数与评审结果都会保留在对话历史中。
172
+ 稳定 schema 的成本取决于 ToolRuntime 模式,每次传入的 plan 参数与评审结果都会保留在对话历史中。
171
173
 
172
174
  #### KV Cache 影响
173
175
 
package/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Service } from "@deepseek-ai/cordis";
2
+ import { brandString } from "@deepseek-ai/dsh-brand";
2
3
  import { z } from "zod";
3
4
  import { createUserMessage } from "@deepseek-ai/dsh-llm";
4
5
  import { defineTool } from "@deepseek-ai/dsh-tools";
@@ -178,6 +179,7 @@ var PlanModeController = class extends Service {
178
179
  ctx.sessionProjections.register(planProjectionDefinition);
179
180
  ctx.inject(["commands"], (commandCtx) => {
180
181
  commandCtx.commands.register({
182
+ definitionId: brandString("@deepseek-ai/dsh-plan-mode"),
181
183
  name: "plan",
182
184
  description: "Enter or leave plan mode",
183
185
  input: {
@@ -271,7 +273,8 @@ var PlanModeController = class extends Service {
271
273
  }],
272
274
  intent: {
273
275
  kind: "plan-review",
274
- approve: APPROVE_LABEL
276
+ approve: APPROVE_LABEL,
277
+ callId: exec.callId
275
278
  }
276
279
  }],
277
280
  agent,
@@ -22,6 +22,7 @@
22
22
  * @module @deepseek-ai/dsh-plan-mode
23
23
  */
24
24
  import { Service } from '@deepseek-ai/cordis';
25
+ import { brandString } from '@deepseek-ai/dsh-brand';
25
26
  import { z as zod } from 'zod';
26
27
  import { createUserMessage } from '@deepseek-ai/dsh-llm';
27
28
  import { defineTool } from '@deepseek-ai/dsh-tools';
@@ -175,6 +176,7 @@ export class PlanModeController extends Service {
175
176
  // The command child activates only when a command registry is composed.
176
177
  ctx.inject(['commands'], (commandCtx) => {
177
178
  commandCtx.commands.register({
179
+ definitionId: brandString('@deepseek-ai/dsh-plan-mode'),
178
180
  name: 'plan',
179
181
  description: 'Enter or leave plan mode',
180
182
  input: { hint: '[off|message]', attachments: true },
@@ -262,7 +264,7 @@ export class PlanModeController extends Service {
262
264
  // Presentation only: a capable UI renders the plan as a review
263
265
  // decision instead of a generic question, and answers with one of
264
266
  // the labels above either way.
265
- intent: { kind: 'plan-review', approve: APPROVE_LABEL },
267
+ intent: { kind: 'plan-review', approve: APPROVE_LABEL, callId: exec.callId },
266
268
  }],
267
269
  agent,
268
270
  signal: exec.signal,
@@ -21,6 +21,7 @@ function validateEvent(event, fail) {
21
21
  /** Install validation for loaded and newly appended plan-mode state. */
22
22
  const install = Object.assign((ctx, fail) => {
23
23
  const seed = (session) => {
24
+ // oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
24
25
  for (const event of session.snapshotEvents())
25
26
  validateEvent(event, fail);
26
27
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-plan-mode",
3
3
  "description": "Logged per-agent plan mode with deployment guidance, a direct slash command, and a user-reviewed exit",
4
- "version": "0.1.5-rc.2",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -41,16 +41,16 @@
41
41
  ],
42
42
  "license": "MIT",
43
43
  "peerDependencies": {
44
- "@deepseek-ai/dsh-commands": "^0.1.5-rc.2",
45
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
46
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
47
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
48
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
49
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
50
- "@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.2",
51
- "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
52
- "@deepseek-ai/dsh-user-questions": "^0.1.5-rc.2",
53
- "@deepseek-ai/cordis": "^4.0.2"
44
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
45
+ "@deepseek-ai/dsh-commands": "^0.1.6-alpha.2",
46
+ "@deepseek-ai/dsh-invariants": "^0.1.6-alpha.2",
47
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
48
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
49
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
50
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
51
+ "@deepseek-ai/dsh-user-questions": "^0.1.6-alpha.2",
52
+ "@deepseek-ai/cordis": "^4.0.2",
53
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@deepseek-ai/dsh-commands": {
@@ -58,20 +58,21 @@
58
58
  }
59
59
  },
60
60
  "dependencies": {
61
- "zod": "^4.4.3"
61
+ "zod": "^4.4.3",
62
+ "@deepseek-ai/dsh-brand": "^0.1.6-alpha.2"
62
63
  },
63
64
  "devDependencies": {
64
- "@deepseek-ai/dsh-agent": "^0.1.5-rc.2",
65
- "@deepseek-ai/dsh-agent-loop": "^0.1.5-rc.2",
66
- "@deepseek-ai/dsh-code-runtime": "^0.1.5-rc.2",
67
- "@deepseek-ai/dsh-commands": "^0.1.5-rc.2",
68
- "@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
69
- "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
70
- "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
71
- "@deepseek-ai/dsh-system-prompt": "^0.1.5-rc.2",
72
- "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
73
- "@deepseek-ai/dsh-user-questions": "^0.1.5-rc.2",
74
- "@deepseek-ai/dsh-session-projection": "^0.1.5-rc.2",
75
- "@deepseek-ai/cordis": "^4.0.2"
65
+ "@deepseek-ai/dsh-agent": "^0.1.6-alpha.2",
66
+ "@deepseek-ai/dsh-agent-loop": "^0.1.6-alpha.2",
67
+ "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.2",
68
+ "@deepseek-ai/dsh-commands": "^0.1.6-alpha.2",
69
+ "@deepseek-ai/dsh-invariants": "^0.1.6-alpha.2",
70
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
71
+ "@deepseek-ai/dsh-llm": "^0.1.6-alpha.2",
72
+ "@deepseek-ai/dsh-system-prompt": "^0.1.6-alpha.2",
73
+ "@deepseek-ai/dsh-tools": "^0.1.6-alpha.2",
74
+ "@deepseek-ai/dsh-user-questions": "^0.1.6-alpha.2",
75
+ "@deepseek-ai/cordis": "^4.0.2",
76
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2"
76
77
  }
77
78
  }