@wrongstack/webui 1.0.19 → 1.0.26

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 (259) hide show
  1. package/dist/assets/AgentRosterView-udJ14GYq.js +12 -0
  2. package/dist/assets/{AnalyticsDashboard-DmQd0E0V.js → AnalyticsDashboard-DwF-0cUA.js} +1 -1
  3. package/dist/assets/AudienceMemoryPanel-DpBGeZv_.js +3 -0
  4. package/dist/assets/ChangesView-BfM0T_aS.js +3 -0
  5. package/dist/assets/ChimeraReviewsView-Q_5C4DU1.js +1 -0
  6. package/dist/assets/ChronicleDashboard-D6LnZzhy.js +1 -0
  7. package/dist/assets/CodeEditor-DonrWH9u.js +2 -0
  8. package/dist/assets/CodeMap-Dxtc378S.js +1 -0
  9. package/dist/assets/{CronJobsPanel-TcZy_W2t.js → CronJobsPanel-Cn2PQO_p.js} +1 -1
  10. package/dist/assets/{DeadCodeScanPanel-BOD2JEyf.js → DeadCodeScanPanel-Mc5py-kJ.js} +1 -1
  11. package/dist/assets/{DebugDashboard-DFPNPzQ_.js → DebugDashboard-D0LRcT4J.js} +1 -1
  12. package/dist/assets/{DesignGalleryView-BXABwAji.js → DesignGalleryView-DAD-wRUc.js} +1 -1
  13. package/dist/assets/GoalView-CqeSw0tK.js +1 -0
  14. package/dist/assets/KanbanView-V-bkFftp.js +3 -0
  15. package/dist/assets/{MailboxDetailView-QyNmt1Gv.js → MailboxDetailView-CTEjap3r.js} +1 -1
  16. package/dist/assets/{MemoryDrawer-BZsyD1dh.js → MemoryDrawer-RCduY0FV.js} +1 -1
  17. package/dist/assets/MemoryManager-B-p6-Bic.js +1 -0
  18. package/dist/assets/{ProcessMonitor-Bz0jZvHJ.js → ProcessMonitor-B9tpPo4r.js} +1 -1
  19. package/dist/assets/PromptJournalView-DVNqlac9.js +1 -0
  20. package/dist/assets/ProviderTestView-mmfpnAbZ.js +1 -0
  21. package/dist/assets/QueuePanel-BB9qozjm.js +1 -0
  22. package/dist/assets/{RefreshDebugView-_XPrBDq3.js → RefreshDebugView-CCCWzq29.js} +1 -1
  23. package/dist/assets/{RepositoryHistoryView-Wlnvi5r1.js → RepositoryHistoryView-RQVRkkUU.js} +2 -2
  24. package/dist/assets/RequirementIntakeView-D_JRhgzW.js +1 -0
  25. package/dist/assets/{SageTabs-qrBn3VQr.js → SageTabs--k2hQTvl.js} +2 -2
  26. package/dist/assets/SddFlowGraph-DKrrRXKy.js +1 -0
  27. package/dist/assets/SddHub-B5XO56oY.js +2 -0
  28. package/dist/assets/{SessionInspectView-CuRk2DS0.js → SessionInspectView-j3VJwXNi.js} +1 -1
  29. package/dist/assets/SessionList-CCVHBseu.js +1 -0
  30. package/dist/assets/{SessionsDashboard-CSkm28Bx.js → SessionsDashboard-DsM7sXQw.js} +1 -1
  31. package/dist/assets/SetupScreen-DeuR8Y8S.js +1 -0
  32. package/dist/assets/SkillDetailView-BeZyGIpW.js +3 -0
  33. package/dist/assets/TechStackView-CpSMRQE0.js +2 -0
  34. package/dist/assets/TerminalPanel-BVJ5w-5R.js +1 -0
  35. package/dist/assets/activity-BS2aW_NN.js +10 -0
  36. package/dist/assets/activity-CR2KFruY.js +10 -0
  37. package/dist/assets/activity-Cd0qM2Hx.js +10 -0
  38. package/dist/assets/activity-DyXRoY2s.js +10 -0
  39. package/dist/assets/activity-bBAOetvE.js +10 -0
  40. package/dist/assets/activity-fI3Jy_jD.js +10 -0
  41. package/dist/assets/activity-t6fUmVjo.js +10 -0
  42. package/dist/assets/{button-BbeB5Qm8.js → button-UuKTnoM-.js} +1 -1
  43. package/dist/assets/chat-9GLubejR.js +1 -0
  44. package/dist/assets/chat-B50ssTLh.js +1 -0
  45. package/dist/assets/chat-CDioiM1L.js +1 -0
  46. package/dist/assets/chat-Cll_3gXD.js +1 -0
  47. package/dist/assets/chat-Cqhc6jQa.js +1 -0
  48. package/dist/assets/chat-DN1MggWt.js +1 -0
  49. package/dist/assets/chat-fyvZyUZM.js +1 -0
  50. package/dist/assets/chat-store-uzGtJfDz.js +1 -0
  51. package/dist/assets/{codemap-activity-store-Ha7XbGgq.js → codemap-activity-store-WjfEZe4_.js} +1 -1
  52. package/dist/assets/common-Bjl7V12m.js +1 -0
  53. package/dist/assets/common-BtyQBZBN.js +1 -0
  54. package/dist/assets/common-D0QL7rwb.js +1 -0
  55. package/dist/assets/common-DJRPtYAt.js +1 -0
  56. package/dist/assets/common-DPPTV3yw.js +1 -0
  57. package/dist/assets/common-DvjdaRhB.js +1 -0
  58. package/dist/assets/common-opV6EoLd.js +1 -0
  59. package/dist/assets/config-store-P5_updTQ.js +21 -0
  60. package/dist/assets/{dialog-b-Ai37sa.js → dialog-BDUaV5gY.js} +1 -1
  61. package/dist/assets/{empty-state-pfuS5znr.js → empty-state-BzoEa04Q.js} +1 -1
  62. package/dist/assets/{fonts-DRGbd-AM.js → fonts-C303yVU_.js} +2 -2
  63. package/dist/assets/i18n-t7rIS4DB.js +3 -0
  64. package/dist/assets/index-B4ELbNoz.js +181 -0
  65. package/dist/assets/index-qdrakcnP.css +1 -0
  66. package/dist/assets/{input-BA6D2L3K.js → input-DMnC2O7-.js} +1 -1
  67. package/dist/assets/{mailbox-store-ZQO_Rv6E.js → mailbox-store-DyOOYbni.js} +1 -1
  68. package/dist/assets/roster-ws-szSqUkqP.js +1 -0
  69. package/dist/assets/settings-BMHZcBqe.js +1 -0
  70. package/dist/assets/settings-BQ5J8WXE.js +1 -0
  71. package/dist/assets/settings-BfNJfO4z.js +1 -0
  72. package/dist/assets/settings-ClDQ01ie.js +1 -0
  73. package/dist/assets/settings-DD31lC4f.js +1 -0
  74. package/dist/assets/settings-Da3EIcna.js +1 -0
  75. package/dist/assets/settings-Dl_QM2QZ.js +1 -0
  76. package/dist/assets/{shared-BFJvAYzX.js → shared-CLNEiW00.js} +1 -1
  77. package/dist/assets/stores-Cx52UOxM.js +7 -0
  78. package/dist/assets/toasts-3tM1krOo.js +1 -0
  79. package/dist/assets/toasts-BrHW33qA.js +1 -0
  80. package/dist/assets/toasts-Buww129h.js +1 -0
  81. package/dist/assets/toasts-CSN9Fy47.js +1 -0
  82. package/dist/assets/toasts-DOoYxbHd.js +1 -0
  83. package/dist/assets/toasts-DkDnbhs_.js +1 -0
  84. package/dist/assets/toasts-Jo4VH13n.js +1 -0
  85. package/dist/assets/ui-store-DI0iusYZ.js +1 -0
  86. package/dist/assets/{utils-CKsqCaP8.js → utils-B21Devim.js} +1 -1
  87. package/dist/assets/{vector-memory-panel-YWv6xcza.js → vector-memory-panel-DnX-ODHC.js} +1 -1
  88. package/dist/assets/{vendor-V3ydTHqN.js → vendor-BfBvt432.js} +28 -28
  89. package/dist/assets/{view-navigation-DTs4cSQ6.js → view-navigation-Cvrp_uJm.js} +1 -1
  90. package/dist/components/BrowserLivePane.d.ts +2 -0
  91. package/dist/components/ChangesView.d.ts +3 -1
  92. package/dist/components/ChatInput/chat-input-bars.d.ts +1 -1
  93. package/dist/components/ChatInput/image-attachments.d.ts +19 -2
  94. package/dist/components/ChatInput/skill-mention-picker.d.ts +10 -0
  95. package/dist/components/ChatInput/slash-routing.d.ts +18 -0
  96. package/dist/components/ChatInput/use-paste-drop.d.ts +3 -0
  97. package/dist/components/ChatInput/use-prompt-queue-view.d.ts +13 -0
  98. package/dist/components/ChatView/BackgroundShellStrip.d.ts +16 -0
  99. package/dist/components/ChatView/TerminalStrip.d.ts +8 -0
  100. package/dist/components/CodeMap.d.ts +0 -12
  101. package/dist/components/CustomRosterPanel.d.ts +0 -1
  102. package/dist/components/GoalPanel.d.ts +2 -1
  103. package/dist/components/ImageDiffView.d.ts +12 -0
  104. package/dist/components/KanbanTaskExecution.d.ts +64 -0
  105. package/dist/components/KanbanTaskInspector.d.ts +1 -1
  106. package/dist/components/MessageBubble/AttachmentGallery.d.ts +1 -1
  107. package/dist/components/MessageBubble/GeneratedImagePreview.d.ts +10 -0
  108. package/dist/components/OfficeMapCanvas.d.ts +0 -7
  109. package/dist/components/SessionTabBar/summaries.d.ts +4 -0
  110. package/dist/components/SettingsPanel/BrainSection.d.ts +1 -1
  111. package/dist/components/SettingsPanel/JevSection.d.ts +4 -0
  112. package/dist/components/SettingsPanel/LimitsSection.d.ts +7 -0
  113. package/dist/components/SettingsPanel/MCPSection.d.ts +1 -37
  114. package/dist/components/SettingsPanel/MCPServerCards.d.ts +67 -0
  115. package/dist/components/SettingsPanel/MCPServerDialog.d.ts +11 -0
  116. package/dist/components/SettingsPanel/OAuthLoginSection.d.ts +2 -0
  117. package/dist/components/SettingsPanel/PreferenceControls.d.ts +8 -0
  118. package/dist/components/SettingsPanel/ProviderSavedProfiles.d.ts +50 -0
  119. package/dist/components/SettingsPanel/ProviderSection.d.ts +2 -79
  120. package/dist/components/SettingsPanel/SettingsNavigation.d.ts +12 -0
  121. package/dist/components/SettingsPanel/brain-section-options.d.ts +2 -3
  122. package/dist/components/SettingsPanel/contracts.d.ts +1 -0
  123. package/dist/components/SettingsPanel/official-servers.d.ts +1 -0
  124. package/dist/components/SettingsPanel/provider-section-types.d.ts +79 -0
  125. package/dist/components/SettingsPanel/use-brain-section.d.ts +28 -0
  126. package/dist/components/SidePanel/SessionList.d.ts +1 -34
  127. package/dist/components/SidePanel/session-history.d.ts +61 -0
  128. package/dist/components/SkillDetailView.d.ts +1 -1
  129. package/dist/components/SystemPromptPresetEditor.d.ts +9 -0
  130. package/dist/components/TerminalPanel.d.ts +8 -1
  131. package/dist/components/WorkspaceDock.d.ts +2 -2
  132. package/dist/components/chronicle-event-detail.d.ts +51 -0
  133. package/dist/components/context-dashboard-sections.d.ts +79 -0
  134. package/dist/components/review/ReviewDiff.d.ts +21 -0
  135. package/dist/components/review/ReviewTray.d.ts +15 -0
  136. package/dist/components/review/review-diff-model.d.ts +31 -0
  137. package/dist/components/use-code-map-flow.d.ts +25 -0
  138. package/dist/components/use-office-map-canvas.d.ts +42 -0
  139. package/dist/components/use-office-map-topology.d.ts +31 -0
  140. package/dist/components/use-skill-detail.d.ts +177 -0
  141. package/dist/components/vector-memory-panel/model.d.ts +9 -0
  142. package/dist/hooks/use-live-browser.d.ts +7 -0
  143. package/dist/hooks/useProviderModels.d.ts +2 -0
  144. package/dist/hooks/useWebSocket.d.ts +4 -5
  145. package/dist/hooks/ws-handlers/brain-handlers.d.ts +18 -0
  146. package/dist/hooks/ws-handlers/goal-handlers.d.ts +9 -0
  147. package/dist/hooks/ws-handlers/misc-handlers.d.ts +2 -21
  148. package/dist/hooks/ws-handlers/prompt-queue-handlers.d.ts +18 -0
  149. package/dist/index.css +3013 -3013
  150. package/dist/index.html +19 -19
  151. package/dist/index.js +98758 -91674
  152. package/dist/lib/auth-operation.d.ts +5 -0
  153. package/dist/lib/compact-file-tree.d.ts +30 -0
  154. package/dist/lib/project-image.d.ts +26 -0
  155. package/dist/lib/provider-warm.d.ts +3 -0
  156. package/dist/lib/sdd-theme.d.ts +2 -2
  157. package/dist/lib/ws-client-actions.d.ts +2 -0
  158. package/dist/lib/ws-client-domain-methods.d.ts +1 -1
  159. package/dist/lib/ws-client-session-methods.d.ts +3 -1
  160. package/dist/lib/ws-client.d.ts +3 -3
  161. package/dist/stores/chat-lane-data.d.ts +153 -0
  162. package/dist/stores/chat-lanes.d.ts +3 -174
  163. package/dist/stores/chat-queue-helpers.d.ts +9 -0
  164. package/dist/stores/chat-store-types.d.ts +3 -0
  165. package/dist/stores/chat-store.d.ts +1 -1
  166. package/dist/stores/context-editor-store.d.ts +1 -1
  167. package/dist/stores/council-log-store.d.ts +4 -0
  168. package/dist/stores/fleet-transcript.d.ts +14 -0
  169. package/dist/stores/git-changes-store.d.ts +3 -0
  170. package/dist/stores/goal-run-store.d.ts +8 -0
  171. package/dist/stores/goal-state-store.d.ts +3 -0
  172. package/dist/stores/goal-store.d.ts +9 -11
  173. package/dist/stores/local-prefs-defaults.d.ts +340 -0
  174. package/dist/stores/local-prefs.d.ts +2 -318
  175. package/dist/stores/notification-store.d.ts +9 -0
  176. package/dist/stores/review-store.d.ts +54 -0
  177. package/dist/stores/session-activity.d.ts +33 -0
  178. package/dist/stores/session-tab-store.d.ts +1 -46
  179. package/dist/stores/terminal-strip-store.d.ts +26 -0
  180. package/dist/stores/ui-store-chrome.d.ts +1 -1
  181. package/dist/stores/ui-store-persist.d.ts +2 -2
  182. package/dist/stores/ui-store-types.d.ts +4 -4
  183. package/dist/stores/ui-store.d.ts +5 -5
  184. package/dist/types/brain.d.ts +4 -2
  185. package/dist/types/client-message.d.ts +132 -11
  186. package/dist/types/jev.d.ts +62 -0
  187. package/dist/types/prompt-queue.d.ts +55 -0
  188. package/dist/types/protocol-core.d.ts +4 -216
  189. package/dist/types/runtime.d.ts +6 -39
  190. package/dist/types/server-message-files.d.ts +22 -0
  191. package/dist/types/server-message-mcp.d.ts +30 -0
  192. package/dist/types/server-message-system.d.ts +114 -0
  193. package/dist/types/server-message.d.ts +4 -3
  194. package/dist/types/system.d.ts +4 -24
  195. package/package.json +11 -10
  196. package/dist/assets/AgentRosterView-D4TuVXe8.js +0 -12
  197. package/dist/assets/AudienceMemoryPanel-DHJM4rf1.js +0 -3
  198. package/dist/assets/ChangesView-CZ-nCe26.js +0 -1
  199. package/dist/assets/ChimeraReviewsView-CNeRLesP.js +0 -1
  200. package/dist/assets/ChronicleDashboard-CYELq7EO.js +0 -1
  201. package/dist/assets/CodeEditor-CLscjkIR.js +0 -2
  202. package/dist/assets/CodeMap-CdVy9Q7V.js +0 -1
  203. package/dist/assets/GoalView-Cepqrg9l.js +0 -1
  204. package/dist/assets/KanbanView-FSePkLch.js +0 -3
  205. package/dist/assets/MemoryManager-IHmhWn4P.js +0 -1
  206. package/dist/assets/PromptJournalView-Ct8cLcGU.js +0 -1
  207. package/dist/assets/ProviderTestView-Dy3k2bVu.js +0 -1
  208. package/dist/assets/QueuePanel-oVkTB68Q.js +0 -1
  209. package/dist/assets/RequirementIntakeView-Cj5arGFF.js +0 -1
  210. package/dist/assets/SddFlowGraph-DS8R2zEj.js +0 -1
  211. package/dist/assets/SddHub-C8pHQYSM.js +0 -2
  212. package/dist/assets/SessionList-BgRb1Mp4.js +0 -1
  213. package/dist/assets/SetupScreen-CNcJ_9O9.js +0 -1
  214. package/dist/assets/SkillDetailView-Bc9owpaX.js +0 -3
  215. package/dist/assets/TechStackView-BHiGCRBT.js +0 -2
  216. package/dist/assets/TerminalPanel-7VeXK8LB.js +0 -1
  217. package/dist/assets/activity-1wlPY6yi.js +0 -10
  218. package/dist/assets/activity-BVbAv0x7.js +0 -10
  219. package/dist/assets/activity-BmJTU8kX.js +0 -10
  220. package/dist/assets/activity-By_aWEsY.js +0 -10
  221. package/dist/assets/activity-Cps_29WN.js +0 -10
  222. package/dist/assets/activity-Du_fOnvF.js +0 -10
  223. package/dist/assets/activity-p_2o4eC6.js +0 -10
  224. package/dist/assets/chat-6dE2AJNN.js +0 -1
  225. package/dist/assets/chat-B3AJmhGD.js +0 -1
  226. package/dist/assets/chat-BHsbpaVt.js +0 -1
  227. package/dist/assets/chat-BITJe8-v.js +0 -1
  228. package/dist/assets/chat-U-Jjb8_k.js +0 -1
  229. package/dist/assets/chat-_Xp5fDnj.js +0 -1
  230. package/dist/assets/chat-mSbSzPl5.js +0 -1
  231. package/dist/assets/chat-store-C-PKlsCR.js +0 -1
  232. package/dist/assets/common-BXosnbIt.js +0 -1
  233. package/dist/assets/common-CzfPgMjC.js +0 -1
  234. package/dist/assets/common-DDDPz7Dv.js +0 -1
  235. package/dist/assets/common-DYx9oSoC.js +0 -1
  236. package/dist/assets/common-DZ-05t4z.js +0 -1
  237. package/dist/assets/common-MjX8fcng.js +0 -1
  238. package/dist/assets/common-ipsuLC3n.js +0 -1
  239. package/dist/assets/config-store-xSv1mChc.js +0 -21
  240. package/dist/assets/i18n--QdD6NCn.js +0 -3
  241. package/dist/assets/index-DiX5j910.css +0 -1
  242. package/dist/assets/index-FWwLmwjx.js +0 -177
  243. package/dist/assets/roster-ws-CxKDc-ET.js +0 -1
  244. package/dist/assets/settings-B5Jy-ObI.js +0 -1
  245. package/dist/assets/settings-BXTJJ4n-.js +0 -1
  246. package/dist/assets/settings-BcXAVecM.js +0 -1
  247. package/dist/assets/settings-ByPfZHGm.js +0 -1
  248. package/dist/assets/settings-CCe4iHcn.js +0 -1
  249. package/dist/assets/settings-D2GLiaDO.js +0 -1
  250. package/dist/assets/settings-gB9nKL3f.js +0 -1
  251. package/dist/assets/stores-2kakt8j9.js +0 -7
  252. package/dist/assets/toasts-BsmyGP95.js +0 -1
  253. package/dist/assets/toasts-CgXHu8ZB.js +0 -1
  254. package/dist/assets/toasts-DZ6HdKgG.js +0 -1
  255. package/dist/assets/toasts-DizCJjAR.js +0 -1
  256. package/dist/assets/toasts-NC2MT4uN.js +0 -1
  257. package/dist/assets/toasts-bPl097de.js +0 -1
  258. package/dist/assets/toasts-tCVo15mP.js +0 -1
  259. package/dist/assets/ui-store-DC3mkswy.js +0 -1
