@wrongstack/cli 0.302.0 → 0.302.2

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.
Files changed (112) hide show
  1. package/data/providers.json +41 -155
  2. package/dist/{acp-DATHHPNT.js → acp-XCE4JJF3.js} +4 -4
  3. package/dist/{audit-QRCLEHHW.js → audit-BBR22QH3.js} +2 -2
  4. package/dist/{auth-PJD3JRH2.js → auth-K7CYVVKH.js} +121 -78
  5. package/dist/auth-menu/index.d.ts +5 -5
  6. package/dist/auth-menu/local.d.ts +4 -5
  7. package/dist/auth-menu/openai-codex-oauth.d.ts +1 -1
  8. package/dist/{auto-discover-providers-DRW4OZHG.js → auto-discover-providers-MHFLDSD3.js} +2 -2
  9. package/dist/{bench-7ZDWSNEF.js → bench-XNDUJOSZ.js} +10 -11
  10. package/dist/boot/auto-discover-providers.d.ts +1 -1
  11. package/dist/boot/container-wiring.d.ts +3 -3
  12. package/dist/boot/dispatch-webui.d.ts +1 -1
  13. package/dist/boot/system-prompt.d.ts +1 -2
  14. package/dist/boot/tool-registry.d.ts +1 -1
  15. package/dist/boot/tui-coordinator-setup.d.ts +1 -1
  16. package/dist/boot/tui-project-picker-callback.d.ts +1 -1
  17. package/dist/boot-config.d.ts +2 -2
  18. package/dist/boot.d.ts +1 -1
  19. package/dist/{chunk-ETOEGL3V.js → chunk-3IC4IEZC.js} +7 -2
  20. package/dist/{chunk-PFVVUH5B.js → chunk-3JPTNADJ.js} +3 -2
  21. package/dist/{chunk-4GVH7V3S.js → chunk-52C7PD2H.js} +1 -1
  22. package/dist/{chunk-OP47B3IX.js → chunk-7YLN7YUA.js} +7 -2
  23. package/dist/{chunk-263G3FMB.js → chunk-B4JLSXZB.js} +11 -14
  24. package/dist/{chunk-I5MEUFDI.js → chunk-BXQG3H2Y.js} +8 -3
  25. package/dist/{chunk-MT6FGXO3.js → chunk-C5NXM2SI.js} +19 -6
  26. package/dist/{chunk-XTIXVJXP.js → chunk-DGXNL7OT.js} +1 -1
  27. package/dist/{chunk-3MOUBRKZ.js → chunk-FJVCVZIV.js} +974 -935
  28. package/dist/{chunk-MRLYDHQ7.js → chunk-JQURRYU4.js} +4 -6
  29. package/dist/{chunk-ZECLGUTF.js → chunk-KV6DNQT6.js} +2 -2
  30. package/dist/{chunk-F4PEGAJZ.js → chunk-NUIHRGPY.js} +1 -1
  31. package/dist/{chunk-GUHQQG63.js → chunk-RK7E3IXT.js} +2 -4
  32. package/dist/{chunk-PYTFS4MC.js → chunk-SSSJQVUY.js} +27 -16
  33. package/dist/{chunk-PJHET45A.js → chunk-SZ42FYPT.js} +3 -3
  34. package/dist/{chunk-2KDOFTTM.js → chunk-WOXUE2CN.js} +1067 -900
  35. package/dist/{chunk-A6Q5KGLV.js → chunk-YKBRFSGL.js} +5 -5
  36. package/dist/cli-context.d.ts +2 -2
  37. package/dist/cli-eternal-flag.d.ts +1 -2
  38. package/dist/{cli-main-EOJ74CI4.js → cli-main-PJMDZHDK.js} +2680 -2133
  39. package/dist/context-limit.d.ts +11 -5
  40. package/dist/{diag-doctor-OQ3AA63O.js → diag-doctor-ZF5BF2MK.js} +2 -3
  41. package/dist/execute-deps.d.ts +1 -1
  42. package/dist/{execution-CQ772VPS.js → execution-LZRYRGDD.js} +234 -143
  43. package/dist/{export-DOBGPY23.js → export-CCUXRJOU.js} +3 -11
  44. package/dist/fleet/host-supervisor.d.ts +1 -1
  45. package/dist/fleet/host.d.ts +1 -1
  46. package/dist/fleet/routing.d.ts +1 -2
  47. package/dist/goal-host.d.ts +2 -2
  48. package/dist/hooks-wiring.d.ts +1 -1
  49. package/dist/{hq-LN5CJHCM.js → hq-AHPAE7EN.js} +104 -55
  50. package/dist/hq-command-controller.d.ts +1 -1
  51. package/dist/hq-server/routes/system-handlers.d.ts +1 -2
  52. package/dist/hq-server/routes.d.ts +7 -7
  53. package/dist/{hq-server-S7HZG3PA.js → hq-server-KU2Z54QU.js} +2 -2
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +2635 -2642
  56. package/dist/mailbox-bridge-bootstrap.d.ts +2 -2
  57. package/dist/{mcp-OHPJH73U.js → mcp-E5EBGOHF.js} +6 -6
  58. package/dist/mcp-serve.d.ts +1 -1
  59. package/dist/{modeldiag-3DOK4BWW.js → modeldiag-SIVUOX2Y.js} +18 -13
  60. package/dist/{permissions-FNYLZIL4.js → permissions-2PWBL4YU.js} +5 -3
  61. package/dist/picker.d.ts +1 -1
  62. package/dist/plugin-management.d.ts +1 -1
  63. package/dist/{plugin-usage-YEVLOR33.js → plugin-usage-PTEETL3J.js} +2 -2
  64. package/dist/{plugins-K3BAUP4D.js → plugins-XRGWC3NJ.js} +3 -3
  65. package/dist/pre-launch.d.ts +2 -2
  66. package/dist/{providers-models-WEZ4EGLL.js → providers-models-VV74TRQ2.js} +86 -37
  67. package/dist/repl.d.ts +1 -1
  68. package/dist/{replay-FCBNHW3K.js → replay-WBRMEWQ5.js} +2 -2
  69. package/dist/{rewind-AOD3JIYX.js → rewind-7RE6ONIC.js} +17 -17
  70. package/dist/{sdd-runtime-AIJCJGWC.js → sdd-runtime-GFZ3NJKS.js} +2 -2
  71. package/dist/{sessions-config-XXN7267N.js → sessions-config-YX2ZPAFM.js} +36 -32
  72. package/dist/{simpleui-dist-JIFGUJO7.js → simpleui-dist-33VO3QHF.js} +9 -2
  73. package/dist/slash-commands/agents.d.ts +14 -0
  74. package/dist/slash-commands/command-context.d.ts +2 -3
  75. package/dist/slash-commands/helpers.d.ts +1 -1
  76. package/dist/slash-commands/index.d.ts +1 -1
  77. package/dist/slash-commands/intake.d.ts +10 -0
  78. package/dist/slash-commands/memory-triage.d.ts +1 -1
  79. package/dist/slash-commands/provider-status.d.ts +1 -1
  80. package/dist/subcommands/handlers/hq.d.ts +20 -0
  81. package/dist/subcommands/handlers/per-subcommand-help-data.d.ts +1 -1
  82. package/dist/{update-MV6TUACD.js → update-LTDJGAFU.js} +3 -3
  83. package/dist/{update-check-UMYTOH7Z.js → update-check-WARHSVZA.js} +2 -2
  84. package/dist/webui-server/connection-handler.d.ts +1 -1
  85. package/dist/webui-server/context-breakdown.d.ts +1 -1
  86. package/dist/webui-server/cost-helpers.d.ts +1 -1
  87. package/dist/webui-server/lifecycle.d.ts +1 -1
  88. package/dist/webui-server/prefs-seeding.d.ts +1 -1
  89. package/dist/webui-server/setup-events.d.ts +1 -1
  90. package/dist/webui-server/static-serve.d.ts +1 -1
  91. package/dist/{webui-server-NFNRGNNT.js → webui-server-E3OPEKU5.js} +18 -10
  92. package/dist/webui-server-options.d.ts +1 -1
  93. package/dist/wiring/command-host-state.d.ts +2 -2
  94. package/dist/wiring/controllers.d.ts +1 -2
  95. package/dist/wiring/dep-watcher.d.ts +1 -1
  96. package/dist/wiring/director-setup.d.ts +3 -3
  97. package/dist/wiring/eternal-command-handlers.d.ts +2 -2
  98. package/dist/wiring/management-tools.d.ts +2 -2
  99. package/dist/wiring/provider-runtime.d.ts +1 -1
  100. package/dist/wiring/provider-status.d.ts +1 -1
  101. package/dist/wiring/provider-utility-tools.d.ts +3 -3
  102. package/dist/wiring/provider.d.ts +1 -1
  103. package/dist/wiring/replay.d.ts +1 -1
  104. package/dist/wiring/runtime-controller-deps.d.ts +1 -1
  105. package/dist/wiring/runtime-dispatch-state.d.ts +1 -2
  106. package/dist/wiring/runtime-lifecycle-deps.d.ts +2 -2
  107. package/dist/wiring/runtime-picker-deps.d.ts +1 -2
  108. package/dist/wiring/sage.d.ts +1 -1
  109. package/dist/wiring/session-command-handlers.d.ts +1 -2
  110. package/dist/wiring/session.d.ts +6 -1
  111. package/dist/wiring/slash-commands.d.ts +2 -3
  112. package/package.json +23 -23
