@wrongstack/cli 1.0.19 → 1.0.26

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 (195) hide show
  1. package/data/providers.json +44 -0
  2. package/dist/{acp-INCNOH42.js → acp-LI665LO2.js} +18 -7
  3. package/dist/arg-parser.d.ts +1 -0
  4. package/dist/ascii-mode-SG4PRNLP.js +7 -0
  5. package/dist/{auth-YXK3EDUL.js → auth-TE55JF4Z.js} +68 -22
  6. package/dist/auth-menu/direct.d.ts +1 -0
  7. package/dist/auth-menu/local.d.ts +2 -0
  8. package/dist/auth-menu/oauth-menu.d.ts +3 -1
  9. package/dist/auth-menu/panel-service.d.ts +20 -0
  10. package/dist/{bench-YBU6BVQP.js → bench-GTLPM22B.js} +2 -2
  11. package/dist/boot/append-system-prompt.d.ts +10 -0
  12. package/dist/boot/ascii-mode.d.ts +12 -0
  13. package/dist/boot/config-backup-recovery.d.ts +2 -1
  14. package/dist/boot/container-wiring.d.ts +4 -2
  15. package/dist/boot/dispatch-singleshot.d.ts +4 -1
  16. package/dist/boot/dispatch-webui.d.ts +11 -0
  17. package/dist/boot/mcp-config-flag.d.ts +22 -0
  18. package/dist/boot/piped-stdin.d.ts +40 -0
  19. package/dist/boot/restricted-mode.d.ts +15 -0
  20. package/dist/boot/safe-mode.d.ts +30 -0
  21. package/dist/boot/short-circuit-desktop.d.ts +1 -0
  22. package/dist/boot/single-shot-budget.d.ts +30 -0
  23. package/dist/boot/stream-json.d.ts +36 -0
  24. package/dist/boot/structured-output.d.ts +16 -0
  25. package/dist/boot/system-prompt-builder.d.ts +2 -0
  26. package/dist/boot/tool-restriction-flags.d.ts +36 -0
  27. package/dist/boot/tui-project-picker-callback.d.ts +1 -1
  28. package/dist/boot/tui-settings-adapter.d.ts +15 -2
  29. package/dist/boot/worktree-sessions.d.ts +21 -0
  30. package/dist/{boot-auto-thin-MANHOYHE.js → boot-auto-thin-6Q56FY3F.js} +3 -2
  31. package/dist/boot-provider-selection.d.ts +67 -0
  32. package/dist/boot.d.ts +1 -38
  33. package/dist/{chunk-JY52HWL6.js → chunk-2EBVTYJR.js} +2 -2
  34. package/dist/{chunk-RDHFXOJM.js → chunk-2ERX3RPN.js} +112 -65
  35. package/dist/chunk-4TVYGG6G.js +62 -0
  36. package/dist/chunk-5JYDKG5B.js +154 -0
  37. package/dist/{chunk-KEPABQYT.js → chunk-5SEYGOCH.js} +8 -82
  38. package/dist/{chunk-3VXYY5JC.js → chunk-5UZBUV2H.js} +3 -19
  39. package/dist/chunk-BBHWW6LR.js +549 -0
  40. package/dist/chunk-BEHGRNOQ.js +58 -0
  41. package/dist/chunk-CZTXF6HY.js +140 -0
  42. package/dist/{chunk-JX6KL7OF.js → chunk-EPR42SWM.js} +39 -8
  43. package/dist/chunk-F5DCFAKI.js +36 -0
  44. package/dist/chunk-HLSHFXTO.js +97 -0
  45. package/dist/{chunk-CJTBLTS4.js → chunk-KJS5543T.js} +4 -3
  46. package/dist/{chunk-DE7BZDNK.js → chunk-KOEO4CJG.js} +27 -4
  47. package/dist/{chunk-SIS37L3W.js → chunk-L2RVEQWO.js} +211 -193
  48. package/dist/chunk-LBPLTTZ6.js +105 -0
  49. package/dist/chunk-LDCGZJTC.js +46 -0
  50. package/dist/chunk-LKPEBZBE.js +143 -0
  51. package/dist/chunk-LUMETJFO.js +171 -0
  52. package/dist/{chunk-KK2LB3ZS.js → chunk-OAVBM55Q.js} +9 -5
  53. package/dist/chunk-PZQBGUVZ.js +18 -0
  54. package/dist/{chunk-C3Z4N6A6.js → chunk-Q4INH2DG.js} +51 -3
  55. package/dist/chunk-R4QGL6GB.js +10 -0
  56. package/dist/{chunk-YLQEGYV4.js → chunk-RZ4ZDRYA.js} +14 -4
  57. package/dist/chunk-S4FFHDJG.js +93 -0
  58. package/dist/chunk-SFBFYIOW.js +271 -0
  59. package/dist/{chunk-RMQNCHGO.js → chunk-TI7KLHYX.js} +136 -11
  60. package/dist/{chunk-2ENZU66X.js → chunk-WQV2NP57.js} +5 -5
  61. package/dist/{chunk-B4JLSXZB.js → chunk-WSTVGC2C.js} +73 -45
  62. package/dist/chunk-X756ZS72.js +329 -0
  63. package/dist/{chunk-XJ7K67PP.js → chunk-YHYINL47.js} +63 -24
  64. package/dist/{chunk-2VMJ3E5Z.js → chunk-YTEOAWOJ.js} +6 -2
  65. package/dist/{chunk-GPPRNAKW.js → chunk-ZMX5HRLI.js} +2 -2
  66. package/dist/{cli-context-33F74CSZ.js → cli-context-UVGAN3NO.js} +496 -384
  67. package/dist/cli-entry-point.d.ts +2 -0
  68. package/dist/{cli-main-FNGMKPBA.js → cli-main-TN3KZ2P6.js} +3561 -2724
  69. package/dist/cli-update-notice.d.ts +2 -1
  70. package/dist/config-doctor.d.ts +10 -2
  71. package/dist/{config-transfer-2YF3CRTN.js → config-transfer-RUWLDCNK.js} +34 -13
  72. package/dist/{diag-doctor-ANPRUYFM.js → diag-doctor-BIZAFIAT.js} +2 -2
  73. package/dist/execute-deps.d.ts +2 -1
  74. package/dist/{execution-A6WJLSOC.js → execution-7QIP6GRY.js} +2384 -2055
  75. package/dist/fleet/host-types.d.ts +3 -1
  76. package/dist/goal-commands.d.ts +47 -0
  77. package/dist/goal-host.d.ts +1 -14
  78. package/dist/{hq-XQWQTRDA.js → hq-GLZ7QESM.js} +277 -261
  79. package/dist/hq-command-controller.d.ts +1 -1
  80. package/dist/{hq-server-IIBZQZU4.js → hq-server-YTKDVQPY.js} +2 -2
  81. package/dist/{hq-service-L5INQFM4.js → hq-service-BMMJAHRT.js} +11 -4
  82. package/dist/import-claude-code-32PCSIQI.js +236 -0
  83. package/dist/index.d.ts +1 -1
  84. package/dist/index.js +19 -10
  85. package/dist/kanban-supervisor-67ECABTD.js +7 -0
  86. package/dist/live-settings-input.d.ts +7 -0
  87. package/dist/{mailbox-serve-3GFOK2I7.js → mailbox-serve-NW5VZG7R.js} +3 -3
  88. package/dist/{mcp-DC5WSBOO.js → mcp-LBS45HWZ.js} +4 -4
  89. package/dist/modeldiag-36VODVIH.js +828 -0
  90. package/dist/{per-subcommand-help-DHTYU524.js → per-subcommand-help-QDAQASPZ.js} +3 -3
  91. package/dist/permission-prompt-mirror.d.ts +1 -1
  92. package/dist/permission-prompt.d.ts +16 -2
  93. package/dist/permission-rules-view.d.ts +18 -0
  94. package/dist/{permissions-CFDLXETM.js → permissions-PL27UHYD.js} +67 -45
  95. package/dist/plugin-config.d.ts +12 -0
  96. package/dist/plugin-management-types.d.ts +31 -0
  97. package/dist/plugin-management.d.ts +2 -30
  98. package/dist/plugin-package-install.d.ts +3 -0
  99. package/dist/{plugin-usage-M6KET4OZ.js → plugin-usage-CIGOOTX3.js} +6 -5
  100. package/dist/{plugins-WJLW6ULV.js → plugins-HQTXUD6A.js} +6 -3
  101. package/dist/preflight.d.ts +1 -1
  102. package/dist/{projects-LMNAGGEU.js → projects-T4CZCA25.js} +3 -6
  103. package/dist/provider-config-utils.d.ts +1 -6
  104. package/dist/provider-helpers.d.ts +7 -11
  105. package/dist/{providers-models-LFNZ5WI7.js → providers-models-5Z2PJTEW.js} +44 -34
  106. package/dist/release-asset-download.d.ts +13 -0
  107. package/dist/release-attestation.d.ts +28 -0
  108. package/dist/remote/remote-session.d.ts +64 -0
  109. package/dist/remote/remote-target.d.ts +69 -0
  110. package/dist/remote-O5WXHLWV.js +561 -0
  111. package/dist/{replay-Z3FTJEMM.js → replay-DEI566CW.js} +2 -2
  112. package/dist/services/commit-message.d.ts +2 -1
  113. package/dist/services/dispatch-classifier.d.ts +39 -5
  114. package/dist/session-move-P2EC2COA.js +44 -0
  115. package/dist/session-move.d.ts +20 -0
  116. package/dist/session-stats.d.ts +10 -0
  117. package/dist/{sessions-config-UL45XKX7.js → sessions-config-SXTTLNXA.js} +47 -9
  118. package/dist/settings-menu.d.ts +2 -0
  119. package/dist/short-circuit-flags-74Y5N6CF.js +10 -0
  120. package/dist/{simpleui-dist-CXSIDAXZ.js → simpleui-dist-7BQISSEP.js} +7 -3
  121. package/dist/skill-suggest-L2EVWB6R.js +290 -0
  122. package/dist/slash-commands/command-context.d.ts +15 -5
  123. package/dist/slash-commands/effort.d.ts +1 -1
  124. package/dist/slash-commands/fallback.d.ts +1 -1
  125. package/dist/slash-commands/gitid.d.ts +1 -1
  126. package/dist/slash-commands/goal-refiner.d.ts +4 -49
  127. package/dist/slash-commands/jev.d.ts +4 -0
  128. package/dist/slash-commands/mcp.d.ts +2 -1
  129. package/dist/slash-commands/openai-quota.d.ts +15 -0
  130. package/dist/slash-commands/permissions.d.ts +4 -0
  131. package/dist/slash-commands/sdd-task-mutations.d.ts +4 -0
  132. package/dist/slash-commands/settings-context-mutations.d.ts +5 -0
  133. package/dist/slash-commands/settings-keys.d.ts +2 -0
  134. package/dist/slash-commands/settings-limits-mutations.d.ts +12 -0
  135. package/dist/slash-commands/settings-reset.d.ts +6 -0
  136. package/dist/standalone-auto-update-TOTRGCSA.js +249 -0
  137. package/dist/standalone-auto-update.d.ts +65 -0
  138. package/dist/standalone-update-LZO3MNLH.js +24 -0
  139. package/dist/standalone-update.d.ts +55 -0
  140. package/dist/subcommands/handlers/hq-alerts.d.ts +3 -0
  141. package/dist/subcommands/handlers/hq-audit.d.ts +46 -0
  142. package/dist/subcommands/handlers/hq-data-dir.d.ts +13 -0
  143. package/dist/subcommands/handlers/import-claude-code.d.ts +42 -0
  144. package/dist/subcommands/handlers/permissions.d.ts +9 -3
  145. package/dist/subcommands/handlers/remote.d.ts +6 -0
  146. package/dist/subcommands/handlers/skill-suggest.d.ts +21 -0
  147. package/dist/subcommands/handlers/typesafe-brain-replay.d.ts +26 -0
  148. package/dist/subcommands/handlers/typesafe-judgment-check.d.ts +3 -0
  149. package/dist/subcommands/handlers/typesafe-topic-replay.d.ts +19 -0
  150. package/dist/subcommands/handlers/typesafe-triage-replay.d.ts +18 -0
  151. package/dist/subcommands/handlers/typesafe.d.ts +23 -0
  152. package/dist/subcommands/handlers/version-help.d.ts +5 -0
  153. package/dist/{subcommands-XSLXMIDP.js → subcommands-Q6ORSB2E.js} +2 -2
  154. package/dist/tui-resume-callback.d.ts +18 -0
  155. package/dist/typesafe-U7YB2RRV.js +316 -0
  156. package/dist/typesafe-brain-replay-C5276FVR.js +222 -0
  157. package/dist/typesafe-judgment-check-GGYYV5UF.js +29 -0
  158. package/dist/typesafe-topic-replay-ZILIU3WS.js +234 -0
  159. package/dist/typesafe-triage-replay-FGAW7QM7.js +215 -0
  160. package/dist/{update-5DPB4YD4.js → update-TDZX4IL2.js} +4 -3
  161. package/dist/{update-check-BS3DHTSI.js → update-check-J5ZVKS73.js} +3 -2
  162. package/dist/update-check.d.ts +1 -1
  163. package/dist/version-JB2UAV2A.js +11 -0
  164. package/dist/version-help-XJJQ7YSH.js +10 -0
  165. package/dist/version.d.ts +3 -2
  166. package/dist/webui-client-observability.d.ts +7 -0
  167. package/dist/webui-server/route-contexts.d.ts +1 -1
  168. package/dist/webui-server/session-start-payload.d.ts +5 -1
  169. package/dist/{webui-server-MRPGTTKL.js → webui-server-YTHLRFD2.js} +577 -370
  170. package/dist/webui-server-lifecycle.d.ts +57 -0
  171. package/dist/webui-server-options.d.ts +11 -0
  172. package/dist/webui-server.d.ts +1 -1
  173. package/dist/wiring/brain-and-orchestration.d.ts +3 -1
  174. package/dist/wiring/cli-prompt-and-tools-setup.d.ts +9 -0
  175. package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
  176. package/dist/wiring/domain-glossary.d.ts +5 -4
  177. package/dist/wiring/lifecycle-plugins.d.ts +4 -2
  178. package/dist/wiring/metrics.d.ts +9 -1
  179. package/dist/wiring/pipeline.d.ts +2 -7
  180. package/dist/wiring/plugins.d.ts +4 -1
  181. package/dist/wiring/provider-persisters.d.ts +24 -0
  182. package/dist/wiring/provider-runtime.d.ts +9 -1
  183. package/dist/wiring/provider-status.d.ts +1 -0
  184. package/dist/wiring/provider-utility-tools.d.ts +3 -1
  185. package/dist/wiring/runtime-dispatch-state.d.ts +3 -1
  186. package/package.json +28 -28
  187. package/dist/chunk-2CZEORLV.js +0 -54
  188. package/dist/chunk-672UXYL3.js +0 -65
  189. package/dist/chunk-6WRKAACA.js +0 -96
  190. package/dist/chunk-DR2OXU46.js +0 -174
  191. package/dist/chunk-JACOMTIH.js +0 -275
  192. package/dist/chunk-XJXDOF63.js +0 -28
  193. package/dist/modeldiag-CJSFHZ3J.js +0 -1356
  194. package/dist/short-circuit-flags-7GQIGMVD.js +0 -10
  195. package/dist/version-help-WXI42PZ3.js +0 -10