@@ -0,0 +1,5 @@
1
+ import type { WSClientMessage } from '@/types';
2
+ import type { WrongStackWebSocketClient } from './ws-client';
3
+ /** A matching server acknowledgment, never an unrelated operation result. */
4
+ export declare function requestAuthOperation(client: WrongStackWebSocketClient, message: WSClientMessage, signal: AbortSignal, onTimeout: () => void): Promise<boolean>;
5
+ //# sourceMappingURL=auth-operation.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A list of changed files as a directory tree, with chains of single-child
3
+ * directories folded into one node (`packages/webui/src`), the way editors
4
+ * show "compact folders". Directories come before files, each sorted by name;
5
+ * every directory carries its file count and line totals.
6
+ */
7
+ export interface TreeFileLike {
8
+ path: string;
9
+ added: number;
10
+ deleted: number;
11
+ }
12
+ export interface CompactTreeDir<F extends TreeFileLike> {
13
+ kind: 'dir';
14
+ /** One or more path segments joined with `/`. */
15
+ name: string;
16
+ /** The full directory path, unique within the tree (a key and a collapse id). */
17
+ path: string;
18
+ children: CompactTreeNode<F>[];
19
+ fileCount: number;
20
+ added: number;
21
+ deleted: number;
22
+ }
23
+ export interface CompactTreeFile<F extends TreeFileLike> {
24
+ kind: 'file';
25
+ name: string;
26
+ file: F;
27
+ }
28
+ export type CompactTreeNode<F extends TreeFileLike> = CompactTreeDir<F> | CompactTreeFile<F>;
29
+ export declare function buildCompactFileTree<F extends TreeFileLike>(files: readonly F[]): CompactTreeNode<F>[];
30
+ //# sourceMappingURL=compact-file-tree.d.ts.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Load an image from the project for display (`files.image`): the server
3
+ * checks the path stays inside the project, sniffs the bytes, and answers
4
+ * with a data URL. Answers are cached for the page (a few dozen, newest kept);
5
+ * a miss is not cached, so a later look can succeed.
6
+ */
7
+ export type ProjectImageState = {
8
+ status: 'loading';
9
+ } | {
10
+ status: 'ready';
11
+ dataUrl: string;
12
+ bytes?: number | undefined;
13
+ } | {
14
+ status: 'unavailable';
15
+ reason: 'tooLarge' | 'notImage' | 'error';
16
+ detail?: string;
17
+ };
18
+ /**
19
+ * `key` tells apart two looks at one path (the same file generated twice);
20
+ * it defaults to the path.
21
+ */
22
+ export declare function loadProjectImage(filePath: string, key?: string): Promise<ProjectImageState>;
23
+ export declare function useProjectImage(filePath: string | undefined, key?: string): ProjectImageState;
24
+ /** `12.3 KiB`-style size for image captions. */
25
+ export declare function formatImageBytes(bytes: number | undefined): string;
26
+ //# sourceMappingURL=project-image.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** Composer text changed in `sessionId` while no turn is running there. */
2
+ export declare function warmProviderWhileTyping(sessionId: string, text: string, now?: number): void;
3
+ //# sourceMappingURL=provider-warm.d.ts.map
@@ -8,8 +8,8 @@
8
8
  import { type LucideIcon } from 'lucide-react';
