@ai-vibeway/cli 0.0.137 → 0.0.138

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.
@@ -10,7 +10,7 @@
10
10
  "claude": [
11
11
  {
12
12
  "description": "100 万上下文 | 高强度推理 | 长时 Agent | SWE-bench Verified 95%",
13
- "group": "grp_pzxnceygmqlp",
13
+ "group": "grp_6eg2dq9ywgrg",
14
14
  "group_name": "",
15
15
  "hidden": false,
16
16
  "id": "claude-fable-5",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "description": "轻量档 | 低延迟 | 高频短任务",
31
- "group": "grp_rld6af0zorqd",
31
+ "group": "grp_6eg2dq9ywgrg",
32
32
  "group_name": "",
33
33
  "hidden": false,
34
34
  "id": "claude-haiku-4-5-20251001",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  {
39
39
  "description": "100 万上下文 | 12.8 万输出 | 低延迟 | 高频轻量任务",
40
- "group": "grp_6eg2dq9ywgrg",
40
+ "group": "grp_pzxnceygmqlp",
41
41
  "group_name": "",
42
42
  "hidden": false,
43
43
  "id": "claude-haiku-5-5",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  {
48
48
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
49
- "group": "grp_6eg2dq9ywgrg",
49
+ "group": "grp_rld6af0zorqd",
50
50
  "group_name": "",
51
51
  "hidden": false,
52
52
  "id": "claude-opus-4-6",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  {
57
57
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
58
- "group": "grp_irydsgijuckh",
58
+ "group": "grp_6eg2dq9ywgrg",
59
59
  "group_name": "",
60
60
  "hidden": false,
61
61
  "id": "claude-opus-4-7",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  {
66
66
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
67
- "group": "grp_rld6af0zorqd",
67
+ "group": "grp_6eg2dq9ywgrg",
68
68
  "group_name": "",
69
69
  "hidden": false,
70
70
  "id": "claude-opus-4-8",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  {
75
75
  "description": "100 万上下文 | 12.8 万输出 | 自适应思考五档 | Agent 编程",
76
- "group": "grp_rld6af0zorqd",
76
+ "group": "grp_6eg2dq9ywgrg",
77
77
  "group_name": "",
78
78
  "hidden": false,
79
79
  "id": "claude-opus-5",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  {
84
84
  "description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
85
- "group": "grp_6lyxfgbs440g",
85
+ "group": "grp_irydsgijuckh",
86
86
  "group_name": "",
87
87
  "hidden": false,
88
88
  "id": "claude-opus-5-5",
@@ -91,7 +91,7 @@
91
91
  },
92
92
  {
93
93
  "description": "100 万上下文 | Agent 编程 | 长上下文不加价",
94
- "group": "grp_6co8aqwefsoh",
94
+ "group": "grp_6eg2dq9ywgrg",
95
95
  "group_name": "",
96
96
  "hidden": false,
97
97
  "id": "claude-sonnet-4-6",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  {
111
111
  "description": "100 万上下文 | 12.8 万输出 | Agent 编程 | 知识工作",
112
- "group": "grp_6eg2dq9ywgrg",
112
+ "group": "grp_rld6af0zorqd",
113
113
  "group_name": "",
114
114
  "hidden": false,
115
115
  "id": "claude-sonnet-5-5",
@@ -118,18 +118,9 @@
118
118
  }
119
119
  ],
120
120
  "codex": [
121
- {
122
- "description": "100 万上下文 | 12.8 万输出 | 复杂专业负载",
123
- "group": "grp_6co8aqwefsoh",
124
- "group_name": "",
125
- "hidden": false,
126
- "id": "gpt-5.5",
127
- "name": "gpt-5.5",
128
- "recommended": false
129
- },
130
121
  {
131
122
  "description": "105 万上下文 | 12.8 万输出 | 大批量低成本档",
132
- "group": "grp_bsbtt432saoq",
123
+ "group": "grp_squ2qzjnehps",
133
124
  "group_name": "",
134
125
  "hidden": false,
135
126
  "id": "gpt-5.6-luna",
@@ -138,7 +129,7 @@
138
129
  },
139
130
  {
140
131
  "description": "105 万上下文 | 12.8 万输出 | 前沿档",
141
- "group": "grp_6co8aqwefsoh",
132
+ "group": "grp_irydsgijuckh",
142
133
  "group_name": "",
143
134
  "hidden": false,
144
135
  "id": "gpt-5.6-sol",
@@ -156,7 +147,7 @@
156
147
  },
157
148
  {
158
149
  "description": "105 万上下文 | 12.8 万输出 | 思考强度至 max | 计算机操作 / 编码 / 科学基准接近饱和",
159
- "group": "grp_irydsgijuckh",
150
+ "group": "grp_6co8aqwefsoh",
160
151
  "group_name": "",
161
152
  "hidden": false,
162
153
  "id": "gpt-6-astra",
@@ -174,7 +165,7 @@
174
165
  },
175
166
  {
176
167
  "description": "105 万上下文 | 12.8 万输出 | 复杂编程与 Agent 工作流",
177
- "group": "grp_irydsgijuckh",
168
+ "group": "grp_bsbtt432saoq",
178
169
  "group_name": "",
179
170
  "hidden": false,
180
171
  "id": "gpt-6-sol",
@@ -183,7 +174,7 @@
183
174
  },
184
175
  {
185
176
  "description": "105 万上下文 | 12.8 万输出 | 文字与图像输入 | 工具调用、联网搜索、结构化输出 | 工具调用使用 Responses API",
186
- "group": "grp_irydsgijuckh",
177
+ "group": "grp_mb5v069lpnze",
187
178
  "group_name": "",
188
179
  "hidden": false,
189
180
  "id": "gpt-6.1-sol",
@@ -192,7 +183,7 @@
192
183
  },
193
184
  {
194
185
  "description": "105 万上下文 | 12.8 万输出 | 计算机操作与日常 Agent 任务 | 均衡档",
195
- "group": "grp_irydsgijuckh",
186
+ "group": "grp_squ2qzjnehps",
196
187
  "group_name": "",
197
188
  "hidden": false,
198
189
  "id": "gpt-6.1-terra",
@@ -212,7 +203,7 @@
212
203
  },
213
204
  {
214
205
  "description": "约 100 万上下文 | 深度推理 | 长文档一致性",
215
- "group": "grp_z5khwusxuh2j",
206
+ "group": "grp_3pi5kyqkp51b",
216
207
  "group_name": "",
217
208
  "hidden": false,
218
209
  "id": "gemini-3-pro",
@@ -230,7 +221,7 @@
230
221
  },
231
222
  {
232
223
  "description": "约 100 万上下文 | 深度推理 | 密集长文档",
233
- "group": "grp_3pi5kyqkp51b",
224
+ "group": "grp_z5khwusxuh2j",
234
225
  "group_name": "",
235
226
  "hidden": false,
236
227
  "id": "gemini-3.1-pro",
@@ -239,7 +230,7 @@
239
230
  },
240
231
  {
241
232
  "description": "Gemini 3.1 Pro 预览版 | 约 100 万上下文 | 深度推理 | 文本、图像、音视频输入",
242
- "group": "grp_3pi5kyqkp51b",
233
+ "group": "grp_z5khwusxuh2j",
243
234
  "group_name": "",
244
235
  "hidden": false,
245
236
  "id": "gemini-3.1-pro-preview",
@@ -322,7 +313,7 @@
322
313
  },
323
314
  {
324
315
  "description": "50 万上下文 | 长时 Agent | 编码与视觉项目",
325
- "group": "grp_irydsgijuckh",
316
+ "group": "grp_l34dwliv4yas",
326
317
  "group_name": "",
327
318
  "hidden": false,
328
319
  "id": "grok-4.7",
@@ -10,7 +10,7 @@
10
10
  "claude": [
11
11
  {
12
12
  "description": "100 万上下文 | 高强度推理 | 长时 Agent | SWE-bench Verified 95%",
13
- "group": "grp_pzxnceygmqlp",
13
+ "group": "grp_6eg2dq9ywgrg",
14
14
  "group_name": "",
15
15
  "hidden": false,
16
16
  "id": "claude-fable-5",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  {
30
30
  "description": "轻量档 | 低延迟 | 高频短任务",
31
- "group": "grp_rld6af0zorqd",
31
+ "group": "grp_6eg2dq9ywgrg",
32
32
  "group_name": "",
33
33
  "hidden": false,
34
34
  "id": "claude-haiku-4-5-20251001",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  {
39
39
  "description": "100 万上下文 | 12.8 万输出 | 低延迟 | 高频轻量任务",
40
- "group": "grp_6eg2dq9ywgrg",
40
+ "group": "grp_pzxnceygmqlp",
41
41
  "group_name": "",
42
42
  "hidden": false,
43
43
  "id": "claude-haiku-5-5",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  {
48
48
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
49
- "group": "grp_6eg2dq9ywgrg",
49
+ "group": "grp_rld6af0zorqd",
50
50
  "group_name": "",
51
51
  "hidden": false,
52
52
  "id": "claude-opus-4-6",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  {
57
57
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
58
- "group": "grp_irydsgijuckh",
58
+ "group": "grp_6eg2dq9ywgrg",
59
59
  "group_name": "",
60
60
  "hidden": false,
61
61
  "id": "claude-opus-4-7",
@@ -64,7 +64,7 @@
64
64
  },
65
65
  {
66
66
  "description": "100 万上下文 | 推理 | 编程 | 长上下文不加价",
67
- "group": "grp_rld6af0zorqd",
67
+ "group": "grp_6eg2dq9ywgrg",
68
68
  "group_name": "",
69
69
  "hidden": false,
70
70
  "id": "claude-opus-4-8",
@@ -73,7 +73,7 @@
73
73
  },
74
74
  {
75
75
  "description": "100 万上下文 | 12.8 万输出 | 自适应思考五档 | Agent 编程",
76
- "group": "grp_rld6af0zorqd",
76
+ "group": "grp_6eg2dq9ywgrg",
77
77
  "group_name": "",
78
78
  "hidden": false,
79
79
  "id": "claude-opus-5",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  {
84
84
  "description": "100 万上下文 | 长时 Agent 编程 | 知识工作",
85
- "group": "grp_6lyxfgbs440g",
85
+ "group": "grp_irydsgijuckh",
86
86
  "group_name": "",
87
87
  "hidden": false,
88
88
  "id": "claude-opus-5-5",
@@ -91,7 +91,7 @@
91
91
  },
92
92
  {
93
93
  "description": "100 万上下文 | Agent 编程 | 长上下文不加价",
94
- "group": "grp_6co8aqwefsoh",
94
+ "group": "grp_6eg2dq9ywgrg",
95
95
  "group_name": "",
96
96
  "hidden": false,
97
97
  "id": "claude-sonnet-4-6",
@@ -109,7 +109,7 @@
109
109
  },
110
110
  {
111
111
  "description": "100 万上下文 | 12.8 万输出 | Agent 编程 | 知识工作",
112
- "group": "grp_6eg2dq9ywgrg",
112
+ "group": "grp_rld6af0zorqd",
113
113
  "group_name": "",
114
114
  "hidden": false,
115
115
  "id": "claude-sonnet-5-5",
@@ -118,18 +118,9 @@
118
118
  }
119
119
  ],
120
120
  "codex": [
121
- {
122
- "description": "100 万上下文 | 12.8 万输出 | 复杂专业负载",
123
- "group": "grp_6co8aqwefsoh",
124
- "group_name": "",
125
- "hidden": false,
126
- "id": "gpt-5.5",
127
- "name": "gpt-5.5",
128
- "recommended": false
129
- },
130
121
  {
131
122
  "description": "105 万上下文 | 12.8 万输出 | 大批量低成本档",
132
- "group": "grp_bsbtt432saoq",
123
+ "group": "grp_squ2qzjnehps",
133
124
  "group_name": "",
134
125
  "hidden": false,
135
126
  "id": "gpt-5.6-luna",
@@ -138,7 +129,7 @@
138
129
  },
139
130
  {
140
131
  "description": "105 万上下文 | 12.8 万输出 | 前沿档",
141
- "group": "grp_6co8aqwefsoh",
132
+ "group": "grp_irydsgijuckh",
142
133
  "group_name": "",
143
134
  "hidden": false,
144
135
  "id": "gpt-5.6-sol",
@@ -156,7 +147,7 @@
156
147
  },
157
148
  {
158
149
  "description": "105 万上下文 | 12.8 万输出 | 思考强度至 max | 计算机操作 / 编码 / 科学基准接近饱和",
159
- "group": "grp_irydsgijuckh",
150
+ "group": "grp_6co8aqwefsoh",
160
151
  "group_name": "",
161
152
  "hidden": false,
162
153
  "id": "gpt-6-astra",
@@ -174,7 +165,7 @@
174
165
  },
175
166
  {
176
167
  "description": "105 万上下文 | 12.8 万输出 | 复杂编程与 Agent 工作流",
177
- "group": "grp_irydsgijuckh",
168
+ "group": "grp_bsbtt432saoq",
178
169
  "group_name": "",
179
170
  "hidden": false,
180
171
  "id": "gpt-6-sol",
@@ -183,7 +174,7 @@
183
174
  },
184
175
  {
185
176
  "description": "105 万上下文 | 12.8 万输出 | 文字与图像输入 | 工具调用、联网搜索、结构化输出 | 工具调用使用 Responses API",
186
- "group": "grp_irydsgijuckh",
177
+ "group": "grp_mb5v069lpnze",
187
178
  "group_name": "",
188
179
  "hidden": false,
189
180
  "id": "gpt-6.1-sol",
@@ -192,7 +183,7 @@
192
183
  },
193
184
  {
194
185
  "description": "105 万上下文 | 12.8 万输出 | 计算机操作与日常 Agent 任务 | 均衡档",
195
- "group": "grp_irydsgijuckh",
186
+ "group": "grp_squ2qzjnehps",
196
187
  "group_name": "",
197
188
  "hidden": false,
198
189
  "id": "gpt-6.1-terra",
@@ -212,7 +203,7 @@
212
203
  },
213
204
  {
214
205
  "description": "约 100 万上下文 | 深度推理 | 长文档一致性",
215
- "group": "grp_z5khwusxuh2j",
206
+ "group": "grp_3pi5kyqkp51b",
216
207
  "group_name": "",
217
208
  "hidden": false,
218
209
  "id": "gemini-3-pro",
@@ -230,7 +221,7 @@
230
221
  },
231
222
  {
232
223
  "description": "约 100 万上下文 | 深度推理 | 密集长文档",
233
- "group": "grp_3pi5kyqkp51b",
224
+ "group": "grp_z5khwusxuh2j",
234
225
  "group_name": "",
235
226
  "hidden": false,
236
227
  "id": "gemini-3.1-pro",
@@ -239,7 +230,7 @@
239
230
  },
240
231
  {
241
232
  "description": "Gemini 3.1 Pro 预览版 | 约 100 万上下文 | 深度推理 | 文本、图像、音视频输入",
242
- "group": "grp_3pi5kyqkp51b",
233
+ "group": "grp_z5khwusxuh2j",
243
234
  "group_name": "",
244
235
  "hidden": false,
245
236
  "id": "gemini-3.1-pro-preview",
@@ -322,7 +313,7 @@
322
313
  },
323
314
  {
324
315
  "description": "50 万上下文 | 长时 Agent | 编码与视觉项目",
325
- "group": "grp_irydsgijuckh",
316
+ "group": "grp_l34dwliv4yas",
326
317
  "group_name": "",
327
318
  "hidden": false,
328
319
  "id": "grok-4.7",
@@ -1 +1 @@
1
- import{chmodSync as e,existsSync as t,mkdirSync as r,readFileSync as n,renameSync as o,writeFileSync as s}from"fs";import{homedir as a}from"os";import{dirname as l,join as i,sep as u}from"path";import{spawnSync as c}from"child_process";import p from"chalk";import{checkForUpdate as d,compareSemver as m,readLocalPackage as f,UPDATE_SOURCES as _}from"../commands/update.js";import{i18n as h}from"./i18n.js";import{isColorEnabled as g}from"./runtime-options.js";import{logger as x}from"../utils/logger.js";import{isHelpRequest as v}from"./cli-help.js";import{brand as y,brandEnvName as S}from"./brand.js";export const UPDATE_CHECK_INTERVAL_MS=216e5;export const INSTALL_RETRY_INTERVAL_MS=36e5;export const INSTALL_TIMEOUT_MS=45e3;function k(e,t){return g()?e(t):t}export function resolveUpdateCachePath(e=process.env){const t=e[S("CONFIG_DIR")]?.trim();if(t)return i(t,"update-state.json");const r=e[S("TEST_HOME")]?.trim();return i(r||a(),y().configDirName,"update-state.json")}export function isGlobalPackageInstall(e){return e.split(u).includes("node_modules")}export function isNpxExecution(e=process.env){return"exec"===e.npm_command||"npx"===e.npm_lifecycle_event}export function isPnpmGlobalInstall(e){return e.includes(`${u}.pnpm${u}`)||e.includes(`${u}pnpm${u}global${u}`)}export function resolveNpmGlobalPrefix(e){const t=`${u}node_modules${u}`,r=e.indexOf(t);if(r<0)return null;const n=e.slice(0,r);return n.endsWith(`${u}lib`)?l(n):n}export function shouldSkipStartupUpdate(e,t=process.env){return"1"===t[S("SKIP_AUTO_UPDATE")]||"1"===t[S("DISABLE_AUTO_UPDATE")]||(!(!["--json","--non-interactive","--dry-run","--help","-h","--version","-v"].some(t=>e.includes(t))&&!v(e))||e.includes("update")||e.includes("completion"))}function A(t,n,a,i,u){try{r(l(t),{recursive:!0,mode:448});const c=`${t}.tmp-${process.pid}`,p={package_name:n,checked_at:a,latest:i.latest,source:i.source,registry:i.registry,errors:i.errors,...void 0===u?{}:{install_attempted_at:u,install_attempted_version:i.latest||void 0}};s(c,JSON.stringify(p),{encoding:"utf-8",mode:384}),o(c,t),e(t,384)}catch(e){x.warn("Failed to persist update check cache:",e)}}export function windowsShellCommand(e,t){return[e,...t.map(e=>`"${e}"`)].join(" ")}const P=(e,t)=>{const r={stdio:"inherit",timeout:45e3,killSignal:"SIGTERM"};return"win32"===process.platform?c(windowsShellCommand(e,t),{...r,shell:!0}):c(e,t,r)},$=(e,t)=>c(process.execPath,[process.argv[1],...e],{stdio:"inherit",env:t});export async function runStartupUpdate(e,r={}){const o=r.env||process.env,s=r.localPackage||f(),a=r.globalInstall??isGlobalPackageInstall(s.root),l=r.npx??isNpxExecution(o);if(!a||l||shouldSkipStartupUpdate(e,o))return{status:"skipped",handled:!1,source:null};const i=r.now??Date.now(),u=r.cachePath||resolveUpdateCachePath(o),c=function(e,r,o){try{if(!t(e))return null;const s=JSON.parse(n(e,"utf-8"));if(s.package_name!==r.name||!Number.isFinite(s.checked_at))return null;const a=s.latest?216e5:6e5;return o-s.checked_at>=a?null:{result:{current:r.version,latest:s.latest,up_to_date:s.latest?m(r.version,s.latest)>=0:null,source:s.source,registry:s.registry,errors:Array.isArray(s.errors)?s.errors:[],error:s.latest?null:(s.errors||[]).map(e=>`${e.source}: ${e.error}`).join("; ")||"unknown"},installAttemptedAt:s.latest&&s.install_attempted_version===s.latest&&Number.isFinite(s.install_attempted_at)?s.install_attempted_at:null}}catch{return null}}(u,s,i);let g=c?.result,x=c?.installAttemptedAt||null;if(g||(g=await d({localPackage:s,fetchFn:r.fetchFn}),A(u,s.name,i,g),x=null),!g.latest)return{status:"unavailable",handled:!1,source:null};if(g.up_to_date)return{status:"current",handled:!1,source:g.source};if(null!==x&&i-x<36e5)return{status:"update_failed",handled:!1,source:g.source};const v=r.output||console.log,y=r.errorOutput||console.error,T=r.installRunner||P,b=isPnpmGlobalInstall(s.root),w=b?"win32"===process.platform?"pnpm.cmd":"pnpm":"win32"===process.platform?"npm.cmd":"npm",I=b?null:resolveNpmGlobalPrefix(s.root);v(k(p.cyan,h.t("update.auto_installing",{version:g.latest})));let E=null,N="unknown";for(const e of _.map(e=>e.registry)){const t=T(w,b?["add","--global",`${s.name}@${g.latest}`,"--registry",e]:["install","--global",...I?["--prefix",I]:[],`${s.name}@${g.latest}`,"--registry",e,"--no-audit","--no-fund","--fetch-timeout=15000","--fetch-retries=1","--fetch-retry-mintimeout=1000","--fetch-retry-maxtimeout=3000"]);if(0===t.status){E=e;break}N=t.error?.message||`exit ${t.status??"unknown"}`}if(!E)return A(u,s.name,i,g,i),y(k(p.yellow,h.t("update.auto_failed",{error:N}))),{status:"update_failed",handled:!1,source:g.source};v(k(p.green,h.t("update.auto_installed",{version:g.latest})));const U=(r.reexecRunner||$)(e,{...o,[S("SKIP_AUTO_UPDATE")]:"1"});return U.error?(y(k(p.yellow,h.t("update.reexec_failed",{error:U.error.message}))),{status:"update_failed",handled:!1,source:g.source}):(process.exitCode=U.status??1,{status:"reexecuted",handled:!0,source:g.source})}
1
+ import{chmodSync as e,existsSync as t,mkdirSync as r,readFileSync as n,renameSync as o,writeFileSync as s}from"fs";import{homedir as a}from"os";import{dirname as l,join as i,sep as u}from"path";import{spawnSync as c}from"child_process";import p from"chalk";import{checkForUpdate as d,readLocalPackage as m,UPDATE_SOURCES as f}from"../commands/update.js";import{i18n as _}from"./i18n.js";import{isColorEnabled as h}from"./runtime-options.js";import{logger as g}from"../utils/logger.js";import{isHelpRequest as x}from"./cli-help.js";import{brand as v,brandEnvName as y}from"./brand.js";export const INSTALL_RETRY_INTERVAL_MS=36e5;export const INSTALL_TIMEOUT_MS=45e3;function k(e,t){return h()?e(t):t}export function resolveUpdateCachePath(e=process.env){const t=e[y("CONFIG_DIR")]?.trim();if(t)return i(t,"update-state.json");const r=e[y("TEST_HOME")]?.trim();return i(r||a(),v().configDirName,"update-state.json")}export function isGlobalPackageInstall(e){return e.split(u).includes("node_modules")}export function isNpxExecution(e=process.env){return"exec"===e.npm_command||"npx"===e.npm_lifecycle_event}export function isPnpmGlobalInstall(e){return e.includes(`${u}.pnpm${u}`)||e.includes(`${u}pnpm${u}global${u}`)}export function resolveNpmGlobalPrefix(e){const t=`${u}node_modules${u}`,r=e.indexOf(t);if(r<0)return null;const n=e.slice(0,r);return n.endsWith(`${u}lib`)?l(n):n}export function shouldSkipStartupUpdate(e,t=process.env){return"1"===t[y("SKIP_AUTO_UPDATE")]||"1"===t[y("DISABLE_AUTO_UPDATE")]||(!(!["--json","--non-interactive","--dry-run","--help","-h","--version","-v"].some(t=>e.includes(t))&&!x(e))||e.includes("update")||e.includes("completion"))}function S(t,n,a,i,u){try{r(l(t),{recursive:!0,mode:448});const c=`${t}.tmp-${process.pid}`,p={package_name:n,checked_at:a,latest:i.latest,source:i.source,registry:i.registry,errors:i.errors,...void 0===u?{}:{install_attempted_at:u,install_attempted_version:i.latest||void 0}};s(c,JSON.stringify(p),{encoding:"utf-8",mode:384}),o(c,t),e(t,384)}catch(e){g.warn("Failed to persist update check cache:",e)}}export function windowsShellCommand(e,t){return[e,...t.map(e=>`"${e}"`)].join(" ")}const $=(e,t)=>{const r={stdio:"inherit",timeout:45e3,killSignal:"SIGTERM"};return"win32"===process.platform?c(windowsShellCommand(e,t),{...r,shell:!0}):c(e,t,r)},P=(e,t)=>c(process.execPath,[process.argv[1],...e],{stdio:"inherit",env:t});export async function runStartupUpdate(e,r={}){const o=r.env||process.env,s=r.localPackage||m(),a=r.globalInstall??isGlobalPackageInstall(s.root),l=r.npx??isNpxExecution(o);if(!a||l||shouldSkipStartupUpdate(e,o))return{status:"skipped",handled:!1,source:null};const i=r.now??Date.now(),u=r.cachePath||resolveUpdateCachePath(o),c=function(e,r){try{if(!t(e))return null;const o=JSON.parse(n(e,"utf-8"));return o.package_name===r.name&&Number.isFinite(o.checked_at)?o:null}catch{return null}}(u,s);let h=function(e,t,r){if(!e||e.latest||r-e.checked_at>=6e5)return null;const n=Array.isArray(e.errors)?e.errors:[];return{current:t.version,latest:null,up_to_date:null,source:e.source,registry:e.registry,errors:n,error:n.map(e=>`${e.source}: ${e.error}`).join("; ")||"unknown"}}(c,s,i),g=null;if(h||(h=await d({localPackage:s,fetchFn:r.fetchFn}),h.latest&&c?.install_attempted_version===h.latest&&Number.isFinite(c.install_attempted_at)&&(g=c.install_attempted_at),S(u,s.name,i,h,g??void 0)),!h.latest)return{status:"unavailable",handled:!1,source:null};if(h.up_to_date)return{status:"current",handled:!1,source:h.source};if(null!==g&&i-g<36e5)return{status:"update_failed",handled:!1,source:h.source};const x=r.output||console.log,v=r.errorOutput||console.error,b=r.installRunner||$,w=isPnpmGlobalInstall(s.root),I=w?"win32"===process.platform?"pnpm.cmd":"pnpm":"win32"===process.platform?"npm.cmd":"npm",T=w?null:resolveNpmGlobalPrefix(s.root);x(k(p.cyan,_.t("update.auto_installing",{version:h.latest})));let N=null,A="unknown";for(const e of f.map(e=>e.registry)){const t=b(I,w?["add","--global",`${s.name}@${h.latest}`,"--registry",e]:["install","--global",...T?["--prefix",T]:[],`${s.name}@${h.latest}`,"--registry",e,"--no-audit","--no-fund","--fetch-timeout=15000","--fetch-retries=1","--fetch-retry-mintimeout=1000","--fetch-retry-maxtimeout=3000"]);if(0===t.status){N=e;break}A=t.error?.message||`exit ${t.status??"unknown"}`}if(!N)return S(u,s.name,i,h,i),v(k(p.yellow,_.t("update.auto_failed",{error:A}))),{status:"update_failed",handled:!1,source:h.source};x(k(p.green,_.t("update.auto_installed",{version:h.latest})));const E=(r.reexecRunner||P)(e,{...o,[y("SKIP_AUTO_UPDATE")]:"1"});return E.error?(v(k(p.yellow,_.t("update.reexec_failed",{error:E.error.message}))),{status:"update_failed",handled:!1,source:h.source}):(process.exitCode=E.status??1,{status:"reexecuted",handled:!0,source:h.source})}
@@ -874,7 +874,7 @@
874
874
  },
875
875
  "update": {
876
876
  "summary": "Check for a newer {{product}}",
877
- "description": "Checks {{updateSources}} in turn and prints the install command when a newer version exists.\nA global install also checks at startup (every 6 hours) and, when there is a newer version, installs it and reruns the command.",
877
+ "description": "Checks {{updateSources}} in turn and prints the install command when a newer version exists.\nA global install also checks at every start and, when there is a newer version, installs it and reruns the command.",
878
878
  "ex": {
879
879
  "check": "Check for a new version",
880
880
  "json": "Print JSON"
@@ -874,7 +874,7 @@
874
874
  },
875
875
  "update": {
876
876
  "summary": "检查 {{product}} 是否有新版本",
877
- "description": "依次查询这些来源:{{updateSources}}。有新版本时给出安装命令。\n全局安装的 {{product}} 启动时也会检查(每 6 小时一次),有新版本时自动安装并重新运行当前命令。",
877
+ "description": "依次查询这些来源:{{updateSources}}。有新版本时给出安装命令。\n全局安装的 {{product}} 每次启动时也会检查,有新版本时自动安装并重新运行当前命令。",
878
878
  "ex": {
879
879
  "check": "检查新版本",
880
880
  "json": "输出 JSON"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-vibeway/cli",
3
- "version": "0.0.137",
3
+ "version": "0.0.138",
4
4
  "description": "Configure Claude Code, Codex, Grok Build and other coding tools for VibeWay with one command",
5
5
  "main": "dist/index.js",
6
6
  "bin": {