@wrongstack/cli 0.319.0 → 1.0.0

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 (113) hide show
  1. package/data/providers.json +22 -15
  2. package/dist/{acp-5ANIAOZC.js → acp-3LARESEO.js} +113 -10
  3. package/dist/acp-hq-telemetry.d.ts +44 -0
  4. package/dist/{audit-ZPCLCC3C.js → audit-46YK5DSC.js} +1 -2
  5. package/dist/{auth-KF5TAD7V.js → auth-KIBJZZIE.js} +5 -6
  6. package/dist/auth-menu/add-provider.d.ts +7 -0
  7. package/dist/auth-menu/panel-service.d.ts +2 -20
  8. package/dist/{auto-discover-providers-MHFLDSD3.js → auto-discover-providers-VQU3IZMR.js} +1 -2
  9. package/dist/{bench-XYG56AMO.js → bench-YBU6BVQP.js} +175 -35
  10. package/dist/boot/brain-decision-log.d.ts +22 -2
  11. package/dist/{boot-auto-thin-BZ675EVT.js → boot-auto-thin-MANHOYHE.js} +1 -2
  12. package/dist/{chronicle-6EPPMUC5.js → chronicle-UTFETHP6.js} +1 -2
  13. package/dist/{chunk-VWCZL4OH.js → chunk-4HV5RKZH.js} +5 -5
  14. package/dist/{chunk-42JD25KU.js → chunk-5IA5337I.js} +3 -3
  15. package/dist/{chunk-7JBKXVMK.js → chunk-C2E24IXZ.js} +44 -32
  16. package/dist/{chunk-7CECQDNH.js → chunk-D3K4NYQL.js} +1 -1
  17. package/dist/{chunk-XPX432BZ.js → chunk-DR2OXU46.js} +50 -39
  18. package/dist/{chunk-4JRIWVJ4.js → chunk-ERX4BLKP.js} +1 -1
  19. package/dist/chunk-ETYHZPXP.js +52 -0
  20. package/dist/{chunk-TYO2OVAD.js → chunk-EWKESL4L.js} +8 -4
  21. package/dist/{chunk-QAC263FZ.js → chunk-FPIWTJ2G.js} +2 -3
  22. package/dist/{chunk-7YLN7YUA.js → chunk-IMWXXF4J.js} +61 -9
  23. package/dist/{chunk-G7337TTK.js → chunk-IS2PPBQV.js} +1 -1
  24. package/dist/{chunk-G3IMKQRH.js → chunk-JHPXJRRI.js} +1 -1
  25. package/dist/{chunk-XHIEA6LG.js → chunk-MNQQ4ZNF.js} +26 -22
  26. package/dist/{chunk-P2OKBDCH.js → chunk-MXEJEYT7.js} +53 -14
  27. package/dist/{chunk-PCBJSXYV.js → chunk-O4A3HHKD.js} +2 -2
  28. package/dist/{chunk-XYKYXFEE.js → chunk-TE3Q32JP.js} +10 -4
  29. package/dist/{chunk-H7GABTGS.js → chunk-TEBMCYZN.js} +69 -30
  30. package/dist/{chunk-E4I2TF5S.js → chunk-TNK6237M.js} +2 -2
  31. package/dist/{chunk-SYIBTG3X.js → chunk-VOTTENR5.js} +3 -5
  32. package/dist/chunk-WHOIR577.js +1 -0
  33. package/dist/{chunk-2ZNBRZ4W.js → chunk-WQZW3RDP.js} +2 -2
  34. package/dist/{chunk-GGGUZSAU.js → chunk-Z7A5MXKJ.js} +18 -12
  35. package/dist/{chunk-F5GA2QW2.js → chunk-ZSZ3EYWH.js} +2 -2
  36. package/dist/{cli-context-LH4QP4W2.js → cli-context-CYMKNOK3.js} +58 -307
  37. package/dist/{cli-main-72XUFUCL.js → cli-main-TTIVR4DI.js} +925 -329
  38. package/dist/{diag-doctor-LFCCBPMD.js → diag-doctor-7LYUYU35.js} +4 -6
  39. package/dist/execute-deps.d.ts +5 -1
  40. package/dist/{execution-DKJDNPYF.js → execution-3Y55IWBK.js} +512 -469
  41. package/dist/{export-ROG3DKTZ.js → export-VVRIOWFV.js} +1 -2
  42. package/dist/{governance-JSGHHA2R.js → governance-RYSHV675.js} +1 -2
  43. package/dist/{hq-3GWBFLON.js → hq-IG3YRGCO.js} +2 -3
  44. package/dist/hq-command-controller.d.ts +37 -7
  45. package/dist/hq-server/routes.d.ts +1 -1
  46. package/dist/hq-server/ws.d.ts +1 -1
  47. package/dist/{hq-server-OARPUSQJ.js → hq-server-OILU3NPI.js} +2 -3
  48. package/dist/{hq-ttl-KUO3AU7X.js → hq-ttl-VJR65OBJ.js} +1 -2
  49. package/dist/{hq-tunnel-LO55RCZE.js → hq-tunnel-NIJ5EP2Y.js} +1 -2
  50. package/dist/index.js +5 -6
  51. package/dist/{init-4JQSG66Q.js → init-DRMMFG2G.js} +1 -2
  52. package/dist/{kanban-run-mirror-EKVNGXWW.js → kanban-run-mirror-22HQ5FNG.js} +1 -2
  53. package/dist/live-settings-input.d.ts +2 -0
  54. package/dist/{mailbox-serve-VKQIRCCB.js → mailbox-serve-VUCWZ2SJ.js} +2 -3
  55. package/dist/{mcp-AQKSASHD.js → mcp-HOMLC4WE.js} +1 -2
  56. package/dist/{modeldiag-5FRMT6FQ.js → modeldiag-FMJT37SN.js} +2 -3
  57. package/dist/{per-subcommand-help-6VCIKDUW.js → per-subcommand-help-BWBHYVJO.js} +2 -3
  58. package/dist/{permissions-2PWBL4YU.js → permissions-CFDLXETM.js} +1 -2
  59. package/dist/{plugin-usage-CYUORYM6.js → plugin-usage-HFBI3TFT.js} +2 -3
  60. package/dist/{plugins-RV3OBBND.js → plugins-PZ2VZL7V.js} +4 -5
  61. package/dist/{project-BLQ3ALVL.js → project-AOQI5XTK.js} +1 -2
  62. package/dist/{project-manifest-YFTJ3D5N.js → project-manifest-7NSFVBM3.js} +2 -3
  63. package/dist/{project-picker-R5TYAE3Q.js → project-picker-SVBXMPKX.js} +3 -4
  64. package/dist/{projects-5J727S4L.js → projects-L6C6XLDY.js} +1 -2
  65. package/dist/provider-config-utils.d.ts +1 -1
  66. package/dist/{providers-models-OKKQZIWU.js → providers-models-YVMVYWRS.js} +3 -4
  67. package/dist/{proxy-wiring-EQB5X5YH.js → proxy-wiring-MGRSKZZB.js} +3 -4
  68. package/dist/{quick-XLYLZX4B.js → quick-CNB4Z3HS.js} +1 -2
  69. package/dist/{replay-RZXZKP2U.js → replay-JJ2NOWD6.js} +1 -2
  70. package/dist/{replay-FJ2JBXUA.js → replay-Z3FTJEMM.js} +1 -2
  71. package/dist/{rewind-2FFNOOKS.js → rewind-JA3ZLCNM.js} +1 -2
  72. package/dist/{sdd-runtime-FLKCSTYV.js → sdd-runtime-PTOSPYI4.js} +2 -3
  73. package/dist/services/sdd-runtime.d.ts +1 -1
  74. package/dist/services/statusline-config.d.ts +43 -13
  75. package/dist/{sessions-config-KAMEBVOX.js → sessions-config-UL45XKX7.js} +2 -3
  76. package/dist/{sessions-doctor-EXHAZSSE.js → sessions-doctor-QUL37U32.js} +1 -2
  77. package/dist/short-circuit-flags-6PSP56L7.js +10 -0
  78. package/dist/{simpleui-dist-JKNRCRRK.js → simpleui-dist-CXSIDAXZ.js} +1 -2
  79. package/dist/slash-commands/command-context.d.ts +10 -0
  80. package/dist/slash-commands/sdd.d.ts +1 -1
  81. package/dist/slash-commands/statusline.d.ts +1 -1
  82. package/dist/subcommands/handlers/bench-run-config.d.ts +18 -0
  83. package/dist/subcommands/handlers/bench.d.ts +8 -7
  84. package/dist/subcommands-HZQKA4G2.js +9 -0
  85. package/dist/{tools-skills-Q4P27URS.js → tools-skills-GH24UCBY.js} +1 -2
  86. package/dist/{update-K45CS6SS.js → update-5DPB4YD4.js} +1 -2
  87. package/dist/{update-check-PKSMSMD6.js → update-check-BS3DHTSI.js} +1 -2
  88. package/dist/version-help-MYKF724O.js +10 -0
  89. package/dist/webui-server/client-registration.d.ts +9 -1
  90. package/dist/{webui-server-SY4EQCKD.js → webui-server-T6AMOXJJ.js} +54 -13
  91. package/dist/wiring/brain-and-orchestration.d.ts +2 -0
  92. package/dist/wiring/cli-execute-builder.d.ts +4 -0
  93. package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
  94. package/dist/wiring/command-host-state.d.ts +50 -5
  95. package/dist/wiring/external-plugins.d.ts +9 -0
  96. package/dist/wiring/provider-runtime-setup.d.ts +2 -0
  97. package/dist/wiring/runtime-controller-deps.d.ts +3 -0
  98. package/dist/wiring/vector-memory-setup.d.ts +12 -0
  99. package/dist/wiring/wrongtrace-gate.d.ts +2 -2
  100. package/dist/wiring/wrongtrace-hooks.d.ts +1 -1
  101. package/dist/wiring/wrongtrace-prompt-contributor.d.ts +5 -2
  102. package/dist/{wrongtrace-gate-counters-P5BCBXQN.js → wrongtrace-gate-counters-7C2EAAZL.js} +2 -3
  103. package/dist/{wrongtrace-telemetry-FNLANZ5I.js → wrongtrace-telemetry-3ASFKOZO.js} +2 -3
  104. package/package.json +28 -28
  105. package/dist/chunk-7OCVIDC7.js +0 -11
  106. package/dist/chunk-ALE5KHCA.js +0 -1
  107. package/dist/chunk-OZDE3OWD.js +0 -52
  108. package/dist/launch-hints.d.ts +0 -49
  109. package/dist/short-circuit-flags-U6CJAF6J.js +0 -11
  110. package/dist/subcommands-J4JMWC5W.js +0 -10
  111. package/dist/version-help-WMPSEL4U.js +0 -11
  112. package/dist/webui-server/privileged-actions.d.ts +0 -14
  113. package/dist/wiring/cli-heap-watchdog.d.ts +0 -34
