@wrongstack/cli 0.319.1 → 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 (100) 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-ND7J7DTD.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-LIWVIEZM.js → chunk-4HV5RKZH.js} +5 -5
  14. package/dist/{chunk-HF5VQWIY.js → chunk-5IA5337I.js} +3 -3
  15. package/dist/{chunk-TALOKMIC.js → chunk-C2E24IXZ.js} +31 -15
  16. package/dist/{chunk-XPX432BZ.js → chunk-DR2OXU46.js} +50 -39
  17. package/dist/chunk-ETYHZPXP.js +52 -0
  18. package/dist/{chunk-TYO2OVAD.js → chunk-EWKESL4L.js} +8 -4
  19. package/dist/{chunk-QAC263FZ.js → chunk-FPIWTJ2G.js} +2 -3
  20. package/dist/{chunk-7YLN7YUA.js → chunk-IMWXXF4J.js} +61 -9
  21. package/dist/{chunk-IMT6PNV5.js → chunk-MNQQ4ZNF.js} +26 -22
  22. package/dist/{chunk-P2OKBDCH.js → chunk-MXEJEYT7.js} +53 -14
  23. package/dist/{chunk-PCBJSXYV.js → chunk-O4A3HHKD.js} +2 -2
  24. package/dist/{chunk-XYKYXFEE.js → chunk-TE3Q32JP.js} +10 -4
  25. package/dist/{chunk-635WW3II.js → chunk-TEBMCYZN.js} +67 -18
  26. package/dist/{chunk-E4I2TF5S.js → chunk-TNK6237M.js} +2 -2
  27. package/dist/{chunk-GGGUZSAU.js → chunk-Z7A5MXKJ.js} +18 -12
  28. package/dist/{chunk-F5GA2QW2.js → chunk-ZSZ3EYWH.js} +2 -2
  29. package/dist/{cli-context-K73EIND5.js → cli-context-CYMKNOK3.js} +58 -307
  30. package/dist/{cli-main-QXSKKANW.js → cli-main-TTIVR4DI.js} +897 -286
  31. package/dist/{diag-doctor-QZVKUAE5.js → diag-doctor-7LYUYU35.js} +1 -2
  32. package/dist/execute-deps.d.ts +5 -1
  33. package/dist/{execution-7ZFY4FJY.js → execution-3Y55IWBK.js} +37 -20
  34. package/dist/{export-ROG3DKTZ.js → export-VVRIOWFV.js} +1 -2
  35. package/dist/{governance-JSGHHA2R.js → governance-RYSHV675.js} +1 -2
  36. package/dist/{hq-4QQJO2GN.js → hq-IG3YRGCO.js} +2 -3
  37. package/dist/hq-command-controller.d.ts +37 -7
  38. package/dist/hq-server/ws.d.ts +1 -1
  39. package/dist/{hq-server-CVAYICIS.js → hq-server-OILU3NPI.js} +2 -3
  40. package/dist/{hq-ttl-KUO3AU7X.js → hq-ttl-VJR65OBJ.js} +1 -2
  41. package/dist/{hq-tunnel-LO55RCZE.js → hq-tunnel-NIJ5EP2Y.js} +1 -2
  42. package/dist/index.js +5 -6
  43. package/dist/{init-4JQSG66Q.js → init-DRMMFG2G.js} +1 -2
  44. package/dist/{kanban-run-mirror-EKVNGXWW.js → kanban-run-mirror-22HQ5FNG.js} +1 -2
  45. package/dist/live-settings-input.d.ts +2 -0
  46. package/dist/{mailbox-serve-VKQIRCCB.js → mailbox-serve-VUCWZ2SJ.js} +2 -3
  47. package/dist/{mcp-AQKSASHD.js → mcp-HOMLC4WE.js} +1 -2
  48. package/dist/{modeldiag-ZL4ROTQ5.js → modeldiag-FMJT37SN.js} +2 -3
  49. package/dist/{per-subcommand-help-6VCIKDUW.js → per-subcommand-help-BWBHYVJO.js} +2 -3
  50. package/dist/{permissions-2PWBL4YU.js → permissions-CFDLXETM.js} +1 -2
  51. package/dist/{plugin-usage-7WCZW4NP.js → plugin-usage-HFBI3TFT.js} +2 -3
  52. package/dist/{plugins-7N3TF2QF.js → plugins-PZ2VZL7V.js} +4 -5
  53. package/dist/{project-BLQ3ALVL.js → project-AOQI5XTK.js} +1 -2
  54. package/dist/{project-manifest-RV5FXGQI.js → project-manifest-7NSFVBM3.js} +1 -2
  55. package/dist/{project-picker-CCQR3W4I.js → project-picker-SVBXMPKX.js} +1 -2
  56. package/dist/{projects-5J727S4L.js → projects-L6C6XLDY.js} +1 -2
  57. package/dist/provider-config-utils.d.ts +1 -1
  58. package/dist/{providers-models-OKKQZIWU.js → providers-models-YVMVYWRS.js} +3 -4
  59. package/dist/{proxy-wiring-QCI7EWQC.js → proxy-wiring-MGRSKZZB.js} +1 -2
  60. package/dist/{quick-XLYLZX4B.js → quick-CNB4Z3HS.js} +1 -2
  61. package/dist/{replay-RZXZKP2U.js → replay-JJ2NOWD6.js} +1 -2
  62. package/dist/{replay-FJ2JBXUA.js → replay-Z3FTJEMM.js} +1 -2
  63. package/dist/{rewind-2FFNOOKS.js → rewind-JA3ZLCNM.js} +1 -2
  64. package/dist/{sdd-runtime-R6FAK2G2.js → sdd-runtime-PTOSPYI4.js} +1 -2
  65. package/dist/services/statusline-config.d.ts +43 -13
  66. package/dist/{sessions-config-KAMEBVOX.js → sessions-config-UL45XKX7.js} +2 -3
  67. package/dist/{sessions-doctor-EXHAZSSE.js → sessions-doctor-QUL37U32.js} +1 -2
  68. package/dist/short-circuit-flags-6PSP56L7.js +10 -0
  69. package/dist/{simpleui-dist-JKNRCRRK.js → simpleui-dist-CXSIDAXZ.js} +1 -2
  70. package/dist/slash-commands/command-context.d.ts +10 -0
  71. package/dist/slash-commands/statusline.d.ts +1 -1
  72. package/dist/subcommands/handlers/bench-run-config.d.ts +18 -0
  73. package/dist/subcommands/handlers/bench.d.ts +8 -7
  74. package/dist/subcommands-HZQKA4G2.js +9 -0
  75. package/dist/{tools-skills-Q4P27URS.js → tools-skills-GH24UCBY.js} +1 -2
  76. package/dist/{update-K45CS6SS.js → update-5DPB4YD4.js} +1 -2
  77. package/dist/{update-check-PKSMSMD6.js → update-check-BS3DHTSI.js} +1 -2
  78. package/dist/version-help-MYKF724O.js +10 -0
  79. package/dist/webui-server/client-registration.d.ts +9 -1
  80. package/dist/{webui-server-F7MSRHOF.js → webui-server-T6AMOXJJ.js} +51 -12
  81. package/dist/wiring/brain-and-orchestration.d.ts +2 -0
  82. package/dist/wiring/cli-execute-builder.d.ts +4 -0
  83. package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
  84. package/dist/wiring/command-host-state.d.ts +50 -5
  85. package/dist/wiring/external-plugins.d.ts +9 -0
  86. package/dist/wiring/provider-runtime-setup.d.ts +2 -0
  87. package/dist/wiring/runtime-controller-deps.d.ts +3 -0
  88. package/dist/wiring/vector-memory-setup.d.ts +12 -0
  89. package/dist/wiring/wrongtrace-prompt-contributor.d.ts +5 -2
  90. package/dist/{wrongtrace-gate-counters-GSVY372D.js → wrongtrace-gate-counters-7C2EAAZL.js} +1 -2
  91. package/dist/{wrongtrace-telemetry-KBBM5NLQ.js → wrongtrace-telemetry-3ASFKOZO.js} +1 -2
  92. package/package.json +28 -28
  93. package/dist/chunk-7OCVIDC7.js +0 -11
  94. package/dist/chunk-KYDJJLJI.js +0 -52
  95. package/dist/launch-hints.d.ts +0 -49
  96. package/dist/short-circuit-flags-7YUCERBB.js +0 -11
  97. package/dist/subcommands-KE6MEQQP.js +0 -10
  98. package/dist/version-help-WMPSEL4U.js +0 -11
  99. package/dist/webui-server/privileged-actions.d.ts +0 -14
  100. package/dist/wiring/cli-heap-watchdog.d.ts +0 -34
