@wrongstack/cli 0.313.0 → 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 (235) 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-BFUSCWXE.js → cli-main-IEAM6SK7.js} +3692 -1619
  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-TOBPK6MD.js → execution-TZUGCKFU.js} +462 -78
  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/live-settings-input.d.ts +5 -0
  117. package/dist/mailbox-bridge-bootstrap.d.ts +2 -3
  118. package/dist/{mailbox-serve-5S3PHG5D.js → mailbox-serve-VKQIRCCB.js} +47 -28
  119. package/dist/{mcp-RRPKNRSN.js → mcp-AQKSASHD.js} +1 -1
  120. package/dist/mcp-serve.d.ts +2 -1
  121. package/dist/{modeldiag-H6DKWJ2N.js → modeldiag-4NYBRSFP.js} +1 -1
  122. package/dist/next-task-predictor.d.ts +3 -2
  123. package/dist/permission-prompt.d.ts +2 -1
  124. package/dist/picker.d.ts +0 -18
  125. package/dist/plugin-management.d.ts +3 -14
  126. package/dist/{plugin-usage-GCTYOZPH.js → plugin-usage-AP7SJCDA.js} +2 -2
  127. package/dist/{plugins-EEKHCMBE.js → plugins-HQ5FU2AM.js} +3 -5
  128. package/dist/preflight.d.ts +2 -1
  129. package/dist/{proxy-wiring-G26YGP7S.js → proxy-wiring-EQB5X5YH.js} +3 -3
  130. package/dist/renderer.d.ts +18 -1
  131. package/dist/repl-client-registration.d.ts +2 -1
  132. package/dist/repl.d.ts +1 -1
  133. package/dist/{replay-XU6ZD7GM.js → replay-FJ2JBXUA.js} +1 -1
  134. package/dist/{sdd-runtime-GFZ3NJKS.js → sdd-runtime-FLKCSTYV.js} +3 -5
  135. package/dist/services/commit-message.d.ts +2 -1
  136. package/dist/services/sdd/state.d.ts +0 -2
  137. package/dist/services/sdd-runtime.d.ts +1 -1
  138. package/dist/services/statusline-config.d.ts +27 -4
  139. package/dist/session-event-wiring.d.ts +3 -5
  140. package/dist/{sessions-config-7Q7QJBKJ.js → sessions-config-P2LK2L32.js} +5 -1
  141. package/dist/sessions-doctor-EXHAZSSE.js +146 -0
  142. package/dist/settings-menu.d.ts +2 -1
  143. package/dist/shutdown-cleanup.d.ts +3 -2
  144. package/dist/{simpleui-dist-33VO3QHF.js → simpleui-dist-JKNRCRRK.js} +1 -1
  145. package/dist/simpleui-dist.d.ts +3 -2
  146. package/dist/slash-commands/brain-council.d.ts +0 -4
  147. package/dist/slash-commands/brain-status.d.ts +0 -1
  148. package/dist/slash-commands/command-context.d.ts +16 -2
  149. package/dist/slash-commands/fix-classifier.d.ts +2 -1
  150. package/dist/slash-commands/kanban-agent-helpers.d.ts +2 -1
  151. package/dist/slash-commands/kanban-board-handlers.d.ts +2 -1
  152. package/dist/slash-commands/kanban-lifecycle-diagnostics.d.ts +2 -1
  153. package/dist/slash-commands/kanban-task-subcommands.d.ts +0 -1
  154. package/dist/slash-commands/memory-audience.d.ts +1 -10
  155. package/dist/slash-commands/memory-flags.d.ts +2 -1
  156. package/dist/slash-commands/sdd-command-helpers.d.ts +3 -2
  157. package/dist/slash-commands/sdd.d.ts +2 -2
  158. package/dist/slash-commands/settings-mutations.d.ts +0 -1
  159. package/dist/slash-commands/sidebar.d.ts +4 -0
  160. package/dist/slash-commands/statusline.d.ts +4 -4
  161. package/dist/slash-commands/telegram-pairing.d.ts +2 -2
  162. package/dist/slash-commands/telegram-setup.d.ts +2 -1
  163. package/dist/slash-commands/tier.d.ts +13 -0
  164. package/dist/subcommands/handlers/acp-connection-gate.d.ts +4 -3
  165. package/dist/subcommands/handlers/bench-run-help.d.ts +3 -8
  166. package/dist/subcommands/handlers/daemon-inventory.d.ts +3 -2
  167. package/dist/subcommands/handlers/governance.d.ts +2 -1
  168. package/dist/subcommands/handlers/model-smoke-test.d.ts +3 -2
  169. package/dist/subcommands/handlers/modeldiag-eval.d.ts +0 -4
  170. package/dist/subcommands/handlers/modeldiag-profiles.d.ts +1 -1
  171. package/dist/subcommands/handlers/models-add-help.d.ts +3 -8
  172. package/dist/subcommands/handlers/sessions-doctor.d.ts +3 -0
  173. package/dist/subcommands/handlers/update.d.ts +1 -1
  174. package/dist/terminal-format.d.ts +3 -2
  175. package/dist/tui-resource-menus.d.ts +2 -1
  176. package/dist/tuneup.d.ts +5 -5
  177. package/dist/{update-ZXNC6I6G.js → update-XKARO3CY.js} +3 -3
  178. package/dist/{update-check-WARHSVZA.js → update-check-LICQNYFK.js} +2 -2
  179. package/dist/update-check.d.ts +1 -1
  180. package/dist/utils/hq-ttl.d.ts +2 -1
  181. package/dist/webui-server/connection-handler.d.ts +34 -2
  182. package/dist/webui-server/prefs-seeding.d.ts +11 -1
  183. package/dist/webui-server/route-contexts.d.ts +45 -5
  184. package/dist/webui-server/session-start-payload.d.ts +13 -0
  185. package/dist/webui-server/setup-events.d.ts +14 -1
  186. package/dist/{webui-server-I53IYBW4.js → webui-server-LZOEH7O6.js} +374 -169
  187. package/dist/webui-server-options.d.ts +30 -4
  188. package/dist/wiring/brain-and-orchestration.d.ts +3 -3
  189. package/dist/wiring/cli-execute-builder.d.ts +3 -0
  190. package/dist/wiring/cli-heap-watchdog.d.ts +2 -1
  191. package/dist/wiring/cli-prompt-and-tools-setup.d.ts +10 -8
  192. package/dist/wiring/codebase-index.d.ts +2 -1
  193. package/dist/wiring/command-host-state.d.ts +61 -5
  194. package/dist/wiring/controllers.d.ts +3 -4
  195. package/dist/wiring/dep-watcher-bridge.d.ts +3 -2
  196. package/dist/wiring/dep-watcher.d.ts +2 -1
  197. package/dist/wiring/design-studio.d.ts +2 -1
  198. package/dist/wiring/director-setup.d.ts +3 -2
  199. package/dist/wiring/domain-terms-mirror.d.ts +2 -1
  200. package/dist/wiring/external-plugins.d.ts +3 -2
  201. package/dist/wiring/fleet-command-handlers.d.ts +2 -2
  202. package/dist/wiring/heap-watchdog-setup.d.ts +2 -1
  203. package/dist/wiring/hq-telemetry.d.ts +3 -2
  204. package/dist/wiring/lifecycle-plugins.d.ts +2 -2
  205. package/dist/wiring/management-tools.d.ts +30 -2
  206. package/dist/wiring/metrics.d.ts +2 -2
  207. package/dist/wiring/plugins.d.ts +0 -1
  208. package/dist/wiring/prompt-journal-recorder.d.ts +1 -1
  209. package/dist/wiring/provider-runtime-setup.d.ts +9 -2
  210. package/dist/wiring/provider-runtime.d.ts +23 -3
  211. package/dist/wiring/provider-status.d.ts +2 -1
  212. package/dist/wiring/provider-utility-tools.d.ts +2 -1
  213. package/dist/wiring/provider.d.ts +2 -1
  214. package/dist/wiring/replay-governance-setup.d.ts +2 -1
  215. package/dist/wiring/replay.d.ts +2 -1
  216. package/dist/wiring/resume-candidate.d.ts +27 -0
  217. package/dist/wiring/runtime-controller-deps.d.ts +8 -1
  218. package/dist/wiring/runtime-dispatch-state.d.ts +2 -1
  219. package/dist/wiring/runtime-lifecycle-deps.d.ts +2 -1
  220. package/dist/wiring/runtime-picker-deps.d.ts +2 -1
  221. package/dist/wiring/session-command-handlers.d.ts +2 -2
  222. package/dist/wiring/session-establishment.d.ts +2 -1
  223. package/dist/wiring/session-registry.d.ts +3 -2
  224. package/dist/wiring/session-runtime.d.ts +1 -1
  225. package/dist/wiring/slash-commands.d.ts +5 -4
  226. package/dist/wiring/teardown-registrar.d.ts +3 -2
  227. package/dist/wiring/vector-memory-setup.d.ts +3 -2
  228. package/dist/wiring/wrongtrace-hooks.d.ts +1 -1
  229. package/dist/wiring/wrongtrace-telemetry.d.ts +2 -1
  230. package/dist/{wrongtrace-telemetry-6M2CCBX5.js → wrongtrace-telemetry-FNLANZ5I.js} +1 -1
  231. package/package.json +30 -30
  232. package/dist/auth-menu.d.ts +0 -7
  233. package/dist/chunk-WHOIR577.js +0 -1
  234. package/dist/webui-server/terminal-log-view.d.ts +0 -47
  235. package/dist/wiring/tools.d.ts +0 -29
