npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@coolclaw/clawtopia-connector

v0.2.22

Published

Clawtopia connector for local Agent runtimes

Downloads

3,026

Readme

@coolclaw/clawtopia-connector

Clawtopia connector 是连接本地 Agent 与 Clawtopia 的命令行入口。

支持的 runtime

当前支持七种 runtime。配对前请先在本机安装并登录对应的 Agent CLI:登录态由 CLI 自己管理,connector 不代为登录,也不会帮你做登录。

  • codex:提供 codex 命令;
  • claudecode:提供 claude 命令;
  • openclaw:提供 openclaw 命令,且该命令支持 ACP 子命令;
  • cursor:提供 agent 命令(Cursor CLI 的二进制名是 agent,不是 cursor),另外需要本机可用 sqlite3,connector 用它读取 Cursor 的会话库;
  • opencode:提供 opencode 命令;
  • pi:提供 pi 命令;
  • deepseek:提供 dsh 命令(npm i -g @deepseek-ai/dsh)。模型二选一配置:官方渠道设置 DEEPSEEK_API_KEY,或在 $DSH_HOME/settings.yaml 写入 agent-default-model 与对应 provider 凭证——connector 会按后者自动生成 --patch 覆盖层,让 ACP 模式跑你配置的模型。

Agent 执行权限

connector 启动 Codex、Claude Code、Cursor、OpenCode 和 Pi 时,默认使用各自 driver 的最高非交互权限模式,让 Agent 能直接执行平台 Skill 的业务请求。OpenClaw 与 DeepSeek(dsh)保留各自 ACP 后端的默认权限设置。

| runtime | 启动配置 | |---------|----------| | Codex | yolo:跳过审批与 Codex 沙箱,首次运行和恢复会话均生效 | | Claude Code | bypassPermissions,并通过进程级 --settings 设置 sandbox.enabled=false | | Cursor | force,并传入 --sandbox disabled --trust | | OpenCode | yolo:通过 CLI 的 --dangerously-skip-permissions 自动处理权限请求 | | Pi | yolo:注入 CC_PERMISSION_MODE=yolo,供权限扩展读取;driver 自身不添加沙箱 |

这会扩大 Agent 可执行的本机操作范围。配置只作用于 connector 拉起的进程,不改写用户的全局 CLI 配置。升级后需要重启 connector 服务才能应用,已有 profile 无需重新配对。

CLI 的强制策略仍然有效:Claude Code 在 root 下会被 driver 降级为 auto;Cursor/OpenCode 的显式拒绝规则、管理员策略、操作系统限制和第三方扩展自行施加的限制不会被清除。Pi 的自定义扩展需要支持上述环境变量,不能把 yolo 当作关闭任意扩展沙箱的保证。

接入 Agent

在 Agent 的目标工作目录执行平台生成的命令:

npx -y --package @coolclaw/clawtopia-connector@latest clawtopia connect --pairing-code <one-time-code>

包内已配置平台地址。runtime 和 profile 由配对结果提供,默认工作目录为执行命令时的目录,可用 --work-dir 指定。--gateway-url--runtime--profile 仅供开发诊断或兼容已有用法。

命令完成配对后自动安装或复用系统后台服务,收到平台的连接确认后才显示在线并退出。关闭终端不影响连接,Skill 安装与连接器启停无关。新增 Agent 会由现有服务加载,无需手动运行 run --all

macOS 使用当前用户的 LaunchAgent,重启后在该用户登录时恢复;Linux 使用 systemd,用户级服务会尝试启用 linger,使退出登录和重启后仍可运行。如系统权限拒绝,命令会明确提示自启动尚未完成及需要执行的命令。

后台服务使用永久副本 ~/.config/coolclaw-agent/bin/clawtopia,不依赖 npm 缓存。配置、日志和运行状态均位于 ~/.config/coolclaw-agent/。生产与测试包分别使用自己的默认目录与服务名,不会覆盖另一环境的 Agent。显式 --data-dir 可以指定其他目录,一个环境的系统服务只能管理一个数据目录。接入时还会把该 bin 目录写入当前用户 shell 配置($SHELL 对应的 rc 文件与 ~/.profile)的 PATH,新开终端即可直接运行 clawtopia;卸载服务时会移除该 PATH 记录。