@@ -10,7 +10,7 @@ import {
10
10
  readLocalSubagentTranscript,
11
11
  sanitizeApiError,
12
12
  startHqServer
13
- } from "./chunk-KK2LB3ZS.js";
13
+ } from "./chunk-OAVBM55Q.js";
14
14
  import "./chunk-HXJYHAR4.js";
15
15
  import "./chunk-5EA6OTLJ.js";
16
16
  import "./chunk-Q7E3BPDU.js";
@@ -27,4 +27,4 @@ export {
27
27
  sanitizeApiError,
28
28
  startHqServer
29
29
  };
30
- //# sourceMappingURL=hq-server-IIBZQZU4.js.map
30
+ //# sourceMappingURL=hq-server-YTKDVQPY.js.map
@@ -4,16 +4,17 @@ import {
4
4
  import {
5
5
  detectUpdatePackageManager,
6
6
  detectUpdatePackageName
7
- } from "./chunk-DE7BZDNK.js";
7
+ } from "./chunk-KOEO4CJG.js";
8
8
  import "./chunk-U3SS4NRH.js";
9
- import "./chunk-YLQEGYV4.js";
9
+ import "./chunk-RZ4ZDRYA.js";
10
+ import "./chunk-F5DCFAKI.js";
10
11
 
11
12
  // src/hq-service.ts
