dsh-taskflow 0.1.1 → 0.1.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/CHANGELOG.md +43 -35
- package/README.md +139 -139
- package/README_en.md +139 -139
- package/client.js +24 -24
- package/docs/DETAIL.md +1 -1
- package/docs/DETAIL.zh-CN.md +1 -1
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +134 -134
- package/src/server/rpc.mjs +24 -22
package/package.json
CHANGED
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-taskflow",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "智能任务编排:持久层级计划、按需递归子会话与完成通知",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "index.js",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": "./index.js",
|
|
9
|
-
"./client": "./client.js",
|
|
10
|
-
"./package.json": "./package.json",
|
|
11
|
-
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
-
"./icon": "./assets/icon.svg",
|
|
13
|
-
"./locale/*.json": "./locale/*.json"
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"index.js",
|
|
17
|
-
"client.js",
|
|
18
|
-
"src/domain/*.mjs",
|
|
19
|
-
"src/application/*.mjs",
|
|
20
|
-
"src/storage/*.mjs",
|
|
21
|
-
"src/server/*.mjs",
|
|
22
|
-
"assets/icon.svg",
|
|
23
|
-
"assets/icon.png",
|
|
24
|
-
"locale/*.json",
|
|
25
|
-
"cordis.patch.yml",
|
|
26
|
-
"README.md",
|
|
27
|
-
"README_en.md",
|
|
28
|
-
"CHANGELOG.md",
|
|
29
|
-
"NOTICE",
|
|
30
|
-
"LICENSE",
|
|
31
|
-
"licenses/*.txt",
|
|
32
|
-
"docs/DETAIL.md",
|
|
33
|
-
"docs/DETAIL.zh-CN.md"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "node scripts/build.mjs",
|
|
37
|
-
"build:check": "node scripts/build.mjs --check",
|
|
38
|
-
"test": "node --test test/*.test.mjs",
|
|
39
|
-
"check": "npm run build:check && npm test && npm run check:release",
|
|
40
|
-
"check:release": "node scripts/check-release.mjs",
|
|
41
|
-
"check:package": "node scripts/check-package.mjs",
|
|
42
|
-
"prepack": "npm run build && npm test && npm run check:release",
|
|
43
|
-
"dev": "node scripts/dev.mjs",
|
|
44
|
-
"check:hosts": "node scripts/check-hosts.mjs"
|
|
45
|
-
},
|
|
46
|
-
"engines": {
|
|
47
|
-
"node": ">=24.9.0",
|
|
48
|
-
"dsh": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0"
|
|
49
|
-
},
|
|
50
|
-
"dsh": {
|
|
51
|
-
"bundle": {
|
|
52
|
-
"patch": "./cordis.patch.yml"
|
|
53
|
-
},
|
|
54
|
-
"client": {
|
|
55
|
-
"platform": "web",
|
|
56
|
-
"inject": [
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-conversation",
|
|
58
|
-
"@deepseek-ai/dsh-client-ui-workspace",
|
|
59
|
-
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
60
|
-
"@deepseek-ai/dsh-client-ui-layout",
|
|
61
|
-
"@deepseek-ai/dsh-client-connection"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"peerDependencies": {
|
|
66
|
-
"@deepseek-ai/cordis": "~4.0.5 || ~4.1.0",
|
|
67
|
-
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0",
|
|
68
|
-
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0",
|
|
69
|
-
"@deepseek-ai/schemastery": "~3.18.5 || ~3.19.0",
|
|
70
|
-
"react": "^18.3.1",
|
|
71
|
-
"react-dom": "^18.3.1"
|
|
72
|
-
},
|
|
73
|
-
"devDependencies": {
|
|
74
|
-
"@deepseek-ai/cordis": "4.1.0",
|
|
75
|
-
"@deepseek-ai/dsh-agent": "0.2.2-rc.2",
|
|
76
|
-
"@deepseek-ai/dsh-agent-loop": "0.2.2-rc.2",
|
|
77
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.2",
|
|
78
|
-
"@deepseek-ai/dsh-client-connection": "0.2.2-rc.2",
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.2",
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.2",
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.2",
|
|
82
|
-
"@deepseek-ai/dsh-llm": "0.2.2-rc.2",
|
|
83
|
-
"@deepseek-ai/dsh-session": "0.2.2-rc.2",
|
|
84
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-rc.2",
|
|
85
|
-
"@deepseek-ai/dsh-subagent": "0.2.2-rc.2",
|
|
86
|
-
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-rc.2",
|
|
87
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2",
|
|
88
|
-
"@deepseek-ai/dsh-tools": "0.2.2-rc.2",
|
|
89
|
-
"@deepseek-ai/schemastery": "3.19.0",
|
|
90
|
-
"esbuild": "0.25.12",
|
|
91
|
-
"jsdom": "26.1.0",
|
|
92
|
-
"react": "18.3.1",
|
|
93
|
-
"react-dom": "18.3.1",
|
|
94
|
-
"yaml": "2.8.1",
|
|
95
|
-
"semver": "7.7.3"
|
|
96
|
-
},
|
|
97
|
-
"license": "(Apache-2.0 AND MIT)",
|
|
98
|
-
"author": "Oak-liuhj",
|
|
99
|
-
"repository": {
|
|
100
|
-
"type": "git",
|
|
101
|
-
"url": "git+https://github.com/Oak-liuhj/dsh-taskflow.git"
|
|
102
|
-
},
|
|
103
|
-
"keywords": [
|
|
104
|
-
"dsh-plugin",
|
|
105
|
-
"deepseek-harness",
|
|
106
|
-
"dsh",
|
|
107
|
-
"taskflow",
|
|
108
|
-
"task-tree",
|
|
109
|
-
"workflow",
|
|
110
|
-
"orchestration",
|
|
111
|
-
"subagents"
|
|
112
|
-
],
|
|
113
|
-
"homepage": "https://github.com/Oak-liuhj/dsh-taskflow#readme",
|
|
114
|
-
"bugs": {
|
|
115
|
-
"url": "https://github.com/Oak-liuhj/dsh-taskflow/issues"
|
|
116
|
-
},
|
|
117
|
-
"icon": "assets/icon.png",
|
|
118
|
-
"publishConfig": {
|
|
119
|
-
"access": "public",
|
|
120
|
-
"registry": "https://registry.npmjs.org/",
|
|
121
|
-
"tag": "latest"
|
|
122
|
-
},
|
|
123
|
-
"peerDependenciesMeta": {
|
|
124
|
-
"@deepseek-ai/cordis": {
|
|
125
|
-
"optional": true
|
|
126
|
-
},
|
|
127
|
-
"react": {
|
|
128
|
-
"optional": true
|
|
129
|
-
},
|
|
130
|
-
"react-dom": {
|
|
131
|
-
"optional": true
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-taskflow",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "智能任务编排:持久层级计划、按需递归子会话与完成通知",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./index.js",
|
|
9
|
+
"./client": "./client.js",
|
|
10
|
+
"./package.json": "./package.json",
|
|
11
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
12
|
+
"./icon": "./assets/icon.svg",
|
|
13
|
+
"./locale/*.json": "./locale/*.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"index.js",
|
|
17
|
+
"client.js",
|
|
18
|
+
"src/domain/*.mjs",
|
|
19
|
+
"src/application/*.mjs",
|
|
20
|
+
"src/storage/*.mjs",
|
|
21
|
+
"src/server/*.mjs",
|
|
22
|
+
"assets/icon.svg",
|
|
23
|
+
"assets/icon.png",
|
|
24
|
+
"locale/*.json",
|
|
25
|
+
"cordis.patch.yml",
|
|
26
|
+
"README.md",
|
|
27
|
+
"README_en.md",
|
|
28
|
+
"CHANGELOG.md",
|
|
29
|
+
"NOTICE",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"licenses/*.txt",
|
|
32
|
+
"docs/DETAIL.md",
|
|
33
|
+
"docs/DETAIL.zh-CN.md"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "node scripts/build.mjs",
|
|
37
|
+
"build:check": "node scripts/build.mjs --check",
|
|
38
|
+
"test": "node --test test/*.test.mjs",
|
|
39
|
+
"check": "npm run build:check && npm test && npm run check:release",
|
|
40
|
+
"check:release": "node scripts/check-release.mjs",
|
|
41
|
+
"check:package": "node scripts/check-package.mjs",
|
|
42
|
+
"prepack": "npm run build && npm test && npm run check:release",
|
|
43
|
+
"dev": "node scripts/dev.mjs",
|
|
44
|
+
"check:hosts": "node scripts/check-hosts.mjs"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=24.9.0",
|
|
48
|
+
"dsh": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0"
|
|
49
|
+
},
|
|
50
|
+
"dsh": {
|
|
51
|
+
"bundle": {
|
|
52
|
+
"patch": "./cordis.patch.yml"
|
|
53
|
+
},
|
|
54
|
+
"client": {
|
|
55
|
+
"platform": "web",
|
|
56
|
+
"inject": [
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-conversation",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-workspace",
|
|
59
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right",
|
|
60
|
+
"@deepseek-ai/dsh-client-ui-layout",
|
|
61
|
+
"@deepseek-ai/dsh-client-connection"
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@deepseek-ai/cordis": "~4.0.5 || ~4.1.0",
|
|
67
|
+
"@deepseek-ai/dsh-llm": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0",
|
|
68
|
+
"@deepseek-ai/dsh-tools": ">=0.2.1-rc.3 <1.0.0-0 || >=0.2.2-0 <1.0.0-0 || >=0.2.3-0 <1.0.0-0 || >=0.3.0-0 <1.0.0-0",
|
|
69
|
+
"@deepseek-ai/schemastery": "~3.18.5 || ~3.19.0",
|
|
70
|
+
"react": "^18.3.1",
|
|
71
|
+
"react-dom": "^18.3.1"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@deepseek-ai/cordis": "4.1.0",
|
|
75
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.2",
|
|
76
|
+
"@deepseek-ai/dsh-agent-loop": "0.2.2-rc.2",
|
|
77
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-rc.2",
|
|
78
|
+
"@deepseek-ai/dsh-client-connection": "0.2.2-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right": "0.2.2-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.2-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-subagent": "0.2.2-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.2-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.2",
|
|
89
|
+
"@deepseek-ai/schemastery": "3.19.0",
|
|
90
|
+
"esbuild": "0.25.12",
|
|
91
|
+
"jsdom": "26.1.0",
|
|
92
|
+
"react": "18.3.1",
|
|
93
|
+
"react-dom": "18.3.1",
|
|
94
|
+
"yaml": "2.8.1",
|
|
95
|
+
"semver": "7.7.3"
|
|
96
|
+
},
|
|
97
|
+
"license": "(Apache-2.0 AND MIT)",
|
|
98
|
+
"author": "Oak-liuhj",
|
|
99
|
+
"repository": {
|
|
100
|
+
"type": "git",
|
|
101
|
+
"url": "git+https://github.com/Oak-liuhj/dsh-taskflow.git"
|
|
102
|
+
},
|
|
103
|
+
"keywords": [
|
|
104
|
+
"dsh-plugin",
|
|
105
|
+
"deepseek-harness",
|
|
106
|
+
"dsh",
|
|
107
|
+
"taskflow",
|
|
108
|
+
"task-tree",
|
|
109
|
+
"workflow",
|
|
110
|
+
"orchestration",
|
|
111
|
+
"subagents"
|
|
112
|
+
],
|
|
113
|
+
"homepage": "https://github.com/Oak-liuhj/dsh-taskflow#readme",
|
|
114
|
+
"bugs": {
|
|
115
|
+
"url": "https://github.com/Oak-liuhj/dsh-taskflow/issues"
|
|
116
|
+
},
|
|
117
|
+
"icon": "assets/icon.png",
|
|
118
|
+
"publishConfig": {
|
|
119
|
+
"access": "public",
|
|
120
|
+
"registry": "https://registry.npmjs.org/",
|
|
121
|
+
"tag": "latest"
|
|
122
|
+
},
|
|
123
|
+
"peerDependenciesMeta": {
|
|
124
|
+
"@deepseek-ai/cordis": {
|
|
125
|
+
"optional": true
|
|
126
|
+
},
|
|
127
|
+
"react": {
|
|
128
|
+
"optional": true
|
|
129
|
+
},
|
|
130
|
+
"react-dom": {
|
|
131
|
+
"optional": true
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
package/src/server/rpc.mjs
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
//
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
else if (payload.action === '
|
|
15
|
-
else if (payload.action === '
|
|
16
|
-
else if (payload.action === '
|
|
17
|
-
else
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
// 独立 RPC 通道,避免抢占宿主 Gateway 的 /api interceptor。
|
|
2
|
+
// 传输沿用宿主认证;界面仍仅允许所有者访问。
|
|
3
|
+
export function registerRpc(ctx, service) {
|
|
4
|
+
ctx.inject(['connection', 'webServer'], scope => {
|
|
5
|
+
scope.effect(() => scope.connection.rpc.handle('/taskflow', async (method, payload, signal, peer) => {
|
|
6
|
+
if (!peer || (peer !== scope.connection.browserPeer && peer.principal?.kind !== 'owner')) return { ok: false, error: { code: 'forbidden', message: '仅宿主所有者可访问任务计划', details: {} } };
|
|
7
|
+
try {
|
|
8
|
+
if (!payload || typeof payload.sessionId !== 'string' || payload.sessionId.length > 200) throw new Error('缺少有效会话 ID');
|
|
9
|
+
const sid = payload.sessionId;
|
|
10
|
+
if (method === 'view') return { ok: true, value: service.view(sid) };
|
|
11
|
+
if (method !== 'action') throw new Error('不支持的方法');
|
|
12
|
+
let value;
|
|
13
|
+
if (payload.action === 'close-view') value = await service.closeView(sid);
|
|
14
|
+
else if (payload.action === 'focus') value = await service.focus(sid, payload.taskId);
|
|
15
|
+
else if (payload.action === 'start') value = await service.start(sid, payload.taskId);
|
|
16
|
+
else if (payload.action === 'cancel') value = await service.cancel(sid, payload.taskId, payload.version);
|
|
17
|
+
else if (payload.action === 'update') value = await service.update(sid, payload.taskId, payload.patch, payload.version);
|
|
18
|
+
else if (payload.action === 'reorder') value = await service.reorder(sid, payload.taskId, payload.direction, payload.expectedVersion);
|
|
19
|
+
else throw new Error('不支持的操作');
|
|
20
|
+
return { ok: true, value: value ?? { ok: true } };
|
|
21
|
+
} catch (error) { return { ok: false, error: { code: error.code ?? 'invalid', message: error.message, details: {} } }; }
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
24
|
+
}
|