@@ -16,20 +16,20 @@ import {
16
16
  import {
17
17
  fmtTok,
18
18
  patchConfig
19
- } from "./chunk-TYO2OVAD.js";
19
+ } from "./chunk-EWKESL4L.js";
20
20
  import {
21
21
  subcommands
22
- } from "./chunk-KYDJJLJI.js";
22
+ } from "./chunk-ETYHZPXP.js";
23
23
  import {
24
24
  renderDeepHelp,
25
25
  renderFocusedHelp
26
- } from "./chunk-P2OKBDCH.js";
26
+ } from "./chunk-MXEJEYT7.js";
27
27
  import {
28
28
  handleHelpVersionShortCircuit
29
- } from "./chunk-LIWVIEZM.js";
29
+ } from "./chunk-4HV5RKZH.js";
30
30
  import {
31
31
  DEFAULT_PORT
32
- } from "./chunk-TALOKMIC.js";
32
+ } from "./chunk-C2E24IXZ.js";
33
33
  import "./chunk-HXJYHAR4.js";
34
34
  import "./chunk-Q5GTM25S.js";
35
35
  import {
@@ -39,8 +39,8 @@ import {
39
39
  applyNodeEnvDefault,
40
40
  applySessionShellDefault,
41
41
  runPreflight
42
- } from "./chunk-PCBJSXYV.js";
43
- import "./chunk-QAC263FZ.js";
42
+ } from "./chunk-O4A3HHKD.js";
43
+ import "./chunk-FPIWTJ2G.js";
44
44
  import {
45
45
  CLI_VERSION
46
46
  } from "./chunk-XJXDOF63.js";
@@ -55,7 +55,7 @@ import {
55
55
  runPicker,
56
56
  saveToGlobalConfig,
57
57
  theme
58
- } from "./chunk-IMT6PNV5.js";
58
+ } from "./chunk-MNQQ4ZNF.js";
59
59
  import "./chunk-2VMJ3E5Z.js";
60
60
  import "./chunk-B4JLSXZB.js";
61
61
  import {
@@ -67,20 +67,19 @@ import {
67
67
  } from "./chunk-YMXXOOFN.js";
68
68
  import {
69
69
  parseArgs
70
- } from "./chunk-GGGUZSAU.js";
71
- import "./chunk-E4I2TF5S.js";
70
+ } from "./chunk-Z7A5MXKJ.js";
71
+ import "./chunk-TNK6237M.js";
72
72
  import {
73
73
  mutateConfigProviders,
74
74
  normalizeKeys,
75
75
  resolveActiveApiKey,
76
76
  writeKeysBack
77
- } from "./chunk-XPX432BZ.js";
77
+ } from "./chunk-DR2OXU46.js";
78
78
  import {
79
79
  runUpdateCommand
80
80
  } from "./chunk-DE7BZDNK.js";