@@ -4,6 +4,28 @@
4
4
  "name": "OpenAI Codex (ChatGPT sign-in)",
5
5
  "doc": "https://developers.openai.com/codex/models",
6
6
  "models": {
7
+ "gpt-6-astra": {
8
+ "id": "gpt-6-astra",
9
+ "name": "GPT-6 Astra",
10
+ "description": "Most capable model for complex work across code, apps, and research.",
11
+ "reasoning": true,
12
+ "reasoningConfig": {
13
+ "default": "enabled",
14
+ "disableSupported": false,
15
+ "effortSupported": true,
16
+ "effortLevels": ["low", "medium", "high", "xhigh", "max"],
17
+ "preserveThinking": "unsupported"
18
+ },
19
+ "tool_call": true,
20
+ "modalities": {
21
+ "input": ["text", "image"],
22
+ "output": ["text"]
23
+ },
24
+ "limit": {
25
+ "context": 1050000,
26
+ "output": 128000
27
+ }
28
+ },
7
29
  "gpt-5.6-sol": {
8
30
  "id": "gpt-5.6-sol",
9
31
  "name": "GPT-5.6 Sol",
@@ -85,21 +107,6 @@
85
107
  "output": 128000
86
108
  }
87
109
  },
88
- "gpt-5.4": {
89
- "id": "gpt-5.4",
90
- "name": "GPT-5.4",
91
- "description": "Strong model for everyday coding.",
92
- "reasoning": true,
93
- "tool_call": true,
94
- "modalities": {
95
- "input": ["text", "image"],
96
- "output": ["text"]
97
- },
98
- "limit": {
99
- "context": 1050000,
100
- "output": 128000
101
- }
102
- },
103
110
  "gpt-5.4-mini": {
104
111
  "id": "gpt-5.4-mini",
105
112
  "name": "GPT-5.4 Mini",
@@ -3,10 +3,12 @@ import {
3
3
  loadCachedAcpRegistry,
4
4
  refreshAcpRegistry,
5
5
  setupProvider
6
- } from "./chunk-F5GA2QW2.js";
7
- import "./chunk-E4I2TF5S.js";
8
- import "./chunk-XPX432BZ.js";
9
- import "./chunk-7OCVIDC7.js";
6
+ } from "./chunk-ZSZ3EYWH.js";
7
+ import {
8
+ startCliHqConnection
9
+ } from "./chunk-TE3Q32JP.js";
10
+ import "./chunk-TNK6237M.js";
11
+ import "./chunk-DR2OXU46.js";
10
12
 
