@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
@@ -25,14 +25,13 @@
25
25
  * in plaintext.
26
26
  */
27
27
  import type { SecretScrubber } from '@wrongstack/core/types';
28
+ import type { ProbeOptions, ProbeResult } from '@wrongstack/runtime/probe';
29
+ import { probeLocalLlm } from '@wrongstack/runtime/probe';
30
+ import { type AuthAuditLogger } from './auth-menu-audit.js';
28
31
  import { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry } from './local-presets.js';
29
32
  import { suggestLabel } from './shared.js';
30
33
  import type { AuthMenuDeps } from './types.js';
31
- import { probeLocalLlm } from '@wrongstack/runtime/probe';
32
- import type { ProbeOptions, ProbeResult } from '@wrongstack/runtime/probe';
33
- import { type AuthAuditLogger } from './auth-menu-audit.js';
34
- export { probeLocalLlm, type ProbeOptions, type ProbeResult };
35
- export { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry };
34
+ export { LOCAL_LLM_PRESETS, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, probeLocalLlm, };
36
35
  export interface RunAuthLocalOptions {
37
36
  /**
38
37
  * Direct pick: skip the interactive menu and configure this preset.
@@ -31,7 +31,7 @@
31
31
  import { buildCodexAuthorizeUrl, exchangeCodexAuthorizationCode, refreshCodexTokens } from '@wrongstack/providers/oauth';
32
32
  import { type LoopbackServer } from './loopback-server.js';
33
33
  import type { AuthMenuDeps } from './types.js';
34
- export { CODEX_BASE_URL, CODEX_CATALOG_FAMILIES, CODEX_PROVIDER_ID, type CodexTokens, extractAccountId, FALLBACK_CODEX_MODELS, fallbackCodexModelIds, fallbackCodexProviderModels, fetchCodexModels, filterCurrentCodexModelIds, generatePkce, isCodexCatalogModel, parseAuthorizationInput, type Pkce, resolveCodexModels, } from '@wrongstack/providers/oauth';
34
+ export { CODEX_BASE_URL, CODEX_CATALOG_FAMILIES, CODEX_PROVIDER_ID, type CodexTokens, extractAccountId, FALLBACK_CODEX_MODELS, fallbackCodexModelIds, fallbackCodexProviderModels, fetchCodexModels, filterCurrentCodexModelIds, generatePkce, isCodexCatalogModel, type Pkce, parseAuthorizationInput, resolveCodexModels, } from '@wrongstack/providers/oauth';
35
35
  /** Build the Codex authorize URL. Alias kept for the historical local name. */
36
36
  export declare const buildAuthorizeUrl: typeof buildCodexAuthorizeUrl;
37
37
  /** Exchange an authorization code (+ PKCE verifier) for tokens. */
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  discoverAndMergeProviders
3
- } from "./chunk-4GVH7V3S.js";
3
+ } from "./chunk-52C7PD2H.js";
4
4
  import "./chunk-7OCVIDC7.js";
5
5
  export {
6
6
  discoverAndMergeProviders
7
7
  };
8
- //# sourceMappingURL=auto-discover-providers-DRW4OZHG.js.map
8
+ //# sourceMappingURL=auto-discover-providers-MHFLDSD3.js.map
@@ -7,7 +7,6 @@ import "./chunk-7OCVIDC7.js";
7
7
  import * as fs from "node:fs/promises";
8
8
  import { createRequire } from "node:module";
9
9
  import * as path from "node:path";
