@wrongstack/cli 0.308.2 → 0.308.4
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
package/dist/cli-context.d.ts
CHANGED
|
@@ -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
|
-
|
|
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 ?
|
|
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-
|
|
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-
|
|
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
|
|
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-
|
|
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
|
|
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-
|
|
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.
|
|
3
|
+
"version": "0.308.4",
|
|
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/
|
|
46
|
-
"@wrongstack/
|
|
47
|
-
"@wrongstack/kanban": "0.308.
|
|
48
|
-
"@wrongstack/
|
|
49
|
-
"@wrongstack/
|
|
50
|
-
"@wrongstack/
|
|
51
|
-
"@wrongstack/
|
|
52
|
-
"@wrongstack/
|
|
53
|
-
"@wrongstack/
|
|
54
|
-
"@wrongstack/
|
|
55
|
-
"@wrongstack/
|
|
56
|
-
"@wrongstack/
|
|
57
|
-
"@wrongstack/
|
|
58
|
-
"@wrongstack/
|
|
59
|
-
"@wrongstack/sdd": "0.308.
|
|
60
|
-
"@wrongstack/
|
|
61
|
-
"@wrongstack/
|
|
62
|
-
"@wrongstack/tui": "0.308.
|
|
63
|
-
"@wrongstack/
|
|
64
|
-
"@wrongstack/
|
|
65
|
-
"@wrongstack/
|
|
66
|
-
"@wrongstack/webui
|
|
67
|
-
"@wrongstack/webui-server": "0.308.
|
|
45
|
+
"@wrongstack/core": "0.308.4",
|
|
46
|
+
"@wrongstack/mcp": "0.308.4",
|
|
47
|
+
"@wrongstack/kanban": "0.308.4",
|
|
48
|
+
"@wrongstack/bench": "0.308.4",
|
|
49
|
+
"@wrongstack/persistence": "0.308.4",
|
|
50
|
+
"@wrongstack/plug-lsp": "0.308.4",
|
|
51
|
+
"@wrongstack/plugins": "0.308.4",
|
|
52
|
+
"@wrongstack/runtime": "0.308.4",
|
|
53
|
+
"@wrongstack/requirement-intake": "0.308.4",
|
|
54
|
+
"@wrongstack/providers": "0.308.4",
|
|
55
|
+
"@wrongstack/sage": "0.308.4",
|
|
56
|
+
"@wrongstack/simpleui": "0.308.4",
|
|
57
|
+
"@wrongstack/security-scanner": "0.308.4",
|
|
58
|
+
"@wrongstack/telegram": "0.308.4",
|
|
59
|
+
"@wrongstack/sdd": "0.308.4",
|
|
60
|
+
"@wrongstack/acp": "0.308.4",
|
|
61
|
+
"@wrongstack/techstack": "0.308.4",
|
|
62
|
+
"@wrongstack/tui": "0.308.4",
|
|
63
|
+
"@wrongstack/tools": "0.308.4",
|
|
64
|
+
"@wrongstack/webui-hq": "0.308.4",
|
|
65
|
+
"@wrongstack/vector-memory": "0.308.4",
|
|
66
|
+
"@wrongstack/webui": "0.308.4",
|
|
67
|
+
"@wrongstack/webui-server": "0.308.4"
|
|
68
68
|
},
|
|
69
69
|
"optionalDependencies": {
|
|
70
|
-
"@wrongstack/desktop": "0.308.
|
|
70
|
+
"@wrongstack/desktop": "0.308.4"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^26.2.0",
|