dsh-my-go 0.1.0
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/LICENSE +21 -0
- package/README.md +159 -0
- package/cordis.patch.yml +8 -0
- package/dist/client.core.js +206 -0
- package/dist/client.js +215 -0
- package/docs/ARCHITECTURE.md +123 -0
- package/lib/index.js +707 -0
- package/package.json +63 -0
- package/preset/agent.cordis.yml +211 -0
- package/preset/preset.yml +3 -0
- package/preset/tools/broker.mjs +707 -0
- package/prompts/explore.md +35 -0
- package/prompts/hephaestus.md +37 -0
- package/prompts/hermes.md +34 -0
- package/prompts/librarian.md +33 -0
- package/prompts/looker.md +34 -0
- package/prompts/oracle.md +37 -0
- package/prompts/prometheus.md +42 -0
- package/prompts/sisyphus.md +71 -0
- package/scripts/build-client.mjs +36 -0
- package/src/client.js +200 -0
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-my-go",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DSH plugin: Sisyphus agent orchestration — star topology, single-line blocking, 7 specialist sub-agents (Hermes/Explore/Librarian/Looker/Hephaestus/Prometheus/Oracle) with per-type model binding, go_work/continue/need_help/forward communication tools, Web UI tree panel and settings.",
|
|
5
|
+
"author": "daizihan233",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/daizihan233/dsh-my-go.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/daizihan233/dsh-my-go/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/daizihan233/dsh-my-go#readme",
|
|
15
|
+
"keywords": ["deepseek-harness", "dsh", "plugin", "agent", "orchestration", "sisyphus", "subagent", "multi-agent"],
|
|
16
|
+
"engines": { "node": ">=20" },
|
|
17
|
+
"publishConfig": { "access": "public" },
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "lib/index.js",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./lib/index.js",
|
|
22
|
+
"./client": "./dist/client.js",
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"files": ["lib", "dist", "src", "scripts", "prompts", "preset", "docs", "README.md", "LICENSE", "cordis.patch.yml"],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "bun run build:client",
|
|
28
|
+
"build:client": "node scripts/build-client.mjs",
|
|
29
|
+
"typecheck": "tsc --noEmit",
|
|
30
|
+
"test": "node test/apply.mjs"
|
|
31
|
+
},
|
|
32
|
+
"dsh": {
|
|
33
|
+
"bundle": { "patch": "./cordis.patch.yml" },
|
|
34
|
+
"client": {
|
|
35
|
+
"platform": "web",
|
|
36
|
+
"immediately": true,
|
|
37
|
+
"inject": ["@deepseek-ai/dsh-client-runtime", "@deepseek-ai/dsh-client-ui-slots"]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
42
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
43
|
+
"@deepseek-ai/dsh-subagent": "^0.1.0-rc.6",
|
|
44
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
45
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
46
|
+
"@deepseek-ai/dsh-settings": "^0.1.0-rc.6",
|
|
47
|
+
"@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.6",
|
|
48
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.6",
|
|
49
|
+
"react": "^18.2.0"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
56
|
+
"@deepseek-ai/dsh-agent": "^0.1.0-rc.8",
|
|
57
|
+
"@deepseek-ai/dsh-llm": "^0.1.0-rc.8",
|
|
58
|
+
"@deepseek-ai/dsh-subagent": "^0.1.0-rc.8",
|
|
59
|
+
"@types/node": "^24.0.0",
|
|
60
|
+
"esbuild": "^0.28.2",
|
|
61
|
+
"typescript": "^5.6.0"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
# dsh-my-go agent preset — Sisyphus orchestration (agent-plane composition).
|
|
2
|
+
#
|
|
3
|
+
# This file is an AGENT-PLANE composition, following the same conventions as
|
|
4
|
+
# the builtin `standard` preset and tmp/liangshen/agent.cordis.yml:
|
|
5
|
+
# - service rows MUST sit inside a group carrying an `isolate` realm;
|
|
6
|
+
# - the delegation group (subagent tools) resolves the HOST subagents
|
|
7
|
+
# registry and needs `isolate: workflowEngine` (one realm for the rows
|
|
8
|
+
# that reach it);
|
|
9
|
+
# - the broker host plugin is a local mjs row (self-contained preset).
|
|
10
|
+
#
|
|
11
|
+
# Copy this directory to ~/.dsh/.agent-presets/dsh-my-go/ to install.
|
|
12
|
+
#
|
|
13
|
+
# The model-facing "orchestration instructions" are a system-prompt section
|
|
14
|
+
# named `dsh-my-go:orchestration`; they teach Sisyphus the four tools and the
|
|
15
|
+
# QA rules from AGENTS.md.
|
|
16
|
+
|
|
17
|
+
# ── identity ────────────────────────────────────────────────────────────────
|
|
18
|
+
- id: persona
|
|
19
|
+
name: '@deepseek-ai/dsh-persona'
|
|
20
|
+
config:
|
|
21
|
+
text: >-
|
|
22
|
+
You are Sisyphus, the master orchestrator and quality gate of the
|
|
23
|
+
dsh-my-go agent system. You run on the {{model}} model in {{cwd}}.
|
|
24
|
+
You receive the user's request, dispatch it to the right sub-agent,
|
|
25
|
+
review every response, and reject low-quality results for rework.
|
|
26
|
+
You never do the sub-agent's work yourself when a sub-agent fits.
|
|
27
|
+
|
|
28
|
+
- id: agent-instructions
|
|
29
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
30
|
+
config:
|
|
31
|
+
maxBytes: 65536
|
|
32
|
+
|
|
33
|
+
# Orchestration instructions: the model-facing contract for the four tools.
|
|
34
|
+
- id: orchestration-section
|
|
35
|
+
name: '@deepseek-ai/dsh-system-prompt'
|
|
36
|
+
config:
|
|
37
|
+
section:
|
|
38
|
+
name: dsh-my-go:orchestration
|
|
39
|
+
order: 20
|
|
40
|
+
text: |-
|
|
41
|
+
# Sisyphus 编排规则
|
|
42
|
+
|
|
43
|
+
你是 Sisyphus:总调度 + 质检官。子智能体不直接通信,全部经由你中转。你根据每个步骤的
|
|
44
|
+
难度与类型挑选合适的工种,而不是把整个任务一次性甩给一个子智能体。
|
|
45
|
+
|
|
46
|
+
## 你的工具
|
|
47
|
+
- `go_work(agent, prompt)` — 派发一个新子智能体(空上下文)。可用类型见下方「工种清单」。
|
|
48
|
+
单线阻塞:已有子智能体运行时,新任务进入队列,当前完成后自动开始。
|
|
49
|
+
- `continue(id, prompt)` — 恢复一个子智能体(驳回/追问/传话)。被驳回的子智能体保留
|
|
50
|
+
当前轮次上下文继续执行,不需要重读已看过的内容。
|
|
51
|
+
- `need_help` — 子智能体向你求助时使用(你会收到带 helpRequestId 的注入)。
|
|
52
|
+
- `forward(from, target)` — 把一个 need_help 请求转发给目标(childId=继续,agent 类型=新派发)。
|
|
53
|
+
- `orchestration_status` — 查看运行状态、队列、求助、历史结论。
|
|
54
|
+
- `list_subagents` — 列出已派发的所有 sub-agent(类型/childId/状态/最后收到的 prompt)。
|
|
55
|
+
派发或复用前先调用它:能 continue 复用的(同任务、上下文有价值)就不要重新 go_work。
|
|
56
|
+
|
|
57
|
+
## 工种清单(你可调用的子智能体)
|
|
58
|
+
- `prometheus` — 需求规划。调研、提问、细化需求,把模糊需求拆成**可执行步骤序列**
|
|
59
|
+
(每步只描述做什么与交付物,不标工种)。仅在流程开始时调用一次;它输出计划后由你
|
|
60
|
+
接手调度——工种分配和调度是**你的**事,不是 prometheus 的。
|
|
61
|
+
- `explore` — 快速检索。grep、读文件、定位符号、扫描目录结构。(触发词:查找/搜索/读取/定位)
|
|
62
|
+
- `librarian` — 文档查询。读 README、API 参考、历史文档、注释提取。(触发词:文档/API/说明/参考)
|
|
63
|
+
- `looker` — 多模态识别。UI 截图、设计稿、PDF 图表。(触发词:图片/截图/UI/设计稿)
|
|
64
|
+
- `hermes` — 快速执行。批量替换、代码格式化、统一 imports、纯文本搬运。(触发词:替换/批量/格式化/统一)
|
|
65
|
+
- `hephaestus` — 代码编写。单文件重构、模块实现、单元测试、常规代码生成。(触发词:写代码/实现/重构/修改)
|
|
66
|
+
- `oracle` — 架构调试 + 终验。跨模块依赖分析、深层 Bug 定位、代码审查、最终验收。(触发词:调试/架构/审查/验证)
|
|
67
|
+
|
|
68
|
+
## 步骤级调度(重要)
|
|
69
|
+
Prometheus 交来的计划是**步骤序列**,不是一份可以直接甩给 hephaestus 的大任务。你要
|
|
70
|
+
**逐步骤决策**:
|
|
71
|
+
1. 看这一步的类型与难度(检索?实现?重构?验收?)。
|
|
72
|
+
2. 选择最省 token 的工种:轻活(检索/文档/批量)派轻工种(explore/librarian/hermes),
|
|
73
|
+
重活(写代码/调试/终验)派重工种(hephaestus/oracle)。
|
|
74
|
+
3. **沿用或换人**:下一步如果和上一步同一工种且上下文连续,`continue` 同一个 childId
|
|
75
|
+
(它保留上下文,省 token);如果换了工种,才 `go_work` 新派。
|
|
76
|
+
4. 每步结论回来后先质检再决定下一步,不要一次把所有步骤都发出去。
|
|
77
|
+
|
|
78
|
+
## 质检规则
|
|
79
|
+
收到子智能体结论后,你有权驳回或追问:
|
|
80
|
+
- 质量不达标 → `continue` 同一个 childId,附驳回理由和修正方向。
|
|
81
|
+
- 需要另一工种 → 先驳回/结束当前,再 `go_work` 派发合适的类型。
|
|
82
|
+
- 结论合格 → 向用户汇报,或按计划进入下一步。
|
|
83
|
+
|
|
84
|
+
## 禁止事项
|
|
85
|
+
1. 不要让子智能体直接调用其他子智能体(它们没有 go_work/continue/forward)。
|
|
86
|
+
2. 子智能体不得主动发起对话,只能被动响应你的分发。
|
|
87
|
+
3. 收到 intent=replan 时,必须切换智能体类型(如 hephaestus → oracle),而不是原地升级模型。
|
|
88
|
+
4. Prometheus 只做规划不执行;它的计划必须由你按步骤重新调度。
|
|
89
|
+
5. 不要用 `go_work` 重复派发一个已存在且可 continue 的子智能体——先用 `list_subagents` 查。
|
|
90
|
+
|
|
91
|
+
# ── shell ───────────────────────────────────────────────────────────────────
|
|
92
|
+
- id: tool-bash
|
|
93
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
94
|
+
disabled: !!js process.platform === 'win32'
|
|
95
|
+
|
|
96
|
+
- id: tool-pwsh
|
|
97
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
98
|
+
disabled: !!js process.platform !== 'win32'
|
|
99
|
+
|
|
100
|
+
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
101
|
+
- id: tool-fs
|
|
102
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
103
|
+
|
|
104
|
+
- id: tool-fs-search
|
|
105
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
106
|
+
config:
|
|
107
|
+
sampleOverCapGlobResults: false
|
|
108
|
+
|
|
109
|
+
# ── background jobs / skills / goals / plan / compaction ────────────────────
|
|
110
|
+
- id: tool-jobs
|
|
111
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
112
|
+
|
|
113
|
+
- id: skill-filesystem
|
|
114
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
115
|
+
|
|
116
|
+
- id: tool-skill
|
|
117
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
118
|
+
|
|
119
|
+
- id: tool-goal
|
|
120
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
121
|
+
|
|
122
|
+
- id: planning
|
|
123
|
+
name: cordis:group
|
|
124
|
+
group: true
|
|
125
|
+
isolate:
|
|
126
|
+
planMode: true
|
|
127
|
+
config:
|
|
128
|
+
- id: plan-mode
|
|
129
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
130
|
+
|
|
131
|
+
- id: compaction
|
|
132
|
+
name: cordis:group
|
|
133
|
+
group: true
|
|
134
|
+
isolate:
|
|
135
|
+
compaction: true
|
|
136
|
+
toolResultPruner: true
|
|
137
|
+
config:
|
|
138
|
+
- id: compaction-basic
|
|
139
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
140
|
+
- id: command-compact
|
|
141
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
142
|
+
- id: tool-result-pruner
|
|
143
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
144
|
+
config:
|
|
145
|
+
thresholdChars: 8192
|
|
146
|
+
headChars: 4096
|
|
147
|
+
tailChars: 1024
|
|
148
|
+
|
|
149
|
+
# ── delegation (subagent tools + broker host) ───────────────────────────────
|
|
150
|
+
# The subagents registry lives on the HOST; these rows resolve it. The broker
|
|
151
|
+
# host plugin (local mjs) registers the orchestration tools and model binding
|
|
152
|
+
# into this preset's scope, so both Sisyphus and its children see them
|
|
153
|
+
# (children are restricted from go_work/continue/forward by the broker).
|
|
154
|
+
- id: delegation
|
|
155
|
+
name: cordis:group
|
|
156
|
+
group: true
|
|
157
|
+
isolate:
|
|
158
|
+
workflowEngine: true
|
|
159
|
+
config:
|
|
160
|
+
- id: tool-subagent-control
|
|
161
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
162
|
+
|
|
163
|
+
- id: tool-subagent-list-agents
|
|
164
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
165
|
+
|
|
166
|
+
- id: tool-subagent
|
|
167
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
168
|
+
config:
|
|
169
|
+
provider: spawn
|
|
170
|
+
toolName: subagent
|
|
171
|
+
backgroundMode: continuable
|
|
172
|
+
|
|
173
|
+
- id: tool-subagent-fork
|
|
174
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
175
|
+
config:
|
|
176
|
+
provider: fork
|
|
177
|
+
toolName: subagent_fork
|
|
178
|
+
backgroundMode: continuable
|
|
179
|
+
|
|
180
|
+
- id: workflow-worker-thread
|
|
181
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
182
|
+
config:
|
|
183
|
+
provider: spawn
|
|
184
|
+
|
|
185
|
+
- id: tool-workflow
|
|
186
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
187
|
+
|
|
188
|
+
- id: tool-ralph
|
|
189
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
190
|
+
config:
|
|
191
|
+
subagentProvider: spawn
|
|
192
|
+
maxRounds: 64
|
|
193
|
+
|
|
194
|
+
# The broker host plugin: orchestration tools + model binding.
|
|
195
|
+
- id: broker
|
|
196
|
+
name: './tools/broker.mjs'
|
|
197
|
+
|
|
198
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
199
|
+
- id: tool-ask-user
|
|
200
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
201
|
+
|
|
202
|
+
- id: tool-todo
|
|
203
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
204
|
+
config:
|
|
205
|
+
allowParallelInProgress: true
|
|
206
|
+
|
|
207
|
+
- id: tool-web
|
|
208
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
209
|
+
config:
|
|
210
|
+
fetch: false
|
|
211
|
+
searchTimeoutMs: 60000
|