11
13
  // src/subcommands/handlers/acp.ts
12
14
  import { randomBytes } from "node:crypto";
@@ -30,6 +32,90 @@ import {
30
32
  } from "@wrongstack/acp/agent";
31
33
  import { WebSocketServer } from "ws";
32
34
 
35
+ // src/acp-hq-telemetry.ts
36
+ import { AgentStatusTracker } from "@wrongstack/core/coordination";
37
+ import { startSessionTelemetryBridge } from "@wrongstack/core/hq";
38
+ var NO_REGISTRY = { updateAgents: async () => void 0 };
39
+ function startAcpHqTelemetry(options) {
40
+ const connection = startCliHqConnection({
41
+ clientKind: "acp",
42
+ projectRoot: options.projectRoot,
43
+ ...options.projectName !== void 0 ? { projectName: options.projectName } : {},
44
+ ...options.appConfig !== void 0 ? { appConfig: options.appConfig } : {},
45
+ capabilities: ["telemetry.publish", "mailbox.summary", "fleet.summary", "session.summary"]
46
+ });
47
+ const entries = /* @__PURE__ */ new Map();
48
+ let stopped = false;
49
+ const attach = (sessionId, agent, cwd) => {
50
+ if (stopped || entries.has(sessionId)) return;
51
+ const publisher = connection.getPublisher();
52
+ if (publisher === void 0) return;
53
+ const events = agent.events;
54
+ if (events === void 0) return;
55
+ const tracker = new AgentStatusTracker({ events, registry: NO_REGISTRY, sessionId });
56
+ tracker.start();
57
+ let stopBridge;
58
+ try {
59
+ stopBridge = startSessionTelemetryBridge({
60
+ publisher,
61
+ events,
62
+ sessionId,
63
+ // An ACP session works in the directory the client opened, which is
64
+ // not necessarily where the server booted.
65
+ projectRoot: cwd,
66
+ projectName: options.projectName ?? options.projectRoot,
67
+ initialAgents: tracker.getAgents(),
68
+ startedAt: (/* @__PURE__ */ new Date()).toISOString()
69
+ });
70
+ } catch {
71
+ tracker.stop();
72
+ return;
73
+ }
74
+ entries.set(sessionId, { tracker, stopBridge });
75
+ };
76
+ const detach = (sessionId) => {
77
+ const entry = entries.get(sessionId);
78
+ if (entry === void 0) return;
79
+ entries.delete(sessionId);
80
+ try {
81
+ entry.stopBridge();
82
+ } catch {
83
+ }
84
+ try {
85
+ entry.tracker.stop();
86
+ } catch {
87
+ }
88
+ };
89
+ return {
90
+ wrapAgentFactory(agentFor) {
91
+ const wrapped = async (sessionId, cwd, api) => {
92
+ const agent = await agentFor(sessionId, cwd, api);
93
+ try {
94
+ attach(sessionId, agent, cwd);
95
+ } catch {
96
+ }
97
+ return agent;
98
+ };
99
+ return wrapped;
100
+ },
101
+ wrapDispose(dispose) {
102
+ return (sessionId) => {
103
+ try {
104
+ detach(sessionId);
105
+ } catch {
106
+ }
107
+ dispose(sessionId);
108
+ };
109
+ },
110
+ active: () => [...entries.keys()],
111
+ stop: () => {
112
+ stopped = true;
113
+ for (const sessionId of [...entries.keys()]) detach(sessionId);
114
+ connection.stop();
115
+ }
116
+ };
117
+ }
118
+
33
119
  // src/acp-server-agent.ts
