@wrongstack/cli 0.309.0 → 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.
Files changed (83) hide show
  1. package/dist/{acp-5ZLGFHWP.js → acp-EA57GUFB.js} +6 -4
  2. package/dist/acp-server-agent.d.ts +1 -1
  3. package/dist/{audit-BBR22QH3.js → audit-ZPCLCC3C.js} +1 -1
  4. package/dist/{auth-WOKC2RVG.js → auth-VQMSZGKE.js} +4 -4
  5. package/dist/auth-menu/loopback-server.d.ts +0 -12
  6. package/dist/{bench-XNDUJOSZ.js → bench-XYG56AMO.js} +1 -1
  7. package/dist/boot/tui-session-stub-enrich.d.ts +20 -0
  8. package/dist/{chronicle-63MFCZN6.js → chronicle-6EPPMUC5.js} +1 -1
  9. package/dist/{chunk-53STH6CX.js → chunk-63GFD62R.js} +3 -2
  10. package/dist/{chunk-SZ42FYPT.js → chunk-BXFYBQKR.js} +4 -6
  11. package/dist/{chunk-JQURRYU4.js → chunk-CHZZEEIP.js} +2 -2
  12. package/dist/{chunk-CB35UVXO.js → chunk-KQNYSZG2.js} +34 -9
  13. package/dist/{chunk-XSG33WHN.js → chunk-QAC263FZ.js} +4 -2
  14. package/dist/{chunk-SSSJQVUY.js → chunk-QYIIOMLE.js} +15 -2
  15. package/dist/{chunk-7JOMY3HO.js → chunk-USYOJIV2.js} +3 -3
  16. package/dist/{chunk-DOJLAULS.js → chunk-WOTGMHAH.js} +36 -26
  17. package/dist/{chunk-T6YAVFXA.js → chunk-X3N5TS2S.js} +2 -1
  18. package/dist/{cli-main-RG2PTQ6S.js → cli-main-RFEZAJ4U.js} +3190 -2839
  19. package/dist/{diag-doctor-WTBHPOMB.js → diag-doctor-HJKFUY6B.js} +1 -1
  20. package/dist/diff-renderer.d.ts +17 -0
  21. package/dist/{execution-TYUXABWI.js → execution-WA2UCXNM.js} +180 -61
  22. package/dist/{export-CCUXRJOU.js → export-ROG3DKTZ.js} +1 -1
  23. package/dist/{hq-PA6RH2UW.js → hq-AG4VW4XO.js} +18 -10
  24. package/dist/hq-server/handle-types.d.ts +32 -0
  25. package/dist/hq-server/login-attempt-store.d.ts +5 -0
  26. package/dist/{hq-server-PBRU275L.js → hq-server-GZGM4BHA.js} +2 -2
  27. package/dist/hq-server.d.ts +2 -20
  28. package/dist/index.js +105 -76
  29. package/dist/{init-E2NDDOHI.js → init-4JQSG66Q.js} +1 -1
  30. package/dist/{mailbox-serve-V3QIJBDH.js → mailbox-serve-5S3PHG5D.js} +1 -1
  31. package/dist/{mcp-CMLFHRG2.js → mcp-RRPKNRSN.js} +3 -1
  32. package/dist/mcp-serve.d.ts +1 -1
  33. package/dist/{modeldiag-ICMPHT5L.js → modeldiag-H6DKWJ2N.js} +6 -12
  34. package/dist/{plugin-usage-26LIIW3P.js → plugin-usage-GCTYOZPH.js} +1 -1
  35. package/dist/{projects-XE76NFNZ.js → projects-5J727S4L.js} +1 -1
  36. package/dist/provider-config-utils.d.ts +1 -2
  37. package/dist/{providers-models-D23WUD74.js → providers-models-663NDPRQ.js} +2 -2
  38. package/dist/{quick-VIO2BEHS.js → quick-XLYLZX4B.js} +1 -1
  39. package/dist/{replay-WBRMEWQ5.js → replay-RZXZKP2U.js} +1 -1
  40. package/dist/{rewind-7RE6ONIC.js → rewind-2FFNOOKS.js} +1 -1
  41. package/dist/{sessions-config-YX2ZPAFM.js → sessions-config-7Q7QJBKJ.js} +1 -1
  42. package/dist/slash-commands/dev.d.ts +50 -0
  43. package/dist/subcommands/handlers/acp.d.ts +1 -1
  44. package/dist/subcommands/handlers/audit.d.ts +1 -1
  45. package/dist/subcommands/handlers/auth.d.ts +1 -1
  46. package/dist/subcommands/handlers/bench.d.ts +1 -1
  47. package/dist/subcommands/handlers/chronicle.d.ts +1 -1
  48. package/dist/subcommands/handlers/config-history.d.ts +1 -1
  49. package/dist/subcommands/handlers/diag-doctor.d.ts +1 -1
  50. package/dist/subcommands/handlers/export.d.ts +1 -1
  51. package/dist/subcommands/handlers/hq.d.ts +1 -1
  52. package/dist/subcommands/handlers/init.d.ts +1 -1
  53. package/dist/subcommands/handlers/mailbox-serve.d.ts +1 -1
  54. package/dist/subcommands/handlers/mcp.d.ts +1 -1
  55. package/dist/subcommands/handlers/modeldiag-bench.d.ts +1 -1
  56. package/dist/subcommands/handlers/modeldiag-eval.d.ts +1 -1
  57. package/dist/subcommands/handlers/modeldiag-test.d.ts +1 -1
  58. package/dist/subcommands/handlers/modeldiag.d.ts +1 -1
  59. package/dist/subcommands/handlers/plugin-usage.d.ts +1 -1
  60. package/dist/subcommands/handlers/projects.d.ts +1 -1
  61. package/dist/subcommands/handlers/providers-models.d.ts +1 -1
  62. package/dist/subcommands/handlers/quick.d.ts +1 -1
  63. package/dist/subcommands/handlers/replay.d.ts +1 -1
  64. package/dist/subcommands/handlers/rewind.d.ts +1 -1
  65. package/dist/subcommands/handlers/sessions-config.d.ts +1 -1
  66. package/dist/subcommands/handlers/sessions-fleet.d.ts +1 -1
  67. package/dist/subcommands/handlers/tools-skills.d.ts +1 -1
  68. package/dist/subcommands/handlers/update.d.ts +1 -1
  69. package/dist/subcommands/handlers/version-help.d.ts +1 -1
  70. package/dist/subcommands/index.d.ts +2 -3
  71. package/dist/{tools-skills-UNKLOB7M.js → tools-skills-Q4P27URS.js} +1 -1
  72. package/dist/{update-VZSOZGYC.js → update-RATFF63M.js} +2 -2
  73. package/dist/{version-help-TFD6VPF3.js → version-help-WMPSEL4U.js} +2 -2
  74. package/dist/{webui-server-JXJ4CGIX.js → webui-server-3DU6BVTB.js} +7 -10
  75. package/dist/wiring/cli-execute-builder.d.ts +110 -85
  76. package/dist/wiring/cli-slash-commands-setup.d.ts +102 -72
  77. package/dist/wiring/director-announcement.d.ts +31 -0
  78. package/dist/wiring/session-establishment.d.ts +45 -0
  79. package/dist/wiring/session-registry.d.ts +1 -1
  80. package/dist/wiring/session-runtime.d.ts +64 -0
  81. package/dist/wiring/teardown-registrar.d.ts +41 -0
  82. package/dist/wiring/vector-memory-setup.d.ts +30 -0
  83. package/package.json +27 -25