@@ -13,24 +13,13 @@
13
13
  "default": "enabled",
14
14
  "disableSupported": false,
15
15
  "effortSupported": true,
16
- "effortLevels": [
17
- "low",
18
- "medium",
19
- "high",
20
- "xhigh",
21
- "max"
22
- ],
16
+ "effortLevels": ["low", "medium", "high", "xhigh", "max"],
23
17
  "preserveThinking": "unsupported"
24
18
  },
25
19
  "tool_call": true,
26
20
  "modalities": {
27
- "input": [
28
- "text",
29
- "image"
30
- ],
31
- "output": [
32
- "text"
33
- ]
21
+ "input": ["text", "image"],
22
+ "output": ["text"]
34
23
  },
35
24
  "limit": {
36
25
  "context": 1050000,
@@ -44,13 +33,8 @@
44
33
  "reasoning": true,
45
34
  "tool_call": true,
46
35
  "modalities": {
47
- "input": [
48
- "text",
49
- "image"
50
- ],
51
- "output": [
52
- "text"
53
- ]
36
+ "input": ["text", "image"],
37
+ "output": ["text"]
54
38
  },
55
39
  "limit": {
56
40
  "context": 1050000,
@@ -66,24 +50,13 @@
66
50
  "default": "enabled",
67
51
  "disableSupported": false,
68
52
  "effortSupported": true,
69
- "effortLevels": [
70
- "low",
71
- "medium",
72
- "high",
73
- "xhigh",
74
- "max"
75
- ],
53
+ "effortLevels": ["low", "medium", "high", "xhigh", "max"],
76
54
  "preserveThinking": "unsupported"
77
55
  },
78
56
  "tool_call": true,
79
57
  "modalities": {
80
- "input": [
81
- "text",
82
- "image"
83
- ],
84
- "output": [
85
- "text"
86
- ]
58
+ "input": ["text", "image"],
59
+ "output": ["text"]
87
60
  },
88
61
  "limit": {
89
62
  "context": 1050000,
@@ -99,24 +72,13 @@
99
72
  "default": "enabled",
100
73
  "disableSupported": false,
101
74
  "effortSupported": true,
102
- "effortLevels": [
103
- "low",
104
- "medium",
105
- "high",
106
- "xhigh",
107
- "max"
108
- ],
75
+ "effortLevels": ["low", "medium", "high", "xhigh", "max"],
109
76
  "preserveThinking": "unsupported"
110
77
  },
111
78
  "tool_call": true,
112
79
  "modalities": {
113
- "input": [
114
- "text",
115
- "image"
116
- ],
117
- "output": [
118
- "text"
119
- ]
80
+ "input": ["text", "image"],
81
+ "output": ["text"]
120
82
  },
121
83
  "limit": {
122
84
  "context": 1050000,
@@ -130,13 +92,8 @@
130
92
  "reasoning": true,
131
93
  "tool_call": true,
132
94
  "modalities": {
133
- "input": [
134
- "text",
135
- "image"
136
- ],
137
- "output": [
138
- "text"
139
- ]
95
+ "input": ["text", "image"],
96
+ "output": ["text"]
140
97
  },
141
98
  "limit": {
142
99
  "context": 1050000,
@@ -150,13 +107,8 @@
150
107
  "reasoning": true,
151
108
  "tool_call": true,
152
109
  "modalities": {
153
- "input": [
154
- "text",
155
- "image"
156
- ],
157
- "output": [
158
- "text"
159
- ]
110
+ "input": ["text", "image"],
111
+ "output": ["text"]
160
112
  },
161
113
  "limit": {
162
114
  "context": 400000,
@@ -170,12 +122,8 @@
170
122
  "reasoning": true,
171
123
  "tool_call": true,
172
124
  "modalities": {
173
- "input": [
174
- "text"
175
- ],
176
- "output": [
177
- "text"
178
- ]
125
+ "input": ["text"],
126
+ "output": ["text"]
179
127
  },
180
128
  "limit": {
181
129
  "context": 128000,
@@ -196,13 +144,8 @@
196
144
  "reasoning": true,
197
145
  "tool_call": true,
198
146
  "modalities": {
199
- "input": [
200
- "text",
201
- "image"
202
- ],
203
- "output": [
204
- "text"
205
- ]
147
+ "input": ["text", "image"],
148
+ "output": ["text"]
206
149
  }
207
150
  },
208
151
  "qwen3.7-max": {
@@ -212,12 +155,8 @@
212
155
  "reasoning": true,
213
156
  "tool_call": true,
214
157
  "modalities": {
215
- "input": [
216
- "text"
217
- ],
218
- "output": [
219
- "text"
220
- ]
158
+ "input": ["text"],
159
+ "output": ["text"]
221
160
  }
222
161
  },
223
162
  "qwen3.7-plus": {
@@ -227,13 +166,8 @@
227
166
  "reasoning": true,
228
167
  "tool_call": true,
229
168
  "modalities": {
230
- "input": [
231
- "text",
232
- "image"
233
- ],
234
- "output": [
235
- "text"
236
- ]
169
+ "input": ["text", "image"],
170
+ "output": ["text"]
237
171
  }
238
172
  },
239
173
  "qwen3.6-flash": {
@@ -243,13 +177,8 @@
243
177
  "reasoning": true,
244
178
  "tool_call": true,
245
179
  "modalities": {
246
- "input": [
247
- "text",
248
- "image"
249
- ],
250
- "output": [
251
- "text"
252
- ]
180
+ "input": ["text", "image"],
181
+ "output": ["text"]
253
182
  }
254
183
  },
255
184
  "glm-5.2": {
@@ -259,12 +188,8 @@
259
188
  "reasoning": true,
260
189
  "tool_call": true,
261
190
  "modalities": {
262
- "input": [
263
- "text"
264
- ],
265
- "output": [
266
- "text"
267
- ]
191
+ "input": ["text"],
192
+ "output": ["text"]
268
193
  }
269
194
  },
270
195
  "deepseek-v4-pro": {
@@ -274,12 +199,8 @@
274
199
  "reasoning": true,
275
200
  "tool_call": true,
276
201
  "modalities": {
277
- "input": [
278
- "text"
279
- ],
280
- "output": [
281
- "text"
282
- ]
202
+ "input": ["text"],
203
+ "output": ["text"]
283
204
  }
284
205
  },
285
206
  "wan2.7-image": {
@@ -288,12 +209,8 @@
288
209
  "description": "Text-to-image generation model by Wanx.",
289
210
  "reasoning": false,
290
211
  "modalities": {
291
- "input": [
292
- "text"
293
- ],
294
- "output": [
295
- "image"
296
- ]
212
+ "input": ["text"],
213
+ "output": ["image"]
297
214
  }
298
215
  },
299
216
  "wan2.7-image-pro": {
@@ -302,12 +219,8 @@
302
219
  "description": "Higher-quality text-to-image generation model by Wanx.",
303
220
  "reasoning": false,
304
221
  "modalities": {
305
- "input": [
306
- "text"
307
- ],
308
- "output": [
309
- "image"
310
- ]
222
+ "input": ["text"],
223
+ "output": ["image"]
311
224
  }
312
225
  },
313
226
  "happyhorse-1.1-t2v": {
@@ -316,12 +229,8 @@
316
229
  "description": "Text-to-video generation model by HappyHorse.",
317
230
  "reasoning": false,
318
231
  "modalities": {
319
- "input": [
320
- "text"
321
- ],
322
- "output": [
323
- "video"
324
- ]
232
+ "input": ["text"],
233
+ "output": ["video"]
325
234
  }
326
235
  },
327
236
  "happyhorse-1.1-i2v": {
@@ -330,13 +239,8 @@
330
239
  "description": "Image-to-video generation model by HappyHorse.",
331
240
  "reasoning": false,
332
241
  "modalities": {
333
- "input": [
334
- "text",
335
- "image"
336
- ],
337
- "output": [
338
- "video"
339
- ]
242
+ "input": ["text", "image"],
243
+ "output": ["video"]
340
244
  }
341
245
  },
342
246
  "happyhorse-1.1-r2v": {
@@ -345,13 +249,8 @@
345
249
  "description": "Reference-to-video generation model by HappyHorse.",
346
250
  "reasoning": false,
347
251
  "modalities": {
348
- "input": [
349
- "text",
350
- "image"
351
- ],
352
- "output": [
353
- "video"
354
- ]
252
+ "input": ["text", "image"],
253
+ "output": ["video"]
355
254
  }
356
255
  }
357
256
  }
@@ -379,20 +278,7 @@
379
278
  "watsonx"
380
279
  ],
381
280
  "_removeModels": {
382
- "openai": [
383
- "gpt-4o-mini",
384
- "gpt-4o",
385
- "gpt-4",
386
- "gpt-4-turbo",
387
- "o1",
388
- "o1-mini",
389
- "o3-mini"
390
- ],
391
- "deepseek": [
392
- "deepseek-chat",
393
- "deepseek-reasoner",
394
- "deepseek-v3.2",
395
- "deepseek-v4-flash"
396
- ]
281
+ "openai": ["gpt-4o-mini", "gpt-4o", "gpt-4", "gpt-4-turbo", "o1", "o1-mini", "o3-mini"],
282
+ "deepseek": ["deepseek-chat", "deepseek-reasoner", "deepseek-v3.2", "deepseek-v4-flash"]
397
283
  }
398
284
  }
@@ -3,9 +3,9 @@ import {
3
3
  loadCachedAcpRegistry,
4
4
  refreshAcpRegistry,
5
5
  setupProvider
6
- } from "./chunk-MRLYDHQ7.js";
7
- import "./chunk-PYTFS4MC.js";
8
- import "./chunk-PJHET45A.js";
6
+ } from "./chunk-JQURRYU4.js";
7
+ import "./chunk-SSSJQVUY.js";
8
+ import "./chunk-SZ42FYPT.js";
9
9
  import "./chunk-7OCVIDC7.js";
