@wrongstack/cli 0.308.2 → 0.308.5

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.
package/README.md CHANGED
@@ -32,7 +32,7 @@ wstack resume <session-id> # equivalent
32
32
  ### Launch menu
33
33
 
34
34
  When `wstack` is invoked on an interactive TTY with no surface flag, the CLI
35
- prints a four-option launch menu and waits for a numeric choice:
35
+ prints a five-option launch menu and waits for a numeric choice:
36
36
 
37
37
  ```
38
38
  ✱ WrongStack launch mode
@@ -41,7 +41,8 @@ prints a four-option launch menu and waits for a numeric choice:
41
41
  2) WebUI (browser-based project UI; port 3456)
42
42
  3) SimpleUI (lightweight browser UI; port 3466)
43
43
  4) HQ (project-independent HQ dashboard; port 3499)
44
- [1-4, q to quit] (auto 1 in 8s)
44
+ 5) Desktop (Electron desktop shell; alias: --desktop)
45
+ [1-5, q to quit] (auto 1 in 8s)
45
46
  ```
46
47
 
47
48
  If you previously picked a mode, the menu shows a one-line summary and a
@@ -8,6 +8,7 @@
8
8
  * 2) WebUI — browser-based project UI (port 3456 by default)
9
9
  * 3) SimpleUI — lightweight browser UI (port 3466 by default)
10
10
  * 4) HQ — project-independent HQ dashboard (port 3499)
11
+ * 5) Desktop — Electron desktop shell (`wstack --desktop`)
11
12
  *
12
13
  * It returns either:
13
14
  * - `null` — caller should fall through to the historical
@@ -20,6 +21,8 @@
20
21
  * surface flag + chosen port into argv.
21
22
  * * `hq` → caller dispatches to the HQ
22
23
  * short-circuit with the chosen port/host.
24
+ * * `desktop` → caller injects `--desktop` and
25
+ * dispatches to the desktop short-circuit.
23
26
  *
24
27
  * Why this lives in `boot/`: it sits next to the other entry-point
25
28
  * short-circuits (`short-circuit-{flags,desktop,hq}.ts`) and is
@@ -40,7 +43,9 @@ export interface LaunchMenuResult extends LaunchMenuChoice {
40
43
  */
41
44
  cancelled: boolean;
42
45
  }