34
120
  import { Agent, Context, createDefaultPipelines } from "@wrongstack/core/agent";
35
121
  import { ToolExecutor } from "@wrongstack/core/execution";
@@ -435,6 +521,7 @@ async function runACPWebSocketServer(deps, port) {
435
521
  let turnFactory;
436
522
  let echoTurn;
437
523
  let store;
524
+ let hqTelemetry;
438
525
  if (echo) {
439
526
  echoTurn = async () => ({ stopReason: "end_turn" });
440
527
  } else {
@@ -449,7 +536,13 @@ async function runACPWebSocketServer(deps, port) {
449
536
  }
450
537
  throw err;
451
538
  }
452
- turnFactory = () => makeACPServerAgentTurn({ agentFor });
539
+ hqTelemetry = startAcpHqTelemetry({
540
+ projectRoot: deps.cwd ?? process.cwd(),
541
+ projectName: path.basename(deps.cwd ?? process.cwd()),
542
+ appConfig: deps.config
543
+ });
544
+ const tracked = hqTelemetry.wrapAgentFactory(agentFor);
545
+ turnFactory = () => makeACPServerAgentTurn({ agentFor: tracked });
453
546
  store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
454
547
  }
455
548
  const acpToken = process.env["WRONGSTACK_ACP_TOKEN"]?.trim() || randomBytes(32).toString("hex");
