@michengai/dsh-agency-agents 0.1.18 → 0.1.20
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 +3 -20
- package/README.zh-CN.md +3 -20
- package/assets/branding/banner.png +0 -0
- package/assets/branding/banner.txt +4 -11
- package/lib/{i18n-BDZqnN0K.js → i18n-BL3miiHZ.js} +6 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +27 -14
- package/lib/remote.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
3
|
-
<tr>
|
|
4
|
-
<td valign="middle" align="center">
|
|
5
|
-
<img src="assets/branding/dsh-logo.png" alt="DeepSeek Harness logo" width="168">
|
|
6
|
-
</td>
|
|
7
|
-
<td valign="middle">
|
|
8
|
-
<pre>
|
|
9
|
-
____ ____ _ _
|
|
10
|
-
| _ \/ ___|| | | |
|
|
11
|
-
| | | \___ \| |_| |
|
|
12
|
-
| |_| |___) | _ |
|
|
13
|
-
|____/|____/|_| |_|
|
|
14
|
-
AGENCY AGENTS
|
|
15
|
-
271 summonable specialists
|
|
16
|
-
DeepSeek Harness plugin
|
|
17
|
-
</pre>
|
|
18
|
-
</td>
|
|
19
|
-
</tr>
|
|
20
|
-
</table>
|
|
2
|
+
<img src="assets/branding/banner.png" alt="DSH Agency Agents" width="100%">
|
|
21
3
|
</div>
|
|
22
4
|
|
|
23
5
|
<div align="center">
|
|
@@ -42,7 +24,8 @@
|
|
|
42
24
|
- Filter by category or search, then enable or disable bundled experts in **Settings → Experts**.
|
|
43
25
|
- Summon enabled experts by name or slug from the composer's **Experts** picker.
|
|
44
26
|
- Use `list_experts` to discover experts and `summon_expert` to start a one-shot specialist subagent.
|
|
45
|
-
- Use 271 bundled personas immediately, or connect a separately synchronized expert directory
|
|
27
|
+
- Use 271 bundled personas immediately, or connect a separately synchronized expert directory.
|
|
28
|
+
- Paste one sentence into DSH, Codex, or WorkBuddy and let that agent install the plugin locally.
|
|
46
29
|
|
|
47
30
|
The parent session keeps task context, judgment, and the final answer. Expert children provide a specialist perspective only and cannot summon further experts.
|
|
48
31
|
|
package/README.zh-CN.md
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<
|
|
3
|
-
<tr>
|
|
4
|
-
<td valign="middle" align="center">
|
|
5
|
-
<img src="assets/branding/dsh-logo.png" alt="DeepSeek Harness 标识" width="168">
|
|
6
|
-
</td>
|
|
7
|
-
<td valign="middle">
|
|
8
|
-
<pre>
|
|
9
|
-
____ ____ _ _
|
|
10
|
-
| _ \/ ___|| | | |
|
|
11
|
-
| | | \___ \| |_| |
|
|
12
|
-
| |_| |___) | _ |
|
|
13
|
-
|____/|____/|_| |_|
|
|
14
|
-
AGENCY AGENTS
|
|
15
|
-
271 summonable specialists
|
|
16
|
-
DeepSeek Harness plugin
|
|
17
|
-
</pre>
|
|
18
|
-
</td>
|
|
19
|
-
</tr>
|
|
20
|
-
</table>
|
|
2
|
+
<img src="assets/branding/banner.png" alt="DSH Agency Agents" width="100%">
|
|
21
3
|
</div>
|
|
22
4
|
|
|
23
5
|
<div align="center">
|
|
@@ -42,7 +24,8 @@
|
|
|
42
24
|
- 在「设置 → 专家」中按分类筛选或搜索,再启用或停用内置专家。
|
|
43
25
|
- 在输入框的「专家」中按名称或 slug 召唤已启用的专家处理完整任务。
|
|
44
26
|
- 提供 `list_experts` 与 `summon_expert` 工具,分别用于发现专家和启动一次性子代理。
|
|
45
|
-
- 内置 271 份 persona
|
|
27
|
+
- 内置 271 份 persona,无需额外下载;也可接入自行同步的专家目录。
|
|
28
|
+
- 可把一句话复制到 DSH、Codex 或 WorkBuddy,让对方代装到本机 DSH。
|
|
46
29
|
|
|
47
30
|
主会话保留任务上下文、判断和最终交付;专家子代理只提供专业视角,不能继续召唤专家,避免递归委派。
|
|
48
31
|
|
|
Binary file
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
README
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
| _ \/ ___|| | | |
|
|
6
|
-
| | | \___ \| |_| |
|
|
7
|
-
| |_| |___) | _ |
|
|
8
|
-
|____/|____/|_| |_|
|
|
9
|
-
AGENCY AGENTS
|
|
10
|
-
271 summonable specialists
|
|
11
|
-
DeepSeek Harness plugin
|
|
1
|
+
README 顶部使用 assets/branding/banner.png
|
|
2
|
+
尺寸:1983x793
|
|
3
|
+
说明:完整产品横幅,含标识、卖点、功能入口与专家列表界面
|
|
4
|
+
旧版 dsh-logo.png 与 ASCII 字标已不再作为 README 顶部展示
|
|
@@ -334,8 +334,11 @@ const zhHost = {
|
|
|
334
334
|
"error.summonManyRequiresAgent": "summon_experts 需要由智能体调用",
|
|
335
335
|
"error.expertsEmpty": "experts 必须是非空数组",
|
|
336
336
|
"error.expertsTooMany": "一次最多召唤 {max} 名专家,当前为 {count}",
|
|
337
|
+
"error.expertEmpty": "第 {index} 个专家不能为空",
|
|
337
338
|
"error.taskEmpty": "第 {index} 个专家任务不能为空",
|
|
338
339
|
"error.taskTooLong": "第 {index} 个专家任务过长({length} 个字符,上限 {max})",
|
|
340
|
+
"error.taskRequired": "专家任务不能为空",
|
|
341
|
+
"error.taskLimit": "专家任务过长({length} 个字符,上限 {max})",
|
|
339
342
|
"error.providerMissing": "子代理 provider \"{provider}\" 未注册",
|
|
340
343
|
"error.providerNoPersona": "子代理 provider \"{provider}\" 不支持专家人格",
|
|
341
344
|
"error.providerNoToolFilter": "子代理 provider \"{provider}\" 无法阻止递归专家委派",
|
|
@@ -364,8 +367,11 @@ const enHost = {
|
|
|
364
367
|
"error.summonManyRequiresAgent": "summon_experts requires a calling agent",
|
|
365
368
|
"error.expertsEmpty": "experts must be a non-empty array",
|
|
366
369
|
"error.expertsTooMany": "summon at most {max} experts at once, got {count}",
|
|
370
|
+
"error.expertEmpty": "expert #{index} must not be empty",
|
|
367
371
|
"error.taskEmpty": "expert task #{index} must not be empty",
|
|
368
372
|
"error.taskTooLong": "expert task #{index} is too long ({length} characters, limit {max})",
|
|
373
|
+
"error.taskRequired": "The expert task must not be empty",
|
|
374
|
+
"error.taskLimit": "The expert task is too long ({length} characters, limit {max})",
|
|
369
375
|
"error.providerMissing": "subagent provider \"{provider}\" is not registered",
|
|
370
376
|
"error.providerNoPersona": "subagent provider \"{provider}\" does not support expert personas",
|
|
371
377
|
"error.providerNoToolFilter": "subagent provider \"{provider}\" cannot prevent recursive expert delegation",
|
package/lib/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ interface SummonExpertItemResult {
|
|
|
30
30
|
readonly answer: string;
|
|
31
31
|
readonly error?: string;
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
33
|
+
/** 校验批量召唤入参:非空、数量上限、专家名非空、任务非空且不超过码点上限。 */
|
|
34
34
|
declare function validateSummonSpecs(specs: unknown, locale: LocaleId): SummonExpertSpec[];
|
|
35
35
|
/** 受限并发地映射异步任务,结果顺序与输入一致。 */
|
|
36
36
|
declare function mapPool<T, R>(items: readonly T[], concurrency: number, mapper: (item: T, index: number) => Promise<R>): Promise<R[]>;
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as readHostLocale, c as ZH_DIVISION, i as matchDivision, l as ZH_NAME, n as localizedExpertDescription, o as renderExpertList, r as localizedExpertName, s as renderSummonResults, t as formatHost } from "./i18n-
|
|
1
|
+
import { a as readHostLocale, c as ZH_DIVISION, i as matchDivision, l as ZH_NAME, n as localizedExpertDescription, o as renderExpertList, r as localizedExpertName, s as renderSummonResults, t as formatHost } from "./i18n-BL3miiHZ.js";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
4
4
|
import { installSettingsSection, settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
@@ -45,7 +45,25 @@ const SUMMON_EXPERTS_MAX = 8;
|
|
|
45
45
|
const SUMMON_EXPERTS_CONCURRENCY = 4;
|
|
46
46
|
/** 单条任务的 Unicode 码点上限。 */
|
|
47
47
|
const SUMMON_TASK_MAX_CHARS = 8e3;
|
|
48
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* 校验并规范化任务文本:非空且不超过码点上限。
|
|
50
|
+
* index 存在时使用带序号的批量文案,否则使用单条召唤文案;返回规范化后的字符串。
|
|
51
|
+
*/
|
|
52
|
+
function normalizeTask(task, locale, index) {
|
|
53
|
+
const text = task === void 0 || task === null ? "" : String(task);
|
|
54
|
+
const length = Array.from(text).length;
|
|
55
|
+
if (text.trim() === "") throw new Error(index === void 0 ? formatHost(locale, "error.taskRequired") : formatHost(locale, "error.taskEmpty", { index }));
|
|
56
|
+
if (length > 8e3) throw new Error(index === void 0 ? formatHost(locale, "error.taskLimit", {
|
|
57
|
+
length,
|
|
58
|
+
max: SUMMON_TASK_MAX_CHARS
|
|
59
|
+
}) : formatHost(locale, "error.taskTooLong", {
|
|
60
|
+
index,
|
|
61
|
+
length,
|
|
62
|
+
max: SUMMON_TASK_MAX_CHARS
|
|
63
|
+
}));
|
|
64
|
+
return text;
|
|
65
|
+
}
|
|
66
|
+
/** 校验批量召唤入参:非空、数量上限、专家名非空、任务非空且不超过码点上限。 */
|
|
49
67
|
function validateSummonSpecs(specs, locale) {
|
|
50
68
|
if (!Array.isArray(specs) || specs.length === 0) throw new Error(formatHost(locale, "error.expertsEmpty"));
|
|
51
69
|
if (specs.length > 8) throw new Error(formatHost(locale, "error.expertsTooMany", {
|
|
@@ -54,18 +72,11 @@ function validateSummonSpecs(specs, locale) {
|
|
|
54
72
|
}));
|
|
55
73
|
return specs.map((item, index) => {
|
|
56
74
|
const record = item;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
const length = Array.from(task).length;
|
|
60
|
-
if (task.trim() === "") throw new Error(formatHost(locale, "error.taskEmpty", { index: index + 1 }));
|
|
61
|
-
if (length > 8e3) throw new Error(formatHost(locale, "error.taskTooLong", {
|
|
62
|
-
index: index + 1,
|
|
63
|
-
length,
|
|
64
|
-
max: SUMMON_TASK_MAX_CHARS
|
|
65
|
-
}));
|
|
75
|
+
const expert = record === null || record === void 0 ? void 0 : record.expert;
|
|
76
|
+
if (expert === void 0 || expert === null || String(expert).trim() === "") throw new Error(formatHost(locale, "error.expertEmpty", { index: index + 1 }));
|
|
66
77
|
return {
|
|
67
|
-
expert
|
|
68
|
-
task
|
|
78
|
+
expert,
|
|
79
|
+
task: normalizeTask(record?.task, locale, index + 1)
|
|
69
80
|
};
|
|
70
81
|
});
|
|
71
82
|
}
|
|
@@ -180,6 +191,7 @@ async function walkMarkdown(dir, onFile) {
|
|
|
180
191
|
console.warn(`[agency-agents] 跳过无法读取的目录 ${dir}: ${error instanceof Error ? error.message : String(error)}`);
|
|
181
192
|
});
|
|
182
193
|
if (entries === void 0) return;
|
|
194
|
+
entries.sort((a, b) => a.name.localeCompare(b.name));
|
|
183
195
|
for (const entry of entries) {
|
|
184
196
|
const full = join(dir, entry.name);
|
|
185
197
|
if (entry.isDirectory()) await walkMarkdown(full, onFile);
|
|
@@ -336,6 +348,7 @@ function apply(ctx, config) {
|
|
|
336
348
|
}));
|
|
337
349
|
async function runExpert(query, task, exec) {
|
|
338
350
|
const locale = activeLocale();
|
|
351
|
+
const taskText = normalizeTask(task, locale);
|
|
339
352
|
if (exec.agent === void 0) throw new Error(formatHost(locale, "error.summonRequiresAgent"));
|
|
340
353
|
const provider = ctx.subagents.getProvider(config.provider);
|
|
341
354
|
if (provider === void 0) throw new Error(formatHost(locale, "error.providerMissing", { provider: config.provider }));
|
|
@@ -348,7 +361,7 @@ function apply(ctx, config) {
|
|
|
348
361
|
label: `expert:${expert.slug}`,
|
|
349
362
|
prompt: [{
|
|
350
363
|
type: "text",
|
|
351
|
-
text:
|
|
364
|
+
text: taskText
|
|
352
365
|
}],
|
|
353
366
|
parent: exec.agent,
|
|
354
367
|
persona: expert.persona,
|
package/lib/remote.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as formatHost } from "./i18n-
|
|
1
|
+
import { t as formatHost } from "./i18n-BL3miiHZ.js";
|
|
2
2
|
import { settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
3
3
|
import { Remote, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
4
4
|
import { z } from "zod";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-agency-agents",
|
|
3
3
|
"description": "Agency Experts — a summonable domain-expert roster for DSH (expert mode)",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.20",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -80,10 +80,10 @@
|
|
|
80
80
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.5",
|
|
81
81
|
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.5",
|
|
82
82
|
"@deepseek-ai/dsh-typert-registry": "^0.1.0-rc.5",
|
|
83
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
83
84
|
"react": "^18.2.0"
|
|
84
85
|
},
|
|
85
86
|
"dependencies": {
|
|
86
|
-
"@deepseek-ai/schemastery": "^3.18.1",
|
|
87
87
|
"zod": "^4.4.3"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
"@deepseek-ai/dsh-settings": "^0.1.0-rc.5",
|
|
103
103
|
"@deepseek-ai/dsh-typert-protocol": "^0.1.0-rc.5",
|
|
104
104
|
"@deepseek-ai/dsh-typert-registry": "^0.1.0-rc.5",
|
|
105
|
+
"@deepseek-ai/schemastery": "^3.18.1",
|
|
105
106
|
"@types/node": "^22.20.0",
|
|
106
107
|
"@types/react": "~18.3.1",
|
|
107
108
|
"react": "^18.2.0",
|