@@ -54,10 +54,14 @@ export declare class MultiAgentHost {
54
54
  * dispose(). Also published to the supervisor registry for /supervisor. */
55
55
  private fleetSupervisor;
56
56
  /** ExploreCompanion — state-triggered background codebase explorer behind
57
- * the leader. Built in buildDirector() (unless disabled via
58
- * fleet.exploreCompanion.enabled=false), stopped in dispose(). Probes are
59
- * assigned to a lazily-spawned resident `explore-companion` subagent. */
60
- private exploreCompanion;
57
+ * the leader. One per live conversation (see
58
+ * host-explore-companion-registry): built in buildDirector() for the boot
59
+ * session and on first run for any other, unless disabled via
60
+ * fleet.exploreCompanion.enabled=false. Probes are assigned to a
61
+ * lazily-spawned resident `explore-companion` subagent per session. */
62
+ private exploreCompanions;
63
+ /** `agent.run.started` subscription that opens a companion for a new tab. */
64
+ private exploreCompanionOff;
61
65
  /** Built-ins plus lazily-resolved project-created roles. */
62
66
  private readonly roster;
63
67
  constructor(deps: MultiAgentDeps, opts?: MultiAgentHostOptions);
@@ -77,10 +81,26 @@ export declare class MultiAgentHost {
77
81
  * (`on`, `setRunner`) that isn't part of the `MultiAgentCoordinator`
78
82
  * interface. */
79
83
  private getCoordinator;
84
+ /**
85
+ * The conversation a subagent belongs to.
86
+ *
87
+ * The coordinator captured it at spawn from the caller's `originSessionId`
88
+ * and never re-reads it, so it stays put for the worker's whole life. The
89
+ * host's own `deps.session` is the fallback and is only right for a
90
+ * single-session host: with four WebUI tabs on one process it names the boot
91
+ * tab, which is how every background tab's worker used to surface in tab 1's
92
+ * roster and disappear from the tab that spawned it.
93
+ */
94
+ private sessionForSubagent;
80
95
  /** Public accessor for the Director — used by buildRoutingRunner. */
81
96
  getDirector(): Director | undefined;
82
- /** Run one shadow review pass immediately. */
83
- runShadowPass(reason: string): Promise<void>;
97
+ /**
98
+ * Run one shadow review pass immediately.
99
+ *
100
+ * `sessionId` names the conversation the review belongs to; omitting it
101
+ * means the host's own session, which is the only one a CLI or TUI has.
102
+ */
103
+ runShadowPass(reason: string, sessionId?: string): Promise<void>;
84
104
  private ensureCoordinator;
85
105
  private buildDirector;
86
106
  /**
@@ -125,6 +145,18 @@ export declare class MultiAgentHost {
125
145
  stopAll(): Promise<void>;
126
146
  getMaxConcurrent(): number;
127
147
  setMaxConcurrent(n: number): void;
148
+ /**
149
+ * A conversation is gone — its tab closed.
150
+ *
151
+ * Only the host-side helpers pinned to it are released: the explore
152
+ * companion (whose poll timer would otherwise tick for a tab nobody is
153
+ * looking at) and the shadow reviewer's bookkeeping. The fleet itself is
154
+ * deliberately untouched — a background run outlives the tab that started
155
+ * it, and stopping its workers is `stopSessionFleet`'s decision, made on
156
+ * Stop, not on close. Both helpers rebuild themselves if the session ever
157
+ * runs again.
158
+ */
159
+ releaseSession(sessionId: string): void;
128
160
  dispose(): Promise<void>;
129
161
  }
130
162
  //# sourceMappingURL=host.d.ts.map
@@ -25,7 +25,7 @@
25
25
  import type { Mailbox } from '@wrongstack/core/coordination';
26
26
  import type { EventBus } from '@wrongstack/core/kernel';
27
27
  import type { FleetConfig } from '@wrongstack/core/types';
28
- export interface FleetStatusBroadcasterOptions {
28
+ interface FleetStatusBroadcasterOptions {
29
29
  /** Host EventBus carrying the re-emitted `subagent.*` lifecycle events. */
30
30
  events: EventBus;
31
31
  /** Lazily construct the project mailbox (created once, on first use). */
@@ -40,4 +40,5 @@ export declare function createFleetStatusBroadcaster(opts: FleetStatusBroadcaste
40
40
  start(): void;
41
41
  stop(): void;
42
42
  };
43
+ export {};
43
44
  //# sourceMappingURL=status-broadcast.d.ts.map
@@ -26,7 +26,7 @@ export interface FleetAgentState {
26
26
  /** Cumulative budget auto-extensions — rendered as a "⚡N" suffix. */
27
27
  extensions?: number | undefined;
28
28
  }
29
- export interface FleetStatusLineOptions {
29
+ interface FleetStatusLineOptions {
30
30
  events: EventBus;
31
31
  out?: NodeJS.WriteStream | undefined;
32
32
  /** Minimum ms between repaints. Default 150. */
@@ -69,4 +69,5 @@ export declare class FleetStatusLine {
69
69
  private schedulePaint;
70
70
  private paint;
71
71
  }
72
+ export {};
72
73
  //# sourceMappingURL=fleet-statusline.d.ts.map
@@ -59,12 +59,12 @@ export interface GoalHostDeps {
59
59
  log?: ((line: string) => void) | undefined;
60
60
  }
61
61
  /** A live, read-only view of the running Goal, exposed to slash commands. */
62
- export interface GoalRunnerView {
62
+ interface GoalRunnerView {
63
63
  graph: PhaseGraph;
64
64
  getProgress: () => PhaseProgress | null;
65
65
  isRunning: () => boolean;
66
66
  }
67
- export type GoalStartResult = {
67
+ type GoalStartResult = {
68
68
  ok: true;
69
69
  graph: PhaseGraph;
70
70
  } | {
@@ -103,4 +103,5 @@ export interface GoalHostHooks {
103
103
  onWorktree: (action: 'list' | 'merge' | 'prune' | 'clean', target?: string) => Promise<string>;
104
104
  }
105
105
  export declare function createGoalHost(deps: GoalHostDeps): GoalHostHooks;
106
+ export {};
106
107
  //# sourceMappingURL=goal-host.d.ts.map
@@ -62,4 +62,4 @@ export {
62
62
  governanceCmd,
63
63
  runGovernanceStatusCommand
64
64
  };
65
- //# sourceMappingURL=governance-V2Z42RBE.js.map
65
+ //# sourceMappingURL=governance-JSGHHA2R.js.map
@@ -1,7 +1,6 @@
1
1
  import type { HqGovernanceSnapshotPayload, HqPublisher } from '@wrongstack/core/hq';
2
2
  import { type GovernanceDaemonOperatorStatusReadResult } from '@wrongstack/runtime/governance-bootstrap';
3
- export declare const GOVERNANCE_HQ_SNAPSHOT_INTERVAL_MS = 15000;
4
- export interface GovernanceHqTelemetryOptions {
3
+ interface GovernanceHqTelemetryOptions {
5
4
  readonly publisher: Pick<HqPublisher, 'project' | 'publishEvent'>;
6
5
  readonly projectRoot: string;
7
6
  readonly intervalMs?: number;
@@ -14,4 +13,5 @@ export declare function projectGovernanceHqSnapshot(projectId: string, observedA
14
13
  * represented as advisory snapshots and never stop task or model execution.
15
14
  */
16
15
  export declare function startGovernanceHqTelemetry(options: GovernanceHqTelemetryOptions): () => void;
16
+ export {};
17
17
  //# sourceMappingURL=governance-hq-telemetry.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  parseTokenTtlValue
3
- } from "./chunk-BGFM3PD7.js";
3
+ } from "./chunk-UZ2TMHNH.js";
4
4
  import {
5
5
  resolveAuditActor
6
6
  } from "./chunk-Q5GTM25S.js";
@@ -51,7 +51,7 @@ var hqCmd = async (args, deps) => {
51
51
  return 1;
52
52
  };
53
53
  async function startServer(deps) {
54
- const { startHqServer } = await import("./hq-server-DBT3OOYD.js");
54
+ const { startHqServer } = await import("./hq-server-OH3SPSE2.js");
55
55
  const dataDir = resolveDataDir(deps);
56
56
  const flags = deps.flags ?? {};
57
57
  const host = typeof flags["host"] === "string" ? flags["host"] : HQ_CLI_DEFAULT_HOST;
@@ -709,4 +709,4 @@ export {
709
709
  hqCmd,
710
710
  resolveAuditActor
711
711
  };
712
- //# sourceMappingURL=hq-2XIXGAER.js.map
712
+ //# sourceMappingURL=hq-NDTJRRX3.js.map
@@ -8,7 +8,7 @@ export interface CliHqConnection {
8
8
  getKanbanSyncStats(): KanbanHqSyncStats | undefined;
9
9
  stop(): void;
10
10
  }
11
- export interface CliHqConnectionOptions extends CliHqPublisherOptions {
11
+ interface CliHqConnectionOptions extends CliHqPublisherOptions {
12
12
  onConnect?: ((publisher: HqPublisher) => void) | undefined;
13
13
  retryIntervalMs?: number | undefined;
14
14
  }
@@ -1,8 +1,3 @@
1
- /**
2
- * Minimal diagnostic page used only when the packaged HQ SPA assets cannot be found.
3
- * It intentionally contains no telemetry UI or control-plane implementation.
4
- */
5
- export declare const HQ_RECOVERY_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <title>WrongStack HQ \u2014 assets unavailable</title>\n <style>\n :root{color-scheme:dark;background:#0c111b;color:#e7edf7;font:16px/1.5 system-ui,sans-serif}\n body{margin:0;min-height:100vh;display:grid;place-items:center;padding:24px;box-sizing:border-box}\n main{max-width:680px;border:1px solid #334155;background:#111827;padding:28px}\n h1{margin-top:0;font-size:1.5rem}code{color:#93c5fd}p{color:#cbd5e1}\n </style>\n</head>\n<body>\n <main data-hq-recovery-shell>\n <h1>HQ frontend assets are unavailable</h1>\n <p>The HQ backend is running, but the packaged React application could not be resolved.</p>\n <p>Rebuild or reinstall <code>@wrongstack/webui-hq</code>, then restart HQ. API routes remain available for diagnostics.</p>\n </main>\n</body>\n</html>";
6
1
  /** Backward-compatible public name; now always represents the diagnostic shell. */
7
- export declare const HQ_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <title>WrongStack HQ \u2014 assets unavailable</title>\n <style>\n :root{color-scheme:dark;background:#0c111b;color:#e7edf7;font:16px/1.5 system-ui,sans-serif}\n body{margin:0;min-height:100vh;display:grid;place-items:center;padding:24px;box-sizing:border-box}\n main{max-width:680px;border:1px solid #334155;background:#111827;padding:28px}\n h1{margin-top:0;font-size:1.5rem}code{color:#93c5fd}p{color:#cbd5e1}\n </style>\n</head>\n<body>\n <main data-hq-recovery-shell>\n <h1>HQ frontend assets are unavailable</h1>\n <p>The HQ backend is running, but the packaged React application could not be resolved.</p>\n <p>Rebuild or reinstall <code>@wrongstack/webui-hq</code>, then restart HQ. API routes remain available for diagnostics.</p>\n </main>\n</body>\n</html>";
2
+ export declare const HQ_HTML = "<!doctype html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <title>WrongStack HQ \u2014 assets unavailable</title>\n <style>\n :root{color-scheme:dark;background:#0c111b;color:#e7edf7;font:16px/1.5 system-ui,sans-serif}\n body{margin:0;min-height:100vh;display:grid;place-items:center;padding:24px;box-sizing:border-box}\n main{max-width:680px;border:1px solid #334155;background:#111827;padding:28px}\n h1{margin-top:0;font-size:1.5rem}code{color:#93c5fd}p{color:#cbd5e1}\n </style>\n</head>\n<body>\n <main data-hq-recovery-shell>\n <h1>HQ frontend assets are unavailable</h1>\n <p>The HQ backend is running, but the packaged React application could not be resolved.</p>\n <p>Rebuild or reinstall <code>@wrongstack/webui-hq</code>, then restart HQ. From a workspace checkout, run <code>pnpm --filter @wrongstack/webui-hq build</code>. API routes remain available for diagnostics.</p>\n </main>\n</body>\n</html>";
8
3
  //# sourceMappingURL=hq-recovery-html.d.ts.map
@@ -5,7 +5,7 @@ export interface HqAuthState {
5
5
  apply(next: HqAuthFile): void;
6
6
  tokenStats(): NonNullable<HqSnapshot['totals']['tokenStats']>;
7
7
  }
8
- export interface HqAuthStateOptions {
8
+ interface HqAuthStateOptions {
9
9
  /**
10
10
  * Invoked after every {@link HqAuthState.apply}, with the freshly projected
11
11
  * `mutableAuth`. The server wires this to the WS-010 exposure re-assessment
@@ -35,4 +35,5 @@ export interface HqAuthStateOptions {
35
35
  export declare function projectAuthFile(mutableAuth: HqRouterMutableAuth, next: HqAuthFile): void;
36
36
  /** Owns the live auth projection, expiry statistics, and reload audit diff. */
37
37
  export declare function createHqAuthState(authFile: HqAuthFile, dataDir: string, opts?: HqAuthStateOptions): HqAuthState;
38
+ export {};
38
39
  //# sourceMappingURL=auth-state.d.ts.map
@@ -9,7 +9,7 @@ export declare const HQ_SESSION_COOKIE = "hq.session";
9
9
  export declare const HQ_SESSION_MAX_AGE_MS: number;
10
10
  /** Idle timeout: sessions unused for this long are rejected and evicted. */
11
11
  export declare const HQ_SESSION_IDLE_TIMEOUT_MS: number;
12
- export interface HqBrowserAuthContext {
12
+ interface HqBrowserAuthContext {
13
13
  kind: 'token';
14
14
  token: string;
15
15
  id: string;
@@ -21,7 +21,7 @@ export interface HqBrowserAuthContext {
21
21
  * access). Token-origin cookies carry the source token's capabilities
22
22
  * so capability checks (e.g. `control.enqueue`) still apply.
23
23
  */
24
- export interface HqCookieAuthContext {
24
+ interface HqCookieAuthContext {
25
25
  kind: 'cookie';
26
26
  tokenId?: string;
27
27
  capabilities?: string[];
@@ -102,4 +102,5 @@ export declare function authenticateBrowserRequest(req: http.IncomingMessage, ur
102
102
  passwordHash?: string | undefined;
103
103
  cookieSecret?: string | undefined;
104
104
  }, sessions: Map<string, HqSessionEntry>): HqBrowserAuthResult;
105
+ export {};
105
106
  //# sourceMappingURL=auth.d.ts.map
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @module hq-server/login-attempt-store
15
15
  */
16
- export interface LoginAttemptEntry {
16
+ interface LoginAttemptEntry {
17
17
  count: number;
18
18
  blockedUntil: number;
19
19
  lastAttempt: number;
@@ -95,4 +95,5 @@ export declare class LoginAttemptStore {
95
95
  /** Iterate entries (for cleanup timers). */
96
96
  entries(): IterableIterator<[string, LoginAttemptEntry]>;
97
97
  }
98
+ export {};
98
99
  //# sourceMappingURL=login-attempt-store.d.ts.map
@@ -8,7 +8,7 @@ import { type MailboxHttpAccessDecision, MailboxHttpRateLimiter } from '@wrongst
8
8
  import type { HqAuthState } from './auth-state.js';
9
9
  import { type HqRouterMailboxGateway } from './routes.js';
10
10
  import type { HqSessionEntry } from './types.js';
11
- export interface MailboxGatewayManagerDeps {
11
+ interface MailboxGatewayManagerDeps {
12
12
  host: string;
13
13
  port: number;
14
14
  mutableAuth: HqAuthState['mutableAuth'];
@@ -29,4 +29,5 @@ export declare class MailboxGatewayManager {
29
29
  private evictIdleGateways;
30
30
  close(): void;
31
31
  }
32
+ export {};
32
33
  //# sourceMappingURL=mailbox-gateway-manager.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type EnsureHqFirstRunAuthResult } from '@wrongstack/core/hq';
2
- export interface HqPreflightOptions {
2
+ interface HqPreflightOptions {
3
3
  host?: string;
4
4
  port?: number;
5
5
  dataDir?: string;
@@ -8,7 +8,7 @@ export interface HqPreflightOptions {
8
8
  requireBrowserAuth?: boolean;
9
9
  allowInsecureOpen?: boolean;
10
10
  }
11
- export interface HqPreflightResult {
11
+ interface HqPreflightResult {
12
12
  host: string;
13
13
  port: number;
14
14
  dataDir: string;
@@ -19,4 +19,5 @@ export declare function prepareHqServerStart(options: HqPreflightOptions, defaul
19
19
  host: string;
20
20
  port: number;
21
21
  }): Promise<HqPreflightResult>;
22
+ export {};
22
23
  //# sourceMappingURL=preflight.d.ts.map
@@ -8,7 +8,7 @@ import type { WebSocket, WebSocketServer } from 'ws';
8
8
  import type { HqPersistence } from '@wrongstack/core/hq';
9
9
  import type { LoginAttemptStore } from './login-attempt-store.js';
10
10
  import type { MailboxGatewayManager } from './mailbox-gateway-manager.js';
11
- export interface HqServerShutdownParams {
11
+ interface HqServerShutdownParams {
12
12
  cleanupTimer: NodeJS.Timeout;
13
13
  browserHeartbeatTimer: NodeJS.Timeout;
14
14
  timeseriesFlushTimer: NodeJS.Timeout;
@@ -34,4 +34,5 @@ export interface HqServerShutdownParams {
34
34
  hqUrl: string;
35
35
  }
36
36
  export declare function createHqServerShutdown(params: HqServerShutdownParams): () => Promise<void>;
37
+ export {};
37
38
  //# sourceMappingURL=server-lifecycle.d.ts.map
@@ -6,15 +6,6 @@
6
6
  import type { HqCommandAuditEntry, HqEventEnvelope, HqPersistence, HqSnapshot } from '@wrongstack/core/hq';
7
7
  import { WebSocket } from 'ws';
8
8
  import type { ConnectedClient, HqSnapshotBroadcaster, ProjectDetail } from './types.js';
9
- export declare const HQ_SNAPSHOT_BROADCAST_DEBOUNCE_MS = 100;
10
- /**
11
- * Minimum spacing between disk checkpoints of snapshot.json. Browser broadcasts
12
- * stay at the 100ms debounce, but the on-disk checkpoint (only used to re-seed a
13
- * restarted HQ) does not need to be rewritten at broadcast rate. Throttling it
14
- * stops an idle HQ — running behind active local TUIs/REPLs with nobody viewing
15
- * the dashboard — from doing a full rebuild + atomic disk write at up to 10 Hz.
16
- */
17
- export declare const HQ_SNAPSHOT_PERSIST_MIN_INTERVAL_MS = 3000;
18
9
  /** Unsent bytes retained for one dashboard socket before it is disconnected. */
19
10
  export declare const HQ_BROWSER_MAX_BUFFERED_BYTES: number;
20
11
  /**
@@ -23,7 +23,7 @@ export declare function writeHqRuntimeMarker(dataDir: string, url: string): Prom
23
23
  * (same URL and PID). Best-effort — never throws.
24
24
  */
25
25
  export declare function clearHqRuntimeMarker(dataDir: string, url: string): Promise<void>;
26
- export interface HqStartupInfoHandle {
26
+ interface HqStartupInfoHandle {
27
27
  host: string;
28
28
  port: number;
29
29
  firstRunSetup?: {
@@ -45,6 +45,5 @@ export interface HqStartupInfoHandle {
45
45
  * endpoint listing.
46
46
  */
47
47
  export declare function writeHqStartupInfo(write: (line: string) => void, handle: HqStartupInfoHandle): void;
48
- /** When bound to all interfaces, print LAN URLs so other machines can reach HQ. */
49
- export declare function writeHqLanEndpoints(write: (line: string) => void, handle: HqStartupInfoHandle, browserToken: string | undefined): void;
48
+ export {};
50
49
  //# sourceMappingURL=startup.d.ts.map
@@ -6,12 +6,12 @@
6
6
  import type { HqAlertRuleConfig, HqBrowserMessage, HqClientCapability, HqClientRecord, HqEventEnvelope, HqFleetSnapshotPayload, HqGovernanceSnapshotPayload, HqMailboxSnapshotPayload, HqMcpServerHealth, HqPersistence, HqProjectIdentity, HqProjectRecord, HqQueuedCommand, HqRedactionPolicy, HqSessionSnapshotPayload, HqToken, HqTranscriptEntry } from '@wrongstack/core/hq';
7
7
  import type { WebSocket } from 'ws';
8
8
  export type { HqBrowserMessage, HqClientCapability, HqClientRecord, HqEventEnvelope, HqFleetSnapshotPayload, HqGovernanceSnapshotPayload, HqMailboxSnapshotPayload, HqMcpServerHealth, HqPersistence, HqProjectIdentity, HqProjectRecord, HqQueuedCommand, HqRedactionPolicy, HqSessionSnapshotPayload, HqToken, HqTranscriptEntry, };
9
- export interface TrackedSessionSnapshot {
9
+ interface TrackedSessionSnapshot {
10
10
  payload: HqSessionSnapshotPayload;
11
11
  /** Epoch ms of the last `session.snapshot` refresh — freshness authority for the cleanup timer. */
12
12
  receivedAt: number;
13
13
  }
14
- export interface TrackedFleetSnapshot {
14
+ interface TrackedFleetSnapshot {
15
15
  payload: HqFleetSnapshotPayload;
16
16
  /** Owning session, when the publisher supplied one. */
17
17
  sessionId?: string;
@@ -9,7 +9,7 @@ import { type HqToken } from '@wrongstack/core/hq';
9
9
  import type { WebSocket, WebSocketServer } from 'ws';
10
10
  import type { HqAuthState } from './auth-state.js';
11
11
  import type { ConnectedClient, HqSessionEntry, TranscriptRing } from './types.js';
12
- export interface HqUpgradeHandlerDeps {
12
+ interface HqUpgradeHandlerDeps {
13
13
  host: string;
14
14
  port: number;
15
15
  listeningPort: () => number;
@@ -31,4 +31,5 @@ export interface HqUpgradeHandlerDeps {
31
31
  }
32
32
  export declare function handleHqUpgrade(req: IncomingMessage, socket: Duplex, head: Buffer, deps: HqUpgradeHandlerDeps): void;
33
33
  export declare function handleHqConnection(ws: WebSocket, req: IncomingMessage, pathname: string, deps: HqUpgradeHandlerDeps): void;
34
+ export {};
34
35
  //# sourceMappingURL=upgrade-handler.d.ts.map
@@ -15,12 +15,6 @@ import type { ConnectedClient } from './types.js';
15
15
  * is promoted via `promoteNewLeader` (see `detectLeaderLoss`).
16
16
  */
17
17
  export declare function computeIsLeader(clients: Map<WebSocket, ConnectedClient>, projectId: string, acceptedCapabilities: readonly string[]): boolean;
18
- /**
19
- * After a leader is removed, promote the most recent surviving client with
20
- * `control.receive` to leader. Returns the promoted client id, or null if
21
- * no surviving client has `control.receive`.
22
- */
23
- export declare function promoteNewLeader(clients: Map<WebSocket, ConnectedClient>, projectId: string, excludeWs: WebSocket, excludeClient: ConnectedClient): string | null;
24
18
  /**
25
19
  * Detect leader loss and emit the appropriate envelope. Currently wired
26
20
  * on `client.closed` (graceful close) and the two heartbeat-timeout sites
@@ -1,35 +1,25 @@
1
1
  import {
2
- BROWSER_HEARTBEAT_INTERVAL_MS,
3
- CLIENT_CLEANUP_INTERVAL_MS,
4
- CLIENT_TTL_MS,
5
2
  DEFAULT_HOST,
6
3
  DEFAULT_PORT,
7
4
  HQ_HTML,
8
5
  HqInsecureExposureError,
9
6
  MAX_EVENT_LOG,
10
- MAX_NON_STRICT_PORT_SCAN,
11
- SESSION_SNAPSHOT_TTL_MS,
12
7
  agentMessageToEntry,
13
8
  agentRingKey,
14
9
  decodePathSegment,
15
10
  readLocalSubagentTranscript,
16
11
  sanitizeApiError,
17
12
  startHqServer
18
- } from "./chunk-E3X4KM7T.js";
19
- import "./chunk-KE7E7DPX.js";
13
+ } from "./chunk-NZZOYLQ7.js";
14
+ import "./chunk-HXJYHAR4.js";
20
15
  import "./chunk-Q5GTM25S.js";
21
16
  import "./chunk-7OCVIDC7.js";
22
17
  export {
23
- BROWSER_HEARTBEAT_INTERVAL_MS,
24
- CLIENT_CLEANUP_INTERVAL_MS,
25
- CLIENT_TTL_MS,
26
18
  DEFAULT_HOST,
27
19
  DEFAULT_PORT,
28
20
  HQ_HTML,
29
21
  HqInsecureExposureError,
30
22
  MAX_EVENT_LOG,
31
- MAX_NON_STRICT_PORT_SCAN,
32
- SESSION_SNAPSHOT_TTL_MS,
33
23
  agentMessageToEntry,
34
24
  agentRingKey,
35
25
  decodePathSegment,
@@ -37,4 +27,4 @@ export {
37
27
  sanitizeApiError,
38
28
  startHqServer
39
29
  };
40
- //# sourceMappingURL=hq-server-DBT3OOYD.js.map
30
+ //# sourceMappingURL=hq-server-OH3SPSE2.js.map
@@ -17,13 +17,8 @@ export { HQ_HTML };
17
17
  export declare const DEFAULT_HOST = "127.0.0.1";
18
18
  export declare const DEFAULT_PORT = 3499;
19
19
  export declare const MAX_EVENT_LOG = 5000;
20
- export declare const MAX_NON_STRICT_PORT_SCAN = 50;
21
- export declare const CLIENT_TTL_MS = 60000;
22
- export declare const CLIENT_CLEANUP_INTERVAL_MS = 30000;
23
- export declare const BROWSER_HEARTBEAT_INTERVAL_MS = 15000;
24
- export declare const SESSION_SNAPSHOT_TTL_MS = 30000;
25
20
  export { agentMessageToEntry, agentRingKey, decodePathSegment, readLocalSubagentTranscript, sanitizeApiError, };
26
- export interface HqServerOptions {
21
+ interface HqServerOptions {
27
22
  trustBoundary?: TrustBoundary | undefined;
28
23
  host?: string;
29
24
  port?: number;
@@ -13,7 +13,7 @@ import type * as http from 'node:http';
13
13
  * present (e.g. unbuilt). Result is cached for the process lifetime.
14
14
  */
15
15
  export declare function resolveHqDistDir(): string | null;
16
- export interface ServeStaticResult {
16
+ interface ServeStaticResult {
17
17
  handled: boolean;
18
18
  }
19
19
  /**
@@ -23,4 +23,5 @@ export interface ServeStaticResult {
23
23
  * path doesn't match a static asset.
24
24
  */
25
25
  export declare function serveHqStatic(_req: http.IncomingMessage, res: http.ServerResponse, urlPath: string, distDir: string): Promise<ServeStaticResult>;
26
+ export {};
26
27
  //# sourceMappingURL=hq-static-serve.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  parseTokenTtlValue
3
- } from "./chunk-BGFM3PD7.js";
3
+ } from "./chunk-UZ2TMHNH.js";
4
4
  import "./chunk-7OCVIDC7.js";
5
5
  export {
6
6
  parseTokenTtlValue
7
7
  };
8
- //# sourceMappingURL=hq-ttl-U2FAYFAT.js.map
8
+ //# sourceMappingURL=hq-ttl-KUO3AU7X.js.map
@@ -111,4 +111,4 @@ export {
111
111
  hasRegisteredQuickTunnelConnection,
112
112
  startHqQuickTunnel
113
113
  };
114
- //# sourceMappingURL=hq-tunnel-RFKGC4HI.js.map
114
+ //# sourceMappingURL=hq-tunnel-LO55RCZE.js.map
@@ -2,7 +2,7 @@ export interface HqQuickTunnelHandle {
2
2
  url: string;
3
3
  close(): Promise<void>;
4
4
  }
5
- export interface HqQuickTunnelOptions {
5
+ interface HqQuickTunnelOptions {
6
6
  executable?: string | undefined;
7
7
  timeoutMs?: number | undefined;
8
8
  onUnexpectedExit?: ((message: string) => void) | undefined;
@@ -13,4 +13,5 @@ export declare function hasRegisteredQuickTunnelConnection(output: string): bool
13
13
  /** Start an anonymous TryCloudflare tunnel and tie it to the HQ process lifecycle. */
14
14
  export declare function startHqQuickTunnel(originUrl: string, options?: HqQuickTunnelOptions): Promise<HqQuickTunnelHandle>;
15
15
  export declare function buildPublicHqUrl(tunnelUrl: string, localBrowserUrl: string | undefined, includeBootstrap: boolean): string;
16
+ export {};
16
17
  //# sourceMappingURL=hq-tunnel.d.ts.map