12
13
  import { spawn } from "node:child_process";
13
14
  import { constants as fsConstants } from "node:fs";
14
15
  import * as fs from "node:fs/promises";
15
16
  import * as path from "node:path";
16
- import { buildChildEnv } from "@wrongstack/core/utils";
17
+ import { buildChildEnv, isStandaloneBinary } from "@wrongstack/core/utils";
17
18
  var SERVICE_NAME = "wrongstack-hq.service";
18
19
  var UPDATE_SERVICE_NAME = "wrongstack-hq-update.service";
19
20
  var UPDATE_TIMER_NAME = "wrongstack-hq-update.timer";
@@ -314,6 +315,12 @@ async function installService(deps) {
314
315
  deps.renderer.writeError("--port must be an integer between 1 and 65535.\n");
315
316
  return 1;
316
317
  }
318
+ if (isStandaloneBinary()) {
319
+ deps.renderer.writeError(
320
+ "The HQ system service installer manages an npm install. With the standalone binary, run `wstack hq` under your own service manager and update it with `wstack update`.\n"
321
+ );
322
+ return 1;
323
+ }
317
324
  const requestedManager = deps.flags?.["pm"] ?? deps.flags?.["package-manager"];
318
325
  const detectedManager = typeof requestedManager === "string" ? requestedManager : detectUpdatePackageManager();
