@wrongstack/webui 0.319.0 → 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 (218) hide show
  1. package/dist/assets/AgentRosterView-B_J6SvVF.js +12 -0
  2. package/dist/assets/AnalyticsDashboard-BgZiiiDb.js +1 -0
  3. package/dist/assets/AudienceMemoryPanel-CPuksIMN.js +3 -0
  4. package/dist/assets/ChangesView-CmZeNwbw.js +1 -0
  5. package/dist/assets/ChimeraReviewsView-CpfSkgQ2.js +1 -0
  6. package/dist/assets/ChronicleDashboard-B6lhZGjz.js +1 -0
  7. package/dist/assets/CodeEditor-Daz1yqjF.js +2 -0
  8. package/dist/assets/CodeMap-D-H9FNUJ.js +1 -0
  9. package/dist/assets/ConfirmModal-CjsZbvo3.js +1 -0
  10. package/dist/assets/CronJobsPanel-DGKW_zwc.js +1 -0
  11. package/dist/assets/{DeadCodeScanPanel-DooqnEMF.js → DeadCodeScanPanel-Cn5bSfLv.js} +1 -1
  12. package/dist/assets/DebugDashboard-Uh9QLbEk.js +1 -0
  13. package/dist/assets/DesignGalleryView-Da1QtI5b.js +1 -0
  14. package/dist/assets/GoalView-BgVxzzzS.js +1 -0
  15. package/dist/assets/KanbanView-_JvZKFyI.js +3 -0
  16. package/dist/assets/MailboxDetailView-26bVSSbU.js +1 -0
  17. package/dist/assets/MemoryDrawer-C5sEdVvj.js +1 -0
  18. package/dist/assets/MemoryManager-BqWzNt8w.js +1 -0
  19. package/dist/assets/ModelPicker-DqRzzv5J.js +1 -0
  20. package/dist/assets/ProcessMonitor-ygFLD5zk.js +1 -0
  21. package/dist/assets/PromptJournalView-B65KxlYi.js +1 -0
  22. package/dist/assets/QueuePanel-CJlIV0pX.js +1 -0
  23. package/dist/assets/RefreshDebugView-CNovrSAn.js +1 -0
  24. package/dist/assets/RequirementIntakeView-BnrQSVE_.js +1 -0
  25. package/dist/assets/SageTabs-CJqOqiY7.js +2 -0
  26. package/dist/assets/SddFlowGraph-CNOyn5N9.js +1 -0
  27. package/dist/assets/SddHub-mFjsa_Zl.js +2 -0
  28. package/dist/assets/SessionInspectView-MEmxIEzB.js +1 -0
  29. package/dist/assets/SessionList-DmcQJmzw.js +1 -0
  30. package/dist/assets/SessionsDashboard-BCYViJlx.js +1 -0
  31. package/dist/assets/SetupScreen-BwnSJt7v.js +1 -0
  32. package/dist/assets/SkillDetailView-ebz2dRUQ.js +3 -0
  33. package/dist/assets/TechStackView-DESDpUDA.js +2 -0
  34. package/dist/assets/TerminalPanel-BiWnldbB.js +1 -0
  35. package/dist/assets/{activity-C7dkJqBU.js → activity-87Kr1xrI.js} +2 -2
  36. package/dist/assets/{activity-D1rp3dH9.js → activity-CCW2-qSA.js} +2 -2
  37. package/dist/assets/activity-CXLMCm4J.js +10 -0
  38. package/dist/assets/{activity-BU6MNvBJ.js → activity-CmzV075e.js} +2 -2
  39. package/dist/assets/{activity-C_18AaRY.js → activity-D2D6_ljD.js} +2 -2
  40. package/dist/assets/{activity-CpnSsE22.js → activity-Dt348P4m.js} +2 -2
  41. package/dist/assets/{activity-hTPcI4q1.js → activity-FxWZooaS.js} +2 -2
  42. package/dist/assets/button-rqi3MczV.js +1 -0
  43. package/dist/assets/chat-store-BcfvHUUj.js +1 -0
  44. package/dist/assets/{codemap-activity-store-Br4b57a0.js → codemap-activity-store-CWi-Yd9Z.js} +1 -1
  45. package/dist/assets/codemap-index-store-3M7F08K_.js +1 -0
  46. package/dist/assets/dialog-xJxaQi60.js +1 -0
  47. package/dist/assets/empty-state-BxilAuC3.js +1 -0
  48. package/dist/assets/i18n-DBqM1FUM.js +2 -0
  49. package/dist/assets/index-TDhvFXb0.js +144 -0
  50. package/dist/assets/input-ClZR-odw.js +1 -0
  51. package/dist/assets/{mailbox-store-B9DIvRgo.js → mailbox-store-yydAVjyj.js} +1 -1
  52. package/dist/assets/{markdown-Kp5uSgOw.js → markdown-BP6Z3HKc.js} +24 -24
  53. package/dist/assets/{monaco-BCqJp2xW.js → monaco-_kWjHrlo.js} +204 -204
  54. package/dist/assets/{monaco-theme-CR1QvFi2.js → monaco-theme-Dmx6JuoU.js} +1 -1
  55. package/dist/assets/react-core-BNmTiJ-I.js +9 -0
  56. package/dist/assets/{roster-ws-BQUI8QuW.js → roster-ws-n_N7K9tX.js} +1 -1
  57. package/dist/assets/{settings-BGvRM3vJ.js → settings-B1vpPbTt.js} +1 -1
  58. package/dist/assets/{settings-D-LlBmzO.js → settings-BZnHCnGT.js} +1 -1
  59. package/dist/assets/{settings-1o1gooaL.js → settings-BcB2BIE2.js} +1 -1
  60. package/dist/assets/{settings-Cy_xp4Jt.js → settings-D9AQ5wLT2.js} +1 -1
  61. package/dist/assets/{settings-BV8EFmpH.js → settings-DiVpBZQ2.js} +1 -1
  62. package/dist/assets/{settings-nWMBX3xS.js → settings-DwbEJvxt.js} +1 -1
  63. package/dist/assets/settings-WuyKla3E.js +1 -0
  64. package/dist/assets/setup-B-xPcuTH.js +1 -0
  65. package/dist/assets/setup-B9oerXTs.js +1 -0
  66. package/dist/assets/setup-BWlr07i_.js +1 -0
  67. package/dist/assets/setup-CQ4-lz5u.js +1 -0
  68. package/dist/assets/setup-Cmq_aIjv.js +1 -0
  69. package/dist/assets/setup-DK5JTuqw.js +1 -0
  70. package/dist/assets/setup-qooXjj4V.js +1 -0
  71. package/dist/assets/shared-D8dubdNH.js +1 -0
  72. package/dist/assets/stores-Cfei1ViB.js +7 -0
  73. package/dist/assets/ui-store-CLXDcLPI.js +1 -0
  74. package/dist/assets/useWebSocket-AYEcpb1U.js +27 -0
  75. package/dist/assets/{utils-DQ9Exx8j.js → utils-BpBOwXlT.js} +1 -1
  76. package/dist/assets/vector-memory-panel-BwPPCCbh.js +1 -0
  77. package/dist/assets/{vendor-BMdWcCR4.css → vendor-BShi5_Dg.css} +1 -1
  78. package/dist/assets/vendor-BshlG0z-.js +125 -0
  79. package/dist/assets/view-navigation-CvWJeGMc.js +1 -0
  80. package/dist/assets/vite-preload-Czpn1I53.js +1 -0
  81. package/dist/assets/ws-client-C_IqS0t4.js +22 -0
  82. package/dist/assets/xyflow-BNn76cbK.js +7 -0
  83. package/dist/assets/xyflow-DLioOiRN.css +1 -0
  84. package/dist/components/AgentOfficeView/AgentLane.d.ts +10 -0
  85. package/dist/components/AgentOfficeView/BreakRoom.d.ts +10 -0
  86. package/dist/components/AgentOfficeView/ClientOfficeHeader.d.ts +6 -0
  87. package/dist/components/AgentOfficeView/OfficeBriefing.d.ts +8 -0
  88. package/dist/components/AgentOfficeView/parcels.d.ts +27 -0
  89. package/dist/components/AgentOfficeView.d.ts +2 -10
  90. package/dist/components/ChatInput/chat-input-bars.d.ts +30 -0
  91. package/dist/components/ChatInput/session-draft.d.ts +46 -0
  92. package/dist/components/ChatInput/use-chat-keydown.d.ts +21 -0
  93. package/dist/components/ChatInput/use-chat-submit.d.ts +40 -0
  94. package/dist/components/ChatInput/use-paste-drop.d.ts +1 -1
  95. package/dist/components/ChatInput/use-speech-recognition.d.ts +1 -1
  96. package/dist/components/ChatInput.d.ts +3 -3
  97. package/dist/components/DependencyGraph.d.ts +1 -1
  98. package/dist/components/DiffView.d.ts +1 -1
  99. package/dist/components/FileActivityDrawer/ContextTab.d.ts +21 -0
  100. package/dist/components/FileActivityDrawer/LogsTab.d.ts +13 -0
  101. package/dist/components/FileActivityDrawer/OverviewTab.d.ts +14 -0
  102. package/dist/components/FileActivityDrawer/SkeletonTab.d.ts +5 -0
  103. package/dist/components/FileActivityDrawer/types.d.ts +58 -0
  104. package/dist/components/FileActivityDrawer.d.ts +1 -40
  105. package/dist/components/MainViewSlot.d.ts +16 -0
  106. package/dist/components/MemoryManager/DeleteMemoryDialog.d.ts +3 -2
  107. package/dist/components/MessageBubble/ToolLedgerCard.d.ts +1 -1
  108. package/dist/components/SettingsPanel/brain-section-options.d.ts +6 -0
  109. package/dist/components/SetupScreen/CustomProviderSection.d.ts +1 -1
  110. package/dist/components/ViewRouter.d.ts +12 -4
  111. package/dist/components/agents/AgentRosterCard.d.ts +1 -1
  112. package/dist/components/context-editor/ContextWindowEditor.d.ts +1 -1
  113. package/dist/components/ui/dropdown-menu.d.ts +1 -1
  114. package/dist/components/vector-memory-panel/index.d.ts +1 -1
  115. package/dist/components/view-registry.d.ts +73 -0
  116. package/dist/hooks/useServerMessage.d.ts +71 -0
  117. package/dist/hooks/ws-handlers/session-context-handlers.d.ts +20 -0
  118. package/dist/index.css +788 -788
  119. package/dist/index.html +25 -25
  120. package/dist/index.js +48077 -45298
  121. package/dist/lib/platform.d.ts +40 -0
  122. package/dist/lib/view-navigation.d.ts +27 -2
  123. package/dist/lib/ws-client-auth.d.ts +17 -0
  124. package/dist/lib/ws-client-connection.d.ts +26 -0
  125. package/dist/lib/ws-client-contracts.d.ts +10 -0
  126. package/dist/lib/ws-client-echo.d.ts +46 -0
  127. package/dist/lib/ws-client-queue.d.ts +18 -0
  128. package/dist/lib/ws-client-session-methods.d.ts +54 -0
  129. package/dist/lib/ws-client-swap.d.ts +53 -0
  130. package/dist/lib/ws-client.d.ts +40 -71
  131. package/dist/manifest.json +1 -1
  132. package/dist/stores/context-editor-store.d.ts +1 -1
  133. package/dist/stores/council-log-store.d.ts +6 -0
  134. package/dist/stores/index.d.ts +2 -2
  135. package/dist/stores/session-tab-store.d.ts +8 -0
  136. package/dist/stores/types.d.ts +10 -1
  137. package/dist/stores/ui-store-chrome.d.ts +12 -0
  138. package/dist/stores/ui-store-persist.d.ts +4 -0
  139. package/dist/stores/ui-store-types.d.ts +379 -0
  140. package/dist/stores/ui-store.d.ts +7 -467
  141. package/dist/stores/viz-graph-helpers.d.ts +18 -0
  142. package/dist/stores/viz-pipeline.d.ts +7 -0
  143. package/dist/stores/viz-store.d.ts +3 -123
  144. package/dist/stores/viz-types.d.ts +124 -0
  145. package/dist/types/brain.d.ts +3 -0
  146. package/dist/types/client-message.d.ts +8 -0
  147. package/dist/types/runtime.d.ts +7 -0
  148. package/dist/types/sage.d.ts +7 -0
  149. package/dist/types/server-message-chimera.d.ts +161 -0
  150. package/dist/types/server-message-files.d.ts +195 -0
  151. package/dist/types/server-message-fleet.d.ts +148 -0
  152. package/dist/types/server-message-mcp.d.ts +199 -0
  153. package/dist/types/server-message-system.d.ts +399 -0
  154. package/dist/types/server-message.d.ts +12 -1098
  155. package/dist/types/skills-design.d.ts +7 -0
  156. package/dist/types/system.d.ts +16 -0
  157. package/package.json +9 -9
  158. package/dist/assets/AgentRosterView-BVpIFQwi.js +0 -9
  159. package/dist/assets/AnalyticsDashboard-nqlWJi6M.js +0 -1
  160. package/dist/assets/AudienceMemoryPanel-BT6C4Jkw.js +0 -3
  161. package/dist/assets/ChangesView-CN7NWDeV.js +0 -1
  162. package/dist/assets/ChimeraReviewsView-BNQE5kRx.js +0 -1
  163. package/dist/assets/ChronicleDashboard-BWMkG_hu.js +0 -1
  164. package/dist/assets/CodeEditor-DZ2k-Mz5.js +0 -2
  165. package/dist/assets/CodeMap-CLOuNLqN.js +0 -1
  166. package/dist/assets/ConfirmModal-B6BGiiN8.js +0 -1
  167. package/dist/assets/CronJobsPanel-CsMIoWVQ.js +0 -1
  168. package/dist/assets/DebugDashboard-C0tmxxV8.js +0 -1
  169. package/dist/assets/DesignGalleryView-lc-XRmVG.js +0 -1
  170. package/dist/assets/GoalView-BuYUc4OB.js +0 -1
  171. package/dist/assets/KanbanView-DQK6adut.js +0 -3
  172. package/dist/assets/MailboxDetailView-CBV3-Hf2.js +0 -1
  173. package/dist/assets/MemoryDrawer-rPf-1Ulk.js +0 -1
  174. package/dist/assets/MemoryManager-B_ZJhOqq.js +0 -1
  175. package/dist/assets/ModelPicker-CLs0qQgg.js +0 -1
  176. package/dist/assets/OfficeMapPanel-DnbdkXL1.js +0 -4
  177. package/dist/assets/ProcessMonitor-CHNNqCk9.js +0 -1
  178. package/dist/assets/PromptJournalView-Biu4DknM.js +0 -1
  179. package/dist/assets/QueuePanel-CzTXq6j4.js +0 -1
  180. package/dist/assets/RefreshDebugView-d9iU3sFX.js +0 -1
  181. package/dist/assets/RequirementIntakeView-g9dzUTVw.js +0 -1
  182. package/dist/assets/SageTabs-Bw6PDwy3.js +0 -2
  183. package/dist/assets/SddFlowGraph-Bj_Aqq5B.js +0 -1
  184. package/dist/assets/SddHub-Cdow0Exb.js +0 -2
  185. package/dist/assets/SessionInspectView-je_xLISf.js +0 -1
  186. package/dist/assets/SessionList-4y1uuB-y.js +0 -1
  187. package/dist/assets/SessionsDashboard-DkaNF5lx.js +0 -1
  188. package/dist/assets/SetupScreen-DWzbXvmU.js +0 -1
  189. package/dist/assets/SkillDetailView-Bjq8GkDB.js +0 -3
  190. package/dist/assets/SpecsView-ok8HZ8ws.js +0 -1
  191. package/dist/assets/TechStackView-CQ9AdoBa.js +0 -2
  192. package/dist/assets/TerminalPanel-cbM6oQWQ.js +0 -1
  193. package/dist/assets/activity-CtTKsSX6.js +0 -10
  194. package/dist/assets/button-DNyYztcH.js +0 -1
  195. package/dist/assets/chat-store-oW_-zcJP.js +0 -1
  196. package/dist/assets/codemap-index-store-tSmlp7Uz.js +0 -1
  197. package/dist/assets/dialog-BTHxOi5z.js +0 -1
  198. package/dist/assets/empty-state-DBQN80mK.js +0 -1
  199. package/dist/assets/i18n-D06uU1PM.js +0 -2
  200. package/dist/assets/index-Cwjer17r.js +0 -144
  201. package/dist/assets/input-CTGeYzNe.js +0 -1
  202. package/dist/assets/settings-Ci_RMpCQ.js +0 -1
  203. package/dist/assets/setup-B0D9CK3-.js +0 -1
  204. package/dist/assets/setup-B58YVaGU.js +0 -1
  205. package/dist/assets/setup-C2H9Uv0Q.js +0 -1
  206. package/dist/assets/setup-CzM4dkkU.js +0 -1
  207. package/dist/assets/setup-Di56FlHP.js +0 -1
  208. package/dist/assets/setup-Dwt58Mpz.js +0 -1
  209. package/dist/assets/setup-DznVdlJy.js +0 -1
  210. package/dist/assets/shared-CLfD85oZ.js +0 -1
  211. package/dist/assets/stores-C7Vvce-6.js +0 -7
  212. package/dist/assets/ui-store-Dm7ujR9u.js +0 -1
  213. package/dist/assets/useWebSocket-9lfOsI_r.js +0 -27
  214. package/dist/assets/vector-memory-panel-B4bQhdHe.js +0 -1
  215. package/dist/assets/vendor-enc0q-Va.js +0 -139
  216. package/dist/assets/view-navigation-wOKaM_Rf.js +0 -1
  217. package/dist/assets/ws-client-DtTZLD8e.js +0 -22
  218. /package/dist/assets/{OfficeMapPanel-Ce7myLNH.css → AgentRosterView-Ce7myLNH.css} +0 -0
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Platform-dependent presentation details.
3
+ *
4
+ * The keyboard handlers throughout the app already accept either modifier
5
+ * (`e.ctrlKey || e.metaKey`), so the SHORTCUTS WORK on macOS — but every label
6
+ * that advertised them said "Ctrl", which is the key a Mac user does not press.
7
+ * The activity bar tooltips, the "…" overflow menu and the shortcuts overlay
8
+ * all hard-coded the string. This module is the one place that decides.
9
+ * See docs/audit/webui-full-review-2026-09-03.md B-15.
10
+ */
11
+ /**
12
+ * True on Apple platforms, where the primary chord modifier is ⌘ rather than
13
+ * Ctrl. Read once at module load: the platform cannot change mid-session, and
14
+ * a per-render probe would be a needless global access in hot paths.
15
+ *
16
+ * `navigator.userAgentData.platform` is the modern, non-deprecated source;
17
+ * `navigator.platform` is the fallback for browsers that do not ship UA-CH
18
+ * (Safari and Firefox, which is to say most of the Macs this matters for).
19
+ * Guarded for non-browser contexts (SSR-style imports, vitest node env).
20
+ */
21
+ export declare const IS_APPLE_PLATFORM: boolean;
22
+ /**
23
+ * Label for the primary chord modifier: `⌘` on Apple platforms, `Ctrl`
24
+ * elsewhere. Deliberately NOT translated — modifier keys are engraved on the
25
+ * hardware and carry the same name in every locale this app ships.
26
+ */
27
+ export declare const MOD_KEY_LABEL: string;
28
+ /** `Alt` is `⌥` on Apple keyboards. Same reasoning as {@link MOD_KEY_LABEL}. */
29
+ export declare const ALT_KEY_LABEL: string;
30
+ /** `Shift` renders as `⇧` alongside the other glyphs on Apple keyboards. */
31
+ export declare const SHIFT_KEY_LABEL: string;
32
+ /**
33
+ * Render one key name from a shortcut table for the current platform.
34
+ *
35
+ * Tables stay written in the portable `['Ctrl', 'Shift', 'W']` form; this maps
36
+ * the three modifier names at display time and passes everything else through
37
+ * (letters, digits, `F5`, `Enter`, arrows) unchanged.
38
+ */
39
+ export declare function platformKeyLabel(key: string): string;
40
+ //# sourceMappingURL=platform.d.ts.map
@@ -1,10 +1,35 @@
1
- import { type Activity } from '@/stores/ui-store';
1
+ import { type Activity, type View } from '@/stores/ui-store';
2
+ /**
3
+ * A view that is PAIRED with an activity-bar side panel: opening the panel
4
+ * steers the main area here, and vice versa.
5
+ */
2
6
  export type PanelMainView = 'chat' | 'files' | 'skill' | 'changes' | 'mailbox' | 'design-gallery';