@@ -482,7 +575,7 @@ async function runACPWebSocketServer(deps, port) {
482
575
  ...connectionTurn ? {
483
576
  replayFor: connectionTurn.replay,
484
577
  seedFor: connectionTurn.seed,
485
- disposeFor: connectionTurn.dispose
578
+ disposeFor: hqTelemetry?.wrapDispose(connectionTurn.dispose) ?? connectionTurn.dispose
486
579
  } : {},
487
580
  ...store ? { store } : {}
488
581
  });
@@ -524,6 +617,7 @@ async function runACPWebSocketServer(deps, port) {
524
617
  }
525
618
  }
526
619
  wss.close();
620
+ hqTelemetry?.stop();
527
621
  resolve();
528
622
  };
529
623
  process.on("SIGINT", shutdown);
@@ -537,6 +631,7 @@ async function runACPServer(deps) {
537
631
  return runACPWebSocketServer(deps, wsPort);
538
632
  }
539
633
  const echo = deps.flags?.echo === true || deps.flags?.echo === "true";
634
+ let stdioHqTelemetry;
540
635
  const server = new WrongStackACPServer(
541
636
  echo ? {} : (() => {
542
637
  let agentFor;
@@ -550,13 +645,20 @@ async function runACPServer(deps) {
550
645
  }
551
646
  throw err;
552
647
  }
553
- const turn = makeACPServerAgentTurn({ agentFor });
648
+ stdioHqTelemetry = startAcpHqTelemetry({
649
+ projectRoot: deps.cwd ?? process.cwd(),
650
+ projectName: path.basename(deps.cwd ?? process.cwd()),
651
+ appConfig: deps.config
652
+ });
653
+ const turn = makeACPServerAgentTurn({
654
+ agentFor: stdioHqTelemetry.wrapAgentFactory(agentFor)
655
+ });
554
656
  const store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
555
657
  return {
556
658
  runTurn: turn,
557
659
  replayFor: turn.replay,
558
660
  seedFor: turn.seed,
559
- disposeFor: turn.dispose,
661
+ disposeFor: stdioHqTelemetry.wrapDispose(turn.dispose),
560
662
  ...store ? { store } : {}
561
663
  };
562
664
  })()
