dsh-agent-team-playbook 1.34.1 → 1.35.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 CHANGED
@@ -4,6 +4,21 @@
4
4
 
5
5
  ## 插件包
6
6
 
7
+ ### 1.35.0
8
+
9
+ - 新增 `dsh-go/`:给 **dsh-go 手机 App 原生界面**的插件(App 插件桥,不是 Cordis bundle)
10
+ - 输入框上方「协作规程」胶囊 → 原生面板
11
+ - 面板按钮直接执行 `/atp install`、`/atp install force`、`/atp core`、`/atp paths`,或复制命令
12
+ - 浏览器半身只在 Web / 桌面端加载,手机原生界面靠这一份补齐;动作都落到同一套 `/atp` 命令
13
+
14
+ ### 1.34.x
15
+
16
+ - 1.34.1 架构图改用 jsDelivr 绝对地址(npm 不解析相对路径;raw.githubusercontent 国内不可达)
17
+ - 1.34.0 只读状态路由补上 DSH 准入校验(市场维护者在条目里披露的漏洞):
18
+ 前缀路由抢在 `connection` 准入检查之前执行,同机任意网页可调用。
19
+ 新增 `lib/trust.js`:宿主 `admit` / 旧版 `requestRejection`,无服务时结构复刻(loopback Host、拒绝跨站、Origin/Referer 同源),
20
+ 宿主异常 503 不跳过认证;只接受 GET。测试 H6b–H6e 共 9 项
21
+
7
22
  ### 1.33.0
8
23
 
9
24
  - 新增 `scripts/smoke-install.mjs`:在全新 `DSH_HOME` 里走真实 `dsh plugin add`,7 项检查
package/README.en.md CHANGED
@@ -100,7 +100,7 @@ Adds an `/atp` command; on web and desktop there is also a panel.
100
100
  The panel's read-only endpoint `/api/agent-team-playbook/status` goes through DSH's admission check (same-origin, loopback and host authentication); cross-site requests get 403, and only GET is accepted.
101
101
 
102
102
  Existing files are never overwritten silently: you get a conflict list and choose **overwrite / back up / rename** per item, and the run is applied after you finish.
103
- (The dsh-go native mobile UI does not load browser halves; use the command there.)
103
+ (The dsh-go native mobile UI does not load browser halves; it gets a native capsule instead — "Playbook" above the composer opens a panel that installs and inspects, see [`dsh-go/`](dsh-go/README.md).)
104
104
 
105
105
  ### Option B: install as resident context (writes files, the real payoff)
106
106
 
package/README.md CHANGED
@@ -100,7 +100,7 @@ dsh plugin --profile web add dsh-agent-team-playbook
100
100
  面板只读接口 `/api/agent-team-playbook/status` 走 DSH 的准入校验(同源 + loopback + 宿主认证),跨站请求一律 403;只接受 GET。
101
101
 
102
102
  遇到同名文件时不会静默覆盖:会列出冲突,让你逐项选 **覆盖 / 备份 / 改名**,处理完自动执行。
103
- (dsh-go 手机原生界面不加载浏览器半身,那边用命令即可。)
103
+ (dsh-go 手机原生界面不加载浏览器半身,另有原生胶囊入口:输入框上方「协作规程」→ 面板里直接装/查,见 [`dsh-go/`](dsh-go/README.md)。)
104
104
 
105
105
  ### 方式 B:装成"常驻上下文"(会写文件,核心价值)
106
106
 