81
81
  import "./chunk-U3SS4NRH.js";
82
82
  import "./chunk-YLQEGYV4.js";
83
- import "./chunk-7OCVIDC7.js";
84
83
 
85
84
  // src/cli-context.ts
86
85
  import { TOKENS as TOKENS3 } from "@wrongstack/core/kernel";
@@ -785,7 +784,7 @@ async function isPortInUse(host, port) {
785
784
  }
786
785
  async function handleHqShortCircuit(flags) {
787
786
  if (flags["hq"] !== true) return null;
788
- const { startHqServer } = await import("./hq-server-CVAYICIS.js");
787
+ const { startHqServer } = await import("./hq-server-OILU3NPI.js");
789
788
  const tunnelRequested = flags["tunnel"] === true;
790
789
  const host = typeof flags["host"] === "string" ? flags["host"] : tunnelRequested ? "127.0.0.1" : HQ_CLI_DEFAULT_HOST2;
791
790
  if (tunnelRequested && !isLoopbackHost(host)) {
@@ -833,7 +832,7 @@ async function handleHqShortCircuit(flags) {
833
832
  let tokenTtlMs;
834
833
  const rawTtl = typeof flags["hq-token-ttl"] === "string" ? flags["hq-token-ttl"] : process.env.WRONGSTACK_HQ_TOKEN_TTL;
835
834
  if (rawTtl !== void 0 && rawTtl.length > 0) {
836
- const { parseTokenTtlValue } = await import("./hq-ttl-KUO3AU7X.js");
835
+ const { parseTokenTtlValue } = await import("./hq-ttl-VJR65OBJ.js");
837
836
  const parsed = parseTokenTtlValue(rawTtl);
838
837
  if (parsed.error) {
839
838
  process.stderr.write(`${color3.red("\u2717")} Invalid --hq-token-ttl: ${parsed.error}
@@ -881,7 +880,7 @@ async function handleHqShortCircuit(flags) {
881
880
  return 1;
882
881
  }
883
882
  try {
884
- const { buildPublicHqUrl, startHqQuickTunnel } = await import("./hq-tunnel-LO55RCZE.js");
883
+ const { buildPublicHqUrl, startHqQuickTunnel } = await import("./hq-tunnel-NIJ5EP2Y.js");
885
884
  const originHost = handle.host === "::1" ? "[::1]" : handle.host;
886
885
  tunnel = await startHqQuickTunnel(`http://${originHost}:${handle.port}`, {
887
886
  onUnexpectedExit: (message) => process.stderr.write(`${color3.yellow("!")} ${message}
@@ -944,10 +943,10 @@ ${color3.green("Cloudflare Quick Tunnel ready:")} ${browserUrl}
944
943
  }
945
944
 
946
945
  // src/boot.ts
947
- import * as fs7 from "node:fs/promises";
946
+ import * as fs6 from "node:fs/promises";
948
947
  import { createRequire as createRequire4 } from "node:module";
949
948
  import * as os from "node:os";
950
- import * as path8 from "node:path";
949
+ import * as path7 from "node:path";
951
950
  import { fileURLToPath } from "node:url";
952
951
  import { toErrorMessage as toErrorMessage4 } from "@wrongstack/core/utils";
953
952
  import { DefaultLogger } from "@wrongstack/core/infrastructure";
@@ -956,7 +955,7 @@ import { DefaultModelsRegistry } from "@wrongstack/core/models";
956
955
  import { ToolRegistry } from "@wrongstack/core/registry";
957
956
  import { normalizeTokenSavingTier } from "@wrongstack/core/types";
958
957
  import { isSetupProvider, SETUP_MODEL_ID, SETUP_PROVIDER_ID } from "@wrongstack/providers";
959
- import { color as color11, isStdinTTY as isStdinTTY2, writeErr } from "@wrongstack/core/utils";
958
+ import { color as color10, isStdinTTY as isStdinTTY2, writeErr } from "@wrongstack/core/utils";
960
959
  import { createDefaultContainer as createDefaultContainer2 } from "@wrongstack/runtime";
961
960
  import { registerBuiltinToolTier } from "@wrongstack/tools/tool-tier";
962
961
 
@@ -1862,253 +1861,8 @@ function dim(s) {
1862
1861
  return `\x1B[2m${s}\x1B[22m`;
1863
1862
  }
1864
1863
 
1865
- // src/launch-hints.ts
1866
- import * as fs6 from "node:fs/promises";
1867
- import * as path7 from "node:path";
1868
- import { color as color9 } from "@wrongstack/core/utils";
1869
- var GROUPS = [
1870
- {
1871
- title: "Autonomy",
1872
- items: [
1873
- { key: "/goal <text>", blurb: "lock in a verifiable mission \u2014 only Esc / Ctrl+C interrupt" },
1874
- {
1875
- key: "/autonomy eternal",
1876
- blurb: "sense \u2192 decide \u2192 execute \u2192 reflect loop until you stop it"
1877
- },
1878
- {
1879
- key: '--eternal "<mission>"',
1880
- blurb: "boot directly into the eternal-autonomy engine with a mission"
1881
- },
1882
- {
1883
- key: "/autonomy on|suggest",
1884
- blurb: "self-driving: auto-pick next step or just suggest it"
1885
- }
1886
- ]
1887
- },
1888
- {
1889
- title: "Agents & fleet",
1890
- items: [
1891
- {
1892
- key: "/delegate [--role=<role>] <task>",
1893
- blurb: "route work to a specialist; omit --role for automatic selection"
1894
- },
1895
- {
1896
- key: "/spawn [-p <provider>] [-m <model>] [-n <name>] <task>",
1897
- blurb: "launch one isolated subagent with optional runtime overrides"
1898
- },
1899
- {
1900
- key: "/agents [list|show <id>|stream on|off]",
1901
- blurb: "open the TUI monitor, inspect a subagent, or control its activity stream"
1902
- },
1903
- {
1904
- key: "/fleet status|usage|kill|log|manifest",
1905
- blurb: "inspect and control the active subagent fleet"
1906
- }
1907
- ]
1908
- },
1909
- {
1910
- title: "Steering",
1911
- items: [
1912
- {
1913
- key: "Esc (while busy)",
1914
- blurb: "soft interrupt \u2014 next message carries a STEERING preamble"
1915
- },
1916
- { key: "/steer <text>", blurb: "mid-flight redirect, works when Esc is eaten by tmux" },
1917
- { key: "/btw <note>", blurb: "non-aborting nudge \u2014 agent folds it in at its next step" },
1918
- {
1919
- key: "Ctrl+C \xD7 1 / \xD7 2 / \xD7 3",
1920
- blurb: "cancel iteration \xB7 force-exit Ink \xB7 hard exit(130)"
1921
- }
1922
- ]
1923
- },
1924
- {
1925
- title: "Modes & context",
1926
- items: [
1927
- {
1928
- key: "/mode",
1929
- blurb: "switch persona: code-reviewer, debugger, architect, tester, devops, \u2026"
1930
- },
1931
- { key: "/model", blurb: "two-step provider \u2192 model picker, hot-swap at runtime" },
1932
- { key: "/yolo on|off|toggle", blurb: "auto-approve tool calls without restart" },
1933
- {
1934
- key: "/context mode frugal|balanced|deep|archival",
1935
- blurb: "pick how aggressively history is trimmed"
1936
- },
1937
- { key: "/compact", blurb: "manually compact the in-flight context window" },
1938
- {
1939
- key: "/plan show|add|start|done",
1940
- blurb: "strategic roadmap, survives /resume across sessions"
1941
- }
1942
- ]
1943
- },
1944
- {
1945
- title: "Workspace tools",
1946
- items: [
1947
- {
1948
- key: "@<query>",
1949
- blurb: "search project files and insert a path into the prompt"
1950
- },
1951
- {
1952
- key: "Alt+V \xB7 /image",
1953
- blurb: "attach a clipboard image in the TUI"
1954
- },
1955
- {
1956
- key: "/mcp \xB7 wstack mcp add <name>",
1957
- blurb: "inspect or connect MCP servers"
1958
- },
1959
- {
1960
- key: "/plugin install|enable|disable <name>",
1961
- blurb: "manage optional integrations such as Telegram or LSP"
1962
- },
1963
- {
1964
- key: "/skill \xB7 /init \xB7 /commit",
1965
- blurb: "browse skills \xB7 scaffold project guidance \xB7 draft a commit"
1966
- },
1967
- {
1968
- key: "/diag \xB7 wstack usage \xB7 wstack resume <id>",
1969
- blurb: "inspect diagnostics, review costs, or continue an earlier session"
1970
- }
1971
- ]
1972
- }
1973
- ];
1974
- var HINT_COUNT = GROUPS.reduce((n, g) => n + g.items.length, 0);
1975
- var HINT_GROUP_COUNT = GROUPS.length;
1976
- var HINT_GROUP_TITLES = GROUPS.map((g) => g.title);
1977
- function shouldSuppress(flags) {
1978
- if (flags["no-hints"] === true) return true;
1979
- if (flags["hints"] === false) return true;
1980
- const env = process.env.WRONGSTACK_NO_HINTS;
1981
- if (env && env !== "0" && env.toLowerCase() !== "false") return true;
1982
- return false;
1983
- }
1984
- var DEFAULT_TERM_WIDTH = 80;
1985
- var MIN_TERM_WIDTH = 20;
1986
- var HINT_INDENT = " ";
1987
- var HINT_CONTINUATION_INDENT = " ";
1988
- var wrap = (n) => (n % GROUPS.length + GROUPS.length) % GROUPS.length;
1989
- function displayWidth(value) {
1990
- return [...value].length;
1991
- }
1992
- function wrapWords(value, firstWidth, continuationWidth = firstWidth) {
1993
- const words = value.trim().split(/\s+/).filter(Boolean);
1994
- const lines = [];
1995
- let line = "";
1996
- let width = Math.max(1, firstWidth);
1997
- for (const sourceWord of words) {
1998
- let word = sourceWord;
1999
- while (word) {
2000
- if (line) {
2001
- if (displayWidth(line) + 1 + displayWidth(word) <= width) {
2002
- line += ` ${word}`;
2003
- word = "";
2004
- } else {
2005
- lines.push(line);
2006
- line = "";
2007
- width = Math.max(1, continuationWidth);
2008
- }
2009
- continue;
2010
- }
2011
- if (displayWidth(word) <= width) {
2012
- line = word;
2013
- word = "";
2014
- } else {
2015
- const characters = [...word];
2016
- lines.push(characters.slice(0, width).join(""));
2017
- word = characters.slice(width).join("");
2018
- width = Math.max(1, continuationWidth);
2019
- }
2020
- }
2021
- }
2022
- if (line) lines.push(line);
2023
- return lines;
2024
- }
2025
- function renderHintLines(item, termWidth) {
2026
- const inline = `${HINT_INDENT}${item.key} \u2014 ${item.blurb}`;
2027
- if (displayWidth(inline) <= termWidth) {
2028
- return [`${HINT_INDENT}${color9.bold(item.key)} ${color9.dim("\u2014")} ${color9.dim(item.blurb)}`];
2029
- }
2030
- const lines = [];
2031
- const keyLines = wrapWords(
2032
- item.key,
2033
- termWidth - displayWidth(HINT_INDENT),
2034
- termWidth - displayWidth(HINT_CONTINUATION_INDENT)
2035
- );
2036
- keyLines.forEach((line, index) => {
2037
- const indent = index === 0 ? HINT_INDENT : HINT_CONTINUATION_INDENT;
2038
- lines.push(`${indent}${color9.bold(line)}`);
2039
- });
2040
- const blurbLines = wrapWords(
2041
- `\u2014 ${item.blurb}`,
2042
- termWidth - displayWidth(HINT_CONTINUATION_INDENT)
2043
- );
2044
- for (const line of blurbLines) lines.push(`${HINT_CONTINUATION_INDENT}${color9.dim(line)}`);
2045
- return lines;
2046
- }
2047
- function renderHeaderLines(group, groupIndex, termWidth) {
2048
- const progress = `${groupIndex + 1}/${GROUPS.length}`;
2049
- const plain = ` ${group.title} ${progress}`;
2050
- if (displayWidth(plain) <= termWidth) {
2051
- return [
2052
- ` ${color9.cyan("\u25C7")} ${color9.bold(group.title)} ${color9.dim(progress)}`,
2053
- ` ${color9.dim("\u2500".repeat(Math.min(termWidth - 2, 48)))}`
2054
- ];
2055
- }
2056
- return [
2057
- ` ${color9.cyan("\u25C7")} ${color9.bold(group.title)}`,
2058
- ` ${color9.dim("\u2500".repeat(Math.min(termWidth - 2, 48)))}`
2059
- ];
2060
- }
2061
- function renderFooterLines(termWidth) {
2062
- const footer = "/help lists everything \xB7 hide with --no-hints";
2063
- if (displayWidth(` ${footer}`) <= termWidth) {
2064
- return [
2065
- ` ${color9.dim("\u2500".repeat(Math.min(termWidth - 2, 48)))}`,
2066
- ` ${color9.dim(`${color9.bold("/help")} lists everything \xB7 hide with ${color9.bold("--no-hints")}`)}`
2067
- ];
2068
- }
2069
- return [...wrapWords(footer, termWidth - 2).map((line) => ` ${color9.dim(line)}`)];
2070
- }
2071
- async function pickGroupIndex(opts) {
2072
- if (typeof opts.groupIndex === "number") return wrap(opts.groupIndex);
2073
- if (opts.cursorFile) {
2074
- try {
2075
- let current = 0;
2076
- try {
2077
- const raw = await fs6.readFile(opts.cursorFile, "utf8");
2078
- const parsed = Number.parseInt(raw.trim(), 10);
2079
- if (Number.isFinite(parsed)) current = wrap(parsed);
2080
- } catch {
2081
- }
2082
- await fs6.mkdir(path7.dirname(opts.cursorFile), { recursive: true });
2083
- await fs6.writeFile(opts.cursorFile, String(wrap(current + 1)));
2084
- return current;
2085
- } catch {
2086
- }
2087
- }
2088
- return Math.floor(Math.random() * GROUPS.length);
2089
- }
2090
- async function printLaunchHints(renderer, flags, opts = {}) {
2091
- if (shouldSuppress(flags)) return;
2092
- const idx = await pickGroupIndex(opts);
2093
- const group = GROUPS[idx];
2094
- if (!group) return;
2095
- const termWidth = Math.max(
2096
- MIN_TERM_WIDTH,
2097
- Math.floor(opts.termWidth ?? process.stdout.columns ?? DEFAULT_TERM_WIDTH)
2098
- );
2099
- const lines = [];
2100
- lines.push("");
2101
- lines.push(...renderHeaderLines(group, idx, termWidth));
2102
- for (const item of group.items) lines.push(...renderHintLines(item, termWidth));
2103
- lines.push("");
2104
- lines.push(...renderFooterLines(termWidth));
2105
- lines.push("");
2106
- renderer.write(`${lines.join("\n")}
2107
- `);
2108
- }
2109
-
2110
1864
  // src/renderer.ts
2111
- import { color as color10 } from "@wrongstack/core/utils";
1865
+ import { color as color9 } from "@wrongstack/core/utils";
2112
1866
  var TerminalRenderer = class _TerminalRenderer {
2113
1867
  out;
2114
1868
  err;
@@ -2221,7 +1975,7 @@ var TerminalRenderer = class _TerminalRenderer {
2221
1975
  if (!this.lineStart) this.out.write("\n");
2222
1976
  const arrow = theme2.primary("\u2192");
2223
1977
  const display = formatInputSummary(input);
2224
- this.out.write(`${arrow} ${theme2.bold(name)}${display ? color10.dim(` ${display}`) : ""}
1978
+ this.out.write(`${arrow} ${theme2.bold(name)}${display ? color9.dim(` ${display}`) : ""}
2225
1979
  `);
2226
1980
  this.lineStart = true;
2227
1981
  }
@@ -2238,7 +1992,7 @@ var TerminalRenderer = class _TerminalRenderer {
2238
1992
  if (isError) {
2239
1993
  const firstLine = txt.split("\n")[0] ?? "";
2240
1994
  const truncated = firstLine.length > 200 ? `${firstLine.slice(0, 197)}\u2026` : firstLine;
2241
- this.out.write(` ${prefix} ${color10.dim(truncated)}
1995
+ this.out.write(` ${prefix} ${color9.dim(truncated)}
2242
1996
  `);
2243
1997
  this.lineStart = true;
2244
1998
  return;
@@ -2246,7 +2000,7 @@ var TerminalRenderer = class _TerminalRenderer {
2246
2000
  const isEditLike = name === "edit" || name === "write";
2247
2001
  const diff = extractDiff(content);
2248
2002
  if (isEditLike && diff) {
2249
- this.out.write(` ${prefix} ${color10.dim(summarize(content, name))}
2003
+ this.out.write(` ${prefix} ${color9.dim(summarize(content, name))}
2250
2004
  `);
2251
2005
  const rendered = renderDiff(diff).split("\n").map((l) => ` ${l}`).join("\n");
2252
2006
  this.out.write(`${rendered}
@@ -2257,7 +2011,7 @@ var TerminalRenderer = class _TerminalRenderer {
2257
2011
  const summary = summarize(content, name);
2258
2012
  const isReadLike = name === "read" || name === "grep" || name === "glob" || name === "bash" || name === "exec";
2259
2013
  if (renderMode === "simple") {
2260
- this.out.write(` ${prefix} ${color10.dim(summary || compactSingleLine(bodyText))}
2014
+ this.out.write(` ${prefix} ${color9.dim(summary || compactSingleLine(bodyText))}
2261
2015
  `);
2262
2016
  this.lineStart = true;
2263
2017
  return;
@@ -2266,16 +2020,16 @@ var TerminalRenderer = class _TerminalRenderer {
2266
2020
  const lines = bodyText.split("\n");
2267
2021
  const head = lines.slice(0, previewLines).map((l) => l.replace(/\s+$/, ""));
2268
2022
  const moreCount = Math.max(0, lines.length - head.length);
2269
- this.out.write(` ${prefix} ${color10.dim(summary)}
2023
+ this.out.write(` ${prefix} ${color9.dim(summary)}
2270
2024
  `);
2271
2025
  for (const l of head) {
2272
2026
  const capped = l.length > 200 ? `${l.slice(0, 197)}\u2026` : l;
2273
- this.out.write(` ${color10.dim(capped)}
2027
+ this.out.write(` ${color9.dim(capped)}
2274
2028
  `);
2275
2029
  }
2276
2030
  if (moreCount > 0) {
2277
2031
  this.out.write(
2278
- ` ${color10.dim(`+${moreCount} more line${moreCount === 1 ? "" : "s"}`)}
2032
+ ` ${color9.dim(`+${moreCount} more line${moreCount === 1 ? "" : "s"}`)}
2279
2033
  `
2280
2034
  );
2281
2035
  }
@@ -2414,7 +2168,7 @@ function renderMarkdown(s) {
2414
2168
  return theme2.primary(theme2.bold(`${hashes} ${text}`));
2415
2169
  });
2416
2170
  out = out.replace(/```([a-zA-Z0-9_+-]*)\n([\s\S]*?)```/g, (_m, _lang, code) => {
2417
- return color10.gray(`
2171
+ return color9.gray(`
2418
2172
  \u250C\u2500
2419
2173
  ${code.replace(/^/gm, "\u2502 ")}\u2514\u2500`);
2420
2174
  });
@@ -2422,7 +2176,7 @@ ${code.replace(/^/gm, "\u2502 ")}\u2514\u2500`);
2422
2176
  out = out.replace(/\*\*([^*]+)\*\*/g, (_m, text) => theme2.bold(text));
2423
2177
  out = out.replace(
2424
2178
  /(^|[^*])\*([^*\n]+)\*([^*]|$)/g,
2425
- (_m, l, t, r) => `${l}${color10.italic(t)}${r}`
2179
+ (_m, l, t, r) => `${l}${color9.italic(t)}${r}`
2426
2180
  );
2427
2181
  return out;
2428
2182
  }
@@ -2515,14 +2269,14 @@ function summarize(value, name) {
2515
2269
  if (typeof v === "object" && v !== null) {
2516
2270
  const o = v;
2517
2271
  if (name === "edit") {
2518
- const path9 = typeof o["path"] === "string" ? o["path"] : "";
2272
+ const path8 = typeof o["path"] === "string" ? o["path"] : "";
2519
2273
  const reps = typeof o["replacements"] === "number" ? o["replacements"] : 0;
2520
- return `${path9} ${reps} replacement${reps === 1 ? "" : "s"}`.trim();
2274
+ return `${path8} ${reps} replacement${reps === 1 ? "" : "s"}`.trim();
2521
2275
  }
2522
2276
  if (name === "write") {
2523
- const path9 = typeof o["path"] === "string" ? o["path"] : "";
2277
+ const path8 = typeof o["path"] === "string" ? o["path"] : "";
2524
2278
  const bytes = typeof o["bytes"] === "number" ? o["bytes"] : void 0;
2525
- return bytes !== void 0 ? `${path9} ${bytes}B` : path9;
2279
+ return bytes !== void 0 ? `${path8} ${bytes}B` : path8;
2526
2280
  }
2527
2281
  if (name === "read") {
2528
2282
  return summarizeRead(o);
@@ -2540,13 +2294,13 @@ function summarize(value, name) {
2540
2294
  return "";
2541
2295
  }
2542
2296
  function summarizeRead(o) {
2543
- const path9 = typeof o["path"] === "string" ? o["path"] : "";
2297
+ const path8 = typeof o["path"] === "string" ? o["path"] : "";
2544
2298
  const total = typeof o["total_lines"] === "number" ? o["total_lines"] : void 0;
2545
2299
  const truncated = o["truncated"] === true;
2546
2300
  const cached = o["cached"] === true;
2547
2301
  const note = typeof o["note"] === "string" ? o["note"] : void 0;
2548
2302
  const parts = [];
2549
- if (path9) parts.push(path9);
2303
+ if (path8) parts.push(path8);
2550
2304
  if (total !== void 0) parts.push(`${total} line${total === 1 ? "" : "s"}`);
2551
2305
  const flags = [];
2552
2306
  if (truncated) flags.push("truncated");
@@ -2651,7 +2405,7 @@ function resolveBundledSkillsDir2() {
2651
2405
  try {
2652
2406
  const req = createRequire4(import.meta.url);
2653
2407
  const corePkg = req.resolve("@wrongstack/core/package.json");
2654
- return path8.join(path8.dirname(corePkg), "skills");
2408
+ return path7.join(path7.dirname(corePkg), "skills");
2655
2409
  } catch {
2656
2410
  return void 0;
2657
2411
  }
@@ -2660,14 +2414,14 @@ function resolveBundledPromptsDir2() {
2660
2414
  try {
2661
2415
  const req = createRequire4(import.meta.url);
2662
2416
  const corePkg = req.resolve("@wrongstack/core/package.json");
2663
- return path8.join(path8.dirname(corePkg), "data", "prompts");
2417
+ return path7.join(path7.dirname(corePkg), "data", "prompts");
2664
2418
  } catch {
2665
2419
  return void 0;
2666
2420
  }
2667
2421
  }
2668
2422
  function isHomeDirectory(cwd, userHome) {
2669
2423
  if (!cwd || !userHome) return false;
2670
- return path8.resolve(cwd) === path8.resolve(userHome);
2424
+ return path7.resolve(cwd) === path7.resolve(userHome);
2671
2425
  }
2672
2426
  function shouldPrintYoloNotice(lastChoices, yoloPinned, yolo) {
2673
2427
  return !lastChoices && yoloPinned === void 0 && yolo;
@@ -2812,8 +2566,8 @@ async function boot(argv) {
2812
2566
  if (isHomeDirectory(cwd, userHome)) {
2813
2567
  writeErr(
2814
2568
  `
2815
- ${color11.red(color11.bold("\u26A0 This is not a working directory."))}
2816
- ${color11.red("Please open wstack in a project folder.")}
2569
+ ${color10.red(color10.bold("\u26A0 This is not a working directory."))}
2570
+ ${color10.red("Please open wstack in a project folder.")}
2817
2571
 
2818
2572
  `
2819
2573
  );
@@ -2833,7 +2587,7 @@ async function boot(argv) {
2833
2587
  await discoverAndMergeProviders({
2834
2588
  config,
2835
2589
  registry: modelsRegistry,
2836
- cacheDir: path8.dirname(wpaths.modelsCache),
2590
+ cacheDir: path7.dirname(wpaths.modelsCache),
2837
2591
  logger
2838
2592
  });
2839
2593
  } catch (err) {
@@ -2876,7 +2630,7 @@ async function boot(argv) {
2876
2630
  skipPicker = true;
2877
2631
  renderer.write(
2878
2632
  `
2879
- ${color11.amber("\u25B6")} ${color11.bold("Setup mode")} ${color11.dim("\u2014 no model connected. Run")} ${color11.bold("/auth")} ${color11.dim("to connect one.")}
2633
+ ${color10.amber("\u25B6")} ${color10.bold("Setup mode")} ${color10.dim("\u2014 no model connected. Run")} ${color10.bold("/auth")} ${color10.dim("to connect one.")}
2880
2634
 
2881
2635
  `
2882
2636
  );
@@ -2916,7 +2670,7 @@ async function boot(argv) {
2916
2670
  const savedStatus = await validateSavedProviderModel(config, modelsRegistry);
2917
2671
  renderer.write(
2918
2672
  `
2919
- ${color11.dim("Last settings:")} ${color11.bold(savedProvider)} / ${color11.bold(savedModel)}
2673
+ ${color10.dim("Last settings:")} ${color10.bold(savedProvider)} / ${color10.bold(savedModel)}
2920
2674
  `
2921
2675
  );
2922
2676
  if (!savedStatus.ok) {
@@ -2926,11 +2680,11 @@ async function boot(argv) {
2926
2680
  );
2927
2681
  } else {
2928
2682
  const answer = (await reader.readLine(
2929
- ` ${color11.amber("?")} Continue with these? ${color11.dim("[Y/n/q]")} ${color11.dim("(auto Y in 5s)")} `,
2683
+ ` ${color10.amber("?")} Continue with these? ${color10.dim("[Y/n/q]")} ${color10.dim("(auto Y in 5s)")} `,
2930
2684
  { timeoutMs: 5e3, defaultAnswer: "y" }
2931
2685
  )).trim().toLowerCase();
2932
2686
  if (answer === "q") {
2933
- renderer.write(color11.dim(" Goodbye!\n"));
2687
+ renderer.write(color10.dim(" Goodbye!\n"));
2934
2688
  await reader.close();
2935
2689
  return 0;
2936
2690
  }
@@ -2938,7 +2692,7 @@ async function boot(argv) {
2938
2692
  skipPicker = true;
2939
2693
  renderer.write(
2940
2694
  `
2941
- ${color11.green("\u25B6")} ${color11.bold(savedProvider)} / ${color11.bold(savedModel)}
2695
+ ${color10.green("\u25B6")} ${color10.bold(savedProvider)} / ${color10.bold(savedModel)}
2942
2696
 
2943
2697
  `
2944
2698
  );
@@ -2959,9 +2713,9 @@ async function boot(argv) {
2959
2713
  if (!config.provider || !config.model) {
2960
2714
  renderer.write(
2961
2715
  `
2962
- ${color11.dim("No provider selected.")}
2963
- ${color11.dim("Run")} ${color11.bold("wstack auth")} ${color11.dim("to add a key or sign in, or start with no model:")}
2964
- ${color11.bold(`wstack --provider ${SETUP_PROVIDER_ID} --model ${SETUP_MODEL_ID}`)}
2716
+ ${color10.dim("No provider selected.")}
2717
+ ${color10.dim("Run")} ${color10.bold("wstack auth")} ${color10.dim("to add a key or sign in, or start with no model:")}
2718
+ ${color10.bold(`wstack --provider ${SETUP_PROVIDER_ID} --model ${SETUP_MODEL_ID}`)}
2965
2719
 
2966
2720
  `
2967
2721
  );
@@ -3083,8 +2837,8 @@ To start the app with no model connected, pass --provider ${SETUP_PROVIDER_ID} -
3083
2837
  if (shouldPrintYoloNotice(lastChoices, yoloPinned, choices.yolo)) {
3084
2838
  writeErr(
3085
2839
  `
3086
- ${color11.yellow("YOLO is on")}: non-denied tool calls, including shell and file writes, run without confirmation.
3087
- ${color11.dim("Explicit deny rules still apply. Use")} --no-yolo ${color11.dim("or")} /yolo off ${color11.dim("to require prompts.")}
2840
+ ${color10.yellow("YOLO is on")}: non-denied tool calls, including shell and file writes, run without confirmation.
2841
+ ${color10.dim("Explicit deny rules still apply. Use")} --no-yolo ${color10.dim("or")} /yolo off ${color10.dim("to require prompts.")}
3088
2842
 
3089
2843
  `
3090
2844
  );
@@ -3101,9 +2855,6 @@ To start the app with no model connected, pass --provider ${SETUP_PROVIDER_ID} -
3101
2855
  } catch {
3102
2856
  }
3103
2857
  }
3104
- await printLaunchHints(renderer, flags, {
3105
- cursorFile: path8.join(wpaths.cacheDir, "hint-cursor")
3106
- });
3107
2858
  } else {
3108
2859
  const nonInteractiveAutonomy = !simpleUiFullAuto && (flags["no-autonomy"] === true || config.autonomy?.defaultMode === "off") ? "off" : "auto";
3109
2860
  const effectiveChoices = config.launch ? {
@@ -3140,20 +2891,20 @@ To start the app with no model connected, pass --provider ${SETUP_PROVIDER_ID} -
3140
2891
  }
3141
2892
  async function checkGitInCwd(opts) {
3142
2893
  const { cwd, renderer, reader } = opts;
3143
- const cwdGit = path8.join(cwd, ".git");
2894
+ const cwdGit = path7.join(cwd, ".git");
3144
2895
  let hasCwdGit = false;
3145
2896
  try {
3146
- await fs7.access(cwdGit);
2897
+ await fs6.access(cwdGit);
3147
2898
  hasCwdGit = true;
3148
2899
  } catch {
3149
2900
  }
3150
2901
  if (!hasCwdGit) {
3151
2902
  renderer.write(
3152
2903
  `
3153
- ${color11.amber("\u25CB")} This folder has no ${color11.bold(".git")} repository.
2904
+ ${color10.amber("\u25CB")} This folder has no ${color10.bold(".git")} repository.
3154
2905
  `
3155
2906
  );
3156
- const answer = (await reader.readLine(` ${color11.amber("?")} Initialize one here? ${color11.dim("[y/N]")} `)).trim().toLowerCase();
2907
+ const answer = (await reader.readLine(` ${color10.amber("?")} Initialize one here? ${color10.dim("[y/N]")} `)).trim().toLowerCase();
3157
2908
  if (answer === "y" || answer === "yes") {
3158
2909
  try {
3159
2910
  const { spawn: spawn2 } = await import("node:child_process");
@@ -3169,7 +2920,7 @@ async function checkGitInCwd(opts) {
3169
2920
  (code) => code === 0 ? resolve2() : reject(new Error(`git init failed with ${code}`))
3170
2921
  );
3171
2922
  });
3172
- renderer.write(` ${color11.green("\u2713")} Git repository initialized
2923
+ renderer.write(` ${color10.green("\u2713")} Git repository initialized
3173
2924
  `);
3174
2925
  hasCwdGit = true;
3175
2926
  } catch (err) {
@@ -3178,12 +2929,12 @@ async function checkGitInCwd(opts) {
3178
2929
  }
3179
2930
  }
3180
2931
  }
3181
- const parentDir = path8.dirname(cwd);
2932
+ const parentDir = path7.dirname(cwd);
3182
2933
  if (parentDir !== cwd) {
3183
2934
  try {
3184
- await fs7.access(path8.join(parentDir, ".git"));
2935
+ await fs6.access(path7.join(parentDir, ".git"));
3185
2936
  renderer.write(
3186
- ` ${color11.dim("\u2139")} A ${color11.bold(".git")} repo exists in the parent directory: ${color11.dim(parentDir)}
2937
+ ` ${color10.dim("\u2139")} A ${color10.bold(".git")} repo exists in the parent directory: ${color10.dim(parentDir)}
3187
2938
  `
3188
2939
  );
3189
2940
  } catch {
@@ -3366,4 +3117,4 @@ async function initializeCli(argv) {
3366
3117
  export {
3367
3118
  initializeCli
3368
3119
  };
3369
- //# sourceMappingURL=cli-context-K73EIND5.js.map
3120
+ //# sourceMappingURL=cli-context-CYMKNOK3.js.map