10
- import { toErrorMessage } from "@wrongstack/core/utils";
11
10
  import {
12
11
  collectCellPredictions,
13
12
  computeToolManifestHash,
@@ -26,7 +25,7 @@ import {
26
25
  writeJsonArtifacts,
27
26
  writePredictionsJsonl
28
27
  } from "@wrongstack/bench";
29
- import { color } from "@wrongstack/core/utils";
28
+ import { color, toErrorMessage } from "@wrongstack/core/utils";
30
29
  var benchCmd = async (args, deps) => {
31
30
  const sub = args[0];
32
31
  const rest = args.slice(1);
@@ -58,9 +57,7 @@ function printUsage(deps) {
58
57
  color.dim(
59
58
  " wstack bench run --suite polyglot --polyglot-dir ./polyglot --models bench.config.json --limit 5"
60
59
  ),
61
- color.dim(
62
- " wstack bench run --suite local --suite-dir ./evals --models bench.config.json"
63
- ),
60
+ color.dim(" wstack bench run --suite local --suite-dir ./evals --models bench.config.json"),
64
61
  color.dim(" wstack bench mine --transcript ./session.jsonl --out ./evals"),
65
62
  color.dim(" wstack bench report ./bench-results/2026-06-14T10-00-00"),
66
63
  ""
@@ -198,9 +195,7 @@ async function benchReport(args, deps) {
198
195
  try {
199
196
  summary = await readSummary(outDir);
200
197
  } catch (err) {
201
- deps.renderer.writeError(
202
- `cannot read summary.json in ${outDir}: ${toErrorMessage(err)}`
203
- );
198
+ deps.renderer.writeError(`cannot read summary.json in ${outDir}: ${toErrorMessage(err)}`);
204
199
  return 1;
205
200
  }
206
201
  const md = renderMarkdownReport(summary);
@@ -211,7 +206,9 @@ async function benchReport(args, deps) {
211
206
  async function benchMine(args, deps) {
212
207
  const transcriptRaw = flagStr(deps, "transcript") ?? args.find((arg) => !arg.startsWith("-"));
213
208
  if (!transcriptRaw) {
214
- deps.renderer.writeError("Usage: wstack bench mine --transcript <session.jsonl> [--out <eval-dir>]");
209
+ deps.renderer.writeError(
210
+ "Usage: wstack bench mine --transcript <session.jsonl> [--out <eval-dir>]"
211
+ );
215
212
  return 1;
216
213
  }
217
214
  const outRaw = flagStr(deps, "out") ?? "evals";
@@ -220,7 +217,9 @@ async function benchMine(args, deps) {
220
217
  transcriptPath: path.resolve(deps.cwd, transcriptRaw),
221
218
  outDir: path.resolve(deps.cwd, outRaw)
222
219
  });
223
- deps.renderer.writeInfo(`Mined ${mined.candidates.length} edit attempt(s) from ${mined.sessionId}.`);
220
+ deps.renderer.writeInfo(
221
+ `Mined ${mined.candidates.length} edit attempt(s) from ${mined.sessionId}.`
222
+ );
224
223
  deps.renderer.writeInfo(`Pinned transcript \u2192 ${mined.copiedTranscriptPath}`);
225
224
  deps.renderer.writeInfo(`Curator drafts \u2192 ${mined.draftsPath}`);
226
225
  deps.renderer.writeInfo(
@@ -275,4 +274,4 @@ async function benchList(_args, deps) {
275
274
  export {
276
275
  benchCmd
277
276
  };
278
- //# sourceMappingURL=bench-7ZDWSNEF.js.map
277
+ //# sourceMappingURL=bench-XNDUJOSZ.js.map
@@ -1,5 +1,5 @@
1
- import type { Config, Logger } from '@wrongstack/core/types';
2
1
  import type { DefaultModelsRegistry } from '@wrongstack/core/models';
2
+ import type { Config, Logger } from '@wrongstack/core/types';
3
3
  /**
4
4
  * Fetch model lists for every auto-discovery provider in the config and merge
5
5
  * them into the catalog. Best-effort end to end: a down server or missing key
@@ -1,7 +1,7 @@
1
- import type { Config, Logger, Renderer, ModelsRegistry } from '@wrongstack/core/types';
2
- import type { WstackPaths } from '@wrongstack/core/utils';
3
- import type { EventBus } from '@wrongstack/core/kernel';
4
1
  import { DefaultPathResolver } from '@wrongstack/core/infrastructure';
2
+ import type { EventBus } from '@wrongstack/core/kernel';
3
+ import type { Config, Logger, ModelsRegistry, Renderer } from '@wrongstack/core/types';
4
+ import type { WstackPaths } from '@wrongstack/core/utils';
5
5
  import { createDefaultContainer } from '@wrongstack/runtime';
6
6
  import { makePromptDelegate } from '../permission-prompt.js';
7
7
  interface WireContainerDeps {
@@ -1,4 +1,3 @@
1
- import { type WebuiSessionChildOptions } from './webui-session-child.js';
2
1
  import type { Agent } from '@wrongstack/core/agent';
3
2
  import type { BrainArbiter } from '@wrongstack/core/coordination';
4
3
  import type { JournalEntry } from '@wrongstack/core/goal';
@@ -8,6 +7,7 @@ import type { MCPRegistry } from '@wrongstack/mcp';
8
7
  import type { TerminalRenderer } from '../renderer.js';
9
8
  import type { AutonomyMode } from '../services/autonomy-mode.js';
10
9
  import type { CliWebUIOptions } from '../webui-server-options.js';
10
+ import { type WebuiSessionChildOptions } from './webui-session-child.js';
11
11
  export interface WebUIDispatchContext {
12
12
  agent: Agent;
13
13
  events: EventBus;
@@ -1,6 +1,5 @@
1
- import type { Config, Logger, ModelsRegistry } from '@wrongstack/core/types';
2
1
  import type { ProviderRegistry } from '@wrongstack/core/registry';
3
- import type { ResolvedProvider } from '@wrongstack/core/types';
2
+ import type { Config, Logger, ModelsRegistry, ResolvedProvider } from '@wrongstack/core/types';
4
3
  export type ModeId = string;
5
4
  export type ModePrompt = string;
6
5
  export interface ModelCapabilities {
@@ -1,8 +1,8 @@
1
1
  /** CLI boot adapter for canonical runtime tool registration and host policies. */
2
2
  import type { EventBus } from '@wrongstack/core/kernel';
3
+ import type { ToolRegistry } from '@wrongstack/core/registry';
3
4
  import type { MemoryPort, TokenSavingTier, ToolDescriptionModeConfig, ToolResultRenderModeConfig } from '@wrongstack/core/types';
4
5
  import type { WstackPaths } from '@wrongstack/core/utils';
5
- import type { ToolRegistry } from '@wrongstack/core/registry';
6
6
  interface RegisterBuiltinToolsDeps {
7
7
  toolRegistry: ToolRegistry;
8
8
  compactor: unknown;
@@ -1,5 +1,5 @@
1
- import { AutonomousCoordinator, type Director } from '@wrongstack/core/coordination';
2
1
  import type { Context } from '@wrongstack/core/agent';
2
+ import { AutonomousCoordinator, type Director } from '@wrongstack/core/coordination';
3
3
  import type { EventBus } from '@wrongstack/core/kernel';
4
4
  import type { WstackPaths } from '@wrongstack/core/utils';
5
5
  import type { TuiRuntimeState } from './tui-runtime-state.js';
@@ -1,7 +1,7 @@
1
1
  import type { Director } from '@wrongstack/core/coordination';
2
2
  import type { TerminalRenderer } from '../renderer.js';
3
- import type { TuiRuntimeState } from './tui-runtime-state.js';
4
3
  import type { ProjectSwitchContext } from './tui-project-switch.js';
4
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
5
5
  export interface ProjectPickerContext {
6
6
  state: TuiRuntimeState;
7
7
  renderer: TerminalRenderer;
@@ -1,7 +1,7 @@
1
- import type { Config } from '@wrongstack/core/types';
1
+ import type { DefaultPathResolver } from '@wrongstack/core/infrastructure';
2
2
  import { bootConfig as coreBootConfig } from '@wrongstack/core/infrastructure';
3
+ import type { Config } from '@wrongstack/core/types';
3
4
  import type { WstackPaths } from '@wrongstack/core/utils';
4
- import type { DefaultPathResolver } from '@wrongstack/core/infrastructure';
5
5
  export interface BootPaths {
6
6
  cwd: string;
7
7
  projectRoot: string;
package/dist/boot.d.ts CHANGED
@@ -1,6 +1,6 @@
1
+ import { DefaultLogger } from '@wrongstack/core/infrastructure';
1
2
  import type { Config, ModelsRegistry, SecretVault } from '@wrongstack/core/types';
2
3
  import { type WstackPaths } from '@wrongstack/core/utils';
3
- import { DefaultLogger } from '@wrongstack/core/infrastructure';
4
4
  import { ReadlineInputReader } from './input-reader.js';
5
5
  import { TerminalRenderer } from './renderer.js';
6
6
  import type { UpdateInfo } from './update-check.js';
@@ -66,7 +66,12 @@ async function buildPickableProviders(modelsRegistry, config) {
66
66
  const inherited = catalogById.get(catalogType) ?? catalogById.get(cfg.type ?? id);
67
67
  const family = cfg.family ?? inherited?.family ?? "unsupported";
68
68
  if (family === "unsupported") continue;
69
- const models = visibleModelIds(id, config, (inherited?.models ?? []).map((m) => m.id), cfg);
69
+ const models = visibleModelIds(
70
+ id,
71
+ config,
72
+ (inherited?.models ?? []).map((m) => m.id),
73
+ cfg
74
+ );
70
75
  out.push({ id, family, models });
71
76
  }
72
77
  for (const p of catalog) {
@@ -84,4 +89,4 @@ export {
84
89
  hasApiKey,
85
90
  buildPickableProviders
86
91
  };
87
- //# sourceMappingURL=chunk-ETOEGL3V.js.map
92
+ //# sourceMappingURL=chunk-3IC4IEZC.js.map
@@ -34,7 +34,8 @@ function boolFlag(flags, names) {
34
34
  function parsePositiveInteger(value, label) {
35
35
  if (value === void 0) throw new Error(`${label} is required`);
36
36
  const parsed = Number.parseInt(value, 10);
37
- if (!Number.isInteger(parsed) || parsed <= 0) throw new Error(`${label} must be a positive integer`);
37
+ if (!Number.isInteger(parsed) || parsed <= 0)
38
+ throw new Error(`${label} must be a positive integer`);
38
39
  return parsed;
39
40
  }
40
41
  function parsePort(value) {
@@ -124,4 +125,4 @@ export {
124
125
  writeWebuiSessionChildReady,
125
126
  writeWebuiSessionChildError
126
127
  };
127
- //# sourceMappingURL=chunk-PFVVUH5B.js.map
128
+ //# sourceMappingURL=chunk-3JPTNADJ.js.map
@@ -58,4 +58,4 @@ async function discoverAndMergeProviders(opts) {
58
58
  export {
59
59
  discoverAndMergeProviders
60
60
  };
61
- //# sourceMappingURL=chunk-4GVH7V3S.js.map
61
+ //# sourceMappingURL=chunk-52C7PD2H.js.map
@@ -4,7 +4,12 @@ function createHqCommandDispatcher(controller) {
4
4
  return async (command) => {
5
5
  const cmd = command;
6
6
  try {
7
- const result = await dispatch(controller, cmd.commandId, cmd.type, cmd.payload);
7
+ const result = await dispatch(
8
+ controller,
9
+ cmd.commandId,
10
+ cmd.type,
11
+ cmd.payload
12
+ );
8
13
  return result;
9
14
  } catch (err) {
10
15
  return {
@@ -139,4 +144,4 @@ ${command}
139
144
  export {
140
145
  createHqCommandDispatcher
141
146
  };
142
- //# sourceMappingURL=chunk-OP47B3IX.js.map
147
+ //# sourceMappingURL=chunk-7YLN7YUA.js.map
@@ -4,10 +4,9 @@ import { randomUUID } from "node:crypto";
4
4
  import * as fs from "node:fs/promises";
5
5
  import os from "node:os";
6
6
  import * as path from "node:path";
7
- import { atomicWrite, resolveWstackPaths, writeErr } from "@wrongstack/core/utils";
8
- import { ERROR_CODES, FsError } from "@wrongstack/core/types";
9
7
  import { isSecretField } from "@wrongstack/core/security";
10
- import { toErrorMessage } from "@wrongstack/core/utils";
8
+ import { ERROR_CODES, FsError } from "@wrongstack/core/types";
9
+ import { atomicWrite, resolveWstackPaths, toErrorMessage, writeErr } from "@wrongstack/core/utils";
11
10
  var defaultUidFn = () => os.userInfo().uid;
12
11
  async function getFileUid(filePath) {
13
12
  try {
@@ -141,7 +140,11 @@ function historyDir(homeFn = defaultHomeDir, targetConfigPath) {
141
140
  return path.join(path.dirname(configPath(homeFn, targetConfigPath)), "config.history", "entries");
142
141
  }
143
142
  function historyIndexPath(homeFn = defaultHomeDir, targetConfigPath) {
144
- return path.join(path.dirname(configPath(homeFn, targetConfigPath)), "config.history", "index.json");
143
+ return path.join(
144
+ path.dirname(configPath(homeFn, targetConfigPath)),
145
+ "config.history",
146
+ "index.json"
147
+ );
145
148
  }
146
149
  function configPath(homeFn = defaultHomeDir, targetConfigPath) {
147
150
  return targetConfigPath ?? activeProfileConfigPath(homeFn);
@@ -221,9 +224,7 @@ async function backupCurrent(homeFn = defaultHomeDir, targetConfigPath) {
221
224
  try {
222
225
  await atomicWrite(last, content, { mode: 384 });
223
226
  } catch (err) {
224
- writeErr(
225
- `[config-history] .last backup failed: ${toErrorMessage(err)}`
226
- );
227
+ writeErr(`[config-history] .last backup failed: ${toErrorMessage(err)}`);
227
228
  }
228
229
  }
229
230
  if (content !== void 0) {
@@ -231,9 +232,7 @@ async function backupCurrent(homeFn = defaultHomeDir, targetConfigPath) {
231
232
  const bakPath = `${cfg}.${ts}.bak`;
232
233
  await atomicWrite(bakPath, content, { mode: 384 });
233
234
  } catch (err) {
234
- writeErr(
235
- `[config-history] timestamped backup failed: ${toErrorMessage(err)}`
236
- );
235
+ writeErr(`[config-history] timestamped backup failed: ${toErrorMessage(err)}`);
237
236
  }
238
237
  }
239
238
  try {
@@ -244,9 +243,7 @@ async function backupCurrent(homeFn = defaultHomeDir, targetConfigPath) {
244
243
  await safeDelete(path.join(dir, f));
245
244
  }
246
245
  } catch (err) {
247
- writeErr(
248
- `[config-history] backup prune failed: ${toErrorMessage(err)}`
249
- );
246
+ writeErr(`[config-history] backup prune failed: ${toErrorMessage(err)}`);
250
247
  }
251
248
  }
252
249
  async function appendHistory(oldCfg, newCfg, description, homeFn = defaultHomeDir, targetConfigPath) {
@@ -366,4 +363,4 @@ export {
366
363
  restoreFromHistory,
367
364
  restoreLast
368
365
  };
369
- //# sourceMappingURL=chunk-263G3FMB.js.map
366
+ //# sourceMappingURL=chunk-B4JLSXZB.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-U3SS4NRH.js";
4
4
  import {
5
5
  checkForUpdate
6
- } from "./chunk-F4PEGAJZ.js";
6
+ } from "./chunk-NUIHRGPY.js";
7
7
 
8
8
  // src/subcommands/handlers/update.ts
9
9
  import { spawn } from "node:child_process";
@@ -197,7 +197,12 @@ function parseUpdateArgs(args) {
197
197
  if (pmEq) {
198
198
  const pm = parsePackageManager(pmEq);
199
199
  if (!pm)
200
- return { checkOnly, packageManager, allowScripts, error: `Invalid package manager: ${pmEq}` };
200
+ return {
201
+ checkOnly,
202
+ packageManager,
203
+ allowScripts,
204
+ error: `Invalid package manager: ${pmEq}`
205
+ };
201
206
  packageManager = pm;
202
207
  continue;
203
208
  }
@@ -303,4 +308,4 @@ export {
303
308
  detectUpdatePackageManager,
304
309
  detectUpdatePackageName
305
310
  };
306
- //# sourceMappingURL=chunk-I5MEUFDI.js.map
311
+ //# sourceMappingURL=chunk-BXQG3H2Y.js.map
@@ -2,11 +2,11 @@ import {
2
2
  hasApiKey,
3
3
  isKeylessLocalProvider,
4
4
  visibleModelIds
5
- } from "./chunk-ETOEGL3V.js";
5
+ } from "./chunk-3IC4IEZC.js";
6
6
  import {
7
7
  appendHistory,
8
8
  backupCurrent
9
- } from "./chunk-263G3FMB.js";
9
+ } from "./chunk-B4JLSXZB.js";
10
10
 
11
11
  // src/arg-parser.ts
12
12
  var BOOLEAN_FLAGS = /* @__PURE__ */ new Set([
@@ -230,8 +230,15 @@ var LOCAL_LLM_PRESETS = projectLocalProviderPresets();
230
230
 
231
231
  // src/picker.ts
232
232
  import os from "node:os";
233
- import { color as color3, expectDefined as expectDefined2, setOutputLineGuard as setOutputLineGuard2, setRawMode as setRawMode2, stripAnsi as stripAnsi2, writeOut as writeOut2 } from "@wrongstack/core/utils";
234
- import { toErrorMessage } from "@wrongstack/core/utils";
233
+ import {
234
+ color as color3,
235
+ expectDefined as expectDefined2,
236
+ setOutputLineGuard as setOutputLineGuard2,
237
+ setRawMode as setRawMode2,
238
+ stripAnsi as stripAnsi2,
239
+ toErrorMessage,
240
+ writeOut as writeOut2
241
+ } from "@wrongstack/core/utils";
235
242
 
236
243
  // src/picker-key-state.ts
237
244
  function applyPickerKey(state, chunk, matchCount) {
@@ -267,7 +274,13 @@ function applyPickerKey(state, chunk, matchCount) {
267
274
  }
268
275
 
269
276
  // src/picker-model-picker.ts
270
- import { color as color2, expectDefined, setOutputLineGuard, setRawMode, writeOut } from "@wrongstack/core/utils";
277
+ import {
278
+ color as color2,
279
+ expectDefined,
280
+ setOutputLineGuard,
281
+ setRawMode,
282
+ writeOut
283
+ } from "@wrongstack/core/utils";
271
284
 
272
285
  // src/picker-ui.ts
273
286
  import { color, stripAnsi } from "@wrongstack/core/utils";
@@ -1039,4 +1052,4 @@ export {
1039
1052
  runLiveProviderPicker,
1040
1053
  runPicker
1041
1054
  };
1042
- //# sourceMappingURL=chunk-MT6FGXO3.js.map
1055
+ //# sourceMappingURL=chunk-C5NXM2SI.js.map
@@ -435,4 +435,4 @@ export {
435
435
  getTaskGraphId,
436
436
  getTaskTrackerExport
437
437
  };
438
- //# sourceMappingURL=chunk-XTIXVJXP.js.map
438
+ //# sourceMappingURL=chunk-DGXNL7OT.js.map