Skip to content

ccnm v0.8.0

Choose a tag to compare

@github-actions github-actions released this 20 Sep 12:17
· 214 commits to main since this release

模型在远端能做的事,从七个工具变成十一个。 新增 load_skill(读项目
自带的 skills)、view_image(看 workspace 里的图片)、read_notebook
(Jupyter notebook 按 cell 读)、stop_command(停掉后台命令)。另外
search_text 加了三种输出模式、跨行匹配和文件类型过滤,apply_patch 加了
整文件覆盖 write 和 edit_notebook,exec_command 加了一行 shell 和
后台运行 run_in_background,read_output 加了 wait_ms。

两处行为收紧,升级前请看。

一、有副作用的三个工具(exec_command、apply_patch、stop_command,
连同 files[] 里的嵌套结构)现在拒绝它们没声明的字段,超上限的
timeout_ms 和 preview_bytes 也是拒,不再悄悄钳到上限。以前这些都被
静默忽略——一个编出来的 sandbox: false 照样把命令跑了。只读的七个工具
不受影响,照常回答,只在结果末尾写一行忽略了什么。tools/list 里每个
工具的 additionalProperties 现在和服务端真实解析一致。

二、会话结束时如果有命令停不掉(离开了进程组又攥着管道,信号够不着),
写入互斥不再被标成可用。以前这种情况会放锁,下一个 coding 会话就和那个
还在跑的东西并排写同一棵树。现在 marker 留成 held 加一行 abandoned,
点名还剩哪个 output_ref,ccnm status 也分得清「故意留着的」和「异常
退出留下的」。

每条命令可以套一层 OS 沙箱(opt-in,workspace 写 exec_sandbox = "codex")。用的是 Codex 0.154.0 发给自己命令的那份权限对象,一字不改。
实测 warm cache 的 cargo build/test 编译耗时无差别,每条命令多约 40 ms
(macOS)/ 14 ms(Linux);挡住工作区外写、HOME 写、.git 写和网络。

四个时钟写进协议第 6 节:单次等待、命令运行期限、会话、输出保留。
取消一次带 wait_ms 的 read_output 只停等待、命令照跑;断线后同名会话
重连,旧 output_ref 报 CCNM_E_INVALID_ARGS。

握手失败的诊断不再被盖住。 以前 Runtime 在握手时的拒绝一律报成
CCNM_E_RUNTIME_UNREACHABLE(退出码 21),真正的错误码只在 stderr:
后面。

真机验证:macOS 双机上,真实 Claude Code 2.1.272 用上了 read_notebook、
view_image、load_skill 和 exec_command 的 shell,参数校验的收紧
没有咬到它。run_in_background 没有拿到真实模型用它的证据;Linux
Runtime 上这批新工具一次都没跑过。
范围见 docs/support-matrix.md。

协议号没变(ccnm.workspace-mcp/1,open 4、external 5)。但工具表变了,
而 Claude 的 settings 放行清单和 Codex 的 enabled_tools 都按它生成,所以
两台机器必须装同一个版本。升级前先停会话,见 docs/operations.md
「升级前先把会话停掉」。


Two downloads, for the two halves of ccnm.

  • macos-universal — arm64 + x86_64. This is the one an Agent Node
    needs, and it also works as a Runtime.
  • linux-x86_64 — the Runtime half only (internal mcp-serve and the
    seven tools). The Agent half is a launchd LaunchAgent and does not run on
    Linux. Needs glibc >= 2.39; Debian 13 has 2.41.

Both machines need the same ccnm version.

Take the one for that machine -- a glob here would match both:

tar -xzf ccnm-<version>-<platform>.tar.gz
mv ccnm ~/.local/bin/ccnm.new && mv ~/.local/bin/ccnm.new ~/.local/bin/ccnm

Two things that bite:

  • Never cp over a ccnm that has already run. On Apple Silicon the next
    exec of it dies with SIGKILL (exit 137) while the running one carries on
    with the old code. Rename over it, as above.
  • Downloaded through a browser it arrives quarantined and macOS refuses to
    run it: xattr -d com.apple.quarantine ccnm. curl does not set that.

Setup, the doctor table and troubleshooting: README.md

Full Changelog: v0.7.0...v0.8.0