@@ -186,4 +186,4 @@ ${result.errors.length} error(s):
186
186
  export {
187
187
  rewindCmd
188
188
  };
189
- //# sourceMappingURL=rewind-7RE6ONIC.js.map
189
+ //# sourceMappingURL=rewind-2FFNOOKS.js.map
@@ -415,4 +415,4 @@ export {
415
415
  configCmd,
416
416
  sessionsCmd
417
417
  };
418
- //# sourceMappingURL=sessions-config-YX2ZPAFM.js.map
418
+ //# sourceMappingURL=sessions-config-7Q7QJBKJ.js.map
@@ -1,5 +1,55 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
2
  import type { SlashCommandContext } from './command-context.js';
3
+ export interface DevCommandResult {
4
+ stdout: string;
5
+ stderr: string;
6
+ exitCode: number;
7
+ /** True when the process died from a signal (timeout kill or foreign). */
8
+ killed: boolean;
9
+ /** True when the program never started (not found / not executable /
10
+ * refused by the Windows shim builder). Rendered as SPAWN ERROR. */
11
+ spawnFailed: boolean;
12
+ /** Signal name when the process died from a signal (e.g. SIGTERM). */
13
+ signalName?: string | undefined;
14
+ /** True only when killed by the /dev timeout itself — not by a foreign
15
+ * signal. The distinction matters: both arrive at `close(null, signal)`,
16
+ * but only the former is a TIMEOUT. */
17
+ timedOut?: boolean | undefined;
18
+ }
19
+ /**
20
+ * Split a command line into program + argv, honoring single quotes, double
21
+ * quotes, and backslash escapes. Deliberately NOT a shell: no variable
22
+ * expansion, no globbing, no operators. Tokens are passed verbatim to a
23
+ * shell-less spawn — which is what makes `&`, `|`, `;` inert on POSIX
24
+ * (BIZ-001: the old code passed the whole string as one argv element, so
25
+ * every command with arguments ENOENT'd) and lets the win32 shim builder
26
+ * validate each token individually.
27
+ *
28
+ * Backslash handling is platform-aware (chimera follow-up to BIZ-002). On
29
+ * POSIX, OUTSIDE quotes `\` escapes the next character (shell convention);
30
+ * INSIDE double quotes it escapes only the four chars bash treats specially
31
+ * there (" \ $ `) plus newline-continuation, and is literal otherwise. On
32
+ * Windows it is the path separator and MUST stay literal everywhere —
33
+ * treating it as an escape silently corrupted `C:\Users\foo` into
34
+ * `C:Usersfoo`, defeating the very path-separator fix BIZ-002 made. Inside
35
+ * single quotes everything is literal on both platforms.
36
+ *
37
+ * Throws on an unterminated quoted argument.
38
+ */
39
+ export declare function tokenizeCommand(command: string, platform?: NodeJS.Platform): string[];
40
+ /**
41
+ * Run `/dev <command>` without a shell on POSIX and through the canonical
42
+ * hardened cmd.exe shim on Windows.
43
+ *
44
+ * - POSIX: `spawn(program, args, { shell: false })` — metacharacters are
45
+ * literal argv, so `/dev git diff --stat` actually runs (BIZ-001).
46
+ * - Windows: Node cannot spawn `.cmd`/`.bat` shims without a shell
47
+ * (CVE-2024-27980), so the invocation goes through
48
+ * {@link buildWin32CmdShimInvocation}, which quotes every token and refuses
49
+ * the real cmd.exe operators (`& | < > " %`, newlines) outright. Path
50
+ * separators are no longer blocked — they are not operators (BIZ-002).
51
+ */
52
+ export declare function runCommand(cmd: string, cwd: string, timeout?: number): Promise<DevCommandResult>;
3
53
  /**
4
54
  * `/dev <shell command>` — execute a shell command from the chat input and
5
55
  * display its output. The LLM does NOT see the result — this is a developer
@@ -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 '../index.js';
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 '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
3
  * `wstack audit <sessionId>` — inspect a session's tamper-evident
4
4
  * tool audit log. Shows the chained hash entries and runs
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const authCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=auth.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
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 '../index.js';
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,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
3
  * `wrongstack config history` — list history entries or show details.
4
4
  */
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const diagCmd: SubcommandHandler;
3
3
  export declare const doctorCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=diag-doctor.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const exportCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=export.d.ts.map
