@wrongstack/cli 0.319.1 → 1.0.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 (100) hide show
  1. package/data/providers.json +22 -15
  2. package/dist/{acp-5ANIAOZC.js → acp-3LARESEO.js} +113 -10
  3. package/dist/acp-hq-telemetry.d.ts +44 -0
  4. package/dist/{audit-ZPCLCC3C.js → audit-46YK5DSC.js} +1 -2
  5. package/dist/{auth-ND7J7DTD.js → auth-KIBJZZIE.js} +5 -6
  6. package/dist/auth-menu/add-provider.d.ts +7 -0
  7. package/dist/auth-menu/panel-service.d.ts +2 -20
  8. package/dist/{auto-discover-providers-MHFLDSD3.js → auto-discover-providers-VQU3IZMR.js} +1 -2
  9. package/dist/{bench-XYG56AMO.js → bench-YBU6BVQP.js} +175 -35
  10. package/dist/boot/brain-decision-log.d.ts +22 -2
  11. package/dist/{boot-auto-thin-BZ675EVT.js → boot-auto-thin-MANHOYHE.js} +1 -2
  12. package/dist/{chronicle-6EPPMUC5.js → chronicle-UTFETHP6.js} +1 -2
  13. package/dist/{chunk-LIWVIEZM.js → chunk-4HV5RKZH.js} +5 -5
  14. package/dist/{chunk-HF5VQWIY.js → chunk-5IA5337I.js} +3 -3
  15. package/dist/{chunk-TALOKMIC.js → chunk-C2E24IXZ.js} +31 -15
  16. package/dist/{chunk-XPX432BZ.js → chunk-DR2OXU46.js} +50 -39
  17. package/dist/chunk-ETYHZPXP.js +52 -0
  18. package/dist/{chunk-TYO2OVAD.js → chunk-EWKESL4L.js} +8 -4
  19. package/dist/{chunk-QAC263FZ.js → chunk-FPIWTJ2G.js} +2 -3
  20. package/dist/{chunk-7YLN7YUA.js → chunk-IMWXXF4J.js} +61 -9
  21. package/dist/{chunk-IMT6PNV5.js → chunk-MNQQ4ZNF.js} +26 -22
  22. package/dist/{chunk-P2OKBDCH.js → chunk-MXEJEYT7.js} +53 -14
  23. package/dist/{chunk-PCBJSXYV.js → chunk-O4A3HHKD.js} +2 -2
  24. package/dist/{chunk-XYKYXFEE.js → chunk-TE3Q32JP.js} +10 -4
  25. package/dist/{chunk-635WW3II.js → chunk-TEBMCYZN.js} +67 -18
  26. package/dist/{chunk-E4I2TF5S.js → chunk-TNK6237M.js} +2 -2
  27. package/dist/{chunk-GGGUZSAU.js → chunk-Z7A5MXKJ.js} +18 -12
  28. package/dist/{chunk-F5GA2QW2.js → chunk-ZSZ3EYWH.js} +2 -2
  29. package/dist/{cli-context-K73EIND5.js → cli-context-CYMKNOK3.js} +58 -307
  30. package/dist/{cli-main-QXSKKANW.js → cli-main-TTIVR4DI.js} +897 -286
  31. package/dist/{diag-doctor-QZVKUAE5.js → diag-doctor-7LYUYU35.js} +1 -2
  32. package/dist/execute-deps.d.ts +5 -1
  33. package/dist/{execution-7ZFY4FJY.js → execution-3Y55IWBK.js} +37 -20
  34. package/dist/{export-ROG3DKTZ.js → export-VVRIOWFV.js} +1 -2
  35. package/dist/{governance-JSGHHA2R.js → governance-RYSHV675.js} +1 -2
  36. package/dist/{hq-4QQJO2GN.js → hq-IG3YRGCO.js} +2 -3
  37. package/dist/hq-command-controller.d.ts +37 -7
  38. package/dist/hq-server/ws.d.ts +1 -1
  39. package/dist/{hq-server-CVAYICIS.js → hq-server-OILU3NPI.js} +2 -3
  40. package/dist/{hq-ttl-KUO3AU7X.js → hq-ttl-VJR65OBJ.js} +1 -2
  41. package/dist/{hq-tunnel-LO55RCZE.js → hq-tunnel-NIJ5EP2Y.js} +1 -2
  42. package/dist/index.js +5 -6
  43. package/dist/{init-4JQSG66Q.js → init-DRMMFG2G.js} +1 -2
  44. package/dist/{kanban-run-mirror-EKVNGXWW.js → kanban-run-mirror-22HQ5FNG.js} +1 -2
  45. package/dist/live-settings-input.d.ts +2 -0
  46. package/dist/{mailbox-serve-VKQIRCCB.js → mailbox-serve-VUCWZ2SJ.js} +2 -3
  47. package/dist/{mcp-AQKSASHD.js → mcp-HOMLC4WE.js} +1 -2
  48. package/dist/{modeldiag-ZL4ROTQ5.js → modeldiag-FMJT37SN.js} +2 -3
  49. package/dist/{per-subcommand-help-6VCIKDUW.js → per-subcommand-help-BWBHYVJO.js} +2 -3
  50. package/dist/{permissions-2PWBL4YU.js → permissions-CFDLXETM.js} +1 -2
  51. package/dist/{plugin-usage-7WCZW4NP.js → plugin-usage-HFBI3TFT.js} +2 -3
  52. package/dist/{plugins-7N3TF2QF.js → plugins-PZ2VZL7V.js} +4 -5
  53. package/dist/{project-BLQ3ALVL.js → project-AOQI5XTK.js} +1 -2
  54. package/dist/{project-manifest-RV5FXGQI.js → project-manifest-7NSFVBM3.js} +1 -2
  55. package/dist/{project-picker-CCQR3W4I.js → project-picker-SVBXMPKX.js} +1 -2
  56. package/dist/{projects-5J727S4L.js → projects-L6C6XLDY.js} +1 -2
  57. package/dist/provider-config-utils.d.ts +1 -1
  58. package/dist/{providers-models-OKKQZIWU.js → providers-models-YVMVYWRS.js} +3 -4
  59. package/dist/{proxy-wiring-QCI7EWQC.js → proxy-wiring-MGRSKZZB.js} +1 -2
  60. package/dist/{quick-XLYLZX4B.js → quick-CNB4Z3HS.js} +1 -2
  61. package/dist/{replay-RZXZKP2U.js → replay-JJ2NOWD6.js} +1 -2
  62. package/dist/{replay-FJ2JBXUA.js → replay-Z3FTJEMM.js} +1 -2
  63. package/dist/{rewind-2FFNOOKS.js → rewind-JA3ZLCNM.js} +1 -2
  64. package/dist/{sdd-runtime-R6FAK2G2.js → sdd-runtime-PTOSPYI4.js} +1 -2
  65. package/dist/services/statusline-config.d.ts +43 -13
  66. package/dist/{sessions-config-KAMEBVOX.js → sessions-config-UL45XKX7.js} +2 -3
  67. package/dist/{sessions-doctor-EXHAZSSE.js → sessions-doctor-QUL37U32.js} +1 -2
  68. package/dist/short-circuit-flags-6PSP56L7.js +10 -0
  69. package/dist/{simpleui-dist-JKNRCRRK.js → simpleui-dist-CXSIDAXZ.js} +1 -2
  70. package/dist/slash-commands/command-context.d.ts +10 -0
  71. package/dist/slash-commands/statusline.d.ts +1 -1
  72. package/dist/subcommands/handlers/bench-run-config.d.ts +18 -0
  73. package/dist/subcommands/handlers/bench.d.ts +8 -7
  74. package/dist/subcommands-HZQKA4G2.js +9 -0
  75. package/dist/{tools-skills-Q4P27URS.js → tools-skills-GH24UCBY.js} +1 -2
  76. package/dist/{update-K45CS6SS.js → update-5DPB4YD4.js} +1 -2
  77. package/dist/{update-check-PKSMSMD6.js → update-check-BS3DHTSI.js} +1 -2
  78. package/dist/version-help-MYKF724O.js +10 -0
  79. package/dist/webui-server/client-registration.d.ts +9 -1
  80. package/dist/{webui-server-F7MSRHOF.js → webui-server-T6AMOXJJ.js} +51 -12
  81. package/dist/wiring/brain-and-orchestration.d.ts +2 -0
  82. package/dist/wiring/cli-execute-builder.d.ts +4 -0
  83. package/dist/wiring/cli-slash-commands-setup.d.ts +1 -0
  84. package/dist/wiring/command-host-state.d.ts +50 -5
  85. package/dist/wiring/external-plugins.d.ts +9 -0
  86. package/dist/wiring/provider-runtime-setup.d.ts +2 -0
  87. package/dist/wiring/runtime-controller-deps.d.ts +3 -0
  88. package/dist/wiring/vector-memory-setup.d.ts +12 -0
  89. package/dist/wiring/wrongtrace-prompt-contributor.d.ts +5 -2
  90. package/dist/{wrongtrace-gate-counters-GSVY372D.js → wrongtrace-gate-counters-7C2EAAZL.js} +1 -2
  91. package/dist/{wrongtrace-telemetry-KBBM5NLQ.js → wrongtrace-telemetry-3ASFKOZO.js} +1 -2
  92. package/package.json +28 -28
  93. package/dist/chunk-7OCVIDC7.js +0 -11
  94. package/dist/chunk-KYDJJLJI.js +0 -52
  95. package/dist/launch-hints.d.ts +0 -49
  96. package/dist/short-circuit-flags-7YUCERBB.js +0 -11
  97. package/dist/subcommands-KE6MEQQP.js +0 -10
  98. package/dist/version-help-WMPSEL4U.js +0 -11
  99. package/dist/webui-server/privileged-actions.d.ts +0 -14
  100. package/dist/wiring/cli-heap-watchdog.d.ts +0 -34