7
+ /**
8
+ * A standalone main view with its own activity-bar icon (or a slot in the "…"
9
+ * utilities menu). Selecting one collapses the side panel.
10
+ */
3
11
  export type MainView = 'goal' | 'kanban' | 'sddhub' | 'settings' | 'memory' | 'roster' | 'codemap' | 'techstack' | 'chronicle' | 'intake' | 'prompts' | 'chimera';
4
- export type AppView = PanelMainView | MainView | 'sessions' | 'session-inspect' | 'setup' | 'debug' | 'refresh-debug' | 'analytics';
12
+ /**
13
+ * A view with no bar affordance at all — reached from the command palette, a
14
+ * deep link, or another view's action. Diagnostics and drill-downs live here.
15
+ */
16
+ export type UnlistedView = 'sessions' | 'session-inspect' | 'setup' | 'context' | 'debug' | 'refresh-debug' | 'analytics' | 'deadcode';
17
+ /**
18
+ * Every view the app can display. Derived from `VIEWS` in the UI store rather
19
+ * than re-declared, so the router and the navigation helpers cannot disagree.
20
+ */
21
+ export type AppView = View;
5
22
  export declare const PANEL_VIEW_BY_ACTIVITY: Record<Activity, PanelMainView>;
6
23
  export declare const VIEW_ACTIVITY: Partial<Record<AppView, Activity>>;
