dsh-subagent-profile 0.3.2 → 0.3.4
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.md +77 -40
- package/README.zh.md +111 -74
- package/docs/screenshots/dispatch-card.png +0 -0
- package/docs/screenshots/settings-page1.png +0 -0
- package/docs/screenshots/settings-page2.png +0 -0
- package/index.mjs +276 -81
- package/lib/client.js +3218 -166
- package/lib/core/adoption-reminder.mjs +48 -0
- package/lib/core/adoption-tracker.mjs +430 -0
- package/lib/core/background-ledger.mjs +71 -0
- package/lib/core/catalog-cache.mjs +45 -7
- package/lib/core/catalog.mjs +6 -6
- package/lib/core/cost-evidence.mjs +145 -0
- package/lib/core/cost-guard.mjs +71 -44
- package/lib/core/decision-trace.mjs +413 -0
- package/lib/core/delegation.mjs +111 -50
- package/lib/core/dispatch-gates.mjs +153 -0
- package/lib/core/dispatch-guard.mjs +156 -0
- package/lib/core/dispatch-schema.mjs +103 -14
- package/lib/core/dispatch-tool.mjs +220 -204
- package/lib/core/draft-gates.mjs +45 -0
- package/lib/core/drafts-store.mjs +45 -0
- package/lib/core/escape.mjs +130 -0
- package/lib/core/evolution-advice.mjs +224 -0
- package/lib/core/evolution-ledger.mjs +300 -0
- package/lib/core/evolution-summary.mjs +255 -0
- package/lib/core/http-routes.mjs +256 -72
- package/lib/core/intersection.mjs +6 -9
- package/lib/core/presets-sync.mjs +161 -43
- package/lib/core/prices.mjs +46 -0
- package/lib/core/profile-directory.mjs +139 -0
- package/lib/core/profile-provider.mjs +42 -39
- package/lib/core/profiles-store.mjs +103 -76
- package/lib/core/pure.mjs +110 -66
- package/lib/core/reminder-store.mjs +172 -0
- package/lib/core/shims.mjs +67 -76
- package/lib/core/whitelist.mjs +23 -17
- package/package.json +82 -83
- package/presets/orchestrator/agent.cordis.yml +59 -87
- package/presets/orchestrator/NOTICE +0 -3
package/package.json
CHANGED
|
@@ -1,83 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "dsh-subagent-profile",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/muzyLink/dsh-subagent-profile.git"
|
|
8
|
-
},
|
|
9
|
-
"type": "module",
|
|
10
|
-
"main": "index.mjs",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
"
|
|
41
|
-
"@deepseek-ai/dsh-agent":
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"@deepseek-ai/dsh-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"@deepseek-ai/dsh-
|
|
48
|
-
"optional": true
|
|
49
|
-
},
|
|
50
|
-
"@deepseek-ai/dsh-
|
|
51
|
-
"optional": true
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"@deepseek-ai/dsh-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
},
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-subagent-profile",
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "DeepSeek Harness 子 Agent 派发插件:按任务为子代理选模型、推理强度与工具范围,常用组合存成命名方案随时复用;内置安全检查、成本估算与节省分析、完整决策台账。",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/muzyLink/dsh-subagent-profile.git"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "index.mjs",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "node --test \"test/**/*.test.mjs\"",
|
|
13
|
+
"test:bare": "node --test test/pure.test.mjs test/input-schema.test.mjs test/catalog-integrity.test.mjs",
|
|
14
|
+
"preflight": "node scripts/preflight.mjs",
|
|
15
|
+
"leak-scan": "node scripts/leak-scan.mjs"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": "./index.mjs",
|
|
19
|
+
"./client": "./lib/client.js",
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"index.mjs",
|
|
24
|
+
"lib",
|
|
25
|
+
"cordis.patch.yml",
|
|
26
|
+
"presets",
|
|
27
|
+
"docs/screenshots",
|
|
28
|
+
"README.md",
|
|
29
|
+
"README.zh.md"
|
|
30
|
+
],
|
|
31
|
+
"dsh": {
|
|
32
|
+
"bundle": {
|
|
33
|
+
"patch": "./cordis.patch.yml"
|
|
34
|
+
},
|
|
35
|
+
"client": {
|
|
36
|
+
"inject": [],
|
|
37
|
+
"platform": "web"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@deepseek-ai/dsh-agent": ">=0.1.0-rc.6 <0.2.0",
|
|
42
|
+
"@deepseek-ai/dsh-llm": ">=0.1.0-rc.6 <0.2.0",
|
|
43
|
+
"@deepseek-ai/dsh-subagent": ">=0.1.0-rc.6 <0.2.0",
|
|
44
|
+
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.6 <0.2.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependenciesMeta": {
|
|
47
|
+
"@deepseek-ai/dsh-agent": {
|
|
48
|
+
"optional": true
|
|
49
|
+
},
|
|
50
|
+
"@deepseek-ai/dsh-subagent": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"@deepseek-ai/dsh-llm": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@deepseek-ai/dsh-tools": {
|
|
57
|
+
"optional": true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@deepseek-ai/dsh-agent": "0.1.0-rc.8",
|
|
62
|
+
"@deepseek-ai/dsh-llm": "0.1.0-rc.8",
|
|
63
|
+
"@deepseek-ai/dsh-subagent": "0.1.0-rc.8",
|
|
64
|
+
"@deepseek-ai/dsh-tools": "0.1.0-rc.8",
|
|
65
|
+
"@eslint/js": "^10.0.1",
|
|
66
|
+
"eslint": "^10.9.0"
|
|
67
|
+
},
|
|
68
|
+
"engines": {
|
|
69
|
+
"node": "^22.19.0 || >=24"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
},
|
|
74
|
+
"keywords": [
|
|
75
|
+
"deepseek-harness",
|
|
76
|
+
"dsh",
|
|
77
|
+
"subagent",
|
|
78
|
+
"dispatch",
|
|
79
|
+
"profiles"
|
|
80
|
+
],
|
|
81
|
+
"license": "MIT"
|
|
82
|
+
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `orchestrator` 编排者预设:主 Agent 协调模式。
|
|
2
2
|
#
|
|
3
|
-
#
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
# integrate the results. The `dispatch` tool itself is registered by the
|
|
9
|
-
# dsh-subagent-profile host row, so it is already visible to every preset
|
|
10
|
-
# including this one; this preset only adds the delegation tools below.
|
|
3
|
+
# 与官方 `standard` 预设逐行一致,仅 persona 段改写为「主协调 Agent」身份:
|
|
4
|
+
# 拆解任务、经宿主注册的 `dispatch` 工具(按场景选方案/预设/模型/推理强度)
|
|
5
|
+
# 加普通 `subagent` / `subagent_fork` / `workflow` / `ralph` 委派工具分派子任务,
|
|
6
|
+
# 再集成结果。`dispatch` 工具本身由 dsh-subagent-profile 宿主行注册,对所有
|
|
7
|
+
# 预设可见;本预设只补下面的委派工具。
|
|
11
8
|
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
14
|
-
# under a standing scope; every session naming it joins by scope parentage, so
|
|
15
|
-
# the tools and prompt sections registered here cover each joined agent while a
|
|
16
|
-
# session's own state stays keyed per Session/Agent inside the plugins. The
|
|
17
|
-
# host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
|
|
18
|
-
# preset must not own: the registries themselves, the sandbox and approval
|
|
19
|
-
# stack, persistence, and the model route.
|
|
9
|
+
# 改编自官方 `standard` 预设(仅 persona 段不同);原始 DeepSeek 版权与
|
|
10
|
+
# MIT 许可声明见开源仓库。
|
|
20
11
|
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
#
|
|
12
|
+
# 本文件是 agent 平面组成:由 roster 挂载一次到 standing scope,引用它的会话
|
|
13
|
+
# 经 scope 父系加入,本文件注册的工具与 prompt 段覆盖每个加入的 agent;会话
|
|
14
|
+
# 自身状态仍按 Session/Agent 键控在插件内。宿主组成(base.cordis.yml +
|
|
15
|
+
# web.cordis.yml)保留预设不得拥有的东西:注册表、沙箱与审批栈、持久化、
|
|
16
|
+
# 模型路由。
|
|
17
|
+
#
|
|
18
|
+
# 服务行必须放在带 `isolate` realm 的 group 内:否则发布进根 realm 成为
|
|
19
|
+
# 进程全局单例——另一预设发布同名会冲突,宿主读者会对每个会话解析同一实例,
|
|
20
|
+
# `dsh-agent-presets` 挂载时拒绝。`true` 表示条目本地 realm:本 standing mount
|
|
21
|
+
# 私有的实例。共享 label 不会合并实例(同一 realm 符号下二次 provide 抛错),
|
|
22
|
+
# label 只连接 REALMS,本文件不需要。
|
|
29
23
|
|
|
30
24
|
# ── identity ────────────────────────────────────────────────────────────────
|
|
31
25
|
|
|
32
|
-
#
|
|
33
|
-
# `{{model}}`
|
|
26
|
+
# 编排者 persona,遮蔽本 agent 的部署默认人设。
|
|
27
|
+
# `{{model}}` 与 `{{cwd}}` 从 agent 自身的路由与工作目录解析。
|
|
34
28
|
- id: persona
|
|
35
29
|
name: '@deepseek-ai/dsh-persona'
|
|
36
30
|
config:
|
|
@@ -41,7 +35,7 @@
|
|
|
41
35
|
|
|
42
36
|
prompt 必须自包含:子 Agent 看不到你的对话,写全背景、目标、期望产出、验收标准与禁止事项。
|
|
43
37
|
|
|
44
|
-
边界:子 Agent 能力 ⊆
|
|
38
|
+
边界:子 Agent 能力 ⊆ 你,派发不豁免父会话的审批要求;子 Agent 失败或超出权限时自己接手重做,或用 ask_user_question 向用户澄清。
|
|
45
39
|
|
|
46
40
|
- id: agent-instructions
|
|
47
41
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
@@ -50,13 +44,11 @@
|
|
|
50
44
|
|
|
51
45
|
# ── shell ───────────────────────────────────────────────────────────────────
|
|
52
46
|
|
|
53
|
-
# `shell-env`
|
|
54
|
-
#
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
#
|
|
58
|
-
# registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
|
|
59
|
-
# host-plane too.
|
|
47
|
+
# `shell-env` 留在宿主组成:apps/cli/src/web.ts 注入它以发布
|
|
48
|
+
# DSH_WEB_URL/DSH_WEB_MODE,且宿主行注入服务即宿主平面归属标准——注入在
|
|
49
|
+
# 会话存在前解析,没有可归属的 agent;放预设 realm 里这些变量到不了模型
|
|
50
|
+
# 的 shell。两个 shell 工具在此消费宿主注册表;其执行器
|
|
51
|
+
# (bash-sandbox/pwsh-sandbox)也在宿主平面。
|
|
60
52
|
- id: tool-bash
|
|
61
53
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
62
54
|
disabled: !!js process.platform === 'win32'
|
|
@@ -67,8 +59,7 @@
|
|
|
67
59
|
|
|
68
60
|
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
69
61
|
|
|
70
|
-
#
|
|
71
|
-
# they need no realm. The `fs` service and its policy stay in the host.
|
|
62
|
+
# 两者都注册进宿主 tools 注册表且不提供服务,无需 realm;fs 服务与其策略留在宿主。
|
|
72
63
|
- id: tool-fs
|
|
73
64
|
name: '@deepseek-ai/dsh-tool-fs'
|
|
74
65
|
|
|
@@ -79,23 +70,18 @@
|
|
|
79
70
|
|
|
80
71
|
# ── background jobs ────────────────────────────────────────────────────────
|
|
81
72
|
|
|
82
|
-
#
|
|
83
|
-
#
|
|
84
|
-
#
|
|
85
|
-
#
|
|
86
|
-
# unavailable" while these controls sat in the catalog. The registry is keyed by
|
|
87
|
-
# owning agent anyway, so one host instance serves every session. What a preset
|
|
88
|
-
# chooses is whether its agent can collect and stop background work at all.
|
|
73
|
+
# 只放模型可见的控制。任务注册表留在宿主平面:其生产者在本文件任何 realm
|
|
74
|
+
# 之外(上面 tool-bash 用 ctx.get 解析它,条目本地 realm 对兄弟行不可见),
|
|
75
|
+
# 否则 run_in_background 会答「后台任务不可用」。注册表本就按所属 agent
|
|
76
|
+
# 键控,一个宿主实例服务所有会话;预设只决定其 agent 能否收集/停止后台任务。
|
|
89
77
|
- id: tool-jobs
|
|
90
78
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
91
79
|
|
|
92
80
|
# ── skills ──────────────────────────────────────────────────────────────────
|
|
93
81
|
|
|
94
|
-
#
|
|
95
|
-
#
|
|
96
|
-
# `skill
|
|
97
|
-
# `tool-skill` gives them the catalog and loader; the merged catalog also
|
|
98
|
-
# carries whatever the deployment registered globally (repository plugins).
|
|
82
|
+
# skill 注册表在宿主组成中按 scope 分层;以下行注册进本预设的那一层,
|
|
83
|
+
# 无需 realm。`skill-filesystem` 为本预设的 agent 提供本地根发现,
|
|
84
|
+
# `tool-skill` 提供目录与加载器;合并后的目录也包含部署全局注册的内容。
|
|
99
85
|
- id: skill-filesystem
|
|
100
86
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
101
87
|
|
|
@@ -104,19 +90,16 @@
|
|
|
104
90
|
|
|
105
91
|
# ── goals ───────────────────────────────────────────────────────────────────
|
|
106
92
|
|
|
107
|
-
#
|
|
108
|
-
#
|
|
109
|
-
#
|
|
110
|
-
#
|
|
111
|
-
# registry is keyed by session anyway, so one host instance serves every
|
|
112
|
-
# session. What a preset chooses is whether its agent can call the goal tool.
|
|
93
|
+
# 只放模型可见的工具。goal 服务、会话驱动与 /goal 命令留在宿主平面:
|
|
94
|
+
# Gateway 以 Remote endpoint 服务 goal 域,接收方来自生成描述符,条目本地
|
|
95
|
+
# realm 会隐藏它。注册表本就按会话键控,一个宿主实例服务所有会话;预设
|
|
96
|
+
# 只决定其 agent 能否调用 goal 工具。
|
|
113
97
|
- id: tool-goal
|
|
114
98
|
name: '@deepseek-ai/dsh-tool-goal'
|
|
115
99
|
|
|
116
100
|
# ── plan mode ───────────────────────────────────────────────────────────────
|
|
117
101
|
|
|
118
|
-
#
|
|
119
|
-
# workaround here — it is the correct lifetime.
|
|
102
|
+
# plan 状态按 agent 天然独立,条目本地 realm 正是正确的生命周期。
|
|
120
103
|
- id: planning
|
|
121
104
|
name: cordis:group
|
|
122
105
|
group: true
|
|
@@ -141,15 +124,13 @@
|
|
|
141
124
|
|
|
142
125
|
# ── compaction ──────────────────────────────────────────────────────────────
|
|
143
126
|
|
|
144
|
-
# `compaction-basic`
|
|
145
|
-
#
|
|
127
|
+
# `compaction-basic` 经 ctx.get 读取 toolResultPrune,pruner 必须与本 realm
|
|
128
|
+
# 共享而非留在外面。
|
|
146
129
|
#
|
|
147
|
-
# `tokenMeter`
|
|
148
|
-
#
|
|
149
|
-
#
|
|
150
|
-
#
|
|
151
|
-
# with whichever presets happen to be mounted. What a preset chooses is whether
|
|
152
|
-
# its agent compacts at all, which is `compaction-basic` below.
|
|
130
|
+
# `tokenMeter` 刻意不在本 realm:meter 留在宿主平面,此处各行解析那个单例。
|
|
131
|
+
# 它无配置、按 Session 键控每次 fold,且持有浏览器为每个会话读取的上下文
|
|
132
|
+
# 计量单位——进 realm 会随挂载的预设增减。预设只决定其 agent 是否压缩,
|
|
133
|
+
# 即下面的 compaction-basic。
|
|
153
134
|
- id: compaction
|
|
154
135
|
name: cordis:group
|
|
155
136
|
group: true
|
|
@@ -172,24 +153,18 @@
|
|
|
172
153
|
|
|
173
154
|
# ── delegation and workflows ────────────────────────────────────────────────
|
|
174
155
|
|
|
175
|
-
#
|
|
176
|
-
#
|
|
177
|
-
#
|
|
178
|
-
#
|
|
179
|
-
#
|
|
180
|
-
# drives) are registered by the dsh-subagent-profile host row, so they are
|
|
181
|
-
# host-global and already visible here; this group adds the ordinary
|
|
182
|
-
# subagent/workflow tools so the orchestrator can choose the cheapest fit.
|
|
156
|
+
# `subagents` 注册表及其 spawn/fork 后端在宿主组成中:注册表是进程单例,
|
|
157
|
+
# api-proxy 供浏览器跨会话查询,provider 名只能注册一次。本预设贡献
|
|
158
|
+
# delegation 工具,解析该宿主注册表。`dispatch` 工具(及其驱动的 profile
|
|
159
|
+
# provider)由 dsh-subagent-profile 宿主行注册,宿主全局可见;本组补普通
|
|
160
|
+
# subagent/workflow 工具,让编排者选最省成本的方式。
|
|
183
161
|
#
|
|
184
|
-
# `workflows`
|
|
185
|
-
#
|
|
186
|
-
# outside would resolve a host registry this preset does not populate.
|
|
162
|
+
# `workflows` 不同——没有 agent 之外的东西读它——到达它的行共享本条目本地
|
|
163
|
+
# realm,留在外面的消费者会解析到本预设未填充的宿主注册表。
|
|
187
164
|
#
|
|
188
|
-
# `tool-subagent-report`
|
|
189
|
-
#
|
|
190
|
-
#
|
|
191
|
-
# not scope-aware — one copy per mounted preset means every child gets
|
|
192
|
-
# `report` registered once per live session, which throws on the second.
|
|
165
|
+
# `tool-subagent-report` 与注册表同理在宿主平面:它在那个单例上注册
|
|
166
|
+
# continuable setup 而非本 agent 调用的工具,且 setup 列表不感知 scope——
|
|
167
|
+
# 每个挂载的预设各注册一份,每个子 agent 都会重复注册 `report`,第二次抛错。
|
|
193
168
|
- id: delegation
|
|
194
169
|
name: cordis:group
|
|
195
170
|
group: true
|
|
@@ -216,10 +191,8 @@
|
|
|
216
191
|
toolName: subagent_fork
|
|
217
192
|
backgroundMode: continuable
|
|
218
193
|
|
|
219
|
-
#
|
|
220
|
-
#
|
|
221
|
-
# preset and remove `disabled` from the matching tool row. Host availability
|
|
222
|
-
# alone grants no tool.
|
|
194
|
+
# 生产版 dsh 不安装这些可选 provider。在本 Profile 安装对应 Bundle 并
|
|
195
|
+
# 重启宿主,再复制本预设、移除对应行的 disabled。宿主可用性本身不授予工具。
|
|
223
196
|
- id: tool-subagent-codex
|
|
224
197
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
225
198
|
disabled: true
|
|
@@ -262,8 +235,7 @@
|
|
|
262
235
|
config:
|
|
263
236
|
allowParallelInProgress: true
|
|
264
237
|
|
|
265
|
-
#
|
|
266
|
-
# the model-facing tool is per-session.
|
|
238
|
+
# `web` 服务及其搜索 provider 留在宿主组成;只有模型可见的工具按会话。
|
|
267
239
|
- id: tool-web
|
|
268
240
|
name: '@deepseek-ai/dsh-tool-web'
|
|
269
241
|
config:
|