@wrongstack/cli 0.306.4 → 0.307.1

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 (73) hide show
  1. package/dist/{auth-L3WGSGDX.js → auth-TVOOHL4Q.js} +45 -106
  2. package/dist/boot/short-circuit-flags.d.ts +2 -2
  3. package/dist/chimera-cascade-evidence.d.ts +1 -1
  4. package/dist/chimera-reviewer-policy.d.ts +1 -1
  5. package/dist/chunk-2VMJ3E5Z.js +71 -0
  6. package/dist/{chunk-RHLQT3EV.js → chunk-CB35UVXO.js} +1636 -1528
  7. package/dist/{chunk-YKBRFSGL.js → chunk-DOJLAULS.js} +28 -28
  8. package/dist/{chunk-KXN5HZDL.js → chunk-PKHGLWUJ.js} +24 -6
  9. package/dist/{chunk-HITHEXE3.js → chunk-TOG7OMKJ.js} +2 -2
  10. package/dist/{chunk-ARWGQUB3.js → chunk-XSG33WHN.js} +15 -5
  11. package/dist/{cli-main-4TZCCZR6.js → cli-main-DD3I7KOO.js} +29198 -28411
  12. package/dist/cli-main.d.ts +0 -20
  13. package/dist/{execution-547PM3NI.js → execution-4ASWJ7EY.js} +309 -273
  14. package/dist/fleet/host-learning-scheduler.d.ts +27 -0
  15. package/dist/fleet/host-shadow-manager.d.ts +64 -0
  16. package/dist/fleet/host.d.ts +5 -140
  17. package/dist/{hq-ZK6PGN3W.js → hq-PA6RH2UW.js} +2 -2
  18. package/dist/hq-server/mailbox-gateway-manager.d.ts +32 -0
  19. package/dist/hq-server/routes/auth/bootstrap-routes.d.ts +5 -0
  20. package/dist/hq-server/routes/auth/common.d.ts +11 -0
  21. package/dist/hq-server/routes/auth/password-routes.d.ts +9 -0
  22. package/dist/hq-server/routes/auth/session-audit-routes.d.ts +6 -0
  23. package/dist/hq-server/routes/auth/totp-routes.d.ts +9 -0
  24. package/dist/hq-server/routes/auth-handlers.d.ts +5 -132
  25. package/dist/hq-server/routes/command-handlers.d.ts +7 -0
  26. package/dist/hq-server/routes/data-handlers.d.ts +8 -0
  27. package/dist/hq-server/routes/mailbox-handlers.d.ts +22 -0
  28. package/dist/hq-server/routes.d.ts +3 -3
  29. package/dist/hq-server/server-lifecycle.d.ts +37 -0
  30. package/dist/hq-server/snapshot.d.ts +6 -5
  31. package/dist/hq-server/types.d.ts +4 -0
  32. package/dist/hq-server/upgrade-handler.d.ts +34 -0
  33. package/dist/hq-server/ws-client-events.d.ts +25 -0
  34. package/dist/hq-server/ws-leader.d.ts +47 -0
  35. package/dist/hq-server/ws-resume.d.ts +27 -0
  36. package/dist/hq-server/ws.d.ts +4 -71
  37. package/dist/{hq-server-IVZLVCFV.js → hq-server-PBRU275L.js} +2 -2
  38. package/dist/hq-server.d.ts +0 -38
  39. package/dist/index.js +1267 -122
  40. package/dist/{mcp-W7HHN7IA.js → mcp-CMLFHRG2.js} +14 -7
  41. package/dist/mcp-serve.d.ts +12 -1
  42. package/dist/{modeldiag-6VS5KDP5.js → modeldiag-ICMPHT5L.js} +868 -831
  43. package/dist/{providers-models-HQN3AT3K.js → providers-models-4FAKM2WO.js} +4 -4
  44. package/dist/repl-eternal-loop.d.ts +8 -0
  45. package/dist/repl-goal-banner.d.ts +21 -0
  46. package/dist/slash-commands/brain-council.d.ts +36 -0
  47. package/dist/slash-commands/brain-status.d.ts +12 -0
  48. package/dist/slash-commands/kanban-board-handlers.d.ts +13 -0
  49. package/dist/slash-commands/kanban-lifecycle-diagnostics.d.ts +16 -0
  50. package/dist/slash-commands/kanban-task-subcommands.d.ts +8 -0
  51. package/dist/slash-commands/memory-audience.d.ts +14 -0
  52. package/dist/slash-commands/memory-gather.d.ts +9 -0
  53. package/dist/slash-commands/memory-stats.d.ts +5 -0
  54. package/dist/slash-commands/settings-mutations.d.ts +6 -0
  55. package/dist/slash-commands/settings-view.d.ts +5 -0
  56. package/dist/subcommands/handlers/modeldiag-bench.d.ts +10 -0
  57. package/dist/subcommands/handlers/modeldiag-eval.d.ts +27 -0
  58. package/dist/subcommands/handlers/modeldiag-test.d.ts +8 -0
  59. package/dist/{version-help-ASKQYXDJ.js → version-help-TFD6VPF3.js} +2 -2
  60. package/dist/vibe-protocol-wiring.d.ts +2 -0
  61. package/dist/webui-server/credential-watcher.d.ts +15 -0
  62. package/dist/webui-server/domain-handlers.d.ts +21 -0
  63. package/dist/webui-server/route-contexts.d.ts +41 -0
  64. package/dist/{webui-server-FTG7JAZU.js → webui-server-IPHGJGXE.js} +515 -437
  65. package/dist/wiring/cli-execute-builder.d.ts +88 -0
  66. package/dist/wiring/cli-heap-watchdog.d.ts +33 -0
  67. package/dist/wiring/cli-prompt-and-tools-setup.d.ts +25 -0
  68. package/dist/wiring/cli-slash-commands-setup.d.ts +79 -0
  69. package/dist/wiring/heap-watchdog-setup.d.ts +53 -0
  70. package/dist/wiring/metrics.d.ts +1 -0
  71. package/dist/wiring/prompt-journal-recorder.d.ts +45 -0
  72. package/dist/wiring/replay-governance-setup.d.ts +31 -0
  73. package/package.json +27 -27
