@xship/cli 0.0.0-stage → 0.0.36
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/LICENSE +25 -0
- package/README.md +68 -2
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/client-config.snapshot.json +377 -0
- package/codex-base-instructions.md +277 -0
- package/dist/brand.json +45 -0
- package/dist/cli.js +2 -0
- package/dist/client-config.snapshot.json +377 -0
- package/dist/commands/auth.js +1 -0
- package/dist/commands/base.js +1 -0
- package/dist/commands/bench.js +1 -0
- package/dist/commands/codex-sessions.js +1 -0
- package/dist/commands/completion.js +1 -0
- package/dist/commands/config.js +1 -0
- package/dist/commands/doctor.js +1 -0
- package/dist/commands/index.js +1 -0
- package/dist/commands/lang.js +1 -0
- package/dist/commands/logs.js +1 -0
- package/dist/commands/refresh.js +1 -0
- package/dist/commands/sessions.js +1 -0
- package/dist/commands/setup.js +1 -0
- package/dist/commands/status.js +1 -0
- package/dist/commands/update.js +1 -0
- package/dist/commands/upgrade.js +1 -0
- package/dist/index.js +1 -0
- package/dist/lib/api-validator.js +1 -0
- package/dist/lib/auto-update.js +1 -0
- package/dist/lib/brand.js +1 -0
- package/dist/lib/claude-code-manager.js +1 -0
- package/dist/lib/cli-help.js +1 -0
- package/dist/lib/client-config-sync.js +1 -0
- package/dist/lib/client-config.js +1 -0
- package/dist/lib/codex-sessions.js +1 -0
- package/dist/lib/command-docs.js +1 -0
- package/dist/lib/command.js +1 -0
- package/dist/lib/config.js +1 -0
- package/dist/lib/confirm.js +1 -0
- package/dist/lib/dry-run.js +1 -0
- package/dist/lib/env-cleanup.js +1 -0
- package/dist/lib/errors.js +1 -0
- package/dist/lib/gateway-addresses.js +1 -0
- package/dist/lib/gateway-models.js +1 -0
- package/dist/lib/gateway-protocol.js +1 -0
- package/dist/lib/i18n.js +1 -0
- package/dist/lib/key-balance.js +1 -0
- package/dist/lib/model-catalog.js +1 -0
- package/dist/lib/model-refresh.js +1 -0
- package/dist/lib/model-registry.js +1 -0
- package/dist/lib/opencode-manager.js +1 -0
- package/dist/lib/persistent-env.js +1 -0
- package/dist/lib/post-apply.js +1 -0
- package/dist/lib/program.js +1 -0
- package/dist/lib/runtime-options.js +1 -0
- package/dist/lib/secret-store.js +1 -0
- package/dist/lib/sessions/formats.js +1 -0
- package/dist/lib/sessions/index.js +1 -0
- package/dist/lib/settings-template.js +1 -0
- package/dist/lib/stream-check.js +1 -0
- package/dist/lib/telemetry.js +1 -0
- package/dist/lib/tool-manager.js +1 -0
- package/dist/lib/tool-upgrade.js +1 -0
- package/dist/lib/tools/antigravity.js +1 -0
- package/dist/lib/tools/atomcode.js +1 -0
- package/dist/lib/tools/backup.js +1 -0
- package/dist/lib/tools/claude-code.js +1 -0
- package/dist/lib/tools/claude-desktop-cli.js +1 -0
- package/dist/lib/tools/claude-desktop.js +1 -0
- package/dist/lib/tools/claude-managed.js +1 -0
- package/dist/lib/tools/claude-native-mirror.js +1 -0
- package/dist/lib/tools/claude-plugins.js +1 -0
- package/dist/lib/tools/codex-catalog.js +1 -0
- package/dist/lib/tools/codex.js +1 -0
- package/dist/lib/tools/desktop-process.js +1 -0
- package/dist/lib/tools/elevated-reg.js +1 -0
- package/dist/lib/tools/grok.js +1 -0
- package/dist/lib/tools/hermes.js +1 -0
- package/dist/lib/tools/openclaw.js +1 -0
- package/dist/lib/tools/opencode.js +1 -0
- package/dist/lib/tools/registry.js +1 -0
- package/dist/lib/tools/tool-installs.js +1 -0
- package/dist/lib/tools/types.js +1 -0
- package/dist/lib/windows-env.js +1 -0
- package/dist/lib/wizard.js +1 -0
- package/dist/lib/write-plan.js +1 -0
- package/dist/locales/en_US.json +1051 -0
- package/dist/locales/zh_CN.json +1051 -0
- package/dist/models.json +301 -0
- package/dist/settings-template.json +18 -0
- package/dist/utils/logger.js +1 -0
- package/dist/utils/string-width.js +1 -0
- package/models.json +301 -0
- package/package.json +48 -4
- package/settings-template.json +18 -0
package/dist/models.json
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultModels": {
|
|
3
|
+
"haiku": "claude-haiku-4-5-20251001",
|
|
4
|
+
"sonnet": "claude-sonnet-5[1m]",
|
|
5
|
+
"opus": "claude-opus-5-5[1m]",
|
|
6
|
+
"reasoning": "claude-opus-5-5[1m]"
|
|
7
|
+
},
|
|
8
|
+
"retiredDefaultModels": {
|
|
9
|
+
"opus": ["claude-opus-4-6", "claude-opus-4-8[1m]"],
|
|
10
|
+
"sonnet": ["claude-sonnet-4-6"],
|
|
11
|
+
"reasoning": ["claude-opus-4-6", "claude-opus-4-8[1m]"]
|
|
12
|
+
},
|
|
13
|
+
"defaultToolModel": "gpt-5.5",
|
|
14
|
+
"toolDefaults": {
|
|
15
|
+
"claude-code": "",
|
|
16
|
+
"opencode": "gpt-5.5",
|
|
17
|
+
"codex": "gpt-6-astra",
|
|
18
|
+
"openclaw": "gpt-5.5",
|
|
19
|
+
"hermes": "gpt-5.5",
|
|
20
|
+
"atomcode": "gpt-5.5",
|
|
21
|
+
"grok": "grok-4.6"
|
|
22
|
+
},
|
|
23
|
+
"presets": [
|
|
24
|
+
{
|
|
25
|
+
"name": "GPT-5.5",
|
|
26
|
+
"model": "gpt-5.5"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "GLM-5.3",
|
|
30
|
+
"model": "glm-5.3"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "MiniMax-M3",
|
|
34
|
+
"model": "MiniMax-M3"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Kimi-K3",
|
|
38
|
+
"model": "kimi-k3"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "Qwen3.8-Max",
|
|
42
|
+
"model": "qwen3.8-max"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "DeepSeek-V4-Pro",
|
|
46
|
+
"model": "deepseek-v4-pro"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"claudeCode": {
|
|
50
|
+
"tierChains": {
|
|
51
|
+
"opus": ["claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6"],
|
|
52
|
+
"sonnet": ["claude-sonnet-5", "claude-sonnet-4-6"],
|
|
53
|
+
"haiku": ["claude-haiku-4-5-20251001"],
|
|
54
|
+
"fable": ["claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8"]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"claudeDesktop": {
|
|
58
|
+
"oneMillionFallback": [
|
|
59
|
+
"claude-opus-4-8",
|
|
60
|
+
"claude-opus-4-7",
|
|
61
|
+
"claude-opus-4-6",
|
|
62
|
+
"claude-opus-5",
|
|
63
|
+
"claude-opus-5-5",
|
|
64
|
+
"claude-sonnet-5",
|
|
65
|
+
"claude-sonnet-5-5",
|
|
66
|
+
"claude-haiku-5-5",
|
|
67
|
+
"claude-fable-5",
|
|
68
|
+
"claude-fable-5-1"
|
|
69
|
+
],
|
|
70
|
+
"oneMillionExclusions": [
|
|
71
|
+
{
|
|
72
|
+
"whenPrefixPresent": "claude-fable-",
|
|
73
|
+
"models": ["claude-opus-4-6"]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"gatewayModels": {
|
|
78
|
+
"autoCompactRatio": 0.8,
|
|
79
|
+
"retired": ["deepseek-v4-flash", "deepseek-v4.1-flash", "glm-5.2", "qwen3.7-max", "qwen3.7-plus"],
|
|
80
|
+
"models": [
|
|
81
|
+
{
|
|
82
|
+
"id": "claude-opus-5-5",
|
|
83
|
+
"name": "Claude Opus 5.5",
|
|
84
|
+
"description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
|
|
85
|
+
"contextWindow": 1000000
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "claude-sonnet-5-5",
|
|
89
|
+
"name": "Claude Sonnet 5.5",
|
|
90
|
+
"description": "100 万上下文 | Agent 编程 | 速度与成本均衡",
|
|
91
|
+
"contextWindow": 1000000
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "claude-fable-5-1",
|
|
95
|
+
"name": "Claude Fable 5.1",
|
|
96
|
+
"description": "100 万上下文 | 长时 Agent 与多步研究",
|
|
97
|
+
"contextWindow": 1000000
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "claude-fable-5",
|
|
101
|
+
"name": "Claude Fable 5",
|
|
102
|
+
"description": "100 万上下文 | 高强度推理 | 长时 Agent",
|
|
103
|
+
"contextWindow": 1000000
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "claude-opus-5",
|
|
107
|
+
"name": "Claude Opus 5",
|
|
108
|
+
"description": "100 万上下文 | Agent 编程",
|
|
109
|
+
"contextWindow": 1000000
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "claude-sonnet-5",
|
|
113
|
+
"name": "Claude Sonnet 5",
|
|
114
|
+
"description": "100 万上下文 | Agent 编程 | 工具调用",
|
|
115
|
+
"contextWindow": 1000000
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "claude-opus-4-8",
|
|
119
|
+
"name": "Claude Opus 4.8",
|
|
120
|
+
"description": "100 万上下文 | 推理 | 编程",
|
|
121
|
+
"contextWindow": 1000000
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "claude-opus-4-7",
|
|
125
|
+
"name": "Claude Opus 4.7",
|
|
126
|
+
"description": "100 万上下文 | 推理 | 编程",
|
|
127
|
+
"contextWindow": 1000000
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "claude-opus-4-6",
|
|
131
|
+
"name": "Claude Opus 4.6",
|
|
132
|
+
"description": "20 万上下文(部分分组无 1M)| 推理 | 编程",
|
|
133
|
+
"contextWindow": 200000
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "claude-sonnet-4-6",
|
|
137
|
+
"name": "Claude Sonnet 4.6",
|
|
138
|
+
"description": "20 万上下文(部分分组无 1M)| Agent 编程",
|
|
139
|
+
"contextWindow": 200000
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "gpt-6-astra",
|
|
143
|
+
"name": "GPT-6 Astra",
|
|
144
|
+
"description": "105 万上下文 | 编码 / 计算机操作",
|
|
145
|
+
"contextWindow": 1050000,
|
|
146
|
+
"codex": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "gpt-6.1-sol",
|
|
150
|
+
"name": "GPT-6.1 Sol",
|
|
151
|
+
"description": "105 万上下文 | 工具调用 | 结构化输出",
|
|
152
|
+
"contextWindow": 1050000,
|
|
153
|
+
"codex": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "gpt-6-sol",
|
|
157
|
+
"name": "GPT-6 Sol",
|
|
158
|
+
"description": "105 万上下文 | 复杂编程与 Agent 工作流",
|
|
159
|
+
"contextWindow": 1050000,
|
|
160
|
+
"codex": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "gpt-6-luna",
|
|
164
|
+
"name": "GPT-6 Luna",
|
|
165
|
+
"contextWindow": 1050000,
|
|
166
|
+
"claudeCode": false,
|
|
167
|
+
"codex": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "gpt-5.6-sol",
|
|
171
|
+
"name": "GPT-5.6 Sol",
|
|
172
|
+
"description": "105 万上下文 | 前沿档",
|
|
173
|
+
"contextWindow": 1050000,
|
|
174
|
+
"codex": false,
|
|
175
|
+
"claudeCode": false
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "gpt-5.6-terra",
|
|
179
|
+
"name": "GPT-5.6 Terra",
|
|
180
|
+
"description": "105 万上下文 | 均衡生产档",
|
|
181
|
+
"contextWindow": 1050000,
|
|
182
|
+
"codex": false,
|
|
183
|
+
"claudeCode": false
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "gpt-5.6-luna",
|
|
187
|
+
"name": "GPT-5.6 Luna",
|
|
188
|
+
"description": "105 万上下文 | 大批量低成本档",
|
|
189
|
+
"contextWindow": 1050000,
|
|
190
|
+
"codex": false,
|
|
191
|
+
"claudeCode": false
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "gemini-4-argon",
|
|
195
|
+
"name": "Gemini 4 Argon",
|
|
196
|
+
"description": "105 万上下文 | 旗舰推理 | 编码与 Agent",
|
|
197
|
+
"contextWindow": 1048576
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "gemini-3.8-flash",
|
|
201
|
+
"name": "Gemini 3.8 Flash",
|
|
202
|
+
"description": "105 万上下文 | 推理与编码",
|
|
203
|
+
"contextWindow": 1048576
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "gemini-3.1-pro",
|
|
207
|
+
"name": "Gemini 3.1 Pro",
|
|
208
|
+
"description": "100 万上下文 | 深度推理 | 长文档",
|
|
209
|
+
"contextWindow": 1000000
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "gemini-3.7-flash",
|
|
213
|
+
"name": "Gemini 3.7 Flash",
|
|
214
|
+
"description": "100 万上下文 | Agent | 软件工程",
|
|
215
|
+
"contextWindow": 1000000,
|
|
216
|
+
"codex": false,
|
|
217
|
+
"claudeCode": false
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "deepseek-v4-pro",
|
|
221
|
+
"name": "DeepSeek V4 Pro",
|
|
222
|
+
"description": "100 万上下文 | 跨文件重构",
|
|
223
|
+
"contextWindow": 1000000
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "deepseek-v4.1-flash-1017",
|
|
227
|
+
"name": "DeepSeek V4.1 Flash 1017",
|
|
228
|
+
"description": "100 万上下文 | 高速档",
|
|
229
|
+
"contextWindow": 1000000
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "glm-5.3",
|
|
233
|
+
"name": "GLM 5.3",
|
|
234
|
+
"description": "105 万上下文 | 代码 Agent",
|
|
235
|
+
"contextWindow": 1048576
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"id": "glm-5.3-flash",
|
|
239
|
+
"name": "GLM 5.3 Flash",
|
|
240
|
+
"description": "105 万上下文 | 高速档",
|
|
241
|
+
"contextWindow": 1048576
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "kimi-k3",
|
|
245
|
+
"name": "Kimi K3",
|
|
246
|
+
"description": "105 万上下文 | 前端编码",
|
|
247
|
+
"contextWindow": 1048576
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "qwen3.8-max",
|
|
251
|
+
"name": "Qwen 3.8 Max",
|
|
252
|
+
"description": "100 万上下文 | 视觉理解",
|
|
253
|
+
"contextWindow": 1000000
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "qwen3.8-flash",
|
|
257
|
+
"name": "Qwen 3.8 Flash",
|
|
258
|
+
"description": "100 万上下文 | 高速档",
|
|
259
|
+
"contextWindow": 1000000
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"id": "MiniMax-M3",
|
|
263
|
+
"name": "MiniMax M3",
|
|
264
|
+
"description": "100 万上下文 | Agent 工作流",
|
|
265
|
+
"contextWindow": 1000000
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"id": "grok-4.7",
|
|
269
|
+
"name": "Grok 4.7",
|
|
270
|
+
"description": "50 万上下文 | 长时 Agent | 编码",
|
|
271
|
+
"contextWindow": 500000
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "grok-4.6",
|
|
275
|
+
"name": "Grok 4.6",
|
|
276
|
+
"description": "50 万上下文 | 编码",
|
|
277
|
+
"contextWindow": 500000,
|
|
278
|
+
"codex": false,
|
|
279
|
+
"claudeCode": false
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"codex": {
|
|
284
|
+
"standardContextWindow": 272000
|
|
285
|
+
},
|
|
286
|
+
"agy": {
|
|
287
|
+
"gatewayModels": [
|
|
288
|
+
"gemini-4-argon",
|
|
289
|
+
"gemini-3.8-flash",
|
|
290
|
+
"gemini-3.7-flash",
|
|
291
|
+
"gemini-3.6-flash",
|
|
292
|
+
"gemini-3.1-pro-preview"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"toolMinVersions": {
|
|
296
|
+
"codex": "0.122.0",
|
|
297
|
+
"claude-code": "2.1.291",
|
|
298
|
+
"claude-desktop": "2.2553.0",
|
|
299
|
+
"agy": "1.3.5"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"ENABLE_TOOL_SEARCH": "true",
|
|
4
|
+
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
|
|
5
|
+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
|
|
6
|
+
"API_TIMEOUT_MS": "3000000",
|
|
7
|
+
"CLAUDE_CODE_AUTO_MODE_SERVER": "0"
|
|
8
|
+
},
|
|
9
|
+
"attribution": {
|
|
10
|
+
"commit": "",
|
|
11
|
+
"pr": ""
|
|
12
|
+
},
|
|
13
|
+
"showThinkingSummaries": true,
|
|
14
|
+
"effortLevel": "medium",
|
|
15
|
+
"model": "opus[1m]",
|
|
16
|
+
"crossSessionInbound": "accept",
|
|
17
|
+
"switchModelsOnFlag": true
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{existsSync as e,mkdirSync as t,appendFileSync as i,readdirSync as o,statSync as r,unlinkSync as s}from"fs";import{join as g}from"path";import{homedir as n}from"os";import{brand as l}from"../lib/brand.js";export var LogLevel;!function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(LogLevel||(LogLevel={}));const a=["token","apikey","api_key","api-key","auth_token","auth-token","authorization","password","secret","credential","anthropic_auth_token","anthropic_api_key","z_ai_api_key"],L=[/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,/\b[a-zA-Z0-9]{32,}\b/g,/Bearer\s+[A-Za-z0-9._-]+/gi];export class Logger{static instance;logLevel=LogLevel.INFO;fileLogLevel=LogLevel.WARN;logDir;fileLoggingEnabled=!0;retentionDays=14;constructor(){this.logDir=g(n(),l().configDirName),this.ensureLogDir(),this.rotateOldLogs()}static getInstance(){return Logger.instance||(Logger.instance=new Logger),Logger.instance}ensureLogDir(){try{e(this.logDir)||t(this.logDir,{recursive:!0})}catch{this.fileLoggingEnabled=!1}}getLogFilePath(){const e=(new Date).toISOString().split("T")[0];return g(this.logDir,`${e}.log`)}rotateOldLogs(){if(this.fileLoggingEnabled&&e(this.logDir))try{const e=Date.now()-24*this.retentionDays*60*60*1e3,t=o(this.logDir).filter(e=>/^\d{4}-\d{2}-\d{2}\.log$/.test(e));for(const i of t){const t=g(this.logDir,i);try{r(t).mtimeMs<e&&s(t)}catch{}}}catch{}}setRetentionDays(e){e>=0&&Number.isFinite(e)&&(this.retentionDays=Math.floor(e),this.rotateOldLogs())}sanitizeValue(e){if(null==e)return e;if("string"==typeof e){let t=e;for(const e of L)t=t.replace(e,"[REDACTED]");return t}if(Array.isArray(e))return e.map(e=>this.sanitizeValue(e));if("object"==typeof e){const t={};for(const[i,o]of Object.entries(e)){const e=i.toLowerCase(),r=a.some(t=>e.includes(t));t[i]=r?"[REDACTED]":this.sanitizeValue(o)}return t}return e}sanitize(e,t){return{message:this.sanitizeValue(e),args:t.map(e=>this.sanitizeValue(e))}}formatArgs(e){return 0===e.length?"":" "+e.map(e=>{if("object"==typeof e)try{return JSON.stringify(e)}catch{return String(e)}return String(e)}).join(" ")}writeToFile(e,t,o){if(this.fileLoggingEnabled)try{const{message:r,args:s}=this.sanitize(t,o),g=`${(new Date).toISOString()} [${e}] ${r}${this.formatArgs(s)}\n`;i(this.getLogFilePath(),g,"utf-8")}catch{}}setLogLevel(e){this.logLevel=e}setFileLogLevel(e){this.fileLogLevel=e}setFileLoggingEnabled(e){this.fileLoggingEnabled=e}debug(e,...t){this.logLevel<=LogLevel.DEBUG&&console.debug(`[DEBUG] ${e}`,...t),this.fileLoggingEnabled&&this.fileLogLevel<=LogLevel.DEBUG&&this.writeToFile("DEBUG",e,t)}record(e){this.fileLoggingEnabled&&this.writeToFile("INFO",e,[])}info(e,...t){this.logLevel<=LogLevel.INFO&&console.info(`[INFO] ${e}`,...t),this.fileLoggingEnabled&&this.fileLogLevel<=LogLevel.INFO&&this.writeToFile("INFO",e,t)}warn(e,...t){this.logLevel<=LogLevel.WARN&&console.warn(`[WARN] ${e}`,...t),this.fileLoggingEnabled&&this.fileLogLevel<=LogLevel.WARN&&this.writeToFile("WARN",e,t)}error(e,...t){this.logLevel<=LogLevel.ERROR&&console.error(`[ERROR] ${e}`,...t),this.fileLoggingEnabled&&this.fileLogLevel<=LogLevel.ERROR&&this.writeToFile("ERROR",e,t)}logError(e,t){const i=t instanceof Error?t.message:String(t),o=t instanceof Error?t.stack:void 0;this.writeToFile("ERROR",`[${e}] ${i}`,o?[{stack:o}]:[])}getLogDir(){return this.logDir}}export const logger=Logger.getInstance();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function stripAnsi(t){return t.replace(/\u001b\[[0-9;]*m/g,"")}function t(t){const r=t.codePointAt(0);return r?8203===r||8204===r||8205===r||65279===r||r>=65024&&r<=65039?0:r>=127744&&r<=129535||r>=9728&&r<=9983||r>=9984&&r<=10175||r>=126976&&r<=127023||r>=127136&&r<=127231||r>=19968&&r<=40959||r>=13312&&r<=19903||r>=131072&&r<=173791||r>=173824&&r<=177983||r>=177984&&r<=178207||r>=178208&&r<=183983||r>=63744&&r<=64255||r>=194560&&r<=195103||r>=12352&&r<=12447||r>=12448&&r<=12543||r>=44032&&r<=55215||r>=4352&&r<=4607||r>=12592&&r<=12687||r>=43360&&r<=43391||r>=55216&&r<=55295||r>=65280&&r<=65519?2:1:0}export function stringWidth(r){const n=stripAnsi(r);let e=0;for(const r of Array.from(n))e+=t(r);return e}export function padString(t,r,n=" ",e="left"){const i=stringWidth(t),o=Math.max(0,r-i);if(0===o)return t;const c=n.repeat(o);if("right"===e)return c+t;if("center"===e){const r=Math.floor(o/2),e=o-r;return n.repeat(r)+t+n.repeat(e)}return t+c}export function createBorderLine(t,r,n,e){const i=e-stringWidth(t)-stringWidth(r);return t+n.repeat(Math.max(0,i))+r}export function createContentLine(t,r,n,e,i="left"){return r+padString(t,e-(stringWidth(r)+stringWidth(n))," ",i)+n}
|
package/models.json
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
{
|
|
2
|
+
"defaultModels": {
|
|
3
|
+
"haiku": "claude-haiku-4-5-20251001",
|
|
4
|
+
"sonnet": "claude-sonnet-5[1m]",
|
|
5
|
+
"opus": "claude-opus-5-5[1m]",
|
|
6
|
+
"reasoning": "claude-opus-5-5[1m]"
|
|
7
|
+
},
|
|
8
|
+
"retiredDefaultModels": {
|
|
9
|
+
"opus": ["claude-opus-4-6", "claude-opus-4-8[1m]"],
|
|
10
|
+
"sonnet": ["claude-sonnet-4-6"],
|
|
11
|
+
"reasoning": ["claude-opus-4-6", "claude-opus-4-8[1m]"]
|
|
12
|
+
},
|
|
13
|
+
"defaultToolModel": "gpt-5.5",
|
|
14
|
+
"toolDefaults": {
|
|
15
|
+
"claude-code": "",
|
|
16
|
+
"opencode": "gpt-5.5",
|
|
17
|
+
"codex": "gpt-6-astra",
|
|
18
|
+
"openclaw": "gpt-5.5",
|
|
19
|
+
"hermes": "gpt-5.5",
|
|
20
|
+
"atomcode": "gpt-5.5",
|
|
21
|
+
"grok": "grok-4.6"
|
|
22
|
+
},
|
|
23
|
+
"presets": [
|
|
24
|
+
{
|
|
25
|
+
"name": "GPT-5.5",
|
|
26
|
+
"model": "gpt-5.5"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"name": "GLM-5.3",
|
|
30
|
+
"model": "glm-5.3"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "MiniMax-M3",
|
|
34
|
+
"model": "MiniMax-M3"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"name": "Kimi-K3",
|
|
38
|
+
"model": "kimi-k3"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "Qwen3.8-Max",
|
|
42
|
+
"model": "qwen3.8-max"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "DeepSeek-V4-Pro",
|
|
46
|
+
"model": "deepseek-v4-pro"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"claudeCode": {
|
|
50
|
+
"tierChains": {
|
|
51
|
+
"opus": ["claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-opus-4-7", "claude-opus-4-6"],
|
|
52
|
+
"sonnet": ["claude-sonnet-5", "claude-sonnet-4-6"],
|
|
53
|
+
"haiku": ["claude-haiku-4-5-20251001"],
|
|
54
|
+
"fable": ["claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8"]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"claudeDesktop": {
|
|
58
|
+
"oneMillionFallback": [
|
|
59
|
+
"claude-opus-4-8",
|
|
60
|
+
"claude-opus-4-7",
|
|
61
|
+
"claude-opus-4-6",
|
|
62
|
+
"claude-opus-5",
|
|
63
|
+
"claude-opus-5-5",
|
|
64
|
+
"claude-sonnet-5",
|
|
65
|
+
"claude-sonnet-5-5",
|
|
66
|
+
"claude-haiku-5-5",
|
|
67
|
+
"claude-fable-5",
|
|
68
|
+
"claude-fable-5-1"
|
|
69
|
+
],
|
|
70
|
+
"oneMillionExclusions": [
|
|
71
|
+
{
|
|
72
|
+
"whenPrefixPresent": "claude-fable-",
|
|
73
|
+
"models": ["claude-opus-4-6"]
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"gatewayModels": {
|
|
78
|
+
"autoCompactRatio": 0.8,
|
|
79
|
+
"retired": ["deepseek-v4-flash", "deepseek-v4.1-flash", "glm-5.2", "qwen3.7-max", "qwen3.7-plus"],
|
|
80
|
+
"models": [
|
|
81
|
+
{
|
|
82
|
+
"id": "claude-opus-5-5",
|
|
83
|
+
"name": "Claude Opus 5.5",
|
|
84
|
+
"description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
|
|
85
|
+
"contextWindow": 1000000
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "claude-sonnet-5-5",
|
|
89
|
+
"name": "Claude Sonnet 5.5",
|
|
90
|
+
"description": "100 万上下文 | Agent 编程 | 速度与成本均衡",
|
|
91
|
+
"contextWindow": 1000000
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"id": "claude-fable-5-1",
|
|
95
|
+
"name": "Claude Fable 5.1",
|
|
96
|
+
"description": "100 万上下文 | 长时 Agent 与多步研究",
|
|
97
|
+
"contextWindow": 1000000
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "claude-fable-5",
|
|
101
|
+
"name": "Claude Fable 5",
|
|
102
|
+
"description": "100 万上下文 | 高强度推理 | 长时 Agent",
|
|
103
|
+
"contextWindow": 1000000
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"id": "claude-opus-5",
|
|
107
|
+
"name": "Claude Opus 5",
|
|
108
|
+
"description": "100 万上下文 | Agent 编程",
|
|
109
|
+
"contextWindow": 1000000
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "claude-sonnet-5",
|
|
113
|
+
"name": "Claude Sonnet 5",
|
|
114
|
+
"description": "100 万上下文 | Agent 编程 | 工具调用",
|
|
115
|
+
"contextWindow": 1000000
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"id": "claude-opus-4-8",
|
|
119
|
+
"name": "Claude Opus 4.8",
|
|
120
|
+
"description": "100 万上下文 | 推理 | 编程",
|
|
121
|
+
"contextWindow": 1000000
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"id": "claude-opus-4-7",
|
|
125
|
+
"name": "Claude Opus 4.7",
|
|
126
|
+
"description": "100 万上下文 | 推理 | 编程",
|
|
127
|
+
"contextWindow": 1000000
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "claude-opus-4-6",
|
|
131
|
+
"name": "Claude Opus 4.6",
|
|
132
|
+
"description": "20 万上下文(部分分组无 1M)| 推理 | 编程",
|
|
133
|
+
"contextWindow": 200000
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "claude-sonnet-4-6",
|
|
137
|
+
"name": "Claude Sonnet 4.6",
|
|
138
|
+
"description": "20 万上下文(部分分组无 1M)| Agent 编程",
|
|
139
|
+
"contextWindow": 200000
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"id": "gpt-6-astra",
|
|
143
|
+
"name": "GPT-6 Astra",
|
|
144
|
+
"description": "105 万上下文 | 编码 / 计算机操作",
|
|
145
|
+
"contextWindow": 1050000,
|
|
146
|
+
"codex": false
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "gpt-6.1-sol",
|
|
150
|
+
"name": "GPT-6.1 Sol",
|
|
151
|
+
"description": "105 万上下文 | 工具调用 | 结构化输出",
|
|
152
|
+
"contextWindow": 1050000,
|
|
153
|
+
"codex": false
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "gpt-6-sol",
|
|
157
|
+
"name": "GPT-6 Sol",
|
|
158
|
+
"description": "105 万上下文 | 复杂编程与 Agent 工作流",
|
|
159
|
+
"contextWindow": 1050000,
|
|
160
|
+
"codex": false
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "gpt-6-luna",
|
|
164
|
+
"name": "GPT-6 Luna",
|
|
165
|
+
"contextWindow": 1050000,
|
|
166
|
+
"claudeCode": false,
|
|
167
|
+
"codex": false
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"id": "gpt-5.6-sol",
|
|
171
|
+
"name": "GPT-5.6 Sol",
|
|
172
|
+
"description": "105 万上下文 | 前沿档",
|
|
173
|
+
"contextWindow": 1050000,
|
|
174
|
+
"codex": false,
|
|
175
|
+
"claudeCode": false
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "gpt-5.6-terra",
|
|
179
|
+
"name": "GPT-5.6 Terra",
|
|
180
|
+
"description": "105 万上下文 | 均衡生产档",
|
|
181
|
+
"contextWindow": 1050000,
|
|
182
|
+
"codex": false,
|
|
183
|
+
"claudeCode": false
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"id": "gpt-5.6-luna",
|
|
187
|
+
"name": "GPT-5.6 Luna",
|
|
188
|
+
"description": "105 万上下文 | 大批量低成本档",
|
|
189
|
+
"contextWindow": 1050000,
|
|
190
|
+
"codex": false,
|
|
191
|
+
"claudeCode": false
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"id": "gemini-4-argon",
|
|
195
|
+
"name": "Gemini 4 Argon",
|
|
196
|
+
"description": "105 万上下文 | 旗舰推理 | 编码与 Agent",
|
|
197
|
+
"contextWindow": 1048576
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"id": "gemini-3.8-flash",
|
|
201
|
+
"name": "Gemini 3.8 Flash",
|
|
202
|
+
"description": "105 万上下文 | 推理与编码",
|
|
203
|
+
"contextWindow": 1048576
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"id": "gemini-3.1-pro",
|
|
207
|
+
"name": "Gemini 3.1 Pro",
|
|
208
|
+
"description": "100 万上下文 | 深度推理 | 长文档",
|
|
209
|
+
"contextWindow": 1000000
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "gemini-3.7-flash",
|
|
213
|
+
"name": "Gemini 3.7 Flash",
|
|
214
|
+
"description": "100 万上下文 | Agent | 软件工程",
|
|
215
|
+
"contextWindow": 1000000,
|
|
216
|
+
"codex": false,
|
|
217
|
+
"claudeCode": false
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"id": "deepseek-v4-pro",
|
|
221
|
+
"name": "DeepSeek V4 Pro",
|
|
222
|
+
"description": "100 万上下文 | 跨文件重构",
|
|
223
|
+
"contextWindow": 1000000
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"id": "deepseek-v4.1-flash-1017",
|
|
227
|
+
"name": "DeepSeek V4.1 Flash 1017",
|
|
228
|
+
"description": "100 万上下文 | 高速档",
|
|
229
|
+
"contextWindow": 1000000
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"id": "glm-5.3",
|
|
233
|
+
"name": "GLM 5.3",
|
|
234
|
+
"description": "105 万上下文 | 代码 Agent",
|
|
235
|
+
"contextWindow": 1048576
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"id": "glm-5.3-flash",
|
|
239
|
+
"name": "GLM 5.3 Flash",
|
|
240
|
+
"description": "105 万上下文 | 高速档",
|
|
241
|
+
"contextWindow": 1048576
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "kimi-k3",
|
|
245
|
+
"name": "Kimi K3",
|
|
246
|
+
"description": "105 万上下文 | 前端编码",
|
|
247
|
+
"contextWindow": 1048576
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"id": "qwen3.8-max",
|
|
251
|
+
"name": "Qwen 3.8 Max",
|
|
252
|
+
"description": "100 万上下文 | 视觉理解",
|
|
253
|
+
"contextWindow": 1000000
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"id": "qwen3.8-flash",
|
|
257
|
+
"name": "Qwen 3.8 Flash",
|
|
258
|
+
"description": "100 万上下文 | 高速档",
|
|
259
|
+
"contextWindow": 1000000
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"id": "MiniMax-M3",
|
|
263
|
+
"name": "MiniMax M3",
|
|
264
|
+
"description": "100 万上下文 | Agent 工作流",
|
|
265
|
+
"contextWindow": 1000000
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"id": "grok-4.7",
|
|
269
|
+
"name": "Grok 4.7",
|
|
270
|
+
"description": "50 万上下文 | 长时 Agent | 编码",
|
|
271
|
+
"contextWindow": 500000
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": "grok-4.6",
|
|
275
|
+
"name": "Grok 4.6",
|
|
276
|
+
"description": "50 万上下文 | 编码",
|
|
277
|
+
"contextWindow": 500000,
|
|
278
|
+
"codex": false,
|
|
279
|
+
"claudeCode": false
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"codex": {
|
|
284
|
+
"standardContextWindow": 272000
|
|
285
|
+
},
|
|
286
|
+
"agy": {
|
|
287
|
+
"gatewayModels": [
|
|
288
|
+
"gemini-4-argon",
|
|
289
|
+
"gemini-3.8-flash",
|
|
290
|
+
"gemini-3.7-flash",
|
|
291
|
+
"gemini-3.6-flash",
|
|
292
|
+
"gemini-3.1-pro-preview"
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"toolMinVersions": {
|
|
296
|
+
"codex": "0.122.0",
|
|
297
|
+
"claude-code": "2.1.291",
|
|
298
|
+
"claude-desktop": "2.2553.0",
|
|
299
|
+
"agy": "1.3.5"
|
|
300
|
+
}
|
|
301
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xship/cli",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.36",
|
|
4
|
+
"description": "Configure Claude Code, Codex, Grok Build and other coding tools for Xship AI with one command",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"xship": "dist/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"models.json",
|
|
13
|
+
"client-config.snapshot.json",
|
|
14
|
+
"settings-template.json",
|
|
15
|
+
"codex-base-instructions.md",
|
|
16
|
+
"THIRD_PARTY_NOTICES.md",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20.0.0"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"cli",
|
|
28
|
+
"coding",
|
|
29
|
+
"helper",
|
|
30
|
+
"tools",
|
|
31
|
+
"anthropic",
|
|
32
|
+
"claude",
|
|
33
|
+
"ai",
|
|
34
|
+
"assistant",
|
|
35
|
+
"claude-code",
|
|
36
|
+
"opencode"
|
|
37
|
+
],
|
|
38
|
+
"author": "Xship AI",
|
|
39
|
+
"license": "UNLICENSED",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@iarna/toml": "^2.2.5",
|
|
42
|
+
"chalk": "^5.3.0",
|
|
43
|
+
"commander": "^14.0.3",
|
|
44
|
+
"inquirer": "^9.2.12",
|
|
45
|
+
"js-yaml": "^4.3.2",
|
|
46
|
+
"ora": "^8.0.1",
|
|
47
|
+
"terminal-link": "^5.0.0"
|
|
48
|
+
},
|
|
49
|
+
"homepage": "https://ai.xship.live/"
|
|
50
|
+
}
|