@wrongstack/cli 1.0.6 → 1.0.7
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-GOQURNC2.js → acp-A5EQEXQO.js} +61 -6
- package/dist/{auth-WBXXIQUO.js → auth-3K6EN5JP.js} +3 -3
- package/dist/boot/container-wiring.d.ts +2 -0
- package/dist/{chunk-VUVOMXWP.js → chunk-3VXYY5JC.js} +8 -1
- package/dist/{chunk-NR7BD73C.js → chunk-4OLAZIIN.js} +2 -2
- package/dist/{chunk-5A5GCSJC.js → chunk-FSZ5QU3M.js} +2 -2
- package/dist/{chunk-KNMIBKLV.js → chunk-JY52HWL6.js} +47 -1
- package/dist/{chunk-QDQPF4PB.js → chunk-RLCKKLJA.js} +7 -7
- package/dist/{chunk-VPS2SJW4.js → chunk-RMQNCHGO.js} +5 -3
- package/dist/{chunk-PQZPHGGD.js → chunk-XIZZ2EXG.js} +34 -2
- package/dist/{cli-context-BYKJDAFF.js → cli-context-TIAP6YQK.js} +83 -12
- package/dist/cli-context.d.ts +2 -0
- package/dist/{cli-main-5WZBH3WA.js → cli-main-AKJHDSHX.js} +1006 -634
- package/dist/config-doctor.d.ts +1 -1
- package/dist/execute-deps.d.ts +3 -1
- package/dist/{execution-Z6A26EG6.js → execution-FJE27VQ6.js} +80 -3
- package/dist/{hq-V4PHEETW.js → hq-G5PCP325.js} +7 -5
- package/dist/hq-command-controller.d.ts +15 -0
- package/dist/{hq-server-MZ7DV6X7.js → hq-server-G3VVVMIG.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/input-reader.d.ts +2 -2
- package/dist/{modeldiag-46CMWUNM.js → modeldiag-CJSFHZ3J.js} +55 -31
- package/dist/permission-prompt-mirror.d.ts +70 -0
- package/dist/permission-prompt.d.ts +10 -1
- package/dist/{providers-models-6MOGAOVK.js → providers-models-LFNZ5WI7.js} +2 -2
- package/dist/{short-circuit-flags-KBTYSJTW.js → short-circuit-flags-RAT6UZVI.js} +2 -2
- package/dist/slash-commands/subagent-models.d.ts +4 -0
- package/dist/subagent-models/panel-service.d.ts +28 -0
- package/dist/subcommands/handlers/modeldiag-test.d.ts +7 -0
- package/dist/{subcommands-DEYSYHIM.js → subcommands-VFVUTYAV.js} +2 -2
- package/dist/webui-server/prefs-seeding.d.ts +8 -0
- package/dist/{webui-server-OBV5JYJV.js → webui-server-3NYXBZHX.js} +36 -12
- package/dist/wiring/hq-telemetry.d.ts +7 -0
- package/package.json +28 -28
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createHqCommandDispatcher,
|
|
3
|
-
createProjectKanbanAssignHandler,
|
|
4
|
-
createProjectKanbanTransitionHandler
|
|
5
|
-
} from "./chunk-KNMIBKLV.js";
|
|
6
1
|
import {
|
|
7
2
|
createKanbanRunMirror
|
|
8
3
|
} from "./chunk-VCYZ3WZV.js";
|
|
9
4
|
import {
|
|
10
5
|
WEBUI_SESSION_CHILD_CAPABILITIES
|
|
11
6
|
} from "./chunk-GPPRNAKW.js";
|
|
7
|
+
import {
|
|
8
|
+
createHqCommandDispatcher,
|
|
9
|
+
createProjectKanbanAssignHandler,
|
|
10
|
+
createProjectKanbanTransitionHandler
|
|
11
|
+
} from "./chunk-JY52HWL6.js";
|
|
12
12
|
import {
|
|
13
13
|
startCliHqConnection
|
|
14
14
|
} from "./chunk-TE3Q32JP.js";
|
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
envFlag,
|
|
38
38
|
findFreePort,
|
|
39
39
|
findInstalledPackageJson,
|
|
40
|
+
integrationConnectSources,
|
|
40
41
|
isStrictPort,
|
|
41
42
|
resolveAuthToken,
|
|
42
43
|
resolvePendingConfirmsForSession,
|
|
@@ -47,8 +48,8 @@ import {
|
|
|
47
48
|
startWebUILiveStatusLogger,
|
|
48
49
|
toSessionHistoryEntries
|
|
49
50
|
} from "@wrongstack/webui-server";
|
|
50
|
-
import { WebSocketServer } from "ws";
|
|
51
51
|
import { verifyClient as verifyWsClient2 } from "@wrongstack/webui-server/server/ws-auth";
|
|
52
|
+
import { WebSocketServer } from "ws";
|
|
52
53
|
|
|
53
54
|
// src/webui-server/client-registration.ts
|
|
54
55
|
import { mailboxSessionTag } from "@wrongstack/core/coordination";
|
|
@@ -69,10 +70,13 @@ function createWebuiClientRegistration(deps) {
|
|
|
69
70
|
capabilities: options.capabilities
|
|
70
71
|
}),
|
|
71
72
|
...control ? {
|
|
72
|
-
createCommandHandler: (mailbox) => createHqCommandDispatcher({
|
|
73
|
+
createCommandHandler: (mailbox, approvals) => createHqCommandDispatcher({
|
|
73
74
|
steerMailbox: mailbox,
|
|
74
75
|
interruptLeader: control.interruptLeader,
|
|
75
76
|
allowRunCommand: control.allowRunCommand,
|
|
77
|
+
// Same registry the approval bridge publishes from, so every
|
|
78
|
+
// prompt HQ shows is one this handler can actually answer.
|
|
79
|
+
resolveApproval: (toolUseId, decision, sessionId) => approvals.resolve(toolUseId, decision, sessionId),
|
|
76
80
|
...deps.projectRoot ? {
|
|
77
81
|
kanbanTransition: createProjectKanbanTransitionHandler(deps.projectRoot),
|
|
78
82
|
kanbanAssign: createProjectKanbanAssignHandler(deps.projectRoot)
|
|
@@ -294,7 +298,7 @@ function startWebuiCredentialWatcher({
|
|
|
294
298
|
}
|
|
295
299
|
} catch {
|
|
296
300
|
}
|
|
297
|
-
const routingChanged = snapshot.fallbackModels !== void 0 || snapshot.fallbackBridge !== void 0 || hadFallbackBridge || snapshot.fallbackProfiles !== void 0 || snapshot.favoriteModels !== void 0 || snapshot.favoriteModelsOnly !== void 0 || snapshot.modelMatrix !== void 0 || snapshot.fallbackAuto !== void 0;
|
|
301
|
+
const routingChanged = snapshot.fallbackModels !== void 0 || snapshot.fallbackBridge !== void 0 || hadFallbackBridge || snapshot.fallbackProfiles !== void 0 || snapshot.favoriteModels !== void 0 || snapshot.disabledModels !== void 0 || snapshot.favoriteModelsOnly !== void 0 || snapshot.modelMatrix !== void 0 || snapshot.fallbackAuto !== void 0;
|
|
298
302
|
if (routingChanged) {
|
|
299
303
|
const configStore = opts.agent.container?.safeResolve?.(TOKENS.ConfigStore);
|
|
300
304
|
configStore?.update({
|
|
@@ -302,6 +306,7 @@ function startWebuiCredentialWatcher({
|
|
|
302
306
|
fallbackBridge: snapshot.fallbackBridge ?? "",
|
|
303
307
|
...snapshot.fallbackProfiles !== void 0 ? { fallbackProfiles: snapshot.fallbackProfiles } : {},
|
|
304
308
|
...snapshot.favoriteModels !== void 0 ? { favoriteModels: snapshot.favoriteModels } : {},
|
|
309
|
+
...snapshot.disabledModels !== void 0 ? { disabledModels: snapshot.disabledModels } : {},
|
|
305
310
|
...snapshot.favoriteModelsOnly !== void 0 ? { favoriteModelsOnly: snapshot.favoriteModelsOnly } : {},
|
|
306
311
|
...snapshot.modelMatrix !== void 0 ? { modelMatrix: snapshot.modelMatrix } : {},
|
|
307
312
|
...snapshot.fallbackAuto !== void 0 ? { fallbackAuto: snapshot.fallbackAuto } : {}
|
|
@@ -782,6 +787,12 @@ function createPrefsSeeding(opts) {
|
|
|
782
787
|
opts.appConfig = { ...opts.appConfig, ...patch };
|
|
783
788
|
};
|
|
784
789
|
const persistPrefs = async (payload) => {
|
|
790
|
+
if (typeof payload["provider"] === "string") {
|
|
791
|
+
patchLiveAppConfig({ provider: payload["provider"] });
|
|
792
|
+
}
|
|
793
|
+
if (typeof payload["model"] === "string") {
|
|
794
|
+
patchLiveAppConfig({ model: payload["model"] });
|
|
795
|
+
}
|
|
785
796
|
if (Array.isArray(payload["fallbackModels"])) {
|
|
786
797
|
patchLiveAppConfig({ fallbackModels: payload["fallbackModels"] });
|
|
787
798
|
}
|
|
@@ -793,6 +804,9 @@ function createPrefsSeeding(opts) {
|
|
|
793
804
|
if (Array.isArray(payload["favoriteModels"])) {
|
|
794
805
|
patchLiveAppConfig({ favoriteModels: payload["favoriteModels"] });
|
|
795
806
|
}
|
|
807
|
+
if (Array.isArray(payload["disabledModels"])) {
|
|
808
|
+
patchLiveAppConfig({ disabledModels: payload["disabledModels"] });
|
|
809
|
+
}
|
|
796
810
|
if (typeof payload["favoriteModelsOnly"] === "boolean") {
|
|
797
811
|
patchLiveAppConfig({ favoriteModelsOnly: payload["favoriteModelsOnly"] });
|
|
798
812
|
}
|
|
@@ -852,7 +866,9 @@ function createPrefsSeeding(opts) {
|
|
|
852
866
|
// src/webui-server/route-contexts.ts
|
|
853
867
|
import * as path5 from "node:path";
|
|
854
868
|
import {
|
|
869
|
+
normalizeSubagentModelPlan,
|
|
855
870
|
seedSessionSubagentPolicy,
|
|
871
|
+
setSessionSubagentModelPlan,
|
|
856
872
|
setSessionSubagentsAllowed
|
|
857
873
|
} from "@wrongstack/core/coordination";
|
|
858
874
|
import { TOKENS as TOKENS2 } from "@wrongstack/core/kernel";
|
|
@@ -980,6 +996,10 @@ function createWebuiRouteContexts({
|
|
|
980
996
|
sessionId ? getSessionAgent(sessionId).ctx : opts.agent.ctx,
|
|
981
997
|
allowed
|
|
982
998
|
),
|
|
999
|
+
setSubagentModelPlan: (plan, sessionId) => setSessionSubagentModelPlan(
|
|
1000
|
+
sessionId ? getSessionAgent(sessionId).ctx : opts.agent.ctx,
|
|
1001
|
+
normalizeSubagentModelPlan(plan)
|
|
1002
|
+
),
|
|
983
1003
|
persist: persistPrefs,
|
|
984
1004
|
setYolo: opts.onYoloSwitch,
|
|
985
1005
|
setAutonomy: opts.onAutonomySwitch,
|
|
@@ -1101,6 +1121,7 @@ function createWebuiRouteContexts({
|
|
|
1101
1121
|
};
|
|
1102
1122
|
const connectionCtx = {
|
|
1103
1123
|
agent: opts.agent,
|
|
1124
|
+
events: opts.events,
|
|
1104
1125
|
getAgent: getSessionAgent,
|
|
1105
1126
|
// Non-creating peek for the hasSession ownership gate (background-tab
|
|
1106
1127
|
// requests are legitimate; arbitrary strings are not).
|
|
@@ -1499,6 +1520,10 @@ async function runWebUI(opts) {
|
|
|
1499
1520
|
requireToken,
|
|
1500
1521
|
deferListen: surface === "simpleui",
|
|
1501
1522
|
strictPort,
|
|
1523
|
+
// HQ / WrongProxy status chips fetch those endpoints straight from the
|
|
1524
|
+
// browser; without their origins in `connect-src` the page's own CSP
|
|
1525
|
+
// blocks the probe and both chips report a healthy server as down.
|
|
1526
|
+
getExtraConnectSrc: () => integrationConnectSources(opts.appConfig),
|
|
1502
1527
|
...opts.getVectorMemoryStore ? { getVectorMemoryStore: opts.getVectorMemoryStore } : {},
|
|
1503
1528
|
...opts.vectorMemoryModelCacheDir ? { vectorMemoryModelCacheDir: opts.vectorMemoryModelCacheDir } : {}
|
|
1504
1529
|
});
|
|
@@ -1511,9 +1536,7 @@ async function runWebUI(opts) {
|
|
|
1511
1536
|
wsHost: host,
|
|
1512
1537
|
expectedToken: wsToken,
|
|
1513
1538
|
requireToken,
|
|
1514
|
-
allowedHostnames: [publicUrl, publicWsUrl].filter(
|
|
1515
|
-
(value) => Boolean(value)
|
|
1516
|
-
),
|
|
1539
|
+
allowedHostnames: [publicUrl, publicWsUrl].filter((value) => Boolean(value)),
|
|
1517
1540
|
allowBrowserUrlToken: Boolean(publicWsUrl),
|
|
1518
1541
|
allowCrossPortLoopbackCookie: process.env["WRONGSTACK_WEBUI_DEV_CROSS_PORT_WS"] === "1"
|
|
1519
1542
|
});
|
|
@@ -1648,6 +1671,7 @@ async function runWebUI(opts) {
|
|
|
1648
1671
|
),
|
|
1649
1672
|
modelsRegistry: opts.modelsRegistry,
|
|
1650
1673
|
providerAuthRegistry: opts.providerAuthRegistry,
|
|
1674
|
+
getDisabledModels: () => opts.appConfig?.disabledModels ?? [],
|
|
1651
1675
|
send,
|
|
1652
1676
|
broadcast,
|
|
1653
1677
|
log: (m) => console.log(m)
|
|
@@ -1974,4 +1998,4 @@ async function runWebUI(opts) {
|
|
|
1974
1998
|
export {
|
|
1975
1999
|
runWebUI
|
|
1976
2000
|
};
|
|
1977
|
-
//# sourceMappingURL=webui-server-
|
|
2001
|
+
//# sourceMappingURL=webui-server-3NYXBZHX.js.map
|
|
@@ -5,6 +5,7 @@ import type { Config, SessionWriter } from '@wrongstack/core/types';
|
|
|
5
5
|
import type { MCPRegistry } from '@wrongstack/mcp';
|
|
6
6
|
import { createHqCommandDispatcher, type HqCommandController } from '../hq-command-controller.js';
|
|
7
7
|
import type { KanbanHqSyncStats } from '../kanban-hq-sync.js';
|
|
8
|
+
import type { ApprovalMirrorRef } from '../permission-prompt-mirror.js';
|
|
8
9
|
/**
|
|
9
10
|
* Mutable holder for the HQ publisher reference. The ref is created in
|
|
10
11
|
* cli-main.ts before `brainMailbox` (which captures it via closure) and
|
|
@@ -28,6 +29,12 @@ interface SetupHqTelemetryDeps {
|
|
|
28
29
|
teardownHandlers: (() => void)[];
|
|
29
30
|
mailboxSessionTag: (sessionId: string) => string;
|
|
30
31
|
hqPublisherRef: HqPublisherRef;
|
|
32
|
+
/**
|
|
33
|
+
* Late-bound handle the plain REPL's prompt delegate reads through. Populated
|
|
34
|
+
* here because this is where the registry is created; until then the REPL
|
|
35
|
+
* prompt simply runs unmirrored.
|
|
36
|
+
*/
|
|
37
|
+
approvalMirror?: ApprovalMirrorRef | undefined;
|
|
31
38
|
mcpRegistry: Pick<MCPRegistry, 'onOperation' | 'operationalHealth'>;
|
|
32
39
|
}
|
|
33
40
|
interface HqTelemetryResult {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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/primitives": "1.0.
|
|
48
|
-
"@wrongstack/kanban": "1.0.
|
|
49
|
-
"@wrongstack/mcp": "1.0.
|
|
50
|
-
"@wrongstack/persistence": "1.0.
|
|
51
|
-
"@wrongstack/plug-lsp": "1.0.
|
|
52
|
-
"@wrongstack/plugins": "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/wrongtrace": "1.0.
|
|
69
|
-
"@wrongstack/webui-server": "1.0.
|
|
44
|
+
"@wrongstack/acp": "1.0.7",
|
|
45
|
+
"@wrongstack/bench": "1.0.7",
|
|
46
|
+
"@wrongstack/core": "1.0.7",
|
|
47
|
+
"@wrongstack/primitives": "1.0.7",
|
|
48
|
+
"@wrongstack/kanban": "1.0.7",
|
|
49
|
+
"@wrongstack/mcp": "1.0.7",
|
|
50
|
+
"@wrongstack/persistence": "1.0.7",
|
|
51
|
+
"@wrongstack/plug-lsp": "1.0.7",
|
|
52
|
+
"@wrongstack/plugins": "1.0.7",
|
|
53
|
+
"@wrongstack/providers": "1.0.7",
|
|
54
|
+
"@wrongstack/requirement-intake": "1.0.7",
|
|
55
|
+
"@wrongstack/runtime": "1.0.7",
|
|
56
|
+
"@wrongstack/sage": "1.0.7",
|
|
57
|
+
"@wrongstack/sdd": "1.0.7",
|
|
58
|
+
"@wrongstack/security-scanner": "1.0.7",
|
|
59
|
+
"@wrongstack/simpleui": "1.0.7",
|
|
60
|
+
"@wrongstack/techstack": "1.0.7",
|
|
61
|
+
"@wrongstack/telegram": "1.0.7",
|
|
62
|
+
"@wrongstack/tools": "1.0.7",
|
|
63
|
+
"@wrongstack/tui": "1.0.7",
|
|
64
|
+
"@wrongstack/vector-memory": "1.0.7",
|
|
65
|
+
"@wrongstack/webui": "1.0.7",
|
|
66
|
+
"@wrongstack/webui-hq": "1.0.7",
|
|
67
|
+
"@wrongstack/webui-protocol": "1.0.7",
|
|
68
|
+
"@wrongstack/wrongtrace": "1.0.7",
|
|
69
|
+
"@wrongstack/webui-server": "1.0.7",
|
|
70
70
|
"ws": "^8.21.3"
|
|
71
71
|
},
|
|
72
72
|
"optionalDependencies": {
|
|
73
|
-
"@wrongstack/desktop": "1.0.
|
|
73
|
+
"@wrongstack/desktop": "1.0.7"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@types/node": "^26.2.0",
|