@@ -13,11 +13,22 @@ import {
13
13
  runOAuthLoginKind,
14
14
  runOAuthLoginMenu,
15
15
  validateFamily
16
- } from "./chunk-HITHEXE3.js";
16
+ } from "./chunk-TOG7OMKJ.js";
17
+ import {
18
+ restoreFlags
19
+ } from "./chunk-CSAPOCBP.js";
20
+ import {
21
+ renderAuthLocalHelpToString,
22
+ wantsLocalHelp
23
+ } from "./chunk-2VMJ3E5Z.js";
17
24
  import {
18
25
  parseAuthFlags
19
- } from "./chunk-KXN5HZDL.js";
26
+ } from "./chunk-PKHGLWUJ.js";
27
+ import "./chunk-B4JLSXZB.js";
20
28
  import "./chunk-VUVOMXWP.js";
29
+ import {
30
+ activeProfileConfigPath
31
+ } from "./chunk-YMXXOOFN.js";
21
32
  import "./chunk-SSSJQVUY.js";
22
33
  import {
23
34
  loadConfigProviders,
@@ -27,17 +38,10 @@ import {
27
38
  nowIso,
28
39
  writeKeysBack
29
40
  } from "./chunk-SZ42FYPT.js";
30
- import {
31
- restoreFlags
32
- } from "./chunk-CSAPOCBP.js";
33
- import "./chunk-B4JLSXZB.js";
34
- import {
35
- activeProfileConfigPath
36
- } from "./chunk-YMXXOOFN.js";
37
41
  import "./chunk-7OCVIDC7.js";
38
42
 
39
43
  // src/subcommands/handlers/auth.ts
40
- import { color as color4 } from "@wrongstack/core/utils";
44
+ import { color as color3 } from "@wrongstack/core/utils";
41
45
 
42
46
  // src/auth-menu/direct.ts
43
47
  async function runAuthDirect(deps, opts) {
@@ -359,71 +363,6 @@ ${color2.amber("?")} Pick: `)).trim().toLowerCase();
359
363
  }
360
364
  }
361
365
 
362
- // src/subcommands/handlers/auth-local-help.ts
363
- import { color as color3 } from "@wrongstack/core/utils";
364
- var LOCAL_AUTH_FLAGS = [
365
- {
366
- flag: "--name <ollama|vllm|lmstudio>",
367
- description: "Pick a preset (skip the interactive picker). Defaults to the first run; set this for scripting."
368
- },
369
- {
370
- flag: "--base-url <url>",
371
- description: "Override the preset default (e.g. `http://gpu-host:8000/v1` for a remote vLLM). Empty falls back to the preset."
372
- },
373
- {
374
- flag: "--no-key / --skip-key",
375
- description: "Skip the API-key prompt even for presets that accept one. Use for non-TTY scripted setups."
376
- },
377
- {
378
- flag: "--no-probe / --skip-probe",
379
- description: "Skip the health probe. Use when the local server is not running yet but the config must be persisted."
380
- },
381
- {
382
- flag: "--probe-only",
383
- description: "Run the probe and report, do not save. Use to re-check a previously-saved provider."
384
- },
385
- {
386
- flag: "--model <spec> / -m <spec>",
387
- description: "Pre-populate the saved `models` allowlist. `--model first` / `<N>` consume the probe; `<csv>` is a literal list; bare `--model` clears the allowlist."
388
- },
389
- {
390
- flag: "--audit [target]",
391
- description: "Emit JSONL audit events for the save lifecycle. Bare / `stdout` \u2192 stdout; `stderr` \u2192 stderr; `<path>` \u2192 file. Default is silent."
392
- }
393
- ];
394
- var LOCAL_FLAG_COLUMN_WIDTH = 38;
395
- var LOCAL_AUTH_HELP_USAGE = "wstack auth local [--name <id>] [--base-url <url>] [--no-key] [--no-probe|--probe-only] [--model <spec>] [--audit [target]]";
396
- function wantsLocalHelp(args) {
397
- return args.includes("--help") || args.includes("-h");
398
- }
399
- function renderAuthLocalHelpToString() {
400
- const lines = [
401
- color3.bold("wstack auth local \u2014 quick-add Ollama / vLLM / LM Studio"),
402
- color3.dim(" Pre-fills the base URL, runs a health probe (`GET /v1/models`),"),
403
- color3.dim(" and persists the allowlist so you can `wstack --provider <id>`"),
404
- color3.dim(" right away. Use `--no-probe` to skip when the local server is not"),
405
- color3.dim(" running yet; use `--audit <file>` to capture the save lifecycle."),
406
- "",
407
- color3.bold("Usage"),
408
- ` ${LOCAL_AUTH_HELP_USAGE}`,
409
- "",
410
- color3.bold("Flags")
411
- ];
412
- for (const { flag, description } of LOCAL_AUTH_FLAGS) {
413
- const padded = flag.padEnd(LOCAL_FLAG_COLUMN_WIDTH, " ");
414
- lines.push(` ${color3.cyan(padded)}${description}`);
415
- }
416
- lines.push("");
417
- lines.push(color3.dim(" See also: `wstack --help` for the top-level command list."));
418
- lines.push(
419
- color3.dim(" Examples: `wstack auth local --name ollama --no-probe --model 'llama3.1:8b'`")
420
- );
421
- lines.push(
422
- color3.dim(" `wstack auth local --name ollama --audit /var/log/wstack-auth.jsonl`")
423
- );
424
- return lines.join("\n") + "\n";
425
- }
426
-
427
366
  // src/subcommands/handlers/auth.ts