@@ -18,7 +18,7 @@
18
18
  *
19
19
  * @module subcommands/handlers/hq
20
20
  */
21
- import type { SubcommandHandler } from '../index.js';
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 '../index.js';
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.
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const mailboxServeCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=mailbox-serve.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const mcpCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=mcp.d.ts.map
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * @module subcommands/handlers/modeldiag-bench
5
5
  */
6
- import type { SubcommandDeps } from '../index.js';
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 '../index.js';
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 '../index.js';
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,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const modeldiagCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=modeldiag.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const pluginCmd: SubcommandHandler;
3
3
  export declare const usageCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=plugin-usage.d.ts.map
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const projectsCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=projects.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const providersCmd: SubcommandHandler;
3
3
  export declare const modelsCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=providers-models.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
3
  * `wrongstack quick` — launch directly into the TUI with sensible defaults.
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
3
  * `wstack replay <sessionId>` — convenience wrapper around
4
4
  * `wstack --replay <sessionId>`. Lists the recorded entries for
@@ -1,3 +1,3 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const rewindCmd: SubcommandHandler;
3
3
  //# sourceMappingURL=rewind.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const sessionsCmd: SubcommandHandler;
3
3
  export declare const configCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=sessions-config.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
3
  * `wrongstack sessions fleet [runId]`
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const toolsCmd: SubcommandHandler;
3
3
  export declare const skillsCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=tools-skills.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 '../index.js';
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,4 +1,4 @@
1
- import type { SubcommandHandler } from '../index.js';
1
+ import type { SubcommandHandler } from '../contracts.js';
2
2
  export declare const versionCmd: SubcommandHandler;
