@anthonyhan/token-pilot 0.4.12 → 0.5.1

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,367 @@
1
+ // 宿主配方表
2
+ //
3
+ // 这里只描述“怎么识别 + 支持什么”,不执行安装。新增一个 Agent/CLI 时,
4
+ // 优先加一条配方,不要把宿主差异散落在 UI 和 CLI 里。
5
+ export const HOST_RECIPES = [
6
+ {
7
+ id: 'claude-code',
8
+ name: 'Claude Code',
9
+ kind: 'cli',
10
+ commands: ['claude'],
11
+ paths: ['.claude'],
12
+ rtkAgent: 'claude',
13
+ bili: { mode: 'plugin', client: 'claude', detail: '原生插件 + 会话代理' },
14
+ support: 'auto',
15
+ risk: 'low',
16
+ detail: 'RTK 输出压缩 + bili 会话压缩,适合长代码会话',
17
+ requiresRestart: true,
18
+ configPaths: ['.claude/settings.json', '.claude/RTK.md', '.claude/CLAUDE.md'],
19
+ defaultSelected: true,
20
+ },
21
+ {
22
+ id: 'codex',
23
+ name: 'Codex',
24
+ kind: 'cli',
25
+ commands: ['codex'],
26
+ paths: ['.codex'],
27
+ rtkAgent: 'codex',
28
+ bili: { mode: 'launcher', client: 'codex', detail: '完整压缩需用 bili codex 启动;MCP 插件本身只暴露工具' },
29
+ support: 'auto',
30
+ risk: 'medium',
31
+ detail: 'RTK 可一键接入;bili 完整压缩需要启动器,避免写坏 ChatGPT 登录链路',
32
+ requiresRestart: true,
33
+ configPaths: ['.codex/config.toml', '.codex/AGENTS.md', '.codex/RTK.md', '.codex/hooks.json'],
34
+ defaultSelected: true,
35
+ },
36
+ {
37
+ id: 'opencode',
38
+ name: 'OpenCode',
39
+ kind: 'cli',
40
+ commands: ['opencode'],
41
+ paths: ['.config/opencode', '.local/share/opencode'],
42
+ macApps: ['OpenCode.app'],
43
+ rtkAgent: 'opencode',
44
+ bili: { mode: 'plugin', client: 'opencode', detail: '原生插件,自拉起代理' },
45
+ support: 'auto',
46
+ risk: 'low',
47
+ detail: 'RTK + bili 原生插件,适合高频工具调用',
48
+ requiresRestart: true,
49
+ configPaths: ['.config/opencode/opencode.json', '.config/opencode/plugins/rtk.ts'],
50
+ defaultSelected: true,
51
+ },
52
+ {
53
+ id: 'pi',
54
+ name: 'pi',
55
+ kind: 'cli',
56
+ commands: ['pi'],
57
+ paths: ['.pi'],
58
+ rtkAgent: 'pi',
59
+ bili: { mode: 'plugin', client: 'pi', detail: '原生插件,自拉起代理' },
60
+ support: 'auto',
61
+ risk: 'low',
62
+ detail: 'RTK + bili 原生插件',
63
+ requiresRestart: true,
64
+ configPaths: ['.pi/agent/models.json', '.pi/settings.json'],
65
+ defaultSelected: true,
66
+ },
67
+ {
68
+ id: 'omp',
69
+ name: 'omp',
70
+ kind: 'cli',
71
+ commands: ['omp'],
72
+ paths: ['.omp'],
73
+ rtkAgent: 'omp',
74
+ bili: { mode: 'plugin', client: 'omp', detail: '原生插件,自拉起代理' },
75
+ support: 'auto',
76
+ risk: 'low',
77
+ detail: 'RTK + bili 原生插件',
78
+ requiresRestart: true,
79
+ configPaths: ['.omp/agent/config.yml', '.omp/agent/models.yml'],
80
+ defaultSelected: true,
81
+ },
82
+ {
83
+ id: 'kimi-code',
84
+ name: 'Kimi Code',
85
+ kind: 'cli',
86
+ commands: ['kimi'],
87
+ paths: ['.kimi-code'],
88
+ rtkAgent: 'kimi',
89
+ bili: { mode: 'plugin', client: 'kimi', detail: 'Kimi Code ≥ 2.0 原生插件' },
90
+ support: 'auto',
91
+ risk: 'low',
92
+ detail: 'RTK + bili 原生插件',
93
+ requiresRestart: true,
94
+ configPaths: ['.kimi-code/config.toml'],
95
+ defaultSelected: true,
96
+ },
97
+ {
98
+ id: 'hermes',
99
+ name: 'Hermes',
100
+ kind: 'cli',
101
+ commands: ['hermes'],
102
+ paths: ['.hermes'],
103
+ rtkAgent: 'hermes',
104
+ bili: { mode: 'plugin', client: 'hermes', detail: 'Python 原生插件' },
105
+ support: 'auto',
106
+ risk: 'low',
107
+ detail: 'RTK + bili 原生插件',
108
+ requiresRestart: true,
109
+ configPaths: ['.hermes/config.yaml', '.hermes/settings.json', '.hermes/plugins'],
110
+ defaultSelected: true,
111
+ },
112
+ {
113
+ id: 'dsh',
114
+ name: 'DeepSeek Harness',
115
+ kind: 'cli',
116
+ commands: ['dsh'],
117
+ paths: ['.dsh'],
118
+ bili: { mode: 'plugin', client: 'dsh', detail: '原生插件;bili 会关闭宿主自动压缩' },
119
+ support: 'auto',
120
+ risk: 'medium',
121
+ detail: 'bili 原生插件;不要同时启用宿主自动压缩',
122
+ requiresRestart: true,
123
+ configPaths: ['.dsh/cordis.patch.yml', '.dsh/profiles'],
124
+ defaultSelected: true,
125
+ },
126
+ {
127
+ id: 'zcode',
128
+ name: 'ZCode',
129
+ kind: 'cli',
130
+ commands: ['zcode'],
131
+ paths: ['.zcode'],
132
+ bili: { mode: 'plugin', client: 'zcode', detail: '原生插件 / GUI 证书 MITM' },
133
+ support: 'auto',
134
+ risk: 'medium',
135
+ detail: '优先原生插件,桌面 GUI 走应用级代理',
136
+ requiresRestart: true,
137
+ configPaths: ['.zcode/cli/config.json', '.zcode/v2/config.json'],
138
+ defaultSelected: true,
139
+ },
140
+ {
141
+ id: 'gemini-cli',
142
+ name: 'Gemini CLI',
143
+ kind: 'cli',
144
+ commands: ['gemini'],
145
+ paths: ['.gemini'],
146
+ rtkAgent: 'gemini',
147
+ bili: { mode: 'launcher', client: 'gemini', detail: 'bili gemini 启动器' },
148
+ support: 'auto',
149
+ risk: 'medium',
150
+ detail: 'RTK 一键;bili 需要启动器',
151
+ requiresRestart: true,
152
+ configPaths: ['.gemini/settings.json'],
153
+ defaultSelected: true,
154
+ },
155
+ {
156
+ id: 'qwen-code',
157
+ name: 'Qwen Code',
158
+ kind: 'cli',
159
+ commands: ['qwen'],
160
+ paths: ['.qwen'],
161
+ bili: { mode: 'launcher', client: 'qwen', detail: 'bili qwen 启动器' },
162
+ support: 'assisted',
163
+ risk: 'medium',
164
+ detail: 'bili 启动器;需要应用级代理/证书',
165
+ requiresRestart: true,
166
+ configPaths: ['.qwen/settings.json'],
167
+ defaultSelected: false,
168
+ },
169
+ {
170
+ id: 'aider',
171
+ name: 'Aider',
172
+ kind: 'cli',
173
+ commands: ['aider'],
174
+ paths: ['.aider.conf.yml'],
175
+ bili: { mode: 'launcher', client: 'aider', detail: 'bili aider 启动器' },
176
+ support: 'assisted',
177
+ risk: 'medium',
178
+ detail: 'bili 启动器;无原生插件接缝',
179
+ requiresRestart: true,
180
+ configPaths: ['.aider.conf.yml'],
181
+ defaultSelected: false,
182
+ },
183
+ {
184
+ id: 'copilot-cli',
185
+ name: 'GitHub Copilot CLI',
186
+ kind: 'cli',
187
+ commands: ['copilot'],
188
+ paths: ['.copilot'],
189
+ rtkAgent: 'copilot',
190
+ bili: { mode: 'launcher', client: 'copilot', detail: 'bili copilot 启动器' },
191
+ support: 'auto',
192
+ risk: 'medium',
193
+ detail: 'RTK 一键;bili 需要启动器',
194
+ requiresRestart: true,
195
+ configPaths: ['.copilot/config.json'],
196
+ defaultSelected: true,
197
+ },
198
+ {
199
+ id: 'cursor',
200
+ name: 'Cursor',
201
+ kind: 'ide',
202
+ commands: ['cursor'],
203
+ paths: ['.cursor'],
204
+ macApps: ['Cursor.app'],
205
+ rtkAgent: 'cursor',
206
+ bili: { mode: 'assisted', client: 'cursor', detail: '仅 BYOK/自定义 provider;订阅流量不能保证' },
207
+ support: 'auto',
208
+ risk: 'medium',
209
+ detail: 'RTK 一键接入;bili 只对可改 baseURL 的通道生效',
210
+ requiresRestart: true,
211
+ configPaths: ['.cursor/hooks.json'],
212
+ defaultSelected: true,
213
+ },
214
+ {
215
+ id: 'trae',
216
+ name: 'Trae',
217
+ kind: 'ide',
218
+ commands: ['trae'],
219
+ paths: ['.trae'],
220
+ macApps: ['Trae.app'],
221
+ rtkAgent: 'trae',
222
+ bili: { mode: 'assisted', client: 'trae', detail: '需要证书 MITM' },
223
+ support: 'auto',
224
+ risk: 'medium',
225
+ detail: 'RTK 一键;bili 需要应用级代理/CA',
226
+ requiresRestart: true,
227
+ configPaths: ['.trae/settings.json'],
228
+ defaultSelected: true,
229
+ },
230
+ {
231
+ id: 'windsurf',
232
+ name: 'Windsurf',
233
+ kind: 'ide',
234
+ paths: ['.windsurf'],
235
+ macApps: ['Windsurf.app'],
236
+ rtkAgent: 'windsurf',
237
+ bili: { mode: 'assisted', client: 'windsurf', detail: 'CONNECT-only 客户端,需白名单 + CA' },
238
+ support: 'auto',
239
+ risk: 'medium',
240
+ detail: 'RTK 一键;bili 仅能做应用级代理实验',
241
+ requiresRestart: true,
242
+ configPaths: ['.windsurf/settings.json'],
243
+ defaultSelected: true,
244
+ },
245
+ {
246
+ id: 'cline',
247
+ name: 'Cline / Roo Code',
248
+ kind: 'ide',
249
+ paths: ['.cline', '.roo'],
250
+ rtkAgent: 'cline',
251
+ bili: { mode: 'assisted', client: 'cline', detail: '自定义 provider / baseURL' },
252
+ support: 'auto',
253
+ risk: 'medium',
254
+ detail: 'RTK 一键;bili 只对 BYOK 通道生效',
255
+ requiresRestart: true,
256
+ configPaths: ['.cline/settings.json'],
257
+ defaultSelected: true,
258
+ },
259
+ {
260
+ id: 'kilocode',
261
+ name: 'Kilo Code',
262
+ kind: 'ide',
263
+ paths: ['.kilocode', '.kilo'],
264
+ rtkAgent: 'kilocode',
265
+ bili: { mode: 'assisted', client: 'kilocode', detail: '自定义 provider / baseURL' },
266
+ support: 'auto',
267
+ risk: 'medium',
268
+ detail: 'RTK 一键;bili 只对 BYOK 通道生效',
269
+ requiresRestart: true,
270
+ configPaths: ['.kilocode/settings.json'],
271
+ defaultSelected: true,
272
+ },
273
+ {
274
+ id: 'antigravity',
275
+ name: 'Antigravity',
276
+ kind: 'ide',
277
+ paths: ['.antigravity'],
278
+ macApps: ['Antigravity.app'],
279
+ rtkAgent: 'antigravity',
280
+ bili: { mode: 'launcher', client: 'antigravity', detail: 'bili antigravity 启动器' },
281
+ support: 'auto',
282
+ risk: 'medium',
283
+ detail: 'RTK 一键;bili 需要启动器',
284
+ requiresRestart: true,
285
+ configPaths: ['.antigravity/settings.json'],
286
+ defaultSelected: true,
287
+ },
288
+ {
289
+ id: 'codebuddy',
290
+ name: 'CodeBuddy',
291
+ kind: 'ide',
292
+ paths: ['.codebuddy'],
293
+ macApps: ['CodeBuddy.app'],
294
+ bili: { mode: 'assisted', client: 'codebuddy', detail: 'IDE 的 http.proxy + CA,已验证但需 GUI/权限' },
295
+ support: 'assisted',
296
+ risk: 'high',
297
+ detail: 'bili 需要应用级代理;当前只做引导,不写系统代理',
298
+ requiresRestart: true,
299
+ defaultSelected: false,
300
+ },
301
+ {
302
+ id: 'qoder',
303
+ name: 'Qoder',
304
+ kind: 'desktop',
305
+ paths: ['.qoder'],
306
+ macApps: ['Qoder.app'],
307
+ bili: { mode: 'assisted', client: 'qoder', detail: 'Desktop 仅 BYOK 自定义 provider;官方订阅流量不在范围' },
308
+ support: 'assisted',
309
+ risk: 'high',
310
+ detail: '桌面端只支持自定义 provider;订阅流量不可保证',
311
+ requiresRestart: true,
312
+ defaultSelected: false,
313
+ },
314
+ {
315
+ id: 'zed',
316
+ name: 'Zed',
317
+ kind: 'ide',
318
+ paths: ['.config/zed'],
319
+ macApps: ['Zed.app'],
320
+ bili: { mode: 'launcher', client: 'zed', detail: 'bili zed 启动器 / 自定义 provider' },
321
+ support: 'assisted',
322
+ risk: 'medium',
323
+ detail: 'bili 需要启动器或自定义 provider',
324
+ requiresRestart: true,
325
+ configPaths: ['.config/zed/settings.json'],
326
+ defaultSelected: false,
327
+ },
328
+ {
329
+ id: 'claude-desktop',
330
+ name: 'Claude Desktop',
331
+ kind: 'desktop',
332
+ paths: ['Library/Application Support/Claude'],
333
+ macApps: ['Claude.app'],
334
+ bili: { mode: 'none', detail: '官方已知限制:Code 标签页覆盖 ANTHROPIC_BASE_URL' },
335
+ support: 'unsupported',
336
+ risk: 'high',
337
+ detail: '当前没有稳定的模型流量接入缝;不假装成功',
338
+ requiresRestart: true,
339
+ defaultSelected: false,
340
+ },
341
+ {
342
+ id: 'chatgpt-desktop',
343
+ name: 'ChatGPT Desktop',
344
+ kind: 'desktop',
345
+ macApps: ['ChatGPT.app'],
346
+ bili: { mode: 'none', detail: '订阅桌面端没有可自动接管的 baseURL/代理接缝' },
347
+ support: 'unsupported',
348
+ risk: 'high',
349
+ detail: '不进入默认计划;保留检测和原因说明',
350
+ requiresRestart: true,
351
+ defaultSelected: false,
352
+ },
353
+ {
354
+ id: 'kimi-desktop',
355
+ name: 'Kimi Desktop',
356
+ kind: 'desktop',
357
+ paths: ['Library/Application Support/Kimi'],
358
+ macApps: ['Kimi.app'],
359
+ bili: { mode: 'none', detail: '订阅桌面端没有可稳定接管的 baseURL/代理接缝' },
360
+ support: 'unsupported',
361
+ risk: 'high',
362
+ detail: '桌面订阅端无法保证自动接管;保留检测与原因说明',
363
+ requiresRestart: true,
364
+ defaultSelected: false,
365
+ },
366
+ ];
367
+ export const RECIPE_BY_ID = new Map(HOST_RECIPES.map((r) => [r.id, r]));