7
24
  export declare const ACTIVITY_SHORTCUT_BY_KEY: Readonly<Record<string, Activity>>;
25
+ /**
26
+ * Chord labels shown in activity-bar tooltips and the "…" overflow menu.
27
+ *
28
+ * Built from `ACTIVITY_SHORTCUT_BY_KEY` rather than re-typed, so a rebound
29
+ * digit cannot advertise the old one, and from `MOD_KEY_LABEL` so a Mac shows
30
+ * `⌘1` for a chord its handler already accepts via `e.metaKey`.
31
+ * The `agents` activity has no digit and stays deliberately unlabelled.
32
+ */
8
33
  export declare const ACTIVITY_SHORTCUT_LABEL_BY_ACTIVITY: Readonly<Record<Activity, string>>;
9
34
  export declare function pairedViewForActivity(activity: Activity): PanelMainView;
10
35
  export declare function shortcutLabelForActivity(activity: Activity): string;
@@ -0,0 +1,17 @@
1
+ export declare function wsUrlCanUseAuthCookie(wsUrl: string): boolean;
2
+ /**
3
+ * Exchange a stored token for an HttpOnly auth cookie via `/ws-auth`.
4
+ * Called once before the first connect so subsequent reconnections can
5
+ * drop the `?token=` from the WS URL (C-2 fix — token-in-URL closes
6
+ * the C-598 query-string exposure class). No-op when the cookie is
7
+ * already set, when the server is on a loopback bind (no token
8
+ * required), or when no token is available yet.
9
+ *
10
+ * Failure is non-fatal only for local loopback or explicit public-WS URL
11
+ * flows. Normal remote browser clients need the cookie path so the token does
12
+ * not remain in the WebSocket URL.
13
+ *
14
+ * Returns the possibly-stripped WS URL.
15
+ */
16
+ export declare function ensureAuthCookie(wsUrl: string): Promise<string>;
17
+ //# sourceMappingURL=ws-client-auth.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { planConnectionReconnect, type SurfaceConnectionState } from '@wrongstack/webui-protocol';
2
+ import type { WSServerMessage } from '../types';
3
+ export interface SocketLifecycleCallbacks {
4
+ isCurrentGeneration: () => boolean;
5
+ onOpen: () => void;
6
+ onMessage: (msg: WSServerMessage) => void;
7
+ onError: (lastError: string) => void;
8
+ onClose: (reasonText: string | undefined, isInitialFailure: boolean) => void;
9
+ onTimeout: () => void;
10
+ }
11
+ /**
12
+ * Bind standard WebSocket lifecycle handlers (open, message, error, close)
13
+ * with generation check and connection timeout.
14
+ */
15
+ export declare function bindSocketLifecycle(ws: WebSocket, callbacks: SocketLifecycleCallbacks, timeoutMs?: number): {
16
+ cancelTimeout: () => void;
17
+ };
18
+ export declare function planReconnectHelper(state: SurfaceConnectionState, maxReconnectAttempts: number, queueLimit: number): {
19
+ state: SurfaceConnectionState;
20
+ plan: ReturnType<typeof planConnectionReconnect>['plan'];
21
+ };
22
+ export declare function retryNowHelper(statusState: string, reconnectTimer: ReturnType<typeof setTimeout> | null, connectionState: SurfaceConnectionState, connectFn: () => Promise<void>): {
23
+ reconnectTimer: ReturnType<typeof setTimeout> | null;
24
+ connectionState: SurfaceConnectionState;
25
+ };
26
+ //# sourceMappingURL=ws-client-connection.d.ts.map
@@ -6,5 +6,15 @@ export interface WSSendOptions {
6
6
  echoToChat?: boolean | undefined;
7
7
  /** Reject one-shot actions instead of replaying them after a reconnect. */
8
8
  queueIfDisconnected?: boolean | undefined;
9
+ /**
10
+ * Caller-supplied correlation id. When `echoToChat: false` and the request
11
+ * type has a known response counterpart, the client will mint one if you
12
+ * don't. The id is stamped on the outgoing payload so the server can echo
13
+ * it back, and the response suppression is keyed by it (B-04).
14
+ *
15
+ * Supply one when the same call is made in a loop and you need to tell
16
+ * which response belongs to which call.
17
+ */
18
+ requestId?: string | undefined;
9
19
  }
