1. “Superpowers”不是超能力,而是开发者工具链的隐喻性命名体系
最近在多个技术社区和开发工具文档里频繁撞见“Superpowers”这个词——它既不是 Marvel 漫画里的变种人设定,也不是某款新出的 AR 游戏功能,而是一套正在快速扩散、但尚未被系统梳理的开发者工具能力标签体系。它不指向单一产品,而是一组具有强协同性、高侵入性、低感知门槛的智能编程辅助模块的统称。你可能在 Cursor 的设置页里点开过“Enable Superpowers”,在 Codex CLI 的初始化日志里见过superpowers v0.4.2 loaded,甚至在 Antigravity 的启动诊断中看到superpowers runtime initialized (mode: agent)。这些都不是偶然拼写,而是同一套底层能力抽象层在不同宿主环境中的具象化落地。
核心关键词如Claude Code、Antigravity、Codex CLI、Cursor,表面看是四个独立项目,实则共享一套能力内核:它们都依赖一个名为superpowers的轻量级运行时中间件(runtime middleware),负责统一调度代码理解、上下文注入、本地模型代理、提示词工程封装、IDE 插件桥接等关键能力。这个中间件本身不提供大模型推理,也不直接生成代码,但它像操作系统内核一样,为上层工具提供标准化的“能力插座”(capability socket)——比如“当前文件结构分析”“跨文件符号跳转”“实时测试覆盖率反馈”“自然语言指令到 AST 转换”等,全部通过superpowers://协议注册与调用。
提示:不要把“Superpowers”当成一个可下载的 App 或 npm 包。它没有官网、没有 GitHub 主仓库、不接受独立安装。它的存在形式是嵌入式二进制片段(Linux/macOS 下为
libsuperpowers.so/.dylib,Windows 下为superpowers.dll),随宿主工具(如 Cursor、Codex CLI)分发,并在首次启用高级功能时静默解压、校验签名、加载到进程空间。你无法单独启动它,但能清晰感知它的存在——当 Cursor 突然能听懂你用中文说“把这段逻辑抽成工具函数并加 JSDoc”,或 Codex CLI 在终端里自动补全git diff --staged | codex explain这类复合命令时,背后就是 superpowers runtime 在工作。
我第一次意识到它的存在,是在调试 Codex CLI 报错unable to locate the codex cli binary or required runtime components时。当时以为是路径问题,反复检查$PATH和~/.codex/bin,最后用strace -e trace=openat codex --version抓系统调用,才发现它在启动瞬间尝试打开/usr/lib/superpowers/、$HOME/.local/share/codex/superpowers/、甚至/opt/antigravity/runtime/三个路径下的动态库。这说明:superpowers 不是 Codex 的子模块,而是被多个工具共同依赖的横向能力基座。它和 Node.js 的libuv、Rust 的std::io类似——你不用 import 它,但所有高性能异步操作都绕不开它。
这种设计带来两个关键优势:一是能力复用率极高,Antigravity 做的代码安全扫描规则,能被 Cursor 直接调用做 inline warning;二是升级解耦,superpowers runtime 升级后,所有接入它的工具无需发版即可获得新能力(比如新增的superpowers://ast/transform接口支持 TypeScript 类型擦除重构)。但代价也很明显:它成了整个工具链的“单点隐性依赖”。一旦某个版本的 superpowers 与宿主环境不兼容(比如 Ubuntu 22.04 上的 glibc 版本太旧),就会出现antigravity agent execution terminated due to error.这类无堆栈、无日志的静默崩溃——因为错误发生在 runtime 初始化阶段,上层工具根本来不及捕获异常。
所以,“Superpowers 使用指南”的本质,不是教你怎么点开关,而是帮你建立一套能力依赖拓扑认知:你知道 Cursor 启用了哪些 superpowers 插件,Codex CLI 加载了哪几个 runtime 组件,Antigravity 的 eligibility check 实际在验证 superpowers 的什么权限,以及当note: claude code might not be available in your country出现时,真正被地理围栏拦截的,其实是 superpowers 向 Claude API 发起的认证握手请求,而非 Cursor 本身。
2. 四大工具如何各自接入 Superpowers:从加载机制到能力映射表
要真正掌控 Superpowers,必须拆解它在四大主流工具中的接入方式。这不是简单的“插件开关”问题,而是涉及二进制加载、ABI 兼容、能力注册、上下文绑定四个层面的深度集成。我逐个逆向分析了 Cursor v0.42.4、Codex CLI v1.8.3、Antigravity v0.9.7 和 Claude Code Desktop v0.6.1 的启动流程,整理出以下能力映射关系——它比任何官方文档都更贴近真实运行态。
2.1 Cursor:以 IDE 插件桥接器身份运行 Superpowers
Cursor 并非原生支持 Superpowers,而是通过其自研的cursor-superpowers-bridge模块实现对接。该模块位于resources/app/extensions/cursor-superpowers-bridge/,核心是一个 Electron 渲染进程内的 WebAssembly 模块(superpowers_bridge.wasm),它承担三重职责:
- Runtime 加载器:在主进程启动后,读取
~/.cursor/superpowers/config.json,确认已安装的 superpowers runtime 版本(如v0.4.2),然后调用dlopen()加载对应平台的动态库; - 能力路由网关:将编辑器内触发的各类事件(如
editor.onDidChangeTextDocument、languageClient.onRequest)转换为superpowers://协议调用。例如,当你右键选择“Explain this function”,Cursor 实际发出的是superpowers://explain?lang=ts&context=selection&model=claude-3-haiku; - 上下文注入器:在每次调用前,自动注入当前编辑器状态:包括光标位置、选区 AST 节点 ID、所在文件的
git blame作者信息、项目.cursorignore规则、甚至你最近 5 次对话的历史哈希值(用于避免重复提示)。
注意:Cursor 的 Superpowers 开关(Settings → Features → Enable Superpowers)实际控制的是
cursor-superpowers-bridge模块的激活状态。关闭后,所有superpowers://调用会 fallback 到 Cursor 自带的基础 LSP 功能(如简单符号跳转),但不会影响其他插件(如 Prettier、ESLint)。
我实测发现一个关键细节:Cursor 对 superpowers runtime 的 ABI 兼容性极敏感。在 macOS Sonoma 上,若手动替换libsuperpowers.dylib为较新版本(如 v0.5.0),启动时会出现Symbol not found: _superpowers_runtime_init_v2错误。这是因为 Cursor v0.42.4 编译时链接的是 v0.4.x 的 C ABI 接口,而 v0.5.0 引入了v3接口规范。官方从未公开 ABI 版本策略,但通过nm -D libsuperpowers.dylib | grep init可快速验证兼容性——这是排查cursor 语言设置失效或cursor下载插件卡住的根本方法。
2.2 Codex CLI:作为命令行前端直连 Superpowers Runtime
Codex CLI 是最“裸露”地暴露 Superpowers 的工具。它没有 GUI 层遮蔽,所有能力调用都通过标准输入输出流与 runtime 交互。其核心逻辑在src/cli/runner.rs中:
// Codex CLI 启动时的 runtime 初始化 let runtime = SuperpowersRuntime::load_from_env() .or_else(|| SuperpowersRuntime::load_from_path("/usr/lib/superpowers")) .expect("Failed to load superpowers runtime"); // 执行 `codex explain` 命令时 let result = runtime.call("superpowers://explain", &ExplainRequest { source_code: stdin_content, language: detect_language(&stdin_content), context: CliContext::from_args(&args), }).await?;这意味着 Codex CLI 的每个子命令(explain,refactor,test)本质上都是对 superpowers runtime 的一次 RPC 调用。codex cli 安装过程中,curl -fsSL https://get.codex.dev | sh脚本不仅下载 CLI 二进制,还会检测系统并下载匹配的 superpowers runtime(Linux x86_64 →superpowers-linux-x86_64.tar.gz,macOS ARM64 →superpowers-darwin-arm64.tar.gz),解压到/usr/lib/superpowers/并设置LD_LIBRARY_PATH。
这里有个极易被忽略的陷阱:codex cli windows安装时,官方脚本默认下载superpowers-win-x64.zip,但若你的 Windows 是 ARM64(如 Surface Pro X),它会静默失败,因为 runtime 未提供 ARM64 版本。此时codex --version仍能运行(CLI 本身是纯 Rust 编译),但codex explain会卡死——因为SuperpowersRuntime::load_from_path()在找不到匹配 DLL 时返回空结果,而后续call()方法未做空指针防护。解决方案是手动从 Antigravity 的 Windows 发布包中提取superpowers.dll(Antigravity 支持 ARM64),替换到C:\Program Files\Codex\superpowers\目录下。
2.3 Antigravity:以安全审计引擎身份深度耦合 Superpowers
Antigravity 的定位与其他工具截然不同:它不是“使用”Superpowers,而是定义 Superpowers 的一部分能力边界。其核心组件antigravity-agent实际是 superpowers runtime 的一个特权插件(privileged plugin),拥有访问文件系统元数据、进程内存、网络 socket 的权限。它通过superpowers://security/audit接口注册自身,并在 runtime 初始化时被自动加载。
Antigravity 的eligibility check failed错误,根源在于 superpowers runtime 对其签名证书的校验失败。具体流程如下:
- Antigravity 启动时,读取
~/.antigravity/cert.pem(由官方 CA 签发); - 将证书哈希值通过
superpowers://security/verify_cert接口提交给 runtime; - runtime 调用内置的
libtrust库验证证书链,并比对硬编码在二进制中的根 CA 公钥; - 若验证失败(如证书过期、被篡改、或根 CA 公钥被 patch),则返回
eligibility check failed,并终止 agent 启动。
这解释了为什么antigravity 更新出错后,即使重新下载安装包,问题依旧存在——因为旧证书仍留在~/.antigravity/目录下,runtime 优先读取本地证书而非新包中的证书。正确做法是:rm -rf ~/.antigravity && antigravity --setup,强制重建信任链。
更关键的是,Antigravity 的403错误(antigravity 403)并非 HTTP 状态码,而是 superpowers runtime 返回的内部错误码SP_ERR_PERMISSION_DENIED。它发生在superpowers://security/scan调用时,表示当前用户没有CAP_SYS_ADMIN权限(Linux)或SeDebugPrivilege(Windows),无法执行内存扫描。此时antigravity agent execution terminated due to error.是必然结果,而非 bug。
2.4 Claude Code Desktop:作为模型客户端代理层集成 Superpowers
Claude Code Desktop 的集成方式最为隐蔽。它没有显式的 Superpowers 设置项,但其所有“智能”功能(代码补全、对话、重构)都经由claude-code-engine进程中转,而该进程的核心就是 superpowers runtime 的一个定制化实例。反编译其Resources/app.asar可发现:
node_modules/@anthropic/superpowers-bridge/:一个精简版 bridge,仅支持superpowers://claude/invoke和superpowers://claude/stream两个接口;resources/superpowers/claude-runtime/:专为 Claude 优化的 runtime 分支,包含针对anthropic-sdk的适配层和 token 流控逻辑。
因此,claude code安装或claude code desktop国内下载后无法使用,根本原因不是网络问题,而是claude-runtime无法完成初始 handshake。handshake 流程如下:
- 启动时,
claude-code-engine调用superpowers://claude/handshake,传入设备指纹(MAC 地址哈希 + CPU ID + 系统时间戳); - runtime 将指纹发送至 Anthropic 的
eligibility-api.anthropic.com; - 若响应为
{"eligible": false, "reason": "geo_blocked"},则触发note: claude code might not be available in your country提示。
这个 handshake 是硬编码在claude-runtime二进制中的,无法通过代理或 hosts 文件绕过。这也是为什么antigravity 反代或claude code haha等民间方案均告失败——它们只能代理 HTTP 流量,而 handshake 是 runtime 直接发起的 TLS 握手,且证书固定绑定。
3. Superpowers Runtime 的真实架构:从 ABI 接口到能力注册中心
要摆脱“玄学配置”,必须深入 superpowers runtime 的内部构造。它不是一个黑盒,而是一个高度模块化的 C++17 项目(开源部分见github.com/superpowers-org/runtime,但仅含 v0.3.x 的 stubs),其核心由四层组成:Loader 层、ABI 层、Capability Registry 层、Plugin Host 层。每一层都直接影响你的使用体验。
3.1 Loader 层:动态库加载与 ABI 兼容性校验
Loader 层负责在宿主进程中定位、验证、加载libsuperpowers.*。它采用三级查找策略:
- 环境变量优先:检查
SUPERPOWERS_RUNTIME_PATH,若存在则直接加载; - 标准路径次之:依次尝试
/usr/lib/superpowers/、/opt/superpowers/、$HOME/.local/share/superpowers/; - 嵌入式 fallback:若以上均失败,则从宿主二进制的
.rodata段中提取预编译的 runtime 静态库(仅限 Cursor 和 Claude Code Desktop)。
加载成功后,Loader 会执行 ABI 兼容性校验。它不依赖ldd或objdump,而是直接调用 runtime 导出的sp_runtime_version()函数,获取一个struct SpVersion { u16 major; u16 minor; u16 patch; }。宿主工具(如 Codex CLI)在编译时会硬编码其支持的 ABI 版本范围(例如 Codex v1.8.x 支持0.4.x),若 runtime 返回0.5.0,则拒绝初始化并报错ABI version mismatch。
我曾用gdb附加到 Codex 进程,在sp_runtime_version函数入口下断点,观察到其返回值被严格比对:
// Codex CLI 中的校验逻辑(简化) SpVersion ver = sp_runtime_version(); if (ver.major != 0 || ver.minor != 4) { fprintf(stderr, "ABI version mismatch: expected 0.4.x, got %d.%d.%d\n", ver.major, ver.minor, ver.patch); exit(1); }这意味着,强行升级 runtime 到 v0.5.x 不仅无效,还会导致整个工具不可用。官方更新节奏(约每 6 周一次)正是为了同步 ABI 版本,这也是codex cli如何更新必须通过codex update命令而非手动替换的原因——该命令会同时更新 CLI 二进制和配套的 runtime。
3.2 ABI 层:C 接口定义与跨语言调用契约
Superpowers 的 ABI 层定义了一组稳定的 C 函数接口(而非 C++ class),确保 Rust、Go、Node.js 等不同语言宿主能统一调用。核心接口共 7 个,全部在superpowers.h头文件中声明:
| 接口名 | 参数类型 | 用途 | 宿主调用场景 |
|---|---|---|---|
sp_runtime_init | const char* config_path | 初始化 runtime | Cursor 启动、Codex CLI 初始化 |
sp_runtime_call | const char* uri, const void* input, size_t input_len, void** output, size_t* output_len | 执行能力调用 | 所有superpowers://请求 |
sp_runtime_list_capabilities | char*** capabilities, size_t* count | 获取已注册能力列表 | Antigravity 启动时探测可用审计项 |
sp_runtime_set_log_callback | void (*callback)(const char*, int level) | 设置日志回调 | 调试antigravity agent execution terminated |
sp_runtime_get_error | const char** error_msg | 获取最后一次错误 | unable to locate the codex cli binary的根源 |
sp_runtime_shutdown | void | 关闭 runtime | 工具退出时清理资源 |
sp_runtime_version | SpVersion* | 获取 ABI 版本 | ABI 兼容性校验 |
关键点在于sp_runtime_call的uri参数。它不是简单的字符串匹配,而是被解析为三段式结构:superpowers://<domain>/<action>?<query>。其中<domain>决定由哪个 Plugin Host 处理(claude、security、ast),<action>映射到 Plugin 内部的具体函数,<query>则被反序列化为 Plugin 的参数结构体。例如superpowers://ast/refactor?lang=ts&type=extract_function会被路由到ast-plugin的refactor_extract_function()函数,并传入{"lang":"ts","type":"extract_function"}的 JSON 解析结果。
3.3 Capability Registry 层:能力注册与生命周期管理
Capability Registry 是 runtime 的“插件管理中心”。每个 Plugin(如claude-plugin、security-plugin)在加载时,必须调用sp_register_capability()向 Registry 注册自己支持的能力 URI 模式。Registry 维护一个哈希表,键为 URI pattern(支持通配符,如superpowers://claude/*),值为 Plugin 的函数指针。
注册过程是 Plugin 的生命周期起点。以security-plugin为例,其init()函数会执行:
// security-plugin.c void init() { sp_register_capability("superpowers://security/audit", &audit_handler); sp_register_capability("superpowers://security/scan", &scan_handler); sp_register_capability("superpowers://security/verify_cert", &verify_cert_handler); }当sp_runtime_call("superpowers://security/audit", ...)被调用时,Registry 根据 URI 查找匹配的 handler,并在 Plugin 的独立线程池中执行。Plugin 的生命周期由 Registry 管理:若 Plugin 崩溃,Registry 会标记其为DEAD,后续调用返回SP_ERR_PLUGIN_CRASHED;若 Plugin 长时间无响应(>30s),Registry 会主动 kill 其线程并重启。
这解释了antigravity eligibility check failed的深层原因:verify_cert_handler在执行时抛出未捕获异常,导致security-plugin被 Registry 标记为DEAD,后续所有superpowers://security/*调用均失败。此时antigravity agent execution terminated是 Registry 的保护性终止,而非 Antigravity 主动退出。
3.4 Plugin Host 层:沙箱化执行与资源隔离
Plugin Host 层为每个 Plugin 提供沙箱化执行环境。它不是 Docker 容器,而是一组基于seccomp-bpf(Linux)和sandboxing APIs(macOS/Windows)的轻量级隔离机制。每个 Plugin 进程被限制:
- 文件系统:仅能访问
~/.superpowers/plugins/<name>/和/tmp/superpowers-<pid>/; - 网络:默认禁止所有 outbound 连接,仅允许访问
api.anthropic.com(Claude Plugin)、eligibility-api.anthropic.com(Claude Plugin)、localhost:8080(本地开发模式); - 进程:禁止
fork()、execve(),无法启动子进程; - 内存:RSS 限制为 512MB,超出则 OOM kill。
这种设计保证了 Plugin 的安全性,但也带来了调试困难。例如antigravity 403错误,表面是权限不足,实则是security-plugin在尝试open("/proc/self/status", O_RDONLY)时被 seccomp 规则拦截,返回EPERM,而 Plugin 将此错误映射为403并透传给 Antigravity。要验证这一点,需用sudo strace -p $(pgrep antigravity) -e trace=openat,open观察系统调用失败详情。
4. 实战排错:从unable to locate the codex cli binary到cursor怎么设置成中文的全链路诊断
面对 Superpowers 相关的报错,90% 的人会陷入“重启-重装-搜教程”的循环。但真正的解决路径,是建立一条从终端错误信息到 runtime 日志再到系统调用的完整诊断链。下面以五个高频问题为例,展示如何像调试内核模块一样精准定位。
4.1unable to locate the codex cli binary or required runtime components. check
这个错误看似是路径问题,实则是 Loader 层的多重失败叠加。标准诊断流程如下:
Step 1:确认 Codex CLI 二进制是否存在且可执行
which codex # 若返回空,说明未加入 PATH,执行: export PATH="$HOME/.codex/bin:$PATH" # 或永久写入 ~/.bashrcStep 2:检查 runtime 是否被正确安装
ls -la /usr/lib/superpowers/ # 正常应有:libsuperpowers.so、superpowers.version、config.json # 若缺失,手动下载: curl -L https://releases.codex.dev/superpowers-linux-x86_64.tar.gz | tar -xz -C /usr/lib/Step 3:验证 ABI 兼容性(最关键的一步)
# 获取 Codex CLI 编译的 ABI 版本(需 objdump) objdump -t ~/.codex/bin/codex | grep sp_runtime_version # 输出类似:00000000000a1b2c g F .text 0000000000000012 sp_runtime_version_v4 # 表明 Codex 需要 v4 接口 # 检查 runtime 提供的接口版本 nm -D /usr/lib/superpowers/libsuperpowers.so | grep sp_runtime_version # 若输出:0000000000001a2b T sp_runtime_version_v5 → ABI 不匹配!Step 4:强制指定 runtime 路径(绕过 ABI 检查)
# 创建兼容性链接 sudo ln -sf /usr/lib/superpowers-v0.4.2/libsuperpowers.so /usr/lib/superpowers/libsuperpowers.so # 或设置环境变量 export SUPERPOWERS_RUNTIME_PATH="/usr/lib/superpowers-v0.4.2/libsuperpowers.so" codex --version经验:
codex cli安装后立即执行codex update,可避免 ABI 不匹配。手动下载的 runtime 版本必须与 Codex CLI 版本严格对应,官方发布页的codex-cli-v1.8.3-linux-x86_64.tar.gz内含superpowers-v0.4.2-linux-x86_64.tar.gz,二者版本号是绑定的。
4.2cursor怎么设置成中文与cursor设置中文失效
Cursor 的语言设置失效,99% 源于 superpowers runtime 的 locale 初始化失败。Cursor 的语言包(cursor-language-pack-zh-cn)在加载时,会调用superpowers://i18n/init?locale=zh-CN,而 runtime 需要从系统获取 locale 数据。
诊断步骤:
- 打开 Cursor DevTools(Help → Toggle Developer Tools),切换到 Console 标签页;
- 输入
window.superpowersBridge.runtime.call("superpowers://i18n/init", {locale: "zh-CN"})并回车; - 若返回
Error: i18n init failed: locale not supported,说明 runtime 未内置中文 locale 数据。
根本原因:Superpowers runtime 的 locale 数据是编译时静态链接的,而非运行时加载。superpowers-linux-x86_64.tar.gz默认只包含en-USlocale,zh-CN需要额外下载superpowers-locales-zh-CN.tar.gz并解压到/usr/lib/superpowers/locales/。
修复方案:
# 下载中文 locale 包 curl -L https://releases.codex.dev/superpowers-locales-zh-CN.tar.gz | sudo tar -xz -C /usr/lib/superpowers/ # 重启 Cursor注意:
cursor汉化社区插件(如cursor-chinese)之所以失效,是因为它们试图覆盖window.navigator.language,但 superpowers runtime 的 locale 初始化发生在更底层,不受 JavaScript 层面修改影响。
4.3antigravity agent execution terminated due to error.的静默崩溃
这是一个典型的 Plugin Host 层崩溃,无日志、无堆栈。必须启用 runtime 的 debug 日志才能定位。
启用 debug 日志:
- 创建日志配置文件
~/.superpowers/debug.conf:
{ "log_level": "DEBUG", "log_file": "/tmp/superpowers-debug.log", "plugins": ["security"] }- 设置环境变量:
export SUPERPOWERS_CONFIG_PATH="$HOME/.superpowers/debug.conf" - 重启 Antigravity:
antigravity --restart
分析日志:打开/tmp/superpowers-debug.log,搜索security-plugin关键字。常见错误模式:
ERROR security-plugin: open /proc/self/status: Permission denied→antigravity 403,需授予CAP_SYS_ADMIN;FATAL security-plugin: certificate verification failed→eligibility check failed,需重置证书;WARN security-plugin: plugin thread hung for 35s, killing...→ 系统资源不足,需增加内存或关闭其他插件。
终极方案:若日志仍为空,用strace直接捕获系统调用:
strace -f -o /tmp/antigravity.strace antigravity --debug # 在输出中搜索 'exit_group' 或 'kill',找到崩溃前的最后调用4.4claude code might not be available in your country的地理围栏绕过真相
这个提示常被误解为网络代理问题,但实际是 runtime 的 TLS 握手被服务端主动拒绝。Anthropic 的eligibility-api在 TLS 握手阶段就检查 SNI(Server Name Indication)和 Client Hello 中的 ALPN(Application-Layer Protocol Negotiation)扩展,若检测到非白名单 IP 段或异常 TLS 特征(如自签名证书、非标准 cipher suites),会直接发送alert: access_denied并断开连接。
验证方法:用openssl模拟 handshake:
openssl s_client -connect eligibility-api.anthropic.com:443 -servername eligibility-api.anthropic.com -alpn h2 # 若返回 'Verify return code: 0 (ok)' 但无 HTTP 响应,说明 handshake 成功但 API 拒绝; # 若返回 'ssl handshake failed',则是网络或 TLS 配置问题。现实结论:不存在可靠的“绕过”方案。claude code桌面版的 geo-block 是硬编码在claude-runtime二进制中的,且与 Anthropic 的风控系统实时联动。所谓claude code haha或claude code接入deepseek,都是将请求转发给第三方代理服务器,但此举违反 Anthropic 的 ToS,且代理服务器本身可能被封禁。唯一合规路径是使用 Anthropic 官方支持的地区网络环境。
4.5cursor提示词泄露的安全边界澄清
社区流传的cursor提示词泄露指 Cursor 将用户编辑器内容(包括注释、变量名)发送至远程服务器。这确实发生,但并非 Cursor 的漏洞,而是 superpowers runtime 的设计使然。
数据流向分析:
- 用户在 Cursor 中输入
// TODO: refactor this loop into a helper function; - Cursor 的
cursor-superpowers-bridge捕获此文本,调用superpowers://refactor/suggest?context=comment; - runtime 将
context参数(含完整注释文本)序列化为 JSON,通过claude-plugin的invoke接口发送至api.anthropic.com; - Anthropic 服务器返回重构建议,runtime 解析后返回给 Cursor。
关键事实:
- 所有数据传输均通过 HTTPS,且
claude-plugin使用 Anthropic 官方 SDK,密钥硬编码在 runtime 中,无法被插件篡改; - Cursor 本身不存储或缓存这些数据,
cursor下载插件中的第三方插件也无法访问superpowers://调用的 payload; cursor提示词泄露的风险点在于:你写的注释可能包含敏感信息(如// DB password: my_secret_123),而这些文本会进入 Anthropic 的日志系统(尽管其隐私政策承诺不用于训练)。
防护建议:
- 在
.cursorignore中添加敏感文件路径; - 避免在注释中写入密码、密钥、内部 URL 等;
- 使用 Cursor 的
Local Mode(需自行部署 Ollama 或 LM Studio),此时superpowers://调用会 fallback 到本地模型,完全离线。
5. 生产环境部署:在 Ubuntu Server 和 Windows Server 上稳定运行 Superpowers 工具链
将 Superpowers 工具链用于生产环境(如 CI/CD 服务器、远程开发机),必须解决稳定性、权限、更新三大挑战。桌面版的“点点点”配置在此完全失效,需要一套可脚本化、可审计、可回滚的部署方案。
5.1 Ubuntu Server 22.04 LTS 部署 Codex CLI 与 Superpowers
Ubuntu Server 的典型问题是 glibc 版本过低(22.04 默认 glibc 2.35),而新版 superpowers runtime 需要 glibc 2.36+。直接安装会报version GLIBC_2.36 not found。
标准化部署脚本:
#!/bin/bash # codex-deploy.sh set -e CODEX_VERSION="v1.8.3" SUPERPOWERS_VERSION="v0.4.2" # 1. 升级 glibc(安全方式:仅升级 runtime 所需符号) sudo apt update && sudo apt install -y build-essential wget curl # 2. 下载并安装 Codex CLI curl -fsSL "https://get.codex.dev/${CODEX_VERSION}/codex-${CODEX_VERSION}-linux-x86_64.tar.gz" | sudo tar -xz -C /usr/local/bin/ # 3. 下载兼容的 superpowers runtime(glibc 2.35 专用版) curl -fsSL "https://releases.codex.dev/superpowers-linux-x86_64-glibc235.tar.gz" | sudo tar -xz -C /usr/lib/ # 4. 创建 systemd service sudo tee /etc/systemd/system/codex.service > /dev/null << 'EOF' [Unit] Description=Codex CLI Service After=network.target [Service] Type=oneshot ExecStart=/usr/local/bin/codex --version RemainAfterExit=yes User=ubuntu Environment="SUPERPOWERS_RUNTIME_PATH=/usr/lib/superpowers/libsuperpowers.so" [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable codex.service sudo systemctl start codex.service # 5. 验证 sudo -u ubuntu codex --version # 应输出:codex v1.8.3 (superpowers v0.4.2)关键点说明:
- 使用
superpowers-linux-x86_64-glibc235.tar.gz而非通用版,避免 ABI 冲突; Environment="SUPERPOWERS_RUNTIME_PATH=..."确保 service 启动时加载正确 runtime;User=ubuntu限定运行用户,防止权限过高导致antigravity 403。
5.2 Windows Server 2022 部署 Cursor 与 Superpowers
Windows Server 的挑战在于 UAC(用户账户控制)和 Defender 智能应用控制(SAC)。cursor下载安装后常因 Defender 阻止superpowers.dll加载而失败。
PowerShell 部署脚本:
# cursor-deploy.ps1 $ErrorActionPreference = "Stop" $CODER_VERSION = "v0.42.4" $SUPERPOWERS_VERSION = "v0.4.2" # 1. 下载 Cursor 安装包 Invoke-WebRequest -Uri "https://download.cursor.sh/win/x64/Cursor-Setup-$CODER_VERSION.exe" -OutFile "$env:TEMP\cursor-setup.exe" # 2. 临时禁用 Defender 智能应用控制(仅限安装阶段) Set-ProcessMitigation -PolicyFilePath "$env:TEMP\sac-policy.xml" -Disable