10
10
 
11
11
  // src/subcommands/handlers/acp.ts
@@ -908,4 +908,4 @@ ${renderAcpBenchText(result)}
908
908
  export {
909
909
  acpCmd
910
910
  };
911
- //# sourceMappingURL=acp-DATHHPNT.js.map
911
+ //# sourceMappingURL=acp-XCE4JJF3.js.map
@@ -4,8 +4,8 @@ import {
4
4
  import "./chunk-7OCVIDC7.js";
5
5
 
6
6
  // src/subcommands/handlers/audit.ts
7
- import { color, resolveWstackPaths } from "@wrongstack/core/utils";
8
7
  import { ToolAuditLog } from "@wrongstack/core/storage";
8
+ import { color, resolveWstackPaths } from "@wrongstack/core/utils";
9
9
  var auditCmd = async (args, deps) => {
10
10
  args = restoreFlags(args, deps, ["list", "l"]);
11
11
  const wpaths = resolveWstackPaths({
@@ -103,4 +103,4 @@ async function listAudits(log, dir, deps) {
103
103
  export {
104
104
  auditCmd
105
105
  };
106
- //# sourceMappingURL=audit-QRCLEHHW.js.map
106
+ //# sourceMappingURL=audit-BBR22QH3.js.map
@@ -13,12 +13,15 @@ import {
13
13
  runOAuthLoginKind,
14
14
  runOAuthLoginMenu,
15
15
  validateFamily
16
- } from "./chunk-3MOUBRKZ.js";
16
+ } from "./chunk-FJVCVZIV.js";
17
+ import "./chunk-SSSJQVUY.js";
18
+ import {
19
+ restoreFlags
20
+ } from "./chunk-CSAPOCBP.js";
17
21
  import {
18
22
  parseAuthFlags
19
- } from "./chunk-MT6FGXO3.js";
20
- import "./chunk-ETOEGL3V.js";
21
- import "./chunk-PYTFS4MC.js";
23
+ } from "./chunk-C5NXM2SI.js";
24
+ import "./chunk-3IC4IEZC.js";
22
25
  import {
23
26
  loadConfigProviders,
24
27
  maskedKey,
@@ -26,11 +29,8 @@ import {
26
29
  normalizeKeys,
27
30
  nowIso,
28
31
  writeKeysBack
29
- } from "./chunk-PJHET45A.js";
30
- import {
31
- restoreFlags
32
- } from "./chunk-CSAPOCBP.js";
33
- import "./chunk-263G3FMB.js";
32
+ } from "./chunk-SZ42FYPT.js";
33
+ import "./chunk-B4JLSXZB.js";
34
34
  import {
35
35
  activeProfileConfigPath
36
36
  } from "./chunk-YMXXOOFN.js";
@@ -77,18 +77,23 @@ async function runAuthDirect(deps, opts) {
77
77
  }
78
78
  const apiKey = await readKeyInput(deps, `API key for ${providerId}/${label}`);
79
79
  if (!apiKey) return 1;
80
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
81
- const p = all[providerId] ?? { type: providerId };
82
- if (!p.type) p.type = providerId;
83
- if (!p.family && opts.family) p.family = opts.family;
84
- if (!p.baseUrl && opts.baseUrl) p.baseUrl = opts.baseUrl;
85
- if (!p.envVars && opts.envVars) p.envVars = opts.envVars;
86
- const list = normalizeKeys(p);
87
- list.push({ label, apiKey, createdAt: nowIso() });
88
- writeKeysBack(p, list);
89
- if (!p.activeKey) p.activeKey = label;
90
- all[providerId] = p;
91
- }, deps.profileConfigPath);
80
+ await mutateConfigProviders(
81
+ deps.profileConfigPath,
82
+ deps.vault,
83
+ (all) => {
84
+ const p = all[providerId] ?? { type: providerId };
85
+ if (!p.type) p.type = providerId;
86
+ if (!p.family && opts.family) p.family = opts.family;
87
+ if (!p.baseUrl && opts.baseUrl) p.baseUrl = opts.baseUrl;
88
+ if (!p.envVars && opts.envVars) p.envVars = opts.envVars;
89
+ const list = normalizeKeys(p);
90
+ list.push({ label, apiKey, createdAt: nowIso() });
91
+ writeKeysBack(p, list);
92
+ if (!p.activeKey) p.activeKey = label;
93
+ all[providerId] = p;
94
+ },
95
+ deps.profileConfigPath
96
+ );
92
97
  deps.renderer.writeInfo(`Stored encrypted key for ${providerId} (label "${label}").`);
93
98
  deps.renderer.writeInfo(`Use: wstack --provider ${providerId} "<task>"`);
94
99
  return 0;
@@ -134,9 +139,14 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
134
139
  );