10
20
  //# sourceMappingURL=ws-client-contracts.d.ts.map
@@ -0,0 +1,46 @@
1
+ import type { WSClientMessage, WSServerMessage } from '../types';
2
+ export declare const CHAT_ECHO_RESPONSE_BY_REQUEST: Partial<Record<WSClientMessage['type'], WSServerMessage['type']>>;
3
+ export declare const CHAT_ECHO_SUPPRESSION_TTL_MS = 30000;
4
+ /**
5
+ * Cadence of the lazy echo-suppression sweep (see ensureEchoSweep). Chosen
6
+ * at 2x the TTL granularity: stale timestamps are released within one
7
+ * sweep interval of expiry without a per-push clock read.
8
+ */
9
+ export declare const CHAT_ECHO_SUPPRESSION_SWEEP_MS = 15000;
10
+ export declare class WsClientEchoSuppression {
11
+ suppressedChatEchoes: Map<string, number>;
12
+ echoSweepTimer: ReturnType<typeof setInterval> | null;
13
+ registerSuppression(message: WSClientMessage, options: {
14
+ echoToChat?: boolean;
15
+ requestId?: string;
16
+ }): void;
17
+ /**
18
+ * Consume one UI-originated response that must not be mirrored into chat.
19
+ *
20
+ * B-04: the suppression map is keyed by requestId. The caller passes the
21
+ * full message so we can read the `requestId` echoed by the server; only
22
+ * the matching request consumes a slot. A response with no (or
23
+ * unrecognised) requestId is left alone — that is exactly the case the
24
+ * previous FIFO queue got wrong: tab A's suppression swallowed tab B's
25
+ * chat-issued `/tools` reply when B's response happened to arrive first.
26
+ *
27
+ * Pass `msg` whenever the caller has it (the central WS_HANDLERS path
28
+ * does). When `msg` is missing, no suppression is possible — that
29
+ * matches the audit's instruction that suppression must be correlated
30
+ * end-to-end, never type-keyed.
31
+ */
32
+ consumeSuppressedChatEcho(responseType: string, msg?: WSServerMessage): boolean;
33
+ /**
34
+ * Lazy periodic sweep for `suppressedChatEchoes`. TTL trimming otherwise
35
+ * runs only on consume — a requestId that was minted but never consumed
36
+ * (chat view unmounted, user on another screen) would otherwise retain
37
+ * its timestamp indefinitely. The sweep bounds retention to TTL + one
38
+ * sweep interval and self-stops when the map empties, so no timer runs
39
+ * for clients that never suppress. RAM-leak audit 2026-08-11 Finding 4
40
+ * / fix 2026-08-16.
41
+ */
42
+ private ensureEchoSweep;
43
+ private sweepSuppressedChatEchoes;
44
+ clear(): void;
45
+ }
46
+ //# sourceMappingURL=ws-client-echo.d.ts.map
@@ -0,0 +1,18 @@
1
+ import type { WSClientMessage } from '../types';
2
+ export interface QueueState {
3
+ messageQueue: WSClientMessage[];
4
+ messageQueueChars: number;
5
+ messageQueueWeights: WeakMap<object, number>;
6
+ }
7
+ /**
8
+ * FIFO-drop oldest by both count and serialized size. A count-only cap
9
+ * still allows a disconnected tab to retain hundreds of multi-megabyte
10
+ * image messages.
11
+ */
12
+ export declare function enqueueMessage(queueState: QueueState, message: WSClientMessage, serialized: string, maxQueuedMessages: number, maxQueuedChars: number): boolean;
13
+ /**
14
+ * Drain the offline queue onto a freshly-opened socket.
15
+ * Local array drain makes the loop finite even if socket state changes.
16
+ */
17
+ export declare function flushMessageQueueHelper(queueState: QueueState, sendFn: (msg: WSClientMessage) => void): void;
18
+ //# sourceMappingURL=ws-client-queue.d.ts.map
@@ -0,0 +1,54 @@
1
+ import type { WSClientMessage, WSModelSwitchResult, WSServerMessage, WSUserMessageImage } from '../types';
2
+ import type { WSSendOptions } from './ws-client-contracts';
3
+ import type { EventHandler, PendingConfirm } from './ws-client-utils';
4
+ /** Options for `sendMailboxMessage` — a mailbox message of a given intent
5
+ * type (btw, steer, note, …) routed to a target agent/role. Shared by the
6
+ * ws-client method, the `useWebSocket` wrapper, and UI prop contracts. */
7
+ export type WSMailboxSendOptions = {
8
+ type: 'note' | 'ask' | 'assign' | 'steer' | 'btw' | 'broadcast' | 'status' | 'result' | 'review';
9
+ to: string;
10
+ subject: string;
11
+ body: string;
12
+ priority?: 'low' | 'normal' | 'high' | undefined;
13
+ audience?: 'all' | 'leaders' | undefined;
14
+ };
15
+ export interface WsClientSessionHost {
16
+ send(message: WSClientMessage, options?: WSSendOptions): boolean;
17
+ withSession<T extends Record<string, unknown>>(payload: T, sessionId?: string | undefined): T & {
18
+ sessionId?: string;
19
+ };
20
+ on<K extends WSServerMessage['type']>(eventType: K, handler: (msg: Extract<WSServerMessage, {
21
+ type: K;
22
+ }>) => void): () => void;
23
+ on(eventType: string, handler: EventHandler): () => void;
24
+ pendingConfirms: Map<string, PendingConfirm>;
25
+ subscribedSessionIds: string[];
26
+ replayOnNextSubscribe: boolean;
27
+ armedResends: Map<string, {
28
+ content: string;
29
+ freshContext?: boolean | undefined;
30
+ images?: WSUserMessageImage[] | undefined;
31
+ armedAt: number;
32
+ }>;
33
+ }
34
+ export interface WsClientSessionMethods {
35
+ sendMessage(content: string, images?: WSUserMessageImage[], freshContext?: boolean, sessionId?: string | undefined): string;
36
+ getChimeraReports(sessionId?: string | undefined): void;
37
+ adviseTopic(prompt: string, timeoutMs?: number): Promise<Extract<WSServerMessage, {
38
+ type: 'topic.advice_result';
39
+ }>['payload']>;
40
+ sendMailboxMessage(opts: WSMailboxSendOptions, sessionId?: string | undefined): string;
41
+ sendAbort(sessionId?: string | undefined): void;
42
+ subscribeSessions(sessionIds: string[]): void;
43
+ clearSessionSubscription(): void;
44
+ sendConfirm(id: string, decision: 'yes' | 'no' | 'always' | 'deny'): void;
45
+ switchModel(provider: string, model: string, timeoutMs?: number): Promise<WSModelSwitchResult['payload']>;
46
+ shutdownCodebaseIndexServer(timeoutMs?: number): Promise<Extract<WSServerMessage, {
47
+ type: 'codebase.index.server.shutdown_result';
48
+ }>['payload']>;
49
+ }
50
+ export declare const sessionMethods: WsClientSessionMethods;
51
+ export declare function installWsClientSessionMethods(ctor: {
52
+ prototype: Partial<WsClientSessionHost>;
53
+ }): void;
54
+ //# sourceMappingURL=ws-client-session-methods.d.ts.map
@@ -0,0 +1,53 @@
1
+ import type { WSClientMessage, WSUserMessageImage } from '../types';
2
+ /**
3
+ * Stand-in target for a `session.new`: the client asked the server to create a
4
+ * session and cannot name it until the answer arrives. Never a real id — the
5
+ * server issues opaque ids, and the leading `#` is not in that alphabet.
6
+ */
7
+ export declare const NEW_SESSION_SWAP_TARGET = "#pending-new-session";
8
+ /** Bound on `seenSessionIds`; four tabs plus a long tail of retired ones. */
9
+ export declare const MAX_SEEN_SESSION_IDS = 64;
10
+ /** Minimum spacing between automatic `session_not_ready` retries for ONE session. */
11
+ export declare const NOT_READY_RETRY_COOLDOWN_MS = 15000;
12
+ /** Upper bound on parked retries, so tab churn cannot grow the map forever. */
13
+ export declare const MAX_ARMED_RESENDS = 8;
14
+ /**
15
+ * The session a swap request is asking to land on, or `null` when the message
16
+ * is not a swap request at all. `session.resume` names its target in
17
+ * `payload.id`; `session.new` has none yet.
18
+ */
19
+ export declare function resolveSwapTarget(message: WSClientMessage): string | null;
20
+ /**
21
+ * Is this `session.start` the answer to the swap this client is waiting on?
22
+ *
23
+ * A resume names its target, so it matches by id. A `session.new` cannot —
24
+ * the server invents the id — so its answer is recognised as the first RESET
25
+ * announcement naming a session this client has never seen. Requiring
26
+ * `reset` keeps an unrelated first-sight announcement (a background tab the
27
+ * server announces on its own) from consuming the grant.
28
+ */
29
+ export declare function matchesPendingSwap(pendingSwapTarget: string | null, seenSessionIds: Set<string>, payload: {
30
+ sessionId: string;
31
+ reset?: boolean;
32
+ }): boolean;
33
+ export declare function rememberSeenSession(seenSessionIds: Set<string>, sessionId: string): void;
34
+ export declare function armNotReadyResendHelper(armedResends: Map<string, {
35
+ content: string;
36
+ freshContext?: boolean | undefined;
37
+ images?: WSUserMessageImage[] | undefined;
38
+ armedAt: number;
39
+ }>, sessionId: string, message: {
40
+ content: string;
41
+ freshContext?: boolean | undefined;
42
+ images?: WSUserMessageImage[] | undefined;
43
+ }): boolean;
44
+ export declare function consumeArmedResendHelper(armedResends: Map<string, {
45
+ content: string;
46
+ freshContext?: boolean | undefined;
47
+ images?: WSUserMessageImage[] | undefined;
48
+ armedAt: number;
49
+ }>, sessionId: string, onResend: (content: string, images?: WSUserMessageImage[], freshContext?: boolean, sessionId?: string) => void): void;
50
+ export declare function sweepExpiredPendingConfirmsHelper(pendingConfirms: Map<string, {
51
+ expiresAtMs: number;
52
+ }>, now: number): void;
53
+ //# sourceMappingURL=ws-client-swap.d.ts.map
@@ -1,21 +1,11 @@
1
- import type { WSClientMessage, WSModelSwitchResult, WSServerMessage, WSUserMessageImage } from '../types';
1
+ import type { WSClientMessage, WSServerMessage, WSUserMessageImage } from '../types';
2
2
  import { type WsClientActionMethods } from './ws-client-actions';
