cmdr-mcp 0.4.0 → 0.5.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/.claude-plugin/marketplace.json +1 -1
- package/README.md +29 -6
- package/docs/README.zh-CN.md +29 -6
- package/docs/agent-integration.md +2 -2
- package/docs/dashboard-plan.md +327 -0
- package/docs/dashboard.md +101 -0
- package/docs/implementation.md +25 -4
- package/docs/publishing.md +10 -8
- package/docs/setup.md +1 -1
- package/docs/troubleshooting.md +2 -2
- package/marketplace.json +1 -1
- package/package.json +9 -1
- package/plugins/cmdr/.claude-plugin/plugin.json +1 -1
- package/plugins/cmdr/.codex-plugin/plugin.json +1 -1
- package/plugins/cmdr/.zcode-plugin/plugin.json +1 -1
- package/plugins/cmdr/README.md +3 -1
- package/plugins/cmdr/THIRD_PARTY_NOTICES.txt +130 -0
- package/plugins/cmdr/bin/cmdr-check.mjs +3 -0
- package/plugins/cmdr/commands/cmdr.md +2 -0
- package/plugins/cmdr/dist/cli.mjs +121 -31
- package/plugins/cmdr/dist/daemon.mjs +4729 -137
- package/plugins/cmdr/dist/dashboard/app.css +1 -0
- package/plugins/cmdr/dist/dashboard/app.js +10 -0
- package/plugins/cmdr/dist/dashboard/index.html +13 -0
- package/plugins/cmdr/dist/hook.mjs +2 -2
- package/plugins/cmdr/dist/integrity.json +20 -17
- package/plugins/cmdr/dist/mcp.mjs +140 -64
- package/plugins/cmdr/skills/cmdr/SKILL.md +3 -1
- package/plugins/cmdr/skills/cmdr/references/commander.md +2 -0
- package/plugins/cmdr/skills/cmdr/references/executor.md +2 -0
- package/plugins/cmdr/skills/cmdr-commander/SKILL.md +2 -0
- package/plugins/cmdr/skills/cmdr-executor/SKILL.md +2 -0
- package/plugins/cmdr/skills/using-cmdr/SKILL.md +2 -2
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# 内置小队看板
|
|
2
|
+
|
|
3
|
+
看板随 cmdr 完整运行时分发,支持原生插件与 standalone setup 安装。它使用 React、HTTP 与 SSE,在一个页面中切换本数据目录下的小队。Agent 通过工具更新数据;用户通过内置表单回复问题,也可以向当前小队的指挥官留言。
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
cmdr dashboard
|
|
7
|
+
# 不自动打开浏览器,输出本机及网卡 IPv4 访问地址
|
|
8
|
+
cmdr dashboard --no-open
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
setup 安装使用 setup 返回的稳定 CLI 路径,例如 `~/.cmdr/bin/cmdr dashboard`。不同 `CMDR_HOME` 对应不同看板;同一数据目录的多个宿主 profile 共享看板。开发分支使用构建后的 `plugins/cmdr/bin/cmdr`。如果已有旧 daemon,先协调当前工作,使用该安装的 CLI 执行 `cmdr daemon restart`,再重连 MCP;相同版本的本地代码变化也需要重启。
|
|
12
|
+
|
|
13
|
+
命令输出的地址含有效期 60 秒的一次性打开凭证。浏览器将它换为 HttpOnly、SameSite Cookie,并从地址栏清除。服务默认绑定 `0.0.0.0`,端口由系统分配。输出中的 `url` 是自动打开的 `127.0.0.1` 地址,`urls` 包含该地址与各非回环网卡 IPv4 地址(去重),使用同一端口。每个地址有独立、绑定来源的一次性凭证,本机打开不会消耗其他地址的凭证。允许的 Host 来自这些地址,写请求的 Origin 必须与所访问的地址一致;不提供任意 RPC 转发。关闭页面不关闭小队、不取消任务、不停止成员监听。活跃 SSE 连接使 daemon 保持运行;关闭后恢复原有空闲退出规则。
|
|
14
|
+
|
|
15
|
+
看板文案默认跟随系统/浏览器的首选语言:中文(`zh-*`)显示简体中文,其他语言显示英文。页面标题、无障碍标签和时间格式使用相同语言。Agent/用户提供的消息、任务与问题内容、选项及 HTML 展示保持原样,不自动翻译;更改浏览器语言后重新打开或刷新页面生效。
|
|
16
|
+
|
|
17
|
+
网卡地址变化后重新运行 `cmdr dashboard` 会刷新地址列表。局域网设备使用对应网卡 IP 的链接访问,连通性取决于网络与主机防火墙。所有持有有效链接的浏览器具有同一用户权限;当前为 HTTP 服务,无多用户权限隔离。
|
|
18
|
+
|
|
19
|
+
## HTTP 实现
|
|
20
|
+
|
|
21
|
+
看板 HTTP 层使用 Hono 路由和 `@hono/node-server` 适配器,仍由现有 daemon 懒启动、监听所有 IPv4 网卡并由系统分配端口并统一关闭。JSON 请求通过中间件限制为 64 KiB;错误响应沿用 `{ code, message }` 和原有状态码。静态资源只提供三个固定入口,路径从运行时目录解析。
|
|
22
|
+
|
|
23
|
+
SSE 使用 Hono 的 `streamSSE`,保留提交后失效通知、20 秒注释心跳及断线后的活跃连接清理。每条连接的待写数据和 Node 输出缓冲合计超过 1 MiB 时关闭连接,由浏览器重连并重新读取快照。框架不负责业务事务、Agent 唤醒或访问策略;一次性凭证、同源校验、会话验证和 HTML 沙箱规则仍由看板明确实施。
|
|
24
|
+
|
|
25
|
+
前端按组件职责拆分:`app.tsx` 负责页面组装、SSE 订阅和跨小队草稿;`question-card.tsx`、`task-details.tsx`、`squad-dock.tsx`、`commander-message.tsx` 和 `artifact-view.tsx` 分别负责问题、详情、成员/活动、留言及 HTML 展示;`display.ts` 共享状态标签与时间/错误格式化。组件拆分不改变状态归属和挂载位置。
|
|
26
|
+
|
|
27
|
+
## 页面布局
|
|
28
|
+
|
|
29
|
+
宽屏使用三栏布局:左侧切换小队,中间是四列任务看板与底部成员/活动坞,右侧常驻待确认事项和留言框。顶部将任务数、执行中、待回复和成员数压缩为一行。点击任务或问题中的关联任务,在中间工作区打开详情;返回看板不影响右侧填写中的答复。
|
|
30
|
+
|
|
31
|
+
已接收、已处理和已撤回的问题折叠在“其他事项”中,可展开查看答复、处理说明和提交时的证据。窄屏将确认面板排列在工作区下方,任务列与成员表格可横向滚动。
|
|
32
|
+
|
|
33
|
+
## 向指挥官留言
|
|
34
|
+
|
|
35
|
+
右下方的留言框向**当前选中小队**发送用户消息,不直接编辑、派发或取消任务。只在点击“发送”或按回车后提交;切换小队保留各自草稿。成功回执表示已进入队列,尚不代表指挥官已读取或处理。
|
|
36
|
+
|
|
37
|
+
留言通过受鉴权、同源校验的 `POST /api/messages` 提交,只有 `squad_id`、`submission_id`(UUID)、`text` 三个字段,文本限 8,000 字符。daemon 以 `from_role="user"` 的 `info` 消息写入 `squad:<id>` 稳定指挥官收件箱,复用 SQLite 队列、容量限制、提交后的通知和现有唤醒机制,不新增 MCP 工具或专用监听链路。没有指挥官时仍可排队,接管者通过现有 `read` 读取;已关闭小队拒绝新留言。
|
|
38
|
+
|
|
39
|
+
发送失败保留内容和原提交 ID,在消息仍保留期间重试返回同一回执;不同内容复用 ID 会被拒绝。留言沿用普通消息 TTL,不属于永久保存的用户问题/答复记录,也没有独立的“已处理”状态。
|
|
40
|
+
|
|
41
|
+
## 指挥官操作
|
|
42
|
+
|
|
43
|
+
新增 `task`、`artifact`,共九个 MCP 工具。原来的 executor `ask(question=...)` 行为保持不变;指挥官用 `ask(target="user", ...)` 管理用户问题。CLI 后备路径支持同名操作,通过 `cmdr session <tool> --agent HOST --native-id REAL_ID --input '<JSON>'` 传入结构化参数。
|
|
44
|
+
|
|
45
|
+
创建任务并派发:
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
task(action="create", title="完成导出功能", description="支持 CSV 导出", acceptance="中文字段正确,空结果可导出")
|
|
49
|
+
send(to="实现者", task_id="<返回的任务 ID>", message="实现导出功能并验证验收条件")
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`task` 支持 `create/update/get/list/archive/restore`。`update` 可修改标题、说明、验收条件、`position` 和 `artifact_ids`,不能直接修改执行状态。小队成员可以查询本小队任务,只有当前指挥官可修改。`list` 使用 `offset/limit`,可按 `archived` 过滤;`get` 的执行记录按新到旧分页,返回 `next`。任务摘要只保留最近的执行信息,详情按需读取。
|
|
53
|
+
|
|
54
|
+
派发、接单、阻塞、终态和合作式取消仍由 command/report 驱动。`send(task_id=...)` 只允许一个接收者,默认用 task ID 作为 `task_key`;已有未完成工作必须使用 `reassign`,关联任务随重新分配保留。消息已读不等于接单。归档不能释放未完成任务,任务及执行摘要不随消息 TTL 删除。
|
|
55
|
+
|
|
56
|
+
创建用户问题:
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
ask(target="user", question="采用哪种导出范围?", kind="single",
|
|
60
|
+
options=[{id:"current",label:"当前筛选结果"},{id:"all",label:"全部数据"}],
|
|
61
|
+
task_id="<任务 ID>")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
支持 `single`、`multiple`、`text`、`confirm`。选择题有 2–20 个带稳定 ID 的选项;其他类型不传 options。选择题和确认题均可填写补充文字。`artifact_ids` 可关联复杂说明;普通表单由看板内置,不需要 Agent 编写 HTML。
|
|
65
|
+
|
|
66
|
+
`ask(target="user")` 支持以下操作:
|
|
67
|
+
|
|
68
|
+
| action | 行为 |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| `create` | 创建问题,默认类型为 `text`,返回 ID 和版本 |
|
|
71
|
+
| `get` / `list` | 获取问题或分页查询;可按 `status` 查询,包括 `answered` 的未处理答复 |
|
|
72
|
+
| `update` | 传 `id/version` 修改 pending 问题,增加内容版本 |
|
|
73
|
+
| `withdraw` | 传 `id/version` 撤回 pending 问题,不等于用户拒绝 |
|
|
74
|
+
| `handle` | 传 `id/version/result`,明确记录已回答问题的处理结果 |
|
|
75
|
+
|
|
76
|
+
用户问题不使用 `wait`。用户提交后,答案和去重回执在同一事务内持久化,带 `from_role="user"` 的 answer 消息进入 `squad:<id>` 指挥官收件箱,并接入现有唤醒机制。浏览器失败重试保留原提交 ID;相同 ID 和内容返回原回执。旧版本、撤回问题或第二次不同提交会被拒绝。没有指挥官时答案继续保存;接管者可读取和处理。
|
|
77
|
+
|
|
78
|
+
读取不代表处理完成。指挥官恢复时除 `read` 和 `read(recover=true)` 外,还应查询 `ask(target="user", action="list", status="answered")`,核对未处理决策,再显式 `handle`。`read(recover=true)` 只恢复未完成 command。已回答的问题不再编辑;再次征询创建新问题。
|
|
79
|
+
|
|
80
|
+
## HTML 展示块
|
|
81
|
+
|
|
82
|
+
```text
|
|
83
|
+
artifact(title="两种方案对比", html="<!doctype html><html>…自包含内容…</html>")
|
|
84
|
+
task(action="update", id="<任务 ID>", artifact_ids=["<展示块 ID>"])
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`artifact` 支持 `publish/get/list`。更新时提供 `id/version/title/html`;只支持直接传 HTML 内容,不读取任意本机文件。HTML 必须自包含,样式和脚本内联,图片可用 data URL。展示块位于独立 sandbox iframe 中,允许演示脚本,禁止 same-origin、父页面访问、外部资源、网络接口调用和表单提交。用户的正式答复只来自 iframe 外的内置表单。
|
|
88
|
+
|
|
89
|
+
普通数据更新保留 iframe 节点与地址。展示块内容变化会重新加载该 iframe,切换小队后也可能重新加载,不提供任意 HTML 内部状态恢复。更新关联 pending 问题的 HTML 会递增问题版本,保留草稿并要求用户核对。提交时保存完整说明和 HTML 快照,之后可在“查看提交时的说明”中追溯。
|
|
90
|
+
|
|
91
|
+
## 容量与保留
|
|
92
|
+
|
|
93
|
+
每个小队每种记录(Task、Question、Artifact)上限为 200,包括已归档记录;每项任务最多 100 条执行记录,命令与报告各保存最多 2,000 字符的摘要。单份 HTML 上限为 256 KiB,当前展示块总量上限为 8 MiB,每个任务或问题最多关联 8 份。看板记录及提交快照不使用消息 TTL 自动清理;首版不提供单条删除,显式 `purge --all` 会连同协作数据一起清除。
|
|
94
|
+
|
|
95
|
+
## 连接与验证边界
|
|
96
|
+
|
|
97
|
+
每个标签页一条 SSE,所有小队共享。事件只提示数据变化,页面再查询快照;断线恢复同样重新查询。表单草稿保存在当前页面内存中,按小队和问题区分,切换小队不丢失;浏览器整页重载不保证恢复。
|
|
98
|
+
|
|
99
|
+
监听健康、宿主接受唤醒、任务接单和问题处理各自显示。Codex 复用 proxy/queue;Claude/ZCode 完整执行 `listener.arm.command`,保留其中的 `CMDR_HOME`,使用宿主原生通知。安装自检与自动化测试不代替真实宿主的信任提示和模型唤醒验证。
|
|
100
|
+
|
|
101
|
+
设计背景见[方案文档](dashboard-plan.md)。
|
package/docs/implementation.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Implementation and verification
|
|
2
2
|
|
|
3
|
-
This document records the implementation and its verification scope. The design's historical v0.1.x trial reports described a prior prototype; they are not test evidence for this implementation. This release is versioned from `package.json` as **0.
|
|
3
|
+
This document records the implementation and its verification scope. The design's historical v0.1.x trial reports described a prior prototype; they are not test evidence for this implementation. This release is versioned from `package.json` as **0.5.0**, internal protocol **1**.
|
|
4
4
|
|
|
5
5
|
## Delivered behavior
|
|
6
6
|
|
|
7
7
|
- A single on-demand daemon, Unix socket, SQLite WAL persistence, exclusive process lock, spawn coordination, idle exit, retention cleanup, log rotation and preflight-validated explicit replacement.
|
|
8
|
-
-
|
|
8
|
+
- Nine MCP stdio tools with input limits, role enforcement, atomic named squads, priorities, queue backpressure, sender rate limits, correlated asks/answers, peek/history and cancellable long polling. Dashboard operations add `task` and `artifact`; `ask(target="user")` manages durable user questions.
|
|
9
|
+
- A bundled React dashboard served on demand by the existing daemon over loopback HTTP/SSE, with multiple squads, durable task execution summaries, structured user replies and isolated HTML explanations.
|
|
9
10
|
- Orphan/takeover/dissolve semantics, stable native identities, provisional identity migration, resume/reconnect, per-stamped-session MCP connections, Claude clear rebinding, cwd filtering and derived titles.
|
|
10
11
|
- Lifecycle hooks with a flag-file fast path, metadata-only reminders, repeat throttling, actionable Stop interception, compact/resume context and fail-open behavior.
|
|
11
12
|
- Operator status/list/tail/send/read, daemon controls, cleanup, environment diagnostics and printable MCP configuration.
|
|
@@ -14,7 +15,7 @@ This document records the implementation and its verification scope. The design'
|
|
|
14
15
|
|
|
15
16
|
## Deliberate clarifications to the design
|
|
16
17
|
|
|
17
|
-
Generated `dist` files and license notices are excluded from Git, including this PR branch's history. `prepack` builds the publishable npm package; explicit package files and executable mappings include the runtime and all host plugin metadata. Source marketplace installation requires a build first. CI packs the real tarball and installs it offline into a temporary prefix, testing the CLI and
|
|
18
|
+
Generated `dist` files and license notices are excluded from Git, including this PR branch's history. `prepack` builds the publishable npm package; explicit package files and executable mappings include the runtime, dashboard assets and all host plugin metadata. Source marketplace installation requires a build first. CI packs the real tarball and installs it offline into a temporary prefix, testing the CLI and nine MCP tools without external runtime dependencies. No registry publication is performed by this PR.
|
|
18
19
|
|
|
19
20
|
Tool schemas live in `shared/schemas.ts` separately from protocol/error types, so the hook does not pull in Zod just to handle RPC errors. The member CLI now deliberately shares the tool schemas and includes their validator.
|
|
20
21
|
|
|
@@ -32,7 +33,7 @@ Cancellation is propagated from MCP through the Unix socket (`rpc.cancel`). Disc
|
|
|
32
33
|
|
|
33
34
|
## Automated verification
|
|
34
35
|
|
|
35
|
-
The checked-in suite covers core, hooks/identity, utilities, real processes and release scenarios
|
|
36
|
+
The checked-in suite covers core, hooks/identity, utilities, real processes, dashboard interactions and release scenarios:
|
|
36
37
|
|
|
37
38
|
| Coverage | Evidence |
|
|
38
39
|
| --- | --- |
|
|
@@ -41,6 +42,7 @@ The checked-in suite covers core, hooks/identity, utilities, real processes and
|
|
|
41
42
|
| Utilities | Host detection and namespaces, timeout negotiation, symlink/cwd handling, Codex/Claude titles, socket path fallback, lock recovery and config defaults |
|
|
42
43
|
| Release | Member CLI workflow with hook-stamped MCP identity, cancellation and ask non-replay, missing/corrupted bundles, stale versions, bounded diagnostics, isolated handshake timeout and cleanup |
|
|
43
44
|
| Real processes | Bundled MCP tool discovery, simultaneous daemon startup, messaging/ask/read, graceful restart, SIGKILL recovery, version upgrade, pooled ZCode session isolation, hook executable behavior, protocol rejection, end-to-end MCP cancellation |
|
|
45
|
+
| Dashboard | Task/report ownership, reassignment gates, durable answers and immutable evidence, rollback/deduplication, HTTP authorization/CSRF, SSE invalidation, stable React DOM and drafts, installation after source/cache removal |
|
|
44
46
|
|
|
45
47
|
Validation commands:
|
|
46
48
|
|
|
@@ -123,3 +125,22 @@ Verification of the independent branch on 2026-09-17 (macOS, Node 24.16.0):
|
|
|
123
125
|
Outstanding host acceptance is the real idle→notification→read→working→done loop in refreshed Codex, Claude and ZCode sessions, including a busy-turn backlog and watcher re-arm after native task expiry. Use a disposable channel/workspace and inspect tail/list for acceptance; tool/CLI availability alone is not the success criterion. No normal ~/.cmdr state, installed plugin cache or host trust settings were changed during verification.
|
|
124
126
|
|
|
125
127
|
Release preparation for 0.3.0 synchronizes npm and host manifests and injects the package version into Vitest, matching the production build so process tests validate the released version rather than the minimum compatible client version. The release is prepared from merged PR #10 in a clean worktree.
|
|
128
|
+
|
|
129
|
+
## Dashboard iteration — feat/dashboard
|
|
130
|
+
|
|
131
|
+
Implemented on `feat/dashboard`, based on merged `main` (`9c95e8f`). The existing daemon starts one loopback HTTP service on demand through `cmdr dashboard`. Bundled React assets, HTTP snapshots and one SSE stream per browser tab support multiple squads without page reloads. The browser uses a one-use opening token exchanged for an HttpOnly, SameSite cookie; Host/Origin checks protect writes. HTML explanations run in separate sandboxed documents with no same-origin privilege, network API access or form submission.
|
|
132
|
+
|
|
133
|
+
`task` and `artifact` extend the public MCP set to nine tools; `ask(target="user")` provides structured questions. Task execution follows existing commands/reports, including acceptance, cancellation and gated reassignment. User submission, immutable evidence, receipt and stable commander-inbox message commit together. Reading an answer does not mark it handled; commanders explicitly record the result. Records survive message retention and daemon restart. The browser's SSE connection keeps the daemon available while open, and user answers use the existing attention/wake paths. No additional Agent long connection or periodic model wake is introduced. See [dashboard usage](dashboard.md) for tool parameters, limits and recovery.
|
|
134
|
+
|
|
135
|
+
Frontend assets and dependency licenses are built before the integrity manifest, so native plugin caches and persisted setup runtimes carry the same complete build. The package-size review threshold against the historical 0.1.0 baseline is exceeded; the release tarball is approximately 443 kB compressed, including the production React bundle and dashboard assets. No new runtime dependency installation is required.
|
|
136
|
+
|
|
137
|
+
Verification on 2026-09-17 (macOS, Node 24.16.0):
|
|
138
|
+
|
|
139
|
+
- `npm run check`: **139 tests across 17 files passed**, plus formatting, strict typing, build, offline npm installation and nine-tool discovery. Source-removal/setup and npx-cache-removal checks verify dashboard resources and authenticated HTTP access from the persistent runtime.
|
|
140
|
+
- Node **22.5.0**: all **16 dashboard domain, HTTP and React tests** passed, including the jsdom environment used by frontend tests.
|
|
141
|
+
- `npm run verify:zcode`: the installed desktop runtime validated the release cache, discovered 1 command / 4 skills / 4 hooks / 1 MCP server, and connected nine tools after source removal. The runtime used an explicitly isolated temporary session database. No model request was made.
|
|
142
|
+
- A real browser against a disposable `CMDR_HOME` verified two-squad navigation, task/member views, HTML script rendering, retained input/selection/focus during report updates and unchanged iframe content, and draft preservation across squad switches. A browser-submitted answer reached the correct commander inbox; a CLI-issued handled result appeared on the page. A subsequent daemon restart preserved tasks, answers and handling results. Temporary sessions, browser tabs and daemon state were removed afterward.
|
|
143
|
+
|
|
144
|
+
Real idle-model wake and GUI trust across Codex, Claude and ZCode remain a separate acceptance check. The browser/CLI loop and deterministic wake regressions do not claim that a live model processed the answer.
|
|
145
|
+
|
|
146
|
+
看板 UI 使用小队导航、任务工作区和常驻确认面板三栏布局,成员与活动位于底部。用户留言经专用 HTTP 入口进入现有指挥官角色收件箱,来源为 user、类型为 info,复用原有队列和通知,不增加 MCP 工具;留言保留与去重边界见 [Dashboard 操作说明](dashboard.md#向指挥官留言)。
|
package/docs/publishing.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# npm 发布
|
|
2
2
|
|
|
3
|
-
本次发布版本为 `cmdr-mcp@0.
|
|
3
|
+
本次发布版本为 `cmdr-mcp@0.5.0`。npm 包名是 `cmdr-mcp`,CLI、宿主插件和 marketplace 名称仍为 `cmdr`。全局安装后的包根目录是 `$(npm root -g)/cmdr-mcp`。
|
|
4
4
|
|
|
5
5
|
## 准备与验证
|
|
6
6
|
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
npm ci
|
|
11
11
|
npm run check
|
|
12
12
|
npm pack
|
|
13
|
-
npm publish ./cmdr-mcp-0.
|
|
13
|
+
npm publish ./cmdr-mcp-0.5.0.tgz --dry-run --access public --registry https://registry.npmjs.org/
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
涉及 ZCode 的发布另运行 `npm run verify:zcode`:从实际 tarball 安装到隔离缓存,核对完整性并移走安装源后验证
|
|
16
|
+
涉及 ZCode 的发布另运行 `npm run verify:zcode`:从实际 tarball 安装到隔离缓存,核对完整性并移走安装源后验证 9 个工具;需要本机 ZCode runtime。
|
|
17
17
|
|
|
18
|
-
`npm run check` 包括格式、类型、构建、测试以及临时目录中的 npm 包离线安装验证:检查发布资源、安装后 marketplace 路径、CLI 和
|
|
18
|
+
`npm run check` 包括格式、类型、构建、测试以及临时目录中的 npm 包离线安装验证:检查发布资源、安装后 marketplace 路径、CLI 和 9 个 MCP 工具。`npm pack` 通过 `prepack` 生成 4 个运行入口及第三方许可证声明,输出 `cmdr-mcp-0.5.0.tgz`。源码、测试和开发依赖不进入发布包。
|
|
19
19
|
|
|
20
20
|
检查 `git diff`,确认版本与预期一致,构建未意外修改宿主 manifests。发布前保留经过验证的源码提交;不要手改或提交 `plugins/cmdr/dist/`、`THIRD_PARTY_NOTICES.txt` 和 `.tgz`。
|
|
21
21
|
|
|
@@ -33,19 +33,21 @@ npm view cmdr-mcp name version --registry https://registry.npmjs.org/
|
|
|
33
33
|
|
|
34
34
|
包已经存在,发布前核对账号的包所有权和目标版本是否尚未发布。网络或身份验证错误不能作为版本可用的依据。账号需要启用 2FA,按 CLI 提供的浏览器链接完成发布授权。
|
|
35
35
|
|
|
36
|
+
CLI 输出授权地址后,立即把本次链接发到对话中,让维护者可用手机完成验证;默认不在本机浏览器反复尝试。保留发布进程等待验证。链接失效或返回 404 时,先确认目标版本尚未发布、旧请求已结束,再用同一已验证 tarball 重新发起发布,并立即发送新链接。维护者完成验证后,检查 CLI 结果及 npm 上的版本、完整性和 `latest` 标签,再继续 GitHub Release 与 marketplace 分发。
|
|
37
|
+
|
|
36
38
|
确认发布时,上传已检查的 tarball,并按 npm 提示完成账号验证:
|
|
37
39
|
|
|
38
40
|
```sh
|
|
39
|
-
npm publish ./cmdr-mcp-0.
|
|
41
|
+
npm publish ./cmdr-mcp-0.5.0.tgz --access public --registry https://registry.npmjs.org/
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
此命令会公开发布 `0.
|
|
44
|
+
此命令会公开发布 `0.5.0` 并使用默认的 `latest` 标签。相同包名和版本不能重复发布;后续修改需要提升版本并重新构建验证。发布使用 tarball,以保持上传内容与已检查产物一致。
|
|
43
45
|
|
|
44
46
|
## 发布后核对
|
|
45
47
|
|
|
46
48
|
```sh
|
|
47
|
-
npm view cmdr-mcp@0.
|
|
48
|
-
npm install --global cmdr-mcp@0.
|
|
49
|
+
npm view cmdr-mcp@0.5.0 name version dist.integrity --registry https://registry.npmjs.org/
|
|
50
|
+
npm install --global cmdr-mcp@0.5.0 --registry https://registry.npmjs.org/
|
|
49
51
|
cmdr --help
|
|
50
52
|
```
|
|
51
53
|
|
package/docs/setup.md
CHANGED
|
@@ -6,7 +6,7 @@ Available from cmdr-mcp 0.4.0. Requires macOS/Linux and Node.js >=22.5 (24 recom
|
|
|
6
6
|
npx -y --package=cmdr-mcp@latest cmdr setup --agent claude-code
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Choose `claude-code`, `codex` or `zcode`. Setup installs a persistent runtime, the `cmdr` skill, MCP and user hooks, then checks the
|
|
9
|
+
Choose `claude-code`, `codex` or `zcode`. Setup installs a persistent runtime, the `cmdr` skill, MCP and user hooks, then checks the nine tools in temporary state. Use the printed CLI path (normally `~/.cmdr/bin/cmdr`), open a new host session and complete any trust prompts. Existing hook opt-outs are preserved. Other MCP hosts use `cmdr config --agent <host-id>`.
|
|
10
10
|
|
|
11
11
|
To install only the self-contained skill and its role/setup references:
|
|
12
12
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -16,7 +16,7 @@ cmdr doctor --plugin-root /absolute/path/to/host/cache/cmdr --deep
|
|
|
16
16
|
|
|
17
17
|
The checker lives outside the bundles. If the selected plugin's CLI bundle is missing, its `bin/cmdr doctor` can still report the damage with Node installed. Alternatively use an intact global CLI to inspect that cache. If Node is missing, the shell wrapper reports the Node requirement; install Node >=22.5 and retry. A missing checker requires reinstalling the complete package.
|
|
18
18
|
|
|
19
|
-
`doctor` exits nonzero for fatal installation failures. `--deep` additionally initializes MCP, verifies exactly
|
|
19
|
+
`doctor` exits nonzero for fatal installation failures. `--deep` additionally initializes MCP, verifies exactly nine tools, and calls `list` to check the daemon. It uses a temporary `CMDR_HOME`, an eight-second probe timeout and child cleanup. It does not join a squad or operate on the user's normal queues. Static checks do not start the normal daemon; reporting “daemon not running” is not itself an installation error.
|
|
20
20
|
|
|
21
21
|
The states are distinct:
|
|
22
22
|
|
|
@@ -37,7 +37,7 @@ ZCode has four supported plugin hooks; SessionEnd is replaced by EOF detection.
|
|
|
37
37
|
|
|
38
38
|
## ZCode cache has no `dist/`
|
|
39
39
|
|
|
40
|
-
If `bin/cmdr-mcp` exists but `dist/mcp.mjs` is missing, the launcher exits before MCP initializes, so none of the
|
|
40
|
+
If `bin/cmdr-mcp` exists but `dist/mcp.mjs` is missing, the launcher exits before MCP initializes, so none of the nine tools can register. A working global `cmdr` uses a separate installation and does not repair this cache. Missing `dist/integrity.json` also prevents verification of otherwise present manifests; this alone does not prove those manifests were modified. Hooks fail open and record a rate-limited `bootstrap-runtime` diagnostic when possible, so a quiet hook does not establish a healthy installation.
|
|
41
41
|
|
|
42
42
|
Check the registered marketplace source first. An unbuilt Git checkout contains manifests and launchers but no generated runtime. The missing files alone cannot distinguish an unbuilt source from an incomplete cache copy.
|
|
43
43
|
|
package/marketplace.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cmdr-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local multi-agent squads for Claude Code, Codex, ZCode and any MCP host",
|
|
6
6
|
"engines": {
|
|
@@ -19,10 +19,18 @@
|
|
|
19
19
|
"verify:package": "node scripts/verify-package.mjs"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
+
"@hono/node-server": "^2.1.1",
|
|
22
23
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
24
|
+
"@types/jsdom": "^21.1.7",
|
|
23
25
|
"@types/node": "^24.0.0",
|
|
26
|
+
"@types/react": "^19.3.0",
|
|
27
|
+
"@types/react-dom": "^19.3.0",
|
|
24
28
|
"esbuild": "^0.25.0",
|
|
29
|
+
"hono": "^4.13.7",
|
|
30
|
+
"jsdom": "^26.1.0",
|
|
25
31
|
"prettier": "^3.9.6",
|
|
32
|
+
"react": "^19.3.0",
|
|
33
|
+
"react-dom": "^19.3.0",
|
|
26
34
|
"smol-toml": "^1.8.0",
|
|
27
35
|
"typescript": "^5.9.0",
|
|
28
36
|
"vitest": "^3.2.0",
|
package/plugins/cmdr/README.md
CHANGED
|
@@ -16,4 +16,6 @@ Codex wakes through proxy or queue; Claude Monitor and ZCode background Bash run
|
|
|
16
16
|
|
|
17
17
|
[Installation and usage](https://github.com/njugray/cmdr#readme) · [Host integration](https://github.com/njugray/cmdr/blob/main/docs/agent-integration.md) · [Verification scope](https://github.com/njugray/cmdr/blob/main/docs/implementation.md)
|
|
18
18
|
|
|
19
|
-
The npm package is `cmdr-mcp`. Use `cmdr doctor --plugin-root <actual cache directory> --deep` to verify a cached installation. Static integrity checks run without the target CLI bundle; deep probes use temporary state. `cmdr session` provides all
|
|
19
|
+
The npm package is `cmdr-mcp`. Use `cmdr doctor --plugin-root <actual cache directory> --deep` to verify a cached installation. Static integrity checks run without the target CLI bundle; deep probes use temporary state. `cmdr session` provides all nine member operations with explicit host/native identity when MCP tools are unavailable. See [troubleshooting](https://github.com/njugray/cmdr/blob/main/docs/troubleshooting.md) for cancellation, identity and hook diagnostics.
|
|
20
|
+
|
|
21
|
+
The dashboard also accepts user notes for the selected squad’s commander through the existing inbox. Sending a note does not directly change tasks; see [dashboard operations](../../docs/dashboard.md).
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
@hono/node-server 2.1.1 (MIT)
|
|
2
|
+
MIT License
|
|
3
|
+
|
|
4
|
+
Copyright (c) 2022 - present, Yusuke Wada and Hono contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
========================================================================
|
|
26
|
+
|
|
1
27
|
@modelcontextprotocol/sdk 1.30.0 (MIT)
|
|
2
28
|
MIT License
|
|
3
29
|
|
|
@@ -135,6 +161,32 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
135
161
|
The complete list of contributors can be found at:
|
|
136
162
|
- https://github.com/garycourt/uri-js/graphs/contributors
|
|
137
163
|
|
|
164
|
+
========================================================================
|
|
165
|
+
|
|
166
|
+
hono 4.13.7 (MIT)
|
|
167
|
+
MIT License
|
|
168
|
+
|
|
169
|
+
Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
|
|
170
|
+
|
|
171
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
172
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
173
|
+
in the Software without restriction, including without limitation the rights
|
|
174
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
175
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
176
|
+
furnished to do so, subject to the following conditions:
|
|
177
|
+
|
|
178
|
+
The above copyright notice and this permission notice shall be included in all
|
|
179
|
+
copies or substantial portions of the Software.
|
|
180
|
+
|
|
181
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
182
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
183
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
184
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
185
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
186
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
187
|
+
SOFTWARE.
|
|
188
|
+
|
|
189
|
+
|
|
138
190
|
========================================================================
|
|
139
191
|
|
|
140
192
|
json-schema-traverse 1.0.0 (MIT)
|
|
@@ -161,6 +213,84 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
161
213
|
SOFTWARE.
|
|
162
214
|
|
|
163
215
|
|
|
216
|
+
========================================================================
|
|
217
|
+
|
|
218
|
+
react 19.3.0 (MIT)
|
|
219
|
+
MIT License
|
|
220
|
+
|
|
221
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
222
|
+
|
|
223
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
224
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
225
|
+
in the Software without restriction, including without limitation the rights
|
|
226
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
227
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
228
|
+
furnished to do so, subject to the following conditions:
|
|
229
|
+
|
|
230
|
+
The above copyright notice and this permission notice shall be included in all
|
|
231
|
+
copies or substantial portions of the Software.
|
|
232
|
+
|
|
233
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
234
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
235
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
236
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
237
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
238
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
239
|
+
SOFTWARE.
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
========================================================================
|
|
243
|
+
|
|
244
|
+
react-dom 19.3.0 (MIT)
|
|
245
|
+
MIT License
|
|
246
|
+
|
|
247
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
248
|
+
|
|
249
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
250
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
251
|
+
in the Software without restriction, including without limitation the rights
|
|
252
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
253
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
254
|
+
furnished to do so, subject to the following conditions:
|
|
255
|
+
|
|
256
|
+
The above copyright notice and this permission notice shall be included in all
|
|
257
|
+
copies or substantial portions of the Software.
|
|
258
|
+
|
|
259
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
260
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
261
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
262
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
263
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
264
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
265
|
+
SOFTWARE.
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
========================================================================
|
|
269
|
+
|
|
270
|
+
scheduler 0.28.0 (MIT)
|
|
271
|
+
MIT License
|
|
272
|
+
|
|
273
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
274
|
+
|
|
275
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
276
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
277
|
+
in the Software without restriction, including without limitation the rights
|
|
278
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
279
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
280
|
+
furnished to do so, subject to the following conditions:
|
|
281
|
+
|
|
282
|
+
The above copyright notice and this permission notice shall be included in all
|
|
283
|
+
copies or substantial portions of the Software.
|
|
284
|
+
|
|
285
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
286
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
287
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
288
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
289
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
290
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
291
|
+
SOFTWARE.
|
|
292
|
+
|
|
293
|
+
|
|
164
294
|
========================================================================
|
|
165
295
|
|
|
166
296
|
smol-toml 1.8.0 (BSD-3-Clause)
|
|
@@ -5,3 +5,5 @@ argument-hint: <name>
|
|
|
5
5
|
Call join(squad_name="$ARGUMENTS", standby="auto") for atomic find-or-create. If no name was provided, ask for one; do not invent it. Joining defaults to executor, including a channel without a commander. Add role="commander" if the user explicitly requested command; use takeover=true only for requested handover.
|
|
6
6
|
Follow protocol_hint and the role skill. Executors report ready with cwd and capabilities. Give a brief translated user_reply preserving the join line. For Claude/ZCode, arm listener.arm.command with the indicated native host tool, following the role skill; re-arm on task termination or restart. Check listener health and end the idle turn when can_auto_respond=true. Use at most two recommended waits only when native wake is unavailable; explain the actual limitation.
|
|
7
7
|
If tools are unavailable, follow the cmdr skill's setup reference (or using-cmdr diagnostics for legacy installs) and member CLI fallback. Use the real host session ID, never an invented identity or raw socket workaround.
|
|
8
|
+
|
|
9
|
+
For dashboard work, use task/artifact and the commander role reference for ask(target="user"). Open the built-in page with the current installation’s `cmdr dashboard`; do not generate a replacement dashboard HTML file.
|