@@ -577,13 +679,14 @@ async function runACPServer(deps) {
577
679
  createGracefulShutdown({
578
680
  run: async () => {
579
681
  try {
580
- server.stop();
682
+ await server.stop();
581
683
  } catch (err) {
582
684
  deps.renderer.writeError(
583
685
  `ACP stop failed: ${err instanceof Error ? err.message : String(err)}
584
686
  `
585
687
  );
586
688
  }
689
+ stdioHqTelemetry?.stop();
587
690
  }
588
691
  }).install();
589
692
  try {
@@ -913,4 +1016,4 @@ ${renderAcpBenchText(result)}
913
1016
  export {
914
1017
  acpCmd
915
1018
  };
916
- //# sourceMappingURL=acp-5ANIAOZC.js.map
1019
+ //# sourceMappingURL=acp-3LARESEO.js.map
@@ -0,0 +1,44 @@
1
+ /**
2
+ * ACP sessions on the HQ fleet map.
3
+ *
4
+ * An editor driving WrongStack over ACP (Zed, JetBrains, …) runs real turns:
5
+ * real provider calls, real tools, real cost. HQ never saw any of it. The only
6
+ * trace an ACP process left was the mailbox-only publisher every agent process
7
+ * opens, which shows up as a client with no session and no agents — so an
8
+ * operator watching the fleet had no way to tell an ACP server was working at
9
+ * all, let alone what it was doing.
10
+ *
11
+ * The wiring is unusually cheap here because ACP already gives every session
12
+ * its own `EventBus` (`buildAcpServerAgentFactory`): a tracker attached to that
13
+ * bus needs no session filtering, unlike the WebUI's shared-bus host.
14
+ *
15
+ * What this does NOT give you is a chat transcript. ACP sessions run on a
16
+ * no-op session writer — they do not persist a JSONL journal — so HQ's Console
17
+ * has nothing to replay for them. The agent card is live (status, current
18
+ * tool, iterations, tokens, cost, streaming tail); the conversation is not.
19
+ * Giving ACP a real journal is a separate change: it would also put ACP
20
+ * sessions into `/resume`, recovery and history.
21
+ *
22
+ * @module acp-hq-telemetry
23
+ */
24
+ import type { Agent } from '@wrongstack/core/agent';
25
+ import type { Config } from '@wrongstack/core/types';
26
+ /** The per-session Agent factory shape `makeACPServerAgentTurn` consumes. */
27
+ type AcpAgentFactory = (sessionId: string, cwd: string, api?: never) => Promise<Agent>;
28
+ export interface AcpHqTelemetryOptions {
29
+ projectRoot: string;
30
+ projectName?: string | undefined;
31
+ appConfig?: Config | undefined;
32
+ }
33
+ export interface AcpHqTelemetry {
34
+ /** Wrap the agent factory so each new ACP session reports to HQ. */
35
+ wrapAgentFactory<T extends AcpAgentFactory>(agentFor: T): T;
36
+ /** Wrap `dispose` so a closed ACP session stops reporting. */
37
+ wrapDispose(dispose: (sessionId: string) => void): (sessionId: string) => void;
38
+ /** Session ids currently reporting. Exposed for tests and diagnostics. */
39
+ active(): string[];
40
+ stop(): void;
41
+ }
42
+ export declare function startAcpHqTelemetry(options: AcpHqTelemetryOptions): AcpHqTelemetry;
43
+ export {};
44
+ //# sourceMappingURL=acp-hq-telemetry.d.ts.map
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  restoreFlags
3
3
  } from "./chunk-CSAPOCBP.js";
4
- import "./chunk-7OCVIDC7.js";
5
4
 
6
5
  // src/subcommands/handlers/audit.ts
7
6
  import { ToolAuditLog } from "@wrongstack/core/storage";
@@ -103,4 +102,4 @@ async function listAudits(log, dir, deps) {
103
102
  export {
104
103
  auditCmd
105
104
  };
106
- //# sourceMappingURL=audit-ZPCLCC3C.js.map
105
+ //# sourceMappingURL=audit-46YK5DSC.js.map
@@ -13,7 +13,7 @@ import {
13
13
  runOAuthLoginKind,
14
14
  runOAuthLoginMenu,
15
15
  validateFamily
16
- } from "./chunk-XHIEA6LG.js";
16
+ } from "./chunk-MNQQ4ZNF.js";
17
17
  import {
18
18
  renderAuthLocalHelpToString,
19
19
  wantsLocalHelp
@@ -28,8 +28,8 @@ import {
28
28
  } from "./chunk-YMXXOOFN.js";
29
29
  import {
30
30
  parseAuthFlags
31
- } from "./chunk-GGGUZSAU.js";
32
- import "./chunk-E4I2TF5S.js";
31
+ } from "./chunk-Z7A5MXKJ.js";
32
+ import "./chunk-TNK6237M.js";
33
33
  import {
34
34
  loadConfigProviders,
35
35
  maskedKey,
@@ -37,8 +37,7 @@ import {
37
37
  normalizeKeys,
38
38
  nowIso,
39
39
  writeKeysBack
40
- } from "./chunk-XPX432BZ.js";
41
- import "./chunk-7OCVIDC7.js";
40
+ } from "./chunk-DR2OXU46.js";
42
41
 
43
42
  // src/subcommands/handlers/auth.ts
44
43
  import { color as color3 } from "@wrongstack/core/utils";
@@ -596,4 +595,4 @@ async function runAuthRemove(deps, providerId) {
596
595
  export {
597
596
  authCmd
598
597
  };
599
- //# sourceMappingURL=auth-KF5TAD7V.js.map
598
+ //# sourceMappingURL=auth-KIBJZZIE.js.map
@@ -1,5 +1,12 @@
1
1
  import type { ProviderConfig, ResolvedProvider } from '@wrongstack/core/types';
2
2
  import type { AuthMenuDeps } from './types.js';
3
+ /**
4
+ * Providers WrongStack defines itself but models.dev does not list under that
5
+ * id — the AI Gateway, which models.dev files as `vercel`. Without this they
6
+ * are unreachable from the catalog picker and the user has to hand-roll a
7
+ * custom entry to use them.
8
+ */
9
+ export declare function ownDefinitionsAsCatalog(known: Set<string>): ResolvedProvider[];
3
10
  export declare function addFromCatalog(deps: AuthMenuDeps): Promise<boolean>;
4
11
  /**
5
12
  * Prompt for family/baseUrl/alias overrides, then add a key.
@@ -1,23 +1,3 @@
1
- /**
2
- * TUI auth-panel host — the structured, UI-agnostic surface behind the
3
- * interactive `/auth` panel in the Ink TUI.
4
- *
5
- * Two kinds of operations:
6
- *
7
- * - **Direct mutations** (set active key, delete key, remove provider):
8
- * plain async methods that mutate the config atomically and return an
9
- * error string or `null`.
10
- *
11
- * - **Flows** (add key, add from catalog, add custom, add local, OAuth
12
- * sign-in, field edits): the existing battle-tested readline flows from
13
- * this package, driven through an {@link AuthFlowIo} bridge. The bridge
14
- * adapts `renderer.write*` → panel log lines (ANSI-stripped) and
15
- * `reader.readLine/readSecret` → the panel's modal prompt. A rejected
16
- * prompt (TUI Esc) aborts the flow before anything is saved.
17
- *
18
- * Secrets never cross into the TUI: key values are masked here, and the
19
- * modal prompt sends the plaintext only INTO the flow (never back out).
20
- */
21
1
  import type { ModelsRegistry, SecretScrubber, SecretVault } from '@wrongstack/core/types';
22
2
  import type { AuthPanelHost } from '@wrongstack/tui';
23
3
  export interface AuthPanelServiceDeps {
@@ -26,6 +6,8 @@ export interface AuthPanelServiceDeps {
26
6
  /** The sole config file read or written by auth operations. */
27
7
  profileConfigPath: string;
28
8
  secretScrubber?: SecretScrubber | undefined;
9
+ /** Re-read the live provider snapshot after a successful auth mutation. */
10
+ onProvidersChanged?: (() => Promise<void>) | undefined;
29
11
  }
30
12
  /** Plain (color-free) key mask: first 4 + last 4 characters. */
31
13
  export declare function plainMaskedKey(key: string): string;
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  discoverAndMergeProviders
3
3
  } from "./chunk-52C7PD2H.js";
4
- import "./chunk-7OCVIDC7.js";
5
4
  export {
6
5
  discoverAndMergeProviders
7
6
  };
8
- //# sourceMappingURL=auto-discover-providers-MHFLDSD3.js.map
7
+ //# sourceMappingURL=auto-discover-providers-VQU3IZMR.js.map