428
367
  var authCmd = async (args, deps) => {
429
368
  args = restoreFlags(args, deps, [
@@ -508,7 +447,7 @@ var authCmd = async (args, deps) => {
508
447
  "OAuth login is only supported for ChatGPT, Claude, and GitHub Copilot."
509
448
  );
510
449
  deps.renderer.write(
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"
450
+ 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"
512
451
  );
513
452
  return 1;
514
453
  }
@@ -531,14 +470,14 @@ async function runAuthList(deps) {
531
470
  const ids = Object.keys(providers).sort();
532
471
  if (ids.length === 0) {
533
472
  deps.renderer.write(
534
- `${color4.dim("No providers configured.")}
535
- ${color4.dim("Run")} ${color4.bold("wstack auth")} ${color4.dim("to add one.")}
473
+ `${color3.dim("No providers configured.")}
474
+ ${color3.dim("Run")} ${color3.bold("wstack auth")} ${color3.dim("to add one.")}
536
475
  `
537
476
  );
538
477
  return 0;
539
478
  }
540
479
  deps.renderer.write(`
541
- ${color4.bold("Saved providers")} ${color4.dim(`(${ids.length})`)}
480
+ ${color3.bold("Saved providers")} ${color3.dim(`(${ids.length})`)}
542
481
 
543
482
  `);
544
483
  for (const id of ids) {
@@ -546,34 +485,34 @@ ${color4.bold("Saved providers")} ${color4.dim(`(${ids.length})`)}
546
485
  if (!cfg) continue;
547
486
  const keys = normalizeKeys(cfg);
548
487
  const active = cfg.activeKey ?? keys[0]?.label;
549
- const famTag = cfg.family ? `${cfg.family}` : color4.amber("no-family");
550
- const aliasHint = cfg.type && cfg.type !== id ? color4.dim(` (\u2192 ${cfg.type})`) : "";
551
- const modelHint = cfg.models && cfg.models.length > 0 ? color4.dim(` [${cfg.models.length} models]`) : "";
552
- deps.renderer.write(` ${color4.bold(id)}${aliasHint}
488
+ const famTag = cfg.family ? `${cfg.family}` : color3.amber("no-family");
489
+ const aliasHint = cfg.type && cfg.type !== id ? color3.dim(` (\u2192 ${cfg.type})`) : "";
490
+ const modelHint = cfg.models && cfg.models.length > 0 ? color3.dim(` [${cfg.models.length} models]`) : "";
491
+ deps.renderer.write(` ${color3.bold(id)}${aliasHint}
553
492
  `);
554
493
  deps.renderer.write(
555
- ` family: ${famTag} baseUrl: ${cfg.baseUrl ?? color4.dim("unset")}${modelHint}
494
+ ` family: ${famTag} baseUrl: ${cfg.baseUrl ?? color3.dim("unset")}${modelHint}
556
495
  `
557
496
  );
558
497
  if (keys.length === 0) {
559
- deps.renderer.write(` ${color4.amber("no keys")}
498
+ deps.renderer.write(` ${color3.amber("no keys")}
560
499
  `);
561
500
  } else {
562
501
  deps.renderer.write(
563
- ` ${color4.dim(`${keys.length} key${keys.length === 1 ? "" : "s"}:`)}
502
+ ` ${color3.dim(`${keys.length} key${keys.length === 1 ? "" : "s"}:`)}
564
503
  `
565
504
  );
566
505
  for (const k of keys) {
567
- const marker = k.label === active ? color4.green("\u25CF") : color4.dim("\u25CB");
506
+ const marker = k.label === active ? color3.green("\u25CF") : color3.dim("\u25CB");
568
507
  deps.renderer.write(
569
- ` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${color4.dim(k.createdAt)}
508
+ ` ${marker} ${k.label.padEnd(18)} ${maskedKey(k.apiKey)} ${color3.dim(k.createdAt)}
570
509
  `
571
510
  );
572
511
  }
573
512
  }
574
513
  deps.renderer.write("\n");
575
514
  }
576
- deps.renderer.write(color4.dim(`Manage: wstack auth Add key: wstack auth <provider>
515
+ deps.renderer.write(color3.dim(`Manage: wstack auth Add key: wstack auth <provider>
577
516
  `));
578
517
  return 0;
579
518
  }
@@ -589,7 +528,7 @@ async function runAuthStatus(deps, providerId) {
589
528
  if (!cfg) {
590
529
  deps.renderer.writeError(`Provider "${providerId}" not found in config.`);
591
530
  deps.renderer.write(
592
- color4.dim(`Run ${color4.bold("wstack auth list")} to see saved providers.
531
+ color3.dim(`Run ${color3.bold("wstack auth list")} to see saved providers.
593
532
  `)
594
533
  );
595
534
  return 1;
@@ -598,32 +537,32 @@ async function runAuthStatus(deps, providerId) {
598
537
  const active = cfg.activeKey ?? keys[0]?.label;
599
538
  const lines = [
600
539
  `
601
- ${color4.bold(providerId)} ${cfg.family ? color4.dim(`[${cfg.family}]`) : color4.amber("[no family]")}`,
540
+ ${color3.bold(providerId)} ${cfg.family ? color3.dim(`[${cfg.family}]`) : color3.amber("[no family]")}`,
602
541
  "",
603
- ` type: ${color4.cyan(cfg.type ?? providerId)}`,
604
- ` family: ${cfg.family ? color4.cyan(cfg.family) : color4.dim("unset")}`,
605
- ` baseUrl: ${cfg.baseUrl ? color4.cyan(cfg.baseUrl) : color4.dim("unset")}`
542
+ ` type: ${color3.cyan(cfg.type ?? providerId)}`,
543
+ ` family: ${cfg.family ? color3.cyan(cfg.family) : color3.dim("unset")}`,
544
+ ` baseUrl: ${cfg.baseUrl ? color3.cyan(cfg.baseUrl) : color3.dim("unset")}`
606
545
  ];
607
546
  if (cfg.models?.length) {
608
- lines.push(` models: ${color4.cyan(cfg.models.join(", "))}`);
547
+ lines.push(` models: ${color3.cyan(cfg.models.join(", "))}`);
609
548
  }
610
549
  if (cfg.envVars?.length) {
611
- lines.push(` envVars: ${color4.cyan(cfg.envVars.join(", "))}`);
550
+ lines.push(` envVars: ${color3.cyan(cfg.envVars.join(", "))}`);
612
551
  }
613
552
  lines.push("");
614
553
  if (keys.length === 0) {
615
- lines.push(color4.amber(" (no keys saved)"));
554
+ lines.push(color3.amber(" (no keys saved)"));
616
555
  } else {
617
- lines.push(` ${color4.dim("Keys:")}`);
556
+ lines.push(` ${color3.dim("Keys:")}`);
618
557
  for (const k of keys) {
619
- const marker = k.label === active ? color4.green("\u25CF") : color4.dim("\u25CB");
558
+ const marker = k.label === active ? color3.green("\u25CF") : color3.dim("\u25CB");
620
559
  lines.push(
621
- ` ${marker} ${color4.bold(k.label.padEnd(18))} ${maskedKey(k.apiKey)} ${color4.dim(k.createdAt)}`
560
+ ` ${marker} ${color3.bold(k.label.padEnd(18))} ${maskedKey(k.apiKey)} ${color3.dim(k.createdAt)}`
622
561
  );
623
562
  }
624
563
  }
625
564
  lines.push("");
626
- lines.push(color4.dim(`Manage: wstack auth \u2192 pick ${providerId}`));
565
+ lines.push(color3.dim(`Manage: wstack auth \u2192 pick ${providerId}`));
627
566
  deps.renderer.write(lines.join("\n") + "\n");
628
567
  return 0;
629
568
  }
@@ -634,19 +573,19 @@ async function runAuthRemove(deps, providerId) {
634
573
  return 1;
635
574
  }
636
575
  deps.renderer.write(
637
- `${color4.amber("!")} This will remove "${providerId}" and all its saved keys.
576
+ `${color3.amber("!")} This will remove "${providerId}" and all its saved keys.
638
577
  `
639
578
  );
640
- const answer = (await deps.reader.readLine(` ${color4.amber("?")} Confirm removal? ${color4.dim("[y/N]")} `)).trim().toLowerCase();
579
+ const answer = (await deps.reader.readLine(` ${color3.amber("?")} Confirm removal? ${color3.dim("[y/N]")} `)).trim().toLowerCase();
641
580
  if (answer !== "y" && answer !== "yes") {
642
- deps.renderer.write(color4.dim("Cancelled.\n"));
581
+ deps.renderer.write(color3.dim("Cancelled.\n"));
643
582
  return 0;
644
583
  }
645
584
  try {
646
585
  await mutateConfigProviders(deps.profileConfigPath, deps.vault, (all) => {
647
586
  delete all[providerId];
648
587
  });
649
- deps.renderer.write(` ${color4.green("\u2713")} Removed ${color4.bold(providerId)}.
588
+ deps.renderer.write(` ${color3.green("\u2713")} Removed ${color3.bold(providerId)}.
650
589
  `);
651
590
  return 0;
652
591
  } catch (err) {
@@ -657,4 +596,4 @@ async function runAuthRemove(deps, providerId) {
657
596
  export {
658
597
  authCmd
659
598
  };
660
- //# sourceMappingURL=auth-L3WGSGDX.js.map
599
+ //# sourceMappingURL=auth-TVOOHL4Q.js.map
@@ -6,8 +6,8 @@
6
6
  * `write` calls, no TTY needed.
7
7
  *
8
8
  * When `--help` accompanies a known subcommand positional (e.g.
9
- * `wstack hq --help`), this defers to the subcommand dispatcher
10
- * (returns null) so the subcommand can print its own focused help.
9
+ * `wstack hq --help` or `wstack mcp add --help`), this renders the
10
+ * focused / deep help directly for instantaneous output.
11
11
  * `--version` always fires globally — the CLI version is not
12
12
  * subcommand-specific.
13
13
  */
@@ -46,7 +46,7 @@ export interface CascadeEvidenceVerification {
46
46
  /**
47
47
  * Extract a `verification_evidence` block from a cascade agent's response.
48
48
  *
49
- * Scans every fenced ```json block in the text and returns the first that
49
+ * Scans every fenced code block in the text and returns the first that
50
50
  * parses as an object with a `verification_evidence` member whose value is an
51
51
  * object of `{command, exitCode}` checks. Any malformed JSON fence is ignored
52
52
  * (the agent may have used a fence for something else); when the evidence is
@@ -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-search", "codebase-stats"];
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"];
135
135
  export declare function applyChimeraReviewerReadOnlyPolicy(config: SubagentConfig): SubagentConfig;
136
136
  //# sourceMappingURL=chimera-reviewer-policy.d.ts.map
@@ -0,0 +1,71 @@
1
+
2
+ // src/subcommands/handlers/auth-local-help.ts
3
+ import { color } from "@wrongstack/core/utils";
4
+ var LOCAL_AUTH_FLAGS = [
5
+ {
6
+ flag: "--name <ollama|vllm|lmstudio>",
7
+ description: "Pick a preset (skip the interactive picker). Defaults to the first run; set this for scripting."
8
+ },
9
+ {
10
+ flag: "--base-url <url>",
11
+ description: "Override the preset default (e.g. `http://gpu-host:8000/v1` for a remote vLLM). Empty falls back to the preset."
12
+ },
13
+ {
14
+ flag: "--no-key / --skip-key",
15
+ description: "Skip the API-key prompt even for presets that accept one. Use for non-TTY scripted setups."
16
+ },
17
+ {
18
+ flag: "--no-probe / --skip-probe",
19
+ description: "Skip the health probe. Use when the local server is not running yet but the config must be persisted."
20
+ },
21
+ {
22
+ flag: "--probe-only",
23
+ description: "Run the probe and report, do not save. Use to re-check a previously-saved provider."
24
+ },
25
+ {
26
+ flag: "--model <spec> / -m <spec>",
27
+ description: "Pre-populate the saved `models` allowlist. `--model first` / `<N>` consume the probe; `<csv>` is a literal list; bare `--model` clears the allowlist."
28
+ },
29
+ {
30
+ flag: "--audit [target]",
31
+ description: "Emit JSONL audit events for the save lifecycle. Bare / `stdout` \u2192 stdout; `stderr` \u2192 stderr; `<path>` \u2192 file. Default is silent."
32
+ }
33
+ ];
34
+ var LOCAL_FLAG_COLUMN_WIDTH = 38;
35
+ var LOCAL_AUTH_HELP_USAGE = "wstack auth local [--name <id>] [--base-url <url>] [--no-key] [--no-probe|--probe-only] [--model <spec>] [--audit [target]]";
36
+ function wantsLocalHelp(args) {
37
+ return args.includes("--help") || args.includes("-h");
38
+ }
39
+ function renderAuthLocalHelpToString() {
40
+ const lines = [
41
+ color.bold("wstack auth local \u2014 quick-add Ollama / vLLM / LM Studio"),
42
+ color.dim(" Pre-fills the base URL, runs a health probe (`GET /v1/models`),"),
43
+ color.dim(" and persists the allowlist so you can `wstack --provider <id>`"),
44
+ color.dim(" right away. Use `--no-probe` to skip when the local server is not"),
45
+ color.dim(" running yet; use `--audit <file>` to capture the save lifecycle."),
46
+ "",
47
+ color.bold("Usage"),
48
+ ` ${LOCAL_AUTH_HELP_USAGE}`,
49
+ "",
50
+ color.bold("Flags")
51
+ ];
52
+ for (const { flag, description } of LOCAL_AUTH_FLAGS) {
53
+ const padded = flag.padEnd(LOCAL_FLAG_COLUMN_WIDTH, " ");
54
+ lines.push(` ${color.cyan(padded)}${description}`);
55
+ }
56
+ lines.push("");
57
+ lines.push(color.dim(" See also: `wstack --help` for the top-level command list."));
58
+ lines.push(
59
+ color.dim(" Examples: `wstack auth local --name ollama --no-probe --model 'llama3.1:8b'`")
60
+ );
61
+ lines.push(
62
+ color.dim(" `wstack auth local --name ollama --audit /var/log/wstack-auth.jsonl`")
63
+ );
64
+ return lines.join("\n") + "\n";
65
+ }
66
+
67
+ export {
68
+ wantsLocalHelp,
69
+ renderAuthLocalHelpToString
70
+ };
71
+ //# sourceMappingURL=chunk-2VMJ3E5Z.js.map