@deepseek-ai/dsh-plan-mode 0.1.2-rc.1 → 0.1.5-alpha.1
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: 693273ab4bdfddebd6145046e8354a5a211c8b8b
|
|
6
|
+
README.zh.md: 39a7a65c29d3f11dfb9e9f4dc696d59082c82240
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
|
|
|
9
9
|
|
|
10
10
|
## Summary
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Plan mode asks an agent to explore and design before execution, then presents the finished plan for your approval. Enter it with `/plan`, optionally with a message or ordered image and file attachments; leave with `/plan off`, approve the review to continue, or return feedback for more planning. Deployment-defined guidance controls planning behavior, but every tool remains available, so use sandbox mode and approval prompts for enforced limits. The active state survives session resume and forks. Choose it when you want a reviewed plan before the agent acts.
|
|
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
|
-
|
|
12
|
+
计划模式要求 agent 先探索和设计再执行,然后把完成的计划呈交你批准。用 `/plan` 进入,并可附带一条消息或按顺序排列的图片与文件附件;用 `/plan off` 离开,批准评审以继续执行,或反馈意见以要求继续规划。部署方定义的引导控制规划行为,但每个工具仍然可用,因此请用沙箱模式与审批提示施加强制限制。激活状态会在会话恢复和 fork 后保留。当你希望 agent 行动前先提交一份经评审的计划时,选择计划模式。
|
|
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.5-alpha.1",
|
|
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-commands": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-invariants": "^0.1.
|
|
47
|
-
"@deepseek-ai/dsh-llm": "^0.1.
|
|
48
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
49
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
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.5-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-commands": "^0.1.5-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-invariants": "^0.1.5-alpha.1",
|
|
47
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
|
|
48
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
|
|
49
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.1",
|
|
50
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.1",
|
|
51
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.1",
|
|
52
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.5-alpha.1",
|
|
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-
|
|
66
|
-
"@deepseek-ai/dsh-
|
|
67
|
-
"@deepseek-ai/dsh-commands": "^0.1.
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-session
|
|
71
|
-
"@deepseek-ai/dsh-
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/
|
|
64
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.5-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-code-runtime": "^0.1.5-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-agent": "^0.1.5-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-commands": "^0.1.5-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-llm": "^0.1.5-alpha.1",
|
|
69
|
+
"@deepseek-ai/dsh-invariants": "^0.1.5-alpha.1",
|
|
70
|
+
"@deepseek-ai/dsh-session": "^0.1.5-alpha.1",
|
|
71
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.5-alpha.1",
|
|
72
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.5-alpha.1",
|
|
73
|
+
"@deepseek-ai/dsh-tools": "^0.1.5-alpha.1",
|
|
74
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.5-alpha.1",
|
|
75
|
+
"@deepseek-ai/cordis": "^4.0.2"
|
|
76
76
|
}
|
|
77
77
|
}
|