@@ -0,0 +1,30 @@
1
+ # dsh-go 原生界面插件
2
+
3
+ `local-atp/` 是给 **dsh-go 手机 App 原生界面**用的小插件(不是 Cordis bundle):输入框上方加「协作规程」胶囊,点开是原生面板,按钮直接执行 `/atp` 命令。
4
+
5
+ ## 为什么另做一份
6
+
7
+ 浏览器半身(仓库根的 `client.js`)只在 Web / 桌面端加载;dsh-go 原生界面不加载它。所以手机上的入口改用 App 的插件桥:
8
+
9
+ | 界面 | 入口 | 实现 |
10
+ |---|---|---|
11
+ | Web / 桌面端 | 首页 chip + 设置面板 | `client.js`(Cordis client half) |
12
+ | dsh-go 原生 | 输入框上方胶囊 + 原生面板 | `dsh-go/local-atp`(App 插件桥) |
13
+
14
+ 两者的动作都落到同一条 `/atp` 命令上,不重复实现安装逻辑。
15
+
16
+ ## 安装
17
+
18
+ ```bash
19
+ # 1. 放到 App 的插件目录(引擎重置会保留)
20
+ P="${DSH_HOME:-$HOME/.dsh}/dsh-go/plugins/local-atp"
21
+ mkdir -p "$(dirname "$P")" && cp -r dsh-go/local-atp "$P"
22
+
23
+ # 2. 自查(--load 会在隔离环境里加载代码并校验视图)
24
+ node "${DSH_HOME:-$HOME/.dsh}/skills/dsh-go-plugin/kit/bin/check.mjs" "$P" --load
25
+
26
+ # 3. 装进当前 profile(装的是链接,目录不能删)
27
+ dsh plugin --profile web add "$P"
28
+ ```
29
+
30
+ 改了 `lib/` 里的代码后,需要在 App 的「引擎」页重启引擎才生效;只改 `package.json` 清单会自动重读。
@@ -0,0 +1,4 @@
1
+ # id: any unique id; name: must equal "name" in package.json.
2
+ - insert:
3
+ - id: local-atp
4
+ name: local-atp
@@ -0,0 +1,83 @@
1
+ // 协作规程(agent-team-playbook)的 dsh-go 原生界面小插件。
2
+ // App 只画 package.json 里 dshGo 声明的内容;这里的处理在引擎(Node)里执行。
3
+ export const name = 'local-atp'
4
+
5
+ export function apply(ctx) {
6
+ // 仅在有 dsh-go 桥接的主机上出现;写 ['dshGo'],不要写 ['dshGo?']。
7
+ ctx.inject(['dshGo'], (ctx) => {
8
+ const zh = (event) => !String(event?.locale ?? '').startsWith('en')
9
+
10
+ // 输入框上方的胶囊:打开面板
11
+ ctx.dshGo.on('open-playbook', () => ({ open: 'panel:playbook' }))
12
+
13
+ ctx.dshGo.panel('playbook', {
14
+ view: (scope, caps) => {
15
+ const en = String(caps?.locale ?? '').startsWith('en')
16
+ return {
17
+ type: 'stack',
18
+ title: en ? 'Collaboration playbook' : '多智能体协作规程',
19
+ children: [
20
+ {
21
+ type: 'text',
22
+ text: en
23
+ ? 'Install the workflow into this workspace as AGENTS.md plus docs, then the agent follows it every turn.'
24
+ : '把工作流以 AGENTS.md + 引用文档的形式装进当前工作区,装好后 agent 每轮都会按它协作。',
25
+ },
26
+ {
27
+ type: 'keyValue',
28
+ items: [
29
+ [en ? 'Source' : '来源', 'agent-team-playbook'],
30
+ [en ? 'Command' : '命令', '/atp'],
31
+ ],
32
+ },
33
+ {
34
+ type: 'actions',
35
+ items: [
36
+ { label: en ? 'Install' : '安装到工作区', action: 'install', style: 'primary', icon: 'download' },
37
+ { label: en ? 'Overwrite' : '覆盖式安装', action: 'force', icon: 'refresh' },
38
+ { label: en ? 'Copy command' : '复制命令', action: 'copy', icon: 'copy' },
39
+ ],
40
+ },
41
+ {
42
+ type: 'callout',
43
+ tone: 'info',
44
+ text: en
45
+ ? 'Existing files are never overwritten silently: the command lists conflicts and you decide per item.'
46
+ : '不会静默覆盖:已有同名文件时命令会列出冲突,由你逐项决定(覆盖 / 备份 / 改名)。',
47
+ },
48
+ {
49
+ type: 'actions',
50
+ items: [
51
+ { label: en ? 'Read the core' : '读取核心全文', action: 'core', style: 'plain' },
52
+ { label: en ? 'Paths' : '分册路径', action: 'paths', style: 'plain' },
53
+ ],
54
+ },
55
+ ],
56
+ }
57
+ },
58
+ actions: {
59
+ // 执行斜杠命令:在当前对话里跑 /atp 的安装流程,冲突时会列出清单
60
+ install: (scope, event) => ({
61
+ command: 'atp install',
62
+ toast: zh(event) ? '已发起安装,冲突会在对话里列出' : 'Install started; conflicts will be listed',
63
+ }),
64
+ force: (scope, event) => ({
65
+ command: 'atp install force',
66
+ toast: zh(event) ? '已发起覆盖式安装(原件会暂存,可回滚)' : 'Overwrite install started (originals are stashed)',
67
+ }),
68
+ core: (scope, event) => ({
69
+ command: 'atp core',
70
+ toast: zh(event) ? '已输出核心全文' : 'Core text printed',
71
+ }),
72
+ paths: (scope, event) => ({
73
+ command: 'atp paths',
74
+ toast: zh(event) ? '已列出分册路径' : 'Volume paths listed',
75
+ }),
76
+ copy: (scope, event) => ({
77
+ copy: '/atp install',
78
+ toast: zh(event) ? '已复制 /atp install' : 'Copied /atp install',
79
+ }),
80
+ },
81
+ })
82
+ })
83
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "local-atp",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "dsh": {
8
+ "bundle": {
9
+ "patch": "./cordis.patch.yml"
10
+ }
11
+ },
12
+ "engines": {
13
+ "dsh": ">=0.2.1-rc.2 <0.3.0-0"
14
+ },
15
+ "dshGo": {
16
+ "v": 1,
17
+ "title": { "zh": "协作规程", "en": "Playbook" },
18
+ "icon": "bookmark",
19
+ "contributes": {
20
+ "composer.actions": [
21
+ { "id": "open-playbook", "label": { "zh": "协作规程", "en": "Playbook" }, "icon": "bookmark" }
22
+ ],
23
+ "panels": [
24
+ {
25
+ "id": "playbook",
26
+ "title": { "zh": "协作规程", "en": "Playbook" },
27
+ "icon": "bookmark",
28
+ "placement": ["session.tab", "features", "chat.panel"]
29
+ }
30
+ ]
31
+ }
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agent-team-playbook",
3
- "version": "1.34.1",
3
+ "version": "1.35.0",
4
4
  "description": "DeepSeek Harness plugin that brings an executable multi-agent collaboration workflow (charter, triage tiers, six-stage pipeline, audit gates, experience library): a read-only /agent-team command plus a collision-aware installer for the documents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,6 +18,7 @@
18
18
  "client.js",
19
19
  "lib",
20
20
  "bin",
21
+ "dsh-go",
21
22
  "scripts",
22
23
  "cordis.patch.yml",
23
24
  "assets",