@wrongstack/cli 0.313.1 → 0.316.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.
Files changed (233) hide show
  1. package/dist/{acp-LQMSMV32.js → acp-CEQINXWB.js} +2 -2
  2. package/dist/acp-registry-cache.d.ts +0 -2
  3. package/dist/acp-server-agent.d.ts +2 -1
  4. package/dist/arg-parser.d.ts +2 -1
  5. package/dist/{auth-VQMSZGKE.js → auth-GZ5A5OF5.js} +3 -3
  6. package/dist/auth-menu/local.d.ts +3 -2
  7. package/dist/boot/boot-auto-thin.d.ts +44 -0
  8. package/dist/boot/brain-decision-log.d.ts +2 -1
  9. package/dist/boot/config-backup-recovery.d.ts +2 -6
  10. package/dist/boot/dispatch-singleshot.d.ts +2 -1
  11. package/dist/boot/dispatch-webui.d.ts +5 -1
  12. package/dist/boot/event-wiring.d.ts +1 -1
  13. package/dist/boot/execution-mode.d.ts +2 -1
  14. package/dist/boot/governance-shadow-bridge.d.ts +4 -3
  15. package/dist/boot/governance-trace-context.d.ts +4 -4
  16. package/dist/boot/launch-menu.d.ts +2 -2
  17. package/dist/boot/system-prompt-builder.d.ts +1 -1
  18. package/dist/boot/system-prompt-menu.d.ts +10 -58
  19. package/dist/boot/system-prompt.d.ts +3 -3
  20. package/dist/boot/tool-registry.d.ts +3 -1
  21. package/dist/boot/tui-coordinator-callbacks.d.ts +2 -1
  22. package/dist/boot/tui-coordinator-setup.d.ts +3 -2
  23. package/dist/boot/tui-goal-wiring.d.ts +2 -1
  24. package/dist/boot/tui-live-sessions.d.ts +3 -1
  25. package/dist/boot/tui-session-resume.d.ts +82 -10
  26. package/dist/boot/tui-session-stub-enrich.d.ts +7 -1
  27. package/dist/boot/tui-settings-adapter.d.ts +3 -2
  28. package/dist/boot/tui-theme-adapter.d.ts +3 -2
  29. package/dist/boot/webui-session-child.d.ts +2 -12
  30. package/dist/boot-auto-thin-BZ675EVT.js +102 -0
  31. package/dist/boot-config.d.ts +1 -1
  32. package/dist/brain-menu/panel-service.d.ts +2 -1
  33. package/dist/chimera-cascade-evidence.d.ts +4 -21
  34. package/dist/chimera-review-task.d.ts +0 -7
  35. package/dist/chimera-subagent-ladder.d.ts +2 -2
  36. package/dist/{chunk-USYOJIV2.js → chunk-32MTOI2I.js} +2 -2
  37. package/dist/{chunk-CNQZ4HG4.js → chunk-37SPPLUD.js} +57 -8
  38. package/dist/chunk-ALE5KHCA.js +1 -0
  39. package/dist/{chunk-GWVLRUVH.js → chunk-G3IMKQRH.js} +25 -6
  40. package/dist/{chunk-BZJ4MP32.js → chunk-GKHUHAIK.js} +8 -3
  41. package/dist/{chunk-3JPTNADJ.js → chunk-GPPRNAKW.js} +1 -1
  42. package/dist/{chunk-KE7E7DPX.js → chunk-HXJYHAR4.js} +1 -1
  43. package/dist/{chunk-X3N5TS2S.js → chunk-JACOMTIH.js} +2 -76
  44. package/dist/{chunk-DGXNL7OT.js → chunk-JHUJUIOH.js} +1 -18
  45. package/dist/{chunk-WOTGMHAH.js → chunk-KG4X5F7Z.js} +1 -1
  46. package/dist/{chunk-NUIHRGPY.js → chunk-NV3JDK4F.js} +1 -1
  47. package/dist/{chunk-E3X4KM7T.js → chunk-NZZOYLQ7.js} +5 -10
  48. package/dist/{chunk-H6C7SO5H.js → chunk-QC5I4VWZ.js} +1 -1
  49. package/dist/chunk-SXJTVNWF.js +78 -0
  50. package/dist/{chunk-AOAIPYFB.js → chunk-SYIBTG3X.js} +2 -2
  51. package/dist/{chunk-PKHGLWUJ.js → chunk-T642Q732.js} +5 -4
  52. package/dist/{chunk-BGFM3PD7.js → chunk-UZ2TMHNH.js} +1 -1
  53. package/dist/{chunk-4S52MIIM.js → chunk-VXCCBI2W.js} +2 -2
  54. package/dist/{chunk-FKWHSFX4.js → chunk-XYKYXFEE.js} +1 -1
  55. package/dist/cli-entry-point.d.ts +9 -0
  56. package/dist/cli-eternal-flag.d.ts +1 -1
  57. package/dist/{cli-main-UOQ2ICUO.js → cli-main-IEAM6SK7.js} +3578 -1626
  58. package/dist/cli-main-helpers.d.ts +3 -3
  59. package/dist/config-doctor.d.ts +34 -3
  60. package/dist/context-limit.d.ts +4 -3
  61. package/dist/{diag-doctor-OPTB2NWY.js → diag-doctor-LFCCBPMD.js} +3 -3
  62. package/dist/execute-deps.d.ts +36 -7
  63. package/dist/{execution-L4CXQEND.js → execution-TZUGCKFU.js} +459 -77
  64. package/dist/execution-chimera-cascade.d.ts +1 -1
  65. package/dist/execution-chimera-review.d.ts +1 -1
  66. package/dist/execution-cleanup.d.ts +2 -1
  67. package/dist/execution-kanban-dispatch.d.ts +2 -1
  68. package/dist/execution-repl-fleet-callbacks.d.ts +3 -2
  69. package/dist/fleet/budget-source.d.ts +2 -1
  70. package/dist/fleet/host-context.d.ts +8 -1
  71. package/dist/fleet/host-director-event-bridges.d.ts +28 -3
  72. package/dist/fleet/host-event-bridge.d.ts +6 -1
  73. package/dist/fleet/host-explore-companion-registry.d.ts +60 -0
  74. package/dist/fleet/host-explore-companion.d.ts +7 -3
  75. package/dist/fleet/host-provider.d.ts +2 -1
  76. package/dist/fleet/host-session-writer.d.ts +9 -1
  77. package/dist/fleet/host-shadow-manager.d.ts +82 -20
  78. package/dist/fleet/host-shadow-pass.d.ts +9 -1
  79. package/dist/fleet/host-spawn-types.d.ts +9 -0
  80. package/dist/fleet/host-status.d.ts +2 -1
  81. package/dist/fleet/host-subagent-factory.d.ts +2 -1
  82. package/dist/fleet/host-subagent-session-audit.d.ts +56 -0
  83. package/dist/fleet/host-supervisor.d.ts +11 -1
  84. package/dist/fleet/host-task-result-report.d.ts +2 -1
  85. package/dist/fleet/host.d.ts +38 -6
  86. package/dist/fleet/status-broadcast.d.ts +2 -1
  87. package/dist/fleet-statusline.d.ts +2 -1
  88. package/dist/goal-host.d.ts +3 -2
  89. package/dist/{governance-V2Z42RBE.js → governance-JSGHHA2R.js} +1 -1
  90. package/dist/governance-hq-telemetry.d.ts +2 -2
  91. package/dist/{hq-2XIXGAER.js → hq-NDTJRRX3.js} +3 -3
  92. package/dist/hq-publisher.d.ts +1 -1
  93. package/dist/hq-recovery-html.d.ts +1 -6
  94. package/dist/hq-server/auth-state.d.ts +2 -1
  95. package/dist/hq-server/auth.d.ts +3 -2
  96. package/dist/hq-server/login-attempt-store.d.ts +2 -1
  97. package/dist/hq-server/mailbox-gateway-manager.d.ts +2 -1
  98. package/dist/hq-server/preflight.d.ts +3 -2
  99. package/dist/hq-server/server-lifecycle.d.ts +2 -1
  100. package/dist/hq-server/snapshot.d.ts +0 -9
  101. package/dist/hq-server/startup.d.ts +2 -3
  102. package/dist/hq-server/types.d.ts +2 -2
  103. package/dist/hq-server/upgrade-handler.d.ts +2 -1
  104. package/dist/hq-server/ws-leader.d.ts +0 -6
  105. package/dist/{hq-server-DBT3OOYD.js → hq-server-OH3SPSE2.js} +3 -13
  106. package/dist/hq-server.d.ts +1 -6
  107. package/dist/hq-static-serve.d.ts +2 -1
  108. package/dist/{hq-ttl-U2FAYFAT.js → hq-ttl-KUO3AU7X.js} +2 -2
  109. package/dist/{hq-tunnel-RFKGC4HI.js → hq-tunnel-LO55RCZE.js} +1 -1
  110. package/dist/hq-tunnel.d.ts +2 -1
  111. package/dist/index.js +113 -109
  112. package/dist/input-reader.d.ts +2 -1
  113. package/dist/kanban-dispatch-route.d.ts +27 -2
  114. package/dist/kanban-hq-sync.d.ts +2 -1
  115. package/dist/launch-hints.d.ts +2 -1
  116. package/dist/mailbox-bridge-bootstrap.d.ts +2 -3
  117. package/dist/{mailbox-serve-5S3PHG5D.js → mailbox-serve-VKQIRCCB.js} +47 -28
  118. package/dist/{mcp-RRPKNRSN.js → mcp-AQKSASHD.js} +1 -1
  119. package/dist/mcp-serve.d.ts +2 -1
  120. package/dist/{modeldiag-H6DKWJ2N.js → modeldiag-4NYBRSFP.js} +1 -1
  121. package/dist/next-task-predictor.d.ts +3 -2
  122. package/dist/permission-prompt.d.ts +2 -1
  123. package/dist/picker.d.ts +0 -18
  124. package/dist/plugin-management.d.ts +3 -14
  125. package/dist/{plugin-usage-GCTYOZPH.js → plugin-usage-AP7SJCDA.js} +2 -2
  126. package/dist/{plugins-EEKHCMBE.js → plugins-HQ5FU2AM.js} +3 -5
  127. package/dist/preflight.d.ts +2 -1
  128. package/dist/{proxy-wiring-G26YGP7S.js → proxy-wiring-EQB5X5YH.js} +3 -3
  129. package/dist/renderer.d.ts +18 -1
  130. package/dist/repl-client-registration.d.ts +2 -1
  131. package/dist/repl.d.ts +1 -1
  132. package/dist/{replay-XU6ZD7GM.js → replay-FJ2JBXUA.js} +1 -1
  133. package/dist/{sdd-runtime-GFZ3NJKS.js → sdd-runtime-FLKCSTYV.js} +3 -5
  134. package/dist/services/commit-message.d.ts +2 -1
  135. package/dist/services/sdd/state.d.ts +0 -2
  136. package/dist/services/sdd-runtime.d.ts +1 -1
  137. package/dist/services/statusline-config.d.ts +27 -4
  138. package/dist/session-event-wiring.d.ts +3 -5
  139. package/dist/{sessions-config-7Q7QJBKJ.js → sessions-config-P2LK2L32.js} +5 -1
  140. package/dist/sessions-doctor-EXHAZSSE.js +146 -0
  141. package/dist/settings-menu.d.ts +2 -1
  142. package/dist/shutdown-cleanup.d.ts +3 -2
  143. package/dist/{simpleui-dist-33VO3QHF.js → simpleui-dist-JKNRCRRK.js} +1 -1
  144. package/dist/simpleui-dist.d.ts +3 -2
  145. package/dist/slash-commands/brain-council.d.ts +0 -4
  146. package/dist/slash-commands/brain-status.d.ts +0 -1
  147. package/dist/slash-commands/command-context.d.ts +16 -2
  148. package/dist/slash-commands/fix-classifier.d.ts +2 -1
  149. package/dist/slash-commands/kanban-agent-helpers.d.ts +2 -1
  150. package/dist/slash-commands/kanban-board-handlers.d.ts +2 -1
  151. package/dist/slash-commands/kanban-lifecycle-diagnostics.d.ts +2 -1
  152. package/dist/slash-commands/kanban-task-subcommands.d.ts +0 -1
  153. package/dist/slash-commands/memory-audience.d.ts +1 -10
  154. package/dist/slash-commands/memory-flags.d.ts +2 -1
  155. package/dist/slash-commands/sdd-command-helpers.d.ts +3 -2
  156. package/dist/slash-commands/sdd.d.ts +2 -2
  157. package/dist/slash-commands/settings-mutations.d.ts +0 -1
  158. package/dist/slash-commands/statusline.d.ts +4 -4
  159. package/dist/slash-commands/telegram-pairing.d.ts +2 -2
  160. package/dist/slash-commands/telegram-setup.d.ts +2 -1
  161. package/dist/slash-commands/tier.d.ts +13 -0
  162. package/dist/subcommands/handlers/acp-connection-gate.d.ts +4 -3
  163. package/dist/subcommands/handlers/bench-run-help.d.ts +3 -8
  164. package/dist/subcommands/handlers/daemon-inventory.d.ts +3 -2
  165. package/dist/subcommands/handlers/governance.d.ts +2 -1
  166. package/dist/subcommands/handlers/model-smoke-test.d.ts +3 -2
  167. package/dist/subcommands/handlers/modeldiag-eval.d.ts +0 -4
  168. package/dist/subcommands/handlers/modeldiag-profiles.d.ts +1 -1
  169. package/dist/subcommands/handlers/models-add-help.d.ts +3 -8
  170. package/dist/subcommands/handlers/sessions-doctor.d.ts +3 -0
  171. package/dist/subcommands/handlers/update.d.ts +1 -1
  172. package/dist/terminal-format.d.ts +3 -2
  173. package/dist/tui-resource-menus.d.ts +2 -1
  174. package/dist/tuneup.d.ts +5 -5
  175. package/dist/{update-ZXNC6I6G.js → update-XKARO3CY.js} +3 -3
  176. package/dist/{update-check-WARHSVZA.js → update-check-LICQNYFK.js} +2 -2
  177. package/dist/update-check.d.ts +1 -1
  178. package/dist/utils/hq-ttl.d.ts +2 -1
  179. package/dist/webui-server/connection-handler.d.ts +34 -2
  180. package/dist/webui-server/prefs-seeding.d.ts +11 -1
  181. package/dist/webui-server/route-contexts.d.ts +45 -5
  182. package/dist/webui-server/session-start-payload.d.ts +13 -0
  183. package/dist/webui-server/setup-events.d.ts +14 -1
  184. package/dist/{webui-server-I53IYBW4.js → webui-server-LZOEH7O6.js} +374 -169
  185. package/dist/webui-server-options.d.ts +30 -4
  186. package/dist/wiring/brain-and-orchestration.d.ts +3 -3
  187. package/dist/wiring/cli-execute-builder.d.ts +3 -0
  188. package/dist/wiring/cli-heap-watchdog.d.ts +2 -1
  189. package/dist/wiring/cli-prompt-and-tools-setup.d.ts +10 -8
  190. package/dist/wiring/codebase-index.d.ts +2 -1
  191. package/dist/wiring/command-host-state.d.ts +61 -5
  192. package/dist/wiring/controllers.d.ts +3 -4
  193. package/dist/wiring/dep-watcher-bridge.d.ts +3 -2
  194. package/dist/wiring/dep-watcher.d.ts +2 -1
  195. package/dist/wiring/design-studio.d.ts +2 -1
  196. package/dist/wiring/director-setup.d.ts +3 -2
  197. package/dist/wiring/domain-terms-mirror.d.ts +2 -1
  198. package/dist/wiring/external-plugins.d.ts +3 -2
  199. package/dist/wiring/fleet-command-handlers.d.ts +2 -2
  200. package/dist/wiring/heap-watchdog-setup.d.ts +2 -1
  201. package/dist/wiring/hq-telemetry.d.ts +3 -2
  202. package/dist/wiring/lifecycle-plugins.d.ts +2 -2
  203. package/dist/wiring/management-tools.d.ts +30 -2
  204. package/dist/wiring/metrics.d.ts +2 -2
  205. package/dist/wiring/plugins.d.ts +0 -1
  206. package/dist/wiring/prompt-journal-recorder.d.ts +1 -1
  207. package/dist/wiring/provider-runtime-setup.d.ts +9 -2
  208. package/dist/wiring/provider-runtime.d.ts +23 -3
  209. package/dist/wiring/provider-status.d.ts +2 -1
  210. package/dist/wiring/provider-utility-tools.d.ts +2 -1
  211. package/dist/wiring/provider.d.ts +2 -1
  212. package/dist/wiring/replay-governance-setup.d.ts +2 -1
  213. package/dist/wiring/replay.d.ts +2 -1
  214. package/dist/wiring/resume-candidate.d.ts +27 -0
  215. package/dist/wiring/runtime-controller-deps.d.ts +8 -1
  216. package/dist/wiring/runtime-dispatch-state.d.ts +2 -1
  217. package/dist/wiring/runtime-lifecycle-deps.d.ts +2 -1
  218. package/dist/wiring/runtime-picker-deps.d.ts +2 -1
  219. package/dist/wiring/session-command-handlers.d.ts +2 -2
  220. package/dist/wiring/session-establishment.d.ts +2 -1
  221. package/dist/wiring/session-registry.d.ts +3 -2
  222. package/dist/wiring/session-runtime.d.ts +1 -1
  223. package/dist/wiring/slash-commands.d.ts +5 -4
  224. package/dist/wiring/teardown-registrar.d.ts +3 -2
  225. package/dist/wiring/vector-memory-setup.d.ts +3 -2
  226. package/dist/wiring/wrongtrace-hooks.d.ts +1 -1
  227. package/dist/wiring/wrongtrace-telemetry.d.ts +2 -1
  228. package/dist/{wrongtrace-telemetry-6M2CCBX5.js → wrongtrace-telemetry-FNLANZ5I.js} +1 -1
  229. package/package.json +30 -30
  230. package/dist/auth-menu.d.ts +0 -7
  231. package/dist/chunk-WHOIR577.js +0 -1
  232. package/dist/webui-server/terminal-log-view.d.ts +0 -47
  233. package/dist/wiring/tools.d.ts +0 -29