3
3
  import type { WSSendOptions } from './ws-client-contracts';
4
4
  import { type WsClientDomainMethods } from './ws-client-domain-methods';
5
- import { type EventHandler, type WsStatus } from './ws-client-utils';
5
+ import { type WSMailboxSendOptions, type WsClientSessionMethods } from './ws-client-session-methods';
6
+ import { type EventHandler, type PendingConfirm, type WsStatus } from './ws-client-utils';
6
7
  export type { WSSendOptions } from './ws-client-contracts';
7
- export type { WsStatus };
8
- /** Options for `sendMailboxMessage` — a mailbox message of a given intent
9
- * type (btw, steer, note, …) routed to a target agent/role. Shared by the
10
- * ws-client method, the `useWebSocket` wrapper, and UI prop contracts. */
11
- export type WSMailboxSendOptions = {
12
- type: 'note' | 'ask' | 'assign' | 'steer' | 'btw' | 'broadcast' | 'status' | 'result' | 'review';
13
- to: string;
14
- subject: string;
15
- body: string;
16
- priority?: 'low' | 'normal' | 'high' | undefined;
17
- audience?: 'all' | 'leaders' | undefined;
18
- };
8
+ export type { WSMailboxSendOptions, WsStatus };
19
9
  declare class WrongStackWebSocketClientBase {
20
10
  private ws;
21
11
  private url;
@@ -36,7 +26,9 @@ declare class WrongStackWebSocketClientBase {
36
26
  private static readonly MAX_QUEUED_MESSAGES;
37
27
  /** Count-only limits are ineffective for image/base64 payloads. */
38
28
  private static readonly MAX_QUEUED_CHARS;
39
- private pendingConfirms;
29
+ /** Shared with the session-method mixin (`WsClientSessionHost`), which is
30
+ * installed onto this prototype — hence not private. */
31
+ pendingConfirms: Map<string, PendingConfirm>;
40
32
  /**
41
33
  * Wall-clock TTL for a `pendingConfirms` entry. The map is keyed by a
42
34
  * server-issued id and is only deleted by `sendConfirm`; a permission
@@ -87,26 +79,44 @@ declare class WrongStackWebSocketClientBase {
87
79
  * transcript? True for a page's first declaration and after every
88
80
  * reconnect; cleared as soon as one goes out. See `subscribeSessions`.
89
81
  */
90
- private replayOnNextSubscribe;
82
+ replayOnNextSubscribe: boolean;
91
83
  /** Last declared open-tab set — see `subscribeSessions`. */
92
- private subscribedSessionIds;
93
- /** Minimum spacing between automatic `session_not_ready` retries for ONE session. */
94
- private static readonly NOT_READY_RETRY_COOLDOWN_MS;
95
- /** Upper bound on parked retries, so tab churn cannot grow the map forever. */
96
- private static readonly MAX_ARMED_RESENDS;
84
+ subscribedSessionIds: string[];
97
85
  /**
98
86
  * Auto-retry parking for a `session_not_ready` refusal: the message the
99
87
  * server refused while its session had no live writer, held until that
100
88
  * session's `session.start` announces it open again. See `armNotReadyResend`.
101
89
  */
102
- private readonly armedResends;
90
+ readonly armedResends: Map<string, {
91
+ content: string;
92
+ freshContext?: boolean | undefined;
93
+ images?: WSUserMessageImage[] | undefined;
94
+ armedAt: number;
95
+ }>;
103
96
  /** Stored last close reason / error message so the UI can show "what
104
97
  * went wrong" while reconnecting instead of a generic spinner. */
105
98
  private lastErrorText;
106
99
  private statusListeners;
107
100
  private currentStatus;
108
- private suppressedChatEchoes;
109
- private echoSweepTimer;
101
+ /**
102
+ * requestId-keyed suppression map. Each `echoToChat: false` request mints
103
+ * a requestId, stamps it on the outgoing payload, and registers it here
104
+ * with an expiry timestamp. The server echoes the same requestId back
105
+ * in its response, and `consumeSuppressedChatEcho` looks it up to drop
106
+ * the chat echo only for the matching request — not for any other
107
+ * in-flight request of the same type from a different tab.
108
+ *
109
+ * The TTL (30 s) and a periodic sweep are the safety net for a
110
+ * requestId that was minted but whose response never arrived (chat
111
+ * unmounted mid-flight, server crash, etc.) so the map cannot grow
112
+ * unboundedly.
113
+ *
114
+ * B-04 (docs/audit/webui-full-review-2026-09-03.md).
115
+ */
116
+ private echoSuppression;
117
+ private get suppressedChatEchoes();
118
+ private get echoSweepTimer();
119
+ private set echoSweepTimer(value);
110
120
  private protocolCapabilities;
111
121
  private protocolVersion;
112
122
  supportsCapability(capability: string): boolean;
@@ -145,13 +155,7 @@ declare class WrongStackWebSocketClientBase {
145
155
  * Exchange a stored token for an HttpOnly auth cookie via `/ws-auth`.
146
156
  * Called once before the first connect so subsequent reconnections can
147
157
  * drop the `?token=` from the WS URL (C-2 fix — token-in-URL closes
148
- * the C-598 query-string exposure class). No-op when the cookie is
149
- * already set, when the server is on a loopback bind (no token
150
- * required), or when no token is available yet.
151
- *
152
- * Failure is non-fatal only for local loopback or explicit public-WS URL
153
- * flows. Normal remote browser clients need the cookie path so the token does
154
- * not remain in the WebSocket URL.
158
+ * the C-598 query-string exposure class).
155
159
  */
156
160
  ensureAuthCookie(): Promise<void>;
157
161
  connect(): Promise<void>;
@@ -237,19 +241,12 @@ declare class WrongStackWebSocketClientBase {
237
241
  private sweepExpiredPendingConfirms;
238
242
  private emit;
239
243
  send(message: WSClientMessage, options?: WSSendOptions): boolean;
240
- /** Consume one UI-originated response that must not be mirrored into chat. */
241
- consumeSuppressedChatEcho(responseType: string): boolean;
242
244
  /**
243
- * Lazy periodic sweep for `suppressedChatEchoes`. TTL trimming otherwise
244
- * runs only on consume — a response type that is suppressed but never
245
- * consumed (chat view unmounted, user on another screen) retains up to
246
- * MAX_PER_TYPE stale timestamps indefinitely. The sweep bounds retention
247
- * to TTL + one sweep interval and self-stops when the map empties, so no
248
- * timer runs for clients that never suppress. RAM-leak audit 2026-08-11
249
- * Finding 4 / fix 2026-08-16.
245
+ * Consume one UI-originated response that must not be mirrored into chat.
246
+ *
247
+ * B-04: the suppression map is keyed by requestId.
250
248
  */
251
- private ensureEchoSweep;
252
- private sweepSuppressedChatEchoes;
249
+ consumeSuppressedChatEcho(responseType: string, msg?: WSServerMessage): boolean;
253
250
  /**
254
251
  * Register a handler for a server message type. Two overloads:
255
252
  * - `on('text_delta', (msg) => …)` — msg is narrowed to the matching union
@@ -265,39 +262,11 @@ declare class WrongStackWebSocketClientBase {
265
262
  type: K;
266
263
  }>) => void): void;
267
264
  off(eventType: string, handler: EventHandler): void;
268
- sendMessage(content: string, images?: WSUserMessageImage[], freshContext?: boolean, sessionId?: string | undefined): string;
269
- /** Ask the server for the persisted Chimera review reports of a session. */
270
- getChimeraReports(sessionId?: string | undefined): void;
271
- adviseTopic(prompt: string, timeoutMs?: number): Promise<Extract<WSServerMessage, {
272
- type: 'topic.advice_result';
273
- }>['payload']>;
274
- /** Send a mailbox message of the given type (btw, steer, note, etc.)
275
- * to a target agent/role. Returns the requestId for response tracking. */
276
- sendMailboxMessage(opts: WSMailboxSendOptions, sessionId?: string | undefined): string;
277
- sendAbort(sessionId?: string | undefined): void;
278
- /**
279
- * Tell the server every session this page is displaying.
280
- *
281
- * Four tabs share ONE socket, so the server cannot infer the open set from
282
- * the last message's `sessionId` — it would filter the other three tabs'
283
- * runs out of every broadcast, and a background tab would simply stop
284
- * producing output. Re-sent in full on every tab open/close (it replaces,
285
- * it does not merge) and re-sent on reconnect, since the server forgets the
286
- * set with the connection.
287
- */
288
- subscribeSessions(sessionIds: string[]): void;
289
- /** Forget the declared set so the next call re-sends it (used on reconnect). */
290
- clearSessionSubscription(): void;
291
- sendConfirm(id: string, decision: 'yes' | 'no' | 'always' | 'deny'): void;
292
- switchModel(provider: string, model: string, timeoutMs?: number): Promise<WSModelSwitchResult['payload']>;
293
- shutdownCodebaseIndexServer(timeoutMs?: number): Promise<Extract<WSServerMessage, {
294
- type: 'codebase.index.server.shutdown_result';
295
- }>['payload']>;
296
265
  disconnect(): void;
297
266
  get isConnected(): boolean;
298
267
  get currentSessionId(): string | null;
299
268
  }
300
- export type WrongStackWebSocketClient = WrongStackWebSocketClientBase & WsClientActionMethods & WsClientDomainMethods;
269
+ export type WrongStackWebSocketClient = WrongStackWebSocketClientBase & WsClientActionMethods & WsClientDomainMethods & WsClientSessionMethods;
301
270
  interface WrongStackWebSocketClientConstructor {
302
271
  new (url?: string): WrongStackWebSocketClient;
303
272
  readonly prototype: WrongStackWebSocketClient;
@@ -14,4 +14,4 @@
14
14
  "theme_color": "#090a0f",
15
15
  "display": "standalone",
16
16
  "orientation": "any"
17
- }
17
+ }
@@ -75,6 +75,6 @@ interface ContextEditorActions {
75
75
  getProposedMessages: () => ContextEditorMessage[];
76
76
  }
77
77
  type ContextEditorStore = ContextEditorState & ContextEditorActions;
78
- export declare const useContextEditorStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ContextEditorStore>>;
78
+ export declare const useContextEditorStore: import("./session-scoped-store").SessionScopedStore<ContextEditorStore>;
79
79
  export {};
80
80
  //# sourceMappingURL=context-editor-store.d.ts.map
@@ -17,6 +17,12 @@ export interface CouncilPanelEntry {
17
17
  /** Distinct provider/model targets that served the valid votes. */
18
18
  distinctTargetCount?: number | undefined;
19
19
  judgeUsed?: boolean | undefined;
20
+ judgeLabel?: string | undefined;
21
+ /** The tie-breaker had already cast one of the votes it is breaking. */
22
+ judgeIsVoter?: boolean | undefined;
23
+ /** Deliberation rounds run (1 = none) and seats that moved in the last one. */
24
+ rounds?: number | undefined;
25
+ deliberationChanges?: number | undefined;
20
26
  totalTokens?: number | undefined;
21
27
  durationMs?: number | undefined;
22
28
  /** Structural warnings — most importantly a CORRELATED (non-diverse) panel. */
@@ -42,12 +42,12 @@ export { type SddWizardPhase, type SddWizardSnapshot, useSddWizardStore, } from
42
42
  /** The lane pointer — the single answer to "which tab is in front". */
43
43
  export { activeSessionLaneId, useActiveSessionId } from './session-lanes.js';
44
44
  export { memorySessionSnapshots, useSessionStore } from './session-store.js';
45
- export { isTabBusy, MAX_OPEN_TABS, slotOf, summarizeTab, type TabSummary, useSessionTabStore } from './session-tab-store.js';
45
+ export { isTabBusy, MAX_OPEN_TABS, slotOf, summarizeTab, type TabSummary, useSessionTabStore, } from './session-tab-store.js';
46
46
  export { type SideEffectEntry, useSideEffectStore } from './side-effect-store.js';
47
47
  export { type BoardTaskItem, type BoardTaskStatus, type SpecColumn, type SpecDetail, type SpecListItem, useSpecsStore, } from './specs-store.js';
48
48
  export { type TechStackCoverage, type TechStackDependency, type TechStackEvidence, type TechStackFinding, type TechStackFindingAction, type TechStackFindingSeverity, type TechStackFindingType, type TechStackJobKind, type TechStackJobStatus, type TechStackJobView, type TechStackProgress, type TechStackSnapshot, type TechStackWorkspace, useTechStackStore, } from './techstack-store.js';
49
49
  export { bucketSuccessRatio, LEADER_AGENT_KEY, sessionInFlight, type ToolStatsBucket, type ToolStatsDelegation, type ToolStatsSession, useToolStatsStore, } from './tool-stats-store.js';
50
- export type { AgentTranscriptEntry, AgentTranscriptKind, BrainDecisionData, ChatMessage, ChatMessageAttachment, CouncilDecisionData, CouncilSeatVote, FleetTimelineEvent, SessionHistoryEntry, SessionInfo, SubagentEvent, SubagentView, ToolExecution } from './types.js';
50
+ export type { AgentTranscriptEntry, AgentTranscriptKind, BrainDecisionData, ChatMessage, ChatMessageAttachment, CouncilDecisionData, CouncilSeatVote, FleetTimelineEvent, SessionHistoryEntry, SessionInfo, SubagentEvent, SubagentView, ToolExecution, } from './types.js';
51
51
  export type { Activity, DockSection, InspectorTab, WorkDashboardTab } from './ui-store.js';
52
52
  export { coerceActivity, resetUiNavigationToHome, SIDEBAR_DEFAULT_WIDTH, SIDEBAR_MAX_WIDTH, SIDEBAR_MIN_WIDTH, useUIStore, } from './ui-store.js';
53
53
  export type { VizEdge, VizEvent, VizNode } from './viz-store.js';
@@ -67,6 +67,14 @@ interface SessionTabState {
67
67
  * drops to zero.
68
68
  */
69
69
  closeTabsForSessions: (sessionIds: string[]) => string[];
70
+ /**
71
+ * Retire `retiredId` and hand its slot to `nextId` IN PLACE — the tab does
72
+ * not close and no second tab opens for the newcomer. This is the client
73
+ * half of `session.new { replaceSessionId }`: the server closes the retired
74
+ * session and answers with a reset `session.start` whose `clearedSessionId`
75
+ * names it, and the tab it lived in must become the new session's tab.
76
+ */
77
+ swapTabSession: (retiredId: string, nextId: string) => void;
70
78
  markSeen: (sessionId: string) => void;
71
79
  setAttention: (sessionId: string, needsAttention: boolean) => void;
72
80
  }
@@ -17,6 +17,10 @@ export interface CouncilSeatVote {
17
17
  weight?: number | undefined;
18
18
  durationMs?: number | undefined;
19
19
  error?: string | undefined;
20
+ /** Deliberation round this ballot came from; 1 is the independent round. */
21
+ round?: number | undefined;
22
+ /** The seat changed its vote after seeing the other seats' ballots. */
23
+ changed?: boolean | undefined;
20
24
  at: number;
21
25
  }
22
26
  export interface ToolExecution {
@@ -46,7 +50,7 @@ export interface ChatMessage {
46
50
  content: string;
47
51
  /** Images the user attached to this message (user role only). */
48
52
  attachments?: ChatMessageAttachment[] | undefined;
49
- /** A compact, presentation-only summary for a built-in Elite Bug Hunter
53
+ /** A compact, presentation-only summary for a built-in Proof-Driven Bug Hunter
50
54
  * request. The full instruction is still sent to the agent, but never
51
55
  * printed into the user's transcript. */
52
56
  bugHunt?: {
@@ -184,9 +188,14 @@ export interface CouncilDecisionData {
184
188
  distinctTargetCount?: number | undefined;
185
189
  judgeUsed?: boolean | undefined;
186
190
  judgeModel?: string | undefined;
191
+ /** The tie-breaker had already cast one of the votes it is breaking. */
192
+ judgeIsVoter?: boolean | undefined;
187
193
  judgeRationale?: string | undefined;
188
194
  totalTokens?: number | undefined;
189
195
  durationMs?: number | undefined;
196
+ /** Deliberation rounds run (1 = none) and seats that moved in the last one. */
197
+ rounds?: number | undefined;
198
+ deliberationChanges?: number | undefined;
190
199
  warnings?: string[] | undefined;
191
200
  seats: CouncilSeatVote[];
192
201
  }
@@ -0,0 +1,12 @@
1
+ import type { UIState, SessionChromeState } from "./ui-store-types.js";
2
+ export declare function isDesktopShellStorageContext(): boolean;
3
+ export declare function homeNavigationStatePatch(options?: {
4
+ sidebarOpen?: boolean | undefined;
5
+ }): Partial<UIState>;
6
+ export declare function defaultSkillsState(): UIState['skillsState'];
7
+ export declare function defaultSessionChrome(): SessionChromeState;
8
+ export declare function readSessionChrome(state: UIState): SessionChromeState;
9
+ export declare function parkChrome(state: UIState, patch: Partial<SessionChromeState>): {
10
+ chromeBySession?: UIState['chromeBySession'];
11
+ };
12
+ //# sourceMappingURL=ui-store-chrome.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { PersistOptions } from "zustand/middleware";
2
+ import type { UIState } from "./ui-store-types.js";
3
+ export declare const uiPersistOptions: PersistOptions<UIState, Partial<UIState>>;
4
+ //# sourceMappingURL=ui-store-persist.d.ts.map