@deepseek-ai/dsh-plan-mode 0.1.2-rc.1 → 0.1.3-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 +2 -2
- package/README.md +5 -5
- package/README.zh.md +5 -5
- package/lib/index.js +2 -2
- package/lib/types/index.js +2 -2
- package/package.json +23 -23
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:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: b9a86fe530923956365b17dbe5e0ececa28b3416
|
|
6
|
+
README.zh.md: 5c1e21bac520dcd973c181d70139969abcff8b1b
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
`dsh-plan-mode` adds plan mode to the agent: 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 enter plan mode with `/plan
|
|
12
|
+
`dsh-plan-mode` adds plan mode to the agent: 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 enter plan mode with `/plan`, optionally carrying a message and ordered image or file attachments, and leave it with `/plan off`; the finished plan arrives as a review where you can approve it or send the agent back to keep planning. Plan mode is guidance, not enforcement: every tool stays available, so sandbox mode and approval prompts remain the way to impose limits. Choose it when the agent should think before acting, and plan mode carries over when a session resumes or forks.
|
|
13
13
|
|
|
14
14
|
## Table of Contents
|
|
15
15
|
|
|
@@ -54,7 +54,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a
|
|
|
54
54
|
|
|
55
55
|
Type `/plan` to enter plan mode, or `/plan <message>` to enter with an instruction — the message becomes your next request under plan guidance. Type `/plan off` to leave plan mode directly; it also cancels a plan-mode entry that has not taken effect yet.
|
|
56
56
|
|
|
57
|
-
You can attach images to a `/plan` message, and they are included with your instruction. `/plan off` with
|
|
57
|
+
You can attach images and generic files to a `/plan` message, and they are included with your instruction in selection order. `/plan off` with attachments is rejected before the mode changes, so the draft and cards remain available. The `/plan` command is available wherever slash commands are supported, such as the Web client.
|
|
58
58
|
|
|
59
59
|
### The reviewed exit
|
|
60
60
|
|
|
@@ -86,7 +86,7 @@ The package persists one log-only whole-value event, `plan/mode`, and the last l
|
|
|
86
86
|
|
|
87
87
|
### The `/plan` command
|
|
88
88
|
|
|
89
|
-
The command child activates only when a commands service is composed. It maps bare `/plan` to active, the exact argument `off` to inactive without model input, and any other non-empty argument to active plus the trimmed text submitted through `agent.steer()` as the next step's ordinary logged user message
|
|
89
|
+
The command child activates only when a commands service is composed. It maps bare `/plan` to active, the exact argument `off` to inactive without model input, and any other non-empty argument to active plus the trimmed text submitted through `agent.steer()` as the next step's ordinary logged user message. Admitted image and file blocks keep their selection order in that message; `/plan off` with attachments fails before any mode change. Entry points other than the command may drive `ctx.planMode` directly; the exact branch handling is in [`src/index.ts`](src/index.ts).
|
|
90
90
|
|
|
91
91
|
### The exit tool
|
|
92
92
|
|
|
@@ -149,11 +149,11 @@ The section is stable within plan mode, but entering or leaving changes the syst
|
|
|
149
149
|
|
|
150
150
|
#### What the model sees
|
|
151
151
|
|
|
152
|
-
`/plan`, `/plan off`, and their terminal results stay outside model history. A non-empty suffix other than the exact `off` argument becomes one user message through `agent.steer()` after plan mode is selected:
|
|
152
|
+
`/plan`, `/plan off`, and their terminal results stay outside model history. A non-empty suffix other than the exact `off` argument becomes one user message through `agent.steer()` after plan mode is selected: admitted image and file blocks in selection order, then the trimmed text block. Bare `/plan` with admitted attachments steers one user message containing only those blocks. An active `/plan off` selection contributes the standard logged user-switch notice only when the last request header described plan mode; cancelling a pending entry contributes none because no request observed it.
|
|
153
153
|
|
|
154
154
|
#### Token effect
|
|
155
155
|
|
|
156
|
-
The optional message costs the same history tokens as submitting that content separately. Bare `/plan` without
|
|
156
|
+
The optional message costs the same history tokens as submitting that content separately. Bare `/plan` without attachments and `/plan off` add none; bare `/plan` with attachments has the normal image and file-handle cost. A narrated active exit adds the small retained switch notice.
|
|
157
157
|
|
|
158
158
|
#### KV Cache effect
|
|
159
159
|
|
package/README.zh.md
CHANGED
|
@@ -9,7 +9,7 @@ kind: "package-reference"
|
|
|
9
9
|
|
|
10
10
|
## 概述
|
|
11
11
|
|
|
12
|
-
`dsh-plan-mode` 为 agent(智能体)提供计划模式:激活期间,agent 先探索和设计再执行,遵循你的部署所写的引导行事,并在执行前把完成的计划呈交你批准。你可以用 `/plan
|
|
12
|
+
`dsh-plan-mode` 为 agent(智能体)提供计划模式:激活期间,agent 先探索和设计再执行,遵循你的部署所写的引导行事,并在执行前把完成的计划呈交你批准。你可以用 `/plan` 进入计划模式,并随命令附带消息及有序的图片或文件附件;用 `/plan off` 离开。完成的计划会以评审形式呈现,你可以批准它,或让 agent 回去继续规划。计划模式是引导而非强制:每个工具仍然可用,因此沙箱模式与审批提示仍是施加限制的方式。当希望 agent 先思考再行动时选择它;会话恢复或 fork 后计划模式依然保持。
|
|
13
13
|
|
|
14
14
|
## 目录
|
|
15
15
|
|
|
@@ -54,7 +54,7 @@ kind: "package-reference"
|
|
|
54
54
|
|
|
55
55
|
输入 `/plan` 进入计划模式,或输入 `/plan <message>` 连同一条指令一起进入——该消息会成为你在计划引导下的下一条请求。输入 `/plan off` 直接离开计划模式;它还会取消尚未生效的计划模式进入。
|
|
56
56
|
|
|
57
|
-
你可以在 `/plan`
|
|
57
|
+
你可以在 `/plan` 消息中附带图片与通用文件,它们按选择顺序随指令一起提交。带附件的 `/plan off` 会在模式变更前被拒绝,因此草稿和附件卡仍可继续使用。`/plan` 命令在支持斜杠命令的界面中可用,例如 Web 客户端。
|
|
58
58
|
|
|
59
59
|
### 经评审的退出
|
|
60
60
|
|
|
@@ -86,7 +86,7 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
|
|
|
86
86
|
|
|
87
87
|
### `/plan` 命令
|
|
88
88
|
|
|
89
|
-
命令子插件只在组合了命令服务时激活。它把不带参数的 `/plan` 映射为激活,把恰好为 `off` 的参数映射为未激活且不发送模型输入,把其他非空参数映射为激活并把去除首尾空白的文本通过 `agent.steer()`
|
|
89
|
+
命令子插件只在组合了命令服务时激活。它把不带参数的 `/plan` 映射为激活,把恰好为 `off` 的参数映射为未激活且不发送模型输入,把其他非空参数映射为激活并把去除首尾空白的文本通过 `agent.steer()` 作为下一步骤的普通已记录用户消息提交。已准入的图片块与文件块按选择顺序进入这条消息;带附件的 `/plan off` 会在模式变更前失败。命令以外的入口可以直接驱动 `ctx.planMode`;确切的分支处理见 [`src/index.ts`](src/index.ts)。
|
|
90
90
|
|
|
91
91
|
### 退出工具
|
|
92
92
|
|
|
@@ -149,11 +149,11 @@ You are in plan mode. Explore and design before presenting the complete plan thr
|
|
|
149
149
|
|
|
150
150
|
#### 模型看到什么
|
|
151
151
|
|
|
152
|
-
`/plan`、`/plan off` 及其终端结果留在模型历史之外。除恰好为 `off` 以外的非空后缀会在选择计划模式后,通过 `agent.steer()`
|
|
152
|
+
`/plan`、`/plan off` 及其终端结果留在模型历史之外。除恰好为 `off` 以外的非空后缀会在选择计划模式后,通过 `agent.steer()` 成为一条用户消息:已准入的图片块与文件块按选择顺序排列,之后是去除首尾空白的文本块。不带参数的 `/plan` 若带有已准入附件,会 steer 一条只含这些块的用户消息。计划模式已激活时选择 `/plan off`,只会在最后记录的请求头描述了计划模式的情况下追加标准的已记录用户切换通知;取消待生效条目不贡献通知,因为没有请求观测到它。
|
|
153
153
|
|
|
154
154
|
#### Token 影响
|
|
155
155
|
|
|
156
|
-
可选消息的历史 token
|
|
156
|
+
可选消息的历史 token 成本与单独提交该内容相同。不带附件的 `/plan` 与 `/plan off` 不增加 token;带附件的 `/plan` 产生常规图片与文件句柄成本。一次带叙述的激活状态退出会追加一条简短且会保留的切换通知。
|
|
157
157
|
|
|
158
158
|
#### KV Cache 影响
|
|
159
159
|
|
package/lib/index.js
CHANGED
|
@@ -182,13 +182,13 @@ var PlanModeController = class extends Service {
|
|
|
182
182
|
description: "Enter or leave plan mode",
|
|
183
183
|
input: {
|
|
184
184
|
hint: "[off|message]",
|
|
185
|
-
|
|
185
|
+
attachments: true
|
|
186
186
|
},
|
|
187
187
|
handler: ({ agent, rawInput, attachments }) => {
|
|
188
188
|
const message = rawInput.trim();
|
|
189
189
|
if (message === "off" && attachments.length > 0) return {
|
|
190
190
|
kind: "error",
|
|
191
|
-
text: "
|
|
191
|
+
text: "Attachments cannot accompany /plan off."
|
|
192
192
|
};
|
|
193
193
|
if (message === "off") switch (this.set(agent, false)) {
|
|
194
194
|
case "committed": return {
|
package/lib/types/index.js
CHANGED
|
@@ -177,11 +177,11 @@ export class PlanModeController extends Service {
|
|
|
177
177
|
commandCtx.commands.register({
|
|
178
178
|
name: 'plan',
|
|
179
179
|
description: 'Enter or leave plan mode',
|
|
180
|
-
input: { hint: '[off|message]',
|
|
180
|
+
input: { hint: '[off|message]', attachments: true },
|
|
181
181
|
handler: ({ agent, rawInput, attachments }) => {
|
|
182
182
|
const message = rawInput.trim();
|
|
183
183
|
if (message === 'off' && attachments.length > 0) {
|
|
184
|
-
return { kind: 'error', text: '
|
|
184
|
+
return { kind: 'error', text: 'Attachments cannot accompany /plan off.' };
|
|
185
185
|
}
|
|
186
186
|
if (message === 'off') {
|
|
187
187
|
switch (this.set(agent, false)) {
|
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.
|
|
4
|
+
"version": "0.1.3-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-agent": "^0.1.
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.
|
|
51
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
52
|
-
"@deepseek-ai/
|
|
53
|
-
"@deepseek-ai/
|
|
44
|
+
"@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-invariants": "^0.1.3-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.3-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-commands": "^0.1.3-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.3-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-tools": "^0.1.3-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.3-alpha.2",
|
|
53
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
54
54
|
},
|
|
55
55
|
"peerDependenciesMeta": {
|
|
56
56
|
"@deepseek-ai/dsh-commands": {
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
"zod": "^4.4.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@deepseek-ai/dsh-agent": "^0.1.
|
|
65
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.
|
|
66
|
-
"@deepseek-ai/dsh-code-runtime": "^0.1.
|
|
67
|
-
"@deepseek-ai/dsh-commands": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
69
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
70
|
-
"@deepseek-ai/dsh-session
|
|
71
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.
|
|
72
|
-
"@deepseek-ai/dsh-tools": "^0.1.
|
|
73
|
-
"@deepseek-ai/
|
|
74
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
75
|
-
"@deepseek-ai/
|
|
64
|
+
"@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.3-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-code-runtime": "^0.1.3-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-commands": "^0.1.3-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-invariants": "^0.1.3-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.3-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-tools": "^0.1.3-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.3-alpha.2",
|
|
74
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.3-alpha.2",
|
|
75
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
76
76
|
}
|
|
77
77
|
}
|