135
140
  if (answer === null) return "continue";
136
141
  if (answer) {
137
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
138
- delete all[providerId];
139
- }, deps.profileConfigPath);
142
+ await mutateConfigProviders(
143
+ deps.profileConfigPath,
144
+ deps.vault,
145
+ (all) => {
146
+ delete all[providerId];
147
+ },
148
+ deps.profileConfigPath
149
+ );
140
150
  deps.renderer.write(` ${color.green("\u2713")} Removed ${providerId}.
141
151
  `);
142
152
  return "exit";
@@ -148,14 +158,19 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
148
158
  const target = expectDefined(keys[arg - 1]);
149
159
  const newKey = await readKeyInput(deps, `New key for ${target.label}`);
150
160
  if (!newKey) return "continue";
151
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
152
- const p = all[providerId];
153
- if (!p) return;
154
- const list = normalizeKeys(p).map(
155
- (k) => k.label === target.label ? { ...k, apiKey: newKey, createdAt: nowIso() } : k
156
- );
157
- writeKeysBack(p, list);
158
- }, deps.profileConfigPath);
161
+ await mutateConfigProviders(
162
+ deps.profileConfigPath,
163
+ deps.vault,
164
+ (all) => {
165
+ const p = all[providerId];
166
+ if (!p) return;
167
+ const list = normalizeKeys(p).map(
168
+ (k) => k.label === target.label ? { ...k, apiKey: newKey, createdAt: nowIso() } : k
169
+ );
170
+ writeKeysBack(p, list);
171
+ },
172
+ deps.profileConfigPath
173
+ );
159
174
  deps.renderer.write(` ${color.green("\u2713")} Updated ${providerId}/${target.label}.
160
175
  `);
