@wrongstack/cli 0.309.1 → 0.310.1
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-7NWCC2GO.js → acp-GZIASCLH.js} +6 -4
- package/dist/acp-server-agent.d.ts +1 -1
- package/dist/{audit-BBR22QH3.js → audit-ZPCLCC3C.js} +1 -1
- package/dist/{auth-GZ2FK5KR.js → auth-VQMSZGKE.js} +4 -4
- package/dist/{bench-XNDUJOSZ.js → bench-XYG56AMO.js} +1 -1
- package/dist/boot/tui-session-stub-enrich.d.ts +20 -0
- package/dist/{chronicle-63MFCZN6.js → chronicle-6EPPMUC5.js} +1 -1
- package/dist/chunk-3FHFGIIN.js +58 -0
- package/dist/chunk-3MAUU765.js +120 -0
- package/dist/{chunk-53STH6CX.js → chunk-4S52MIIM.js} +4 -3
- package/dist/{chunk-SZ42FYPT.js → chunk-BXFYBQKR.js} +4 -6
- package/dist/{chunk-CB35UVXO.js → chunk-J3XBHGEO.js} +34 -9
- package/dist/{chunk-UINEP3E7.js → chunk-J4QSP6T2.js} +41 -10
- package/dist/{chunk-XSG33WHN.js → chunk-QAC263FZ.js} +4 -2
- package/dist/{chunk-XQ6FI2K6.js → chunk-QYIIOMLE.js} +2 -2
- package/dist/{chunk-ZRZ54GVL.js → chunk-USYOJIV2.js} +3 -3
- package/dist/{chunk-T6YAVFXA.js → chunk-X3N5TS2S.js} +2 -1
- package/dist/{cli-main-XGDOIPN5.js → cli-main-UDWMWX55.js} +3114 -2883
- package/dist/{diag-doctor-WTBHPOMB.js → diag-doctor-Z6JDXBVX.js} +48 -2
- package/dist/{execution-TYUXABWI.js → execution-ZEHK4II6.js} +217 -68
- package/dist/{export-CCUXRJOU.js → export-ROG3DKTZ.js} +1 -1
- package/dist/{hq-PA6RH2UW.js → hq-3BEUEXJQ.js} +18 -10
- package/dist/hq-server/handle-types.d.ts +32 -0
- package/dist/hq-server/login-attempt-store.d.ts +5 -0
- package/dist/{hq-server-PBRU275L.js → hq-server-4MIW3S4J.js} +2 -2
- package/dist/hq-server.d.ts +2 -20
- package/dist/index.js +107 -77
- package/dist/{init-E2NDDOHI.js → init-4JQSG66Q.js} +1 -1
- package/dist/live-settings-input.d.ts +14 -0
- package/dist/{mailbox-serve-V3QIJBDH.js → mailbox-serve-5S3PHG5D.js} +1 -1
- package/dist/{mcp-CMLFHRG2.js → mcp-RRPKNRSN.js} +3 -1
- package/dist/mcp-serve.d.ts +1 -1
- package/dist/{modeldiag-ICMPHT5L.js → modeldiag-H6DKWJ2N.js} +6 -12
- package/dist/{plugin-usage-26LIIW3P.js → plugin-usage-GCTYOZPH.js} +1 -1
- package/dist/{projects-XE76NFNZ.js → projects-5J727S4L.js} +1 -1
- package/dist/provider-config-utils.d.ts +1 -2
- package/dist/{providers-models-D23WUD74.js → providers-models-663NDPRQ.js} +2 -2
- package/dist/proxy-wiring-7RPGBHZP.js +15 -0
- package/dist/{quick-VIO2BEHS.js → quick-XLYLZX4B.js} +1 -1
- package/dist/{replay-WBRMEWQ5.js → replay-RZXZKP2U.js} +1 -1
- package/dist/{rewind-7RE6ONIC.js → rewind-2FFNOOKS.js} +1 -1
- package/dist/{sessions-config-YX2ZPAFM.js → sessions-config-7Q7QJBKJ.js} +1 -1
- package/dist/subcommands/handlers/acp.d.ts +1 -1
- package/dist/subcommands/handlers/audit.d.ts +1 -1
- package/dist/subcommands/handlers/auth.d.ts +1 -1
- package/dist/subcommands/handlers/bench.d.ts +1 -1
- package/dist/subcommands/handlers/chronicle.d.ts +1 -1
- package/dist/subcommands/handlers/config-history.d.ts +1 -1
- package/dist/subcommands/handlers/diag-doctor.d.ts +15 -1
- package/dist/subcommands/handlers/export.d.ts +1 -1
- package/dist/subcommands/handlers/hq.d.ts +1 -1
- package/dist/subcommands/handlers/init.d.ts +1 -1
- package/dist/subcommands/handlers/mailbox-serve.d.ts +1 -1
- package/dist/subcommands/handlers/mcp.d.ts +1 -1
- package/dist/subcommands/handlers/modeldiag-bench.d.ts +1 -1
- package/dist/subcommands/handlers/modeldiag-eval.d.ts +1 -1
- package/dist/subcommands/handlers/modeldiag-test.d.ts +1 -1
- package/dist/subcommands/handlers/modeldiag.d.ts +1 -1
- package/dist/subcommands/handlers/plugin-usage.d.ts +1 -1
- package/dist/subcommands/handlers/projects.d.ts +1 -1
- package/dist/subcommands/handlers/providers-models.d.ts +1 -1
- package/dist/subcommands/handlers/quick.d.ts +1 -1
- package/dist/subcommands/handlers/replay.d.ts +1 -1
- package/dist/subcommands/handlers/rewind.d.ts +1 -1
- package/dist/subcommands/handlers/sessions-config.d.ts +1 -1
- package/dist/subcommands/handlers/sessions-fleet.d.ts +1 -1
- package/dist/subcommands/handlers/tools-skills.d.ts +1 -1
- package/dist/subcommands/handlers/update.d.ts +1 -1
- package/dist/subcommands/handlers/version-help.d.ts +1 -1
- package/dist/subcommands/index.d.ts +2 -3
- package/dist/{tools-skills-UNKLOB7M.js → tools-skills-Q4P27URS.js} +1 -1
- package/dist/{update-VZSOZGYC.js → update-ZXNC6I6G.js} +2 -2
- package/dist/{version-help-TFD6VPF3.js → version-help-WMPSEL4U.js} +2 -2
- package/dist/webui-server/prefs-seeding.d.ts +4 -0
- package/dist/{webui-server-JXJ4CGIX.js → webui-server-UB75UHWX.js} +14 -10
- package/dist/webui-server-options.d.ts +8 -0
- package/dist/wiring/director-announcement.d.ts +31 -0
- package/dist/wiring/provider-runtime.d.ts +25 -0
- package/dist/wiring/proxy-probe.d.ts +62 -0
- package/dist/wiring/proxy-wiring.d.ts +59 -0
- package/dist/wiring/session-establishment.d.ts +45 -0
- package/dist/wiring/session-registry.d.ts +1 -1
- package/dist/wiring/session-runtime.d.ts +64 -0
- package/dist/wiring/teardown-registrar.d.ts +41 -0
- package/dist/wiring/vector-memory-setup.d.ts +30 -0
- package/package.json +27 -25
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
mutateConfigProviders,
|
|
9
9
|
normalizeKeys,
|
|
10
10
|
writeKeysBack
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BXFYBQKR.js";
|
|
12
12
|
import "./chunk-7OCVIDC7.js";
|
|
13
13
|
|
|
14
14
|
// src/subcommands/handlers/modeldiag.ts
|
|
@@ -19,8 +19,8 @@ import { color as color5 } from "@wrongstack/core/utils";
|
|
|
19
19
|
import { color as color3, toErrorMessage } from "@wrongstack/core/utils";
|
|
20
20
|
|
|
21
21
|
// src/subcommands/handlers/modeldiag-eval.ts
|
|
22
|
-
import { makeProviderFromConfig } from "@wrongstack/providers";
|
|
23
22
|
import { color as color2 } from "@wrongstack/core/utils";
|
|
23
|
+
import { makeProviderFromConfig } from "@wrongstack/providers";
|
|
24
24
|
|
|
25
25
|
// src/subcommands/handlers/modeldiag-profiles.ts
|
|
26
26
|
import { color } from "@wrongstack/core/utils";
|
|
@@ -443,9 +443,7 @@ ${color2.dim('Enter numbers or provider IDs (comma-separated, or "all"):')}
|
|
|
443
443
|
{
|
|
444
444
|
model: c.model,
|
|
445
445
|
system: [{ type: "text", text: "Be thorough and correct." }],
|
|
446
|
-
messages: [
|
|
447
|
-
{ role: "user", content: [{ type: "text", text: task.prompt }] }
|
|
448
|
-
],
|
|
446
|
+
messages: [{ role: "user", content: [{ type: "text", text: task.prompt }] }],
|
|
449
447
|
maxTokens: 1024
|
|
450
448
|
},
|
|
451
449
|
{ signal: AbortSignal.timeout(45e3) }
|
|
@@ -938,9 +936,7 @@ async function runModeldiagTest(args, deps, config) {
|
|
|
938
936
|
}
|
|
939
937
|
writeLine();
|
|
940
938
|
writeLine(
|
|
941
|
-
color4.dim(
|
|
942
|
-
`${targets.length} request(s) would run sequentially. Remove --plan to execute.`
|
|
943
|
-
)
|
|
939
|
+
color4.dim(`${targets.length} request(s) would run sequentially. Remove --plan to execute.`)
|
|
944
940
|
);
|
|
945
941
|
}
|
|
946
942
|
return targets.length > 0 ? 0 : 2;
|
|
@@ -948,9 +944,7 @@ async function runModeldiagTest(args, deps, config) {
|
|
|
948
944
|
if (targets.length === 0) {
|
|
949
945
|
const message = "No provider/model targets matched. Check the active profile or remove filters.";
|
|
950
946
|
if (smokeOptions.json) {
|
|
951
|
-
writeLine(
|
|
952
|
-
JSON.stringify({ results: [], summary: { passed: 0, failed: 0 }, error: message })
|
|
953
|
-
);
|
|
947
|
+
writeLine(JSON.stringify({ results: [], summary: { passed: 0, failed: 0 }, error: message }));
|
|
954
948
|
} else {
|
|
955
949
|
writeLine(color4.amber(message));
|
|
956
950
|
}
|
|
@@ -1329,4 +1323,4 @@ var modeldiagCmd = async (args, deps) => {
|
|
|
1329
1323
|
export {
|
|
1330
1324
|
modeldiagCmd
|
|
1331
1325
|
};
|
|
1332
|
-
//# sourceMappingURL=modeldiag-
|
|
1326
|
+
//# sourceMappingURL=modeldiag-H6DKWJ2N.js.map
|
|
@@ -39,8 +39,7 @@ export declare function clearStaleProviderDefaults(config: Record<string, unknow
|
|
|
39
39
|
export declare function activeLabel(cfg: ProviderConfig, keys: ProviderApiKey[]): string | undefined;
|
|
40
40
|
/** Mask an API key for display: show first 4 + last 4 chars. */
|
|
41
41
|
export declare function maskedKey(key: string): string;
|
|
42
|
-
|
|
43
|
-
export declare function nowIso(): string;
|
|
42
|
+
export { nowIso } from '@wrongstack/primitives';
|
|
44
43
|
/**
|
|
45
44
|
* Read the on-disk config file and return its `providers` map, fully
|
|
46
45
|
* decrypted. Returns `{}` on ENOENT or corrupt JSON (surfacing the error
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-YMXXOOFN.js";
|
|
7
7
|
import {
|
|
8
8
|
mutateConfigProviders
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BXFYBQKR.js";
|
|
10
10
|
import "./chunk-7OCVIDC7.js";
|
|
11
11
|
|
|
12
12
|
// src/subcommands/handlers/providers-models.ts
|
|
@@ -661,4 +661,4 @@ export {
|
|
|
661
661
|
modelsCmd,
|
|
662
662
|
providersCmd
|
|
663
663
|
};
|
|
664
|
-
//# sourceMappingURL=providers-models-
|
|
664
|
+
//# sourceMappingURL=providers-models-663NDPRQ.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyWrongProxyPrefs,
|
|
3
|
+
awaitFirstWrongProxyProbe,
|
|
4
|
+
bootstrapWrongProxy,
|
|
5
|
+
shutdownWrongProxy
|
|
6
|
+
} from "./chunk-3FHFGIIN.js";
|
|
7
|
+
import "./chunk-3MAUU765.js";
|
|
8
|
+
import "./chunk-7OCVIDC7.js";
|
|
9
|
+
export {
|
|
10
|
+
applyWrongProxyPrefs,
|
|
11
|
+
awaitFirstWrongProxyProbe,
|
|
12
|
+
bootstrapWrongProxy,
|
|
13
|
+
shutdownWrongProxy
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=proxy-wiring-7RPGBHZP.js.map
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
* ACP clients (Zed, JetBrains, VS Code ACP extension) spawn it as a subprocess.
|
|
11
11
|
* This is the correct CLI entry point to test DIR-2 against a real ACP client.
|
|
12
12
|
*/
|
|
13
|
-
import type { SubcommandHandler } from '../
|
|
13
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
14
14
|
export declare const acpCmd: SubcommandHandler;
|
|
15
15
|
//# sourceMappingURL=acp.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubcommandHandler } from '../
|
|
1
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
2
2
|
/**
|
|
3
3
|
* `wstack bench` — run model-independent agentic benchmarks (local manifests,
|
|
4
4
|
* Aider polyglot, SWE-bench Verified) with deterministic graders and a harness
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubcommandHandler } from '../
|
|
1
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
2
2
|
/** `wstack chronicle` — query the cross-session provenance ledger. */
|
|
3
3
|
export declare const chronicleCmd: SubcommandHandler;
|
|
4
4
|
//# sourceMappingURL=chronicle.d.ts.map
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import type { SubcommandHandler } from '../
|
|
1
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
2
2
|
export declare const diagCmd: SubcommandHandler;
|
|
3
|
+
/**
|
|
4
|
+
* `wstack proxy-status` — print the live in-process `ProxyConfig` singleton.
|
|
5
|
+
*
|
|
6
|
+
* A fresh `wstack` invocation has never booted the WS prefs pipeline that
|
|
7
|
+
* the long-running session uses to populate the singleton, so reading
|
|
8
|
+
* `getProxyConfig()` raw here would always return the module default
|
|
9
|
+
* (`enabled=false, url='', active=false`) regardless of what's on disk
|
|
10
|
+
* or whether the daemon is reachable. To answer "did the probe flip
|
|
11
|
+
* active=true?" we seed the singleton from persisted prefs (`config.tools
|
|
12
|
+
* .wrongProxy`), start a one-shot probe, await its first poke, and only
|
|
13
|
+
* then read state. `startProxyProbe()` is idempotent so this is safe to
|
|
14
|
+
* call from a subcommand that has no other runtime side-effects.
|
|
15
|
+
*/
|
|
16
|
+
export declare const proxyCmd: SubcommandHandler;
|
|
3
17
|
export declare const doctorCmd: SubcommandHandler;
|
|
4
18
|
//# sourceMappingURL=diag-doctor.d.ts.map
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*
|
|
19
19
|
* @module subcommands/handlers/hq
|
|
20
20
|
*/
|
|
21
|
-
import type { SubcommandHandler } from '../
|
|
21
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
22
22
|
export { resolveAuditActor } from '../../hq-server/audit-actor.js';
|
|
23
23
|
export declare const hqCmd: SubcommandHandler;
|
|
24
24
|
//# sourceMappingURL=hq.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SubcommandHandler } from '../
|
|
1
|
+
import type { SubcommandHandler } from '../contracts.js';
|
|
2
2
|
/**
|
|
3
3
|
* @deprecated Use `wstack auth` instead. The auth command handles provider setup,
|
|
4
4
|
* key management, and model selection in one interactive workflow.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module subcommands/handlers/modeldiag-bench
|
|
5
5
|
*/
|
|
6
|
-
import type { SubcommandDeps } from '../
|
|
6
|
+
import type { SubcommandDeps } from '../contracts.js';
|
|
7
7
|
import { type ModelDiagConfig } from './modeldiag-eval.js';
|
|
8
8
|
import { type CacheProvider } from './modeldiag-profiles.js';
|
|
9
9
|
export declare function runModeldiagBench(args: string[], deps: SubcommandDeps, providers: CacheProvider[], config: ModelDiagConfig, hasKey: (pid: string) => boolean): Promise<number>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @module subcommands/handlers/modeldiag-eval
|
|
5
5
|
*/
|
|
6
6
|
import { makeProviderFromConfig } from '@wrongstack/providers';
|
|
7
|
-
import type { SubcommandDeps } from '../
|
|
7
|
+
import type { SubcommandDeps } from '../contracts.js';
|
|
8
8
|
import { type CacheProvider } from './modeldiag-profiles.js';
|
|
9
9
|
export type ModelDiagConfig = {
|
|
10
10
|
provider: string;
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module subcommands/handlers/modeldiag-test
|
|
5
5
|
*/
|
|
6
|
-
import type { SubcommandDeps } from '../
|
|
6
|
+
import type { SubcommandDeps } from '../contracts.js';
|
|
7
7
|
export declare function runModeldiagTest(args: string[], deps: SubcommandDeps, config: Record<string, unknown>): Promise<number>;
|
|
8
8
|
//# sourceMappingURL=modeldiag-test.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TerminalRenderer } from '../../renderer.js';
|
|
2
2
|
import { type UpdatePackageName } from '../../update-check.js';
|
|
3
|
-
import type { SubcommandDeps, SubcommandHandler } from '../
|
|
3
|
+
import type { SubcommandDeps, SubcommandHandler } from '../contracts.js';
|
|
4
4
|
type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
|
|
5
5
|
export interface UpdateCommandDeps {
|
|
6
6
|
cwd: string;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
export type { SubcommandDeps, SubcommandHandler } from './contracts.js';
|
|
1
|
+
export type { SubcommandDeps } from './contracts.js';
|
|
3
2
|
/**
|
|
4
3
|
* Name -> handler map. Each entry keeps the plain `SubcommandHandler` shape, so
|
|
5
4
|
* existence checks (`subcommands[name]`) and direct invocation both behave
|
|
6
5
|
* exactly as before; the handler module is imported on first call.
|
|
7
6
|
*/
|
|
8
|
-
export declare const subcommands: Record<string,
|
|
7
|
+
export declare const subcommands: Record<string, (args: string[], deps: unknown) => Promise<number>>;
|
|
9
8
|
/** Every registered subcommand name, resolvable without loading a handler. */
|
|
10
9
|
export declare const subcommandNames: readonly string[];
|
|
11
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
detectUpdatePackageName,
|
|
4
4
|
runUpdateCommand,
|
|
5
5
|
updateCmd
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4S52MIIM.js";
|
|
7
7
|
import "./chunk-U3SS4NRH.js";
|
|
8
8
|
import "./chunk-NUIHRGPY.js";
|
|
9
9
|
import "./chunk-7OCVIDC7.js";
|
|
@@ -13,4 +13,4 @@ export {
|
|
|
13
13
|
runUpdateCommand,
|
|
14
14
|
updateCmd
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=update-
|
|
16
|
+
//# sourceMappingURL=update-ZXNC6I6G.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
helpCmd,
|
|
3
3
|
versionCmd
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QAC263FZ.js";
|
|
5
5
|
import "./chunk-XJXDOF63.js";
|
|
6
6
|
import "./chunk-7OCVIDC7.js";
|
|
7
7
|
export {
|
|
8
8
|
helpCmd,
|
|
9
9
|
versionCmd
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=version-help-
|
|
11
|
+
//# sourceMappingURL=version-help-WMPSEL4U.js.map
|
|
@@ -18,6 +18,10 @@ interface CliWebUIOptions {
|
|
|
18
18
|
fallbackAuto?: boolean | undefined;
|
|
19
19
|
modelMatrix?: Config['modelMatrix'] | undefined;
|
|
20
20
|
uiLocale?: string | undefined;
|
|
21
|
+
/** WrongProxy / WrongTrace toggle. */
|
|
22
|
+
wrongProxyEnabled?: boolean | undefined;
|
|
23
|
+
/** WrongProxy / WrongTrace URL. Default: 'http://localhost:8000'. */
|
|
24
|
+
wrongProxyUrl?: string | undefined;
|
|
21
25
|
} | undefined;
|
|
22
26
|
}
|
|
23
27
|
type PrefSnapshot = Record<string, unknown>;
|
|
@@ -13,17 +13,13 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
loadConfigProviders,
|
|
15
15
|
mutateConfigProviders
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BXFYBQKR.js";
|
|
17
17
|
import "./chunk-7OCVIDC7.js";
|
|
18
18
|
|
|
19
19
|
// src/webui-server.ts
|
|
20
|
-
import { findPackageJSON } from "node:module";
|
|
21
20
|
import * as path7 from "node:path";
|
|
22
21
|
import { createCompatibilityTrustBoundary, DefaultSecretScrubber } from "@wrongstack/core/security";
|
|
23
|
-
import {
|
|
24
|
-
startSharedHeapWatchdog,
|
|
25
|
-
wstackGlobalRoot
|
|
26
|
-
} from "@wrongstack/core/utils";
|
|
22
|
+
import { startSharedHeapWatchdog, wstackGlobalRoot } from "@wrongstack/core/utils";
|
|
27
23
|
import { toErrorMessage as toErrorMessage2 } from "@wrongstack/core/utils/error";
|
|
28
24
|
import {
|
|
29
25
|
buildWebUIAccessUrl,
|
|
@@ -32,6 +28,7 @@ import {
|
|
|
32
28
|
createEmbeddedProviderOperations,
|
|
33
29
|
envFlag,
|
|
34
30
|
findFreePort,
|
|
31
|
+
findInstalledPackageJson,
|
|
35
32
|
isStrictPort,
|
|
36
33
|
resolveAuthToken,
|
|
37
34
|
sendSerialized
|
|
@@ -71,7 +68,7 @@ import {
|
|
|
71
68
|
createConnectionLifecycle,
|
|
72
69
|
verifyClient as verifyWsClient
|
|
73
70
|
} from "@wrongstack/webui-server";
|
|
74
|
-
import { buildReplayPayload, decodeProtocolFrame } from "@wrongstack/webui-
|
|
71
|
+
import { buildReplayPayload, decodeProtocolFrame } from "@wrongstack/webui-protocol";
|
|
75
72
|
function createConnectionHandler(deps) {
|
|
76
73
|
const clientHandlers = [
|
|
77
74
|
deps.goalHandler,
|
|
@@ -749,6 +746,12 @@ function createPrefsSeeding(opts) {
|
|
|
749
746
|
if (typeof payload["uiLocale"] === "string") {
|
|
750
747
|
patchLiveAppConfig({ uiLocale: payload["uiLocale"] });
|
|
751
748
|
}
|
|
749
|
+
if (typeof payload["wrongProxyEnabled"] === "boolean") {
|
|
750
|
+
patchLiveAppConfig({ wrongProxyEnabled: payload["wrongProxyEnabled"] });
|
|
751
|
+
}
|
|
752
|
+
if (typeof payload["wrongProxyUrl"] === "string") {
|
|
753
|
+
patchLiveAppConfig({ wrongProxyUrl: payload["wrongProxyUrl"] });
|
|
754
|
+
}
|
|
752
755
|
if (payload["modelMatrix"] && typeof payload["modelMatrix"] === "object" && !Array.isArray(payload["modelMatrix"])) {
|
|
753
756
|
patchLiveAppConfig({ modelMatrix: payload["modelMatrix"] });
|
|
754
757
|
}
|
|
@@ -884,6 +887,7 @@ function createWebuiRouteContexts({
|
|
|
884
887
|
persist: persistPrefs,
|
|
885
888
|
setYolo: opts.onYoloSwitch,
|
|
886
889
|
setAutonomy: opts.onAutonomySwitch,
|
|
890
|
+
applyWrongProxyPrefs: opts.onWrongProxyPrefsChange,
|
|
887
891
|
pendingConfirms,
|
|
888
892
|
configStore: opts.agent.container?.safeResolve?.(TOKENS2.ConfigStore),
|
|
889
893
|
send,
|
|
@@ -943,7 +947,7 @@ function createWebuiRouteContexts({
|
|
|
943
947
|
// src/webui-server/session-start-payload.ts
|
|
944
948
|
import * as path6 from "node:path";
|
|
945
949
|
import { DEFAULT_CONTEXT_WINDOW_MODE_ID } from "@wrongstack/core/types";
|
|
946
|
-
import { protocolAdvertisement } from "@wrongstack/webui-
|
|
950
|
+
import { protocolAdvertisement } from "@wrongstack/webui-protocol";
|
|
947
951
|
|
|
948
952
|
// src/webui-server/cost-helpers.ts
|
|
949
953
|
import {
|
|
@@ -1319,7 +1323,7 @@ async function runWebUI(opts) {
|
|
|
1319
1323
|
distDir: opts.frontendDistDir,
|
|
1320
1324
|
ensureDistDeps: {
|
|
1321
1325
|
resolvePackageJson: (id) => {
|
|
1322
|
-
const packageJson =
|
|
1326
|
+
const packageJson = findInstalledPackageJson(id, import.meta.url);
|
|
1323
1327
|
if (!packageJson) throw new Error(`Package not found: ${id}`);
|
|
1324
1328
|
return packageJson;
|
|
1325
1329
|
}
|
|
@@ -1689,4 +1693,4 @@ async function runWebUI(opts) {
|
|
|
1689
1693
|
export {
|
|
1690
1694
|
runWebUI
|
|
1691
1695
|
};
|
|
1692
|
-
//# sourceMappingURL=webui-server-
|
|
1696
|
+
//# sourceMappingURL=webui-server-UB75UHWX.js.map
|
|
@@ -205,6 +205,14 @@ export interface CliWebUIOptions {
|
|
|
205
205
|
onAutonomySwitch?: ((mode: string) => void) | undefined;
|
|
206
206
|
/** Forward browser YOLO changes to the host's live permission policy. */
|
|
207
207
|
onYoloSwitch?: ((enabled: boolean) => void) | undefined;
|
|
208
|
+
/**
|
|
209
|
+
* Forward `wrongProxyEnabled` / `wrongProxyUrl` changes from the
|
|
210
|
+
* browser to the runtime probe (`@wrongstack/cli/wiring/proxy-wiring`).
|
|
211
|
+
* Mirrors the `onAutonomySwitch` / `onYoloSwitch` pattern: the WS
|
|
212
|
+
* server stays package-agnostic and the boot site provides the
|
|
213
|
+
* host-side effect.
|
|
214
|
+
*/
|
|
215
|
+
onWrongProxyPrefsChange?: ((payload: Record<string, unknown>) => void) | undefined;
|
|
208
216
|
/**
|
|
209
217
|
* Pre-computed update info from the CLI's preflight version check.
|
|
210
218
|
* When present, the session.start payload includes appVersion,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Director } from '@wrongstack/core/coordination';
|
|
2
|
+
import type { ToolRegistry } from '@wrongstack/core/registry';
|
|
3
|
+
import type { MultiAgentHost } from '../fleet/host.js';
|
|
4
|
+
/**
|
|
5
|
+
* Phase: director activation + announcement (card #7C slice 4).
|
|
6
|
+
*
|
|
7
|
+
* Verbatim extraction of the cli-main.ts director block: resolves the Director
|
|
8
|
+
* from the multi-agent host, restores any fleet checkpoint state, registers
|
|
9
|
+
* the roster tools, and prints the mode announcement (short line for browser
|
|
10
|
+
* surfaces, full paths for the terminal; budget summary only when resuming
|
|
11
|
+
* from a checkpoint so fresh starts stay quiet).
|
|
12
|
+
*
|
|
13
|
+
* Returns the resolved Director (or null when Director mode is disabled) so
|
|
14
|
+
* the composition root keeps owning the mutable `director` binding.
|
|
15
|
+
*/
|
|
16
|
+
export declare function ensureDirectorAndAnnounce(args: {
|
|
17
|
+
multiAgentHost: MultiAgentHost;
|
|
18
|
+
/** Fleet checkpoint restored from the resumed session, if any. */
|
|
19
|
+
priorFleetState: Parameters<Director['setCheckpointState']>[0] | undefined;
|
|
20
|
+
renderer: {
|
|
21
|
+
writeInfo(msg: string): void;
|
|
22
|
+
};
|
|
23
|
+
toolRegistry: ToolRegistry;
|
|
24
|
+
flags: Record<string, unknown>;
|
|
25
|
+
/** Fleet paths are optional in DirectorAutonomyResult; the announcement prints them verbatim. */
|
|
26
|
+
fleetRoot: string | undefined;
|
|
27
|
+
manifestPath: string | undefined;
|
|
28
|
+
sharedScratchpadPath: string | undefined;
|
|
29
|
+
subagentSessionsRoot: string | undefined;
|
|
30
|
+
}): Promise<Director | null>;
|
|
31
|
+
//# sourceMappingURL=director-announcement.d.ts.map
|
|
@@ -42,6 +42,31 @@ export interface ResolvedProviderCfg {
|
|
|
42
42
|
factoryType: string;
|
|
43
43
|
}
|
|
44
44
|
export declare function resolveProviderCfg(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string): ResolvedProviderCfg;
|
|
45
|
+
/**
|
|
46
|
+
* Shared proxy-aware provider-config resolver.
|
|
47
|
+
*
|
|
48
|
+
* Three sites in this monorepo merge a saved provider config with the
|
|
49
|
+
* top-level Config and hand the result to a provider factory:
|
|
50
|
+
*
|
|
51
|
+
* 1. `packages/cli/src/wiring/provider-runtime.ts` `resolveProviderCfg()`
|
|
52
|
+
* — used by `/model`, the fallback extension, and any other runtime
|
|
53
|
+
* path that rebuilds a Provider from a saved-config alias.
|
|
54
|
+
* 2. `packages/cli/src/wiring/provider.ts` `setupProvider()` — the
|
|
55
|
+
* boot-time setup path for the active session provider.
|
|
56
|
+
* 3. `packages/runtime/src/fleet/light-subagent-factory.ts` `buildProvider()`
|
|
57
|
+
* — subagent provider construction for SDD runs.
|
|
58
|
+
*
|
|
59
|
+
* Each of those had to apply the same proxy rewrite. The duplication
|
|
60
|
+
* drifted: `provider.ts:154` was force-setting `type: config.provider`
|
|
61
|
+
* before the `factoryType` read at line 158, silently destroying any
|
|
62
|
+
* saved-alias `type` field (e.g. `minimax-coding-plan` mapped to
|
|
63
|
+
* `type: 'anthropic'`). The drift was caught by Chimera review; this
|
|
64
|
+
* helper is the single source of truth that prevents it from recurring.
|
|
65
|
+
*
|
|
66
|
+
* Inputs are intentionally `Pick<Config, ...>` (not the full Config) so
|
|
67
|
+
* this helper stays free of disk I/O and can be called from any layer.
|
|
68
|
+
*/
|
|
69
|
+
export declare function resolveProviderCfgWithProxy(config: Pick<Config, 'providers' | 'apiKey' | 'baseUrl'>, providerId: string): ResolvedProviderCfg;
|
|
45
70
|
/**
|
|
46
71
|
* Construct a credential-resolved Provider for a provider id, WITHOUT
|
|
47
72
|
* persisting anything. Shared by the `/model` switch and the fallback
|