@wrongstack/cli 0.300.0 → 0.302.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.
- package/dist/{acp-IDNS2YVE.js → acp-DATHHPNT.js} +34 -15
- package/dist/acp-server-agent.d.ts +1 -1
- package/dist/{audit-2ZSFGNIF.js → audit-QRCLEHHW.js} +5 -1
- package/dist/{auth-6T6ZOT2R.js → auth-PJD3JRH2.js} +150 -37
- package/dist/boot/dispatch-webui.d.ts +3 -16
- package/dist/boot/launch-menu.d.ts +2 -4
- package/dist/boot/tool-registry.d.ts +3 -0
- package/dist/boot/webui-session-child.d.ts +91 -0
- package/dist/chimera-reviewer-policy.d.ts +10 -3
- package/dist/chimera-work-registry.d.ts +19 -0
- package/dist/{chronicle-QQEQFSSE.js → chronicle-63MFCZN6.js} +26 -5
- package/dist/{chunk-YWUPHRGB.js → chunk-263G3FMB.js} +33 -10
- package/dist/{chunk-GYDQABMA.js → chunk-2KDOFTTM.js} +44 -32
- package/dist/{chunk-V76R7DC5.js → chunk-3MOUBRKZ.js} +311 -309
- package/dist/chunk-CSAPOCBP.js +24 -0
- package/dist/{chunk-N7ULWBO5.js → chunk-ETOEGL3V.js} +3 -7
- package/dist/{chunk-3MWUZMOL.js → chunk-GUHQQG63.js} +14 -3
- package/dist/chunk-KE7E7DPX.js +38 -0
- package/dist/{chunk-PEMN4T5O.js → chunk-MT6FGXO3.js} +23 -4
- package/dist/chunk-PFVVUH5B.js +127 -0
- package/dist/{chunk-DPJZQCVP.js → chunk-YMXXOOFN.js} +1 -1
- package/dist/{chunk-4WJKVQJY.js → chunk-ZECLGUTF.js} +15 -3
- package/dist/cli-context.d.ts +2 -0
- package/dist/{cli-main-7B3G2YSG.js → cli-main-EOJ74CI4.js} +336 -99
- package/dist/execute-deps.d.ts +3 -0
- package/dist/{execution-SHGM7BVC.js → execution-CQ772VPS.js} +246 -97
- package/dist/execution-chimera-cascade.d.ts +3 -4
- package/dist/execution-chimera-review.d.ts +2 -3
- package/dist/execution-cleanup.d.ts +3 -2
- package/dist/execution.d.ts +1 -1
- package/dist/{export-TPORYVRZ.js → export-DOBGPY23.js} +12 -1
- package/dist/fleet/host-context.d.ts +1 -1
- package/dist/fleet/host-helpers.d.ts +14 -0
- package/dist/fleet/status-broadcast.d.ts +1 -1
- package/dist/{hq-DVDD4XPV.js → hq-LN5CJHCM.js} +2 -2
- package/dist/hq-server/routes.d.ts +10 -1
- package/dist/hq-server/ws.d.ts +17 -6
- package/dist/{hq-server-DQHLNHDL.js → hq-server-S7HZG3PA.js} +3 -2
- package/dist/index.js +142 -100
- package/dist/live-settings-input.d.ts +5 -0
- package/dist/{mcp-CYLPUEHC.js → mcp-OHPJH73U.js} +6 -2
- package/dist/{modeldiag-YOQZHBQV.js → modeldiag-3DOK4BWW.js} +2 -2
- package/dist/{plugin-usage-EOG4ET4S.js → plugin-usage-YEVLOR33.js} +7 -3
- package/dist/{plugins-56CMWMPR.js → plugins-K3BAUP4D.js} +3 -3
- package/dist/profile-config-path.d.ts +0 -2
- package/dist/provider-helpers.d.ts +0 -5
- package/dist/{providers-models-K6RT7ABI.js → providers-models-WEZ4EGLL.js} +6 -5
- package/dist/{replay-KCTXNMZQ.js → replay-FCBNHW3K.js} +5 -1
- package/dist/{rewind-EJMVFVLS.js → rewind-AOD3JIYX.js} +5 -1
- package/dist/{sessions-config-NLCMK3BY.js → sessions-config-XXN7267N.js} +8 -3
- package/dist/subcommands/flags.d.ts +23 -0
- package/dist/terminal-format.d.ts +15 -0
- package/dist/{webui-server-G3EKFXLL.js → webui-server-NFNRGNNT.js} +54 -29
- package/dist/webui-server-options.d.ts +7 -0
- package/dist/wiring/brain-and-orchestration.d.ts +1 -1
- package/dist/wiring/mailbox-bridge-bootstrap.d.ts +3 -1
- package/dist/wiring/management-tools.d.ts +9 -1
- package/dist/wiring/pipeline.d.ts +5 -5
- package/dist/wiring/plugins.d.ts +2 -3
- package/dist/wiring/provider-utility-tools.d.ts +1 -0
- package/dist/wiring/tools.d.ts +4 -5
- package/package.json +23 -23
package/dist/index.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
parseWebuiSessionChildOptions,
|
|
4
|
+
writeWebuiSessionChildError
|
|
5
|
+
} from "./chunk-PFVVUH5B.js";
|
|
2
6
|
import {
|
|
3
7
|
applySimpleUiFullAutoProfile,
|
|
4
8
|
detectProjectFacts,
|
|
@@ -15,7 +19,8 @@ import {
|
|
|
15
19
|
} from "./chunk-TYO2OVAD.js";
|
|
16
20
|
import {
|
|
17
21
|
DEFAULT_PORT
|
|
18
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2KDOFTTM.js";
|
|
23
|
+
import "./chunk-KE7E7DPX.js";
|
|
19
24
|
import "./chunk-Q5GTM25S.js";
|
|
20
25
|
import {
|
|
21
26
|
helpCmd,
|
|
@@ -36,21 +41,21 @@ import {
|
|
|
36
41
|
parseArgs,
|
|
37
42
|
runPicker,
|
|
38
43
|
saveToGlobalConfig
|
|
39
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MT6FGXO3.js";
|
|
40
45
|
import {
|
|
41
46
|
isKeylessLocalProvider,
|
|
42
47
|
visibleModelIds
|
|
43
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-ETOEGL3V.js";
|
|
44
49
|
import {
|
|
45
50
|
mutateConfigProviders,
|
|
46
51
|
normalizeKeys,
|
|
47
52
|
resolveActiveApiKey,
|
|
48
53
|
writeKeysBack
|
|
49
54
|
} from "./chunk-PJHET45A.js";
|
|
50
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-263G3FMB.js";
|
|
51
56
|
import {
|
|
52
57
|
activeProfileConfigPath
|
|
53
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-YMXXOOFN.js";
|
|
54
59
|
import "./chunk-7OCVIDC7.js";
|
|
55
60
|
|
|
56
61
|
// src/cli-entry-point.ts
|
|
@@ -316,15 +321,15 @@ var ReadlineInputReader = class {
|
|
|
316
321
|
}
|
|
317
322
|
const fresh = this.ensure();
|
|
318
323
|
this.installPromptGuard(fresh);
|
|
319
|
-
|
|
324
|
+
const line = await new Promise((resolve2) => {
|
|
320
325
|
let settled = false;
|
|
321
326
|
let timeoutHandle;
|
|
322
|
-
const settle = (
|
|
327
|
+
const settle = (line2) => {
|
|
323
328
|
if (settled) return;
|
|
324
329
|
settled = true;
|
|
325
330
|
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
326
331
|
setOutputLineGuard(null);
|
|
327
|
-
resolve2(
|
|
332
|
+
resolve2(line2);
|
|
328
333
|
};
|
|
329
334
|
if (timeoutOpts) {
|
|
330
335
|
timeoutHandle = setTimeout(() => {
|
|
@@ -334,15 +339,15 @@ var ReadlineInputReader = class {
|
|
|
334
339
|
}
|
|
335
340
|
}, timeoutOpts.timeoutMs);
|
|
336
341
|
}
|
|
337
|
-
fresh.question(prompt ?? "> ", (
|
|
338
|
-
const persistHistory = !this.suppressNextHistory && this.shouldPersistHistory(
|
|
342
|
+
fresh.question(prompt ?? "> ", (line2) => {
|
|
343
|
+
const persistHistory = !this.suppressNextHistory && this.shouldPersistHistory(line2);
|
|
339
344
|
this.suppressNextHistory = false;
|
|
340
|
-
if (
|
|
341
|
-
this.history.push(
|
|
345
|
+
if (line2.trim() && persistHistory) {
|
|
346
|
+
this.history.push(line2);
|
|
342
347
|
this.saveHistory().then(void 0, () => {
|
|
343
348
|
});
|
|
344
349
|
}
|
|
345
|
-
settle(
|
|
350
|
+
settle(line2);
|
|
346
351
|
});
|
|
347
352
|
fresh.once("close", () => settle(""));
|
|
348
353
|
fresh.on?.("error", (_e) => settle(""));
|
|
@@ -351,6 +356,7 @@ var ReadlineInputReader = class {
|
|
|
351
356
|
fresh.close();
|
|
352
357
|
return result;
|
|
353
358
|
});
|
|
359
|
+
return line;
|
|
354
360
|
} finally {
|
|
355
361
|
this.pending = false;
|
|
356
362
|
}
|
|
@@ -1435,14 +1441,14 @@ function summarize(value, name) {
|
|
|
1435
1441
|
if (typeof v === "object" && v !== null) {
|
|
1436
1442
|
const o = v;
|
|
1437
1443
|
if (name === "edit") {
|
|
1438
|
-
const
|
|
1444
|
+
const path9 = typeof o["path"] === "string" ? o["path"] : "";
|
|
1439
1445
|
const reps = typeof o["replacements"] === "number" ? o["replacements"] : 0;
|
|
1440
|
-
return `${
|
|
1446
|
+
return `${path9} ${reps} replacement${reps === 1 ? "" : "s"}`.trim();
|
|
1441
1447
|
}
|
|
1442
1448
|
if (name === "write") {
|
|
1443
|
-
const
|
|
1449
|
+
const path9 = typeof o["path"] === "string" ? o["path"] : "";
|
|
1444
1450
|
const bytes = typeof o["bytes"] === "number" ? o["bytes"] : void 0;
|
|
1445
|
-
return bytes !== void 0 ? `${
|
|
1451
|
+
return bytes !== void 0 ? `${path9} ${bytes}B` : path9;
|
|
1446
1452
|
}
|
|
1447
1453
|
if (name === "read") {
|
|
1448
1454
|
return summarizeRead(o);
|
|
@@ -1457,13 +1463,13 @@ function summarize(value, name) {
|
|
|
1457
1463
|
return "";
|
|
1458
1464
|
}
|
|
1459
1465
|
function summarizeRead(o) {
|
|
1460
|
-
const
|
|
1466
|
+
const path9 = typeof o["path"] === "string" ? o["path"] : "";
|
|
1461
1467
|
const total = typeof o["total_lines"] === "number" ? o["total_lines"] : void 0;
|
|
1462
1468
|
const truncated = o["truncated"] === true;
|
|
1463
1469
|
const cached = o["cached"] === true;
|
|
1464
1470
|
const note = typeof o["note"] === "string" ? o["note"] : void 0;
|
|
1465
1471
|
const parts = [];
|
|
1466
|
-
if (
|
|
1472
|
+
if (path9) parts.push(path9);
|
|
1467
1473
|
if (total !== void 0) parts.push(`${total} line${total === 1 ? "" : "s"}`);
|
|
1468
1474
|
const flags = [];
|
|
1469
1475
|
if (truncated) flags.push("truncated");
|
|
@@ -1495,34 +1501,34 @@ function compactSingleLine(text) {
|
|
|
1495
1501
|
|
|
1496
1502
|
// src/subcommands/index.ts
|
|
1497
1503
|
var loaders = {
|
|
1498
|
-
acp: async () => (await import("./acp-
|
|
1504
|
+
acp: async () => (await import("./acp-DATHHPNT.js")).acpCmd,
|
|
1499
1505
|
init: async () => (await import("./init-E2NDDOHI.js")).initCmd,
|
|
1500
|
-
auth: async () => (await import("./auth-
|
|
1506
|
+
auth: async () => (await import("./auth-PJD3JRH2.js")).authCmd,
|
|
1501
1507
|
update: async () => (await import("./update-MV6TUACD.js")).updateCmd,
|
|
1502
|
-
sessions: async () => (await import("./sessions-config-
|
|
1503
|
-
config: async () => (await import("./sessions-config-
|
|
1504
|
-
rewind: async () => (await import("./rewind-
|
|
1505
|
-
replay: async () => (await import("./replay-
|
|
1506
|
-
audit: async () => (await import("./audit-
|
|
1508
|
+
sessions: async () => (await import("./sessions-config-XXN7267N.js")).sessionsCmd,
|
|
1509
|
+
config: async () => (await import("./sessions-config-XXN7267N.js")).configCmd,
|
|
1510
|
+
rewind: async () => (await import("./rewind-AOD3JIYX.js")).rewindCmd,
|
|
1511
|
+
replay: async () => (await import("./replay-FCBNHW3K.js")).replayCmd,
|
|
1512
|
+
audit: async () => (await import("./audit-QRCLEHHW.js")).auditCmd,
|
|
1507
1513
|
tools: async () => (await import("./tools-skills-UNKLOB7M.js")).toolsCmd,
|
|
1508
1514
|
skills: async () => (await import("./tools-skills-UNKLOB7M.js")).skillsCmd,
|
|
1509
|
-
providers: async () => (await import("./providers-models-
|
|
1510
|
-
models: async () => (await import("./providers-models-
|
|
1511
|
-
mcp: async () => (await import("./mcp-
|
|
1512
|
-
plugin: async () => (await import("./plugin-usage-
|
|
1513
|
-
plugins: async () => (await import("./plugin-usage-
|
|
1515
|
+
providers: async () => (await import("./providers-models-WEZ4EGLL.js")).providersCmd,
|
|
1516
|
+
models: async () => (await import("./providers-models-WEZ4EGLL.js")).modelsCmd,
|
|
1517
|
+
mcp: async () => (await import("./mcp-OHPJH73U.js")).mcpCmd,
|
|
1518
|
+
plugin: async () => (await import("./plugin-usage-YEVLOR33.js")).pluginCmd,
|
|
1519
|
+
plugins: async () => (await import("./plugin-usage-YEVLOR33.js")).pluginCmd,
|
|
1514
1520
|
diag: async () => (await import("./diag-doctor-OQ3AA63O.js")).diagCmd,
|
|
1515
1521
|
doctor: async () => (await import("./diag-doctor-OQ3AA63O.js")).doctorCmd,
|
|
1516
|
-
export: async () => (await import("./export-
|
|
1517
|
-
usage: async () => (await import("./plugin-usage-
|
|
1522
|
+
export: async () => (await import("./export-DOBGPY23.js")).exportCmd,
|
|
1523
|
+
usage: async () => (await import("./plugin-usage-YEVLOR33.js")).usageCmd,
|
|
1518
1524
|
version: async () => (await import("./version-help-ASKQYXDJ.js")).versionCmd,
|
|
1519
1525
|
help: async () => (await import("./version-help-ASKQYXDJ.js")).helpCmd,
|
|
1520
1526
|
projects: async () => (await import("./projects-XE76NFNZ.js")).projectsCmd,
|
|
1521
|
-
modeldiag: async () => (await import("./modeldiag-
|
|
1527
|
+
modeldiag: async () => (await import("./modeldiag-3DOK4BWW.js")).modeldiagCmd,
|
|
1522
1528
|
quick: async () => (await import("./quick-VIO2BEHS.js")).quickCmd,
|
|
1523
1529
|
bench: async () => (await import("./bench-7ZDWSNEF.js")).benchCmd,
|
|
1524
|
-
chronicle: async () => (await import("./chronicle-
|
|
1525
|
-
hq: async () => (await import("./hq-
|
|
1530
|
+
chronicle: async () => (await import("./chronicle-63MFCZN6.js")).chronicleCmd,
|
|
1531
|
+
hq: async () => (await import("./hq-LN5CJHCM.js")).hqCmd,
|
|
1526
1532
|
mailbox: async () => (await import("./mailbox-serve-DBOOOOWZ.js")).mailboxServeCmd,
|
|
1527
1533
|
permissions: async () => (await import("./permissions-FNYLZIL4.js")).permissionsCmd,
|
|
1528
1534
|
project: async () => (await import("./project-BLQ3ALVL.js")).projectCmd,
|
|
@@ -1639,7 +1645,7 @@ async function boot(argv) {
|
|
|
1639
1645
|
return 2;
|
|
1640
1646
|
}
|
|
1641
1647
|
let { paths, config, vault } = bootResult;
|
|
1642
|
-
|
|
1648
|
+
let first = positional[0];
|
|
1643
1649
|
const mayOfferConfigRecovery = isStdinTTY() && (positional.length === 0 || first === "quick") && (!config.activeProfile || config.activeProfile === "default") && typeof flags["prompt"] !== "string" && !flags["webui"] && !flags["no-interactive"] && !flags["skip"];
|
|
1644
1650
|
const renderer = new TerminalRenderer();
|
|
1645
1651
|
const reader = new ReadlineInputReader({ historyFile: paths.wpaths.historyFile });
|
|
@@ -1671,6 +1677,7 @@ async function boot(argv) {
|
|
|
1671
1677
|
flags["quick"] = true;
|
|
1672
1678
|
flags["tui"] = true;
|
|
1673
1679
|
positional.splice(0, 1);
|
|
1680
|
+
first = void 0;
|
|
1674
1681
|
const plugins = config?.plugins ?? [];
|
|
1675
1682
|
if (plugins.length === 0) {
|
|
1676
1683
|
console.debug("[wrongstack:quick] No plugins configured");
|
|
@@ -1705,7 +1712,8 @@ async function boot(argv) {
|
|
|
1705
1712
|
overlayFile: resolveBundledOverlayFile(),
|
|
1706
1713
|
overlayCacheFile: wpaths.modelsOverlayCache
|
|
1707
1714
|
});
|
|
1708
|
-
|
|
1715
|
+
const subcommandHandler = first ? subcommands[first] : void 0;
|
|
1716
|
+
if (first && subcommandHandler) {
|
|
1709
1717
|
const container = createDefaultContainer({
|
|
1710
1718
|
config,
|
|
1711
1719
|
wpaths,
|
|
@@ -1721,7 +1729,7 @@ async function boot(argv) {
|
|
|
1721
1729
|
registry: toolRegistryForSubcmd,
|
|
1722
1730
|
tier: normalizeTokenSavingTier(config.features.tokenSavingMode)
|
|
1723
1731
|
});
|
|
1724
|
-
const code = await
|
|
1732
|
+
const code = await subcommandHandler(positional.slice(1), {
|
|
1725
1733
|
config,
|
|
1726
1734
|
renderer,
|
|
1727
1735
|
reader,
|
|
@@ -2120,26 +2128,19 @@ async function launchDesktop(args) {
|
|
|
2120
2128
|
}
|
|
2121
2129
|
|
|
2122
2130
|
// src/boot/short-circuit-hq.ts
|
|
2123
|
-
import * as fs7 from "node:fs/promises";
|
|
2124
2131
|
import * as net from "node:net";
|
|
2125
|
-
import
|
|
2132
|
+
import {
|
|
2133
|
+
HQ_CLI_DEFAULT_HOST,
|
|
2134
|
+
isLoopbackHost,
|
|
2135
|
+
readHqRuntimeFileSync,
|
|
2136
|
+
resolveHqDataDir
|
|
2137
|
+
} from "@wrongstack/core/hq";
|
|
2126
2138
|
import { color as color8, isPidAlive } from "@wrongstack/core/utils";
|
|
2127
|
-
import { HQ_CLI_DEFAULT_HOST, isLoopbackHost, resolveHqDataDir } from "@wrongstack/core/hq";
|
|
2128
2139
|
async function isHqAlreadyRunning(dataDir) {
|
|
2129
|
-
const
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
const content = await fd.read().then(({ buffer }) => buffer.toString("utf8"));
|
|
2134
|
-
const marker = JSON.parse(content);
|
|
2135
|
-
if (marker.pid && isPidAlive(marker.pid)) return marker;
|
|
2136
|
-
return null;
|
|
2137
|
-
} catch (err) {
|
|
2138
|
-
if (err.code === "ENOENT") return null;
|
|
2139
|
-
return null;
|
|
2140
|
-
} finally {
|
|
2141
|
-
if (fd) await fd.close();
|
|
2142
|
-
}
|
|
2140
|
+
const marker = readHqRuntimeFileSync(dataDir);
|
|
2141
|
+
if (!marker) return null;
|
|
2142
|
+
if (marker.pid && isPidAlive(marker.pid)) return marker;
|
|
2143
|
+
return null;
|
|
2143
2144
|
}
|
|
2144
2145
|
async function isPortInUse(host, port) {
|
|
2145
2146
|
return new Promise((resolve2) => {
|
|
@@ -2159,7 +2160,7 @@ async function isPortInUse(host, port) {
|
|
|
2159
2160
|
}
|
|
2160
2161
|
async function handleHqShortCircuit(flags) {
|
|
2161
2162
|
if (flags["hq"] !== true) return null;
|
|
2162
|
-
const { startHqServer } = await import("./hq-server-
|
|
2163
|
+
const { startHqServer } = await import("./hq-server-S7HZG3PA.js");
|
|
2163
2164
|
const tunnelRequested = flags["tunnel"] === true;
|
|
2164
2165
|
const host = typeof flags["host"] === "string" ? flags["host"] : tunnelRequested ? "127.0.0.1" : HQ_CLI_DEFAULT_HOST;
|
|
2165
2166
|
if (tunnelRequested && !isLoopbackHost(host)) {
|
|
@@ -2318,7 +2319,7 @@ ${color8.green("Cloudflare Quick Tunnel ready:")} ${browserUrl}
|
|
|
2318
2319
|
}
|
|
2319
2320
|
|
|
2320
2321
|
// src/boot/launch-menu.ts
|
|
2321
|
-
import * as
|
|
2322
|
+
import * as fs7 from "node:fs/promises";
|
|
2322
2323
|
import { HQ_CLI_DEFAULT_HOST as HQ_CLI_DEFAULT_HOST2 } from "@wrongstack/core/hq";
|
|
2323
2324
|
import { atomicWrite as atomicWrite3, color as color9, isStdinTTY as isStdinTTY2, setRawMode as setRawMode2 } from "@wrongstack/core/utils";
|
|
2324
2325
|
|
|
@@ -2480,6 +2481,7 @@ var PORT_TIMEOUT_MS = 8e3;
|
|
|
2480
2481
|
function shouldSkipMenu(argv, flags, positional) {
|
|
2481
2482
|
if (flags["no-menu"] === true) return true;
|
|
2482
2483
|
if (flags["webui"] === true) return true;
|
|
2484
|
+
if (flags["webui-session-child"] === true) return true;
|
|
2483
2485
|
if (flags["simpleui"] === true) return true;
|
|
2484
2486
|
if (flags["hq"] === true) return true;
|
|
2485
2487
|
if (flags["desktop"] === true) return true;
|
|
@@ -2487,42 +2489,10 @@ function shouldSkipMenu(argv, flags, positional) {
|
|
|
2487
2489
|
if (flags["skip"] === true) return true;
|
|
2488
2490
|
if (typeof flags["prompt"] === "string") return true;
|
|
2489
2491
|
if (!isStdinTTY2()) return true;
|
|
2490
|
-
if (positional.length > 0)
|
|
2491
|
-
const first = positional[0];
|
|
2492
|
-
if (first && KNOWN_SUBCOMMANDS.has(first)) return true;
|
|
2493
|
-
}
|
|
2492
|
+
if (positional.length > 0) return true;
|
|
2494
2493
|
void argv;
|
|
2495
2494
|
return false;
|
|
2496
2495
|
}
|
|
2497
|
-
var KNOWN_SUBCOMMANDS = /* @__PURE__ */ new Set([
|
|
2498
|
-
"auth",
|
|
2499
|
-
"init",
|
|
2500
|
-
"mcp",
|
|
2501
|
-
"plugin",
|
|
2502
|
-
"doctor",
|
|
2503
|
-
"version",
|
|
2504
|
-
"help",
|
|
2505
|
-
"provider",
|
|
2506
|
-
"project",
|
|
2507
|
-
"governance",
|
|
2508
|
-
"session",
|
|
2509
|
-
"sessions",
|
|
2510
|
-
"replay",
|
|
2511
|
-
"export",
|
|
2512
|
-
"rewind",
|
|
2513
|
-
"config-history",
|
|
2514
|
-
"modeldiag",
|
|
2515
|
-
"models-add",
|
|
2516
|
-
"tools",
|
|
2517
|
-
"skill",
|
|
2518
|
-
"skills",
|
|
2519
|
-
"update",
|
|
2520
|
-
"quick",
|
|
2521
|
-
"audit",
|
|
2522
|
-
"bench",
|
|
2523
|
-
"mailbox-serve",
|
|
2524
|
-
"resume"
|
|
2525
|
-
]);
|
|
2526
2496
|
async function runLaunchMenu(deps) {
|
|
2527
2497
|
if (shouldSkipMenu(deps.argv, deps.flags, deps.positional)) {
|
|
2528
2498
|
return null;
|
|
@@ -2854,13 +2824,13 @@ function toPersistedMenuChoice(result) {
|
|
|
2854
2824
|
async function persistMenuChoice(globalConfigPath, choice) {
|
|
2855
2825
|
let fileExists = false;
|
|
2856
2826
|
try {
|
|
2857
|
-
await
|
|
2827
|
+
await fs7.access(globalConfigPath);
|
|
2858
2828
|
fileExists = true;
|
|
2859
2829
|
} catch {
|
|
2860
2830
|
}
|
|
2861
2831
|
let existing = {};
|
|
2862
2832
|
try {
|
|
2863
|
-
const raw = await
|
|
2833
|
+
const raw = await fs7.readFile(globalConfigPath, "utf8");
|
|
2864
2834
|
existing = JSON.parse(raw);
|
|
2865
2835
|
} catch (err) {
|
|
2866
2836
|
if (fileExists) {
|
|
@@ -2943,12 +2913,12 @@ import { createDefaultContainer as createDefaultContainer2 } from "@wrongstack/r
|
|
|
2943
2913
|
|
|
2944
2914
|
// src/cli-bundled-skills.ts
|
|
2945
2915
|
import { createRequire as createRequire3 } from "node:module";
|
|
2946
|
-
import * as
|
|
2916
|
+
import * as path7 from "node:path";
|
|
2947
2917
|
function resolveBundledSkillsDir2() {
|
|
2948
2918
|
try {
|
|
2949
2919
|
const req = createRequire3(import.meta.url);
|
|
2950
2920
|
const corePkg = req.resolve("@wrongstack/core/package.json");
|
|
2951
|
-
return
|
|
2921
|
+
return path7.join(path7.dirname(corePkg), "skills");
|
|
2952
2922
|
} catch {
|
|
2953
2923
|
return void 0;
|
|
2954
2924
|
}
|
|
@@ -2956,12 +2926,12 @@ function resolveBundledSkillsDir2() {
|
|
|
2956
2926
|
|
|
2957
2927
|
// src/cli-bundled-prompts.ts
|
|
2958
2928
|
import { createRequire as createRequire4 } from "node:module";
|
|
2959
|
-
import * as
|
|
2929
|
+
import * as path8 from "node:path";
|
|
2960
2930
|
function resolveBundledPromptsDir2() {
|
|
2961
2931
|
try {
|
|
2962
2932
|
const req = createRequire4(import.meta.url);
|
|
2963
2933
|
const corePkg = req.resolve("@wrongstack/core/package.json");
|
|
2964
|
-
return
|
|
2934
|
+
return path8.join(path8.dirname(corePkg), "data", "prompts");
|
|
2965
2935
|
} catch {
|
|
2966
2936
|
return void 0;
|
|
2967
2937
|
}
|
|
@@ -3027,6 +2997,7 @@ function bindReplayToContainer(opts) {
|
|
|
3027
2997
|
// src/cli-context.ts
|
|
3028
2998
|
import { setOAuthTokenPersister } from "@wrongstack/providers";
|
|
3029
2999
|
import { TOKENS as TOKENS4 } from "@wrongstack/core/kernel";
|
|
3000
|
+
import { writeErr as writeErr4 } from "@wrongstack/core/utils";
|
|
3030
3001
|
async function initializeCli(argv) {
|
|
3031
3002
|
applyNodeEnvDefault();
|
|
3032
3003
|
applySessionShellDefault();
|
|
@@ -3036,6 +3007,28 @@ async function initializeCli(argv) {
|
|
|
3036
3007
|
const desktopExit = await handleDesktopShortCircuit(earlyFlags, argv);
|
|
3037
3008
|
if (desktopExit !== null) return desktopExit;
|
|
3038
3009
|
const { flags: _earlyForMenu, positional: _positionalForMenu } = parseArgs(argv);
|
|
3010
|
+
let webuiSessionChild;
|
|
3011
|
+
if (_earlyForMenu["webui-session-child"] === true) {
|
|
3012
|
+
try {
|
|
3013
|
+
webuiSessionChild = parseWebuiSessionChildOptions(_earlyForMenu) ?? void 0;
|
|
3014
|
+
} catch (err) {
|
|
3015
|
+
const readyFile = typeof _earlyForMenu["ready-file"] === "string" ? _earlyForMenu["ready-file"] : void 0;
|
|
3016
|
+
if (readyFile) {
|
|
3017
|
+
await writeWebuiSessionChildError(readyFile, {
|
|
3018
|
+
runtimeId: typeof _earlyForMenu["runtime-id"] === "string" ? _earlyForMenu["runtime-id"] : void 0,
|
|
3019
|
+
parentShellId: typeof _earlyForMenu["parent-shell-id"] === "string" ? _earlyForMenu["parent-shell-id"] : void 0,
|
|
3020
|
+
phase: "validate_args",
|
|
3021
|
+
recoverable: false,
|
|
3022
|
+
error: err
|
|
3023
|
+
}).catch(() => void 0);
|
|
3024
|
+
}
|
|
3025
|
+
writeErr4(
|
|
3026
|
+
`WebUI session child argument error: ${err instanceof Error ? err.message : String(err)}
|
|
3027
|
+
`
|
|
3028
|
+
);
|
|
3029
|
+
return 2;
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
3039
3032
|
const launchMenuReader = new ReadlineInputReader();
|
|
3040
3033
|
let menuResult;
|
|
3041
3034
|
try {
|
|
@@ -3069,7 +3062,55 @@ async function initializeCli(argv) {
|
|
|
3069
3062
|
if (hqAfterMenu !== null) return hqAfterMenu;
|
|
3070
3063
|
}
|
|
3071
3064
|
}
|
|
3072
|
-
const
|
|
3065
|
+
const effectiveFlags = parseArgs(effectiveArgv).flags;
|
|
3066
|
+
try {
|
|
3067
|
+
webuiSessionChild = webuiSessionChild ?? parseWebuiSessionChildOptions(effectiveFlags) ?? void 0;
|
|
3068
|
+
} catch (err) {
|
|
3069
|
+
const readyFile = typeof effectiveFlags["ready-file"] === "string" ? effectiveFlags["ready-file"] : void 0;
|
|
3070
|
+
if (readyFile) {
|
|
3071
|
+
await writeWebuiSessionChildError(readyFile, {
|
|
3072
|
+
runtimeId: typeof effectiveFlags["runtime-id"] === "string" ? effectiveFlags["runtime-id"] : void 0,
|
|
3073
|
+
parentShellId: typeof effectiveFlags["parent-shell-id"] === "string" ? effectiveFlags["parent-shell-id"] : void 0,
|
|
3074
|
+
phase: "validate_args",
|
|
3075
|
+
recoverable: false,
|
|
3076
|
+
error: err
|
|
3077
|
+
}).catch(() => void 0);
|
|
3078
|
+
}
|
|
3079
|
+
writeErr4(`WebUI session child argument error: ${err instanceof Error ? err.message : String(err)}
|
|
3080
|
+
`);
|
|
3081
|
+
return 2;
|
|
3082
|
+
}
|
|
3083
|
+
if (webuiSessionChild) {
|
|
3084
|
+
try {
|
|
3085
|
+
process.chdir(webuiSessionChild.workingDir);
|
|
3086
|
+
if (webuiSessionChild.resume && webuiSessionChild.sessionId) {
|
|
3087
|
+
const currentResume = effectiveFlags["resume"];
|
|
3088
|
+
if (typeof currentResume === "string" && currentResume !== webuiSessionChild.sessionId) {
|
|
3089
|
+
throw new Error(
|
|
3090
|
+
`--resume ${currentResume} conflicts with --session-id ${webuiSessionChild.sessionId}`
|
|
3091
|
+
);
|
|
3092
|
+
}
|
|
3093
|
+
if (currentResume !== webuiSessionChild.sessionId) {
|
|
3094
|
+
effectiveArgv = [...effectiveArgv, "--resume", webuiSessionChild.sessionId];
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
} catch (err) {
|
|
3098
|
+
await writeWebuiSessionChildError(webuiSessionChild.readyFile, {
|
|
3099
|
+
protocolVersion: webuiSessionChild.protocolVersion,
|
|
3100
|
+
runtimeId: webuiSessionChild.runtimeId,
|
|
3101
|
+
parentShellId: webuiSessionChild.parentShellId,
|
|
3102
|
+
phase: "validate_args",
|
|
3103
|
+
recoverable: false,
|
|
3104
|
+
error: err
|
|
3105
|
+
}).catch(() => void 0);
|
|
3106
|
+
writeErr4(
|
|
3107
|
+
`WebUI session child argument error: ${err instanceof Error ? err.message : String(err)}
|
|
3108
|
+
`
|
|
3109
|
+
);
|
|
3110
|
+
return 2;
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
const hqExit = await handleHqShortCircuit(effectiveFlags);
|
|
3073
3114
|
if (hqExit !== null) return hqExit;
|
|
3074
3115
|
const ctx = await boot(effectiveArgv);
|
|
3075
3116
|
if (typeof ctx === "number") return ctx;
|
|
@@ -3141,7 +3182,8 @@ async function initializeCli(argv) {
|
|
|
3141
3182
|
updateInfo: refreshedUpdateInfo,
|
|
3142
3183
|
events,
|
|
3143
3184
|
container,
|
|
3144
|
-
configStore
|
|
3185
|
+
configStore,
|
|
3186
|
+
webuiSessionChild
|
|
3145
3187
|
};
|
|
3146
3188
|
}
|
|
3147
3189
|
|
|
@@ -3149,7 +3191,7 @@ async function initializeCli(argv) {
|
|
|
3149
3191
|
async function main(argv) {
|
|
3150
3192
|
const cliCtx = await initializeCli(argv);
|
|
3151
3193
|
if (typeof cliCtx === "number") return cliCtx;
|
|
3152
|
-
const { runInteractive } = await import("./cli-main-
|
|
3194
|
+
const { runInteractive } = await import("./cli-main-EOJ74CI4.js");
|
|
3153
3195
|
return runInteractive(cliCtx);
|
|
3154
3196
|
}
|
|
3155
3197
|
|
|
@@ -81,6 +81,11 @@ export interface LiveSettingsInput {
|
|
|
81
81
|
* file content. Persisted as `autonomy.readAdvancedMode`.
|
|
82
82
|
*/
|
|
83
83
|
readSymbols?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Register the leader's agent-callable `nextsteps` tool. Persisted to
|
|
86
|
+
* `tools.nextsteps.enabled`; read at boot, so it applies next session.
|
|
87
|
+
*/
|
|
88
|
+
nextStepsTool?: boolean | undefined;
|
|
84
89
|
/** Minimum relation strength for SAGE memory injection. Default: 0.85. */
|
|
85
90
|
sageMemoryInjectThreshold?: number | undefined;
|
|
86
91
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
restoreFlags
|
|
3
|
+
} from "./chunk-CSAPOCBP.js";
|
|
1
4
|
import {
|
|
2
5
|
activeProfileConfigPath
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YMXXOOFN.js";
|
|
4
7
|
import "./chunk-7OCVIDC7.js";
|
|
5
8
|
|
|
6
9
|
// src/subcommands/handlers/mcp.ts
|
|
@@ -301,6 +304,7 @@ async function serveMcpStdio(deps) {
|
|
|
301
304
|
// src/subcommands/handlers/mcp.ts
|
|
302
305
|
var BUILT_IN_MCP = allServers();
|
|
303
306
|
var mcpCmd = async (args, deps) => {
|
|
307
|
+
args = restoreFlags(args, deps, ["enable", "e", "transport", "url", "command"]);
|
|
304
308
|
const sub = args[0];
|
|
305
309
|
if (sub === "serve") {
|
|
306
310
|
return serveMcpStdio(deps);
|
|
@@ -410,4 +414,4 @@ function isRecord(value) {
|
|
|
410
414
|
export {
|
|
411
415
|
mcpCmd
|
|
412
416
|
};
|
|
413
|
-
//# sourceMappingURL=mcp-
|
|
417
|
+
//# sourceMappingURL=mcp-OHPJH73U.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-PJHET45A.js";
|
|
9
9
|
import {
|
|
10
10
|
activeProfileConfigPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-YMXXOOFN.js";
|
|
12
12
|
import "./chunk-7OCVIDC7.js";
|
|
13
13
|
|
|
14
14
|
// src/subcommands/handlers/modeldiag.ts
|
|
@@ -1287,4 +1287,4 @@ ${color2.dim('Enter numbers or provider IDs (comma-separated, or "all"):')}
|
|
|
1287
1287
|
export {
|
|
1288
1288
|
modeldiagCmd
|
|
1289
1289
|
};
|
|
1290
|
-
//# sourceMappingURL=modeldiag-
|
|
1290
|
+
//# sourceMappingURL=modeldiag-3DOK4BWW.js.map
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runPluginManagementCommand
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GUHQQG63.js";
|
|
4
|
+
import {
|
|
5
|
+
restoreFlags
|
|
6
|
+
} from "./chunk-CSAPOCBP.js";
|
|
4
7
|
import {
|
|
5
8
|
activeProfileConfigPath
|
|
6
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YMXXOOFN.js";
|
|
7
10
|
import "./chunk-7OCVIDC7.js";
|
|
8
11
|
|
|
9
12
|
// src/subcommands/handlers/plugin-usage.ts
|
|
10
13
|
var pluginCmd = async (args, deps) => {
|
|
14
|
+
args = restoreFlags(args, deps, ["disabled", "enable", "e", "json", "all"]);
|
|
11
15
|
const result = await runPluginManagementCommand(args, {
|
|
12
16
|
config: deps.config,
|
|
13
17
|
configPath: activeProfileConfigPath(deps.paths, deps.config)
|
|
@@ -37,4 +41,4 @@ export {
|
|
|
37
41
|
pluginCmd,
|
|
38
42
|
usageCmd
|
|
39
43
|
};
|
|
40
|
-
//# sourceMappingURL=plugin-usage-
|
|
44
|
+
//# sourceMappingURL=plugin-usage-YEVLOR33.js.map
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
pluginNameFromSpec,
|
|
8
8
|
setupPlugins,
|
|
9
9
|
warnIfDeprecatedPluginName
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-ZECLGUTF.js";
|
|
11
|
+
import "./chunk-GUHQQG63.js";
|
|
12
12
|
import "./chunk-TYO2OVAD.js";
|
|
13
13
|
import "./chunk-7OCVIDC7.js";
|
|
14
14
|
export {
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
setupPlugins,
|
|
22
22
|
warnIfDeprecatedPluginName
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=plugins-
|
|
24
|
+
//# sourceMappingURL=plugins-K3BAUP4D.js.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { Config } from '@wrongstack/core/types';
|
|
2
2
|
import type { WstackPaths } from '@wrongstack/core/utils';
|
|
3
|
-
/** Resolve the selected profile without ever treating the root bootstrap as settings. */
|
|
4
|
-
export declare function activeProfileName(config: Pick<Config, 'activeProfile'>): string;
|
|
5
3
|
/** Canonical settings file for the currently selected profile. */
|
|
6
4
|
export declare function activeProfileConfigPath(paths: Pick<WstackPaths, 'profileConfig'>, config: Pick<Config, 'activeProfile'>): string;
|
|
7
5
|
//# sourceMappingURL=profile-config-path.d.ts.map
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared provider-config helpers used by the picker, main boot sequence,
|
|
3
|
-
* and subcommands. Keeps provider key detection and alias resolution in
|
|
4
|
-
* one place so the logic doesn't drift between call sites.
|
|
5
|
-
*/
|
|
6
1
|
import type { Config, ModelsRegistry, ProviderConfig, ResolvedProvider } from '@wrongstack/core/types';
|
|
7
2
|
/** Return the provider's visible model ids: models.dev plus anything the saved
|
|
8
3
|
* config names that the catalog does not carry.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
visibleModelIds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ETOEGL3V.js";
|
|
4
4
|
import {
|
|
5
5
|
mutateConfigProviders
|
|
6
6
|
} from "./chunk-PJHET45A.js";
|
|
7
7
|
import {
|
|
8
8
|
activeProfileConfigPath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YMXXOOFN.js";
|
|
10
10
|
import "./chunk-7OCVIDC7.js";
|
|
11
11
|
|
|
12
12
|
// src/subcommands/handlers/providers-models.ts
|
|
@@ -15,8 +15,9 @@ import { atomicWrite, color, expectDefined } from "@wrongstack/core/utils";
|
|
|
15
15
|
import { decryptConfigSecrets, encryptConfigSecrets } from "@wrongstack/core/security";
|
|
16
16
|
import { ConfigError } from "@wrongstack/core/types";
|
|
17
17
|
var providersCmd = async (args, deps) => {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const providerFlags = subcommandFlags(args, deps);
|
|
19
|
+
const showAll = providerFlags["all"] === true || providerFlags["all"] === "true";
|
|
20
|
+
const showUnsupported = providerFlags["unsupported"] === true || providerFlags["unsupported"] === "true";
|
|
20
21
|
try {
|
|
21
22
|
const all = await deps.modelsRegistry.listProviders();
|
|
22
23
|
const byFamily = {
|
|
@@ -611,4 +612,4 @@ export {
|
|
|
611
612
|
modelsCmd,
|
|
612
613
|
providersCmd
|
|
613
614
|
};
|
|
614
|
-
//# sourceMappingURL=providers-models-
|
|
615
|
+
//# sourceMappingURL=providers-models-WEZ4EGLL.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
restoreFlags
|
|
3
|
+
} from "./chunk-CSAPOCBP.js";
|
|
1
4
|
import "./chunk-7OCVIDC7.js";
|
|
2
5
|
|
|
3
6
|
// src/subcommands/handlers/replay.ts
|
|
4
7
|
import { color, resolveWstackPaths } from "@wrongstack/core/utils";
|
|
5
8
|
import { ReplayLogStore } from "@wrongstack/core/storage";
|
|
6
9
|
var replayCmd = async (args, deps) => {
|
|
10
|
+
args = restoreFlags(args, deps, ["list", "l"]);
|
|
7
11
|
const wpaths = resolveWstackPaths({
|
|
8
12
|
projectRoot: deps.projectRoot,
|
|
9
13
|
userHome: deps.userHome
|
|
@@ -72,4 +76,4 @@ Run a session with --record first, then --replay to re-execute it.`
|
|
|
72
76
|
export {
|
|
73
77
|
replayCmd
|
|
74
78
|
};
|
|
75
|
-
//# sourceMappingURL=replay-
|
|
79
|
+
//# sourceMappingURL=replay-FCBNHW3K.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
restoreFlags
|
|
3
|
+
} from "./chunk-CSAPOCBP.js";
|
|
1
4
|
import "./chunk-7OCVIDC7.js";
|
|
2
5
|
|
|
3
6
|
// src/subcommands/handlers/rewind.ts
|
|
@@ -32,6 +35,7 @@ function findSessionId(args) {
|
|
|
32
35
|
return void 0;
|
|
33
36
|
}
|
|
34
37
|
var rewindCmd = async (args, deps) => {
|
|
38
|
+
args = restoreFlags(args, deps, ["all", "last", "to", "list", "resume"]);
|
|
35
39
|
const flags = parseRewindFlags(args);
|
|
36
40
|
const wpaths = resolveWstackPaths({ projectRoot: deps.projectRoot });
|
|
37
41
|
const sessionsDir = wpaths.projectSessions;
|
|
@@ -182,4 +186,4 @@ ${result.errors.length} error(s):
|
|
|
182
186
|
export {
|
|
183
187
|
rewindCmd
|
|
184
188
|
};
|
|
185
|
-
//# sourceMappingURL=rewind-
|
|
189
|
+
//# sourceMappingURL=rewind-AOD3JIYX.js.map
|