@wrongstack/cli 1.0.1 → 1.0.3

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 (54) hide show
  1. package/data/providers.json +21 -21
  2. package/dist/{acp-3LARESEO.js → acp-JK4ZQO3R.js} +4 -3
  3. package/dist/{auth-ZUMCDNE5.js → auth-XD3GN5RJ.js} +78 -54
  4. package/dist/auth-menu/index.d.ts +1 -0
  5. package/dist/auth-menu/oauth-menu.d.ts +3 -1
  6. package/dist/auth-menu/panel-service.d.ts +2 -0
  7. package/dist/auth-menu/provider-auth-login.d.ts +12 -0
  8. package/dist/auth-menu/types.d.ts +3 -0
  9. package/dist/auto-discover-providers-DXR25GTG.js +7 -0
  10. package/dist/boot/dispatch-webui.d.ts +1 -0
  11. package/dist/boot/system-prompt-builder.d.ts +7 -0
  12. package/dist/boot/system-prompt.d.ts +2 -1
  13. package/dist/chimera-reviewer-policy.d.ts +1 -1
  14. package/dist/{chunk-KHWDTNBZ.js → chunk-4NHD5OXJ.js} +2 -2
  15. package/dist/chunk-D5GB5MHA.js +87 -0
  16. package/dist/chunk-DAKVBMD4.js +36 -0
  17. package/dist/{chunk-ZSZ3EYWH.js → chunk-GMY45LO6.js} +9 -5
  18. package/dist/{chunk-D2VCUN7M.js → chunk-IUEKNHPT.js} +10 -10
  19. package/dist/{chunk-MNQQ4ZNF.js → chunk-ONOT5OJ2.js} +290 -687
  20. package/dist/chunk-SIGUWXAA.js +43 -0
  21. package/dist/{chunk-TEBMCYZN.js → chunk-SIS37L3W.js} +58 -2
  22. package/dist/{chunk-5IA5337I.js → chunk-U6KCWRMC.js} +4 -2
  23. package/dist/{cli-context-7X3M6U73.js → cli-context-Q6QP534K.js} +18 -7
  24. package/dist/{cli-main-53KG6HAV.js → cli-main-JQXCDZEA.js} +2909 -2277
  25. package/dist/execute-deps.d.ts +1 -0
  26. package/dist/{execution-MIBWBYB6.js → execution-KH7WJNAX.js} +11 -4
  27. package/dist/index.js +3 -3
  28. package/dist/live-settings-input.d.ts +2 -0
  29. package/dist/{mailbox-serve-VUCWZ2SJ.js → mailbox-serve-X3CR6VFW.js} +4 -3
  30. package/dist/{modeldiag-FMJT37SN.js → modeldiag-46CMWUNM.js} +31 -24
  31. package/dist/{plugin-usage-HFBI3TFT.js → plugin-usage-M6KET4OZ.js} +2 -2
  32. package/dist/{plugins-PZ2VZL7V.js → plugins-U7KGQAUG.js} +3 -3
  33. package/dist/{providers-models-YVMVYWRS.js → providers-models-6MOGAOVK.js} +2 -2
  34. package/dist/{short-circuit-flags-UREFSYBL.js → short-circuit-flags-ZNZX44MC.js} +2 -2
  35. package/dist/slash-commands/codebase-map.d.ts +11 -0
  36. package/dist/slash-commands/command-context.d.ts +7 -0
  37. package/dist/slash-commands/context.d.ts +10 -0
  38. package/dist/slash-commands/openai-quota.d.ts +31 -0
  39. package/dist/{subcommands-WJLBHVKC.js → subcommands-CUTGBDKP.js} +2 -2
  40. package/dist/{webui-server-5R35BHWZ.js → webui-server-QWBUT7BO.js} +19 -2
  41. package/dist/webui-server-options.d.ts +1 -0
  42. package/dist/wiring/atlas-prompt-contributor.d.ts +54 -0
  43. package/dist/wiring/cli-execute-builder.d.ts +1 -0
  44. package/dist/wiring/codebase-embeddings.d.ts +31 -0
  45. package/dist/wiring/command-host-state.d.ts +2 -0
  46. package/dist/wiring/concept-summarizer.d.ts +32 -0
  47. package/dist/wiring/external-plugins.d.ts +1 -0
  48. package/dist/wiring/lifecycle-plugins.d.ts +2 -1
  49. package/dist/wiring/plugins.d.ts +2 -1
  50. package/dist/wiring/provider.d.ts +2 -1
  51. package/package.json +29 -29
  52. package/dist/auto-discover-providers-VQU3IZMR.js +0 -7
  53. package/dist/chunk-52C7PD2H.js +0 -61
  54. package/dist/chunk-TNK6237M.js +0 -262