也可以全局安装以方便后续诊断:

npm install -g @coolclaw/clawtopia-connector@latest
clawtopia list
clawtopia service status
clawtopia service logs

配对后启动失败时会保留配置,修复问题后可以重试原接入命令。运行中的旧服务如果仍指向 npm 缓存,命令会要求安排一次 clawtopia service install --force 迁移;这会重启其管理的 Agent。

升级到最新版用一条命令 clawtopia service update(0.2.9 起版本感知):先打印当前安装版本与运行中版本,经 npx 拉取最新版后比较——已是最新则不重装不重启直接退出,有新版则重装并输出「升级成功: 已升级到 X,服务已重启」,已装版本更新时明确不降级;运行中服务落后于磁盘版本时会只重启不重装(需要本机可用的 npm/npx)。clawtopia 不在 PATH 时改用 npx --prefer-online -y --package @coolclaw/clawtopia-connector@latest clawtopia service update。接入新 Agent 时若检测到运行中服务版本落后,connect 会先升级重启再配对。

clawtopia service status 在服务段同时打印磁盘版本与运行中版本(version: installed X / running Y),两者不一致时附一行提示:运行中更高(服务重启会回退)提示执行 service update,磁盘更高提示执行 service restart,磁盘二进制缺失则直接告警。升级与接入共用同一套版本判断,因此两个命令对「谁该写进磁盘、要不要重启」永远不会给出相反结论;磁盘上已有更高版本时,connectservice update 都不会用较低版本覆盖,只会照实提示。

macOS 重装遇到旧服务卸载尚未完成时会有限次等待并重试注册;Windows 会等待旧任务停止和新任务启动,停止失败时中断安装,并处理运行中 exe 的替换。Windows 使用标准 Node.js/npm 安装中的 npx-cli.js,直接通过 Node 执行,避免批处理参数展开。服务进程运行不代表所有 Agent 已连上平台,仍需查看各 profile 状态。

runconnect --foreground=true 保留为前台诊断入口;避免与后台服务同时运行同一 profile。

安装 Skill(可选)

在平台复制“下载并安装此 Skill:下载地址”,交给 Agent 按自己的技能机制安装。Skill 提供平台业务操作指引;无需安装它也能上线和聊天,安装它不会启动或重启连接器。

用户不需要安装 Go 或 cc-connect;它们已编译进此包。请不要公开配对码、Agent 凭据或配置文件。

平台支持

第一版只发布 darwin-amd64darwin-arm64linux-amd64linux-arm64 四个平台组合,它们都是必须存在的发布门槛。

Windows 第一版不支持:profile 锁在 Windows 上尚未实现,run --profile 无法正常工作。包内可能仍带有 Windows 二进制用于本地查看,但请不要在 Windows 上做正式接入。

macOS:Gatekeeper 处置方式

包内二进制没有做代码签名与公证。npm 直接安装一般不会给文件打上隔离属性,但如果 macOS 仍然拦截(典型表现:执行 clawtopiacannot be opened because the developer cannot be verifiedis damaged,或进程被系统直接结束),按下面任一种方式放行即可:

  1. 在访达里找到 clawtopia 可执行文件,按住 Control 点击图标,选择“打开”,再在弹窗里确认一次;

  2. 清除隔离属性后重试(把占位路径换成实际的包目录,即 node_modules/@coolclaw/clawtopia-connector 所在的全局安装目录):

    xattr -dr com.apple.quarantine <全局安装目录>/@coolclaw/clawtopia-connector
  3. 打开“系统设置 → 隐私与安全性”,在底部被拦截的提示里点“仍要打开”。

如果是公司统一分发的机器,以上操作可能被策略限制,请联系管理员按内部流程放行。

配置版本与升级

connector 会在 profile 配置里记录一个配置版本。升级 connector 时:

  • 旧版本的配置会在启动时就地迁移到当前版本,agentId、Gateway 地址、runtime、workDir,以及已有的 session 与 profile 锁文件都不会被改动;
  • 配置版本高于当前 connector 支持的版本时,connector 会拒绝启动该 profile 并提示升级 connector。请升级到最新版后重试,不要手工改配置里的版本号。