9
9
  type SddStatus = 'pending' | 'queued' | 'in_progress' | 'blocked' | 'review' | 'failed' | 'completed' | 'cancelled';
10
10
  interface SddStatusStyle {
11
- /** Short label, e.g. "Running". */
12
- label: string;
11
+ /** i18n key resolving to the short label, e.g. "Running". */
12
+ labelKey: string;
13
13
  /** Lucide icon for the status. */
14
14
  icon: LucideIcon;
15
15
  /** True for the running state (drives spin + glow). */
@@ -64,6 +64,7 @@ export interface WsClientActionMethods {
64
64
  allowedTools?: string[];
65
65
  url?: string;
66
66
  headers?: Record<string, string>;
67
+ bearerTokenEnv?: string;
67
68
  lazy?: boolean;
68
69
  }): void;
69
70
  removeMcpServer(name: string): void;
@@ -78,6 +79,7 @@ export interface WsClientActionMethods {
78
79
  allowedTools?: string[];
79
80
  url?: string;
80
81
  headers?: Record<string, string>;
82
+ bearerTokenEnv?: string;
81
83
  lazy?: boolean;
82
84
  }): void;
83
85
  wakeMcpServer(name: string): void;
@@ -73,7 +73,7 @@ declare const domainMethods: {
73
73
  updateKey(this: WsClientDomainHost, providerId: string, label: string, apiKey: string): void;
74
74
  deleteKey(this: WsClientDomainHost, providerId: string, label: string): void;
75
75
  setActiveKey(this: WsClientDomainHost, providerId: string, label: string): void;
76
- addProvider(this: WsClientDomainHost, id: string, family: string, baseUrl?: string | undefined, apiKey?: string, models?: string[] | undefined, customModels?: Record<string, ProviderCustomModelWire> | undefined): void;
76
+ addProvider(this: WsClientDomainHost, id: string, family: string, baseUrl?: string | undefined, apiKey?: string, models?: string[] | undefined, customModels?: Record<string, ProviderCustomModelWire> | undefined, providerType?: string | undefined): void;
77
77
  removeProvider(this: WsClientDomainHost, providerId: string): void;
78
78
  listOAuthProviders(this: WsClientDomainHost): void;
79
79
  startOAuth(this: WsClientDomainHost, kind: string, providerId?: string): void;
@@ -1,4 +1,5 @@
1
1
  import type { WSClientMessage, WSModelSwitchResult, WSServerMessage, WSUserMessageImage } from '../types';
2
+ import type { FrameResume } from '@wrongstack/webui-protocol';
2
3
  import type { WSSendOptions } from './ws-client-contracts';
3
4
  import type { EventHandler, PendingConfirm } from './ws-client-utils';
4
5
  /** Options for `sendMailboxMessage` — a mailbox message of a given intent
@@ -24,6 +25,7 @@ export interface WsClientSessionHost {
24
25
  pendingConfirms: Map<string, PendingConfirm>;
25
26
  subscribedSessionIds: string[];
26
27
  replayOnNextSubscribe: boolean;
28
+ frameResume: FrameResume<WSServerMessage>;
27
29
  armedResends: Map<string, {
28
30
  content: string;
29
31
  freshContext?: boolean | undefined;
@@ -41,7 +43,7 @@ export interface WsClientSessionMethods {
41
43
  sendAbort(sessionId?: string | undefined): void;
42
44
  subscribeSessions(sessionIds: string[]): void;
43
45
  clearSessionSubscription(): void;
44
- sendConfirm(id: string, decision: 'yes' | 'no' | 'always' | 'deny'): void;
46
+ sendConfirm(id: string, decision: 'yes' | 'no' | 'always' | 'always-exact' | 'always-command' | 'always-tool' | 'deny'): void;
45
47
  switchModel(provider: string, model: string, timeoutMs?: number): Promise<WSModelSwitchResult['payload']>;
46
48
  shutdownCodebaseIndexServer(timeoutMs?: number): Promise<Extract<WSServerMessage, {
47
49
  type: 'codebase.index.server.shutdown_result';
@@ -1,3 +1,4 @@
1
+ import { FrameResume } from '@wrongstack/webui-protocol';
1
2
  import type { WSClientMessage, WSServerMessage, WSUserMessageImage } from '../types';
2
3
  import { type WsClientActionMethods } from './ws-client-actions';
3
4
  import type { WSSendOptions } from './ws-client-contracts';
@@ -82,6 +83,8 @@ declare class WrongStackWebSocketClientBase {
82
83
  replayOnNextSubscribe: boolean;
83
84
  /** Last declared open-tab set — see `subscribeSessions`. */
84
85
  subscribedSessionIds: string[];
86
+ /** Reconnect catch-up: session frames in order, missed ones asked back. */
87
+ readonly frameResume: FrameResume<WSServerMessage>;
85
88
  /**
86
89
  * Auto-retry parking for a `session_not_ready` refusal: the message the
87
90
  * server refused while its session had no live writer, held until that
@@ -114,9 +117,6 @@ declare class WrongStackWebSocketClientBase {
114
117
  * B-04 (docs/audit/webui-full-review-2026-09-03.md).
115
118
  */
116
119
  private echoSuppression;
117
- private get suppressedChatEchoes();
118
- private get echoSweepTimer();
119
- private set echoSweepTimer(value);
120
120
  private protocolCapabilities;
121
121
  private protocolVersion;
122
122
  supportsCapability(capability: string): boolean;
@@ -0,0 +1,153 @@
1
+ import type { WSQueuedPromptView } from '@/types/prompt-queue';
2
+ import type { QueuedItem, ToolExecution } from './chat-store-types';
3
+ import type { ChatMessage } from './types.js';
4
+ /** Everything the chat surface owns for ONE session. Plain data only. */
5
+ export interface ChatLaneData {
6
+ messages: ChatMessage[];
7
+ currentAssistantMessageId: string | null;
8
+ currentToolId: string | null;
9
+ isLoading: boolean;
10
+ abortController: AbortController | null;
11
+ executions: Map<string, ToolExecution>;
12
+ toolMessageIdsByUseId: Map<string, string>;
13
+ queue: QueuedItem[];
14
+ /** Prompts queued on the server for this session (it owns and drains them). */
15
+ serverQueue: WSQueuedPromptView[];
16
+ runStart: {
17
+ at: number;
18
+ cost: number;
19
+ } | null;
20
+ refining: boolean;
21
+ pendingRefinement: {
22
+ text: string;
23
+ images: Array<{
24
+ data: string;
25
+ mime: string;
26
+ }>;
27
+ mode: QueuedItem['mode'];
28
+ } | null;
29
+ thinkingBuffer: string;
30
+ thinkingStartedAt: number | null;
31
+ thinkingLogBuffer: string;
32
+ thinkingLogStartedAt: number | null;
33
+ /**
34
+ * An approval prompt raised while this tab was in the BACKGROUND.
35
+ *
36
+ * A modal is the loudest possible cross-tab bleed, so a background tab's
37
+ * prompt is never opened over the tab in front. It is parked here instead
38
+ * and opened when the user switches to the tab that raised it — without
39
+ * this the prompt was simply discarded and the run sat blocked behind an
40
+ * attention dot with no way to answer it.
41
+ */
42
+ pendingConfirm: PendingConfirm | null;
43
+ /**
44
+ * A provider-fallback prompt raised while this tab was in the BACKGROUND.
45
+ *
46
+ * Same reasoning as `pendingConfirm`: the fallback dialog is one global
47
+ * surface, so a background tab's prompt must not open over the tab in front.
48
+ * It used to be DROPPED instead — the run then sat behind a question nobody
49
+ * could answer until the server's countdown auto-switched the model on its
50
+ * own, which is a route change the user never chose.
51
+ */
52
+ pendingFallback: LaneFallbackPrompt | null;
53
+ }
54
+ /** The provider-fallback prompt payload, as the dialog needs it. */
55
+ export interface LaneFallbackPrompt {
56
+ requestId: string;
57
+ from: {
58
+ providerId: string;
59
+ model: string;
60
+ };
61
+ status: number;
62
+ candidates: Array<{
63
+ providerId: string;
64
+ model: string;
65
+ }>;
66
+ autoSwitchSeconds: number;
67
+ timestamp: number;
68
+ }
69
+ /** The tool-approval prompt payload, as the dialog needs it. */
70
+ export interface PendingConfirm {
71
+ id: string;
72
+ toolName: string;
73
+ input: unknown;
74
+ suggestedPattern: string;
75
+ decisionSource?: string | undefined;
76
+ riskTier?: 'safe' | 'standard' | 'destructive' | undefined;
77
+ boundaryReason?: string | undefined;
78
+ deadlineAt?: number | undefined;
79
+ }
80
+ export declare function createLaneData(): ChatLaneData;
81
+ export interface ChatLaneActions {
82
+ readonly sessionId: string;
83
+ readonly messages: ChatMessage[];
84
+ readonly currentAssistantMessageId: string | null;
85
+ readonly currentToolId: string | null;
86
+ readonly isLoading: boolean;
87
+ readonly abortController: AbortController | null;
88
+ readonly executions: Map<string, ToolExecution>;
89
+ readonly toolMessageIdsByUseId: Map<string, string>;
90
+ readonly queue: QueuedItem[];
91
+ readonly serverQueue: WSQueuedPromptView[];
92
+ readonly runStart: {
93
+ at: number;
94
+ cost: number;
95
+ } | null;
96
+ readonly refining: boolean;
97
+ readonly pendingRefinement: ChatLaneData['pendingRefinement'];
98
+ readonly thinkingBuffer: string;
99
+ readonly thinkingStartedAt: number | null;
100
+ readonly thinkingLogBuffer: string;
101
+ readonly thinkingLogStartedAt: number | null;
102
+ readonly pendingConfirm: PendingConfirm | null;
103
+ addMessage: (msg: Omit<ChatMessage, 'id' | 'timestamp'> & {
104
+ id?: string;
105
+ timestamp?: number;
106
+ }) => string;
107
+ setMessages: (messages: ChatMessage[]) => void;
108
+ updateMessage: (id: string, updates: Partial<ChatMessage>) => void;
109
+ appendToMessage: (id: string, text: string) => void;
110
+ finalizeMessage: (id: string, opts?: {
111
+ final?: boolean;
112
+ }) => void;
113
+ setToolResult: (id: string, result: string, ok: boolean) => void;
114
+ appendToolProgress: (id: string, line: string) => void;
115
+ appendToolProgressLines: (id: string, lines: string[]) => void;
116
+ getToolMessageId: (toolUseId: string) => string | undefined;
117
+ setToolResultByUseId: (toolUseId: string, result: string, ok: boolean) => void;
118
+ appendToolProgressLinesByUseId: (toolUseId: string, lines: string[]) => void;
119
+ setLoading: (loading: boolean) => void;
120
+ setAbortController: (ctrl: AbortController | null) => void;
121
+ clearMessages: () => void;
122
+ setCurrentAssistantMessage: (id: string | null) => void;
123
+ setCurrentToolId: (id: string | null) => void;
124
+ truncateAfter: (id: string) => void;
125
+ addExecution: (exec: ToolExecution) => void;
126
+ updateExecution: (id: string, updates: Partial<ToolExecution>) => void;
127
+ enqueue: (text: string, mode?: QueuedItem['mode'], images?: QueuedItem['images'], alreadyDispatched?: boolean) => void;
128
+ dequeue: () => QueuedItem | null;
129
+ dequeueDrainable: () => QueuedItem | null;
130
+ removeQueued: (idx: number) => void;
131
+ clearQueue: () => void;
132
+ setRefining: (v: boolean) => void;
133
+ /** Park (or clear) this tab's unanswered approval prompt. */
134
+ setPendingConfirm: (confirm: PendingConfirm | null) => void;
135
+ setPendingFallback: (prompt: LaneFallbackPrompt | null) => void;
136
+ setPendingRefinement: (text: string | null, images?: Array<{
137
+ data: string;
138
+ mime: string;
139
+ }>, mode?: QueuedItem['mode']) => void;
140
+ removeMessage: (id: string) => void;
141
+ updateLastUserMessage: (text: string) => void;
142
+ setRunStart: (s: {
143
+ at: number;
144
+ cost: number;
145
+ } | null) => void;
146
+ appendThinking: (text: string) => void;
147
+ clearThinking: () => void;
148
+ flushThinkingLog: (iteration: number) => void;
149
+ clearThinkingLog: () => void;
150
+ /** Bulk patch — used by the facade's `setState` and by replay hydration. */
151
+ patch: (updates: Partial<ChatLaneData>) => void;
152
+ }
153
+ //# sourceMappingURL=chat-lane-data.d.ts.map
@@ -1,31 +1,6 @@
1
- /**
2
- * chat-lanes.ts — The chat surface's per-session source of truth.
3
- *
4
- * ONE LANE PER TAB. Four tabs, four lanes, no shared mutable chat state
5
- * between them. Think of them as four side-by-side layouts that happen to be
6
- * stacked: nothing in lane 2 can be observed or written by lane 1, background
7
- * included.
8
- *
9
- * Why this exists (the bug it replaces): the chat surface used to be a single
10
- * live store plus a `memorySessionCaches` map of parked snapshots. Every WS
11
- * writer therefore had to ask "is this event for the tab in front?" and drop it
12
- * otherwise. That is a NEGATIVE routing rule, and it fails two ways:
13
- *
14
- * 1. One writer that forgets the guard appends another session's tokens to
15
- * whatever transcript happens to be in front. That is the bleed.
16
- * 2. Even when every guard is right, a background tab's own output is
17
- * DROPPED — it was never written anywhere — so switching back showed a
18
- * transcript frozen at the moment you left.
19
- *
20
- * Lanes make routing POSITIVE: an event names its session, the router hands
21
- * back that session's lane, and the write lands there. A message that names no
22
- * session, or names a session with no lane, is dropped by the router — never
23
- * mis-delivered. There is no "current lane" a writer can accidentally reach.
24
- *
25
- * `chat-store.ts` is a thin read/write facade over `lanes[activeSessionId]` so
26
- * the foreground components keep their existing API.
27
- */
28
- import type { QueuedItem, ToolExecution } from './chat-store-types';
1
+ import { type ChatLaneActions, type ChatLaneData } from './chat-lane-data.js';
2
+ export type { ChatLaneActions, ChatLaneData, PendingConfirm } from './chat-lane-data.js';
3
+ import type { QueuedItem } from './chat-store-types';
29
4
  import type { ChatMessage } from './types.js';
30
5
  /**
31
6
  * Hard ceiling on concurrent lanes. Four tabs, four lanes, no exceptions —
@@ -39,80 +14,6 @@ export declare const MAX_LANES = 4;
39
14
  * session so a message typed before `session.start` lands is not lost.
40
15
  */
41
16
  export declare const DEFAULT_LANE_ID = "__unbound__";
42
- /** Everything the chat surface owns for ONE session. Plain data only. */
43
- export interface ChatLaneData {
44
- messages: ChatMessage[];
45
- currentAssistantMessageId: string | null;
46
- currentToolId: string | null;
47
- isLoading: boolean;
48
- abortController: AbortController | null;
49
- executions: Map<string, ToolExecution>;
50
- toolMessageIdsByUseId: Map<string, string>;
51
- queue: QueuedItem[];
52
- runStart: {
53
- at: number;
54
- cost: number;
55
- } | null;
56
- refining: boolean;
57
- pendingRefinement: {
58
- text: string;
59
- images: Array<{
60
- data: string;
61
- mime: string;
62
- }>;
63
- mode: QueuedItem['mode'];
64
- } | null;
65
- thinkingBuffer: string;
66
- thinkingStartedAt: number | null;
67
- thinkingLogBuffer: string;
68
- thinkingLogStartedAt: number | null;
69
- /**
70
- * An approval prompt raised while this tab was in the BACKGROUND.
71
- *
72
- * A modal is the loudest possible cross-tab bleed, so a background tab's
73
- * prompt is never opened over the tab in front. It is parked here instead
74
- * and opened when the user switches to the tab that raised it — without
75
- * this the prompt was simply discarded and the run sat blocked behind an
76
- * attention dot with no way to answer it.
77
- */
78
- pendingConfirm: PendingConfirm | null;
79
- /**
80
- * A provider-fallback prompt raised while this tab was in the BACKGROUND.
81
- *
82
- * Same reasoning as `pendingConfirm`: the fallback dialog is one global
83
- * surface, so a background tab's prompt must not open over the tab in front.
84
- * It used to be DROPPED instead — the run then sat behind a question nobody
85
- * could answer until the server's countdown auto-switched the model on its
86
- * own, which is a route change the user never chose.
87
- */
88
- pendingFallback: LaneFallbackPrompt | null;
89
- }
90
- /** The provider-fallback prompt payload, as the dialog needs it. */
91
- interface LaneFallbackPrompt {
92
- requestId: string;
93
- from: {
94
- providerId: string;
95
- model: string;
96
- };
97
- status: number;
98
- candidates: Array<{
99
- providerId: string;
100
- model: string;
101
- }>;
102
- autoSwitchSeconds: number;
103
- timestamp: number;
104
- }
105
- /** The tool-approval prompt payload, as the dialog needs it. */
106
- export interface PendingConfirm {
107
- id: string;
108
- toolName: string;
109
- input: unknown;
110
- suggestedPattern: string;
111
- decisionSource?: string | undefined;
112
- riskTier?: 'safe' | 'standard' | 'destructive' | undefined;
113
- boundaryReason?: string | undefined;
114
- deadlineAt?: number | undefined;
115
- }
116
17
  /**
117
18
  * Stable empty lane handed to selectors that ask for a lane which does not
118
19
  * exist. Must be a singleton: returning a fresh object would make every
@@ -171,77 +72,6 @@ export declare function adoptDefaultLane(sessionId: string): void;
171
72
  /** Point the foreground at a lane, creating it if needed. */
172
73
  export declare function setActiveLane(sessionId: string | null): void;
173
74
  export declare function activeLaneId(): string;
174
- export interface ChatLaneActions {
175
- readonly sessionId: string;
176
- readonly messages: ChatMessage[];
177
- readonly currentAssistantMessageId: string | null;
178
- readonly currentToolId: string | null;
179
- readonly isLoading: boolean;
180
- readonly abortController: AbortController | null;
181
- readonly executions: Map<string, ToolExecution>;
182
- readonly toolMessageIdsByUseId: Map<string, string>;
183
- readonly queue: QueuedItem[];
184
- readonly runStart: {
185
- at: number;
186
- cost: number;
187
- } | null;
188
- readonly refining: boolean;
189
- readonly pendingRefinement: ChatLaneData['pendingRefinement'];
190
- readonly thinkingBuffer: string;
191
- readonly thinkingStartedAt: number | null;
192
- readonly thinkingLogBuffer: string;
193
- readonly thinkingLogStartedAt: number | null;
194
- readonly pendingConfirm: PendingConfirm | null;
195
- addMessage: (msg: Omit<ChatMessage, 'id' | 'timestamp'> & {
196
- id?: string;
197
- timestamp?: number;
198
- }) => string;
199
- setMessages: (messages: ChatMessage[]) => void;
200
- updateMessage: (id: string, updates: Partial<ChatMessage>) => void;
201
- appendToMessage: (id: string, text: string) => void;
202
- finalizeMessage: (id: string, opts?: {
203
- final?: boolean;
204
- }) => void;
205
- setToolResult: (id: string, result: string, ok: boolean) => void;
206
- appendToolProgress: (id: string, line: string) => void;
207
- appendToolProgressLines: (id: string, lines: string[]) => void;
208
- getToolMessageId: (toolUseId: string) => string | undefined;
209
- setToolResultByUseId: (toolUseId: string, result: string, ok: boolean) => void;
210
- appendToolProgressLinesByUseId: (toolUseId: string, lines: string[]) => void;
211
- setLoading: (loading: boolean) => void;
212
- setAbortController: (ctrl: AbortController | null) => void;
213
- clearMessages: () => void;
214
- setCurrentAssistantMessage: (id: string | null) => void;
215
- setCurrentToolId: (id: string | null) => void;
216
- truncateAfter: (id: string) => void;
217
- addExecution: (exec: ToolExecution) => void;
218
- updateExecution: (id: string, updates: Partial<ToolExecution>) => void;
219
- enqueue: (text: string, mode?: QueuedItem['mode'], images?: QueuedItem['images'], alreadyDispatched?: boolean) => void;
220
- dequeue: () => QueuedItem | null;
221
- dequeueDrainable: () => QueuedItem | null;
222
- removeQueued: (idx: number) => void;
223
- clearQueue: () => void;
224
- setRefining: (v: boolean) => void;
225
- /** Park (or clear) this tab's unanswered approval prompt. */
226
- setPendingConfirm: (confirm: PendingConfirm | null) => void;
227
- setPendingFallback: (prompt: LaneFallbackPrompt | null) => void;
228
- setPendingRefinement: (text: string | null, images?: Array<{
229
- data: string;
230
- mime: string;
231
- }>, mode?: QueuedItem['mode']) => void;
232
- removeMessage: (id: string) => void;
233
- updateLastUserMessage: (text: string) => void;
234
- setRunStart: (s: {
235
- at: number;
236
- cost: number;
237
- } | null) => void;
238
- appendThinking: (text: string) => void;
239
- clearThinking: () => void;
240
- flushThinkingLog: (iteration: number) => void;
241
- clearThinkingLog: () => void;
242
- /** Bulk patch — used by the facade's `setState` and by replay hydration. */
243
- patch: (updates: Partial<ChatLaneData>) => void;
244
- }
245
75
  /**
246
76
  * The one way to write chat state. `sessionId` is mandatory: there is no
247
77
  * "current" lane an action can fall back to, which is what makes cross-tab
@@ -276,5 +106,4 @@ export declare function chatLane(sessionId: string): ChatLaneActions;
276
106
  export declare function overrideLaneActions(sessionId: string, patch: Partial<Record<keyof ChatLaneActions, unknown>>): void;
277
107
  /** Actions bound to the lane currently in front. Foreground UI only. */
278
108
  export declare function activeChatLane(): ChatLaneActions;
279
- export {};
280
109
  //# sourceMappingURL=chat-lanes.d.ts.map
@@ -6,4 +6,13 @@ export declare function setEnqueueSequence(seq: number): void;
6
6
  export declare function nextQueueItemId(): number;
7
7
  export declare function normalizeQueuedItem(value: unknown): QueuedItem | null;
8
8
  export declare const BTW_DISPATCH_GRACE_MS = 1800;
9
+ /**
10
+ * Hands a `queue`-mode prompt to the server's session queue. Returns false
11
+ * when the server cannot take it (older server, disconnected, no session yet),
12
+ * and the lane then keeps it locally the way it always has.
13
+ */
14
+ export type RemotePromptQueue = (sessionId: string, text: string, images: QueuedItem['images']) => boolean;
15
+ /** Installed by the WebSocket layer, which knows whether the server has a queue. */
16
+ export declare function setRemotePromptQueue(queue: RemotePromptQueue | null): void;
17
+ export declare function getRemotePromptQueue(): RemotePromptQueue | null;
9
18
  //# sourceMappingURL=chat-queue-helpers.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { WSQueuedPromptView } from '@/types/prompt-queue';
1
2
  import type { ChatMessage } from './types.js';
2
3
  export type QueueMode = 'btw' | 'steer' | 'queue';
3
4
  export interface QueuedItem {
@@ -39,6 +40,8 @@ export interface ChatState {
39
40
  executions: Map<string, ToolExecution>;
40
41
  toolMessageIdsByUseId: Map<string, string>;
41
42
  queue: QueuedItem[];
43
+ /** Prompts queued on the server for this session (it owns and drains them). */
44
+ serverQueue: readonly WSQueuedPromptView[];
42
45
  runStart: {
43
46
  at: number;
44
47
  cost: number;
@@ -20,7 +20,7 @@ import { useChatLanes } from './chat-lanes';
20
20
  import type { ChatState } from './chat-store-types';
21
21
  export declare const MAX_CHAT_MESSAGES = 1000;
22
22
  export declare const MAX_PERSISTED_MESSAGES = 200;
23
- export { activeChatLane, activeLaneId, adoptDefaultLane, type ChatLaneActions, type ChatLaneData, chatLane, DEFAULT_LANE_ID, disposeLane, ensureLane, hasLane, laneIds, MAX_LANES, readLane, setActiveLane, useChatLanes, } from './chat-lanes';
23
+ export { activeChatLane, activeLaneId, adoptDefaultLane, chatLane, DEFAULT_LANE_ID, disposeLane, ensureLane, hasLane, laneIds, MAX_LANES, readLane, setActiveLane, useChatLanes, type ChatLaneActions, type ChatLaneData, } from './chat-lanes';
24
24
  export { BTW_DISPATCH_GRACE_MS } from './chat-queue-helpers';
25
25
  export { boundChatField, dedupeRepeatedBlocks, indexToolExecutions, indexToolMessages, MAX_CHAT_FIELD_CHARS, MAX_CHAT_RETAINED_BYTES, retainWebChatMessages, } from './chat-retention';
26
26
  export * from './chat-store-types';
@@ -1,4 +1,4 @@
1
- import type { ContextEditorMessage, ContextEditorMetrics, ContextEditorRemoval, ContextEditorRepairPreview, ContextEditorValidationError, ContextEditorWarning, ContextEditorConflict, ContextEditorDiagnostics } from '@/types/runtime';
1
+ import type { ContextEditorConflict, ContextEditorDiagnostics, ContextEditorMessage, ContextEditorMetrics, ContextEditorRemoval, ContextEditorRepairPreview, ContextEditorValidationError, ContextEditorWarning } from '@/types/runtime';
2
2
  type ContextEditorPhase = 'closed' | 'loading_snapshot' | 'clean_snapshot' | 'dirty' | 'validating' | 'validated' | 'invalid' | 'conflicted' | 'applying' | 'applied_success' | 'apply_failed';
3
3
  interface ReadonlyContext {
4
4
  systemPromptTokens: number;
@@ -6,6 +6,8 @@ export interface CouncilPanelEntry {
6
6
  startedAt: number;
7
7
  resolvedAt?: number | undefined;
8
8
  seats: CouncilSeatVote[];
9
+ /** Final ballots supersede the live stream, including later failed rounds. */
10
+ hasFinalVotes?: boolean | undefined;
9
11
  /** Folded in from the matching `brain.decision_*` event, when it arrives. */
10
12
  question?: string | undefined;
11
13
  status?: string | undefined;
@@ -33,6 +35,8 @@ export declare const MAX_COUNCIL_PANELS = 50;
33
35
  interface CouncilLogState {
34
36
  /** Newest first. */
35
37
  panels: CouncilPanelEntry[];
38
+ /** Bounded, session-local questions received before the first ballot. */
39
+ questions: Map<string, string>;
36
40
  recordVote: (payload: Record<string, unknown>) => void;
37
41
  recordResolution: (payload: Record<string, unknown>) => void;
38
42
  noteQuestion: (requestId: string, question: string) => void;
@@ -0,0 +1,14 @@
1
+ import type { AgentTranscriptEntry, FleetTimelineEvent, SubagentView } from './types.js';
2
+ export declare const SPARKLINE_BINS = 12;
3
+ export declare const MAX_TIMELINE = 20;
4
+ export declare const MAX_AGENT_TRANSCRIPT = 1000;
5
+ export declare function blankAgent(id: string, name?: string, sessionId?: string): SubagentView;
6
+ export declare function pushTimeline(timeline: FleetTimelineEvent[], event: FleetTimelineEvent): FleetTimelineEvent[];
7
+ export declare function canMergeTranscriptEntry(a: AgentTranscriptEntry, b: AgentTranscriptEntry): boolean;
8
+ export declare function appendTranscriptEntry(entries: AgentTranscriptEntry[], entry: AgentTranscriptEntry): AgentTranscriptEntry[];
9
+ /** Update sparkline bins for an agent — bump bin 0 and shift left.
10
+ * The bins array has index 0 as the most recent bucket.
11
+ * Each event bumps bin 0, then the array is truncated to SPARKLINE_BINS. */
12
+ export declare function bumpSparkline(bins: number[]): number[];
13
+ export declare function clampContextPct(pct: number): number;
14
+ //# sourceMappingURL=fleet-transcript.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { GitImageDiff } from '@/types/server-message';
1
2
  /** One changed file row in the Changes (source-control) panel. */
2
3
  export interface GitChangedFile {
3
4
  path: string;
@@ -15,6 +16,8 @@ export interface GitDiffContent {
15
16
  binary?: boolean;
16
17
  tooLarge?: boolean;
17
18
  error?: string;
19
+ /** A changed image: both versions to show instead of a text diff. */
20
+ image?: GitImageDiff | undefined;
18
21
  }
19
22
  interface GitChangesSessionState {
20
23
  selectedPath: string | null;
@@ -13,6 +13,7 @@ interface GoalRunState {
13
13
  overallPercent: number;
14
14
  autonomous: boolean;
15
15
  title: string | null;
16
+ graphId: string | null;
16
17
  /** Full operator prompt that started the run (title is only a short heading). */
17
18
  goal: string | null;
18
19
  status: GoalRunStatus;
@@ -30,12 +31,18 @@ interface GoalRunState {
30
31
  completedTasks: number;
31
32
  failedTasks: number;
32
33
  } | null;
34
+ finalVerification: {
35
+ status: 'passed' | 'failed';
36
+ checkedAt: number;
37
+ error?: string | undefined;
38
+ } | null;
33
39
  setState: (s: {
34
40
  phases?: PhaseItem[] | undefined;
35
41
  activePhaseId?: string | null | undefined;
36
42
  overallPercent?: number | undefined;
37
43
  autonomous?: boolean | undefined;
38
44
  title?: string | null | undefined;
45
+ graphId?: string | null | undefined;
39
46
  goal?: string | null | undefined;
40
47
  status?: GoalRunStatus | undefined;
41
48
  multiBoard?: boolean | undefined;
@@ -43,6 +50,7 @@ interface GoalRunState {
43
50
  lastError?: string | null | undefined;
44
51
  graphs?: GoalRunBoardSummary[] | undefined;
45
52
  progress?: GoalRunState['progress'] | undefined;
53
+ finalVerification?: GoalRunState['finalVerification'] | undefined;
46
54
  }) => void;
47
55
  clear: () => void;
48
56
  /** Request state from server on mount. */
@@ -1,7 +1,10 @@
1
1
  import { type GoalJournalEntry, type GoalState } from '@/lib/goal';
2
2
  interface GoalStateStoreState {
3
3
  goal: GoalState | null;
4
+ missionId: string | null;
5
+ refiningMissionId: string | null;
4
6
  setGoal: (raw: Record<string, unknown> | null) => void;
7
+ setRefining: (missionId: string, active: boolean) => void;
5
8
  clear: () => void;
6
9
  appendJournalEntry: (entry: GoalJournalEntry) => void;
7
10
  /** Request the latest goal state from the server. Safe to call any time. */