@wrongstack/cli 1.0.16 → 1.0.19
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-IJ55NBMJ.js → acp-INCNOH42.js} +3 -2
- package/dist/boot/tool-registry.d.ts +3 -1
- package/dist/{chunk-U3PDQOYU.js → chunk-2CZEORLV.js} +4 -4
- package/dist/{chunk-DUF5FEWD.js → chunk-2ENZU66X.js} +2 -2
- package/dist/{chunk-TE3Q32JP.js → chunk-CJTBLTS4.js} +5 -1
- package/dist/{chunk-MZY6UDWC.js → chunk-KK2LB3ZS.js} +72 -26
- package/dist/{cli-context-6MTVFJPO.js → cli-context-33F74CSZ.js} +5 -5
- package/dist/{cli-main-42SM33EG.js → cli-main-FNGMKPBA.js} +44 -25
- package/dist/{execution-6KIOQUAG.js → execution-A6WJLSOC.js} +5 -5
- package/dist/{hq-O5BOP6UY.js → hq-XQWQTRDA.js} +2 -2
- package/dist/hq-server/project-root.d.ts +35 -1
- package/dist/{hq-server-YW4MJCKH.js → hq-server-IIBZQZU4.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{mailbox-serve-X3CR6VFW.js → mailbox-serve-3GFOK2I7.js} +3 -2
- package/dist/{short-circuit-flags-T6EFG3W6.js → short-circuit-flags-7GQIGMVD.js} +2 -2
- package/dist/{subcommands-3ILCNR2T.js → subcommands-XSLXMIDP.js} +2 -2
- package/dist/{webui-server-FRVJWLZA.js → webui-server-MRPGTTKL.js} +14 -7
- package/package.json +28 -28
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
} from "./chunk-JY52HWL6.js";
|
|
11
11
|
import {
|
|
12
12
|
startCliHqConnection
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-CJTBLTS4.js";
|
|
14
|
+
import "./chunk-XJXDOF63.js";
|
|
14
15
|
import "./chunk-SIGUWXAA.js";
|
|
15
16
|
import "./chunk-DAKVBMD4.js";
|
|
16
17
|
import "./chunk-DR2OXU46.js";
|
|
@@ -1167,4 +1168,4 @@ ${renderAcpBenchText(result)}
|
|
|
1167
1168
|
export {
|
|
1168
1169
|
acpCmd
|
|
1169
1170
|
};
|
|
1170
|
-
//# sourceMappingURL=acp-
|
|
1171
|
+
//# sourceMappingURL=acp-INCNOH42.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** CLI boot adapter for canonical runtime tool registration and host policies. */
|
|
2
2
|
import type { EventBus } from '@wrongstack/core/kernel';
|
|
3
3
|
import type { ToolRegistry } from '@wrongstack/core/registry';
|
|
4
|
-
import type { AutoThinConfig, ConcreteTokenSavingTier, DisabledToolMeta, MemoryPort, TokenSavingTier, ToolDescriptionModeConfig, ToolResultRenderModeConfig } from '@wrongstack/core/types';
|
|
4
|
+
import type { AutoThinConfig, ConcreteTokenSavingTier, DisabledToolMeta, MemoryPort, SkillLoader, TokenSavingTier, ToolDescriptionModeConfig, ToolResultRenderModeConfig } from '@wrongstack/core/types';
|
|
5
5
|
import type { WstackPaths } from '@wrongstack/core/utils';
|
|
6
6
|
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
7
7
|
interface RegisterBuiltinToolsDeps {
|
|
@@ -61,6 +61,8 @@ interface RegisterBuiltinToolsDeps {
|
|
|
61
61
|
* Omit (or pass `undefined`) to keep the CLI on the SAGE-only surface.
|
|
62
62
|
*/
|
|
63
63
|
vectorMemoryStore?: VectorMemoryStore | undefined;
|
|
64
|
+
/** Registers the `skill` tool the progressive skill manifest points at. Omit when skills are off. */
|
|
65
|
+
skillLoader?: SkillLoader | undefined;
|
|
64
66
|
events: EventBus;
|
|
65
67
|
wpaths: Pick<WstackPaths, 'projectDir'>;
|
|
66
68
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
// src/subcommands/index.ts
|
|
3
3
|
var loaders = {
|
|
4
|
-
acp: async () => (await import("./acp-
|
|
4
|
+
acp: async () => (await import("./acp-INCNOH42.js")).acpCmd,
|
|
5
5
|
init: async () => (await import("./init-DRMMFG2G.js")).initCmd,
|
|
6
6
|
auth: async () => (await import("./auth-YXK3EDUL.js")).authCmd,
|
|
7
7
|
update: async () => (await import("./update-5DPB4YD4.js")).updateCmd,
|
|
@@ -31,8 +31,8 @@ var loaders = {
|
|
|
31
31
|
quick: async () => (await import("./quick-CNB4Z3HS.js")).quickCmd,
|
|
32
32
|
bench: async () => (await import("./bench-YBU6BVQP.js")).benchCmd,
|
|
33
33
|
chronicle: async () => (await import("./chronicle-UTFETHP6.js")).chronicleCmd,
|
|
34
|
-
hq: async () => (await import("./hq-
|
|
35
|
-
mailbox: async () => (await import("./mailbox-serve-
|
|
34
|
+
hq: async () => (await import("./hq-XQWQTRDA.js")).hqCmd,
|
|
35
|
+
mailbox: async () => (await import("./mailbox-serve-3GFOK2I7.js")).mailboxServeCmd,
|
|
36
36
|
permissions: async () => (await import("./permissions-CFDLXETM.js")).permissionsCmd,
|
|
37
37
|
project: async () => (await import("./project-AOQI5XTK.js")).projectCmd,
|
|
38
38
|
governance: async () => (await import("./governance-RYSHV675.js")).governanceCmd
|
|
@@ -51,4 +51,4 @@ export {
|
|
|
51
51
|
subcommands,
|
|
52
52
|
subcommandNames
|
|
53
53
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
54
|
+
//# sourceMappingURL=chunk-2CZEORLV.js.map
|
|
@@ -22,7 +22,7 @@ async function handleHelpVersionShortCircuit(argv) {
|
|
|
22
22
|
}
|
|
23
23
|
if (earlyFlags["help"] === true) {
|
|
24
24
|
if (positional.length > 0) {
|
|
25
|
-
const { subcommandNames } = await import("./subcommands-
|
|
25
|
+
const { subcommandNames } = await import("./subcommands-XSLXMIDP.js");
|
|
26
26
|
if (subcommandNames.includes(positional[0])) {
|
|
27
27
|
const first = positional[0];
|
|
28
28
|
const deep = positional[1];
|
|
@@ -43,4 +43,4 @@ async function handleHelpVersionShortCircuit(argv) {
|
|
|
43
43
|
export {
|
|
44
44
|
handleHelpVersionShortCircuit
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-2ENZU66X.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLI_VERSION
|
|
3
|
+
} from "./chunk-XJXDOF63.js";
|
|
1
4
|
|
|
2
5
|
// src/hq-publisher.ts
|
|
3
6
|
import { createHqPublisherFromEnv, resolveHqConfig } from "@wrongstack/core/hq";
|
|
@@ -429,6 +432,7 @@ function nodeWsSocketFactory(url) {
|
|
|
429
432
|
}
|
|
430
433
|
function createCliHqPublisher(options) {
|
|
431
434
|
return createHqPublisherFromEnv({
|
|
435
|
+
clientVersion: options.clientVersion ?? options.version ?? CLI_VERSION,
|
|
432
436
|
...options,
|
|
433
437
|
socketFactory: options.socketFactory ?? nodeWsSocketFactory
|
|
434
438
|
});
|
|
@@ -513,4 +517,4 @@ function startCliHqConnection(options) {
|
|
|
513
517
|
export {
|
|
514
518
|
startCliHqConnection
|
|
515
519
|
};
|
|
516
|
-
//# sourceMappingURL=chunk-
|
|
520
|
+
//# sourceMappingURL=chunk-CJTBLTS4.js.map
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
import { randomUUID as randomUUID6 } from "node:crypto";
|
|
34
34
|
import * as fs4 from "node:fs/promises";
|
|
35
35
|
import * as http from "node:http";
|
|
36
|
-
import * as
|
|
36
|
+
import * as path8 from "node:path";
|
|
37
37
|
import { getSharedProjectMailbox } from "@wrongstack/core/coordination";
|
|
38
38
|
import {
|
|
39
39
|
assessHqExposure as assessHqExposure2,
|
|
@@ -635,7 +635,7 @@ import {
|
|
|
635
635
|
MailboxEventEmitter,
|
|
636
636
|
MailboxHttpRateLimiter
|
|
637
637
|
} from "@wrongstack/core/coordination";
|
|
638
|
-
import * as
|
|
638
|
+
import * as path6 from "node:path";
|
|
639
639
|
|
|
640
640
|
// src/hq-static-serve.ts
|
|
641
641
|
import * as fs2 from "node:fs";
|
|
@@ -1768,9 +1768,11 @@ function buildSnapshot(clients, options) {
|
|
|
1768
1768
|
project.governance = governance;
|
|
1769
1769
|
}
|
|
1770
1770
|
for (const tracked of client.sessions.values()) {
|
|
1771
|
+
const clientVersion = tracked.payload.clientVersion ?? client.version;
|
|
1771
1772
|
sessionById.set(tracked.payload.sessionId, {
|
|
1772
1773
|
...tracked.payload,
|
|
1773
|
-
clientId: client.clientId
|
|
1774
|
+
clientId: client.clientId,
|
|
1775
|
+
...clientVersion !== void 0 ? { clientVersion } : {}
|
|
1774
1776
|
});
|
|
1775
1777
|
}
|
|
1776
1778
|
for (const snapshot of client.mailboxes.values()) {
|
|
@@ -1911,12 +1913,14 @@ function buildSnapshot(clients, options) {
|
|
|
1911
1913
|
if (typeof agent.costUsd === "number") sessionCost += agent.costUsd;
|
|
1912
1914
|
}
|
|
1913
1915
|
const provider = s.agents.find((a) => a.model !== void 0)?.model;
|
|
1916
|
+
const clientVersion = s.clientVersion ?? (s.clientId ? clientRecordById.get(s.clientId)?.version : void 0);
|
|
1914
1917
|
return {
|
|
1915
1918
|
sessionId: s.sessionId,
|
|
1916
1919
|
projectId: s.projectId,
|
|
1917
1920
|
clientId: s.clientId ?? `${s.machineId}:${s.clientKind}`,
|
|
1918
1921
|
status: s.status === "active" ? "running" : "idle",
|
|
1919
1922
|
...provider !== void 0 ? { model: provider } : {},
|
|
1923
|
+
...clientVersion !== void 0 ? { clientVersion } : {},
|
|
1920
1924
|
startedAt: s.startedAt,
|
|
1921
1925
|
lastActivityAt: s.lastActivityAt,
|
|
1922
1926
|
...sessionCost > 0 ? { costUsd: sessionCost } : {}
|
|
@@ -2161,11 +2165,24 @@ async function authorizeHqCommand(input) {
|
|
|
2161
2165
|
}
|
|
2162
2166
|
|
|
2163
2167
|
// src/hq-server/routes/mailbox-handlers.ts
|
|
2164
|
-
import * as
|
|
2168
|
+
import * as path4 from "node:path";
|
|
2165
2169
|
import { resolveProjectDir } from "@wrongstack/core/coordination";
|
|
2166
2170
|
|
|
2167
2171
|
// src/hq-server/project-root.ts
|
|
2172
|
+
import * as fsp from "node:fs/promises";
|
|
2173
|
+
import * as path3 from "node:path";
|
|
2168
2174
|
import { deriveHqProjectId } from "@wrongstack/core/hq";
|
|
2175
|
+
function isPlainSegment(value) {
|
|
2176
|
+
return value.length > 0 && value !== "." && value !== ".." && !value.includes("/") && !value.includes("\\") && !path3.isAbsolute(value);
|
|
2177
|
+
}
|
|
2178
|
+
async function projectDirectoryExists(globalRoot, projectId) {
|
|
2179
|
+
if (!isPlainSegment(projectId)) return false;
|
|
2180
|
+
try {
|
|
2181
|
+
return (await fsp.stat(path3.join(globalRoot, "projects", projectId))).isDirectory();
|
|
2182
|
+
} catch {
|
|
2183
|
+
return false;
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2169
2186
|
function resolveHqProjectRoot(globalRoot, ids) {
|
|
2170
2187
|
const fn = async () => {
|
|
2171
2188
|
const { getSessionRegistry } = await import("@wrongstack/core/storage");
|
|
@@ -2173,7 +2190,7 @@ function resolveHqProjectRoot(globalRoot, ids) {
|
|
|
2173
2190
|
const registry = getSessionRegistry(globalRoot);
|
|
2174
2191
|
if (typeof ids.sessionId === "string") {
|
|
2175
2192
|
const entry = await registry.get(ids.sessionId).catch(() => null);
|
|
2176
|
-
if (entry?.projectRoot) return entry.projectRoot;
|
|
2193
|
+
if (entry?.projectRoot) return { status: "found", projectRoot: entry.projectRoot };
|
|
2177
2194
|
}
|
|
2178
2195
|
if (typeof ids.projectId === "string") {
|
|
2179
2196
|
const { createHash: createHash2 } = await import("node:crypto");
|
|
@@ -2189,11 +2206,15 @@ function resolveHqProjectRoot(globalRoot, ids) {
|
|
|
2189
2206
|
const match = all.find(
|
|
2190
2207
|
(e) => e.projectSlug === ids.projectId || projectIdForRoot(e.projectRoot) === ids.projectId || createHash2("sha256").update(e.projectRoot).digest("hex").slice(0, 12) === ids.projectId
|
|
2191
2208
|
);
|
|
2192
|
-
if (match) return match.projectRoot;
|
|
2209
|
+
if (match) return { status: "found", projectRoot: match.projectRoot };
|
|
2210
|
+
if (await projectDirectoryExists(globalRoot, ids.projectId)) {
|
|
2211
|
+
return { status: "unavailable" };
|
|
2212
|
+
}
|
|
2193
2213
|
}
|
|
2194
2214
|
} catch {
|
|
2215
|
+
return { status: "unavailable" };
|
|
2195
2216
|
}
|
|
2196
|
-
return
|
|
2217
|
+
return { status: "unknown" };
|
|
2197
2218
|
};
|
|
2198
2219
|
return fn();
|
|
2199
2220
|
}
|
|
@@ -2217,7 +2238,7 @@ async function handleMailboxGateway(_req, res, match, authorizeMailboxGateway, g
|
|
|
2217
2238
|
);
|
|
2218
2239
|
return;
|
|
2219
2240
|
}
|
|
2220
|
-
const gatewayGlobalRoot =
|
|
2241
|
+
const gatewayGlobalRoot = path4.dirname(dataDir);
|
|
2221
2242
|
const preliminaryAccess = authorizeMailboxGateway(_req, `project:${projectId}`);
|
|
2222
2243
|
if (!preliminaryAccess.allowed) {
|
|
2223
2244
|
res.writeHead(preliminaryAccess.status ?? 401, {
|
|
@@ -2227,14 +2248,27 @@ async function handleMailboxGateway(_req, res, match, authorizeMailboxGateway, g
|
|
|
2227
2248
|
res.end(JSON.stringify(preliminaryAccess.body));
|
|
2228
2249
|
return;
|
|
2229
2250
|
}
|
|
2230
|
-
const
|
|
2231
|
-
if (
|
|
2251
|
+
const resolution = await resolveHqProjectRoot(gatewayGlobalRoot, { projectId });
|
|
2252
|
+
if (resolution.status === "unavailable") {
|
|
2253
|
+
res.writeHead(503, { "Content-Type": "application/json", "Retry-After": "1" });
|
|
2254
|
+
res.end(
|
|
2255
|
+
JSON.stringify({
|
|
2256
|
+
error: {
|
|
2257
|
+
code: "UNAVAILABLE",
|
|
2258
|
+
message: `Project ${projectId} is not reachable right now; retry shortly.`
|
|
2259
|
+
}
|
|
2260
|
+
})
|
|
2261
|
+
);
|
|
2262
|
+
return;
|
|
2263
|
+
}
|
|
2264
|
+
if (resolution.status !== "found") {
|
|
2232
2265
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
2233
2266
|
res.end(
|
|
2234
2267
|
JSON.stringify({ error: { code: "NOT_FOUND", message: `Unknown project: ${projectId}` } })
|
|
2235
2268
|
);
|
|
2236
2269
|
return;
|
|
2237
2270
|
}
|
|
2271
|
+
const projectRoot = resolution.projectRoot;
|
|
2238
2272
|
const suffix = match[2];
|
|
2239
2273
|
const rawUrl = _req.url ?? "";
|
|
2240
2274
|
const queryIndex = rawUrl.indexOf("?");
|
|
@@ -2283,16 +2317,22 @@ async function handleApiMailboxSend(_req, res, mutableAuth, sessions, dataDir, g
|
|
|
2283
2317
|
res.end(JSON.stringify({ error: "audience must be all or leaders" }));
|
|
2284
2318
|
return;
|
|
2285
2319
|
}
|
|
2286
|
-
const mbGlobalRoot =
|
|
2287
|
-
const
|
|
2320
|
+
const mbGlobalRoot = path4.dirname(dataDir);
|
|
2321
|
+
const mbResolution = await resolveHqProjectRoot(mbGlobalRoot, {
|
|
2288
2322
|
sessionId: mbody.sessionId,
|
|
2289
2323
|
projectId: mbody.projectId
|
|
2290
2324
|
});
|
|
2291
|
-
if (
|
|
2325
|
+
if (mbResolution.status === "unavailable") {
|
|
2326
|
+
res.writeHead(503, { "Content-Type": "application/json", "Retry-After": "1" });
|
|
2327
|
+
res.end(JSON.stringify({ error: "target project mailbox is not reachable right now" }));
|
|
2328
|
+
return;
|
|
2329
|
+
}
|
|
2330
|
+
if (mbResolution.status !== "found" || mbResolution.projectRoot.length === 0) {
|
|
2292
2331
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
2293
2332
|
res.end(JSON.stringify({ error: "could not resolve target project mailbox" }));
|
|
2294
2333
|
return;
|
|
2295
2334
|
}
|
|
2335
|
+
const projectRoot = mbResolution.projectRoot;
|
|
2296
2336
|
const to = typeof mbody.to === "string" ? mbody.to : "leader";
|
|
2297
2337
|
const subject = typeof mbody.subject === "string" ? mbody.subject : "HQ prompt";
|
|
2298
2338
|
const priority = mbody.priority === "high" ? "high" : mbody.priority === "low" ? "low" : "normal";
|
|
@@ -2403,16 +2443,22 @@ async function handleMailboxAction(_req, res, match, mutableAuth, sessions, data
|
|
|
2403
2443
|
res.end(JSON.stringify({ error: "missing sessionId or projectId" }));
|
|
2404
2444
|
return;
|
|
2405
2445
|
}
|
|
2406
|
-
const actGlobalRoot =
|
|
2407
|
-
const
|
|
2446
|
+
const actGlobalRoot = path4.dirname(dataDir);
|
|
2447
|
+
const actResolution = await resolveHqProjectRoot(actGlobalRoot, {
|
|
2408
2448
|
sessionId: abody.sessionId,
|
|
2409
2449
|
projectId: abody.projectId
|
|
2410
2450
|
});
|
|
2411
|
-
if (
|
|
2451
|
+
if (actResolution.status === "unavailable") {
|
|
2452
|
+
res.writeHead(503, { "Content-Type": "application/json", "Retry-After": "1" });
|
|
2453
|
+
res.end(JSON.stringify({ error: "target project mailbox is not reachable right now" }));
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2456
|
+
if (actResolution.status !== "found" || actResolution.projectRoot.length === 0) {
|
|
2412
2457
|
res.writeHead(404, { "Content-Type": "application/json" });
|
|
2413
2458
|
res.end(JSON.stringify({ error: "could not resolve target project mailbox" }));
|
|
2414
2459
|
return;
|
|
2415
2460
|
}
|
|
2461
|
+
const projectRoot = actResolution.projectRoot;
|
|
2416
2462
|
try {
|
|
2417
2463
|
const { actionToAckInput } = await import("@wrongstack/core/coordination");
|
|
2418
2464
|
const projectDir = resolveProjectDir(projectRoot, actGlobalRoot);
|
|
@@ -2643,14 +2689,14 @@ async function handleApiTrendsCost(req, res, persistence) {
|
|
|
2643
2689
|
}
|
|
2644
2690
|
|
|
2645
2691
|
// src/hq-server/routes/session-handlers.ts
|
|
2646
|
-
import * as
|
|
2692
|
+
import * as path5 from "node:path";
|
|
2647
2693
|
import {
|
|
2648
2694
|
buildTranscriptFromEvents,
|
|
2649
2695
|
resolveHqDataDir
|
|
2650
2696
|
} from "@wrongstack/core/hq";
|
|
2651
2697
|
async function handleApiSessions(res) {
|
|
2652
2698
|
const { getSessionRegistry } = await import("@wrongstack/core/storage");
|
|
2653
|
-
const globalRoot =
|
|
2699
|
+
const globalRoot = path5.dirname(resolveHqDataDir());
|
|
2654
2700
|
try {
|
|
2655
2701
|
const registry = getSessionRegistry(globalRoot);
|
|
2656
2702
|
const sessions = await registry.list();
|
|
@@ -2695,7 +2741,7 @@ async function handleApiSessionEvents(req, res, match, transcripts) {
|
|
|
2695
2741
|
res.end(JSON.stringify({ error: "invalid sessionId encoding" }));
|
|
2696
2742
|
return;
|
|
2697
2743
|
}
|
|
2698
|
-
const globalRoot =
|
|
2744
|
+
const globalRoot = path5.dirname(resolveHqDataDir());
|
|
2699
2745
|
try {
|
|
2700
2746
|
const registry = getSessionRegistry(globalRoot);
|
|
2701
2747
|
const entry = await registry.get(sessionId).catch(() => null);
|
|
@@ -3426,7 +3472,7 @@ var MailboxGatewayManager = class {
|
|
|
3426
3472
|
const lastUsed = this.mailboxGatewayLastUsed.get(projectDir);
|
|
3427
3473
|
gateways.push({
|
|
3428
3474
|
// projectId = basename(projectDir) — matches the credential contract.
|
|
3429
|
-
projectId:
|
|
3475
|
+
projectId: path6.basename(projectDir),
|
|
3430
3476
|
projectRoot: projectDir,
|
|
3431
3477
|
hasActiveStreams: gateway.router.hasActiveStreams(),
|
|
3432
3478
|
lastUsedAt: typeof lastUsed === "number" ? lastUsed : null,
|
|
@@ -3516,7 +3562,7 @@ async function prepareHqServerStart(options, defaults) {
|
|
|
3516
3562
|
|
|
3517
3563
|
// src/hq-server/startup.ts
|
|
3518
3564
|
import * as fs3 from "node:fs/promises";
|
|
3519
|
-
import * as
|
|
3565
|
+
import * as path7 from "node:path";
|
|
3520
3566
|
import { writeHqRuntimeFile } from "@wrongstack/core/hq";
|
|
3521
3567
|
var hqRuntimeMarkerPath2 = hqRuntimeMarkerPath;
|
|
3522
3568
|
async function writeHqRuntimeMarker(dataDir, url) {
|
|
@@ -3597,7 +3643,7 @@ HQ auth loaded from ${startup.dataDir}
|
|
|
3597
3643
|
if (startup.clientEnv.WRONGSTACK_HQ_TOKEN) {
|
|
3598
3644
|
write(` WRONGSTACK_HQ_TOKEN=${startup.clientEnv.WRONGSTACK_HQ_TOKEN}
|
|
3599
3645
|
`);
|
|
3600
|
-
write(`Credentials are stored in ${
|
|
3646
|
+
write(`Credentials are stored in ${path7.join(startup.dataDir, "auth.json")}
|
|
3601
3647
|
`);
|
|
3602
3648
|
}
|
|
3603
3649
|
writeHqLanEndpoints(write, handle, void 0);
|
|
@@ -4727,12 +4773,12 @@ async function startHqServerWithAuth(options, host, port, dataDir, firstRunAuth)
|
|
|
4727
4773
|
const persistence = createHqPersistence(dataDir);
|
|
4728
4774
|
const auditLog = new HqCommandAuditLog(1e3, (entry) => persistence.commandLog.append(entry));
|
|
4729
4775
|
void (async () => {
|
|
4730
|
-
const projectsDir =
|
|
4776
|
+
const projectsDir = path8.join(path8.dirname(dataDir), "projects");
|
|
4731
4777
|
const entries = await fs4.readdir(projectsDir, { withFileTypes: true }).catch(() => []);
|
|
4732
4778
|
await Promise.all(
|
|
4733
4779
|
entries.filter((entry) => entry.isDirectory()).map(async (entry) => {
|
|
4734
|
-
const projectDir =
|
|
4735
|
-
const metadataPath =
|
|
4780
|
+
const projectDir = path8.join(projectsDir, entry.name);
|
|
4781
|
+
const metadataPath = path8.join(projectDir, ".mailbox-server.json");
|
|
4736
4782
|
const ownerPid = await fs4.readFile(metadataPath, "utf8").then((raw) => JSON.parse(raw).pid).catch(() => void 0);
|
|
4737
4783
|
if (ownerPid === void 0) return;
|
|
4738
4784
|
let ownerAlive = false;
|
|
@@ -5100,4 +5146,4 @@ export {
|
|
|
5100
5146
|
startHqServer,
|
|
5101
5147
|
HqInsecureExposureError2 as HqInsecureExposureError
|
|
5102
5148
|
};
|
|
5103
|
-
//# sourceMappingURL=chunk-
|
|
5149
|
+
//# sourceMappingURL=chunk-KK2LB3ZS.js.map
|
|
@@ -19,17 +19,17 @@ import {
|
|
|
19
19
|
} from "./chunk-GPPRNAKW.js";
|
|
20
20
|
import {
|
|
21
21
|
subcommands
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2CZEORLV.js";
|
|
23
23
|
import {
|
|
24
24
|
renderDeepHelp,
|
|
25
25
|
renderFocusedHelp
|
|
26
26
|
} from "./chunk-JX6KL7OF.js";
|
|
27
27
|
import {
|
|
28
28
|
handleHelpVersionShortCircuit
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2ENZU66X.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_PORT
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KK2LB3ZS.js";
|
|
33
33
|
import "./chunk-HXJYHAR4.js";
|
|
34
34
|
import {
|
|
35
35
|
resolveHqPasswordInput
|
|
@@ -866,7 +866,7 @@ async function isPortInUse(host, port) {
|
|
|
866
866
|
}
|
|
867
867
|
async function handleHqShortCircuit(flags) {
|
|
868
868
|
if (flags["hq"] !== true) return null;
|
|
869
|
-
const { startHqServer } = await import("./hq-server-
|
|
869
|
+
const { startHqServer } = await import("./hq-server-IIBZQZU4.js");
|
|
870
870
|
const tunnelRequested = flags["tunnel"] === true;
|
|
871
871
|
const rawPublicUrl = typeof flags["hq-public-url"] === "string" ? flags["hq-public-url"] : process.env.WRONGSTACK_HQ_PUBLIC_URL;
|
|
872
872
|
let publicOrigin;
|
|
@@ -3303,4 +3303,4 @@ async function initializeCli(argv) {
|
|
|
3303
3303
|
export {
|
|
3304
3304
|
initializeCli
|
|
3305
3305
|
};
|
|
3306
|
-
//# sourceMappingURL=cli-context-
|
|
3306
|
+
//# sourceMappingURL=cli-context-33F74CSZ.js.map
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
normalizeTuiThinkingWord,
|
|
6
6
|
removeSuggestions,
|
|
7
7
|
runGit,
|
|
8
|
+
setAutoSuggestions,
|
|
8
9
|
setSuggestions
|
|
9
10
|
} from "./chunk-OWNC7LMD.js";
|
|
10
11
|
import {
|
|
@@ -71,9 +72,6 @@ import {
|
|
|
71
72
|
import {
|
|
72
73
|
BEHAVIOR_SECTION_KEYS
|
|
73
74
|
} from "./chunk-UQUYBDMG.js";
|
|
74
|
-
import {
|
|
75
|
-
CLI_VERSION
|
|
76
|
-
} from "./chunk-XJXDOF63.js";
|
|
77
75
|
import {
|
|
78
76
|
buildProviderForId,
|
|
79
77
|
createGracefulShutdown,
|
|
@@ -90,7 +88,10 @@ import {
|
|
|
90
88
|
} from "./chunk-JY52HWL6.js";
|
|
91
89
|
import {
|
|
92
90
|
startCliHqConnection
|
|
93
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-CJTBLTS4.js";
|
|
92
|
+
import {
|
|
93
|
+
CLI_VERSION
|
|
94
|
+
} from "./chunk-XJXDOF63.js";
|
|
94
95
|
import {
|
|
95
96
|
LOCAL_LLM_PRESETS,
|
|
96
97
|
addCustomProvider,
|
|
@@ -6133,7 +6134,7 @@ function createRuntimePickerDeps(input) {
|
|
|
6133
6134
|
function formatAge(at) {
|
|
6134
6135
|
const seconds = Math.max(0, Math.round((Date.now() - at) / 1e3));
|
|
6135
6136
|
if (seconds < 60) return `${seconds}s`;
|
|
6136
|
-
if (seconds < 3600) return `${Math.
|
|
6137
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m`;
|
|
6137
6138
|
return `${Math.round(seconds / 3600)}h`;
|
|
6138
6139
|
}
|
|
6139
6140
|
|
|
@@ -6244,7 +6245,7 @@ async function runCliExecution(params) {
|
|
|
6244
6245
|
governanceHandle,
|
|
6245
6246
|
setConfig
|
|
6246
6247
|
} = params;
|
|
6247
|
-
const { execute } = await import("./execution-
|
|
6248
|
+
const { execute } = await import("./execution-A6WJLSOC.js");
|
|
6248
6249
|
return execute(
|
|
6249
6250
|
toExecuteDeps({
|
|
6250
6251
|
core: {
|
|
@@ -7360,6 +7361,7 @@ function registerBuiltinTools(deps) {
|
|
|
7360
7361
|
memory: { enabled: deps.config.features.memory, store: deps.memoryStore },
|
|
7361
7362
|
vectorMemory: deps.vectorMemoryStore ? { store: deps.vectorMemoryStore } : void 0,
|
|
7362
7363
|
nextSteps: { enabled: deps.config.tools?.nextsteps?.enabled === true },
|
|
7364
|
+
skillLoader: deps.skillLoader,
|
|
7363
7365
|
coordinationTools: [
|
|
7364
7366
|
makeMailboxTool({ projectDir: deps.wpaths.projectDir, events: deps.events }),
|
|
7365
7367
|
makeMailSendTool({ projectDir: deps.wpaths.projectDir, events: deps.events }),
|
|
@@ -7490,6 +7492,9 @@ async function setupCliPromptAndTools(params) {
|
|
|
7490
7492
|
tier,
|
|
7491
7493
|
memoryStore,
|
|
7492
7494
|
vectorMemoryStore,
|
|
7495
|
+
// Same gate the prompt builder uses (`skillsEnabled`), so the manifest and
|
|
7496
|
+
// the tool that loads its entries are present or absent together.
|
|
7497
|
+
skillLoader: config.features.skills ? skillLoader : void 0,
|
|
7493
7498
|
events,
|
|
7494
7499
|
wpaths
|
|
7495
7500
|
});
|
|
@@ -26385,9 +26390,14 @@ function buildSuggestPrompt(contextText) {
|
|
|
26385
26390
|
"Based on the current project state below, generate 3-5 exact natural-language",
|
|
26386
26391
|
"prompt messages that the user could submit back to the coding agent through the",
|
|
26387
26392
|
"TUI or WebUI. Each prompt must ask the agent to perform useful work immediately.",
|
|
26393
|
+
"Generate prompt messages only; do not execute the proposed work in this request.",
|
|
26388
26394
|
"Agent-directed imperatives are valid and do not need to be shell commands.",
|
|
26389
26395
|
"Never output a human-only chore or an instruction that expects the user to do",
|
|
26390
26396
|
"the work after selecting it. Be specific \u2014 mention relevant files or tools.",
|
|
26397
|
+
"The recipient is the LLM, not the user. Each item is submitted verbatim as",
|
|
26398
|
+
"the next user prompt: name the target, action, and useful verification or output.",
|
|
26399
|
+
"Omit approval requests, questions for the user, and mixed agent/human checklists.",
|
|
26400
|
+
"Use the user's language when it is known from the supplied context.",
|
|
26391
26401
|
"Do NOT include preamble, explanation, or wrap the output in code blocks.",
|
|
26392
26402
|
"",
|
|
26393
26403
|
"Rules:",
|
|
@@ -26405,8 +26415,9 @@ function buildSuggestPrompt(contextText) {
|
|
|
26405
26415
|
].join("\n");
|
|
26406
26416
|
}
|
|
26407
26417
|
var SUGGEST_CACHE_TTL_MS = 6e4;
|
|
26408
|
-
var suggestCache = null;
|
|
26409
26418
|
function buildSuggestCommand(opts) {
|
|
26419
|
+
let suggestCache;
|
|
26420
|
+
let requestVersion = 0;
|
|
26410
26421
|
return {
|
|
26411
26422
|
name: "suggest",
|
|
26412
26423
|
aliases: ["next-steps", "what-next"],
|
|
@@ -26425,25 +26436,37 @@ function buildSuggestCommand(opts) {
|
|
|
26425
26436
|
"",
|
|
26426
26437
|
"Use `/next list` to see the current suggestions at any time."
|
|
26427
26438
|
].join("\n"),
|
|
26428
|
-
async run(args,
|
|
26429
|
-
const
|
|
26430
|
-
const fast =
|
|
26431
|
-
const fresh =
|
|
26439
|
+
async run(args, ctx) {
|
|
26440
|
+
const flags = new Set(args.trim().toLowerCase().split(/\s+/));
|
|
26441
|
+
const fast = flags.has("--fast") || flags.has("-f");
|
|
26442
|
+
const fresh = flags.has("--fresh");
|
|
26443
|
+
const context = ctx ?? opts.context;
|
|
26444
|
+
const currentScope = () => JSON.stringify([opts.projectRoot, opts.cwd, context?.session?.id]);
|
|
26445
|
+
const scope = currentScope();
|
|
26446
|
+
const lastMessage = context?.messages?.at(-1);
|
|
26447
|
+
const version = ++requestVersion;
|
|
26448
|
+
const isCurrent = () => version === requestVersion && scope === currentScope() && lastMessage === context?.messages?.at(-1);
|
|
26449
|
+
const superseded = () => ({ message: color52.dim("Discarded stale suggestion result.") });
|
|
26450
|
+
setAutoSuggestions([]);
|
|
26432
26451
|
if (fast) {
|
|
26452
|
+
suggestCache = void 0;
|
|
26433
26453
|
const suggestions = await generateHeuristicSuggestions(opts);
|
|
26454
|
+
if (!isCurrent()) return superseded();
|
|
26434
26455
|
setSuggestions(suggestions);
|
|
26435
26456
|
opts.onSuggestions?.(suggestions);
|
|
26436
26457
|
const display = formatSuggestions(suggestions);
|
|
26437
26458
|
return { message: display };
|
|
26438
26459
|
}
|
|
26439
26460
|
if (!opts.onSpawnAndWait) {
|
|
26461
|
+
suggestCache = void 0;
|
|
26440
26462
|
const suggestions = await generateHeuristicSuggestions(opts);
|
|
26463
|
+
if (!isCurrent()) return superseded();
|
|
26441
26464
|
setSuggestions(suggestions);
|
|
26442
26465
|
opts.onSuggestions?.(suggestions);
|
|
26443
26466
|
const display = formatSuggestions(suggestions) + "\n" + color52.dim("(Heuristic fallback \u2014 multi-agent not enabled)");
|
|
26444
26467
|
return { message: display };
|
|
26445
26468
|
}
|
|
26446
|
-
if (!fresh && suggestCache && Date.now() - suggestCache.at < SUGGEST_CACHE_TTL_MS) {
|
|
26469
|
+
if (!fresh && suggestCache?.context === context && suggestCache?.scope === scope && suggestCache?.lastMessage === lastMessage && Date.now() - suggestCache.at < SUGGEST_CACHE_TTL_MS) {
|
|
26447
26470
|
setSuggestions(suggestCache.suggestions);
|
|
26448
26471
|
opts.onSuggestions?.(suggestCache.suggestions);
|
|
26449
26472
|
const ageSec = Math.round((Date.now() - suggestCache.at) / 1e3);
|
|
@@ -26451,28 +26474,26 @@ function buildSuggestCommand(opts) {
|
|
|
26451
26474
|
message: formatSuggestions(suggestCache.suggestions) + "\n" + color52.dim(`(cached ${ageSec}s ago \u2014 /suggest --fresh to regenerate)`)
|
|
26452
26475
|
};
|
|
26453
26476
|
}
|
|
26477
|
+
suggestCache = void 0;
|
|
26454
26478
|
const contextText = await collectContext({
|
|
26455
26479
|
cwd: opts.cwd,
|
|
26456
26480
|
projectRoot: opts.projectRoot
|
|
26457
26481
|
});
|
|
26482
|
+
if (!isCurrent()) return superseded();
|
|
26458
26483
|
const task = buildSuggestPrompt(contextText);
|
|
26459
26484
|
opts.renderer.write(color52.dim("Generating suggestions..."));
|
|
26460
26485
|
try {
|
|
26461
26486
|
const raw = await opts.onSpawnAndWait(task, {
|
|
26462
26487
|
name: "suggest"
|
|
26463
26488
|
});
|
|
26489
|
+
if (!isCurrent()) return superseded();
|
|
26464
26490
|
const suggestions = parseSuggestions(raw);
|
|
26465
|
-
if (suggestions.length === 0) {
|
|
26466
|
-
const fallback = [];
|
|
26467
|
-
setSuggestions(fallback);
|
|
26468
|
-
opts.onSuggestions?.(fallback);
|
|
26469
|
-
return { message: formatSuggestions(fallback) };
|
|
26470
|
-
}
|
|
26471
26491
|
setSuggestions(suggestions);
|
|
26472
26492
|
opts.onSuggestions?.(suggestions);
|
|
26473
|
-
suggestCache = { suggestions, at: Date.now() };
|
|
26493
|
+
suggestCache = { suggestions, at: Date.now(), context, scope, lastMessage };
|
|
26474
26494
|
return { message: formatSuggestions(suggestions) };
|
|
26475
26495
|
} catch (err) {
|
|
26496
|
+
if (!isCurrent()) return superseded();
|
|
26476
26497
|
const msg = `Suggestion generation failed: ${toErrorMessage24(err)}`;
|
|
26477
26498
|
opts.renderer.writeWarning(msg);
|
|
26478
26499
|
return { message: msg };
|
|
@@ -26482,12 +26503,10 @@ function buildSuggestCommand(opts) {
|
|
|
26482
26503
|
}
|
|
26483
26504
|
function parseSuggestions(raw) {
|
|
26484
26505
|
const trimmed = raw.trim();
|
|
26485
|
-
if (/^none
|
|
26506
|
+
if (/^none[.!]?$/i.test(trimmed)) {
|
|
26486
26507
|
return [];
|
|
26487
26508
|
}
|
|
26488
|
-
|
|
26489
|
-
if (texts.length > 0) return texts;
|
|
26490
|
-
return raw.split("\n").map((l) => l.trim()).filter((l) => l.length > 10 && !l.startsWith("#") && !l.startsWith("```")).slice(0, 5);
|
|
26509
|
+
return parseNextSteps(raw, false).texts.slice(0, 5);
|
|
26491
26510
|
}
|
|
26492
26511
|
async function pathExists2(filePath) {
|
|
26493
26512
|
try {
|
|
@@ -32927,7 +32946,7 @@ function parseArgs(args) {
|
|
|
32927
32946
|
}
|
|
32928
32947
|
async function gatherInput(opts, power) {
|
|
32929
32948
|
const config = opts.configStore.get();
|
|
32930
|
-
const skillMode = config.skills?.mode ?? "
|
|
32949
|
+
const skillMode = config.skills?.mode ?? "progressive";
|
|
32931
32950
|
const eagerMaxChars = config.skills?.eagerMaxChars ?? DEFAULT_EAGER_MAX_CHARS;
|
|
32932
32951
|
const [skills, memoryFiles, update, trust, configIssues, sessionBytes] = await Promise.all([
|
|
32933
32952
|
gatherSkills(opts, skillMode),
|
|
@@ -39110,4 +39129,4 @@ export {
|
|
|
39110
39129
|
CLI_VERSION,
|
|
39111
39130
|
runInteractive
|
|
39112
39131
|
};
|
|
39113
|
-
//# sourceMappingURL=cli-main-
|
|
39132
|
+
//# sourceMappingURL=cli-main-FNGMKPBA.js.map
|
|
@@ -40,12 +40,12 @@ import {
|
|
|
40
40
|
terminalLink,
|
|
41
41
|
terminalText
|
|
42
42
|
} from "./chunk-HXJYHAR4.js";
|
|
43
|
+
import {
|
|
44
|
+
startCliHqConnection
|
|
45
|
+
} from "./chunk-CJTBLTS4.js";
|
|
43
46
|
import {
|
|
44
47
|
CLI_VERSION
|
|
45
48
|
} from "./chunk-XJXDOF63.js";
|
|
46
|
-
import {
|
|
47
|
-
startCliHqConnection
|
|
48
|
-
} from "./chunk-TE3Q32JP.js";
|
|
49
49
|
import {
|
|
50
50
|
activeProfileConfigPath
|
|
51
51
|
} from "./chunk-YMXXOOFN.js";
|
|
@@ -214,7 +214,7 @@ async function runWebUIDispatch(ctx) {
|
|
|
214
214
|
const isSimpleUi = !isSessionChild && flags["simpleui"] === true;
|
|
215
215
|
agent.disableInteractiveConfirmation();
|
|
216
216
|
renderer.setSilent(true);
|
|
217
|
-
const { runWebUI } = await import("./webui-server-
|
|
217
|
+
const { runWebUI } = await import("./webui-server-MRPGTTKL.js");
|
|
218
218
|
const flagValue = (names) => {
|
|
219
219
|
for (const name of names) {
|
|
220
220
|
if (!Object.hasOwn(flags, name)) continue;
|
|
@@ -6959,4 +6959,4 @@ export {
|
|
|
6959
6959
|
execute,
|
|
6960
6960
|
resolveReviewerFallbackModels
|
|
6961
6961
|
};
|
|
6962
|
-
//# sourceMappingURL=execution-
|
|
6962
|
+
//# sourceMappingURL=execution-A6WJLSOC.js.map
|
|
@@ -68,7 +68,7 @@ var hqCmd = async (args, deps) => {
|
|
|
68
68
|
return 1;
|
|
69
69
|
};
|
|
70
70
|
async function startServer(deps) {
|
|
71
|
-
const { startHqServer } = await import("./hq-server-
|
|
71
|
+
const { startHqServer } = await import("./hq-server-IIBZQZU4.js");
|
|
72
72
|
const dataDir = resolveDataDir(deps);
|
|
73
73
|
const flags = deps.flags ?? {};
|
|
74
74
|
const rawPublicUrl = typeof flags["hq-public-url"] === "string" ? flags["hq-public-url"] : process.env.WRONGSTACK_HQ_PUBLIC_URL;
|
|
@@ -987,4 +987,4 @@ export {
|
|
|
987
987
|
hqCmd,
|
|
988
988
|
resolveAuditActor
|
|
989
989
|
};
|
|
990
|
-
//# sourceMappingURL=hq-
|
|
990
|
+
//# sourceMappingURL=hq-XQWQTRDA.js.map
|
|
@@ -1,5 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why this is not just `string | undefined`.
|
|
3
|
+
*
|
|
4
|
+
* Resolution walks `ProjectSessionRegistry.list()`, which probes each known
|
|
5
|
+
* project's session-catalog daemon with `callExisting` — a path that must never
|
|
6
|
+
* spawn — and turns EVERY per-project failure into an empty result: metadata not
|
|
7
|
+
* yet written, the daemon gone, the IPC connect refused, a timeout. The gateway
|
|
8
|
+
* then reported that as `404 Unknown project`, which is indistinguishable from
|
|
9
|
+
* "this project does not exist".
|
|
10
|
+
*
|
|
11
|
+
* That conflation is observable: a session lease lives 30s and is renewed every
|
|
12
|
+
* 5s, so under heavy load a live project's daemon can lapse and exit, and a
|
|
13
|
+
* perfectly real project answers 404 for a moment. The caller cannot tell a
|
|
14
|
+
* permanent negative from a blip, so it cannot know whether retrying is
|
|
15
|
+
* sensible.
|
|
16
|
+
*
|
|
17
|
+
* The on-disk project directory is the discriminator: it is created when the
|
|
18
|
+
* project first gets a daemon and it outlives that daemon (only the metadata
|
|
19
|
+
* file is removed on exit). A directory therefore means "this machine knows
|
|
20
|
+
* this project, it just is not answering right now" — transient. No directory
|
|
21
|
+
* means genuinely unknown.
|
|
22
|
+
*/
|
|
23
|
+
export type HqProjectResolution = {
|
|
24
|
+
status: 'found';
|
|
25
|
+
projectRoot: string;
|
|
26
|
+
}
|
|
27
|
+
/** No such project on this machine. A retry will not help. */
|
|
28
|
+
| {
|
|
29
|
+
status: 'unknown';
|
|
30
|
+
}
|
|
31
|
+
/** The project is known but could not be resolved right now; retry may help. */
|
|
32
|
+
| {
|
|
33
|
+
status: 'unavailable';
|
|
34
|
+
};
|
|
1
35
|
export declare function resolveHqProjectRoot(globalRoot: string, ids: {
|
|
2
36
|
sessionId?: string | undefined;
|
|
3
37
|
projectId?: string | undefined;
|
|
4
|
-
}): Promise<
|
|
38
|
+
}): Promise<HqProjectResolution>;
|
|
5
39
|
//# sourceMappingURL=project-root.d.ts.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
readLocalSubagentTranscript,
|
|
11
11
|
sanitizeApiError,
|
|
12
12
|
startHqServer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KK2LB3ZS.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-
|
|
30
|
+
//# sourceMappingURL=hq-server-IIBZQZU4.js.map
|
package/dist/index.js
CHANGED
|
@@ -16,14 +16,14 @@ async function main(argv) {
|
|
|
16
16
|
applySessionShellDefault();
|
|
17
17
|
const earlyFlags = parseArgs(argv).flags;
|
|
18
18
|
if (earlyFlags["help"] === true || earlyFlags["version"] === true) {
|
|
19
|
-
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-
|
|
19
|
+
const { handleHelpVersionShortCircuit } = await import("./short-circuit-flags-7GQIGMVD.js");
|
|
20
20
|
const earlyExit = await handleHelpVersionShortCircuit(argv);
|
|
21
21
|
if (earlyExit !== null) return earlyExit;
|
|
22
22
|
}
|
|
23
|
-
const { initializeCli } = await import("./cli-context-
|
|
23
|
+
const { initializeCli } = await import("./cli-context-33F74CSZ.js");
|
|
24
24
|
const cliCtx = await initializeCli(argv);
|
|
25
25
|
if (typeof cliCtx === "number") return cliCtx;
|
|
26
|
-
const { runInteractive } = await import("./cli-main-
|
|
26
|
+
const { runInteractive } = await import("./cli-main-FNGMKPBA.js");
|
|
27
27
|
return runInteractive(cliCtx);
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
startCliHqConnection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CJTBLTS4.js";
|
|
4
|
+
import "./chunk-XJXDOF63.js";
|
|
4
5
|
|
|
5
6
|
// src/subcommands/handlers/mailbox-serve.ts
|
|
6
7
|
import { createServer } from "node:http";
|
|
@@ -360,4 +361,4 @@ function printHelp(deps) {
|
|
|
360
361
|
export {
|
|
361
362
|
mailboxServeCmd
|
|
362
363
|
};
|
|
363
|
-
//# sourceMappingURL=mailbox-serve-
|
|
364
|
+
//# sourceMappingURL=mailbox-serve-3GFOK2I7.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleHelpVersionShortCircuit
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2ENZU66X.js";
|
|
4
4
|
import "./chunk-6WRKAACA.js";
|
|
5
5
|
import "./chunk-XJXDOF63.js";
|
|
6
6
|
import "./chunk-C3Z4N6A6.js";
|
|
7
7
|
export {
|
|
8
8
|
handleHelpVersionShortCircuit
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=short-circuit-flags-
|
|
10
|
+
//# sourceMappingURL=short-circuit-flags-7GQIGMVD.js.map
|
|
@@ -11,7 +11,10 @@ import {
|
|
|
11
11
|
} from "./chunk-JY52HWL6.js";
|
|
12
12
|
import {
|
|
13
13
|
startCliHqConnection
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-CJTBLTS4.js";
|
|
15
|
+
import {
|
|
16
|
+
CLI_VERSION
|
|
17
|
+
} from "./chunk-XJXDOF63.js";
|
|
15
18
|
import {
|
|
16
19
|
loadConfigProviders,
|
|
17
20
|
mutateConfigProviders
|
|
@@ -38,7 +41,6 @@ import {
|
|
|
38
41
|
envFlag,
|
|
39
42
|
findFreePort,
|
|
40
43
|
findInstalledPackageJson,
|
|
41
|
-
integrationConnectSources,
|
|
42
44
|
isStrictPort,
|
|
43
45
|
resolveAuthToken,
|
|
44
46
|
resolvePendingConfirmsForSession,
|
|
@@ -63,6 +65,7 @@ function createWebuiClientRegistration(deps) {
|
|
|
63
65
|
events: deps.events,
|
|
64
66
|
hqSessionId: deps.hqSessionId,
|
|
65
67
|
getSessionId: deps.getSessionId,
|
|
68
|
+
clientVersion: CLI_VERSION,
|
|
66
69
|
...deps.listSessions ? { listSessions: deps.listSessions } : {},
|
|
67
70
|
...deps.isSessionOwnedElsewhere ? { isSessionOwnedElsewhere: deps.isSessionOwnedElsewhere } : {},
|
|
68
71
|
...deps.getSessionWriter ? { getSessionWriter: deps.getSessionWriter } : {},
|
|
@@ -1526,10 +1529,14 @@ async function runWebUI(opts) {
|
|
|
1526
1529
|
requireToken,
|
|
1527
1530
|
deferListen: surface === "simpleui",
|
|
1528
1531
|
strictPort,
|
|
1529
|
-
//
|
|
1530
|
-
//
|
|
1531
|
-
|
|
1532
|
-
|
|
1532
|
+
// Resolve the same-origin health probes from live preferences, including
|
|
1533
|
+
// changes made after boot, just like the standalone WebUI host.
|
|
1534
|
+
getIntegrationTarget: (kind) => {
|
|
1535
|
+
const meta = opts.agent.ctx.meta;
|
|
1536
|
+
const enabledKey = kind === "hq" ? "hqEnabled" : "wrongProxyEnabled";
|
|
1537
|
+
const urlKey = kind === "hq" ? "hqUrl" : "wrongProxyUrl";
|
|
1538
|
+
return meta[enabledKey] === true && typeof meta[urlKey] === "string" ? meta[urlKey] : void 0;
|
|
1539
|
+
},
|
|
1533
1540
|
...opts.getVectorMemoryStore ? { getVectorMemoryStore: opts.getVectorMemoryStore } : {},
|
|
1534
1541
|
...opts.vectorMemoryModelCacheDir ? { vectorMemoryModelCacheDir: opts.vectorMemoryModelCacheDir } : {}
|
|
1535
1542
|
});
|
|
@@ -2023,4 +2030,4 @@ async function runWebUI(opts) {
|
|
|
2023
2030
|
export {
|
|
2024
2031
|
runWebUI
|
|
2025
2032
|
};
|
|
2026
|
-
//# sourceMappingURL=webui-server-
|
|
2033
|
+
//# sourceMappingURL=webui-server-MRPGTTKL.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
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": [
|
|
@@ -41,36 +41,36 @@
|
|
|
41
41
|
"data"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@wrongstack/acp": "1.0.
|
|
45
|
-
"@wrongstack/bench": "1.0.
|
|
46
|
-
"@wrongstack/core": "1.0.
|
|
47
|
-
"@wrongstack/kanban": "1.0.
|
|
48
|
-
"@wrongstack/mcp": "1.0.
|
|
49
|
-
"@wrongstack/persistence": "1.0.
|
|
50
|
-
"@wrongstack/plug-lsp": "1.0.
|
|
51
|
-
"@wrongstack/plugins": "1.0.
|
|
52
|
-
"@wrongstack/primitives": "1.0.
|
|
53
|
-
"@wrongstack/providers": "1.0.
|
|
54
|
-
"@wrongstack/requirement-intake": "1.0.
|
|
55
|
-
"@wrongstack/runtime": "1.0.
|
|
56
|
-
"@wrongstack/sage": "1.0.
|
|
57
|
-
"@wrongstack/sdd": "1.0.
|
|
58
|
-
"@wrongstack/security-scanner": "1.0.
|
|
59
|
-
"@wrongstack/simpleui": "1.0.
|
|
60
|
-
"@wrongstack/techstack": "1.0.
|
|
61
|
-
"@wrongstack/telegram": "1.0.
|
|
62
|
-
"@wrongstack/tools": "1.0.
|
|
63
|
-
"@wrongstack/tui": "1.0.
|
|
64
|
-
"@wrongstack/vector-memory": "1.0.
|
|
65
|
-
"@wrongstack/webui": "1.0.
|
|
66
|
-
"@wrongstack/webui-hq": "1.0.
|
|
67
|
-
"@wrongstack/webui-protocol": "1.0.
|
|
68
|
-
"@wrongstack/webui-server": "1.0.
|
|
69
|
-
"@wrongstack/wrongtrace": "1.0.
|
|
44
|
+
"@wrongstack/acp": "1.0.19",
|
|
45
|
+
"@wrongstack/bench": "1.0.19",
|
|
46
|
+
"@wrongstack/core": "1.0.19",
|
|
47
|
+
"@wrongstack/kanban": "1.0.19",
|
|
48
|
+
"@wrongstack/mcp": "1.0.19",
|
|
49
|
+
"@wrongstack/persistence": "1.0.19",
|
|
50
|
+
"@wrongstack/plug-lsp": "1.0.19",
|
|
51
|
+
"@wrongstack/plugins": "1.0.19",
|
|
52
|
+
"@wrongstack/primitives": "1.0.19",
|
|
53
|
+
"@wrongstack/providers": "1.0.19",
|
|
54
|
+
"@wrongstack/requirement-intake": "1.0.19",
|
|
55
|
+
"@wrongstack/runtime": "1.0.19",
|
|
56
|
+
"@wrongstack/sage": "1.0.19",
|
|
57
|
+
"@wrongstack/sdd": "1.0.19",
|
|
58
|
+
"@wrongstack/security-scanner": "1.0.19",
|
|
59
|
+
"@wrongstack/simpleui": "1.0.19",
|
|
60
|
+
"@wrongstack/techstack": "1.0.19",
|
|
61
|
+
"@wrongstack/telegram": "1.0.19",
|
|
62
|
+
"@wrongstack/tools": "1.0.19",
|
|
63
|
+
"@wrongstack/tui": "1.0.19",
|
|
64
|
+
"@wrongstack/vector-memory": "1.0.19",
|
|
65
|
+
"@wrongstack/webui": "1.0.19",
|
|
66
|
+
"@wrongstack/webui-hq": "1.0.19",
|
|
67
|
+
"@wrongstack/webui-protocol": "1.0.19",
|
|
68
|
+
"@wrongstack/webui-server": "1.0.19",
|
|
69
|
+
"@wrongstack/wrongtrace": "1.0.19",
|
|
70
70
|
"ws": "^8.21.3"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"@wrongstack/desktop": "1.0.
|
|
73
|
+
"@wrongstack/desktop": "1.0.19"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/node": "^26.5.1",
|