161
176
  return "continue";
@@ -169,15 +184,20 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
169
184
  );
170
185
  if (answer === null) return "continue";
171
186
  if (!answer) return "continue";
172
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
173
- const p = all[providerId];
174
- if (!p) return;
175
- const list = normalizeKeys(p).filter((k) => k.label !== target.label);
176
- writeKeysBack(p, list);
177
- if (p.activeKey === target.label) {
178
- p.activeKey = list[0]?.label;
179
- }
180
- }, deps.profileConfigPath);
187
+ await mutateConfigProviders(
188
+ deps.profileConfigPath,
189
+ deps.vault,
190
+ (all) => {
191
+ const p = all[providerId];
192
+ if (!p) return;
193
+ const list = normalizeKeys(p).filter((k) => k.label !== target.label);
194
+ writeKeysBack(p, list);
195
+ if (p.activeKey === target.label) {
196
+ p.activeKey = list[0]?.label;
197
+ }
198
+ },
199
+ deps.profileConfigPath
200
+ );
181
201
  deps.renderer.write(` ${color.green("\u2713")} Deleted ${providerId}/${target.label}.
182
202
  `);
183
203
  return "continue";
@@ -185,13 +205,18 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
185
205
  if (verb === "s" || verb === "set" || verb === "active") {
186
206
  if (!validKeyIndex(arg, keys.length, deps, "s")) return "continue";
187
207
  const target = expectDefined(keys[arg - 1]);
188
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
189
- const p = all[providerId];
190
- if (!p) return;
191
- const list = normalizeKeys(p);
192
- writeKeysBack(p, list);
193
- p.activeKey = target.label;
194
- }, deps.profileConfigPath);
208
+ await mutateConfigProviders(
209
+ deps.profileConfigPath,
210
+ deps.vault,
211
+ (all) => {
212
+ const p = all[providerId];
213
+ if (!p) return;
214
+ const list = normalizeKeys(p);
215
+ writeKeysBack(p, list);
216
+ p.activeKey = target.label;
217
+ },
218
+ deps.profileConfigPath
219
+ );
195
220
  deps.renderer.write(` ${color.green("\u2713")} Active key \u2192 ${color.bold(target.label)}.
196
221
  `);
