@wrongstack/cli 0.309.1 → 0.310.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-7NWCC2GO.js → acp-EA57GUFB.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-53STH6CX.js → chunk-63GFD62R.js} +3 -2
- package/dist/{chunk-SZ42FYPT.js → chunk-BXFYBQKR.js} +4 -6
- package/dist/{chunk-UINEP3E7.js → chunk-CHZZEEIP.js} +2 -2
- package/dist/{chunk-CB35UVXO.js → chunk-KQNYSZG2.js} +34 -9
- 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-RFEZAJ4U.js} +3054 -2841
- package/dist/{diag-doctor-WTBHPOMB.js → diag-doctor-HJKFUY6B.js} +1 -1
- package/dist/{execution-TYUXABWI.js → execution-WA2UCXNM.js} +180 -61
- package/dist/{export-CCUXRJOU.js → export-ROG3DKTZ.js} +1 -1
- package/dist/{hq-PA6RH2UW.js → hq-AG4VW4XO.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-GZGM4BHA.js} +2 -2
- package/dist/hq-server.d.ts +2 -20
- package/dist/index.js +104 -75
- package/dist/{init-E2NDDOHI.js → init-4JQSG66Q.js} +1 -1
- 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/{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 +1 -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-RATFF63M.js} +2 -2
- package/dist/{version-help-TFD6VPF3.js → version-help-WMPSEL4U.js} +2 -2
- package/dist/{webui-server-JXJ4CGIX.js → webui-server-3DU6BVTB.js} +7 -10
- package/dist/wiring/director-announcement.d.ts +31 -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
|
@@ -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
|
|
@@ -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-63GFD62R.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-RATFF63M.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
|
|
@@ -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,
|
|
@@ -943,7 +940,7 @@ function createWebuiRouteContexts({
|
|
|
943
940
|
// src/webui-server/session-start-payload.ts
|
|
944
941
|
import * as path6 from "node:path";
|
|
945
942
|
import { DEFAULT_CONTEXT_WINDOW_MODE_ID } from "@wrongstack/core/types";
|
|
946
|
-
import { protocolAdvertisement } from "@wrongstack/webui-
|
|
943
|
+
import { protocolAdvertisement } from "@wrongstack/webui-protocol";
|
|
947
944
|
|
|
948
945
|
// src/webui-server/cost-helpers.ts
|
|
949
946
|
import {
|
|
@@ -1319,7 +1316,7 @@ async function runWebUI(opts) {
|
|
|
1319
1316
|
distDir: opts.frontendDistDir,
|
|
1320
1317
|
ensureDistDeps: {
|
|
1321
1318
|
resolvePackageJson: (id) => {
|
|
1322
|
-
const packageJson =
|
|
1319
|
+
const packageJson = findInstalledPackageJson(id, import.meta.url);
|
|
1323
1320
|
if (!packageJson) throw new Error(`Package not found: ${id}`);
|
|
1324
1321
|
return packageJson;
|
|
1325
1322
|
}
|
|
@@ -1689,4 +1686,4 @@ async function runWebUI(opts) {
|
|
|
1689
1686
|
export {
|
|
1690
1687
|
runWebUI
|
|
1691
1688
|
};
|
|
1692
|
-
//# sourceMappingURL=webui-server-
|
|
1689
|
+
//# sourceMappingURL=webui-server-3DU6BVTB.js.map
|
|
@@ -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
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { CliContext } from '../cli-context.js';
|
|
2
|
+
import type { loadOnlineAgentsForPrompt } from '../cli-main-helpers.js';
|
|
3
|
+
import { setupSession } from './session.js';
|
|
4
|
+
export interface SessionEstablishmentArgs {
|
|
5
|
+
/** Container used to resolve SessionStore + TokenCounter. */
|
|
6
|
+
container: Pick<CliContext['container'], 'resolve'>;
|
|
7
|
+
config: {
|
|
8
|
+
provider: string;
|
|
9
|
+
model: string;
|
|
10
|
+
};
|
|
11
|
+
wpaths: Parameters<typeof setupSession>[0]['wpaths'];
|
|
12
|
+
projectRoot: string;
|
|
13
|
+
cwd: string;
|
|
14
|
+
systemPrompt: Parameters<typeof setupSession>[0]['systemPrompt'];
|
|
15
|
+
provider: Parameters<typeof setupSession>[0]['provider'];
|
|
16
|
+
renderer: Parameters<typeof setupSession>[0]['renderer'];
|
|
17
|
+
flags: Parameters<typeof setupSession>[0]['flags'];
|
|
18
|
+
events: NonNullable<Parameters<typeof setupSession>[0]['events']>;
|
|
19
|
+
logger: Parameters<typeof setupSession>[0]['logger'];
|
|
20
|
+
/** Live ref so /resume writer swaps are picked up without re-wiring. */
|
|
21
|
+
sessionRef: {
|
|
22
|
+
current: {
|
|
23
|
+
id?: string;
|
|
24
|
+
flushSync?: () => void;
|
|
25
|
+
} | undefined;
|
|
26
|
+
};
|
|
27
|
+
onlineAgents: Awaited<ReturnType<typeof loadOnlineAgentsForPrompt>>;
|
|
28
|
+
/** Owned by the teardown-registrar phase; consumed here for clientType. */
|
|
29
|
+
tuiOwnsScreen: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare function setupSessionEstablishment(args: SessionEstablishmentArgs): Promise<{
|
|
32
|
+
sessionStore: import("@wrongstack/core").SessionStore;
|
|
33
|
+
tokenCounter: import("@wrongstack/core").TokenCounter;
|
|
34
|
+
context: import("@wrongstack/core").Context;
|
|
35
|
+
planPath: string;
|
|
36
|
+
session: import("@wrongstack/core").SessionWriter;
|
|
37
|
+
attachments: import("@wrongstack/core/storage").DefaultAttachmentStore;
|
|
38
|
+
queueStore: import("@wrongstack/core/storage").QueueStore;
|
|
39
|
+
detachTodosCheckpoint: () => void | Promise<void>;
|
|
40
|
+
priorFleetState: import("@wrongstack/core/storage").DirectorStateSnapshot | undefined;
|
|
41
|
+
/** Full SessionResult, passed through for downstream consumers
|
|
42
|
+
* (runCliExecution, multi-agent setup read traceId/resumed* off it). */
|
|
43
|
+
sessResult: import("./session.js").SessionResult;
|
|
44
|
+
}>;
|
|
45
|
+
//# sourceMappingURL=session-establishment.d.ts.map
|
|
@@ -20,7 +20,7 @@ export interface SetupSessionRegistryDeps {
|
|
|
20
20
|
}
|
|
21
21
|
export interface SetupSessionRegistryResult {
|
|
22
22
|
/** AgentStatusTracker when the dynamic import and setup succeeded, else undefined. */
|
|
23
|
-
tracker: InstanceType<typeof import('@wrongstack/core/
|
|
23
|
+
tracker: InstanceType<typeof import('@wrongstack/core/coordination').AgentStatusTracker> | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Atomically move this process's registry ownership to another session.
|
|
26
26
|
* Used by explicit resume; unrelated sessions in other processes are untouched.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-runtime wiring for the interactive CLI (card #7C slice 4).
|
|
3
|
+
*
|
|
4
|
+
* Extracted verbatim from cli-main.ts. Owns the post-establishment session
|
|
5
|
+
* surface:
|
|
6
|
+
*
|
|
7
|
+
* - `wireSessionEvents` (error ring, session bridge, chronicle) plus the
|
|
8
|
+
* `process.once('beforeExit')` hook that flushes the chronicle on the way
|
|
9
|
+
* out — the last teardown hook that lived inline in the orchestrator.
|
|
10
|
+
* - `SessionStats` fed by the shared EventBus + token counter.
|
|
11
|
+
* - The active reasoning-config refresher (best-effort modelsRegistry lookup)
|
|
12
|
+
* and the warning-dedup set behind `model-runtime` pipeline warnings.
|
|
13
|
+
* - `setupPipelines` with the modelRuntime overlay, then the governance
|
|
14
|
+
* tool-boundary install when replay-governance is active.
|
|
15
|
+
*
|
|
16
|
+
* `getActiveReasoningConfig()` exposes the CURRENT reasoning config exactly
|
|
17
|
+
* the way the orchestrator's inline `let` did when `runCliExecution` read it
|
|
18
|
+
* by value at call time.
|
|
19
|
+
*/
|
|
20
|
+
import type { Context } from '@wrongstack/core/agent';
|
|
21
|
+
import type { Provider } from '@wrongstack/core/types';
|
|
22
|
+
import type { CliContext } from '../cli-context.js';
|
|
23
|
+
import { wireSessionEvents } from '../session-event-wiring.js';
|
|
24
|
+
import { SessionStats } from '../session-stats.js';
|
|
25
|
+
import type { setupReplayAndGovernance } from './replay-governance-setup.js';
|
|
26
|
+
type WireArgs = Parameters<typeof wireSessionEvents>[0];
|
|
27
|
+
type GovernanceHandle = Awaited<ReturnType<typeof setupReplayAndGovernance>>['governanceHandle'];
|
|
28
|
+
export interface SessionRuntimeArgs {
|
|
29
|
+
evOn: WireArgs['evOn'];
|
|
30
|
+
events: NonNullable<WireArgs['events']>;
|
|
31
|
+
/** Live config binding; provider/model are read once at setup time. */
|
|
32
|
+
config: CliContext['config'];
|
|
33
|
+
context: Context;
|
|
34
|
+
session: WireArgs['session'];
|
|
35
|
+
sessionRef: WireArgs['sessionRef'];
|
|
36
|
+
wpaths: WireArgs['wpaths'];
|
|
37
|
+
projectRoot: WireArgs['projectRoot'];
|
|
38
|
+
renderer: NonNullable<WireArgs['renderer']>;
|
|
39
|
+
tuiOwnsScreen: boolean;
|
|
40
|
+
tokenCounter: ConstructorParameters<typeof SessionStats>[1];
|
|
41
|
+
modelsRegistry: CliContext['modelsRegistry'];
|
|
42
|
+
configStore: CliContext['configStore'];
|
|
43
|
+
provider: {
|
|
44
|
+
capabilities: Provider['capabilities'];
|
|
45
|
+
};
|
|
46
|
+
logger: CliContext['logger'];
|
|
47
|
+
governanceHandle: GovernanceHandle;
|
|
48
|
+
}
|
|
49
|
+
export declare function setupSessionRuntime(args: SessionRuntimeArgs): {
|
|
50
|
+
errorRing: import("../session-event-wiring.js").ErrorEntry[];
|
|
51
|
+
sessionBridge: import("@wrongstack/core").SessionEventBridge;
|
|
52
|
+
stats: SessionStats;
|
|
53
|
+
pipelines: import("@wrongstack/core/agent").AgentPipelines;
|
|
54
|
+
refreshActiveReasoningConfig: (providerId: string, modelId: string) => Promise<void>;
|
|
55
|
+
getActiveReasoningConfig: () => import("@wrongstack/core/types").ReasoningConfig | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Lifecycle registration is intentionally NOT done here — this module is
|
|
58
|
+
* reusable and must not install process-level hooks (chimera review).
|
|
59
|
+
* The composition root owns `process.once('beforeExit', ...)` wiring.
|
|
60
|
+
*/
|
|
61
|
+
disposeChronicle: () => Promise<void>;
|
|
62
|
+
};
|
|
63
|
+
export {};
|
|
64
|
+
//# sourceMappingURL=session-runtime.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Teardown-registrar phase (card #7C-2), extracted verbatim from
|
|
3
|
+
* `cli-main.ts` (was lines 164-179).
|
|
4
|
+
*
|
|
5
|
+
* Two concerns that must stay together because of the LIFO teardown
|
|
6
|
+
* contract:
|
|
7
|
+
*
|
|
8
|
+
* 1. `createTeardownEventRegistrar` wraps `events` so event-driven
|
|
9
|
+
* subscriptions unregister themselves on shutdown (their disposers go
|
|
10
|
+
* to the same chain).
|
|
11
|
+
* 2. The vector-memory SQLite `close()` teardown is pushed *after* the
|
|
12
|
+
* registrar — in the original file the store-close push sat at line
|
|
13
|
+
* 170, after the mirror-dispose push at line 168 from the setup
|
|
14
|
+
* phase, so on LIFO teardown close runs before the mirror dispose.
|
|
15
|
+
* Keeping this registration inside the same function preserves that
|
|
16
|
+
* exact ordering; moving it back into the setup phase would invert
|
|
17
|
+
* the shutdown sequence.
|
|
18
|
+
*
|
|
19
|
+
* `tuiOwnsScreen` is resolved here as well (was line 164): it derives
|
|
20
|
+
* purely from flags and is consumed by the event wiring below.
|
|
21
|
+
*/
|
|
22
|
+
import type { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
23
|
+
import { createTeardownEventRegistrar } from '../cli-main-helpers.js';
|
|
24
|
+
export interface TeardownRegistrarArgs {
|
|
25
|
+
flags: {
|
|
26
|
+
tui?: unknown;
|
|
27
|
+
'no-tui'?: unknown;
|
|
28
|
+
};
|
|
29
|
+
events: Parameters<typeof createTeardownEventRegistrar>[0];
|
|
30
|
+
logger: {
|
|
31
|
+
debug?: (message: string) => void;
|
|
32
|
+
};
|
|
33
|
+
teardownHandlers: Array<() => void>;
|
|
34
|
+
vectorMemoryStore: VectorMemoryStore | undefined;
|
|
35
|
+
}
|
|
36
|
+
export interface TeardownRegistrarResult {
|
|
37
|
+
tuiOwnsScreen: boolean;
|
|
38
|
+
evOn: ReturnType<typeof createTeardownEventRegistrar>;
|
|
39
|
+
}
|
|
40
|
+
export declare function setupTeardownRegistrar(args: TeardownRegistrarArgs): TeardownRegistrarResult;
|
|
41
|
+
//# sourceMappingURL=teardown-registrar.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { MemoryPort } from '@wrongstack/core/types';
|
|
2
|
+
import { VectorMemoryStore } from '@wrongstack/vector-memory';
|
|
3
|
+
export interface VectorMemoryArgs {
|
|
4
|
+
projectRoot: string;
|
|
5
|
+
flags: {
|
|
6
|
+
'vector-sync'?: unknown;
|
|
7
|
+
};
|
|
8
|
+
logger: {
|
|
9
|
+
warn: (message: string) => void;
|
|
10
|
+
info: (message: string) => void;
|
|
11
|
+
debug?: (message: string) => void;
|
|
12
|
+
};
|
|
13
|
+
/** The SAGE memory port; returned wrapped when the vector store comes up. */
|
|
14
|
+
memoryStore: MemoryPort;
|
|
15
|
+
/** Disposer chain; the mirror-dispose handler is pushed from inside. */
|
|
16
|
+
teardownHandlers: Array<() => void>;
|
|
17
|
+
}
|
|
18
|
+
export interface VectorMemoryResult {
|
|
19
|
+
memoryStore: MemoryPort;
|
|
20
|
+
vectorMemoryStore: VectorMemoryStore | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Model-cache directory (`.wrongstack/cache/transformers-models` under the
|
|
23
|
+
* project root). Surfaced because `session-start-payload` advertises the
|
|
24
|
+
* cache location to the WebUI — callers pass it onward (original
|
|
25
|
+
* cli-main.ts line 801 shorthand).
|
|
26
|
+
*/
|
|
27
|
+
vectorMemoryModelCacheDir: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function setupVectorMemory(args: VectorMemoryArgs): Promise<VectorMemoryResult>;
|
|
30
|
+
//# sourceMappingURL=vector-memory-setup.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.310.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
|
|
6
6
|
"keywords": [
|
|
@@ -42,32 +42,34 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ws": "^8.21.3",
|
|
45
|
-
"@wrongstack/acp": "0.
|
|
46
|
-
"@wrongstack/bench": "0.
|
|
47
|
-
"@wrongstack/
|
|
48
|
-
"@wrongstack/persistence": "0.
|
|
49
|
-
"@wrongstack/
|
|
50
|
-
"@wrongstack/
|
|
51
|
-
"@wrongstack/
|
|
52
|
-
"@wrongstack/
|
|
53
|
-
"@wrongstack/
|
|
54
|
-
"@wrongstack/
|
|
55
|
-
"@wrongstack/
|
|
56
|
-
"@wrongstack/
|
|
57
|
-
"@wrongstack/
|
|
58
|
-
"@wrongstack/
|
|
59
|
-
"@wrongstack/
|
|
60
|
-
"@wrongstack/
|
|
61
|
-
"@wrongstack/
|
|
62
|
-
"@wrongstack/
|
|
63
|
-
"@wrongstack/
|
|
64
|
-
"@wrongstack/
|
|
65
|
-
"@wrongstack/
|
|
66
|
-
"@wrongstack/webui-
|
|
67
|
-
"@wrongstack/webui-
|
|
45
|
+
"@wrongstack/acp": "0.310.0",
|
|
46
|
+
"@wrongstack/bench": "0.310.0",
|
|
47
|
+
"@wrongstack/core": "0.310.0",
|
|
48
|
+
"@wrongstack/persistence": "0.310.0",
|
|
49
|
+
"@wrongstack/kanban": "0.310.0",
|
|
50
|
+
"@wrongstack/plugins": "0.310.0",
|
|
51
|
+
"@wrongstack/plug-lsp": "0.310.0",
|
|
52
|
+
"@wrongstack/primitives": "0.310.0",
|
|
53
|
+
"@wrongstack/providers": "0.310.0",
|
|
54
|
+
"@wrongstack/runtime": "0.310.0",
|
|
55
|
+
"@wrongstack/sdd": "0.310.0",
|
|
56
|
+
"@wrongstack/mcp": "0.310.0",
|
|
57
|
+
"@wrongstack/requirement-intake": "0.310.0",
|
|
58
|
+
"@wrongstack/sage": "0.310.0",
|
|
59
|
+
"@wrongstack/security-scanner": "0.310.0",
|
|
60
|
+
"@wrongstack/techstack": "0.310.0",
|
|
61
|
+
"@wrongstack/telegram": "0.310.0",
|
|
62
|
+
"@wrongstack/simpleui": "0.310.0",
|
|
63
|
+
"@wrongstack/vector-memory": "0.310.0",
|
|
64
|
+
"@wrongstack/tools": "0.310.0",
|
|
65
|
+
"@wrongstack/webui": "0.310.0",
|
|
66
|
+
"@wrongstack/webui-server": "0.310.0",
|
|
67
|
+
"@wrongstack/webui-hq": "0.310.0",
|
|
68
|
+
"@wrongstack/tui": "0.310.0",
|
|
69
|
+
"@wrongstack/webui-protocol": "0.310.0"
|
|
68
70
|
},
|
|
69
71
|
"optionalDependencies": {
|
|
70
|
-
"@wrongstack/desktop": "0.
|
|
72
|
+
"@wrongstack/desktop": "0.310.0"
|
|
71
73
|
},
|
|
72
74
|
"devDependencies": {
|
|
73
75
|
"@types/node": "^26.2.0",
|