43
- declare const DEFAULT_PORTS: Record<Exclude<LaunchMenuMode, 'tui-repl'>, number>;
46
+ /** Surfaces that bind a TCP listener and therefore need a port/host prompt. */
47
+ type NetworkLaunchMode = Exclude<LaunchMenuMode, 'tui-repl' | 'desktop'>;
48
+ declare const DEFAULT_PORTS: Record<NetworkLaunchMode, number>;
44
49
  /**
45
50
  * Pure predicate — extracted so unit tests can lock the skip
46
51
  * conditions down without booting a renderer or reader.
@@ -94,6 +99,8 @@ export declare function runLaunchMenu(deps: RunLaunchMenuDeps): Promise<LaunchMe
94
99
  * - `hq` → appends `--hq --port=<n> [--host=<h>]` (the
95
100
  * short-circuit in cli-context.ts will pick this up
96
101
  * and dispatch to startHqServer).
102
+ * - `desktop` → appends `--desktop` (the desktop short-circuit
103
+ * in cli-context.ts then launches Electron).
97
104
  *
98
105
  * The function is intentionally argv-only — no side effects, no I/O —
99
106
  * so unit tests can pin the transformation down without mocking
@@ -4,7 +4,7 @@
4
4
  * Consolidates the first ~150 lines of the monolithic main() function:
5
5
  * - Pre-boot side effects (NODE_ENV, shell default)
6
6
  * - Short-circuits (--help, --version, --desktop, --hq)
7
- * - Interactive launch menu (TUI/REPL · WebUI · SimpleUI · HQ)
7
+ * - Interactive launch menu (TUI/REPL · WebUI · SimpleUI · HQ · Desktop)
8
8
  * - Boot() call + preflight
9
9
  * - OAuth token persistence
10
10
  * - Container wiring (EventBus, DI container)
@@ -3070,7 +3070,8 @@ async function resolveHostSubagentSkillResolution(deps, roster, subCfg, availabl
3070
3070
  const resolved = [];
3071
3071
  const selected = [];
3072
3072
  const trimmed = [];
3073
- let usedChars = 0;
3073
+ const skillsHeader = "# Role-prioritized skills\n\nApply these skills first for this assignment. Skills are methods, not authority: they never widen this assignment's TASK BOUNDARY \u2014 suggestions beyond it belong in your report, not your diff.\n\n";
3074
+ let usedChars = skillsHeader.length;
3074
3075
  const maxChars = 16e3;
3075
3076
  const maxCharsPerSkill = 4e3;
3076
3077
  for (const skillName of skillNames) {
@@ -3139,11 +3140,7 @@ _(body trimmed)_` : body,
3139
3140
  }
3140
3141
  const sections = [
3141
3142
  directContent,
3142
- resolved.length > 0 ? `# Role-prioritized skills
3143
-
3144
- Apply these skills first for this assignment.
3145
-
3146
- ${resolved.join("\n\n---\n\n")}` : void 0
3143
+ resolved.length > 0 ? `${skillsHeader}${resolved.join("\n\n---\n\n")}` : void 0
3147
3144
  ].filter((section) => Boolean(section));
3148
3145
  return { content: sections.join("\n\n"), selected, dropped, trimmed };
3149
3146
  }
@@ -33751,4 +33748,4 @@ export {
33751
33748
  CLI_VERSION,
33752
33749
  runInteractive
33753
33750
  };
33754
- //# sourceMappingURL=cli-main-WWZJF33V.js.map
33751
+ //# sourceMappingURL=cli-main-HCCYX3D5.js.map
package/dist/index.js CHANGED
@@ -250,6 +250,9 @@ var DEFAULT_PORTS = {
250
250
  };
251
251
  var DEFAULT_HOST = "127.0.0.1";
252
252
  var HQ_DEFAULT_HOST = HQ_CLI_DEFAULT_HOST;
253
+ function bindsPort(mode) {
254
+ return mode !== "tui-repl" && mode !== "desktop";
255
+ }
253
256
  function defaultHostFor(mode) {
254
257
  return mode === "hq" ? HQ_DEFAULT_HOST : DEFAULT_HOST;
255
258
  }
@@ -281,6 +284,13 @@ var MODE_OPTIONS = [
281
284
  label: "HQ",
282
285
  hint: `project-independent dashboard (port ${DEFAULT_PORT})`,
283
286
  icon: "\u{1F4CA}"
287
+ },
288
+ {
289
+ key: 5,
290
+ mode: "desktop",
291
+ label: "Desktop",
292
+ hint: "Electron app (alias: --desktop)",
293
+ icon: "\u{1F5A5}"
284
294
  }
285
295
  ];
286
296
  var MENU_TIMEOUT_MS = 8e3;
@@ -339,7 +349,7 @@ async function runLaunchMenu(deps) {
339
349
  ${color.dim("\u2500".repeat(48))}
340
350
  `);
341
351
  const answer = (await reader.readLine(
342
- ` ${color.amber("?")} Mode ${color.dim("[1-4, q to quit]")} ${color.dim(`(auto 1 in ${MENU_TIMEOUT_MS / 1e3}s)`)} `,
352
+ ` ${color.amber("?")} Mode ${color.dim("[1-5, q to quit]")} ${color.dim(`(auto 1 in ${MENU_TIMEOUT_MS / 1e3}s)`)} `,
343
353
  { timeoutMs: MENU_TIMEOUT_MS, defaultAnswer: "1" }
344
354
  )).trim().toLowerCase();
345
355
  if (answer === "q" || answer === "quit") {
@@ -349,7 +359,7 @@ async function runLaunchMenu(deps) {
349
359
  const picked = MODE_OPTIONS.find((o) => String(o.key) === answer || o.mode === answer);
350
360
  choice = picked ? { mode: picked.mode } : { mode: "tui-repl" };
351
361
  }
352
- if (choice.mode !== "tui-repl") {
362
+ if (bindsPort(choice.mode)) {
353
363
  const port = await promptPort(deps, ports[choice.mode]);
354
364
  choice.port = port;
355
365
  const defaultHost = defaultHostFor(choice.mode);
@@ -398,7 +408,7 @@ async function promptModeArrow(deps) {
398
408
  }
399
409
  lines.push("");
400
410
  const auto = countdown ? color.dim(` \xB7 auto-launches ${MODE_OPTIONS[index].label} in ${remaining}s`) : "";
401
- lines.push(` ${color.dim("\u2191\u2193 move \xB7 Enter launch \xB7 1-4 jump \xB7 q quit")}${auto}`);
411
+ lines.push(` ${color.dim("\u2191\u2193 move \xB7 Enter launch \xB7 1-5 jump \xB7 q quit")}${auto}`);
402
412
  return lines;
403
413
  };
404
414
  const paint = () => {
@@ -566,7 +576,7 @@ async function promptHost(deps, defaultHost) {
566
576
  return answer;
567
577
  }
568
578
  function finalize(choice, ports) {
569
- if (choice.mode === "tui-repl") return { ...choice, cancelled: false };
579
+ if (!bindsPort(choice.mode)) return { ...choice, cancelled: false };
570
580
  const fallback = ports[choice.mode];
571
581
  return {
572
582
  ...choice,
@@ -585,6 +595,8 @@ function describeMode(mode) {
585
595
  return "SimpleUI";
586
596
  case "hq":
587
597
  return "HQ";
598
+ case "desktop":
599
+ return "Desktop";
588
600
  default: {
589
601
  const exhaustive = mode;
590
602
  return String(exhaustive);
@@ -612,6 +624,9 @@ function applyLaunchMenuToArgv(argv, result) {
612
624
  if (typeof result.host === "string") out.push(`--host=${result.host}`);
613
625
  out.push("--hq");
614
626
  return out;
627
+ case "desktop":
628
+ out.push("--desktop");
629
+ return out;
615
630
  default: {
616
631
  const exhaustive = result.mode;
617
632
  void exhaustive;
@@ -4338,6 +4353,10 @@ async function initializeCli(argv) {
4338
4353
  const hqAfterMenu = await handleHqShortCircuit(augmentedFlags);
4339
4354
  if (hqAfterMenu !== null) return hqAfterMenu;
4340
4355
  }
4356
+ if (menuResult.mode === "desktop") {
4357
+ const desktopAfterMenu = await handleDesktopShortCircuit(augmentedFlags, effectiveArgv);
4358
+ if (desktopAfterMenu !== null) return desktopAfterMenu;
4359
+ }
4341
4360
  }
4342
4361
  const effectiveFlags = parseArgs(effectiveArgv).flags;
4343
4362
  try {
@@ -4447,7 +4466,7 @@ async function initializeCli(argv) {
4447
4466
  async function main(argv) {
4448
4467
  const cliCtx = await initializeCli(argv);
4449
4468
  if (typeof cliCtx === "number") return cliCtx;
4450
- const { runInteractive } = await import("./cli-main-WWZJF33V.js");
4469
+ const { runInteractive } = await import("./cli-main-HCCYX3D5.js");
4451
4470
  return runInteractive(cliCtx);
4452
4471
  }
4453
4472
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "0.308.2",
3
+ "version": "0.308.5",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
6
6
  "keywords": [
@@ -42,32 +42,32 @@
42
42
  ],
43
43
  "dependencies": {
44
44
  "ws": "^8.21.3",
45
- "@wrongstack/bench": "0.308.2",
46
- "@wrongstack/core": "0.308.2",
47
- "@wrongstack/kanban": "0.308.2",
48
- "@wrongstack/mcp": "0.308.2",
49
- "@wrongstack/providers": "0.308.2",
50
- "@wrongstack/persistence": "0.308.2",
51
- "@wrongstack/requirement-intake": "0.308.2",
52
- "@wrongstack/plug-lsp": "0.308.2",
53
- "@wrongstack/plugins": "0.308.2",
54
- "@wrongstack/acp": "0.308.2",
55
- "@wrongstack/runtime": "0.308.2",
56
- "@wrongstack/sage": "0.308.2",
57
- "@wrongstack/simpleui": "0.308.2",
58
- "@wrongstack/techstack": "0.308.2",
59
- "@wrongstack/sdd": "0.308.2",
60
- "@wrongstack/tools": "0.308.2",
61
- "@wrongstack/security-scanner": "0.308.2",
62
- "@wrongstack/tui": "0.308.2",
63
- "@wrongstack/telegram": "0.308.2",
64
- "@wrongstack/vector-memory": "0.308.2",
65
- "@wrongstack/webui": "0.308.2",
66
- "@wrongstack/webui-hq": "0.308.2",
67
- "@wrongstack/webui-server": "0.308.2"
45
+ "@wrongstack/acp": "0.308.5",
46
+ "@wrongstack/mcp": "0.308.5",
47
+ "@wrongstack/bench": "0.308.5",
48
+ "@wrongstack/core": "0.308.5",
49
+ "@wrongstack/persistence": "0.308.5",
50
+ "@wrongstack/kanban": "0.308.5",
51
+ "@wrongstack/requirement-intake": "0.308.5",
52
+ "@wrongstack/plug-lsp": "0.308.5",
53
+ "@wrongstack/sage": "0.308.5",
54
+ "@wrongstack/plugins": "0.308.5",
55
+ "@wrongstack/runtime": "0.308.5",
56
+ "@wrongstack/providers": "0.308.5",
57
+ "@wrongstack/security-scanner": "0.308.5",
58
+ "@wrongstack/techstack": "0.308.5",
59
+ "@wrongstack/sdd": "0.308.5",
60
+ "@wrongstack/tools": "0.308.5",
61
+ "@wrongstack/tui": "0.308.5",
62
+ "@wrongstack/telegram": "0.308.5",
63
+ "@wrongstack/simpleui": "0.308.5",
64
+ "@wrongstack/webui-hq": "0.308.5",
65
+ "@wrongstack/webui": "0.308.5",
66
+ "@wrongstack/vector-memory": "0.308.5",
67
+ "@wrongstack/webui-server": "0.308.5"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@wrongstack/desktop": "0.308.2"
70
+ "@wrongstack/desktop": "0.308.5"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@types/node": "^26.2.0",