@deepseek-ai/dsh-tool-todo 0.1.0-rc.8 → 0.1.1-rc.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 +1 -1
- package/README.zh.md +4 -4
- package/lib/index.js +5 -2
- package/lib/types/index.js +2 -2
- package/lib/types/types.d.ts +3 -0
- package/package.json +20 -20
package/README.i18n.yaml
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/todo/tool-todo/README.md
|
|
5
5
|
README.md: 4848758dd8f2049221901744e5d09cef2dd31591
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: 3c79ca6bba9bb0ffd7e1960dae7000bdb525bdfb
|
package/README.zh.md
CHANGED
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
|
|
27
27
|
## 渲染
|
|
28
28
|
|
|
29
|
-
规范结果为 `{ todos, counts: { pending, inProgress, completed } }`;其 Native 渲染器返回精简的更新确认。工具还会写入完整 `todo/write` 会话事件。UI 订阅事件流,并自行渲染该持久化列表:[web 客户端](../../client/ui-conversation)基于当前有效计划(其后没有更晚 `turn/start` 的最近一次 `todo/write`)显示计划条和专属工具行([展示](../../../.agents/notes/implemented/feature/2026-07-23-web-todo-display.md)、[生命周期](../../../.agents/notes/implemented/feature/2026-07-28-todo-plan-clears-on-next-turn.md))。
|
|
29
|
+
规范结果为 `{ todos, counts: { pending, inProgress, completed } }`;其 Native 渲染器返回精简的更新确认。工具还会写入完整 `todo/write` 会话事件。UI 订阅事件流,并自行渲染该持久化列表:[web 客户端](../../client/ui-conversation)基于当前有效计划(其后没有更晚 `turn/start` 的最近一次 `todo/write`)显示计划条和专属工具行([展示](../../../.agents/notes/implemented/feature/2026-07-23-web-todo-display.zh.md)、[生命周期](../../../.agents/notes/implemented/feature/2026-07-28-todo-plan-clears-on-next-turn.zh.md))。
|
|
30
30
|
|
|
31
31
|
## 会话投影
|
|
32
32
|
|
|
33
|
-
当组合挂载了 `ctx.sessionProjections`([`@deepseek-ai/dsh-session-projection`](../../session/session-projection/README.md))时,本包在一个注入的子插件中注册 `todos` 投影单元:`init` = `null`(尚无写入)、`apply` = 从每个 `todo/write` 取整表,并在每个 `turn/start` 清为 `null`(当前有效计划;`turn/end` 保留刚完成的清单;其余事件都返回同一个状态引用)、`view` = 恒等、`stateVersion` = 2。该键在本包中合并进 `SessionProjectionMap`(经 Service Definition 包的 `/types` 出口);框架驱动该单元,载体通过历史尾页与 `session/projection` 推送帧提供该值。未挂载注册表的组合不受影响。生命周期理由见 [在下一轮次清空 todo 计划](../../../.agents/notes/implemented/feature/2026-07-28-todo-plan-clears-on-next-turn.md)。
|
|
33
|
+
当组合挂载了 `ctx.sessionProjections`([`@deepseek-ai/dsh-session-projection`](../../session/session-projection/README.zh.md))时,本包在一个注入的子插件中注册 `todos` 投影单元:`init` = `null`(尚无写入)、`apply` = 从每个 `todo/write` 取整表,并在每个 `turn/start` 清为 `null`(当前有效计划;`turn/end` 保留刚完成的清单;其余事件都返回同一个状态引用)、`view` = 恒等、`stateVersion` = 2。该键在本包中合并进 `SessionProjectionMap`(经 Service Definition 包的 `/types` 出口);框架驱动该单元,载体通过历史尾页与 `session/projection` 推送帧提供该值。未挂载注册表的组合不受影响。生命周期理由见 [在下一轮次清空 todo 计划](../../../.agents/notes/implemented/feature/2026-07-28-todo-plan-clears-on-next-turn.zh.md)。
|
|
34
34
|
|
|
35
35
|
## 导出形状
|
|
36
36
|
|
|
37
|
-
函数/命名空间插件:导出 `name`/`inject`/`apply`,不提供默认导出。意外的 `export default` 会被 Loader 的 `unwrapExports` 折叠为默认导出,并导致 `inject` 丢失(参见 [docs/postmortem/0001](../../../docs/postmortem/0001-acp-default-export-drops-inject.md))。
|
|
37
|
+
函数/命名空间插件:导出 `name`/`inject`/`apply`,不提供默认导出。意外的 `export default` 会被 Loader 的 `unwrapExports` 折叠为默认导出,并导致 `inject` 丢失(参见 [docs/postmortem/0001](../../../docs/postmortem/0001-acp-default-export-drops-inject.zh.md))。
|
|
38
38
|
|
|
39
39
|
## 模型体验
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
#### 模型看到的内容
|
|
44
44
|
|
|
45
|
-
模型会看到生成的 [`todo_write` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-todo)。
|
|
45
|
+
模型会看到生成的 [`todo_write` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-todo)。
|
|
46
46
|
|
|
47
47
|
#### Token 影响
|
|
48
48
|
|
package/lib/index.js
CHANGED
|
@@ -80,14 +80,17 @@ function apply(ctx, config) {
|
|
|
80
80
|
ctx.inject(["sessionProjections"], (projectionCtx) => {
|
|
81
81
|
projectionCtx.sessionProjections.register({
|
|
82
82
|
key: "todos",
|
|
83
|
-
|
|
83
|
+
stateSchema: todosProjectionSchema,
|
|
84
84
|
init: () => null,
|
|
85
85
|
apply: (state, event) => {
|
|
86
86
|
if (event.type === "todo/write") return event.data.todos;
|
|
87
87
|
if (event.type === "turn/start") return null;
|
|
88
88
|
return state;
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
wire: {
|
|
91
|
+
viewSchema: todosProjectionSchema,
|
|
92
|
+
view: (state) => state
|
|
93
|
+
},
|
|
91
94
|
stateVersion: 2
|
|
92
95
|
});
|
|
93
96
|
});
|
package/lib/types/index.js
CHANGED
|
@@ -98,7 +98,7 @@ export function apply(ctx, config) {
|
|
|
98
98
|
ctx.inject(['sessionProjections'], (projectionCtx) => {
|
|
99
99
|
projectionCtx.sessionProjections.register({
|
|
100
100
|
key: 'todos',
|
|
101
|
-
|
|
101
|
+
stateSchema: todosProjectionSchema,
|
|
102
102
|
init: () => null,
|
|
103
103
|
apply: (state, event) => {
|
|
104
104
|
if (event.type === 'todo/write')
|
|
@@ -107,7 +107,7 @@ export function apply(ctx, config) {
|
|
|
107
107
|
return null;
|
|
108
108
|
return state;
|
|
109
109
|
},
|
|
110
|
-
view: state => state,
|
|
110
|
+
wire: { viewSchema: todosProjectionSchema, view: state => state },
|
|
111
111
|
stateVersion: 2,
|
|
112
112
|
});
|
|
113
113
|
});
|
package/lib/types/types.d.ts
CHANGED
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
import type { TodoItem } from '@deepseek-ai/dsh-session/types';
|
|
11
11
|
export type { TodoItem } from '@deepseek-ai/dsh-session/types';
|
|
12
12
|
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
13
|
+
interface SessionProjectionStateMap {
|
|
14
|
+
todos: TodoItem[] | null;
|
|
15
|
+
}
|
|
13
16
|
interface SessionProjectionMap {
|
|
14
17
|
/**
|
|
15
18
|
* The agent's current whole todo list (the latest `todo/write` snapshot),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-tool-todo",
|
|
3
3
|
"description": "Model-facing todo_write tool over the DeepSeek Harness event-sourced session log",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -41,27 +41,27 @@
|
|
|
41
41
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
"@deepseek-ai/dsh-session": "^0.1.
|
|
46
|
-
"@deepseek-ai/dsh-
|
|
47
|
-
"@deepseek-ai/dsh-session-projection": "^0.1.
|
|
48
|
-
"@deepseek-ai/
|
|
49
|
-
"@deepseek-ai/
|
|
44
|
+
"@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
47
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.1-rc.2",
|
|
48
|
+
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
49
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0.2",
|
|
53
|
-
"@deepseek-ai/dsh-agent": "^0.1.0-rc.8",
|
|
54
|
-
"@deepseek-ai/dsh-agent-loop": "^0.1.0-rc.8",
|
|
55
52
|
"@deepseek-ai/cordis-plugin-include": "^1.0.6",
|
|
56
|
-
"@deepseek-ai/
|
|
57
|
-
"@deepseek-ai/dsh-
|
|
58
|
-
"@deepseek-ai/dsh-
|
|
59
|
-
"@deepseek-ai/dsh-
|
|
60
|
-
"@deepseek-ai/dsh-
|
|
61
|
-
"@deepseek-ai/dsh-
|
|
62
|
-
"@deepseek-ai/dsh-
|
|
63
|
-
"@deepseek-ai/dsh-
|
|
64
|
-
"@deepseek-ai/dsh-
|
|
65
|
-
"@deepseek-ai/
|
|
53
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.2",
|
|
54
|
+
"@deepseek-ai/dsh-agent-loop": "^0.1.1-rc.2",
|
|
55
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.1.1-rc.2",
|
|
56
|
+
"@deepseek-ai/dsh-agent": "^0.1.1-rc.2",
|
|
57
|
+
"@deepseek-ai/dsh-host-apiproxy": "^0.1.1-rc.2",
|
|
58
|
+
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
59
|
+
"@deepseek-ai/dsh-session": "^0.1.1-rc.2",
|
|
60
|
+
"@deepseek-ai/dsh-session-projection": "^0.1.1-rc.2",
|
|
61
|
+
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
62
|
+
"@deepseek-ai/dsh-user-questions": "^0.1.1-rc.2",
|
|
63
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
64
|
+
"@deepseek-ai/dsh-tools": "^0.1.1-rc.2",
|
|
65
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.1-rc.2"
|
|
66
66
|
}
|
|
67
67
|
}
|