cmdr-mcp 0.1.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.
@@ -0,0 +1,71 @@
1
+ # Implementation and verification
2
+
3
+ This is the first source implementation on the repository's previously documentation-only branch. 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.1.0**, internal protocol **1**.
4
+
5
+ ## Delivered behavior
6
+
7
+ - A single on-demand daemon, Unix socket, SQLite WAL persistence, exclusive process lock, spawn coordination, idle exit, retention cleanup, log rotation and version-based replacement.
8
+ - Seven 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.
9
+ - 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
+ - Lifecycle hooks with a flag-file fast path, metadata-only reminders, repeat throttling, actionable Stop interception, compact/resume context and fail-open behavior.
11
+ - Operator status/list/tail/send/read, daemon controls, cleanup, environment diagnostics and printable MCP configuration.
12
+ - Claude, Codex and native ZCode plugin manifests; shared commands, skills and bundled entry points; generic MCP host support without hardcoded host restrictions.
13
+ - CI for macOS/Linux and Node 22/24; bundled dependencies and their license notices are generated by prepack and included in npm packages, never tracked in Git.
14
+
15
+ ## Deliberate clarifications to the design
16
+
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 seven MCP tools without external runtime dependencies. No registry publication is performed by this PR.
18
+
19
+ Tool schemas live in `shared/schemas.ts` separately from protocol/error types, so the CLI and hook do not pull in Zod just to handle RPC errors.
20
+
21
+ `join(squad_name)` is the atomic shortcut. `role` becomes optional only for this form; explicit `join(role, squad, name)` is retained. A single daemon transaction and partial unique index enforce live-name uniqueness. An executor can explicitly take over its own orphaned squad without a temporary departure.
22
+
23
+ The internal `Session.agent` is an open identifier. The bridge allocates one daemon connection per stamped session when a desktop host pools one MCP process. Unstamped hosts must use one process per session or explicitly inject unique native IDs. This replaces the prototype's “ignore a different stamp” limitation.
24
+
25
+ SQLite stores typed JSON payloads plus indexed columns for queues, message sequence, live names and membership constraints. It does not duplicate the draft appendix schema column-for-column. Node 22.5's null-filled result for an unmatched SQLite `get()` is normalized at the store boundary; wrappers and test workers enable experimental SQLite for that runtime.
26
+
27
+ Reports include their status in `message.data.status`. Executor join replies instruct reporting ready instead of claiming that a report has already been sent. Metadata hooks do not include report bodies or user attachments.
28
+
29
+ Cancellation is propagated from MCP through the Unix socket (`rpc.cancel`). Disconnect/cancellation before a waiting read resumes preserves the queued message. The documented “read is delivery” rule still applies: there is no processing acknowledgement or exactly-once guarantee after a result has been returned. History remains available for recovery.
30
+
31
+ `doctor` reports host/runtime availability, bundles, daemon, Codex MCP registration and hook enablement indicators. It does not guess Codex's private trust-file schema or invent a trusted-hook count: the output asks the user to verify the five hook approvals in the host UI.
32
+
33
+ ## Automated verification
34
+
35
+ The checked-in suite has **38 tests** across four files:
36
+
37
+ | Coverage | Evidence |
38
+ | --- | --- |
39
+ | Core | Atomic names, idempotency, role restrictions, arbitrary Agent IDs, ambiguous recipients, priority/peek/history, orphan/takeover/dissolve, inbox transfer, broadcast rollback, rate/size limits, persistence |
40
+ | Hooks/identity | Provisional merge and reply routing, queue/waiter migration, clear rebinding, connection-count presence, reminder throttling, Stop attention rules, context restoration, TTL, cancellation |
41
+ | Utilities | Host detection and namespaces, timeout negotiation, symlink/cwd handling, Codex/Claude titles, socket path fallback, lock recovery and config defaults |
42
+ | 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 |
43
+
44
+ Validation commands:
45
+
46
+ ```sh
47
+ npm run check
48
+ npm exec --yes --package=node@22.5.0 -- node node_modules/vitest/vitest.mjs run
49
+ claude plugin validate plugins/cmdr
50
+ claude plugin validate .
51
+ npm run verify:zcode
52
+ ```
53
+
54
+ Codex plugin structure is also checked with the plugin-creator manifest validator. The local verification environment is macOS with Node 24.16.0 and the minimum supported Node 22.5.0. CI adds Linux and current Node 22 coverage.
55
+
56
+ ## ZCode desktop runtime verification
57
+
58
+ On 2026-09-08, the installed **ZCode 3.11.2 (build 3.11.2.6792)** and its bundled **Agent runtime 0.16.5** passed the reproducible `verify:zcode` check:
59
+
60
+ - Native marketplace/plugin validation: `ok: true`, no diagnostics.
61
+ - Installation into an isolated temporary workspace/runtime registry.
62
+ - Discovered components: `command=1`, `skill=3`, `hook=4`, `mcp=1`.
63
+ - Namespaced server `plugin:cmdr:cmdr`: `status=connected`, `transport=stdio`, `toolCount=7`.
64
+
65
+ The probe uses the actual app-server in desktop surface mode. It neither changes the user's normal plugin registry nor sends model requests. The shared-process session isolation and hook stamp/Stop contracts are exercised separately by automated process tests.
66
+
67
+ ## Remaining manual checks
68
+
69
+ GUI-driven model collaboration across Claude Desktop, Codex Desktop and ZCode Desktop has not been claimed as verified by this PR. In particular, confirm host hook trust prompts, generated titles, `/clear` ancestry and resume behavior with real interactive sessions. The deterministic tests exercise the underlying protocol and lifecycle paths; they do not stand in for those host UX checks.
70
+
71
+ Windows, remote machines, active wakeups and creation of new Agent sessions are outside this Unix-socket v1 scope. Generic compatibility means an open MCP adapter contract, not a claim that every proprietary Agent host has been individually tested.
@@ -0,0 +1,52 @@
1
+ # npm 发布
2
+
3
+ 首次版本为 `cmdr-mcp@0.1.0`。npm 包名是 `cmdr-mcp`,CLI、宿主插件和 marketplace 名称仍为 `cmdr`。安装后的包根目录是 `$(npm root -g)/cmdr-mcp`。
4
+
5
+ ## 准备与验证
6
+
7
+ 在 macOS / Linux、Node.js ≥22.5(推荐 24)环境,从仓库根目录执行:
8
+
9
+ ```sh
10
+ npm ci
11
+ npm run check
12
+ npm pack
13
+ npm publish ./cmdr-mcp-0.1.0.tgz --dry-run --access public --registry https://registry.npmjs.org/
14
+ ```
15
+
16
+ `npm run check` 包括格式、类型、构建、测试以及临时目录中的 npm 包离线安装验证:检查发布资源、安装后 marketplace 路径、CLI 和 7 个 MCP 工具。`npm pack` 通过 `prepack` 生成 4 个运行入口及第三方许可证声明,输出 `cmdr-mcp-0.1.0.tgz`。源码、测试和开发依赖不进入发布包。
17
+
18
+ 检查 `git diff`,确认版本与预期一致,构建未意外修改宿主 manifests。发布前保留经过验证的源码提交;不要手改或提交 `plugins/cmdr/dist/`、`THIRD_PARTY_NOTICES.txt` 和 `.tgz`。
19
+
20
+ `--dry-run` 不发布包,也不能证明账号有发布权限或包名一定可注册。GUI 安装、信任提示和真实模型协作需单独验证,不能用自动化测试替代。
21
+
22
+ ## 首次发布
23
+
24
+ 准备完成后,由发布者登录公共 npm,并确认账号和包名:
25
+
26
+ ```sh
27
+ npm login --registry https://registry.npmjs.org/
28
+ npm whoami --registry https://registry.npmjs.org/
29
+ npm view cmdr-mcp name version --registry https://registry.npmjs.org/
30
+ ```
31
+
32
+ 首次发布前,包名查询应返回 E404;网络或身份验证错误不能作为名称可用的依据。如果包已存在,先核对所有权和版本。名称是否可用最终由 npm 发布校验决定。
33
+
34
+ 确认发布时,上传已检查的 tarball,并按 npm 提示完成账号验证:
35
+
36
+ ```sh
37
+ npm publish ./cmdr-mcp-0.1.0.tgz --access public --registry https://registry.npmjs.org/
38
+ ```
39
+
40
+ 此命令会公开发布 `0.1.0` 并使用默认的 `latest` 标签。相同包名和版本不能重复发布;后续修改需要提升版本并重新构建验证。发布使用 tarball,以保持上传内容与已检查产物一致。
41
+
42
+ ## 发布后核对
43
+
44
+ ```sh
45
+ npm view cmdr-mcp@0.1.0 name version dist.integrity --registry https://registry.npmjs.org/
46
+ npm install --global cmdr-mcp@0.1.0 --registry https://registry.npmjs.org/
47
+ cmdr --help
48
+ ```
49
+
50
+ 按照 [安装说明](README.zh-CN.md#安装) 注册安装后的包根目录。已安装宿主有插件缓存,升级后需要刷新或重装;同版本测试代码变动需要重启对应测试 daemon。
51
+
52
+ npm 命令行为参考:[npm publish 官方文档](https://docs.npmjs.com/cli/v11/commands/npm-publish/)。
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "cmdr",
3
+ "plugins": [
4
+ {
5
+ "name": "cmdr",
6
+ "source": "./plugins/cmdr",
7
+ "version": "0.1.0",
8
+ "description": "Local multi-agent squads with durable messages, roles and lifecycle reminders."
9
+ }
10
+ ],
11
+ "description": "Local multi-agent squads for Claude Code, Codex, ZCode and other MCP hosts."
12
+ }
package/package.json ADDED
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "cmdr-mcp",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "description": "Local multi-agent squads for Claude Code, Codex, ZCode and any MCP host",
6
+ "engines": {
7
+ "node": ">=22.5.0"
8
+ },
9
+ "scripts": {
10
+ "build": "node scripts/build.mjs",
11
+ "typecheck": "tsc --noEmit",
12
+ "test": "vitest run",
13
+ "check": "npm run format:check && npm run typecheck && npm run build && npm test && npm run verify:package",
14
+ "format": "prettier --write src tests scripts package.json tsconfig.json .prettierrc.json vitest.config.ts",
15
+ "format:check": "prettier --check src tests scripts package.json tsconfig.json .prettierrc.json vitest.config.ts",
16
+ "verify:zcode": "node scripts/verify-zcode.mjs",
17
+ "prepack": "npm run build",
18
+ "verify:package": "node scripts/verify-package.mjs"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^24.0.0",
22
+ "esbuild": "^0.25.0",
23
+ "prettier": "^3.9.6",
24
+ "typescript": "^5.9.0",
25
+ "vitest": "^3.2.0",
26
+ "@modelcontextprotocol/sdk": "^1.29.0",
27
+ "zod": "^3.25.0"
28
+ },
29
+ "files": [
30
+ "plugins/cmdr/",
31
+ "plugins/cmdr/dist/*.mjs",
32
+ "plugins/cmdr/THIRD_PARTY_NOTICES.txt",
33
+ ".agents/plugins/marketplace.json",
34
+ ".claude-plugin/marketplace.json",
35
+ "marketplace.json",
36
+ "docs/"
37
+ ],
38
+ "bin": {
39
+ "cmdr": "plugins/cmdr/dist/cli.mjs",
40
+ "cmdr-mcp": "plugins/cmdr/dist/mcp.mjs",
41
+ "cmdr-hook": "plugins/cmdr/dist/hook.mjs",
42
+ "cmdr-daemon": "plugins/cmdr/dist/daemon.mjs"
43
+ },
44
+ "license": "MIT",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/njugray/cmdr.git"
48
+ },
49
+ "homepage": "https://github.com/njugray/cmdr#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/njugray/cmdr/issues"
52
+ },
53
+ "keywords": [
54
+ "mcp",
55
+ "agents",
56
+ "multi-agent",
57
+ "coordination",
58
+ "cli"
59
+ ],
60
+ "os": [
61
+ "darwin",
62
+ "linux"
63
+ ],
64
+ "publishConfig": {
65
+ "access": "public",
66
+ "registry": "https://registry.npmjs.org/"
67
+ }
68
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "cmdr",
3
+ "version": "0.1.0",
4
+ "description": "Local multi-agent squads with durable messages, roles and lifecycle reminders.",
5
+ "author": {
6
+ "name": "njugray"
7
+ },
8
+ "license": "MIT",
9
+ "repository": "https://github.com/njugray/cmdr"
10
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "cmdr",
3
+ "version": "0.1.0",
4
+ "description": "Local multi-agent squads with durable messages, roles and lifecycle reminders.",
5
+ "author": {
6
+ "name": "njugray"
7
+ },
8
+ "license": "MIT",
9
+ "repository": "https://github.com/njugray/cmdr",
10
+ "skills": "./skills/",
11
+ "mcpServers": {
12
+ "cmdr": {
13
+ "command": "./bin/cmdr-mcp",
14
+ "cwd": ".",
15
+ "env": {
16
+ "CMDR_AGENT": "codex",
17
+ "CMDR_TOOL_TIMEOUT_SEC": "600"
18
+ },
19
+ "env_vars": [
20
+ "CODEX_HOME"
21
+ ],
22
+ "tool_timeout_sec": 600
23
+ }
24
+ },
25
+ "interface": {
26
+ "displayName": "cmdr",
27
+ "category": "Developer Tools",
28
+ "shortDescription": "Coordinate local coding-agent sessions.",
29
+ "longDescription": "Connect local coding-agent sessions in squads with persistent messages, explicit roles, and lifecycle reminders.",
30
+ "developerName": "njugray",
31
+ "defaultPrompt": "Create or join a cmdr squad.",
32
+ "capabilities": []
33
+ }
34
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "cmdr": {
4
+ "type": "stdio",
5
+ "command": "${CLAUDE_PLUGIN_ROOT}/bin/cmdr-mcp",
6
+ "env": {
7
+ "CMDR_PLUGIN_ROOT": "${CLAUDE_PLUGIN_ROOT}"
8
+ }
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "cmdr",
3
+ "version": "0.1.0",
4
+ "description": "Local multi-agent squads with durable messages, roles and lifecycle reminders.",
5
+ "author": {
6
+ "name": "njugray"
7
+ },
8
+ "license": "MIT",
9
+ "repository": "https://github.com/njugray/cmdr",
10
+ "skills": "./skills/",
11
+ "commands": "./commands/",
12
+ "mcpServers": {
13
+ "cmdr": {
14
+ "type": "stdio",
15
+ "command": "${ZCODE_PLUGIN_ROOT}/bin/cmdr-mcp",
16
+ "cwd": "${CLAUDE_PROJECT_DIR}",
17
+ "env": {
18
+ "CMDR_AGENT": "zcode",
19
+ "CMDR_TOOL_TIMEOUT_SEC": "600"
20
+ },
21
+ "timeoutMs": 600000
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,15 @@
1
+ # cmdr plugin
2
+
3
+ Connect local Claude Code, Codex, ZCode and other MCP-capable sessions as a squad. Requires macOS/Linux and Node.js ≥22.5 (24 recommended); npm distribution packages include all runtime dependencies. A source checkout requires `npm ci && npm run build` at the repository root before installation; generated `dist` files are not tracked by Git.
4
+
5
+ In each session enter `/cmdr my-project`. The first becomes commander; others join as executors. Without slash commands, ask the Agent to call `join(squad_name="my-project")`.
6
+
7
+ Tools: `join`, `list`, `send`, `report`, `ask`, `read`, `leave`. Executors report ready with capabilities/cwd, then read tasks, report results and ask when blocked. Commanders dispatch verifiable tasks and answer questions with `reply_to`. Use each result's `me.recommended_wait` for long polling; the skills limit standby to 40 rounds.
8
+
9
+ Install a built checkout or the unpacked/installed npm package root as a marketplace in Claude Code/Codex, or use ZCode Settings → Plugins → Create → Add plugin marketplace. Codex needs hooks enabled and five hook approvals; start a new session after installation. ZCode uses its native manifest and four supported hooks; MCP EOF handles offline state. Generic hosts can configure the absolute `bin/cmdr-mcp` executable and `CMDR_AGENT=<host>` with optional `CMDR_SESSION_ID=<unique native session>`.
10
+
11
+ `bin/cmdr config --agent zcode` prints native ZCode configuration; `bin/cmdr config --agent my-agent` prints generic MCP configuration. `bin/cmdr doctor` checks installation health. `bin/cmdr daemon restart` reloads same-version code changes. State lives in `~/.cmdr/` (override `CMDR_HOME`), shared by all sessions.
12
+
13
+ No active wakeups, Agent launching, remote transport or execution of message contents. Read marks delivery; use history if a host loses a previously delivered result. Idle recipients may need the user to say “continue”.
14
+
15
+ [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)
@@ -0,0 +1,207 @@
1
+ @modelcontextprotocol/sdk 1.30.0 (MIT)
2
+ MIT License
3
+
4
+ Copyright (c) 2024 Anthropic, PBC
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
+
27
+ ajv 8.20.0 (MIT)
28
+ The MIT License (MIT)
29
+
30
+ Copyright (c) 2015-2021 Evgeny Poberezkin
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining a copy
33
+ of this software and associated documentation files (the "Software"), to deal
34
+ in the Software without restriction, including without limitation the rights
35
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
36
+ copies of the Software, and to permit persons to whom the Software is
37
+ furnished to do so, subject to the following conditions:
38
+
39
+ The above copyright notice and this permission notice shall be included in all
40
+ copies or substantial portions of the Software.
41
+
42
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
43
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
44
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
46
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
47
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
48
+ SOFTWARE.
49
+
50
+
51
+
52
+ ========================================================================
53
+
54
+ ajv-formats 3.0.1 (MIT)
55
+ MIT License
56
+
57
+ Copyright (c) 2020 Evgeny Poberezkin
58
+
59
+ Permission is hereby granted, free of charge, to any person obtaining a copy
60
+ of this software and associated documentation files (the "Software"), to deal
61
+ in the Software without restriction, including without limitation the rights
62
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
63
+ copies of the Software, and to permit persons to whom the Software is
64
+ furnished to do so, subject to the following conditions:
65
+
66
+ The above copyright notice and this permission notice shall be included in all
67
+ copies or substantial portions of the Software.
68
+
69
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
70
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
71
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
72
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
73
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
74
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
75
+ SOFTWARE.
76
+
77
+
78
+ ========================================================================
79
+
80
+ fast-deep-equal 3.1.3 (MIT)
81
+ MIT License
82
+
83
+ Copyright (c) 2017 Evgeny Poberezkin
84
+
85
+ Permission is hereby granted, free of charge, to any person obtaining a copy
86
+ of this software and associated documentation files (the "Software"), to deal
87
+ in the Software without restriction, including without limitation the rights
88
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
89
+ copies of the Software, and to permit persons to whom the Software is
90
+ furnished to do so, subject to the following conditions:
91
+
92
+ The above copyright notice and this permission notice shall be included in all
93
+ copies or substantial portions of the Software.
94
+
95
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
97
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
98
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
99
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
100
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
101
+ SOFTWARE.
102
+
103
+
104
+ ========================================================================
105
+
106
+ fast-uri 3.1.7 (BSD-3-Clause)
107
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
108
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
109
+ All rights reserved.
110
+
111
+ Redistribution and use in source and binary forms, with or without
112
+ modification, are permitted provided that the following conditions are met:
113
+ * Redistributions of source code must retain the above copyright
114
+ notice, this list of conditions and the following disclaimer.
115
+ * Redistributions in binary form must reproduce the above copyright
116
+ notice, this list of conditions and the following disclaimer in the
117
+ documentation and/or other materials provided with the distribution.
118
+ * The names of any contributors may not be used to endorse or promote
119
+ products derived from this software without specific prior written
120
+ permission.
121
+
122
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
123
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
124
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
125
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
126
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
127
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
128
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
129
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
130
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
131
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
132
+
133
+ * * *
134
+
135
+ The complete list of contributors can be found at:
136
+ - https://github.com/garycourt/uri-js/graphs/contributors
137
+
138
+ ========================================================================
139
+
140
+ json-schema-traverse 1.0.0 (MIT)
141
+ MIT License
142
+
143
+ Copyright (c) 2017 Evgeny Poberezkin
144
+
145
+ Permission is hereby granted, free of charge, to any person obtaining a copy
146
+ of this software and associated documentation files (the "Software"), to deal
147
+ in the Software without restriction, including without limitation the rights
148
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
149
+ copies of the Software, and to permit persons to whom the Software is
150
+ furnished to do so, subject to the following conditions:
151
+
152
+ The above copyright notice and this permission notice shall be included in all
153
+ copies or substantial portions of the Software.
154
+
155
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
156
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
157
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
158
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
159
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
160
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
161
+ SOFTWARE.
162
+
163
+
164
+ ========================================================================
165
+
166
+ zod 3.25.76 (MIT)
167
+ MIT License
168
+
169
+ Copyright (c) 2025 Colin McDonnell
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
+
190
+ ========================================================================
191
+
192
+ zod-to-json-schema 3.25.2 (ISC)
193
+ ISC License
194
+
195
+ Copyright (c) 2020, Stefan Terdell
196
+
197
+ Permission to use, copy, modify, and/or distribute this software for any
198
+ purpose with or without fee is hereby granted, provided that the above
199
+ copyright notice and this permission notice appear in all copies.
200
+
201
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
202
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
203
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
204
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
205
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
206
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
207
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ CMDR_BIN_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
3
+ export CMDR_BIN_DIR
4
+ exec "$CMDR_BIN_DIR/cmdr-node" cli "$@"
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ CMDR_BIN_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
3
+ export CMDR_BIN_DIR
4
+ exec "$CMDR_BIN_DIR/cmdr-node" daemon "$@"
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ CMDR_BIN_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
3
+ export CMDR_BIN_DIR
4
+ exec "$CMDR_BIN_DIR/cmdr-node" hook "$@"
@@ -0,0 +1,4 @@
1
+ #!/bin/sh
2
+ CMDR_BIN_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
3
+ export CMDR_BIN_DIR
4
+ exec "$CMDR_BIN_DIR/cmdr-node" mcp "$@"
@@ -0,0 +1,34 @@
1
+ #!/bin/sh
2
+ # All installed entry points are dependency-free; only Node >=22.5 is needed.
3
+ CMDR_ENTRY=$1
4
+ shift
5
+ CMDR_RUNTIME_HOME=${CMDR_HOME:-"$HOME/.cmdr"}
6
+ CMDR_NODE=''
7
+ if [ -r "$CMDR_RUNTIME_HOME/node-path" ]; then
8
+ IFS= read -r CMDR_NODE < "$CMDR_RUNTIME_HOME/node-path"
9
+ [ -x "$CMDR_NODE" ] || CMDR_NODE=''
10
+ fi
11
+ if [ -z "$CMDR_NODE" ]; then
12
+ CMDR_PATH_NODE=$(command -v node 2>/dev/null || true)
13
+ for CMDR_CANDIDATE in "$CMDR_PATH_NODE" "$HOME"/.local/share/fnm/node-versions/*/installation/bin/node "$HOME"/Library/Application\ Support/fnm/node-versions/*/installation/bin/node "$HOME"/.nvm/versions/node/*/bin/node "$HOME"/.volta/bin/node "$HOME"/.local/share/mise/installs/node/*/bin/node /opt/homebrew/bin/node /usr/local/bin/node /usr/bin/node; do
14
+ [ -x "$CMDR_CANDIDATE" ] || continue
15
+ if "$CMDR_CANDIDATE" -e 'const [a,b]=process.versions.node.split(".").map(Number);process.exit(a>22||(a===22&&b>=5)?0:1)' >/dev/null 2>&1; then
16
+ CMDR_NODE=$CMDR_CANDIDATE
17
+ break
18
+ fi
19
+ done
20
+ if [ -n "$CMDR_NODE" ]; then
21
+ (umask 077; mkdir -p "$CMDR_RUNTIME_HOME" && printf '%s\n' "$CMDR_NODE" > "$CMDR_RUNTIME_HOME/node-path") 2>/dev/null || true
22
+ fi
23
+ fi
24
+ if [ -z "$CMDR_NODE" ]; then
25
+ [ "$CMDR_ENTRY" = hook ] && exit 0
26
+ echo 'cmdr requires Node.js >=22.5 (24 recommended). Install Node and retry.' >&2
27
+ exit 1
28
+ fi
29
+ if [ ! -f "$CMDR_BIN_DIR/../dist/$CMDR_ENTRY.mjs" ]; then
30
+ [ "$CMDR_ENTRY" = hook ] && exit 0
31
+ echo 'cmdr runtime is not built. Run npm ci && npm run build in the repository, or install the built npm package.' >&2
32
+ exit 1
33
+ fi
34
+ exec "$CMDR_NODE" --experimental-sqlite --disable-warning=ExperimentalWarning "$CMDR_BIN_DIR/../dist/$CMDR_ENTRY.mjs" "$@"
@@ -0,0 +1,7 @@
1
+ ---
2
+ description: Create or join a named local agent squad.
3
+ argument-hint: <name>
4
+ ---
5
+ Call the cmdr join tool with squad_name="$ARGUMENTS". This is an atomic find-or-create operation; do not list then create. If no name was provided, ask for one. Do not invent a name.
6
+ If the squad is orphaned, ask whether to take over as commander or join as executor and then use explicit role and squad ID.
7
+ Follow the returned protocol_hint. An executor reports ready with cwd, capabilities and context before replying. Translate user_reply into the user's language, keep the join line unchanged, and reply with only that text. Then use read(wait=me.recommended_wait) to participate.