3
3
  export declare const helpCmd: SubcommandHandler;
4
4
  //# sourceMappingURL=version-help.d.ts.map
@@ -1,11 +1,10 @@
1
- import type { SubcommandHandler } from './contracts.js';
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, SubcommandHandler>;
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
@@ -26,4 +26,4 @@ export {
26
26
  skillsCmd,
27
27
  toolsCmd
28
28
  };
29
- //# sourceMappingURL=tools-skills-UNKLOB7M.js.map
29
+ //# sourceMappingURL=tools-skills-Q4P27URS.js.map
@@ -3,7 +3,7 @@ import {
3
3
  detectUpdatePackageName,
4
4
  runUpdateCommand,
5
5
  updateCmd
6
- } from "./chunk-53STH6CX.js";
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-VZSOZGYC.js.map
16
+ //# sourceMappingURL=update-RATFF63M.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  helpCmd,
3
3
  versionCmd
4
- } from "./chunk-XSG33WHN.js";
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-TFD6VPF3.js.map
11
+ //# sourceMappingURL=version-help-WMPSEL4U.js.map
@@ -13,17 +13,13 @@ import {
13
13
  import {
14
14
  loadConfigProviders,
15
15
  mutateConfigProviders
16
- } from "./chunk-SZ42FYPT.js";
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-server/protocol";
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-server/protocol";
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 = findPackageJSON(id, import.meta.url);
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-JXJ4CGIX.js.map
1689
+ //# sourceMappingURL=webui-server-3DU6BVTB.js.map
@@ -1,90 +1,115 @@
1
+ import { gatedEnhancerReasoning } from '@wrongstack/core/execution';
2
+ import type { Container } from '@wrongstack/core/kernel';
3
+ import type { Logger } from '@wrongstack/core/types';
4
+ import { createAuthPanelHost } from '../auth-menu/panel-service.js';
5
+ import type { CliGovernanceRuntimeHandle } from '../cli-main-helpers.js';
6
+ import type { MultiAgentHost } from '../fleet/host.js';
7
+ import { createRuntimeControllerDeps } from './runtime-controller-deps.js';
8
+ import { createRuntimeLifecycleDeps } from './runtime-lifecycle-deps.js';
9
+ import { createRuntimePickerDeps } from './runtime-picker-deps.js';
10
+ import { toExecuteDeps } from './to-execute-deps.js';
11
+ type X = Parameters<typeof toExecuteDeps>[0];
12
+ type RC = Parameters<typeof createRuntimeControllerDeps>[0];
13
+ type RP = Parameters<typeof createRuntimePickerDeps>[0];
14
+ type RL = Parameters<typeof createRuntimeLifecycleDeps>[0];
15
+ type AUP = Parameters<typeof createAuthPanelHost>[0];
1
16
  export declare function runCliExecution(params: {
2
- agent: any;
3
- events: any;
4
- slashRegistry: any;
5
- tokenCounter: any;
6
- sessionRef: any;
7
- activateSession: any;
8
- config: any;
9
- configStore: any;
10
- wpaths: any;
17
+ agent: X['core']['agent'];
18
+ events: X['core']['events'];
19
+ slashRegistry: X['core']['slashRegistry'];
20
+ tokenCounter: X['core']['tokenCounter'];
21
+ sessionRef: NonNullable<X['core']['sessionRef']>;
22
+ activateSession: X['core']['activateSessionIdentity'];
23
+ config: X['core']['config'];
24
+ configStore: X['core']['configStore'];
25
+ wpaths: X['core']['wpaths'];
11
26
  projectRoot: string;
12
- flags: any;
13
- positional: any;
14
- webuiSessionChild: any;
15
- updateInfo: any;
16
- attachments: any;
17
- brainMailbox: any;
18
- session: any;
19
- mcpRegistry: any;
20
- queueStore: any;
21
- context: any;
22
- detachTodosCheckpoint: any;
23
- sessResult: any;
24
- sessionStore: any;
25
- memoryStore: any;
26
- vectorMemoryStore: any;
27
- vectorMemoryModelCacheDir: any;
28
- modeStore: any;
29
- needsSetup: any;
30
- statusTracker: any;
31
- multiAgentHost: any;
32
- modelsRegistry: any;
33
- savedProviderCfg: any;
34
- resolvedProvider: any;
35
- logger: any;
36
- switchProviderAndModel: any;
37
- applyMaxContext: any;
38
- renderer: any;
39
- reader: any;
40
- secretInputController: any;
41
- effectiveMaxContextRef: any;
42
- stats: any;
43
- skillLoader: any;
44
- promptLoader: any;
45
- modeId: any;
46
- director: any;
47
- coordinatorController: any;
48
- fleetStreamController: any;
49
- agentTranscripts?: any;
50
- agentMonitor?: any;
51
- vault: any;
27
+ flags: X['core']['flags'];
28
+ positional: X['core']['positional'];
29
+ webuiSessionChild: X['core']['webuiSessionChild'];
30
+ updateInfo: X['core']['updateInfo'];
31
+ attachments: X['session']['attachments'];
32
+ brainMailbox: X['session']['mailbox'];
33
+ session: X['session']['session'];
34
+ mcpRegistry: X['session']['mcpRegistry'];
35
+ queueStore: X['session']['queueStore'];
36
+ context: X['session']['context'];
37
+ detachTodosCheckpoint: X['session']['detachTodosCheckpoint'];
38
+ sessResult: {
39
+ rebindTodosCheckpoint: X['session']['rebindTodosCheckpoint'];
40
+ restoredMessages: X['session']['restoredMessages'];
41
+ restoredToolCalls: X['session']['restoredToolCalls'];
42
+ restoredEvents: X['session']['restoredEvents'];
43
+ };
44
+ sessionStore: X['session']['sessionStore'];
45
+ memoryStore: NonNullable<X['session']['memoryStore']>;
46
+ vectorMemoryStore: X['session']['vectorMemoryStore'];
47
+ vectorMemoryModelCacheDir: X['session']['vectorMemoryModelCacheDir'];
48
+ modeStore: X['session']['modeStore'];
49
+ needsSetup: X['session']['needsSetup'];
50
+ statusTracker: X['provider']['statusTracker'];
51
+ multiAgentHost: MultiAgentHost;
52
+ modelsRegistry: X['provider']['modelsRegistry'];
53
+ savedProviderCfg: X['provider']['savedProviderCfg'];
54
+ resolvedProvider: X['provider']['resolvedProvider'];
55
+ logger: Logger;
56
+ switchProviderAndModel: X['provider']['switchProviderAndModel'];
57
+ applyMaxContext: NonNullable<X['provider']['onModelContextResolved']>;
58
+ renderer: X['ui']['renderer'];
59
+ reader: X['ui']['reader'];
60
+ secretInputController: X['ui']['secretInputController'];
61
+ effectiveMaxContextRef: {
62
+ readonly current: X['ui']['effectiveMaxContext'];
63
+ };
64
+ stats: X['ui']['stats'];
65
+ skillLoader: X['ui']['skillLoader'];
66
+ promptLoader: X['ui']['promptLoader'];
67
+ modeId: X['ui']['modeId'];
68
+ director: X['fleet']['director'];
69
+ coordinatorController: X['fleet']['coordinatorController'];
70
+ fleetStreamController: X['fleet']['fleetStreamController'];
71
+ agentTranscripts?: X['fleet']['agentTranscripts'];
72
+ agentMonitor?: X['fleet']['agentTranscripts'];
73
+ vault: AUP['vault'];
52
74
  profileConfigPath: string;
53
- onPanelOpen: any;
54
- interruptController: any;
55
- enhanceController: any;
56
- activeReasoningConfig: any;
57
- configRef: any;
58
- buildProviderForModel: any;
59
- statuslineHiddenItems: any;
60
- setStatuslineHiddenItems: any;
61
- saveStatuslineHiddenItems: any;
62
- setYoloMode: any;
63
- autonomyMode: any;
64
- setAutonomyMode: any;
65
- nextPredictEnabled: any;
66
- setNextPredict: any;
67
- container: any;
68
- sessionBridge: any;
69
- autoCompactor: any;
70
- getPluginPickerItems: any;
71
- togglePluginFromPicker: any;
72
- getToolPickerItems: any;
73
- brain: any;
74
- brainSettings: any;
75
- brainRuntime: any;
76
- brainLog: any;
77
- currentSuggestions: any;
78
- setCurrentSuggestions: any;
79
- eternalEngine: any;
80
- parallelEngine: any;
81
- sddRunRegistry: any;
82
- eternalListeners: any;
83
- stageListeners: any;
84
- runSageSessionHygiene: any;
85
- pluginHost: any;
86
- teardownHandlers: any;
87
- governanceHandle: any;
88
- setConfig: (cfg: any) => void;
75
+ onPanelOpen: X['fleet']['onPanelOpen'];
76
+ interruptController: RC['interruptController'];
77
+ enhanceController: RC['enhanceController'];
78
+ activeReasoningConfig: Parameters<typeof gatedEnhancerReasoning>[0];
79
+ configRef: {
80
+ current: X['core']['config'];
81
+ };
82
+ buildProviderForModel: RC['buildProviderForModel'];
83
+ statuslineHiddenItems: RC['statuslineHiddenItems'];
84
+ setStatuslineHiddenItems: NonNullable<RC['setStatuslineHiddenItems']>;
85
+ saveStatuslineHiddenItems: NonNullable<RC['saveStatuslineHiddenItems']>;
86
+ setYoloMode: NonNullable<RC['getYolo']>;
87
+ autonomyMode: ReturnType<RC['getAutonomy']>;
88
+ setAutonomyMode: NonNullable<RC['setAutonomy']>;
89
+ nextPredictEnabled: ReturnType<RC['getNextPredict']>;
90
+ setNextPredict: NonNullable<RC['setNextPredict']>;
91
+ container: Container;
92
+ sessionBridge: RC['sessionBridge'];
93
+ autoCompactor: RC['autoCompactor'];
94
+ getPluginPickerItems: RP['getPluginItems'];
95
+ togglePluginFromPicker: RP['togglePlugin'];
96
+ getToolPickerItems: RP['getToolItems'];
97
+ brain: RP['brain'];
98
+ brainSettings: RP['brainSettings'];
99
+ brainRuntime: RP['brainRuntime'];
100
+ brainLog: ReturnType<NonNullable<RP['getBrainLog']>>;
101
+ currentSuggestions: ReturnType<RL['getCurrentSuggestions']>;
102
+ setCurrentSuggestions: RL['setCurrentSuggestions'];
103
+ eternalEngine: ReturnType<RL['getEternalEngine']>;
104
+ parallelEngine: ReturnType<RL['getParallelEngine']>;
105
+ sddRunRegistry: RL['sddRunRegistry'];
106
+ eternalListeners: RL['eternalListeners'];
107
+ stageListeners: RL['stageListeners'];
108
+ runSageSessionHygiene: RL['runSageSessionHygiene'];
109
+ pluginHost: RL['pluginHost'];
110
+ teardownHandlers: RL['teardownHandlers'];
111
+ governanceHandle: CliGovernanceRuntimeHandle | undefined;
112
+ setConfig: RC['setConfig'];
89
113
  }): Promise<number>;
114
+ export {};
90
115
  //# sourceMappingURL=cli-execute-builder.d.ts.map