@yhong91/cpac 0.1.11 → 0.1.12

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/README.md CHANGED
@@ -93,18 +93,18 @@ cpac --help
93
93
 
94
94
  ### 统一管理(detect / install / uninstall / upgrade)
95
95
 
96
- 参考 vibetime 的目标式命令,对 `codex`、`claude`、`pi`、`kimi` 四个目标统一管理:
96
+ 参考 vibetime 的目标式命令,对 `codex`、`pi`、`kimi` 三个持久注入目标统一管理(claude/opencode 是临时接管,用 `cpac claude` / `cpac opencode` 启动,不属于 install 目标):
97
97
 
98
98
  ```bash
99
99
  cpac detect [--json] [--home PATH]
100
- cpac install [--target codex,claude,pi,kimi] [--all] [--dry-run] [--force] [--v2_off] [--v2_models] [--home PATH]
101
- cpac uninstall [--target codex,claude,pi,kimi] [--all] [--dry-run] [--home PATH]
100
+ cpac install [--target codex,pi,kimi] [--all] [--dry-run] [--force] [--v2_off] [--v2_models] [--home PATH]
101
+ cpac uninstall [--target codex,pi,kimi] [--all] [--dry-run] [--home PATH]
102
102
  cpac upgrade [--check]
103
103
  cpac version
104
104
  ```
105
105
 
106
106
  - `detect` 列出每个目标是否被检测到、是否已接入 CPAC;`--json` 输出机器可读结果。
107
- - `install` 默认作用于检测到的目标;`--target` 指定目标、`--all` 全部。各目标映射到既有逻辑:`codex` → `cpac inject`,`pi` → `cpac pi install`,`kimi` → `cpac kimi install`;`claude` 无持久化安装(用 `cpac claude` 启动)。`--dry-run` 只打印将要做的事,`--force` 允许重装已安装目标。
107
+ - `install` 默认作用于检测到的目标;`--target` 指定目标、`--all` 全部。各目标映射到既有逻辑:`codex` → `cpac inject`,`pi` → `cpac pi install`,`kimi` → `cpac kimi install`。`--dry-run` 只打印将要做的事,`--force` 允许重装已安装目标。
108
108
  - Codex 注入默认开启 multi-agent v2(写入 `[features.multi_agent_v2] enabled = true`);`install --target codex --v2_off` 写入 `enabled = false`。服务端还需在 CPA 配置中开启 `codex.optimize-multi-agent-v2`。
109
109
  - `--v2_models` 进入 arrow-key 复选框选择最多 5 个 spawn_agent 模型(勾选顺序即推荐顺序),选择结果存入配置文件的 `spawn_models`,注入时把这些模型排到 `codex-models.json` 最前——Codex 客户端只把 catalog 前 5 个可见模型广告为 spawn 覆盖项。
110
110
  - `uninstall` 默认作用于已安装目标,映射到 `cpac restore` / `cpac pi uninstall` / `cpac kimi uninstall`。
package/dist/cpac.js CHANGED
@@ -1835,20 +1835,6 @@ const TARGETS = [
1835
1835
  await restore(config);
1836
1836
  },
1837
1837
  },
1838
- {
1839
- id: "claude",
1840
- home: () => expandUserPath(process.env.CLAUDE_CONFIG_DIR?.trim() || join(homedir(), ".claude")),
1841
- detected: () => binaryOnPath("claude") || existsSync(join(homedir(), ".claude")),
1842
- installed: () => false,
1843
- install: async (_config, dryRun) => {
1844
- const message = "claude needs no install; launch it through CPA with: cpac claude";
1845
- console.log(dryRun ? `would do nothing: ${message}` : message);
1846
- },
1847
- uninstall: async (_config, dryRun) => {
1848
- const message = "claude keeps no persistent CPAC state; nothing to remove";
1849
- console.log(dryRun ? `would do nothing: ${message}` : message);
1850
- },
1851
- },
1852
1838
  {
1853
1839
  id: "pi",
1854
1840
  home: () => piExtensionsDir(),
@@ -2002,10 +1988,13 @@ function usage() {
2002
1988
  " cpac pi <install|uninstall|status> [--config PATH]",
2003
1989
  " cpac kimi <install|uninstall|status> [--config PATH]",
2004
1990
  " cpac detect [--json] [--home PATH]",
2005
- " cpac install [--target codex,claude,pi,kimi] [--all] [--dry-run] [--force] [--v2_off] [--v2_models] [--home PATH]",
2006
- " cpac uninstall [--target codex,claude,pi,kimi] [--all] [--dry-run] [--home PATH]",
1991
+ " cpac install [--target codex,pi,kimi] [--all] [--dry-run] [--force] [--v2_off] [--v2_models] [--home PATH]",
1992
+ " cpac uninstall [--target codex,pi,kimi] [--all] [--dry-run] [--home PATH]",
2007
1993
  " cpac upgrade [--check]",
2008
1994
  " cpac version",
1995
+ "",
1996
+ "install/uninstall manage persistent injections only; claude and opencode are",
1997
+ "ephemeral — launch them with `cpac claude` / `cpac opencode` instead.",
2009
1998
  ].join("\n");
2010
1999
  }
2011
2000
  function parseArgs(args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yhong91/cpac",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Connect Codex and Claude Code to a remote CLIProxyAPI gateway",
5
5
  "type": "module",
6
6
  "bin": {