@deepseek-ai/dsh-plan-mode 0.2.0-rc.2 → 0.2.1-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 +4 -4
- package/README.md +1 -2
- package/README.zh.md +1 -2
- package/lib/index.js +1 -2
- package/lib/types/index.d.ts +1 -2
- package/lib/types/index.js +1 -2
- package/package.json +22 -29
- package/lib/invariant.js +0 -41
- package/lib/types/invariant.d.ts +0 -13
- package/lib/types/invariant.js +0 -44
package/README.i18n.yaml
CHANGED
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
en: 74cd6bdf50af51f5
|
|
52
52
|
zh: 67609cf7202ececb
|
|
53
53
|
/deepseek-ai-dsh-plan-mode/understand-the-implementation/source-map:
|
|
54
|
-
en:
|
|
55
|
-
zh:
|
|
54
|
+
en: fa97e858495a8105
|
|
55
|
+
zh: 8be1fbd7e420ff8a
|
|
56
56
|
/deepseek-ai-dsh-plan-mode/further-exploration:
|
|
57
|
-
en:
|
|
58
|
-
zh:
|
|
57
|
+
en: 5008d6d632002f49
|
|
58
|
+
zh: 65184d489ecdcec0
|
|
59
59
|
/deepseek-ai-dsh-plan-mode/model-experience:
|
|
60
60
|
en: 215e7ba838619b7b
|
|
61
61
|
zh: a311da3843709f90
|
package/README.md
CHANGED
|
@@ -103,7 +103,6 @@ When `ctx.sessionProjections` is composed, the package registers the `plan` unit
|
|
|
103
103
|
| [`src/index.ts`](src/index.ts) | Plugin entry: `Config` schema, the `ctx.planMode` service, `plan:policy` section, `/plan` command, `exit_plan_mode` tool |
|
|
104
104
|
| [`src/types.ts`](src/types.ts) | The `plan` projection-key declaration and `PlanProjection` wire value |
|
|
105
105
|
| [`src/client.ts`](src/client.ts) | Client-namespace re-export of the types outlet |
|
|
106
|
-
| [`src/invariant.ts`](src/invariant.ts) | Invariant companion: validates the `plan/mode` payload shape |
|
|
107
106
|
|
|
108
107
|
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
|
|
|
@@ -120,7 +119,7 @@ Read these pages when the package-level contract is not enough. They move from t
|
|
|
120
119
|
- [plan/ package map](../README.md) — the group and its single package.
|
|
121
120
|
- [exit_plan_mode tool catalog entry](../../../docs/tool-catalog.md#deepseek-aidsh-plan-mode) — the exact schema the model receives.
|
|
122
121
|
- [Generated configuration catalog](../../../docs/config-catalog.md#deepseek-aidsh-plan-mode) — every accepted config field and its meaning.
|
|
123
|
-
- [Plan-specific collaboration state](../../../.agents/notes/
|
|
122
|
+
- [archived Plan-specific collaboration state](../../../.agents/notes/archived/simplification/2026-07-22-plan-specific-collaboration-state.md) — the design decision behind plan mode.
|
|
124
123
|
|
|
125
124
|
-----
|
|
126
125
|
|
package/README.zh.md
CHANGED
|
@@ -103,7 +103,6 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
|
|
|
103
103
|
| [`src/index.ts`](src/index.ts) | 插件入口:`Config` schema、`ctx.planMode` 服务、`plan:policy` 段落、`/plan` 命令、`exit_plan_mode` 工具 |
|
|
104
104
|
| [`src/types.ts`](src/types.ts) | `plan` 投影 key 声明与 `PlanProjection` 协议值 |
|
|
105
105
|
| [`src/client.ts`](src/client.ts) | types 出口的客户端命名空间再导出 |
|
|
106
|
-
| [`src/invariant.ts`](src/invariant.ts) | 不变式伴生插件:校验 `plan/mode` 载荷结构 |
|
|
107
106
|
|
|
108
107
|
审批意图携带发起工具调用的标识,让 Web 客户端在审批关闭后重新打开同一份计划。完整 Markdown 保留在已有的原生调用或 PTC dispatch 日志中。
|
|
109
108
|
|
|
@@ -120,7 +119,7 @@ agent 完成计划后,会以 markdown 形式、从标题开头书写计划并
|
|
|
120
119
|
- [plan/ 包映射](../README.zh.md)——本组及其唯一的包。
|
|
121
120
|
- [`exit_plan_mode` 工具目录条目](../../../docs/tool-catalog.zh.md#deepseek-aidsh-plan-mode)——模型收到的确切 schema。
|
|
122
121
|
- [生成的配置目录](../../../docs/config-catalog.zh.md#deepseek-aidsh-plan-mode)——每个受支持配置字段及其含义。
|
|
123
|
-
- [plan 专用协作状态](../../../.agents/notes/
|
|
122
|
+
- [已归档的plan 专用协作状态](../../../.agents/notes/archived/simplification/2026-07-22-plan-specific-collaboration-state.md)——计划模式背后的设计决策。
|
|
124
123
|
|
|
125
124
|
-----
|
|
126
125
|
|
package/lib/index.js
CHANGED
|
@@ -23,8 +23,7 @@ import { UserQuestionError } from "@deepseek-ai/dsh-user-questions";
|
|
|
23
23
|
* or leaving plan mode changes only the prompt section, not the request tool
|
|
24
24
|
* catalog.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
* - .agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.md
|
|
26
|
+
* See packages/plan/plan-mode/README.md.
|
|
28
27
|
*
|
|
29
28
|
* @module @deepseek-ai/dsh-plan-mode
|
|
30
29
|
*/
|
package/lib/types/index.d.ts
CHANGED
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
* or leaving plan mode changes only the prompt section, not the request tool
|
|
17
17
|
* catalog.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* - .agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.md
|
|
19
|
+
* See packages/plan/plan-mode/README.md.
|
|
21
20
|
*
|
|
22
21
|
* @module @deepseek-ai/dsh-plan-mode
|
|
23
22
|
*/
|
package/lib/types/index.js
CHANGED
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
* or leaving plan mode changes only the prompt section, not the request tool
|
|
17
17
|
* catalog.
|
|
18
18
|
*
|
|
19
|
-
*
|
|
20
|
-
* - .agents/notes/implemented/simplification/2026-07-22-plan-specific-collaboration-state.md
|
|
19
|
+
* See packages/plan/plan-mode/README.md.
|
|
21
20
|
*
|
|
22
21
|
* @module @deepseek-ai/dsh-plan-mode
|
|
23
22
|
*/
|
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.2.
|
|
4
|
+
"version": "0.2.1-alpha.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./types": {
|
|
26
22
|
"types": "./lib/types/types.d.ts",
|
|
27
23
|
"default": "./lib/types/types.js"
|
|
@@ -35,22 +31,20 @@
|
|
|
35
31
|
},
|
|
36
32
|
"files": [
|
|
37
33
|
"lib/index.js",
|
|
38
|
-
"lib/invariant.js",
|
|
39
34
|
"lib/types/**/*.js",
|
|
40
35
|
"lib/types/**/*.d.ts"
|
|
41
36
|
],
|
|
42
37
|
"license": "MIT",
|
|
43
38
|
"peerDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
45
|
-
"@deepseek-ai/dsh-
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
48
|
-
"@deepseek-ai/dsh-
|
|
49
|
-
"@deepseek-ai/dsh-
|
|
50
|
-
"@deepseek-ai/dsh-tools": "0.2.
|
|
51
|
-
"@deepseek-ai/dsh-user-questions": "0.2.
|
|
52
|
-
"@deepseek-ai/
|
|
53
|
-
"@deepseek-ai/cordis": "~4.0.4"
|
|
39
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
|
|
40
|
+
"@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
|
|
41
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
42
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
|
|
44
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
|
|
45
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
|
|
46
|
+
"@deepseek-ai/dsh-user-questions": "0.2.1-alpha.1",
|
|
47
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
54
48
|
},
|
|
55
49
|
"peerDependenciesMeta": {
|
|
56
50
|
"@deepseek-ai/dsh-commands": {
|
|
@@ -59,20 +53,19 @@
|
|
|
59
53
|
},
|
|
60
54
|
"dependencies": {
|
|
61
55
|
"zod": "^4.4.3",
|
|
62
|
-
"@deepseek-ai/dsh-brand": "0.2.
|
|
56
|
+
"@deepseek-ai/dsh-brand": "0.2.1-alpha.1"
|
|
63
57
|
},
|
|
64
58
|
"devDependencies": {
|
|
65
|
-
"@deepseek-ai/dsh-agent
|
|
66
|
-
"@deepseek-ai/dsh-ptc-runtime": "0.2.
|
|
67
|
-
"@deepseek-ai/dsh-
|
|
68
|
-
"@deepseek-ai/dsh-
|
|
69
|
-
"@deepseek-ai/dsh-
|
|
70
|
-
"@deepseek-ai/dsh-
|
|
71
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
72
|
-
"@deepseek-ai/dsh-
|
|
73
|
-
"@deepseek-ai/dsh-
|
|
74
|
-
"@deepseek-ai/dsh-
|
|
75
|
-
"@deepseek-ai/
|
|
76
|
-
"@deepseek-ai/cordis": "~4.0.4"
|
|
59
|
+
"@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
|
|
60
|
+
"@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.1",
|
|
61
|
+
"@deepseek-ai/dsh-commands": "0.2.1-alpha.1",
|
|
62
|
+
"@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
|
|
63
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.1",
|
|
64
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.1",
|
|
65
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
|
|
66
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
|
|
67
|
+
"@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
|
|
68
|
+
"@deepseek-ai/dsh-user-questions": "0.2.1-alpha.1",
|
|
69
|
+
"@deepseek-ai/cordis": "~4.0.5-alpha.1"
|
|
77
70
|
}
|
|
78
71
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
/** Package-owned durable plan-mode invariants. @module @deepseek-ai/dsh-plan-mode/invariant */
|
|
3
|
-
const PACKAGE_NAME = "@deepseek-ai/dsh-plan-mode";
|
|
4
|
-
/** Cordis companion plugin name. */
|
|
5
|
-
const name = "plan-mode-invariant";
|
|
6
|
-
/** Service required before the companion can reserve package ownership. */
|
|
7
|
-
const inject = ["invariants"];
|
|
8
|
-
/**
|
|
9
|
-
* Validate one `plan/mode` event before it reaches the durable log.
|
|
10
|
-
* `plan/mode` is a standalone whole-value event: an idle selection commits
|
|
11
|
-
* between turns and a mid-turn selection commits at the step boundary, so
|
|
12
|
-
* no turn-enclosure relation exists — only the payload shape is checkable.
|
|
13
|
-
*/
|
|
14
|
-
function validateEvent(event, fail) {
|
|
15
|
-
if (event.type !== "plan/mode") return;
|
|
16
|
-
const active = event.data.active;
|
|
17
|
-
if (typeof active !== "boolean") fail(`plan/mode carries invalid active state ${JSON.stringify(active)}; expected a boolean`);
|
|
18
|
-
}
|
|
19
|
-
/** Install validation for loaded and newly appended plan-mode state. */
|
|
20
|
-
const install = Object.assign((ctx, fail) => {
|
|
21
|
-
const seed = (session) => {
|
|
22
|
-
for (const event of session.snapshotEvents()) validateEvent(event, fail);
|
|
23
|
-
};
|
|
24
|
-
for (const session of ctx.sessions.list()) seed(session);
|
|
25
|
-
ctx.on("session/created", (session) => {
|
|
26
|
-
seed(session);
|
|
27
|
-
}, { global: true });
|
|
28
|
-
ctx.on("internal/dispatch", (_mode, eventName, args) => {
|
|
29
|
-
if (eventName !== "session/event") return;
|
|
30
|
-
const [, event] = args;
|
|
31
|
-
validateEvent(event, fail);
|
|
32
|
-
}, { global: true });
|
|
33
|
-
}, { inject: ["sessions"] });
|
|
34
|
-
/**
|
|
35
|
-
* Register the plan-mode invariant companion.
|
|
36
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
37
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
38
|
-
*/
|
|
39
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
40
|
-
//#endregion
|
|
41
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Package-owned durable plan-mode invariants. @module @deepseek-ai/dsh-plan-mode/invariant */
|
|
2
|
-
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
-
/** Cordis companion plugin name. */
|
|
4
|
-
export declare const name = "plan-mode-invariant";
|
|
5
|
-
/** Service required before the companion can reserve package ownership. */
|
|
6
|
-
export declare const inject: string[];
|
|
7
|
-
/**
|
|
8
|
-
* Register the plan-mode invariant companion.
|
|
9
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
10
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
11
|
-
*/
|
|
12
|
-
export declare const apply: (ctx: Context) => Promise<() => void>;
|
|
13
|
-
//# sourceMappingURL=invariant.d.ts.map
|
package/lib/types/invariant.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/** Package-owned durable plan-mode invariants. @module @deepseek-ai/dsh-plan-mode/invariant */
|
|
2
|
-
const PACKAGE_NAME = '@deepseek-ai/dsh-plan-mode';
|
|
3
|
-
/** Cordis companion plugin name. */
|
|
4
|
-
export const name = 'plan-mode-invariant';
|
|
5
|
-
/** Service required before the companion can reserve package ownership. */
|
|
6
|
-
export const inject = ['invariants'];
|
|
7
|
-
/**
|
|
8
|
-
* Validate one `plan/mode` event before it reaches the durable log.
|
|
9
|
-
* `plan/mode` is a standalone whole-value event: an idle selection commits
|
|
10
|
-
* between turns and a mid-turn selection commits at the step boundary, so
|
|
11
|
-
* no turn-enclosure relation exists — only the payload shape is checkable.
|
|
12
|
-
*/
|
|
13
|
-
function validateEvent(event, fail) {
|
|
14
|
-
if (event.type !== 'plan/mode')
|
|
15
|
-
return;
|
|
16
|
-
const active = event.data.active;
|
|
17
|
-
if (typeof active !== 'boolean') {
|
|
18
|
-
fail(`plan/mode carries invalid active state ${JSON.stringify(active)}; expected a boolean`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
/** Install validation for loaded and newly appended plan-mode state. */
|
|
22
|
-
const install = Object.assign((ctx, fail) => {
|
|
23
|
-
const seed = (session) => {
|
|
24
|
-
// oxlint-disable-next-line typescript/no-deprecated -- Existing Session history read; migration deferred.
|
|
25
|
-
for (const event of session.snapshotEvents())
|
|
26
|
-
validateEvent(event, fail);
|
|
27
|
-
};
|
|
28
|
-
for (const session of ctx.sessions.list())
|
|
29
|
-
seed(session);
|
|
30
|
-
ctx.on('session/created', (session) => { seed(session); }, { global: true });
|
|
31
|
-
ctx.on('internal/dispatch', (_mode, eventName, args) => {
|
|
32
|
-
if (eventName !== 'session/event')
|
|
33
|
-
return;
|
|
34
|
-
const [, event] = args;
|
|
35
|
-
validateEvent(event, fail);
|
|
36
|
-
}, { global: true });
|
|
37
|
-
}, { inject: ['sessions'] });
|
|
38
|
-
/**
|
|
39
|
-
* Register the plan-mode invariant companion.
|
|
40
|
-
* @param ctx - Cordis context carrying the invariant service.
|
|
41
|
-
* @returns the installed registration's disposer after setup succeeds.
|
|
42
|
-
*/
|
|
43
|
-
export const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
44
|
-
//# sourceMappingURL=invariant.js.map
|