@@ -22,7 +22,7 @@
22
22
  "output": ["text"]
23
23
  },
24
24
  "limit": {
25
- "context": 1050000,
25
+ "context": 872000,
26
26
  "output": 128000
27
27
  }
28
28
  },
@@ -44,22 +44,7 @@
44
44
  "output": ["text"]
45
45
  },
46
46
  "limit": {
47
- "context": 1050000,
48
- "output": 128000
49
- }
50
- },
51
- "gpt-5.5": {
52
- "id": "gpt-5.5",
53
- "name": "GPT-5.5",
54
- "description": "Frontier model for complex coding, research, and real-world work.",
55
- "reasoning": true,
56
- "tool_call": true,
57
- "modalities": {
58
- "input": ["text", "image"],
59
- "output": ["text"]
60
- },
61
- "limit": {
62
- "context": 1050000,
47
+ "context": 872000,
63
48
  "output": 128000
64
49
  }
65
50
  },
@@ -81,7 +66,7 @@
81
66
  "output": ["text"]
82
67
  },
83
68
  "limit": {
84
- "context": 1050000,
69
+ "context": 872000,
85
70
  "output": 128000
86
71
  }
87
72
  },
@@ -103,7 +88,22 @@
103
88
  "output": ["text"]
104
89
  },
105
90
  "limit": {
106
- "context": 1050000,
91
+ "context": 872000,
92
+ "output": 128000
93
+ }
94
+ },
95
+ "gpt-5.5": {
96
+ "id": "gpt-5.5",
97
+ "name": "GPT-5.5",
98
+ "description": "Proven previous-generation model for coding and general work.",
99
+ "reasoning": true,
100
+ "tool_call": true,
101
+ "modalities": {
102
+ "input": ["text", "image"],
103
+ "output": ["text"]
104
+ },
105
+ "limit": {
106
+ "context": 272000,
107
107
  "output": 128000
108
108
  }
109
109
  },
@@ -118,7 +118,7 @@
118
118
  "output": ["text"]
119
119
  },
120
120
  "limit": {
121
- "context": 1050000,
121
+ "context": 272000,
122
122
  "output": 128000
123
123
  }
124
124
  },
@@ -133,7 +133,7 @@
133
133
  "output": ["text"]
134
134
  },
135
135
  "limit": {
136
- "context": 1050000,
136
+ "context": 128000,
137
137
  "output": 128000
138
138
  }
139
139
  }
@@ -3,11 +3,12 @@ import {
3
3
  loadCachedAcpRegistry,
4
4
  refreshAcpRegistry,
5
5
  setupProvider
6
- } from "./chunk-ZSZ3EYWH.js";
6
+ } from "./chunk-GMY45LO6.js";
7
7
  import {
8
8
  startCliHqConnection
9
9
  } from "./chunk-TE3Q32JP.js";
10
- import "./chunk-TNK6237M.js";
10
+ import "./chunk-SIGUWXAA.js";
11
+ import "./chunk-DAKVBMD4.js";
11
12
  import "./chunk-DR2OXU46.js";
12
13
 
13
14
  // src/subcommands/handlers/acp.ts
@@ -1016,4 +1017,4 @@ ${renderAcpBenchText(result)}
1016
1017
  export {
1017
1018
  acpCmd
1018
1019
  };