@@ -4,11 +4,8 @@
4
4
  * @module slash-commands/brain-council
5
5
  */
6
6
  import { type BrainConfigPatch, type BrainConfigSnapshot } from '@wrongstack/core/execution';
7
- import type { BrainCouncilVoterConfig } from '@wrongstack/core/types';
8
7
  import type { SlashCommandContext } from './command-context.js';
9
- export declare const COUNCIL_RISKS: ReadonlySet<string>;
10
8
  export declare const COUNCIL_DISTINCTNESS: ReadonlySet<string>;
11
- export declare const COUNCIL_NUMERIC_OPS: Record<string, string | undefined>;
12
9
  export declare function parseRefEntry(ref: string): {
13
10
  provider?: string;
14
11
  model: string;
@@ -27,7 +24,6 @@ export declare function judgeSummary(s: {
27
24
  } | undefined;
28
25
  };
29
26
  }): string;
30
- export declare function parseSeat(token: string): BrainCouncilVoterConfig | null;
31
27
  export declare function handleBrainCouncilSubcommand(rest: string[], opts: SlashCommandContext, applyPatch: (patch: BrainConfigPatch, describe: (snapshot: BrainConfigSnapshot) => string) => Promise<{
32
28
  message: string;
33
29
  }>): Promise<{
@@ -4,7 +4,6 @@
4
4
  * @module slash-commands/brain-status
5
5
  */
6
6
  import type { SlashCommandContext } from './command-context.js';
7
- export declare const DETERMINISTIC_TIER_NAMES: string[];
8
7
  export declare function fmtAge(at: number): string;
9
8
  export declare function formatBrainStatus(opts: SlashCommandContext): string;
10
9
  export declare function formatBrainStats(opts: SlashCommandContext): string;
@@ -398,8 +398,8 @@ export interface SlashCommandContext {
398
398
  createProvider?: ((providerId: string) => import('@wrongstack/core/types').Provider | undefined) | undefined;
399
399
  /** StatusBar visibility config — loaded from the active profile/statusline.json */
400
400
  statuslineConfig?: {
401
- get: () => Promise<import('../services/statusline-config.js').StatuslineConfig>;
402
- set: (cfg: import('../services/statusline-config.js').StatuslineConfig) => Promise<void>;
401
+ get: () => Promise<import('../services/statusline-config.js').StatuslineDocument>;
402
+ set: (cfg: import('../services/statusline-config.js').StatuslineDocument) => Promise<void>;
403
403
  };
404
404
  /**
405
405
  * Current list of hidden status bar items. Written by the /statusline command
@@ -579,6 +579,20 @@ export interface SlashCommandContext {
579
579
  }>) | undefined;
580
580
  /** Config store for reading/writing config sections at runtime (e.g. settings menu). */
581
581
  configStore: import('@wrongstack/core/types').ConfigStore;
582
+ /**
583
+ * Optional accessor for the Chronicle metrics store. When wired, the
584
+ * `/tool autothin candidates` and `apply` commands can read the
585
+ * cross-session `tool_daily` rollup. Hosts that have not opened
586
+ * Chronicle (e.g. the bare TUI) leave this undefined and the
587
+ * in-process event-bridge Map is used as fallback.
588
+ */
589
+ getChronicle?: (() => import('@wrongstack/core/chronicle').ChronicleMetricsStore | undefined) | undefined;
590
+ /**
591
+ * Optional accessor for the in-process per-tool usage Map populated by
592
+ * `wireMetricsToEvents`. Used as the auto-thinning fallback when
593
+ * Chronicle is unavailable.
594
+ */
595
+ getToolUsage?: (() => import('@wrongstack/core/observability').ToolUsageSnapshot | undefined) | undefined;
582
596
  /** Models registry for looking up provider/model capabilities. */
583
597
  modelsRegistry?: import('@wrongstack/core/types').ModelsRegistry | undefined;
584
598
  /** Terminal reader for interactive user input (e.g. settings menu, auth menu). */
@@ -15,7 +15,7 @@ export interface Classification {
15
15
  confidence: number;
16
16
  detail: string;
17
17
  }
18
- export type ErrorCategory = 'ts' | 'security' | 'runtime' | 'logic' | 'compile' | 'lint' | 'dep' | 'perf' | 'infra' | 'tech' | 'general';
18
+ type ErrorCategory = 'ts' | 'security' | 'runtime' | 'logic' | 'compile' | 'lint' | 'dep' | 'perf' | 'infra' | 'tech' | 'general';
19
19
  /**
20
20
  * Classify a raw error message into structured metadata.
21
21
  * Patterns are checked in order — first match wins.
@@ -25,4 +25,5 @@ export declare function classifyError(input: string): Classification;
25
25
  export declare function needsSubagent(c: Classification): boolean;
26
26
  /** True if the fix can be done inline in a single step */
27
27
  export declare function isSimpleFix(c: Classification): boolean;
28
+ export {};
28
29
  //# sourceMappingURL=fix-classifier.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type KanbanBoard, type KanbanTask } from '@wrongstack/kanban';
2
- export interface KanbanAgentFlags {
2
+ interface KanbanAgentFlags {
3
3
  provider?: string | undefined;
4
4
  model?: string | undefined;
5
5
  name?: string | undefined;
@@ -15,4 +15,5 @@ export declare function parseKanbanAgentFlags(args: string[]): {
15
15
  };
16
16
  export declare function buildKanbanAgentPrompt(board: KanbanBoard, task: KanbanTask, assignment: KanbanTask['assignment']): string;
17
17
  export declare function splitCsv(value: string): string[];
18
+ export {};
18
19
  //# sourceMappingURL=kanban-agent-helpers.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { KanbanEventContext } from '@wrongstack/kanban';
1
2
  import type { SlashCommandContext } from './command-context.js';
2
3
  export declare function handlePruneSubcommand(projectRoot: string, rest: string[]): Promise<{
3
4
  message: string;
@@ -7,7 +8,7 @@ export declare function handleGraphSubcommand(opts: SlashCommandContext, project
7
8
  }): Promise<{
8
9
  message: string;
9
10
  }>;
10
- export declare function handleBoardGenerate(projectRoot: string, restJoined: string): Promise<{
11
+ export declare function handleBoardGenerate(projectRoot: string, restJoined: string, eventContext: KanbanEventContext): Promise<{
11
12
  message: string;
12
13
  }>;
13
14
  //# sourceMappingURL=kanban-board-handlers.d.ts.map
@@ -2,7 +2,7 @@ import { type KanbanBoard } from '@wrongstack/kanban';
2
2
  export declare function formatLifecycleDiagnosis(err: unknown, action: string): string;
3
3
  export declare const LIFECYCLE_STAGE_ALIASES: Record<string, string>;
4
4
  export declare function resolveColumnReference(board: KanbanBoard, requested: string): string | null;
5
- export interface TaskEvidenceFlags {
5
+ interface TaskEvidenceFlags {
6
6
  attachment?: string | undefined;
7
7
  note?: string | undefined;
8
8
  tickChecks: {
@@ -13,4 +13,5 @@ export interface TaskEvidenceFlags {
13
13
  warnings: string[];
14
14
  }
15
15
  export declare function parseTaskEvidenceFlags(tokens: readonly string[]): TaskEvidenceFlags;
16
+ export {};
16
17
  //# sourceMappingURL=kanban-lifecycle-diagnostics.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import type { SlashCommandContext } from './command-context.js';
2
- export declare function extractSpawnedSubagentId(summary: string): string | undefined;
3
2
  export declare function handleTaskSubcommand(opts: SlashCommandContext, projectRoot: string, args: string[], showHelp: () => {
4
3
  message: string;
5
4
  }): Promise<{
@@ -1,13 +1,4 @@
1
- import type { MemoryAudienceSelector, SageSurface } from '@wrongstack/sage';
2
- export interface ParsedAudienceFlags {
3
- roles?: string[];
4
- taskTypes?: string[];
5
- modes?: string[];
6
- errors: string[];
7
- }
8
- export declare function parseAudienceFlags(tokens: string[]): ParsedAudienceFlags;
9
- export declare function hasAudienceSelector(parsed: ParsedAudienceFlags): boolean;
10
- export declare function formatAudienceSelector(audience: MemoryAudienceSelector): string;
1
+ import type { SageSurface } from '@wrongstack/sage';
11
2
  export declare function runAudienceMemory(store: SageSurface, rest: string[]): Promise<{
12
3
  message: string;
13
4
  }>;
@@ -20,7 +20,7 @@ export interface ParsedMemoryFlags {
20
20
  * `--supersedes`, and `--contradicts` accept comma-separated lists.
21
21
  */
22
22
  export declare function parseMemoryFlags(tokens: string[]): ParsedMemoryFlags;
23
- export interface ParsedForFileFlags {
23
+ interface ParsedForFileFlags {
24
24
  singleLine: number | undefined;
25
25
  limit: number;
26
26
  showDeleted: boolean;
@@ -33,4 +33,5 @@ export interface ParsedForFileFlags {
33
33
  * validates against the canonical memory-record field set.
34
34
  */
35
35
  export declare function parseForFileFlags(tokens: string[]): ParsedForFileFlags;
36
+ export {};
36
37
  //# sourceMappingURL=memory-flags.d.ts.map
@@ -1,9 +1,9 @@
1
- export interface SddSubtaskInput {
1
+ interface SddSubtaskInput {
2
2
  title: string;
3
3
  description: string;
4
4
  }
5
5
  export declare const SDD_KNOWN_SUBCOMMANDS: string[];
6
- export interface SddDestroyResult {
6
+ interface SddDestroyResult {
7
7
  worktreesRemoved: number;
8
8
  deleted: readonly string[];
9
9
  reverted: number;
@@ -20,4 +20,5 @@ export declare function parseParallelSlots(input: string): {
20
20
  } | undefined;
21
21
  export declare function parseSddSubtasks(parts: readonly string[]): SddSubtaskInput[];
22
22
  export declare function formatSddDestroyResult(res: SddDestroyResult, revertMerged: boolean): string;
23
+ export {};
23
24
  //# sourceMappingURL=sdd-command-helpers.d.ts.map
@@ -4,8 +4,8 @@ import type { SlashCommandContext } from './command-context.js';
4
4
  export type { TaskProgress } from '@wrongstack/core/types';
5
5
  export { findSpec, gatherProjectContext, getActiveBuilder, getActiveSDDContext, getActiveSDDPhase, } from '../services/sdd/project-context.js';
6
6
  export { autoDetectTaskCompletion, isExplanatoryText, trySaveImplementationPlan, trySaveSpecFromAIOutput, } from '../services/sdd/spec-detection.js';
7
- export { getSessionState, SDDState, sddState } from '../services/sdd/state.js';
8
- export { advanceToNextTask, formatElapsed, getCurrentExecutingContext, getCurrentTask, getTaskGraphId, getTaskListText, getTaskProgress, getTaskTrackerExport, markTaskCompleted, renderTaskListWithProgress, trySaveTasksFromAIOutput, } from '../services/sdd/task-manager.js';
7
+ export { SDDState, sddState } from '../services/sdd/state.js';
8
+ export { advanceToNextTask, formatElapsed, getCurrentExecutingContext, getTaskGraphId, getTaskListText, getTaskProgress, getTaskTrackerExport, markTaskCompleted, renderTaskListWithProgress, trySaveTasksFromAIOutput } from '../services/sdd/task-manager.js';
9
9
  export { renderProgress };
10
10
  export declare function getTaskTracker(): TaskTracker | null;
11
11
  /**
@@ -1,5 +1,4 @@
1
1
  import type { SlashCommandContext } from './command-context.js';
2
- export declare const ALL_SETTINGS_KEYS: string[];
3
2
  export declare function executeSettingsSubcommand(sub: string, rest: string[], opts: SlashCommandContext): Promise<{
4
3
  message: string;
5
4
  }>;
@@ -1,13 +1,13 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
- import { type StatuslineConfig, type StatuslineConfigKey } from '../services/statusline-config.js';
3
- export { DEFAULTS, ensureStatuslineConfig, loadStatuslineConfig, STATUSLINE_CONFIG_KEYS, type StatuslineConfig, type StatuslineConfigKey, saveStatuslineConfig, } from '../services/statusline-config.js';
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';
4
4
  export interface StatuslineCommandDeps {
5
5
  cwd: string;
6
6
  /** Current hidden items list. Written by the command when toggling. */
7
7
  hiddenItems: Array<StatuslineConfigKey>;
8
8
  setHiddenItems: (items: Array<StatuslineConfigKey>) => void;
9
- getConfig: () => Promise<StatuslineConfig>;
10
- setConfig: (cfg: StatuslineConfig) => Promise<void>;
9
+ getConfig: () => Promise<StatuslineDocument>;
10
+ setConfig: (cfg: StatuslineDocument) => Promise<void>;
11
11
  /**
12
12
  * Atomically updates hidden items in memory AND persists to disk.
13
13
  * Used by the TUI statusline picker.
@@ -15,7 +15,7 @@ export interface TelegramPairingUpdate {
15
15
  message?: TelegramPairingMessage | undefined;
16
16
  edited_message?: TelegramPairingMessage | undefined;
17
17
  }
18
- export type TelegramPairingChatType = 'private' | 'group' | 'supergroup' | 'channel' | 'unknown';
18
+ type TelegramPairingChatType = 'private' | 'group' | 'supergroup' | 'channel' | 'unknown';
19
19
  export interface TelegramPairingCandidate {
20
20
  chatId: number;
21
21
  userId: number;
@@ -24,7 +24,7 @@ export interface TelegramPairingCandidate {
24
24
  eligible: boolean;
25
25
  warning?: 'group' | 'ambiguous' | undefined;
26
26
  }
27
- export type TelegramPairingChoice = {
27
+ type TelegramPairingChoice = {
28
28
  kind: 'cancel';
29
29
  } | {
30
30
  kind: 'invalid';
@@ -1,6 +1,6 @@
1
1
  import type { SlashCommand } from '@wrongstack/core/types';
2
2
  import type { SlashCommandContext } from './command-context.js';
3
- export type TelegramChatIdClassification = {
3
+ type TelegramChatIdClassification = {
4
4
  kind: 'private';
5
5
  chatId: number;
6
6
  } | {
@@ -16,4 +16,5 @@ export declare function classifyTelegramChatId(value: string): TelegramChatIdCla
16
16
  * in the command line, terminal history, TUI transcript, or plaintext config.
17
17
  */
18
18
  export declare function buildTelegramSetupCommand(opts: SlashCommandContext): SlashCommand;
19
+ export {};
19
20
  //# sourceMappingURL=telegram-setup.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * `/tier` — the CLI/TUI surface for the deterministic model-tier layer.
3
+ *
4
+ * Sibling to `/fallback profile`: a profile answers "which models, in what
5
+ * order", and a tier answers "how expensive should this job be", binding a
6
+ * profile to a spend budget and to a routing rule. Everything this command
7
+ * writes lands in `modelTiers` in the active profile config, so the TUI menu,
8
+ * the WebUI editor and this command all read and write one place.
9
+ */
10
+ import type { SlashCommand } from '@wrongstack/core/types';
11
+ import type { SlashCommandContext } from './command-context.js';
12
+ export declare function buildTierCommand(opts: SlashCommandContext): SlashCommand;
13
+ //# sourceMappingURL=tier.d.ts.map
@@ -1,20 +1,21 @@
1
1
  import type { IncomingMessage } from 'node:http';
2
- export interface AcpGateVerdict {
2
+ interface AcpGateVerdict {
3
3
  ok: boolean;
4
4
  /** WebSocket close code to send when `ok` is false. */
5
5
  code?: number;
6
6
  reason?: string;
7
7
  }
8
- export interface AcpConnectionGateOptions {
8
+ interface AcpConnectionGateOptions {
9
9
  host: string;
10
10
  port: number;
11
11
  token: string;
12
12
  /** Concurrent connection ceiling. */
13
13
  maxConnections?: number;
14
14
  }
15
- export interface AcpConnectionGate {
15
+ interface AcpConnectionGate {
16
16
  /** Decide whether to admit a handshake. Does not mutate connection count. */
17
17
  check(req: Pick<IncomingMessage, 'headers' | 'url'>, liveConnections: number): AcpGateVerdict;
18
18
  }
19
19
  export declare function createAcpConnectionGate(opts: AcpConnectionGateOptions): AcpConnectionGate;
20
+ export {};
20
21
  //# sourceMappingURL=acp-connection-gate.d.ts.map
@@ -42,8 +42,8 @@ import type { TerminalRenderer } from '../../renderer.js';
42
42
  * - `'value'` — the flag accepts a value (`--flag <value>`).
43
43
  * The parser reads these via `flagStr(deps, name)` directly.
44
44
  */
45
- export type BenchRunFlagGroup = 'suite' | 'models' | 'control';
46
- export interface BenchRunFlag {
45
+ type BenchRunFlagGroup = 'suite' | 'models' | 'control';
46
+ interface BenchRunFlag {
47
47
  /** The flag's canonical name (no `--` prefix, no value placeholder). */
48
48
  name: string;
49
49
  /**
@@ -92,12 +92,6 @@ export declare const BENCH_RUN_BOOLEAN_FLAG_NAMES: ReadonlyArray<string>;
92
92
  * boolean list.
93
93
  */
94
94
  export declare const BENCH_RUN_VALUE_FLAG_NAMES: ReadonlyArray<string>;
95
- /**
96
- * The width of the flag column in the rendered help block.
97
- * Chosen so the longest flag (`--polyglot-dir <path>`) fits
98
- * with one space of padding before the description starts.
99
- */
100
- export declare const BENCH_RUN_FLAG_COLUMN_WIDTH = 28;
101
95
  /**
102
96
  * Build the `wstack bench run` help block as a string. The
103
97
  * returned string is the exact bytes the renderer would have
@@ -142,4 +136,5 @@ export declare function renderBenchRunHelp(renderer: TerminalRenderer): void;
142
136
  * import this function and call it directly.
143
137
  */
144
138
  export declare function buildBenchRunUsageLine(): string;
139
+ export {};
145
140
  //# sourceMappingURL=bench-run-help.d.ts.map
@@ -1,4 +1,4 @@
1
- export type DaemonStatus =
1
+ type DaemonStatus =
2
2
  /** Answering on its endpoint. */
3
3
  'live'
4
4
  /**
@@ -17,7 +17,7 @@ export interface DaemonReport {
17
17
  /** Owning process id, when a metadata file was readable. */
18
18
  readonly pid?: number;
19
19
  }
20
- export interface DaemonInventoryOptions {
20
+ interface DaemonInventoryOptions {
21
21
  readonly projectRoot: string;
22
22
  /**
23
23
  * The project's slot under the global root — `~/.wrongstack/projects/<hash>`,
@@ -38,4 +38,5 @@ export declare function collectDaemonReports(options: DaemonInventoryOptions): P
38
38
  * wedge is the whole job, and the next command that needs one starts it.
39
39
  */
40
40
  export declare function clearStaleDaemonEndpoints(options: DaemonInventoryOptions): Promise<readonly string[]>;
41
+ export {};
41
42
  //# sourceMappingURL=daemon-inventory.d.ts.map
@@ -1,8 +1,9 @@
1
1
  import type { GovernanceDaemonOperatorStatusReadResult } from '@wrongstack/runtime/governance-bootstrap';
2
2
  import type { SubcommandDeps, SubcommandHandler } from '../contracts.js';
3
- export interface GovernanceStatusCommandDependencies {
3
+ interface GovernanceStatusCommandDependencies {
4
4
  readonly readStatus: (projectRoot: string) => Promise<GovernanceDaemonOperatorStatusReadResult>;
5
5
  }
6
6
  export declare function runGovernanceStatusCommand(args: string[], deps: SubcommandDeps, dependencies?: GovernanceStatusCommandDependencies): Promise<number>;
7
7
  export declare const governanceCmd: SubcommandHandler;
8
+ export {};
8
9
  //# sourceMappingURL=governance.d.ts.map
@@ -1,9 +1,9 @@
1
1
  import type { Config, ModelsRegistry, Provider, ProviderErrorKind, Response } from '@wrongstack/core/types';
2
- export interface ModelSmokeTarget {
2
+ interface ModelSmokeTarget {
3
3
  providerId: string;
4
4
  modelId: string;
5
5
  }
6
- export interface ModelSmokeOptions {
6
+ interface ModelSmokeOptions {
7
7
  allModels: boolean;
8
8
  planOnly: boolean;
9
9
  json: boolean;
@@ -48,4 +48,5 @@ export declare function runModelSmokeTests(params: {
48
48
  onTargetStart?: ((target: ModelSmokeTarget, index: number, total: number) => void) | undefined;
49
49
  onTargetComplete?: ((result: ModelSmokeResult, index: number, total: number) => void) | undefined;
50
50
  }): Promise<ModelSmokeResult[]>;
51
+ export {};
51
52
  //# sourceMappingURL=model-smoke-test.d.ts.map
@@ -19,9 +19,5 @@ export declare function createProviderForId(providerId: string, cfg: {
19
19
  apiKey?: string;
20
20
  baseUrl?: string;
21
21
  }): ReturnType<typeof makeProviderFromConfig> | undefined;
22
- export declare function rankResponses(provider: ReturnType<typeof makeProviderFromConfig>, leaderModel: string, taskPrompt: string, responses: Array<{
23
- model: string;
24
- text: string;
25
- }>): Promise<number[]>;
26
22
  export declare function runModeldiagEval(args: string[], deps: SubcommandDeps, providers: CacheProvider[], config: ModelDiagConfig, hasKey: (pid: string) => boolean): Promise<number>;
27
23
  //# sourceMappingURL=modeldiag-eval.d.ts.map
@@ -36,7 +36,7 @@ export interface CacheProvider {
36
36
  family: string;
37
37
  models?: CacheModel[];
38
38
  }
39
- export interface ScoredModel {
39
+ interface ScoredModel {
40
40
  provider: string;
41
41
  model: string;
42
42
  profile?: ModelProfile | undefined;
@@ -41,8 +41,8 @@ import type { TerminalRenderer } from '../../renderer.js';
41
41
  * - `'value'` — the flag accepts a value (`--flag <value>`).
42
42
  * The parser reads these via `flags[flagName]` directly.
43
43
  */
44
- export type ModelsAddFlagGroup = 'identity' | 'capabilities';
45
- export interface ModelsAddFlag {
44
+ type ModelsAddFlagGroup = 'identity' | 'capabilities';
45
+ interface ModelsAddFlag {
46
46
  /** The flag's canonical name (no `--` prefix, no value placeholder). */
47
47
  name: string;
48
48
  /**
@@ -81,12 +81,6 @@ export declare const MODELS_ADD_BOOLEAN_FLAG_NAMES: ReadonlyArray<string>;
81
81
  * boolean list.
82
82
  */
83
83
  export declare const MODELS_ADD_VALUE_FLAG_NAMES: ReadonlyArray<string>;
84
- /**
85
- * The width of the flag column in the rendered help block.
86
- * Chosen so the longest flag (`--max-context <N>`) fits with
87
- * one space of padding before the description starts.
88
- */
89
- export declare const MODELS_ADD_FLAG_COLUMN_WIDTH = 30;
90
84
  /**
91
85
  * Build the `wstack models add` help block as a string. The
92
86
  * returned string is the exact bytes the renderer would have
@@ -139,4 +133,5 @@ export declare function renderModelsAddHelp(renderer: TerminalRenderer): void;
139
133
  * the test).
140
134
  */
141
135
  export declare function buildModelsAddUsageLine(): string;
136
+ export {};
142
137
  //# sourceMappingURL=models-add-help.d.ts.map
@@ -0,0 +1,3 @@
1
+ import type { SubcommandHandler } from '../contracts.js';
2
+ export declare const sessionsDoctorCmd: SubcommandHandler;
3
+ //# sourceMappingURL=sessions-doctor.d.ts.map
@@ -2,7 +2,7 @@ import type { TerminalRenderer } from '../../renderer.js';
2
2
  import { type UpdatePackageName } from '../../update-check.js';
3
3
  import type { SubcommandDeps, SubcommandHandler } from '../contracts.js';
4
4
  type PackageManager = 'npm' | 'pnpm' | 'yarn' | 'bun';
5
- export interface UpdateCommandDeps {
5
+ interface UpdateCommandDeps {
6
6
  cwd: string;
7
7
  userHome: string;
8
8
  renderer: Pick<TerminalRenderer, 'write'>;
@@ -1,5 +1,5 @@
1
- export type TerminalTone = 'blue' | 'cyan' | 'green' | 'magenta' | 'muted' | 'success' | 'yellow';
2
- export interface TerminalStyleOptions {
1
+ type TerminalTone = 'blue' | 'cyan' | 'green' | 'magenta' | 'muted' | 'success' | 'yellow';
2
+ interface TerminalStyleOptions {
3
3
  readonly bold?: boolean;
4
4
  /** Capability override for deterministic tests; production derives this from env/TTY. */
5
5
  readonly enabled?: boolean;
@@ -12,4 +12,5 @@ export declare function terminalText(text: string, tone: TerminalTone, options?:
12
12
  export declare function terminalLink(url: string, options?: TerminalStyleOptions & {
13
13
  readonly tone?: TerminalTone;
14
14
  }): string;
15
+ export {};
15
16
  //# sourceMappingURL=terminal-format.d.ts.map
@@ -2,7 +2,7 @@ import type { ProviderModelStatusTracker } from '@wrongstack/core/coordination';
2
2
  import type { ConfigStore, MemoryPort } from '@wrongstack/core/types';
3
3
  import type { WstackPaths } from '@wrongstack/core/utils';
4
4
  import type { ResourceMenuId, ResourceMenuSnapshot } from '@wrongstack/tui';
5
- export interface TuiResourceMenuContext {
5
+ interface TuiResourceMenuContext {
6
6
  configStore: ConfigStore;
7
7
  paths: WstackPaths;
8
8
  memoryStore?: MemoryPort | undefined;
@@ -10,4 +10,5 @@ export interface TuiResourceMenuContext {
10
10
  projectRoot: string;
11
11
  }
12
12
  export declare function createTuiResourceMenuGetter(ctx: TuiResourceMenuContext): (id: ResourceMenuId) => Promise<ResourceMenuSnapshot>;
13
+ export {};
13
14
  //# sourceMappingURL=tui-resource-menus.d.ts.map
package/dist/tuneup.d.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  */
20
20
  import type { Config } from '@wrongstack/core/types';
21
21
  import type { UpdateInfo } from './update-check.js';
22
- export type TuneupSeverity = 'error' | 'warning' | 'info' | 'ok';
22
+ type TuneupSeverity = 'error' | 'warning' | 'info' | 'ok';
23
23
  /** Stable check-group ids — one section per group in the rendered report. */
24
24
  export type TuneupCategory = 'version' | 'autonomy' | 'skills' | 'mcp' | 'plugins' | 'memory' | 'hooks' | 'permissions' | 'performance' | 'reliability' | 'config';
25
25
  /**
@@ -63,7 +63,7 @@ export interface TuneupSkill {
63
63
  bodyChars?: number | undefined;
64
64
  }
65
65
  /** Live MCP server status, reduced from `mcpRegistry.describe()`. */
66
- export interface TuneupMcpServer {
66
+ interface TuneupMcpServer {
67
67
  name: string;
68
68
  state: string;
69
69
  enabled: boolean;
@@ -85,7 +85,7 @@ export type TuneupTrustPolicy = Record<string, {
85
85
  auto?: boolean | undefined;
86
86
  }>;
87
87
  /** Ambient facts the command precomputes (host / disk / env) for the checks. */
88
- export interface TuneupEnv {
88
+ interface TuneupEnv {
89
89
  /** Logical CPU count, for the maxConcurrent sanity check. */
90
90
  cpuCount?: number | undefined;
91
91
  /** Number of configured providers, for the fallback-chain check. */
@@ -128,7 +128,7 @@ export interface TuneupInput {
128
128
  */
129
129
  power?: boolean | undefined;
130
130
  }
131
- export interface TuneupReport {
131
+ interface TuneupReport {
132
132
  findings: TuneupFinding[];
133
133
  /** Composed agent follow-up prompt for fuzzy items; empty when none. */
134
134
  agentHandoff: string;
@@ -143,7 +143,6 @@ export declare function checkPlugins(input: TuneupInput): TuneupFinding[];
143
143
  export declare function checkMemoryDedup(input: TuneupInput): TuneupFinding[];
144
144
  export declare function checkMemorySize(input: TuneupInput): TuneupFinding[];
145
145
  export declare function checkHooks(input: TuneupInput): TuneupFinding[];
146
- export declare function checkVersion(input: TuneupInput): TuneupFinding[];
147
146
  export declare function checkAutonomy(input: TuneupInput): TuneupFinding[];
148
147
  /** Power-only: yolo + director launch defaults (explicit `--power` opt-in). */
149
148
  export declare function checkPowerProfile(input: TuneupInput): TuneupFinding[];
@@ -159,4 +158,5 @@ export declare function runTuneup(input: TuneupInput): TuneupReport;
159
158
  * tier). Kept here so it is unit-testable alongside the checks.
160
159
  */
161
160
  export declare function buildDeepPrompt(report: TuneupReport): string;
161
+ export {};
162
162
  //# sourceMappingURL=tuneup.d.ts.map
@@ -3,9 +3,9 @@ import {
3
3
  detectUpdatePackageName,
4
4
  runUpdateCommand,
5
5
  updateCmd
6
- } from "./chunk-4S52MIIM.js";
6
+ } from "./chunk-VXCCBI2W.js";
7
7
  import "./chunk-U3SS4NRH.js";
8
- import "./chunk-NUIHRGPY.js";
8
+ import "./chunk-NV3JDK4F.js";
9
9
  import "./chunk-7OCVIDC7.js";
10
10
  export {
11
11
  detectUpdatePackageManager,
@@ -13,4 +13,4 @@ export {
13
13
  runUpdateCommand,
14
14
  updateCmd
15
15
  };
16
- //# sourceMappingURL=update-ZXNC6I6G.js.map
16
+ //# sourceMappingURL=update-XKARO3CY.js.map
@@ -5,7 +5,7 @@ import {
5
5
  fetchLatestFromNpm,
6
6
  getUpdateNotification,
7
7
  isNewer
8
- } from "./chunk-NUIHRGPY.js";
8
+ } from "./chunk-NV3JDK4F.js";
9
9
  import "./chunk-7OCVIDC7.js";
10
10
  export {
11
11
  cachePath,
@@ -15,4 +15,4 @@ export {
15
15
  getUpdateNotification,
16
16
  isNewer
17
17
  };
18
- //# sourceMappingURL=update-check-WARHSVZA.js.map
18
+ //# sourceMappingURL=update-check-LICQNYFK.js.map
@@ -18,7 +18,7 @@ export declare function isNewer(a: string, b: string): boolean;
18
18
  * on non-2xx responses so consumers can branch on the structured shape. */
19
19
  export declare function fetchLatestFromNpm(timeoutMs?: number): Promise<string>;
20
20
  export declare function fetchLatestFromNpm(packageName: UpdatePackageName, timeoutMs?: number, signal?: AbortSignal | undefined): Promise<string>;
21
- export interface CheckForUpdateOptions {
21
+ interface CheckForUpdateOptions {
22
22
  signal?: AbortSignal | undefined;
23
23
  homeFn?: HomeDirFn | undefined;
24
24
  packageName?: UpdatePackageName | undefined;
@@ -13,9 +13,10 @@
13
13
  *
14
14
  * @module cli/utils/hq-ttl
15
15
  */
16
- export interface ParsedTtl {
16
+ interface ParsedTtl {
17
17
  value?: number | undefined;
18
18
  error?: string | undefined;
19
19
  }
20
20
  export declare function parseTokenTtlValue(raw: string): ParsedTtl;
21
+ export {};
21
22
  //# sourceMappingURL=hq-ttl.d.ts.map
@@ -5,7 +5,18 @@ import type { WebSocket } from 'ws';
5
5
  import type { WSClientMessage, WSServerMessage } from './contracts.js';
6
6
  export interface ConnectedClient {
7
7
  ws: WebSocket;
8
+ /** The session this connection last acted on. */
8
9
  sessionId: string | null;
10
+ /**
11
+ * EVERY session this connection is displaying, as declared by
12
+ * `session.subscribe`.
13
+ *
14
+ * One browser page holds up to four tabs on ONE socket, so `sessionId` is
15
+ * only the tab last touched. Anything that asks "is this session still on
16
+ * someone's screen" — the delete guard, per-tab agent eviction — needs the
17
+ * whole set, or it treats three open tabs as abandoned.
18
+ */
19
+ sessionIds?: Set<string> | undefined;
9
20
  }
10
21
  export interface ConnectionHandlerDeps {
11
22
  host: string;
@@ -27,7 +38,6 @@ export interface ConnectionHandlerDeps {
27
38
  sessionId: string;
28
39
  };
29
40
  handleMessage: (ws: WebSocket, client: ConnectedClient, msg: WSClientMessage) => Promise<void>;
30
- abortControllers: Map<string, AbortController>;
31
41
  pendingConfirms: Map<string, PendingConfirm>;
32
42
  buildSessionStartPayload: (overrides?: Record<string, unknown>, needsSetup?: boolean) => Promise<Record<string, unknown>>;
33
43
  loadReplay?: (() => Promise<{
@@ -35,7 +45,29 @@ export interface ConnectionHandlerDeps {
35
45
  events?: readonly SessionEvent[] | undefined;
36
46
  usage?: Usage | undefined;
37
47
  } | null>) | undefined;
38
- loadAgentSessions?: (() => Promise<import('@wrongstack/core/coordination').AgentVirtualSession[]>) | undefined;
48
+ /**
49
+ * The sessions this RUNTIME currently holds open — the boot session plus any
50
+ * tab the registry is still keeping alive.
51
+ *
52
+ * The browser persists its tab strip in `localStorage`, and on every open it
53
+ * promoted that list back into live tabs. After the server had restarted
54
+ * that list is history: none of those ids belong to this process, so a fresh
55
+ * `wstack --webui` came up wearing the tab strip of some previous run,
56
+ * fronted a session from days ago, and paid for a FULL journal resume (with
57
+ * its todo board) before the user had typed anything. Handing the client the
58
+ * live set lets it keep only the tabs that still exist and start clean
59
+ * otherwise.
60
+ */
61
+ openSessionIds?: (() => string[]) | undefined;
62
+ /**
63
+ * Read back NAMED subagents' transcripts.
64
+ *
65
+ * `subagentIds` comes from the session's OWN journal, because the
66
+ * transcripts directory is shared by every session of the project: asked for
67
+ * everything, this handed each of four open tabs the union of all four tabs'
68
+ * workers.
69
+ */
70
+ loadAgentSessions?: ((subagentIds: readonly string[]) => Promise<import('@wrongstack/core/coordination').AgentVirtualSession[]>) | undefined;
39
71
  needsSetup: boolean;
40
72
  }
41
73
  export declare function createConnectionHandler(deps: ConnectionHandlerDeps): (ws: WebSocket, req: IncomingMessage) => Promise<void>;