197
222
  return "continue";
@@ -209,19 +234,29 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
209
234
  );
210
235
  return "continue";
211
236
  }
212
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
213
- const p = all[providerId];
214
- if (!p) return;
215
- p.family = validated;
216
- }, deps.profileConfigPath);
237
+ await mutateConfigProviders(
238
+ deps.profileConfigPath,
239
+ deps.vault,
240
+ (all) => {
241
+ const p = all[providerId];
242
+ if (!p) return;
243
+ p.family = validated;
244
+ },
245
+ deps.profileConfigPath
246
+ );
217
247
  deps.renderer.write(` ${color.green("\u2713")} family \u2192 ${validated}
218
248
  `);
219
249
  } else {
220
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
221
- const p = all[providerId];
222
- if (!p) return;
223
- delete p.family;
224
- }, deps.profileConfigPath);
250
+ await mutateConfigProviders(
251
+ deps.profileConfigPath,
252
+ deps.vault,
253
+ (all) => {
254
+ const p = all[providerId];
255
+ if (!p) return;
256
+ delete p.family;
257
+ },
258
+ deps.profileConfigPath
259
+ );
225
260
  deps.renderer.write(` ${color.green("\u2713")} family \u2192 (unset)
226
261
  `);
227
262
  }
@@ -232,12 +267,17 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
232
267
  const ans = (await deps.reader.readLine(
233
268
  ` ${color.amber("?")} Base URL ${color.dim(`(empty = unset, current: ${current || "unset"})`)}: `
234
269
  )).trim();