319
326
  if (detectedManager !== "npm" && detectedManager !== "pnpm") {
@@ -504,4 +511,4 @@ export {
504
511
  hqServiceCmd,
505
512
  renderHqServiceAssets
506
513
  };
507
- //# sourceMappingURL=hq-service-L5INQFM4.js.map
514
+ //# sourceMappingURL=hq-service-BMMJAHRT.js.map
@@ -0,0 +1,236 @@
1
+ import {
2
+ normalizeMcpServerEntry
3
+ } from "./chunk-HLSHFXTO.js";
4
+ import {
5
+ activeProfileConfigPath
6
+ } from "./chunk-YMXXOOFN.js";
7
+ import {
8
+ restoreFlags
9
+ } from "./chunk-CSAPOCBP.js";
10
+
11
+ // src/subcommands/handlers/import-claude-code.ts
12
+ import * as fs from "node:fs/promises";
13
+ import * as os from "node:os";
14
+ import * as path from "node:path";
15
+ import { readJsonObjectFile, setJsonPath, updateJsonObjectFile } from "@wrongstack/core/utils";
16
+ import { mcpEnvPlaceholders } from "@wrongstack/mcp";
17
+ function isRecord(value) {
18
+ return typeof value === "object" && value !== null && !Array.isArray(value);
19
+ }
20
+ function samePath(a, b) {
21
+ const norm = (p) => {
22
+ const resolved = path.resolve(p).replace(/[\\/]+$/, "");
23
+ return process.platform === "win32" ? resolved.toLowerCase() : resolved;
24
+ };
25
+ return norm(a) === norm(b);
26
+ }
27
+ function projectEntry(userState, projectRoot) {
28
+ const projects = userState?.["projects"];
29
+ if (!isRecord(projects)) return void 0;
30
+ for (const [key, value] of Object.entries(projects)) {
31
+ if (isRecord(value) && samePath(key, projectRoot)) return value;
32
+ }
33
+ return void 0;
34
+ }
35
+ function planClaudeCodeImport(opts) {
36
+ const { sources } = opts;
37
+ const mcp = [];
38
+ const seen = /* @__PURE__ */ new Set();
39
+ const collect = (servers, source) => {
40
+ if (!isRecord(servers)) return;
41
+ for (const [name, raw] of Object.entries(servers)) {
42
+ if (seen.has(name)) continue;
43
+ seen.add(name);
44
+ let config;
45
+ try {
46
+ config = normalizeMcpServerEntry(name, raw);
47
+ } catch (err) {
48
+ mcp.push({
49
+ name,
50
+ source,
51
+ config: {},
52
+ action: "skip-invalid",
53
+ enabled: false,
54
+ note: err.message
55
+ });
56
+ continue;
57
+ }
58
+ const exists2 = Object.hasOwn(opts.existingServers, name);
59
+ const repository = source === "repository";
60
+ const enabled = !repository || opts.enableProjectServers;
61
+ const reads = mcpEnvPlaceholders(config);
62
+ const notes2 = [
63
+ repository && !enabled ? "from the repository \u2014 imported disabled; review, then `/mcp enable`" : void 0,
64
+ reads.length > 0 ? `reads environment: ${reads.join(", ")}` : void 0
65
+ ].filter((note) => note !== void 0);
66
+ mcp.push({
67
+ name,
68
+ source,
69
+ config,
70
+ action: exists2 ? opts.overwrite ? "overwrite" : "skip-exists" : "add",
71
+ enabled,
72
+ ...notes2.length > 0 ? { note: notes2.join("; ") } : {}
73
+ });
74
+ }
75
+ };
76
+ collect(
77
+ projectEntry(sources.userState, opts.projectRoot)?.["mcpServers"],
78
+ "claude-project-local"
79
+ );
80
+ collect(sources.projectMcp?.["mcpServers"] ?? sources.projectMcp, "repository");
81
+ collect(sources.userState?.["mcpServers"], "claude-user");
82
+ const notes = [];
83
+ if (sources.skillDirs.length > 0) {
84
+ notes.push(
85
+ `Skills: ${sources.skillDirs.join(", ")} \u2014 already loaded in place (skills.readClaudeSkills); nothing to copy.`
86
+ );
87
+ }
88
+ let hookCount = 0;
89
+ let ruleCount = 0;
90
+ for (const { content } of sources.settings) {
91
+ const hooks = content["hooks"];
92
+ if (isRecord(hooks)) {
93
+ for (const list of Object.values(hooks)) if (Array.isArray(list)) hookCount += list.length;
94
+ }
95
+ const permissions = content["permissions"];
96
+ if (isRecord(permissions)) {
97
+ for (const key of ["allow", "deny", "ask"]) {
98
+ const list = permissions[key];
99
+ if (Array.isArray(list)) ruleCount += list.length;
100
+ }
101
+ }
102
+ }
103
+ if (hookCount > 0) {
104
+ notes.push(
105
+ `Hooks: ${hookCount} found \u2014 not imported (matcher semantics differ). Recreate under config.hooks; see docs/hooks.md.`
106
+ );
107
+ }
108
+ if (ruleCount > 0) {
109
+ notes.push(
110
+ `Permission rules: ${ruleCount} found \u2014 not imported (a mistranslated deny is worse than none). Use /permissions or --allowed-tools/--disallowed-tools.`
111
+ );
112
+ }
113
+ for (const file of sources.instructionFiles) {
114
+ notes.push(
115
+ `Instructions: ${file} \u2014 not imported. Project context lives in .wrongstack/AGENTS.md; merge what applies there.`
116
+ );
117
+ }
118
+ return { mcp, notes };
119
+ }
120
+ async function readJson(file) {
121
+ let raw;
122
+ try {
123
+ raw = await fs.readFile(file, "utf8");
124
+ } catch {
125
+ return void 0;
126
+ }
127
+ try {
128
+ const parsed = JSON.parse(raw);
129
+ return isRecord(parsed) ? parsed : void 0;
130
+ } catch {
131
+ throw new Error(`${file} is not valid JSON`);
132
+ }
133
+ }
134
+ async function exists(p) {
135
+ try {
136
+ await fs.access(p);
137
+ return true;
138
+ } catch {
139
+ return false;
140
+ }
141
+ }
142
+ async function readClaudeCodeSources(projectRoot, userHome = os.homedir()) {
143
+ const settingsFiles = [
144
+ path.join(userHome, ".claude", "settings.json"),
145
+ path.join(projectRoot, ".claude", "settings.json"),
146
+ path.join(projectRoot, ".claude", "settings.local.json")
147
+ ];
148
+ const settings = [];
149
+ for (const file of settingsFiles) {
150
+ const content = await readJson(file);
151
+ if (content) settings.push({ file, content });
152
+ }
153
+ const instructionCandidates = [
154
+ path.join(userHome, ".claude", "CLAUDE.md"),
155
+ path.join(projectRoot, "CLAUDE.md"),
156
+ path.join(projectRoot, ".claude", "CLAUDE.md")
157
+ ];
158
+ const skillCandidates = [
159
+ path.join(userHome, ".claude", "skills"),
160
+ path.join(projectRoot, ".claude", "skills")
161
+ ];
162
+ return {
163
+ userState: await readJson(path.join(userHome, ".claude.json")),
164
+ projectMcp: await readJson(path.join(projectRoot, ".mcp.json")),
165
+ settings,
166
+ instructionFiles: (await Promise.all(instructionCandidates.map(async (f) => await exists(f) ? f : null))).filter((f) => f !== null),
167
+ skillDirs: (await Promise.all(skillCandidates.map(async (d) => await exists(d) ? d : null))).filter((d) => d !== null)
168
+ };
169
+ }
170
+ var SOURCE_LABEL = {
171
+ "claude-user": "~/.claude.json (user)",
172
+ "claude-project-local": "~/.claude.json (this project)",
173
+ repository: ".mcp.json (repository)"
174
+ };
175
+ var importClaudeCodeCmd = async (args, deps) => {
176
+ args = restoreFlags(args, deps, ["apply", "overwrite", "enable-project-servers"]);
177
+ const apply = args.includes("--apply");
178
+ const overwrite = args.includes("--overwrite");
179
+ const enableProjectServers = args.includes("--enable-project-servers");
180
+ let sources;
181
+ try {
182
+ sources = await readClaudeCodeSources(deps.projectRoot, deps.userHome);
183
+ } catch (err) {
184
+ deps.renderer.writeError(`import-claude-code: ${err.message}`);
185
+ return 1;
186
+ }
187
+ const configPath = activeProfileConfigPath(deps.paths, deps.config);
188
+ const current = await readJsonObjectFile(configPath);
189
+ const existingServers = isRecord(current["mcpServers"]) ? current["mcpServers"] : {};
190
+ const plan = planClaudeCodeImport({
191
+ sources,
192
+ projectRoot: deps.projectRoot,
193
+ existingServers,
194
+ overwrite,
195
+ enableProjectServers
196
+ });
197
+ const out = (line) => deps.renderer.write(`${line}
198
+ `);
199
+ out(apply ? "Importing from Claude Code:" : "Claude Code import preview (nothing written):");
200
+ if (plan.mcp.length === 0) out(" MCP servers: none found");
201
+ for (const c of plan.mcp) {
202
+ const state = c.action.startsWith("skip") ? "" : c.enabled ? " [enabled]" : " [disabled]";
203
+ const verb = {
204
+ add: "add",
205
+ overwrite: "overwrite",
206
+ "skip-exists": "skip (exists; --overwrite to replace)",
207
+ "skip-invalid": "skip (invalid)"
208
+ }[c.action];
209
+ out(` MCP ${c.name} \u2014 ${verb}${state} \u2014 ${SOURCE_LABEL[c.source]}`);
210
+ if (c.note) out(` ${c.note}`);
211
+ }
212
+ for (const note of plan.notes) out(` ${note}`);
213
+ const writes = plan.mcp.filter((c) => c.action === "add" || c.action === "overwrite");
214
+ if (!apply) {
215
+ if (writes.length > 0)
216
+ out(`
217
+ Run with --apply to write ${writes.length} server(s) to ${configPath}.`);
218
+ return 0;
219
+ }
220
+ if (writes.length > 0) {
221
+ await updateJsonObjectFile(configPath, (config) => {
222
+ for (const c of writes) {
223
+ setJsonPath(config, ["mcpServers", c.name], { ...c.config, enabled: c.enabled });
224
+ }
225
+ });
226
+ }
227
+ out(`
228
+ Wrote ${writes.length} server(s) to ${configPath}.`);
229
+ return 0;
230
+ };
231
+ export {
232
+ importClaudeCodeCmd,
233
+ planClaudeCodeImport,
234
+ readClaudeCodeSources
235
+ };
236
+ //# sourceMappingURL=import-claude-code-32PCSIQI.js.map
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { main } from './cli-entry-main.js';
2
- export { installBrokenPipeHandlers } from './cli-entry-point.js';
2
+ export { installBrokenPipeHandlers, runCliProcess } from './cli-entry-point.js';
3
3
  export { CLI_VERSION } from './version.js';
4
4
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -2,28 +2,32 @@
2
2
  import {
3
3
  applyNodeEnvDefault,
4
4
  applySessionShellDefault
5
- } from "./chunk-672UXYL3.js";
5
+ } from "./chunk-LBPLTTZ6.js";
6
6
  import {
7
7
  CLI_VERSION
8
- } from "./chunk-XJXDOF63.js";
8
+ } from "./chunk-F5DCFAKI.js";
9
9
  import {
10
10
  parseArgs
11
- } from "./chunk-C3Z4N6A6.js";
11
+ } from "./chunk-Q4INH2DG.js";
12
12
 
