@stofone/dsh-agent-roster 0.6.2 → 0.8.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/CHANGELOG.md +98 -1
- package/LICENSE +21 -21
- package/README.md +407 -319
- package/README.zh.md +95 -9
- package/bin/cli.mjs +10 -0
- package/index/registry.json +45 -1
- package/index.js +2 -2
- package/lib/bridge.js +89 -10
- package/lib/capabilities.js +434 -0
- package/lib/diff.js +216 -0
- package/lib/digest.js +65 -0
- package/lib/format.js +4 -5
- package/lib/library.js +5 -0
- package/lib/organization.js +331 -0
- package/lib/registry.js +209 -4
- package/lib/render.js +253 -7
- package/lib/tools.js +251 -23
- package/lib/verify.js +135 -10
- package/orgs/agent-roster-collective/api-design/roster.yaml +67 -0
- package/orgs/agent-roster-collective/content-ops/roster.yaml +55 -0
- package/orgs/agent-roster-collective/contract-review/roster.yaml +58 -0
- package/orgs/agent-roster-collective/data-quality/roster.yaml +64 -0
- package/orgs/agent-roster-collective/db-migration/roster.yaml +64 -0
- package/orgs/agent-roster-collective/docs-writer/roster.yaml +59 -0
- package/orgs/agent-roster-collective/finance-recon/roster.yaml +63 -0
- package/orgs/agent-roster-collective/frontend-ui/roster.yaml +60 -0
- package/orgs/agent-roster-collective/i18n-l10n/roster.yaml +60 -0
- package/orgs/agent-roster-collective/incident-response/roster.yaml +65 -0
- package/orgs/agent-roster-collective/literature-review/roster.yaml +61 -0
- package/orgs/agent-roster-collective/market-research/roster.yaml +60 -0
- package/orgs/agent-roster-collective/ml-eval/roster.yaml +63 -0
- package/orgs/agent-roster-collective/organization.yaml +118 -0
- package/orgs/agent-roster-collective/performance/roster.yaml +63 -0
- package/orgs/agent-roster-collective/product-discovery/roster.yaml +55 -0
- package/orgs/agent-roster-collective/qa-regression/roster.yaml +64 -0
- package/orgs/agent-roster-collective/recruiting/roster.yaml +58 -0
- package/orgs/agent-roster-collective/release-manager/roster.yaml +59 -0
- package/orgs/agent-roster-collective/security-audit/capabilities.yaml +12 -0
- package/orgs/agent-roster-collective/security-audit/roster.yaml +65 -0
- package/orgs/agent-roster-collective/sre-oncall/roster.yaml +60 -0
- package/orgs/agent-roster-collective/support-triage/roster.yaml +58 -0
- package/package.json +5 -1
- package/schema/capabilities.v1.schema.json +124 -0
- package/schema/organization.v1.schema.json +50 -0
- package/schema/registry.v1.schema.json +83 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# 客服分诊组
|
|
2
|
+
#
|
|
3
|
+
# 本档案由本项目自撰(未复制任何上游文本),用于演示同一座档案库里的多种团队形态。
|
|
4
|
+
# 目录约定:<root>/<roster-id>/roster.yaml,且 roster 必须等于目录名。
|
|
5
|
+
kind: dsh-agent-roster/v1
|
|
6
|
+
roster: support-triage
|
|
7
|
+
version: 1.0.0
|
|
8
|
+
title: 客服分诊组
|
|
9
|
+
description: 把每条来信分到“能自助、要人接、是缺陷”三条路之一。
|
|
10
|
+
license: MIT
|
|
11
|
+
maintainers:
|
|
12
|
+
- STofone
|
|
13
|
+
tags:
|
|
14
|
+
- support
|
|
15
|
+
- triage
|
|
16
|
+
|
|
17
|
+
defaults:
|
|
18
|
+
provider: deepseek
|
|
19
|
+
model: deepseek-v4.1-flash
|
|
20
|
+
reasoningEffort: high
|
|
21
|
+
|
|
22
|
+
members:
|
|
23
|
+
- name: lead
|
|
24
|
+
role: 分诊负责人
|
|
25
|
+
title: 定分类口径与升级线
|
|
26
|
+
description: 维护分类表与升级条件;不直接回复用户。
|
|
27
|
+
systemPrompt: |
|
|
28
|
+
你维护分诊口径:三类(可自助 / 需人工 / 疑似缺陷)各自的判定条件与升级线。
|
|
29
|
+
不写具体回复;你负责让分诊结果可复核。
|
|
30
|
+
产出是分类表 + 每条判定的边界例子(含一个反例)。
|
|
31
|
+
口径冲突时按“宁可升级”处理,并记下这次冲突用于改口径。
|
|
32
|
+
tags:
|
|
33
|
+
- taxonomy
|
|
34
|
+
- name: classifier
|
|
35
|
+
role: 来信分诊
|
|
36
|
+
title: 读一遍来信,给出分类与依据
|
|
37
|
+
description: 按口径分类,摘出关键句作为依据;不确定就升级。
|
|
38
|
+
toolScope:
|
|
39
|
+
allow:
|
|
40
|
+
- read
|
|
41
|
+
systemPrompt: |
|
|
42
|
+
你按口径给每条来信分类,并摘出决定分类的那句原话。
|
|
43
|
+
不回复用户,也不承诺时间;你的产出是分类 + 依据 + 建议下一步。
|
|
44
|
+
输出“来信摘要 · 分类 · 依据原句 · 建议动作”,一条一行。
|
|
45
|
+
两类都像时标“不确定并升级”,不要赌。
|
|
46
|
+
tags:
|
|
47
|
+
- classification
|
|
48
|
+
- name: responder
|
|
49
|
+
role: 回复撰写
|
|
50
|
+
title: 先承认问题,再给可执行下一步
|
|
51
|
+
description: 按分诊结论写回复,含复现所需信息与替代方案。
|
|
52
|
+
systemPrompt: |
|
|
53
|
+
你写回复:先复述对方遇到的问题,再给可执行的下一步(含需要的环境信息)。
|
|
54
|
+
不承诺未定的修复时间,也不猜测根因;不确定就写“我们还在确认”。
|
|
55
|
+
每条回复控制在 150 字内,附一条“若仍不行,请提供 X”。
|
|
56
|
+
涉及退款、赔偿、法律措辞时停下转人工,不要自行承诺。
|
|
57
|
+
tags:
|
|
58
|
+
- response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stofone/dsh-agent-roster",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "多 Agent 团队的静态成员档案定义与校验层:档案库在面板里看得见、改得动,团队成员的人设、模型与工具边界固化成可校验、可版本化的文件,并在 dsh-agent-teams 创建成员时把档案桥接给运行时。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"schema",
|
|
24
24
|
"icon.svg",
|
|
25
25
|
"examples",
|
|
26
|
+
"orgs",
|
|
26
27
|
"README.md",
|
|
27
28
|
"README.zh.md",
|
|
28
29
|
"CHANGELOG.md",
|
|
@@ -96,5 +97,8 @@
|
|
|
96
97
|
"meta": {
|
|
97
98
|
"title": "Agent Roster",
|
|
98
99
|
"description": "静态成员档案:定义、校验并桥接多 Agent 团队成员的人设、模型与工具边界。"
|
|
100
|
+
},
|
|
101
|
+
"devDependencies": {
|
|
102
|
+
"@deepseek-ai/dsh-tools": "^0.2.1-rc.2"
|
|
99
103
|
}
|
|
100
104
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/STofone/dsh-agent-roster/blob/main/schema/capabilities.v1.schema.json",
|
|
4
|
+
"title": "DSH agent roster capability requirements",
|
|
5
|
+
"description": "一份档案的能力要求(与 roster.{yaml,json} 同目录的 capabilities.{yaml,json}):只声明「建这支队伍需要什么」,不承载能力本体。校验的权威实现是插件里的 lib/capabilities.js;本文件供编辑器与外部工具做提示,两者由 test/capabilities.test.js 对齐。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": [
|
|
9
|
+
"kind",
|
|
10
|
+
"roster"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"$schema": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "编辑器用的 schema 地址,插件不读它。"
|
|
16
|
+
},
|
|
17
|
+
"kind": {
|
|
18
|
+
"const": "dsh-agent-roster-capabilities/v1"
|
|
19
|
+
},
|
|
20
|
+
"roster": {
|
|
21
|
+
"$ref": "#/$defs/id",
|
|
22
|
+
"description": "档案 id,必须与同目录的 roster 文件一致。"
|
|
23
|
+
},
|
|
24
|
+
"onMissing": {
|
|
25
|
+
"enum": [
|
|
26
|
+
"refuse",
|
|
27
|
+
"degraded"
|
|
28
|
+
],
|
|
29
|
+
"description": "证据源明确显示缺项时的行为:refuse(默认)拒绝生成建队参数;degraded 照常生成,但在每次核对里记成 degraded。"
|
|
30
|
+
},
|
|
31
|
+
"asOf": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
|
|
34
|
+
"description": "这份要求是照哪天的部署核对的。只收日期:时分秒会给人「一直新鲜」的错觉。"
|
|
35
|
+
},
|
|
36
|
+
"requires": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": false,
|
|
39
|
+
"description": "只收有证据源的两类。模型路由可用性、插件版本、凭据指针、业务前置条件都没有证据源,写在这里只会变成又一份「看起来声明了」的假绿。",
|
|
40
|
+
"properties": {
|
|
41
|
+
"skills": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"maxItems": 32,
|
|
44
|
+
"items": {
|
|
45
|
+
"$ref": "#/$defs/skillRequirement"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"toolPolicies": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"maxItems": 32,
|
|
51
|
+
"items": {
|
|
52
|
+
"$ref": "#/$defs/policyRequirement"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"notes": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"maxLength": 500
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"$defs": {
|
|
63
|
+
"id": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"pattern": "^[a-z0-9][a-z0-9-]{1,63}$"
|
|
66
|
+
},
|
|
67
|
+
"skillName": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"
|
|
70
|
+
},
|
|
71
|
+
"policyId": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"pattern": "^[a-z0-9][a-z0-9-]{1,63}$"
|
|
74
|
+
},
|
|
75
|
+
"skillRequirement": {
|
|
76
|
+
"oneOf": [
|
|
77
|
+
{
|
|
78
|
+
"$ref": "#/$defs/skillName"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": [
|
|
84
|
+
"name"
|
|
85
|
+
],
|
|
86
|
+
"properties": {
|
|
87
|
+
"name": {
|
|
88
|
+
"$ref": "#/$defs/skillName"
|
|
89
|
+
},
|
|
90
|
+
"reason": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"minLength": 1,
|
|
93
|
+
"maxLength": 200
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"policyRequirement": {
|
|
100
|
+
"oneOf": [
|
|
101
|
+
{
|
|
102
|
+
"$ref": "#/$defs/policyId"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "object",
|
|
106
|
+
"additionalProperties": false,
|
|
107
|
+
"required": [
|
|
108
|
+
"name"
|
|
109
|
+
],
|
|
110
|
+
"properties": {
|
|
111
|
+
"name": {
|
|
112
|
+
"$ref": "#/$defs/policyId"
|
|
113
|
+
},
|
|
114
|
+
"reason": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"minLength": 1,
|
|
117
|
+
"maxLength": 200
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/STofone/dsh-agent-roster/blob/main/schema/organization.v1.schema.json",
|
|
4
|
+
"title": "DSH agent roster organization document",
|
|
5
|
+
"description": "一座档案库的目录页:声明库里有哪几份档案、各自什么状态。校验的权威实现是 lib/organization.js;本文件供编辑器与外部工具提示,两者由 test/organization.test.js 对齐。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["kind", "organization", "rosters"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "编辑器用的 schema 地址,插件不读它。"
|
|
13
|
+
},
|
|
14
|
+
"kind": { "const": "dsh-agent-roster-organization/v1" },
|
|
15
|
+
"organization": {
|
|
16
|
+
"$ref": "#/$defs/id",
|
|
17
|
+
"description": "组织 id,同时是档案库根目录名。位置即身份。"
|
|
18
|
+
},
|
|
19
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
20
|
+
"description": { "type": "string", "maxLength": 500 },
|
|
21
|
+
"license": { "type": "string", "maxLength": 120 },
|
|
22
|
+
"homepage": { "type": "string", "maxLength": 200, "pattern": "^https?://\\S+$" },
|
|
23
|
+
"maintainers": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"maxItems": 16,
|
|
26
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 120 }
|
|
27
|
+
},
|
|
28
|
+
"rosters": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"minItems": 1,
|
|
31
|
+
"maxItems": 64,
|
|
32
|
+
"description": "登记在案的档案。声明了却找不到目录会报错;目录在却没登记会告警。",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "object",
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"required": ["id"],
|
|
37
|
+
"properties": {
|
|
38
|
+
"id": { "$ref": "#/$defs/id" },
|
|
39
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
40
|
+
"status": { "enum": ["active", "archived"] },
|
|
41
|
+
"origin": { "type": "string", "maxLength": 120 },
|
|
42
|
+
"note": { "type": "string", "maxLength": 300 }
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"$defs": {
|
|
48
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{1,63}$" }
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/STofone/dsh-agent-roster/blob/main/schema/registry.v1.schema.json",
|
|
4
|
+
"title": "DSH agent roster registry document",
|
|
5
|
+
"description": "公共档案索引:登记若干 collection(仓库 + 目录 + 确有哪几份档案),供订阅与一键安装。权威校验实现是 lib/remote.js#validateRegistry;本文件供编辑器与外部工具提示,两者由 test/registry-schema.test.js 对齐。注意:运行时对未知字段只告警不判错,这里写成 additionalProperties:false 是为了让编辑器早点指出拼写错误。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["kind", "collections"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "编辑器用的 schema 地址,插件不读它。"
|
|
13
|
+
},
|
|
14
|
+
"kind": { "const": "dsh-agent-roster-registry/v1" },
|
|
15
|
+
"version": { "type": "integer", "minimum": 1 },
|
|
16
|
+
"generatedAt": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$",
|
|
19
|
+
"description": "上一次校验通过的时间,由 CI 或维护者盖章。"
|
|
20
|
+
},
|
|
21
|
+
"generator": { "type": "string", "maxLength": 200 },
|
|
22
|
+
"source": { "type": "string", "maxLength": 200 },
|
|
23
|
+
"collections": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"maxItems": 500,
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"required": ["id", "repo"],
|
|
30
|
+
"properties": {
|
|
31
|
+
"id": { "$ref": "#/$defs/id" },
|
|
32
|
+
"title": { "type": "string", "maxLength": 120 },
|
|
33
|
+
"description": { "type": "string", "maxLength": 500 },
|
|
34
|
+
"repo": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^(?:github:)?[A-Za-z0-9][A-Za-z0-9_.-]{0,38}/[A-Za-z0-9][A-Za-z0-9_.-]{0,99}$",
|
|
37
|
+
"description": "仓库坐标,形如 github:owner/repo。"
|
|
38
|
+
},
|
|
39
|
+
"ref": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"pattern": "^(?:[A-Za-z0-9][A-Za-z0-9._-]{0,127}|[0-9a-f]{40})$",
|
|
42
|
+
"default": "main",
|
|
43
|
+
"description": "分支、标签或 40 位 commit。"
|
|
44
|
+
},
|
|
45
|
+
"path": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"pattern": "^(?:/)?(?:[A-Za-z0-9._-]+/)*[A-Za-z0-9._-]*$",
|
|
48
|
+
"default": "rosters",
|
|
49
|
+
"description": "仓库内存放档案的目录。"
|
|
50
|
+
},
|
|
51
|
+
"rosters": {
|
|
52
|
+
"type": "array",
|
|
53
|
+
"maxItems": 200,
|
|
54
|
+
"description": "目录里确实存在的档案 id。索引不撒谎:不存在的 id 会被 registry sync 剔除。",
|
|
55
|
+
"items": { "$ref": "#/$defs/id" }
|
|
56
|
+
},
|
|
57
|
+
"tags": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"maxItems": 16,
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^[a-z0-9][a-z0-9-]{0,31}$"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"license": { "type": "string", "maxLength": 120 },
|
|
66
|
+
"maintainers": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"maxItems": 16,
|
|
69
|
+
"items": { "type": "string", "minLength": 1, "maxLength": 120 }
|
|
70
|
+
},
|
|
71
|
+
"homepage": { "type": "string", "maxLength": 200, "pattern": "^https?://\\S+$" }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"$defs": {
|
|
77
|
+
"id": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"pattern": "^[a-z0-9][a-z0-9-]{1,63}$",
|
|
80
|
+
"description": "kebab-case 标识,与档案目录名同规则。"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|