dsh-swarm-console 0.1.0 → 0.1.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 whyissodifficult
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # Swarm Console(`dsh-swarm-console`)
2
+
3
+ > 让 agent 说「完成」之前,先过一道可机器验证的交付门禁。
4
+
5
+ [![npm](https://img.shields.io/npm/v/dsh-swarm-console.svg)](https://www.npmjs.com/package/dsh-swarm-console)
6
+ [![license](https://img.shields.io/npm/l/dsh-swarm-console.svg)](https://github.com/whyissodifficult/dsh-agent-swarm-console/blob/main/LICENSE)
7
+ [![node](https://img.shields.io/node/v/dsh-swarm-console.svg)](https://nodejs.org/)
8
+
9
+ DeepSeek Harness(DSH)插件:把「任务契约 → 证据校验 → 三态门禁 → 用户放行」做成一条可核查的链路。
10
+
11
+ ## 它解决什么
12
+
13
+ Agent 说「完成了」,可能只是日志刷屏、产出为零。这个插件让「完成」必须在证据上成立:
14
+
15
+ - **冻结契约**:目标 / 约束 / 验收条件写死并哈希成 `contractId`,改一个字就换 id;
16
+ - **证据先于验收**:每条验收条件必须绑定检查项,缺证据最多判 `YELLOW`;
17
+ - **三态判定**:`GREEN` / `YELLOW` / `RED`,`RED` 一定带可复制执行的复现命令;
18
+ - **放行只归用户**:由斜杠命令触发,模型中不存在对应工具,无法代批。
19
+
20
+ ## 安装
21
+
22
+ DSH 中安装(本地目录,已验证):
23
+
24
+ ```text
25
+ plugin_manager install_bundle <本包目录的绝对路径>
26
+ ```
27
+
28
+ 或在 DSH 的 **Plugins → Add plugin** 里选择本地目录。
29
+
30
+ > 通过 npm 包名直接安装的路径**尚未验证**,暂不承诺可用。
31
+
32
+ ## 快速开始
33
+
34
+ ```text
35
+ verify_contract 冻结一个契约(objective / constraints / criteria)
36
+ verify_run 跑证据校验,得到 GREEN / YELLOW / RED
37
+ /gate-status 查看某个契约最近一次判定
38
+ /gate-approve 放行(仅 GREEN 允许,用户手动输入)
39
+ /gate-retry 重算并刷新判定
40
+ ```
41
+
42
+ 示例:
43
+
44
+ ```text
45
+ > verify_contract {"objective":"给 README 加安装节","criteria":[{"id":"c1","text":"安装节存在","checkIds":["k1"]}]}
46
+ contract 5bc483324d46 已冻结
47
+
48
+ > verify_run {"contractId":"5bc483324d46","checks":[{"id":"k1","type":"file.exists","ok":true}]}
49
+ 门禁 GREEN:全部 1 条验收条件均有通过证据
50
+
51
+ > /gate-approve 5bc483324d46
52
+ 契约 5bc483324d46 已由用户放行(approved)
53
+ ```
54
+
55
+ ## 能力与限制
56
+
57
+ 已实现:
58
+
59
+ - 契约冻结与内容哈希(`contract.id`)
60
+ - 证据分级与三态门禁(`GREEN` / `YELLOW` / `RED`)
61
+ - `RED` 必带可执行复现命令;缺证据不判通过
62
+ - 用户专属放行:`/gate-approve` `/gate-retry` `/gate-status`
63
+ - 外部 agent 适配层(OpenAI 兼容端点,作为原生 subagent run 使用)
64
+
65
+ 尚未实现(不承诺):
66
+
67
+ - 可视化画布
68
+ - 多阶段评审状态机
69
+ - 动作卡片:代码保留为可选增强,需目标 profile 挂载 `action-cards` 服务
70
+ - 证据持久化:v1 存在进程内,DSH 重启即丢
71
+
72
+ ## 开发与门禁
73
+
74
+ ```bash
75
+ npm run gate # probe / selftest / plugin:test / smoke / pack / wiring / dryrun 七段
76
+ ```
77
+
78
+ 验收记录见 [`docs/V1-ACCEPTANCE.md`](https://github.com/whyissodifficult/dsh-agent-swarm-console/blob/main/plugin/docs/V1-ACCEPTANCE.md):包含斜杠命令链路的日志证据(`command/run`、`command/done`)与三条硬规则的反证。
79
+
80
+ ## 链接
81
+
82
+ - 仓库:https://github.com/whyissodifficult/dsh-agent-swarm-console
83
+ - 插件详情:见 [`docs/DETAIL.md`](https://github.com/whyissodifficult/dsh-agent-swarm-console/blob/main/plugin/docs/DETAIL.md)
84
+ - 验收记录:[`docs/V1-ACCEPTANCE.md`](https://github.com/whyissodifficult/dsh-agent-swarm-console/blob/main/plugin/docs/V1-ACCEPTANCE.md)
85
+
86
+ ## 许可
87
+
88
+ [MIT](https://github.com/whyissodifficult/dsh-agent-swarm-console/blob/main/LICENSE)
package/locale/en.json CHANGED
@@ -1 +1 @@
1
- { "meta": { "title": "Swarm Console", "description": "Run one external agent from DSH; canvas and evidence gate in progress.", "detail": "docs/DETAIL.md" } }
1
+ { "meta": { "title": "Swarm Console", "description": "Run one external agent from DSH, with a machine-checkable delivery gate; canvas in progress.", "detail": "docs/DETAIL.md" } }
package/locale/zh.json CHANGED
@@ -1 +1 @@
1
- { "meta": { "title": "Swarm Console 集群控制台", "description": "在 DSH 里跑一个外部 agent;画布与交付门禁开发中。", "detail": "docs/DETAIL.md" } }
1
+ { "meta": { "title": "Swarm Console 集群控制台", "description": "在 DSH 里跑一个外部 agent,并用可机器验证的门禁确认交付;画布开发中。", "detail": "docs/DETAIL.md" } }
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
- {
2
- "name": "dsh-swarm-console",
3
- "version": "0.1.0",
4
- "type": "module",
5
- "description": "Run one external agent from DSH, with a visible gate (v0.1 · 门禁可用,画布开发中).",
6
- "keywords": ["deepseek-harness", "dsh-plugin", "agent", "swarm", "verification", "gate"],
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/whyissodifficult/dsh-agent-swarm-console.git",
10
- "directory": "plugin"
11
- },
12
- "license": "MIT",
13
- "author": "郑志阳 (Walk in the white)",
14
- "homepage": "https://github.com/whyissodifficult/dsh-agent-swarm-console",
15
- "bugs": { "url": "https://github.com/whyissodifficult/dsh-agent-swarm-console/issues" },
16
- "engines": { "node": ">=20.3" },
17
- "exports": {
18
- ".": "./index.js",
19
- "./locale/*.json": "./locale/*.json",
20
- "./icon": "./icon.svg"
21
- },
22
- "files": ["index.js", "lib", "cordis.patch.yml", "locale", "docs", "icon.svg"],
23
- "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
24
- }
1
+ {
2
+ "name": "dsh-swarm-console",
3
+ "version": "0.1.2",
4
+ "type": "module",
5
+ "description": "Run one external agent from DSH, with a visible gate (v0.1 路 闂ㄧ鍙敤锛岀敾甯冨紑鍙戜腑).",
6
+ "keywords": ["deepseek-harness", "dsh-plugin", "agent", "swarm", "verification", "gate"],
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/whyissodifficult/dsh-agent-swarm-console.git",
10
+ "directory": "plugin"
11
+ },
12
+ "license": "MIT",
13
+ "author": "閮戝織闃?(Walk in the white)",
14
+ "homepage": "https://github.com/whyissodifficult/dsh-agent-swarm-console",
15
+ "bugs": { "url": "https://github.com/whyissodifficult/dsh-agent-swarm-console/issues" },
16
+ "engines": { "node": ">=20.3" },
17
+ "exports": {
18
+ ".": "./index.js",
19
+ "./locale/*.json": "./locale/*.json",
20
+ "./icon": "./icon.svg"
21
+ },
22
+ "files": ["index.js", "lib", "cordis.patch.yml", "locale", "docs", "icon.svg"],
23
+ "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }
24
+ }