13
13
  // src/cli-entry-main.ts
14
14
  async function main(argv) {
15
15
  applyNodeEnvDefault();
16
16
  applySessionShellDefault();
17
17
  const earlyFlags = parseArgs(argv).flags;
18
+ if (earlyFlags["ascii"] === true || process.env["WRONGSTACK_TUI_ICON_STYLE"]) {
19
+ const { applyAsciiMode } = await import("./ascii-mode-SG4PRNLP.js");
20
+ applyAsciiMode(earlyFlags);
21
+ }
18
22
  if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
19
- const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-7GQIGMVD.js");
23
+ const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-74Y5N6CF.js");
20
24
  const earlyExit = await handleHelpVersionShortCircuit(argv);
21
25
  if (earlyExit !== null) return earlyExit;
22
26
  }
23
- const { initializeCli } = await import("./cli-context-33F74CSZ.js");
27
+ const { initializeCli } = await import("./cli-context-UVGAN3NO.js");
24
28
  const cliCtx = await initializeCli(argv);
25
29
  if (typeof cliCtx === "number") return cliCtx;
26
- const { runInteractive } = await import("./cli-main-FNGMKPBA.js");
30
+ const { runInteractive } = await import("./cli-main-TN3KZ2P6.js");
27
31
  return runInteractive(cliCtx);