235
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
236
- const p = all[providerId];
237
- if (!p) return;
238
- if (ans === "") delete p.baseUrl;
239
- else p.baseUrl = ans;
240
- }, deps.profileConfigPath);
270
+ await mutateConfigProviders(
271
+ deps.profileConfigPath,
272
+ deps.vault,
273
+ (all) => {
274
+ const p = all[providerId];
275
+ if (!p) return;
276
+ if (ans === "") delete p.baseUrl;
277
+ else p.baseUrl = ans;
278
+ },
279
+ deps.profileConfigPath
280
+ );
241
281
  deps.renderer.write(` ${color.green("\u2713")} baseUrl \u2192 ${ans || "(unset)"}
242
282
  `);
243
283
  return "continue";
@@ -248,12 +288,17 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
248
288
  ` ${color.amber("?")} Model ids ${color.dim(`(comma-separated, empty = catalog default, current: ${current || "none"})`)}: `
249
289
  )).trim();
250
290
  const list = ans ? ans.split(",").map((s) => s.trim()).filter(Boolean) : [];
251
- await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
252
- const p = all[providerId];
253
- if (!p) return;
254
- if (list.length === 0) delete p.models;
255
- else p.models = list;
256
- }, deps.profileConfigPath);
291
+ await mutateConfigProviders(
292
+ deps.profileConfigPath,
293
+ deps.vault,
294
+ (all) => {
295
+ const p = all[providerId];
296
+ if (!p) return;
297
+ if (list.length === 0) delete p.models;
298
+ else p.models = list;
299
+ },
300
+ deps.profileConfigPath
301
+ );
257
302
  deps.renderer.write(
258
303
  ` ${color.green("\u2713")} models \u2192 ${list.length === 0 ? "(catalog default)" : list.join(", ")}
259
304
  `
@@ -371,14 +416,10 @@ function renderAuthLocalHelpToString() {
371
416
  lines.push("");
372
417
  lines.push(color3.dim(" See also: `wstack --help` for the top-level command list."));
373
418
  lines.push(
374
- color3.dim(
375
- " Examples: `wstack auth local --name ollama --no-probe --model 'llama3.1:8b'`"
376
- )
419
+ color3.dim(" Examples: `wstack auth local --name ollama --no-probe --model 'llama3.1:8b'`")
377
420
  );
378
421
  lines.push(
379
- color3.dim(
380
- " `wstack auth local --name ollama --audit /var/log/wstack-auth.jsonl`"
381
- )
422
+ color3.dim(" `wstack auth local --name ollama --audit /var/log/wstack-auth.jsonl`")
382
423
  );
383
424
  return lines.join("\n") + "\n";
384
425
  }
@@ -463,7 +504,9 @@ var authCmd = async (args, deps) => {
463
504
  if (!pid) return runOAuthLoginKind(menuDeps, "chatgpt");
464
505
  const kind = resolveOAuthKind(pid, { allowNumeric: false });
465
506
  if (kind) return runOAuthLoginKind(menuDeps, kind);
466
- deps.renderer.writeError("OAuth login is only supported for ChatGPT, Claude, and GitHub Copilot.");
507
+ deps.renderer.writeError(
508
+ "OAuth login is only supported for ChatGPT, Claude, and GitHub Copilot."
509
+ );
467
510
  deps.renderer.write(
468
511
  color4.dim(" Sign in with ChatGPT: ") + color4.bold("wstack auth login chatgpt") + "\n" + color4.dim(" Sign in with Claude: ") + color4.bold("wstack auth login claude") + "\n" + color4.dim(" Sign in with Copilot: ") + color4.bold("wstack auth login copilot") + "\n" + color4.dim(" For an API key instead: ") + color4.bold(`wstack auth ${pid}`) + "\n"
469
512
  );
@@ -614,4 +657,4 @@ async function runAuthRemove(deps, providerId) {
614
657
  export {
615
658
  authCmd
616
659
  };
617
- //# sourceMappingURL=auth-PJD3JRH2.js.map
660
+ //# sourceMappingURL=auth-K7CYVVKH.js.map
@@ -1,9 +1,9 @@
1
+ export { CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, runClaudeOAuthLogin, } from './anthropic-oauth.js';
1
2
  export { runAuthDirect } from './direct.js';
3
+ export { COPILOT_PROVIDER_ID, type CopilotLoginOptions, runCopilotOAuthLogin, } from './github-copilot-oauth.js';
4
+ export { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, probeLocalLlm, type RunAuthLocalOptions, resolveModelList, runAuthLocal, } from './local.js';
5
+ export { type OAuthMenuKind, resolveOAuthKind, runOAuthLoginChoice, runOAuthLoginKind, runOAuthLoginMenu, } from './oauth-menu.js';
6
+ export { CODEX_BASE_URL, CODEX_CATALOG_FAMILIES, CODEX_PROVIDER_ID, type CodexLoginOptions, type CodexTokens, extractAccountId, FALLBACK_CODEX_MODELS, fallbackCodexModelIds, fallbackCodexProviderModels, fetchCodexModels, filterCurrentCodexModelIds, isCodexCatalogModel, refreshCodexToken, resolveCodexModels, runCodexOAuthLogin, } from './openai-codex-oauth.js';
2
7
  export { runTopMenu as runAuthMenu } from './top-menu.js';
3
8
  export type { AuthMenuDeps } from './types.js';
4
- export { resolveOAuthKind, runOAuthLoginChoice, runOAuthLoginKind, runOAuthLoginMenu, type OAuthMenuKind, } from './oauth-menu.js';
5
- export { runCodexOAuthLogin, refreshCodexToken, extractAccountId, fetchCodexModels, resolveCodexModels, FALLBACK_CODEX_MODELS, CODEX_CATALOG_FAMILIES, fallbackCodexModelIds, fallbackCodexProviderModels, filterCurrentCodexModelIds, isCodexCatalogModel, CODEX_PROVIDER_ID, CODEX_BASE_URL, type CodexLoginOptions, type CodexTokens, } from './openai-codex-oauth.js';
6
- export { runClaudeOAuthLogin, CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, } from './anthropic-oauth.js';
7
- export { runCopilotOAuthLogin, COPILOT_PROVIDER_ID, type CopilotLoginOptions, } from './github-copilot-oauth.js';
8
- export { runAuthLocal, resolveModelList, probeLocalLlm, LOCAL_LLM_PRESETS, type RunAuthLocalOptions, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, } from './local.js';
9
9
  //# sourceMappingURL=index.d.ts.map