@@ -54,5 +54,5 @@ export declare function loadConfigProviders(configPath: string, vault: SecretVau
54
54
  * so non-provider keys are preserved. Refuses to overwrite a corrupt-but-
55
55
  * existing config (the user may still have salvageable data).
56
56
  */
57
- export declare function mutateConfigProviders(configPath: string, vault: SecretVault, mutator: (providers: Record<string, ProviderConfig>) => void, profileConfigPath?: string): Promise<void>;
57
+ export declare function mutateConfigProviders(configPath: string, vault: SecretVault, mutator: (providers: Record<string, ProviderConfig>, config: Record<string, unknown>) => void, profileConfigPath?: string): Promise<void>;
58
58
  //# sourceMappingURL=provider-config-utils.d.ts.map
@@ -6,8 +6,7 @@ import {
6
6
  } from "./chunk-YMXXOOFN.js";
7
7
  import {
8
8
  mutateConfigProviders
9
- } from "./chunk-XPX432BZ.js";
10
- import "./chunk-7OCVIDC7.js";
9
+ } from "./chunk-DR2OXU46.js";
11
10
 
12
11
  // src/subcommands/handlers/providers-models.ts
13
12
  import * as fs from "node:fs/promises";
@@ -240,7 +239,7 @@ function aliasProviderId(configProviderId, cfg) {
240
239
  async function discoverProviderModels(deps, ids) {
241
240
  if (!("mergeOverlay" in deps.modelsRegistry)) return void 0;
242
241
  try {
243
- const { discoverAndMergeProviders } = await import("./auto-discover-providers-MHFLDSD3.js");
242
+ const { discoverAndMergeProviders } = await import("./auto-discover-providers-VQU3IZMR.js");
244
243
  await discoverAndMergeProviders({
245
244
  config: deps.config,
246
245
  registry: deps.modelsRegistry,
@@ -661,4 +660,4 @@ export {
661
660
  modelsCmd,
662
661
  providersCmd
663
662
  };
664
- //# sourceMappingURL=providers-models-OKKQZIWU.js.map
663
+ //# sourceMappingURL=providers-models-YVMVYWRS.js.map
@@ -5,11 +5,10 @@ import {
5
5
  shutdownWrongProxy
6
6
  } from "./chunk-VOTTENR5.js";
7
7
  import "./chunk-JHPXJRRI.js";
8
- import "./chunk-7OCVIDC7.js";
9
8
  export {
10
9
  applyWrongProxyPrefs,
11
10
  awaitFirstWrongProxyProbe,
12
11
  bootstrapWrongProxy,
13
12
  shutdownWrongProxy
14
13
  };
15
- //# sourceMappingURL=proxy-wiring-QCI7EWQC.js.map
14
+ //# sourceMappingURL=proxy-wiring-MGRSKZZB.js.map
@@ -1,4 +1,3 @@
1
- import "./chunk-7OCVIDC7.js";
2
1
 
3
2
  // src/subcommands/handlers/quick.ts
4
3
  var quickCmd = (_args, _deps) => {
@@ -7,4 +6,4 @@ var quickCmd = (_args, _deps) => {
7
6
  export {
8
7
  quickCmd
9
8
  };
10
- //# sourceMappingURL=quick-XLYLZX4B.js.map
9
+ //# sourceMappingURL=quick-CNB4Z3HS.js.map
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  restoreFlags
3
3
  } from "./chunk-CSAPOCBP.js";
4
- import "./chunk-7OCVIDC7.js";
5
4
 
6
5
  // src/subcommands/handlers/replay.ts
7
6
  import { ReplayLogStore } from "@wrongstack/core/storage";
@@ -76,4 +75,4 @@ Run a session with --record first, then --replay to re-execute it.`
76
75
  export {
77
76
  replayCmd
78
77
  };
79
- //# sourceMappingURL=replay-RZXZKP2U.js.map
78
+ //# sourceMappingURL=replay-JJ2NOWD6.js.map
@@ -1,4 +1,3 @@
1
- import "./chunk-7OCVIDC7.js";
2
1
 
3
2
  // src/wiring/replay.ts
4
3
  import { runProviderWithRetry } from "@wrongstack/core/agent";
@@ -31,4 +30,4 @@ function bindReplayToContainer(opts) {
31
30
  export {
32
31
  bindReplayToContainer
33
32
  };
34
- //# sourceMappingURL=replay-FJ2JBXUA.js.map
33
+ //# sourceMappingURL=replay-Z3FTJEMM.js.map
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  restoreFlags
3
3
  } from "./chunk-CSAPOCBP.js";
4
- import "./chunk-7OCVIDC7.js";
5
4
 
6
5
  // src/subcommands/handlers/rewind.ts
7
6
  import {
@@ -186,4 +185,4 @@ ${result.errors.length} error(s):
186
185
  export {
187
186
  rewindCmd
188
187
  };
189
- //# sourceMappingURL=rewind-2FFNOOKS.js.map
188
+ //# sourceMappingURL=rewind-JA3ZLCNM.js.map
@@ -23,7 +23,6 @@ import {
23
23
  trySaveSpecFromAIOutput,
24
24
  trySaveTasksFromAIOutput
25
25
  } from "./chunk-JHUJUIOH.js";
26
- import "./chunk-7OCVIDC7.js";
27
26
  export {
28
27
  SDDState,
29
28
  advanceToNextTask,
@@ -49,4 +48,4 @@ export {
49
48
  trySaveSpecFromAIOutput,
50
49
  trySaveTasksFromAIOutput
51
50
  };
52
- //# sourceMappingURL=sdd-runtime-R6FAK2G2.js.map
51
+ //# sourceMappingURL=sdd-runtime-PTOSPYI4.js.map
@@ -1,33 +1,63 @@
1
- import type { StatuslineLines } from '@wrongstack/core/statusline';
2
- /** On-disk schema version. v1 was a flat boolean map; v2 nests it under
3
- * `chips` alongside the sparse per-chip `lines` assignment. */
4
- export declare const STATUSLINE_CONFIG_VERSION = 2;
5
- export declare const STATUSLINE_CONFIG_KEYS: readonly ['state', 'model', 'context', 'tokens', 'cache', 'cost', 'queue', 'hint', 'index', 'breaker', 'yolo', 'autonomy', 'eternal_stage', 'elapsed', 'project', 'working_dir', 'goal', 'mode', 'auto_proceed', 'git', 'sessions', 'tools', 'theme', 'token_saving', 'processes', 'version', 'dropped_tools', 'prompt_variant', 'side_effects', 'todos', 'plan', 'tasks', 'fleet', 'brain', 'debug_stream', 'enhance', 'next_steps', 'mailbox', 'fleet_agents', 'memory_context'];
6
- export type StatuslineConfigKey = (typeof STATUSLINE_CONFIG_KEYS)[number];
1
+ import { type StatuslineDensities, type StatuslineItem, type StatuslineLines } from '@wrongstack/core/statusline';
2
+ /**
3
+ * On-disk schema version.
4
+ * v1 flat boolean map.
5
+ * v2 `{chips, lines}`.
6
+ * v3 adds `densities` (per-chip full/short/micro pin).
7
+ */
8
+ export declare const STATUSLINE_CONFIG_VERSION = 3;
9
+ /**
10
+ * The persistence vocabulary IS the core contract — one list, so a new chip
11
+ * cannot gain a default line without gaining a toggle (or vice versa). The
12
+ * drift guard in `statusline-contract-drift.test.ts` still asserts it.
13
+ */
14
+ export declare const STATUSLINE_CONFIG_KEYS: readonly StatuslineItem[];
15
+ export type StatuslineConfigKey = StatuslineItem;
7
16
  export type StatuslineConfig = {
8
17
  [K in StatuslineConfigKey]?: boolean | undefined;
9
18
  };
10
19
  /**
11
- * v2 statusline.json document: the chip on/off map plus the sparse
12
- * per-chip line assignment (`StatuslineLines` from the framework-free core
13
- * contract). Absent `lines` keys mean "render on the contract's default
14
- * line" (`DEFAULT_LINES`).
20
+ * v3 statusline.json document: the chip on/off map, the sparse per-chip line
21
+ * assignment, and the sparse per-chip density pin. Absent `lines` keys mean
22
+ * "render on the contract's default line" (`DEFAULT_LINES`); absent
23
+ * `densities` keys mean "let the rail fitter choose".
15
24
  */
16
25
  export interface StatuslineDocument {
17
26
  version: typeof STATUSLINE_CONFIG_VERSION;
18
27
  chips: StatuslineConfig;
19
28
  lines: StatuslineLines;
29
+ densities: StatuslineDensities;
20
30
  }
31
+ /**
32
+ * Chip toggles for a brand-new config. Not every chip is on: the static
33
+ * identity trivia in `DEFAULT_HIDDEN_ITEMS` starts off, because each costs
34
+ * 10–30 permanent columns and is recoverable from a slash command. An
35
+ * existing file's explicit map always wins over this.
36
+ */
21
37
  export declare const DEFAULTS: StatuslineConfig;
22
38
  export declare function loadStatuslineConfig(): Promise<StatuslineDocument>;
23
39
  export declare function ensureStatuslineConfig(): Promise<StatuslineDocument>;
24
40
  export declare function saveStatuslineConfig(config: StatuslineDocument): Promise<void>;
25
41
  /** Load just the per-chip line assignment (defaults to {} when unassigned). */
26
42
  export declare function loadStatuslineLines(): Promise<StatuslineLines>;
43
+ /** Load just the per-chip density pins (defaults to {} when unpinned). */
44
+ export declare function loadStatuslineDensities(): Promise<StatuslineDensities>;
45
+ /**
46
+ * Persist a new layout (lines and/or densities) while preserving the stored
47
+ * chip toggles. Values are re-normalized (unknown keys dropped, clamped) so a
48
+ * malformed caller cannot write garbage to disk.
49
+ */
50
+ export declare function saveStatuslineLayout(layout: {
51
+ lines?: StatuslineLines | undefined;
52
+ densities?: StatuslineDensities | undefined;
53
+ }): Promise<void>;
27
54
  /**
28
- * Persist a new line assignment while preserving the stored chip toggles.
29
- * Values are re-normalized (unknown keys dropped, clamped) so a malformed
30
- * caller cannot write garbage to disk.
55
+ * Persist the chip on/off map while preserving the stored layout. Same RMW
56
+ * hazard as {@link saveStatuslineLayout}, so it shares the mutation queue: a
57
+ * hidden-items save racing a layout save must not resurrect the other's
58
+ * stale field.
31
59
  */
60
+ export declare function saveStatuslineChips(chips: StatuslineConfig): Promise<void>;
61
+ /** Back-compat alias: persist only the line assignment. */
32
62
  export declare function saveStatuslineLines(lines: StatuslineLines): Promise<void>;
33
63
  //# sourceMappingURL=statusline-config.d.ts.map
@@ -10,7 +10,6 @@ import {
10
10
  import {
11
11
  activeProfileConfigPath
12
12
  } from "./chunk-YMXXOOFN.js";
13
- import "./chunk-7OCVIDC7.js";
14
13
 
15
14
  // src/subcommands/handlers/sessions-config.ts
16
15
  import { color as color2, expectDefined } from "@wrongstack/core/utils";
@@ -244,7 +243,7 @@ var sessionsCmd = async (args, deps) => {
244
243
  return sessionsFleetCmd(args.slice(1), deps);
245
244
  }
246
245
  if (sub === "doctor") {
247
- const { sessionsDoctorCmd } = await import("./sessions-doctor-EXHAZSSE.js");
246
+ const { sessionsDoctorCmd } = await import("./sessions-doctor-QUL37U32.js");
248
247
  return sessionsDoctorCmd(args.slice(1), deps);
249
248
  }
250
249
  if (!deps.sessionStore) {
@@ -419,4 +418,4 @@ export {
419
418
  configCmd,
420
419
  sessionsCmd
421
420
  };
422
- //# sourceMappingURL=sessions-config-KAMEBVOX.js.map
421
+ //# sourceMappingURL=sessions-config-UL45XKX7.js.map
@@ -1,4 +1,3 @@
1
- import "./chunk-7OCVIDC7.js";
2
1
 
3
2
  // src/subcommands/handlers/sessions-doctor.ts
4
3
  import {
@@ -143,4 +142,4 @@ var sessionsDoctorCmd = async (args, deps) => {
143
142
  export {
144
143
  sessionsDoctorCmd
145
144
  };
146
- //# sourceMappingURL=sessions-doctor-EXHAZSSE.js.map
145
+ //# sourceMappingURL=sessions-doctor-QUL37U32.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ handleHelpVersionShortCircuit
3
+ } from "./chunk-4HV5RKZH.js";
4
+ import "./chunk-FPIWTJ2G.js";
5
+ import "./chunk-XJXDOF63.js";
6
+ import "./chunk-Z7A5MXKJ.js";
7
+ export {
8
+ handleHelpVersionShortCircuit
9
+ };
10
+ //# sourceMappingURL=short-circuit-flags-6PSP56L7.js.map
@@ -1,4 +1,3 @@
1
- import "./chunk-7OCVIDC7.js";
2
1
 
3
2
  // src/simpleui-dist.ts
4
3
  import { spawn } from "node:child_process";
@@ -97,4 +96,4 @@ export {
97
96
  ensureSimpleUiDistDir,
98
97
  resolveSimpleUiDistDir
99
98
  };
100
- //# sourceMappingURL=simpleui-dist-JKNRCRRK.js.map
99
+ //# sourceMappingURL=simpleui-dist-CXSIDAXZ.js.map
@@ -576,7 +576,17 @@ export interface SlashCommandContext {
576
576
  kind: string;
577
577
  question: string;
578
578
  outcome: string;
579
+ /** Tier that resolved the decision, when the chain recorded one. */
580
+ tier?: string | undefined;
579
581
  }>) | undefined;
582
+ /**
583
+ * Session-lifetime per-tier decision tally for `/brain stats`.
584
+ *
585
+ * Optional: hosts that only wire `getBrainLog` (the WebUI route context,
586
+ * bare test containers) fall back to counting the ring buffer, which is
587
+ * capped at 20 entries and therefore only ever describes the recent past.
588
+ */
589
+ brainTierStats?: (() => import('@wrongstack/core/coordination').BrainTierStats) | undefined;
580
590
  /** Config store for reading/writing config sections at runtime (e.g. settings menu). */
581
591
  configStore: import('@wrongstack/core/types').ConfigStore;
582
592
  /**
@@ -1,6 +1,6 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
2
  import { type StatuslineConfigKey, type StatuslineDocument } from '../services/statusline-config.js';
3
- export { DEFAULTS, ensureStatuslineConfig, loadStatuslineConfig, STATUSLINE_CONFIG_KEYS, STATUSLINE_CONFIG_VERSION, type StatuslineConfig, type StatuslineConfigKey, type StatuslineDocument, saveStatuslineConfig, } from '../services/statusline-config.js';
3
+ export { DEFAULTS, ensureStatuslineConfig, loadStatuslineConfig, loadStatuslineDensities, loadStatuslineLines, STATUSLINE_CONFIG_KEYS, STATUSLINE_CONFIG_VERSION, type StatuslineConfig, type StatuslineConfigKey, type StatuslineDocument, saveStatuslineConfig, saveStatuslineLayout, saveStatuslineLines, } from '../services/statusline-config.js';
4
4
  export interface StatuslineCommandDeps {
5
5
  cwd: string;
6
6
  /** Current hidden items list. Written by the command when toggling. */
@@ -0,0 +1,18 @@
1
+ import { type BenchConfig } from '@wrongstack/bench';
2
+ export declare const DEFAULT_BENCH_MODELS_FILE = "bench.config.json";
3
+ export interface ResolveBenchRunConfigInput {
4
+ suiteId: string;
5
+ cwd: string;
6
+ flags?: Record<string, string | boolean> | undefined;
7
+ savedProvider?: string | undefined;
8
+ savedModel?: string | undefined;
9
+ }
10
+ /**
11
+ * Resolve the model matrix for `wstack bench run`.
12
+ *
13
+ * A missing default `bench.config.json` is not an error — fall through to
14
+ * `--cell`, `--provider`/`--model`, or the saved CLI provider/model. Only an
15
+ * explicit `--models <other-file>` that cannot be read fails closed.
16
+ */
17
+ export declare function resolveBenchRunConfig(input: ResolveBenchRunConfigInput): Promise<BenchConfig>;
18
+ //# sourceMappingURL=bench-run-config.d.ts.map
@@ -1,13 +1,14 @@
1
1
  import type { SubcommandHandler } from '../contracts.js';
2
2
  /**
3
- * `wstack bench` — run model-independent agentic benchmarks (local manifests,
4
- * Aider polyglot, SWE-bench Verified) with deterministic graders and a harness
5
- * fingerprint.
3
+ * `wstack bench` — run model-independent agentic benchmarks (bundled smoke,
4
+ * local manifests, Aider polyglot, SWE-bench Verified) with deterministic
5
+ * graders and a harness fingerprint.
6
6
  *
7
- * wstack bench run --suite <id> --models <config> [...]
8
- * wstack bench mine --transcript <session.jsonl> [--out <eval-dir>]
9
- * wstack bench report <dir>
10
- * wstack bench list [--models <config>]
7
+ * wstack bench run --suite <id> [--cell spec | --models config] [...]
8
+ * wstack bench mine --transcript <session.jsonl> [--out <eval-dir>]
9
+ * wstack bench report <dir>
10
+ * wstack bench compare <baseline-dir> <candidate-dir>
11
+ * wstack bench list [--models <config>]
11
12
  */
12
13
  export declare const benchCmd: SubcommandHandler;
13
14
  //# sourceMappingURL=bench.d.ts.map
@@ -0,0 +1,9 @@
1
+ import {
2
+ subcommandNames,
3
+ subcommands
4
+ } from "./chunk-ETYHZPXP.js";
5
+ export {
6
+ subcommandNames,
7
+ subcommands
8
+ };
9
+ //# sourceMappingURL=subcommands-HZQKA4G2.js.map
@@ -1,4 +1,3 @@
1
- import "./chunk-7OCVIDC7.js";
2
1
 
3
2
  // src/subcommands/handlers/tools-skills.ts
4
3
  import { color } from "@wrongstack/core/utils";
@@ -26,4 +25,4 @@ export {
26
25
  skillsCmd,
27
26
  toolsCmd
28
27
  };
29
- //# sourceMappingURL=tools-skills-Q4P27URS.js.map
28
+ //# sourceMappingURL=tools-skills-GH24UCBY.js.map
@@ -6,11 +6,10 @@ import {
6
6
  } from "./chunk-DE7BZDNK.js";
7
7
  import "./chunk-U3SS4NRH.js";
8
8
  import "./chunk-YLQEGYV4.js";
9
- import "./chunk-7OCVIDC7.js";
10
9
  export {
11
10
  detectUpdatePackageManager,
12
11
  detectUpdatePackageName,
13
12
  runUpdateCommand,
14
13
  updateCmd
15
14
  };
16
- //# sourceMappingURL=update-K45CS6SS.js.map
15
+ //# sourceMappingURL=update-5DPB4YD4.js.map
@@ -6,7 +6,6 @@ import {
6
6
  getUpdateNotification,
7
7
  isNewer
8
8
  } from "./chunk-YLQEGYV4.js";
9
- import "./chunk-7OCVIDC7.js";
10
9
  export {
11
10
  cachePath,
12
11
  checkForUpdate,
@@ -15,4 +14,4 @@ export {
15
14
  getUpdateNotification,
16
15
  isNewer
17
16
  };
18
- //# sourceMappingURL=update-check-PKSMSMD6.js.map
17
+ //# sourceMappingURL=update-check-BS3DHTSI.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ helpCmd,
3
+ versionCmd
4
+ } from "./chunk-FPIWTJ2G.js";
5
+ import "./chunk-XJXDOF63.js";
6
+ export {
7
+ helpCmd,
8
+ versionCmd
9
+ };
10
+ //# sourceMappingURL=version-help-MYKF724O.js.map
@@ -1,7 +1,9 @@
1
1
  import { type HqCommandController } from '../hq-command-controller.js';
2
2
  export interface WebuiHqControlHooks {
3
- interruptLeader: () => boolean;
3
+ interruptLeader: (sessionId?: string) => boolean;
4
4
  allowRunCommand: () => boolean;
5
+ /** Does this host currently own the named session (an open tab)? */
6
+ ownsSession?: ((sessionId: string) => boolean) | undefined;
5
7
  spawnAgent?: HqCommandController['spawnAgent'];
6
8
  killFleet?: HqCommandController['killFleet'];
7
9
  terminateAgent?: HqCommandController['terminateAgent'];
@@ -12,6 +14,12 @@ export interface WebuiClientRegistrationDeps {
12
14
  events: import('@wrongstack/core/kernel').EventBus;
13
15
  hqSessionId: string;
14
16
  getSessionId: () => string;
17
+ /** Session ids the connected browsers display — one per open tab. */
18
+ listSessions?: (() => readonly string[]) | undefined;
19
+ /** Sessions another publisher in this process already announces to HQ. */
20
+ isSessionOwnedElsewhere?: ((sessionId: string) => boolean) | undefined;
21
+ /** A tab's own session writer, so HQ streams its turns without a disk tail. */
22
+ getSessionWriter?: ((sessionId: string) => import('@wrongstack/core/types').SessionWriter | undefined) | undefined;
15
23
  hqControl?: WebuiHqControlHooks | undefined;
16
24
  }
17
25
  export interface WebuiClientRegistration {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createHqCommandDispatcher
3
- } from "./chunk-7YLN7YUA.js";
3
+ } from "./chunk-IMWXXF4J.js";
4
4
  import {
5
5
  WEBUI_SESSION_CHILD_CAPABILITIES
6
6
  } from "./chunk-GPPRNAKW.js";
@@ -9,12 +9,11 @@ import {
9
9
  } from "./chunk-VCYZ3WZV.js";
10
10
  import {
11
11
  startCliHqConnection
12
- } from "./chunk-XYKYXFEE.js";
12
+ } from "./chunk-TE3Q32JP.js";
13
13
  import {
14
14
  loadConfigProviders,
15
15
  mutateConfigProviders
16
- } from "./chunk-XPX432BZ.js";
17
- import "./chunk-7OCVIDC7.js";
16
+ } from "./chunk-DR2OXU46.js";
18
17
 
19
18
  // src/webui-server.ts
20
19
  import * as path7 from "node:path";
@@ -41,6 +40,7 @@ import {
41
40
  resolvePendingConfirmsForSession,
42
41
  scheduleOwnerlessEmptySessionCleanup,
43
42
  sendSerialized,
43
+ stampDispatchSession,
44
44
  startTerminalDashboard,
45
45
  startWebUILiveStatusLogger,
46
46
  toSessionHistoryEntries
@@ -48,6 +48,7 @@ import {
48
48
  import { WebSocketServer } from "ws";
49
49
 
50
50
  // src/webui-server/client-registration.ts
51
+ import { mailboxSessionTag } from "@wrongstack/core/coordination";
51
52
  import { createWebuiClientPresence } from "@wrongstack/webui-server";
52
53
  function createWebuiClientRegistration(deps) {
53
54
  const control = deps.hqControl;
@@ -57,6 +58,9 @@ function createWebuiClientRegistration(deps) {
57
58
  events: deps.events,
58
59
  hqSessionId: deps.hqSessionId,
59
60
  getSessionId: deps.getSessionId,
61
+ ...deps.listSessions ? { listSessions: deps.listSessions } : {},
62
+ ...deps.isSessionOwnedElsewhere ? { isSessionOwnedElsewhere: deps.isSessionOwnedElsewhere } : {},
63
+ ...deps.getSessionWriter ? { getSessionWriter: deps.getSessionWriter } : {},
60
64
  startHqConnection: (options) => startCliHqConnection({
61
65
  ...options,
62
66
  capabilities: options.capabilities
@@ -66,7 +70,17 @@ function createWebuiClientRegistration(deps) {
66
70
  steerMailbox: mailbox,
67
71
  interruptLeader: control.interruptLeader,
68
72
  allowRunCommand: control.allowRunCommand,
69
- sessionTag: deps.getSessionId,
73
+ // The session HQ actually SHOWS for this client — the boot
74
+ // session the telemetry bridge publishes under and the only one
75
+ // `interruptLeader` speaks for. `getSessionId` follows whichever
76
+ // browser tab is in front, which is a different session HQ has
77
+ // no view of and cannot control.
78
+ sessionTag: () => mailboxSessionTag(deps.hqSessionId),
79
+ // The session HQ falls back to when a command names none — the
80
+ // boot tab. A command that DOES name one is honoured (and
81
+ // refused when this host no longer has it) via `ownsSession`.
82
+ sessionId: () => deps.hqSessionId,
83
+ ...control.ownsSession ? { ownsSession: control.ownsSession } : {},
70
84
  ...control.spawnAgent ? { spawnAgent: control.spawnAgent } : {},
71
85
  ...control.killFleet ? { killFleet: control.killFleet } : {},
72
86
  ...control.terminateAgent ? { terminateAgent: control.terminateAgent } : {}
@@ -1175,7 +1189,7 @@ function createSessionStartPayloadBuilder(deps) {
1175
1189
  }
1176
1190
 
1177
1191
  // src/webui-server/setup-events.ts
1178
- import { mailboxSessionTag } from "@wrongstack/core/coordination";
1192
+ import { mailboxSessionTag as mailboxSessionTag2 } from "@wrongstack/core/coordination";
1179
1193
  import {
1180
1194
  createEternalSubscription,
1181
1195
  setupEvents as setupCanonicalEvents
@@ -1246,7 +1260,7 @@ function createSetupEvents(deps) {
1246
1260
  type: "subagent.event",
1247
1261
  payload: deps.sessionPayload({
1248
1262
  kind: "leader_updated",
1249
- subagentId: `leader@${mailboxSessionTag(deps.currentSessionId())}`,
1263
+ subagentId: `leader@${mailboxSessionTag2(deps.currentSessionId())}`,
1250
1264
  isLeader: true,
1251
1265
  name: "Leader",
1252
1266
  status: "running"
@@ -1391,6 +1405,23 @@ async function runWebUI(opts) {
1391
1405
  events: opts.events,
1392
1406
  hqSessionId: opts.session.id,
1393
1407
  getSessionId: () => opts.agent.ctx.session?.id ?? opts.session.id,
1408
+ // One HQ session per open tab. The set is the same one the terminal
1409
+ // panel lists: every session a connected browser is displaying.
1410
+ listSessions: () => {
1411
+ const ids = /* @__PURE__ */ new Set();
1412
+ for (const client of clients.values()) {
1413
+ if (client.sessionId) ids.add(client.sessionId);
1414
+ for (const id of client.sessionIds ?? []) ids.add(id);
1415
+ }
1416
+ return [...ids];
1417
+ },
1418
+ // `cli-main` already runs a tracker and a bridge for the boot session.
1419
+ // Announcing it here too would put two trackers on one bus flushing the
1420
+ // same agent list.
1421
+ isSessionOwnedElsewhere: (sessionId) => sessionId === opts.session.id,
1422
+ // The tab's own journal, so HQ takes its turns from the write path
1423
+ // instead of tailing the file.
1424
+ getSessionWriter: (sessionId) => sessionAgentsRef?.peek(sessionId)?.ctx.session,
1394
1425
  hqControl: {
1395
1426
  // HQ speaks for the LEADER — the boot session, the one it registered
1396
1427
  // itself under (`hqSessionId`) — not for whatever else the browser
@@ -1399,8 +1430,12 @@ async function runWebUI(opts) {
1399
1430
  // the three other tabs' in-flight runs. Deleting the entries was
1400
1431
  // wrong on its own terms too: the run's own `end()` owns removal, and
1401
1432
  // clearing early makes `isRunActive` lie to every tab still running.
1402
- interruptLeader: () => {
1403
- const leaderId = opts.session.id;
1433
+ // Every open tab is its own session with its own abort controller, so
1434
+ // the command's session is the one that gets stopped. Falling back to
1435
+ // the boot session keeps a dashboard that sends no session — every one
1436
+ // before this existed — behaving exactly as before.
1437
+ interruptLeader: (sessionId) => {
1438
+ const leaderId = sessionId ?? opts.session.id;
1404
1439
  const controller = abortControllers.get(leaderId);
1405
1440
  if (!controller) return false;
1406
1441
  controller.abort();
@@ -1410,7 +1445,11 @@ async function runWebUI(opts) {
1410
1445
  }
1411
1446
  return true;
1412
1447
  },
1413
- allowRunCommand: () => opts.hqAllowExec === true
1448
+ allowRunCommand: () => opts.hqAllowExec === true,
1449
+ // A command naming a tab this process no longer holds is refused, not
1450
+ // redirected onto the boot session: the operator picked a terminal,
1451
+ // and steering a different one is worse than not steering at all.
1452
+ ownsSession: (sessionId) => sessionId === opts.session.id || sessionAgentsRef?.has(sessionId) === true
1414
1453
  }
1415
1454
  });
1416
1455
  registerWebuiClient();
@@ -1890,7 +1929,7 @@ async function runWebUI(opts) {
1890
1929
  registerWebuiSignalHandlers(signalShutdown);
1891
1930
  });
1892
1931
  function send(ws, msg) {
1893
- sendSerialized(ws, JSON.stringify(msg));
1932
+ sendSerialized(ws, JSON.stringify(stampDispatchSession(msg)));
1894
1933
  }
1895
1934
  function broadcast(msg, targetSessionId) {
1896
1935
  const data = JSON.stringify(msg);
@@ -1912,4 +1951,4 @@ async function runWebUI(opts) {
1912
1951
  export {
1913
1952
  runWebUI
1914
1953
  };
1915
- //# sourceMappingURL=webui-server-F7MSRHOF.js.map
1954
+ //# sourceMappingURL=webui-server-T6AMOXJJ.js.map
@@ -67,6 +67,8 @@ interface BrainOrchestrationDeps {
67
67
  interface BrainOrchestrationResult {
68
68
  brain: ObservableBrainArbiter;
69
69
  brainLog: AnyObj[];
70
+ /** Session-lifetime per-tier decision tally for `/brain stats`. */
71
+ brainTierStats: () => import('@wrongstack/core/coordination').BrainTierStats;
70
72
  brainSettings: BrainRuntimeSettings;
71
73
  /** Live-editable Brain config owner (apply = live + persist-to-global). */
72
74
  brainRuntime: BrainRuntime;
@@ -54,6 +54,7 @@ export declare function runCliExecution(params: {
54
54
  resolvedProvider: X['provider']['resolvedProvider'];
55
55
  logger: Logger;
56
56
  switchProviderAndModel: X['provider']['switchProviderAndModel'];
57
+ reloadProviderConfig: () => Promise<void>;
57
58
  applyMaxContext: NonNullable<X['provider']['onModelContextResolved']>;
58
59
  renderer: X['ui']['renderer'];
59
60
  reader: X['ui']['reader'];
@@ -86,6 +87,9 @@ export declare function runCliExecution(params: {
86
87
  statuslineLines?: RC['statuslineLines'];
87
88
  setStatuslineLines?: NonNullable<RC['setStatuslineLines']>;
88
89
  saveStatuslineLines?: NonNullable<RC['saveStatuslineLines']>;
90
+ statuslineDensities?: RC['statuslineDensities'];
91
+ setStatuslineDensities?: NonNullable<RC['setStatuslineDensities']>;
92
+ saveStatuslineDensities?: NonNullable<RC['saveStatuslineDensities']>;
89
93
  setYoloMode: NonNullable<RC['getYolo']>;
90
94
  autonomyMode: ReturnType<RC['getAutonomy']>;
91
95
  setAutonomyMode: NonNullable<RC['setAutonomy']>;
@@ -62,6 +62,7 @@ export declare function setupCliSlashCommands(params: {
62
62
  brainSettings: B['brainSettings'];
63
63
  brainRuntime: B['brainRuntime'];
64
64
  initialBrainLog: ReturnType<NonNullable<B['getBrainLog']>>;
65
+ brainTierStats: NonNullable<B['brainTierStats']>;
65
66
  coordinatorController: B['coordinatorController'];
66
67
  statusTracker: B['statusTracker'];
67
68
  shadowController: B['shadowController'];