28
32
  }
29
33
 
@@ -34,6 +38,7 @@ import { scrubErrorText } from "@wrongstack/core/security";
34
38
  import {
35
39
  hardenWin32ExecutableSearch,
36
40
  installCrashShield,
41
+ isStandaloneBinary,
37
42
  runFatalSalvageSync,
38
43
  writeErr
39
44
  } from "@wrongstack/core/utils";
@@ -58,7 +63,7 @@ function isCliMain(moduleUrl, argvEntry = process.argv[1]) {
58
63
  }
59
64
  return argvEntry.endsWith("/cli/dist/index.js") || argvEntry.endsWith("\\cli\\dist\\index.js");
60
65
  }
61
- var isMain = isCliMain(import.meta.url);
66
+ var isMain = isStandaloneBinary() || isCliMain(import.meta.url);
62
67
  function isBrokenOutputConsumer(error) {
63
68
  if (typeof error !== "object" || error === null || !("code" in error)) return false;
64
69
  return error.code === "EPIPE" || error.code === "ECONNRESET" || error.code === "ECONNABORTED";
@@ -120,8 +125,7 @@ function scheduleForcedExit(code, deps = {}) {
120
125
  const first = setTimeout(check, EXIT_GRACE_MS);
121
126
  first.unref();
122
127
  }
123
- function runAsMain(mainFn) {
124
- if (!isMain) return;
128
+ function runCliProcess(mainFn) {
125
129
  installBrokenPipeHandlers();
126
130
  installCrashShield();
127
131
  hardenWin32ExecutableSearch();
@@ -143,12 +147,17 @@ function runAsMain(mainFn) {
143
147
  }
144
148
  );
145
149
  }
150
+ function runAsMain(mainFn) {
151
+ if (!isMain) return;
152
+ runCliProcess(mainFn);
153
+ }
146
154
 
147
155
  // src/index.ts
148
156
  runAsMain(main);
149
157
  export {
150
158
  CLI_VERSION,
151
159
  installBrokenPipeHandlers,
152
- main
160
+ main,
161
+ runCliProcess
153
162
  };
154
163
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ createKanbanSupervisor
3
+ } from "./chunk-R4QGL6GB.js";
4
+ export {
5
+ createKanbanSupervisor
6
+ };
7
+ //# sourceMappingURL=kanban-supervisor-67ECABTD.js.map
@@ -85,6 +85,13 @@ export interface LiveSettingsInput {
85
85
  * stores it as-is. Default: every panel 'bottom' when unset.
86
86
  */
87
87
  panelPositions?: Readonly<Record<string, 'bottom' | 'sidebar'>> | undefined;
88
+ /**
89
+ * Settings-picker cursor restore: the field index the picker was last on
90
+ * when a value changed. Persisted as `autonomy.lastSettingsField`; the
91
+ * settingsOpen hydration reads it back so a fresh session reopens the
92
+ * picker at the same field. 0 = no saved value.
93
+ */
94
+ lastSettingsField?: number | undefined;
88
95
  /** Show SAGE Memory Inject blocks in tool results. Default: false. */
89
96
  showSageMemoryInject?: boolean | undefined;
90
97
  /**
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  startCliHqConnection
3
- } from "./chunk-CJTBLTS4.js";
4
- import "./chunk-XJXDOF63.js";
3
+ } from "./chunk-KJS5543T.js";
4
+ import "./chunk-F5DCFAKI.js";
5
5
 
6
6
  // src/subcommands/handlers/mailbox-serve.ts
7
7
  import { createServer } from "node:http";
@@ -361,4 +361,4 @@ function printHelp(deps) {
361
361
  export {
362
362
  mailboxServeCmd
363
363
  };
364
- //# sourceMappingURL=mailbox-serve-3GFOK2I7.js.map
364
+ //# sourceMappingURL=mailbox-serve-NW5VZG7R.js.map
@@ -1,9 +1,9 @@
1
- import {
2
- restoreFlags
3
- } from "./chunk-CSAPOCBP.js";
4
1
  import {
5
2
  activeProfileConfigPath
6
3
  } from "./chunk-YMXXOOFN.js";
4
+ import {
5
+ restoreFlags
6
+ } from "./chunk-CSAPOCBP.js";
7
7
 
8
8
  // src/subcommands/handlers/mcp.ts
9
9
  import { allServers, resolveMcpServerConfig } from "@wrongstack/core/infrastructure";
@@ -460,4 +460,4 @@ function isRecord(value) {
460
460
  export {
461
461
  mcpCmd
462
462
  };
463
- //# sourceMappingURL=mcp-DC5WSBOO.js.map
463
+ //# sourceMappingURL=mcp-LBS45HWZ.js.map