1019
- //# sourceMappingURL=acp-3LARESEO.js.map
1020
+ //# sourceMappingURL=acp-JK4ZQO3R.js.map
@@ -4,6 +4,7 @@ import {
4
4
  addKeyForProvider,
5
5
  confirm,
6
6
  loadProviders,
7
+ providerAuthStrategiesFor,
7
8
  readKeyInput,
8
9
  renderActions,
9
10
  renderProviderHeader,
@@ -13,7 +14,7 @@ import {
13
14
  runOAuthLoginKind,
14
15
  runOAuthLoginMenu,
15
16
  validateFamily
16
- } from "./chunk-MNQQ4ZNF.js";
17
+ } from "./chunk-ONOT5OJ2.js";
17
18
  import {
18
19
  renderAuthLocalHelpToString,
19
20
  wantsLocalHelp
@@ -29,7 +30,8 @@ import {
29
30
  import {
30
31
  parseAuthFlags
31
32
  } from "./chunk-E6RFXHWD.js";
32
- import "./chunk-TNK6237M.js";
33
+ import "./chunk-SIGUWXAA.js";
34
+ import "./chunk-DAKVBMD4.js";
33
35
  import {
34
36
  loadConfigProviders,
35
37
  maskedKey,
@@ -40,7 +42,17 @@ import {
40
42
  } from "./chunk-DR2OXU46.js";
41
43
 
42
44
  // src/subcommands/handlers/auth.ts
43
- import { color as color3 } from "@wrongstack/core/utils";
45
+ import { color as color5 } from "@wrongstack/core/utils";
46
+
47
+ // src/auth-menu/anthropic-oauth.ts
48
+ import {
49
+ FetchError,
50
+ ParseError
51
+ } from "@wrongstack/core/types";
52
+ import { color } from "@wrongstack/core/utils";
53
+ var REDIRECT_PORT = 53692;
54
+ var REDIRECT_PATH = "/callback";
55
+ var REDIRECT_URI = `http://localhost:${REDIRECT_PORT}${REDIRECT_PATH}`;
44
56
 
45
57
  // src/auth-menu/direct.ts
46
58
  async function runAuthDirect(deps, opts) {
@@ -102,11 +114,19 @@ async function runAuthDirect(deps, opts) {
102
114
  return 0;
103
115
  }
104
116
 
105
- // src/auth-menu/top-menu.ts
117
+ // src/auth-menu/github-copilot-oauth.ts
118
+ import {
119
+ FetchError as FetchError2,
120
+ ParseError as ParseError2
121
+ } from "@wrongstack/core/types";
106
122
  import { color as color2 } from "@wrongstack/core/utils";
123
+ import { copilotBaseUrlFromToken, refreshCopilotToken } from "@wrongstack/providers";
124
+
125
+ // src/auth-menu/top-menu.ts
126
+ import { color as color4 } from "@wrongstack/core/utils";
107
127
 
108
128
  // src/auth-menu/provider-menu.ts
109
- import { color, expectDefined } from "@wrongstack/core/utils";
129
+ import { color as color3, expectDefined } from "@wrongstack/core/utils";
110
130
  async function manageProvider(providerId, deps) {
111
131
  for (; ; ) {
112
132
  const providers = await loadProviders(deps);
@@ -119,7 +139,7 @@ async function manageProvider(providerId, deps) {
119
139
  renderProviderHeader(deps.renderer, providerId, cfg);
120
140
  renderActions(deps.renderer, keys.length);
121
141
  const raw = (await deps.reader.readLine(`
122
- ${color.amber("?")} ${providerId} > `)).trim();
142
+ ${color3.amber("?")} ${providerId} > `)).trim();
123
143
  if (!raw || raw === "b" || raw === "back" || raw === "q" || raw === "quit") {
124
144
  return;
125
145
  }
@@ -150,7 +170,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
150
170
  },
151
171
  deps.profileConfigPath
152
172
  );
153
- deps.renderer.write(` ${color.green("\u2713")} Removed ${providerId}.
173
+ deps.renderer.write(` ${color3.green("\u2713")} Removed ${providerId}.
154
174
  `);
155
175
  return "exit";
156
176
  }
@@ -174,7 +194,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
174
194
  },
175
195
  deps.profileConfigPath
176
196
  );
177
- deps.renderer.write(` ${color.green("\u2713")} Updated ${providerId}/${target.label}.
197
+ deps.renderer.write(` ${color3.green("\u2713")} Updated ${providerId}/${target.label}.
178
198
  `);
179
199
  return "continue";
180
200
  }
@@ -201,7 +221,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
201
221
  },
202
222
  deps.profileConfigPath
203
223
  );
204
- deps.renderer.write(` ${color.green("\u2713")} Deleted ${providerId}/${target.label}.
224
+ deps.renderer.write(` ${color3.green("\u2713")} Deleted ${providerId}/${target.label}.
205
225
  `);
206
226
  return "continue";
207
227
  }
@@ -220,14 +240,14 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
220
240
  },
221
241
  deps.profileConfigPath
222
242
  );
223
- deps.renderer.write(` ${color.green("\u2713")} Active key \u2192 ${color.bold(target.label)}.
243
+ deps.renderer.write(` ${color3.green("\u2713")} Active key \u2192 ${color3.bold(target.label)}.
224
244
  `);
225
245
  return "continue";
226
246
  }
227
247
  if (verb === "f" || verb === "family") {
228
248
  const current = cfg.family ?? "";
229
249
  const ans = (await deps.reader.readLine(
230
- ` ${color.amber("?")} Family ${color.dim(`(anthropic | openai | openai-compatible | google, empty = unset, current: ${current || "unset"})`)}: `
250
+ ` ${color3.amber("?")} Family ${color3.dim(`(anthropic | openai | openai-compatible | google, empty = unset, current: ${current || "unset"})`)}: `
231
251
  )).trim();
232
252
  if (ans !== "") {
233
253
  const validated = validateFamily(ans);
@@ -247,7 +267,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
247
267
  },
248
268
  deps.profileConfigPath
249
269
  );
250
- deps.renderer.write(` ${color.green("\u2713")} family \u2192 ${validated}
270
+ deps.renderer.write(` ${color3.green("\u2713")} family \u2192 ${validated}
251
271
  `);
252
272
  } else {
253
273
  await mutateConfigProviders(
@@ -260,7 +280,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
260
280
  },
261
281
  deps.profileConfigPath
262
282
  );
263
- deps.renderer.write(` ${color.green("\u2713")} family \u2192 (unset)
283
+ deps.renderer.write(` ${color3.green("\u2713")} family \u2192 (unset)
264
284
  `);
265
285
  }
266
286
  return "continue";
@@ -268,7 +288,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
268
288
  if (verb === "B" || verb === "baseurl" || verb === "base-url" || verb === "url") {
269
289
  const current = cfg.baseUrl ?? "";
270
290
  const ans = (await deps.reader.readLine(
271
- ` ${color.amber("?")} Base URL ${color.dim(`(empty = unset, current: ${current || "unset"})`)}: `
291
+ ` ${color3.amber("?")} Base URL ${color3.dim(`(empty = unset, current: ${current || "unset"})`)}: `
272
292
  )).trim();
273
293
  await mutateConfigProviders(
274
294
  deps.profileConfigPath,
@@ -281,14 +301,14 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
281
301
  },
282
302
  deps.profileConfigPath
283
303
  );
284
- deps.renderer.write(` ${color.green("\u2713")} baseUrl \u2192 ${ans || "(unset)"}
304
+ deps.renderer.write(` ${color3.green("\u2713")} baseUrl \u2192 ${ans || "(unset)"}
285
305
  `);
286
306
  return "continue";
287
307
  }
288
308
  if (verb === "m" || verb === "models") {
289
309
  const current = (cfg.models ?? []).join(", ");
290
310
  const ans = (await deps.reader.readLine(
291
- ` ${color.amber("?")} Model ids ${color.dim(`(comma-separated, empty = catalog default, current: ${current || "none"})`)}: `
311
+ ` ${color3.amber("?")} Model ids ${color3.dim(`(comma-separated, empty = catalog default, current: ${current || "none"})`)}: `
292
312
  )).trim();
293
313
  const list = ans ? ans.split(",").map((s) => s.trim()).filter(Boolean) : [];
294
314
  await mutateConfigProviders(
@@ -303,7 +323,7 @@ async function dispatchAction(verb, arg, providerId, keys, cfg, deps) {
303
323
  deps.profileConfigPath
304
324
  );
305
325
  deps.renderer.write(
306
- ` ${color.green("\u2713")} models \u2192 ${list.length === 0 ? "(catalog default)" : list.join(", ")}
326
+ ` ${color3.green("\u2713")} models \u2192 ${list.length === 0 ? "(catalog default)" : list.join(", ")}
307
327
  `
308
328
  );
309
329
  return "continue";
@@ -326,9 +346,9 @@ async function runTopMenu(deps) {
326
346
  renderTopMenu(deps.renderer, providers);
327
347
  const ids = Object.keys(providers).sort();
328
348
  const choice = (await deps.reader.readLine(`
329
- ${color2.amber("?")} Pick: `)).trim().toLowerCase();
349
+ ${color4.amber("?")} Pick: `)).trim().toLowerCase();
330
350
  if (!choice || choice === "q" || choice === "quit" || choice === "exit") {
331
- deps.renderer.write(color2.dim("Done.\n"));
351
+ deps.renderer.write(color4.dim("Done.\n"));
332
352
  return 0;
333
353
  }
334
354
  if (choice === "a" || choice === "add") {
@@ -440,13 +460,17 @@ var authCmd = async (args, deps) => {
440
460
  if (first === "login") {
441
461
  const pid = (flags.positional[1] ?? "").toLowerCase();
442
462
  if (!pid) return runOAuthLoginKind(menuDeps, "chatgpt");
443
- const kind = resolveOAuthKind(pid, { allowNumeric: false });
463
+ const kind = resolveOAuthKind(pid, { allowNumeric: false, deps: menuDeps });
444
464
  if (kind) return runOAuthLoginKind(menuDeps, kind);
445
- deps.renderer.writeError(
446
- "OAuth login is only supported for ChatGPT, Claude, and GitHub Copilot."
447
- );
465
+ const available = providerAuthStrategiesFor(menuDeps);
466
+ deps.renderer.writeError(`Unknown OAuth login strategy "${pid}".`);
467
+ for (const strategy of available) {
468
+ deps.renderer.write(
469
+ color5.dim(` Sign in with ${strategy.label}: `) + color5.bold(`wstack auth login ${strategy.id}`) + "\n"
470
+ );
471
+ }
448
472
  deps.renderer.write(
449
- color3.dim(" Sign in with ChatGPT: ") + color3.bold("wstack auth login chatgpt") + "\n" + color3.dim(" Sign in with Claude: ") + color3.bold("wstack auth login claude") + "\n" + color3.dim(" Sign in with Copilot: ") + color3.bold("wstack auth login copilot") + "\n" + color3.dim(" For an API key instead: ") + color3.bold(`wstack auth ${pid}`) + "\n"
473
+ color5.dim(" For an API key instead: ") + color5.bold(`wstack auth ${pid}`) + "\n"
450
474
  );
451
475
  return 1;
452
476
  }
@@ -469,14 +493,14 @@ async function runAuthList(deps) {
469
493
  const ids = Object.keys(providers).sort();
470
494
  if (ids.length === 0) {
471
495
  deps.renderer.write(
472
- `${color3.dim("No providers configured.")}
473
- ${color3.dim("Run")} ${color3.bold("wstack auth")} ${color3.dim("to add one.")}
496
+ `${color5.dim("No providers configured.")}
497
+ ${color5.dim("Run")} ${color5.bold("wstack auth")} ${color5.dim("to add one.")}
474
498
  `
475
499
  );
476
500
  return 0;
477
501
  }
478
502
  deps.renderer.write(`
479
- ${color3.bold("Saved providers")} ${color3.dim(`(${ids.length})`)}
503
+ ${color5.bold("Saved providers")} ${color5.dim(`(${ids.length})`)}
480
504
 
481
505
  `);
482
506
  for (const id of ids) {
@@ -484,34 +508,34 @@ ${color3.bold("Saved providers")} ${color3.dim(`(${ids.length})`)}
484
508
  if (!cfg) continue;
485
509
  const keys = normalizeKeys(cfg);
486
510
  const active = cfg.activeKey ?? keys[0]?.label;
487
- const famTag = cfg.family ? `${cfg.family}` : color3.amber("no-family");
488
- const aliasHint = cfg.type && cfg.type !== id ? color3.dim(` (\u2192 ${cfg.type})`) : "";
489
- const modelHint = cfg.models && cfg.models.length > 0 ? color3.dim(` [${cfg.models.length} models]`) : "";
490
- deps.renderer.write(` ${color3.bold(id)}${aliasHint}
511
+ const famTag = cfg.family ? `${cfg.family}` : color5.amber("no-family");
512
+ const aliasHint = cfg.type && cfg.type !== id ? color5.dim(` (\u2192 ${cfg.type})`) : "";
513
+ const modelHint = cfg.models && cfg.models.length > 0 ? color5.dim(` [${cfg.models.length} models]`) : "";
514
+ deps.renderer.write(` ${color5.bold(id)}${aliasHint}
491
515
  `);
492
516
  deps.renderer.write(
493
- ` family: ${famTag} baseUrl: ${cfg.baseUrl ?? color3.dim("unset")}${modelHint}
517
+ ` family: ${famTag} baseUrl: ${cfg.baseUrl ?? color5.dim("unset")}${modelHint}
494
518
  `
495
519
  );
496
520
  if (keys.length === 0) {
497
- deps.renderer.write(` ${color3.amber("no keys")}
521
+ deps.renderer.write(` ${color5.amber("no keys")}
498
522
  `);
499
523
  } else {
500
524
  deps.renderer.write(
501
- ` ${color3.dim(`${keys.length} key${keys.length === 1 ? "" : "s"}:`)}
525
+ ` ${color5.dim(`${keys.length} key${keys.length === 1 ? "" : "s"}:`)}
502
526
  `
503
527
  );
504
528
  for (const k of keys) {
505
- const marker = k.label === active ? color3.green("\u25CF") : color3.dim("\u25CB");
529
+ const marker = k.label === active ? color5.green("\u25CF") : color5.dim("\u25CB");
506
530
  deps.renderer.write(
507
- ` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${color3.dim(k.createdAt)}
531
+ ` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${color5.dim(k.createdAt)}
508
532
  `
509
533
  );
510
534
  }
511
535
  }
512
536
  deps.renderer.write("\n");
513
537
  }
514
- deps.renderer.write(color3.dim(`Manage: wstack auth Add key: wstack auth <provider>
538
+ deps.renderer.write(color5.dim(`Manage: wstack auth Add key: wstack auth <provider>
515
539
  `));
516
540
  return 0;
517
541
  }
@@ -527,7 +551,7 @@ async function runAuthStatus(deps, providerId) {
527
551
  if (!cfg) {
528
552
  deps.renderer.writeError(`Provider "${providerId}" not found in config.`);
529
553
  deps.renderer.write(
530
- color3.dim(`Run ${color3.bold("wstack auth list")} to see saved providers.
554
+ color5.dim(`Run ${color5.bold("wstack auth list")} to see saved providers.
531
555
  `)
532
556
  );
533
557
  return 1;
@@ -536,32 +560,32 @@ async function runAuthStatus(deps, providerId) {
536
560
  const active = cfg.activeKey ?? keys[0]?.label;
537
561
  const lines = [
538
562
  `
539
- ${color3.bold(providerId)} ${cfg.family ? color3.dim(`[${cfg.family}]`) : color3.amber("[no family]")}`,
563
+ ${color5.bold(providerId)} ${cfg.family ? color5.dim(`[${cfg.family}]`) : color5.amber("[no family]")}`,
540
564
  "",
541
- ` type: ${color3.cyan(cfg.type ?? providerId)}`,
542
- ` family: ${cfg.family ? color3.cyan(cfg.family) : color3.dim("unset")}`,
543
- ` baseUrl: ${cfg.baseUrl ? color3.cyan(cfg.baseUrl) : color3.dim("unset")}`
565
+ ` type: ${color5.cyan(cfg.type ?? providerId)}`,
566
+ ` family: ${cfg.family ? color5.cyan(cfg.family) : color5.dim("unset")}`,
567
+ ` baseUrl: ${cfg.baseUrl ? color5.cyan(cfg.baseUrl) : color5.dim("unset")}`
544
568
  ];
545
569
  if (cfg.models?.length) {
546
- lines.push(` models: ${color3.cyan(cfg.models.join(", "))}`);
570
+ lines.push(` models: ${color5.cyan(cfg.models.join(", "))}`);
547
571
  }
548
572
  if (cfg.envVars?.length) {
549
- lines.push(` envVars: ${color3.cyan(cfg.envVars.join(", "))}`);
573
+ lines.push(` envVars: ${color5.cyan(cfg.envVars.join(", "))}`);
550
574
  }
551
575
  lines.push("");
552
576
  if (keys.length === 0) {
553
- lines.push(color3.amber(" (no keys saved)"));
577
+ lines.push(color5.amber(" (no keys saved)"));
554
578
  } else {
555
- lines.push(` ${color3.dim("Keys:")}`);
579
+ lines.push(` ${color5.dim("Keys:")}`);
556
580
  for (const k of keys) {
557
- const marker = k.label === active ? color3.green("\u25CF") : color3.dim("\u25CB");
581
+ const marker = k.label === active ? color5.green("\u25CF") : color5.dim("\u25CB");
558
582
  lines.push(
559
- ` ${marker} ${color3.bold(k.label.padEnd(18))} ${maskedKey(k.apiKey)} ${color3.dim(k.createdAt)}`
583
+ ` ${marker} ${color5.bold(k.label.padEnd(18))} ${maskedKey(k.apiKey)} ${color5.dim(k.createdAt)}`
560
584
  );
561
585
  }
562
586
  }
563
587
  lines.push("");
564
- lines.push(color3.dim(`Manage: wstack auth \u2192 pick ${providerId}`));
588
+ lines.push(color5.dim(`Manage: wstack auth \u2192 pick ${providerId}`));
565
589
  deps.renderer.write(lines.join("\n") + "\n");
566
590
  return 0;
567
591
  }
@@ -572,19 +596,19 @@ async function runAuthRemove(deps, providerId) {
572
596
  return 1;
573
597
  }
574
598
  deps.renderer.write(
575
- `${color3.amber("!")} This will remove "${providerId}" and all its saved keys.
599
+ `${color5.amber("!")} This will remove "${providerId}" and all its saved keys.
576
600
  `
577
601
  );
578
- const answer = (await deps.reader.readLine(` ${color3.amber("?")} Confirm removal? ${color3.dim("[y/N]")} `)).trim().toLowerCase();
602
+ const answer = (await deps.reader.readLine(` ${color5.amber("?")} Confirm removal? ${color5.dim("[y/N]")} `)).trim().toLowerCase();
579
603
  if (answer !== "y" && answer !== "yes") {
580
- deps.renderer.write(color3.dim("Cancelled.\n"));
604
+ deps.renderer.write(color5.dim("Cancelled.\n"));
581
605
  return 0;
582
606
  }
583
607
  try {
584
608
  await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
585
609
  delete all[providerId];
586
610
  });
587
- deps.renderer.write(` ${color3.green("\u2713")} Removed ${color3.bold(providerId)}.
611
+ deps.renderer.write(` ${color5.green("\u2713")} Removed ${color5.bold(providerId)}.
588
612
  `);
589
613
  return 0;
590
614
  } catch (err) {
@@ -595,4 +619,4 @@ async function runAuthRemove(deps, providerId) {
595
619
  export {
596
620
  authCmd
597
621
  };
598
- //# sourceMappingURL=auth-ZUMCDNE5.js.map
622
+ //# sourceMappingURL=auth-XD3GN5RJ.js.map
@@ -1,5 +1,6 @@
1
1
  export { CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, runClaudeOAuthLogin, } from './anthropic-oauth.js';
2
2
  export { runAuthDirect } from './direct.js';
3
+ export { providerAuthRegistryFor, providerAuthStrategiesFor, runProviderAuthLogin, } from './provider-auth-login.js';
3
4
  export { COPILOT_PROVIDER_ID, type CopilotLoginOptions, runCopilotOAuthLogin, } from './github-copilot-oauth.js';
4
5
  export { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, probeLocalLlm, type RunAuthLocalOptions, resolveModelList, runAuthLocal, } from './local.js';
5
6
  export { type OAuthMenuKind, resolveOAuthKind, runOAuthLoginChoice, runOAuthLoginKind, runOAuthLoginMenu, } from './oauth-menu.js';
@@ -1,7 +1,8 @@
1
1
  import type { AuthMenuDeps } from './types.js';
2
2
  /** Render subscription OAuth login choices shared by the top menu and add flow. */
3
3
  export declare function renderOAuthLoginOptions(deps: AuthMenuDeps, indent?: string): void;
4
- export type OAuthMenuKind = 'chatgpt' | 'claude' | 'copilot';
4
+ /** Strategy ids are runtime-extensible; this alias preserves the public CLI name. */
5
+ export type OAuthMenuKind = string;
5
6
  /**
6
7
  * Normalize a user-typed subscription name to an OAuth kind.
7
8
  * `allowNumeric` enables the 1/2/3 menu picks (off for free-text prompts,
@@ -9,6 +10,7 @@ export type OAuthMenuKind = 'chatgpt' | 'claude' | 'copilot';
9
10
  */
10
11
  export declare function resolveOAuthKind(choice: string, opts?: {
11
12
  allowNumeric?: boolean;
13
+ deps?: AuthMenuDeps | undefined;
12
14
  }): OAuthMenuKind | undefined;
13
15
  /** Run an OAuth login for a normalized menu choice. Returns true when handled. */
14
16
  export declare function runOAuthLoginChoice(deps: AuthMenuDeps, choice: string, opts?: {
@@ -1,11 +1,13 @@
1
1
  import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
2
2
  import type { AuthPanelHost } from '@wrongstack/tui';
3
+ import type { AuthMenuDeps } from './types.js';
3
4
  export interface AuthPanelServiceDeps {
4
5
  vault: SecretVault;
5
6
  modelsRegistry: ModelsRegistry;
6
7
  /** The sole config file read or written by auth operations. */
7
8
  profileConfigPath: string;
8
9
  secretScrubber?: SecretScrubber | undefined;
10
+ providerAuthRegistry?: AuthMenuDeps['providerAuthRegistry'];
9
11
  /** Re-read the live provider snapshot after a successful auth mutation. */
10
12
  onProvidersChanged?: (() => Promise<void>) | undefined;
11
13
  }
@@ -0,0 +1,12 @@
1
+ import type { ProviderAuthRegistry } from '@wrongstack/core/registry';
2
+ import type { AuthMenuDeps } from './types.js';
3
+ type ProviderAuthRegistrySource = Pick<AuthMenuDeps, 'providerAuthRegistry'>;
4
+ export declare function providerAuthRegistryFor(deps: ProviderAuthRegistrySource): ProviderAuthRegistry;
5
+ /** UI-safe strategy metadata shared by the TUI auth panel and CLI menus. */
6
+ export declare function providerAuthStrategiesFor(deps: ProviderAuthRegistrySource): import("@wrongstack/core").ProviderAuthStrategyMetadata[];
7
+ export declare function runProviderAuthLogin(deps: AuthMenuDeps, strategyId: string, opts?: {
8
+ providerId?: string | undefined;
9
+ signal?: AbortSignal | undefined;
10
+ }): Promise<number>;
11
+ export {};
12
+ //# sourceMappingURL=provider-auth-login.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { ProviderAuthRegistry } from '@wrongstack/core/registry';
1
2
  import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
2
3
  /**
3
4
  * Minimal output surface the auth-menu flows need. `TerminalRenderer`
@@ -33,6 +34,8 @@ export interface AuthMenuDeps {
33
34
  vault: SecretVault;
34
35
  /** Active profile config path. Provider credentials never use the root bootstrap. */
35
36
  profileConfigPath: string;
37
+ /** Shared registry when the runtime is active; defaults to the built-in strategies. */
38
+ providerAuthRegistry?: ProviderAuthRegistry | undefined;
36
39
  /**
37
40
  * Optional scrubber used by `wstack auth local` to redact Bearer
38
41
  * tokens from probe logs before they reach the renderer. Falls back
@@ -0,0 +1,7 @@
1
+ import {
2
+ discoverAndMergeProviders
3
+ } from "./chunk-D5GB5MHA.js";
4
+ export {
5
+ discoverAndMergeProviders
6
+ };
7
+ //# sourceMappingURL=auto-discover-providers-DXR25GTG.js.map
@@ -22,6 +22,7 @@ export interface WebUIDispatchContext {
22
22
  profileConfigPath: string;
23
23
  projectSessionsDir: string;
24
24
  modelsRegistry: ModelsRegistry;
25
+ providerAuthRegistry: import('@wrongstack/core/registry').ProviderAuthRegistry;
25
26
  mcpRegistry: MCPRegistry;
26
27
  brain: BrainArbiter | undefined;
27
28
  brainSettings: {
@@ -87,6 +87,13 @@ interface BindSystemPromptBuilderDeps {
87
87
  /** `config.systemPrompt.variant` — selects system.md, system-lite.md, or system-pro.md. */
88
88
  systemPromptVariant?: SystemInstructionVariant | undefined;
89
89
  paths: SystemPromptBuilderPaths;
90
+ /** Project root, for the Atlas brief. Omit to leave the brief out entirely. */
91
+ projectRoot?: string | undefined;
92
+ /** `config.indexing.atlas` — gates and budgets the session-start brief. */
93
+ atlas?: {
94
+ injectOnSessionStart?: boolean | undefined;
95
+ briefMaxTokens?: number | undefined;
96
+ } | undefined;
90
97
  /**
91
98
  * Optional narrow `domain-term` adapter for the prompt glossary block.
92
99
  * The CLI provides a closure over the resolved SAGE `memoryStore` that
@@ -1,4 +1,4 @@
1
- import type { ProviderRegistry } from '@wrongstack/core/registry';
1
+ import type { ProviderAuthRegistry, ProviderRegistry } from '@wrongstack/core/registry';
2
2
  import type { Config, Logger, ModelsRegistry, ResolvedProvider } from '@wrongstack/core/types';
3
3
  type ModeId = string;
4
4
  type ModePrompt = string;
@@ -12,6 +12,7 @@ type ResolvedModeResult = {
12
12
  kind: 'ok';
13
13
  resolvedProvider: ResolvedProvider;
14
14
  providerRegistry: ProviderRegistry;
15
+ providerAuthRegistry: ProviderAuthRegistry;
15
16
  provider: ReturnType<ProviderRegistry['create']>;
16
17
  modeId: ModeId;
17
18
  modePrompt: ModePrompt;
@@ -131,6 +131,6 @@ export declare function reviewerAttemptTimeoutMs(remainingMs: number, attemptTim
131
131
  * Chimera reviewers only inspect code and return a report. They never repair
132
132
  * files themselves; bug-hunter/security-scanner/fix agents own all mutations.
133
133
  */
134
- export declare const CHIMERA_REVIEW_READ_ONLY_TOOLS: readonly ["read", "grep", "glob", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls"];
134
+ export declare const CHIMERA_REVIEW_READ_ONLY_TOOLS: readonly ["read", "grep", "glob", "tree", "codebase-stats", "codebase-search", "codebase-skeleton", "codebase-context", "codebase-repo-map", "codebase-incoming-calls", "codebase-outgoing-calls"];
135
135
  export declare function applyChimeraReviewerReadOnlyPolicy(config: SubagentConfig): SubagentConfig;
136
136
  //# sourceMappingURL=chimera-reviewer-policy.d.ts.map
@@ -22,7 +22,7 @@ async function handleHelpVersionShortCircuit(argv) {
22
22
  }
23
23
  if (earlyFlags["help"] === true) {
24
24
  if (positional.length > 0) {
25
- const { subcommandNames } = await import("./subcommands-WJLBHVKC.js");
25
+ const { subcommandNames } = await import("./subcommands-CUTGBDKP.js");
26
26
  if (subcommandNames.includes(positional[0])) {
27
27
  const first = positional[0];
28
28
  const deep = positional[1];
@@ -43,4 +43,4 @@ async function handleHelpVersionShortCircuit(argv) {
43
43
  export {
44
44
  handleHelpVersionShortCircuit
45
45
  };
46
- //# sourceMappingURL=chunk-KHWDTNBZ.js.map
46
+ //# sourceMappingURL=chunk-4NHD5OXJ.js.map