@wrongstack/webui 0.319.1 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/dist/assets/AgentRosterView-BXURTwLP.js +12 -0
  2. package/dist/assets/AnalyticsDashboard-yAGcObTd.js +1 -0
  3. package/dist/assets/AudienceMemoryPanel-BwtB_jYJ.js +3 -0
  4. package/dist/assets/ChangesView-BgC27G9n.js +1 -0
  5. package/dist/assets/ChimeraReviewsView-BZ3kmsEA.js +1 -0
  6. package/dist/assets/ChronicleDashboard-DVor6J-y.js +1 -0
  7. package/dist/assets/CodeEditor-Dk2WJQks.js +2 -0
  8. package/dist/assets/CodeMap-CjWRQ37U.js +1 -0
  9. package/dist/assets/ConfirmModal-C_KAUjBK.js +1 -0
  10. package/dist/assets/CronJobsPanel-CGq8lhRJ.js +1 -0
  11. package/dist/assets/{DeadCodeScanPanel-DooqnEMF.js → DeadCodeScanPanel-CcPRcYm0.js} +1 -1
  12. package/dist/assets/DebugDashboard-B-aDaDrO.js +1 -0
  13. package/dist/assets/DesignGalleryView-Ex3zW5ci.js +1 -0
  14. package/dist/assets/GoalView-CBDc5nCD.js +1 -0
  15. package/dist/assets/KanbanView-azjPGLmM.js +3 -0
  16. package/dist/assets/MailboxDetailView-BXW9zqle.js +1 -0
  17. package/dist/assets/MemoryDrawer-CyN_6CRo.js +1 -0
  18. package/dist/assets/MemoryManager-BLu0rLEm.js +1 -0
  19. package/dist/assets/ModelPicker-CXQR8UbH.js +1 -0
  20. package/dist/assets/ProcessMonitor-CBIQkbLx.js +1 -0
  21. package/dist/assets/PromptJournalView-C6O40uTv.js +1 -0
  22. package/dist/assets/QueuePanel-CutrvgTH.js +1 -0
  23. package/dist/assets/RefreshDebugView-DDFD26EI.js +1 -0
  24. package/dist/assets/RequirementIntakeView-BpFyFOlB.js +1 -0
  25. package/dist/assets/SageTabs-Cx299O-q.js +2 -0
  26. package/dist/assets/SddFlowGraph-CJjawf9r.js +1 -0
  27. package/dist/assets/SddHub-CmSlkvkM.js +2 -0
  28. package/dist/assets/SessionInspectView-CtrlRlJu.js +1 -0
  29. package/dist/assets/SessionList-BWoK6Ro5.js +1 -0
  30. package/dist/assets/SessionsDashboard-7C6Fj9pK.js +1 -0
  31. package/dist/assets/SetupScreen-IzaqHJ_O.js +1 -0
  32. package/dist/assets/SkillDetailView-C5nOcysX.js +3 -0
  33. package/dist/assets/TechStackView-DkNjeYPK.js +2 -0
  34. package/dist/assets/TerminalPanel-CTr-KAnH.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-BbBGSliF.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-tRUjoMoU.js +2 -0
  49. package/dist/assets/index-BnpuNJ9u.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-B4xVrXos.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-B7GcARdp.js +7 -0
  73. package/dist/assets/ui-store-CLXDcLPI.js +1 -0
  74. package/dist/assets/useWebSocket-L5s7ggJm.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-BR51gfnV.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.d.ts +3 -3
  96. package/dist/components/FileActivityDrawer/ContextTab.d.ts +21 -0
  97. package/dist/components/FileActivityDrawer/LogsTab.d.ts +13 -0
  98. package/dist/components/FileActivityDrawer/OverviewTab.d.ts +14 -0
  99. package/dist/components/FileActivityDrawer/SkeletonTab.d.ts +5 -0
  100. package/dist/components/FileActivityDrawer/types.d.ts +58 -0
  101. package/dist/components/FileActivityDrawer.d.ts +1 -40
  102. package/dist/components/MainViewSlot.d.ts +16 -0
  103. package/dist/components/MemoryManager/DeleteMemoryDialog.d.ts +3 -2
  104. package/dist/components/SettingsPanel/brain-section-options.d.ts +6 -0
  105. package/dist/components/ViewRouter.d.ts +12 -4
  106. package/dist/components/view-registry.d.ts +73 -0
  107. package/dist/hooks/useServerMessage.d.ts +71 -0
  108. package/dist/hooks/ws-handlers/session-context-handlers.d.ts +20 -0
  109. package/dist/index.css +788 -788
  110. package/dist/index.html +25 -25
  111. package/dist/index.js +81203 -80204
  112. package/dist/lib/platform.d.ts +40 -0
  113. package/dist/lib/view-navigation.d.ts +27 -2
  114. package/dist/lib/ws-client-auth.d.ts +17 -0
  115. package/dist/lib/ws-client-connection.d.ts +26 -0
  116. package/dist/lib/ws-client-contracts.d.ts +10 -0
  117. package/dist/lib/ws-client-echo.d.ts +46 -0
  118. package/dist/lib/ws-client-queue.d.ts +18 -0
  119. package/dist/lib/ws-client-session-methods.d.ts +54 -0
  120. package/dist/lib/ws-client-swap.d.ts +53 -0
  121. package/dist/lib/ws-client.d.ts +40 -71
  122. package/dist/stores/context-editor-store.d.ts +1 -1
  123. package/dist/stores/council-log-store.d.ts +6 -0
  124. package/dist/stores/session-tab-store.d.ts +8 -0
  125. package/dist/stores/types.d.ts +10 -1
  126. package/dist/stores/ui-store-chrome.d.ts +12 -0
  127. package/dist/stores/ui-store-persist.d.ts +4 -0
  128. package/dist/stores/ui-store-types.d.ts +379 -0
  129. package/dist/stores/ui-store.d.ts +7 -467
  130. package/dist/stores/viz-graph-helpers.d.ts +18 -0
  131. package/dist/stores/viz-pipeline.d.ts +7 -0
  132. package/dist/stores/viz-store.d.ts +3 -123
  133. package/dist/stores/viz-types.d.ts +124 -0
  134. package/dist/types/brain.d.ts +3 -0
  135. package/dist/types/client-message.d.ts +8 -0
  136. package/dist/types/runtime.d.ts +7 -0
  137. package/dist/types/sage.d.ts +7 -0
  138. package/dist/types/server-message-chimera.d.ts +161 -0
  139. package/dist/types/server-message-files.d.ts +195 -0
  140. package/dist/types/server-message-fleet.d.ts +148 -0
  141. package/dist/types/server-message-mcp.d.ts +199 -0
  142. package/dist/types/server-message-system.d.ts +399 -0
  143. package/dist/types/server-message.d.ts +12 -1098
  144. package/dist/types/skills-design.d.ts +7 -0
  145. package/dist/types/system.d.ts +16 -0
  146. package/package.json +9 -9
  147. package/dist/assets/AgentRosterView-VIctzKMy.js +0 -9
  148. package/dist/assets/AnalyticsDashboard-Dr67MeEY.js +0 -1
  149. package/dist/assets/AudienceMemoryPanel-DoaZfrjf.js +0 -3
  150. package/dist/assets/ChangesView-s7Mn7iE2.js +0 -1
  151. package/dist/assets/ChimeraReviewsView-Cverzv0b.js +0 -1
  152. package/dist/assets/ChronicleDashboard-CzqPfaPc.js +0 -1
  153. package/dist/assets/CodeEditor-DXQoTSH5.js +0 -2
  154. package/dist/assets/CodeMap-D34FOPgR.js +0 -1
  155. package/dist/assets/ConfirmModal-B6BGiiN8.js +0 -1
  156. package/dist/assets/CronJobsPanel-CenxuaN9.js +0 -1
  157. package/dist/assets/DebugDashboard-DWaUg6e1.js +0 -1
  158. package/dist/assets/DesignGalleryView-BKtjn4px.js +0 -1
  159. package/dist/assets/GoalView-BZ62_vF-.js +0 -1
  160. package/dist/assets/KanbanView-DsWnTpxr.js +0 -3
  161. package/dist/assets/MailboxDetailView-DS1P9DRT.js +0 -1
  162. package/dist/assets/MemoryDrawer-BJEY1v4P.js +0 -1
  163. package/dist/assets/MemoryManager-D-kuyTQe.js +0 -1
  164. package/dist/assets/ModelPicker-CLs0qQgg.js +0 -1
  165. package/dist/assets/OfficeMapPanel-BqoCcniD.js +0 -4
  166. package/dist/assets/ProcessMonitor-CHNNqCk9.js +0 -1
  167. package/dist/assets/PromptJournalView-Biu4DknM.js +0 -1
  168. package/dist/assets/QueuePanel-CzTXq6j4.js +0 -1
  169. package/dist/assets/RefreshDebugView-d9iU3sFX.js +0 -1
  170. package/dist/assets/RequirementIntakeView-BVyF2zXR.js +0 -1
  171. package/dist/assets/SageTabs-YASyEFo6.js +0 -2
  172. package/dist/assets/SddFlowGraph-Bj_Aqq5B.js +0 -1
  173. package/dist/assets/SddHub-rmGGEYZe.js +0 -2
  174. package/dist/assets/SessionInspectView-iaKkGAAM.js +0 -1
  175. package/dist/assets/SessionList-vmAS2Fg5.js +0 -1
  176. package/dist/assets/SessionsDashboard-x3iyhrGl.js +0 -1
  177. package/dist/assets/SetupScreen-huPJT0Bv.js +0 -1
  178. package/dist/assets/SkillDetailView-BcD9z7zG.js +0 -3
  179. package/dist/assets/SpecsView-ok8HZ8ws.js +0 -1
  180. package/dist/assets/TechStackView-DmMtwb4l.js +0 -2
  181. package/dist/assets/TerminalPanel-cbM6oQWQ.js +0 -1
  182. package/dist/assets/activity-CtTKsSX6.js +0 -10
  183. package/dist/assets/button-DNyYztcH.js +0 -1
  184. package/dist/assets/chat-store-oW_-zcJP.js +0 -1
  185. package/dist/assets/codemap-index-store-tSmlp7Uz.js +0 -1
  186. package/dist/assets/dialog-BTHxOi5z.js +0 -1
  187. package/dist/assets/empty-state-DBQN80mK.js +0 -1
  188. package/dist/assets/i18n-D06uU1PM.js +0 -2
  189. package/dist/assets/index-BQ7PJ-sA.js +0 -144
  190. package/dist/assets/input-CTGeYzNe.js +0 -1
  191. package/dist/assets/settings-Ci_RMpCQ.js +0 -1
  192. package/dist/assets/setup-B0D9CK3-.js +0 -1
  193. package/dist/assets/setup-B58YVaGU.js +0 -1
  194. package/dist/assets/setup-C2H9Uv0Q.js +0 -1
  195. package/dist/assets/setup-CzM4dkkU.js +0 -1
  196. package/dist/assets/setup-Di56FlHP.js +0 -1
  197. package/dist/assets/setup-Dwt58Mpz.js +0 -1
  198. package/dist/assets/setup-DznVdlJy.js +0 -1
  199. package/dist/assets/shared-CLfD85oZ.js +0 -1
  200. package/dist/assets/stores-C7Vvce-6.js +0 -7
  201. package/dist/assets/ui-store-Dm7ujR9u.js +0 -1
  202. package/dist/assets/useWebSocket-9lfOsI_r.js +0 -27
  203. package/dist/assets/vector-memory-panel-B4bQhdHe.js +0 -1
  204. package/dist/assets/vendor-enc0q-Va.js +0 -139
  205. package/dist/assets/view-navigation-wOKaM_Rf.js +0 -1
  206. package/dist/assets/ws-client-DtTZLD8e.js +0 -22
  207. /package/dist/assets/{OfficeMapPanel-Ce7myLNH.css → AgentRosterView-Ce7myLNH.css} +0 -0
@@ -0,0 +1,199 @@
1
+ export type WSMcpServerMessage = {
2
+ type: 'config.doctor.result';
3
+ payload: {
4
+ success: boolean;
5
+ applied: boolean;
6
+ changed: boolean;
7
+ changes: Array<{
8
+ path: string;
9
+ action: 'added' | 'replaced';
10
+ }>;
11
+ configPath: string;
12
+ backupPath?: string;
13
+ error?: string;
14
+ };
15
+ } | {
16
+ type: 'mcp.list';
17
+ payload: {
18
+ servers: Array<{
19
+ name: string;
20
+ transport: string;
21
+ status: string;
22
+ enabled: boolean;
23
+ description?: string;
24
+ tools?: string[];
25
+ error?: string;
26
+ pid?: number;
27
+ lazy?: boolean;
28
+ command?: string;
29
+ args?: string[];
30
+ env?: Record<string, string>;
31
+ url?: string;
32
+ health?: {
33
+ healthState: 'disabled' | 'dormant' | 'connecting' | 'healthy' | 'degraded' | 'failed';
34
+ consecutiveFailures: number;
35
+ failures: {
36
+ transport: number;
37
+ protocol: number;
38
+ tool: number;
39
+ };
40
+ reconnectCount: number;
41
+ wakeCount: number;
42
+ sleepCount: number;
43
+ restartCount: number;
44
+ inFlightCalls: number;
45
+ peakInFlightCalls: number;
46
+ callLatency: {
47
+ count: number;
48
+ lastMs?: number;
49
+ p50Ms?: number;
50
+ p95Ms?: number;
51
+ };
52
+ };
53
+ }>;
54
+ };
55
+ } | {
56
+ type: 'mcp.server.added';
57
+ payload: {
58
+ server: {
59
+ name: string;
60
+ transport: string;
61
+ status: string;
62
+ enabled: boolean;
63
+ description?: string;
64
+ tools?: string[];
65
+ lazy?: boolean;
66
+ command?: string;
67
+ args?: string[];
68
+ env?: Record<string, string>;
69
+ url?: string;
70
+ };
71
+ };
72
+ } | {
73
+ type: 'mcp.server.removed';
74
+ payload: {
75
+ name: string;
76
+ };
77
+ } | {
78
+ type: 'mcp.server.updated';
79
+ payload: {
80
+ server: {
81
+ name: string;
82
+ transport: string;
83
+ status: string;
84
+ enabled: boolean;
85
+ description?: string;
86
+ tools?: string[];
87
+ lazy?: boolean;
88
+ command?: string;
89
+ args?: string[];
90
+ env?: Record<string, string>;
91
+ url?: string;
92
+ };
93
+ };
94
+ } | {
95
+ type: 'mcp.server.discovered';
96
+ payload: {
97
+ name: string;
98
+ tools: string[];
99
+ };
100
+ } | {
101
+ type: 'mcp.server.sleeping';
102
+ payload: {
103
+ name: string;
104
+ };
105
+ } | {
106
+ type: 'mcp.server.waking';
107
+ payload: {
108
+ name: string;
109
+ };
110
+ } | {
111
+ type: 'mcp.server.connected';
112
+ payload: {
113
+ name: string;
114
+ pid?: number;
115
+ toolCount?: number;
116
+ };
117
+ } | {
118
+ type: 'mcp.server.reconnected';
119
+ payload: {
120
+ name: string;
121
+ toolCount: number;
122
+ };
123
+ } | {
124
+ type: 'mcp.server.disconnected';
125
+ payload: {
126
+ name: string;
127
+ reason: string;
128
+ };
129
+ } | {
130
+ type: 'mcp.server.error';
131
+ payload: {
132
+ name: string;
133
+ error: string;
134
+ };
135
+ } | {
136
+ type: 'mcp.operation_result';
137
+ payload: {
138
+ success: boolean;
139
+ message: string;
140
+ };
141
+ } | {
142
+ type: 'mcp.resources';
143
+ payload: {
144
+ name: string;
145
+ resources: Array<{
146
+ uri: string;
147
+ name: string;
148
+ description?: string;
149
+ mimeType?: string;
150
+ size?: number;
151
+ }>;
152
+ resourceTemplates: Array<{
153
+ uriTemplate: string;
154
+ name: string;
155
+ description?: string;
156
+ mimeType?: string;
157
+ }>;
158
+ };
159
+ } | {
160
+ type: 'mcp.prompts';
161
+ payload: {
162
+ name: string;
163
+ prompts: Array<{
164
+ name: string;
165
+ description?: string;
166
+ arguments?: Array<{
167
+ name: string;
168
+ description?: string;
169
+ required?: boolean;
170
+ }>;
171
+ }>;
172
+ };
173
+ } | {
174
+ type: 'mcp.content.selected';
175
+ payload: {
176
+ kind: 'resource' | 'prompt';
177
+ untrusted: true;
178
+ byteSize: number;
179
+ provenance: {
180
+ origin: 'mcp';
181
+ serverName: string;
182
+ capability: 'resource' | 'prompt';
183
+ resourceUri?: string;
184
+ promptName?: string;
185
+ promptArgumentNames?: string[];
186
+ };
187
+ contents?: unknown[];
188
+ messages?: unknown[];
189
+ description?: string;
190
+ };
191
+ } | {
192
+ type: 'mcp.content.error';
193
+ payload: {
194
+ action: string;
195
+ name: string;
196
+ error: string;
197
+ };
198
+ };
199
+ //# sourceMappingURL=server-message-mcp.d.ts.map
@@ -0,0 +1,399 @@
1
+ import type { BrainConfigWire } from './brain.js';
2
+ import type { SessionScopedPayload } from './protocol-core.js';
3
+ export type WSSystemMiscServerMessage = {
4
+ type: 'tasks.updated';
5
+ payload: {
6
+ tasks: unknown[];
7
+ error?: string | undefined;
8
+ };
9
+ } | {
10
+ type: 'plan.updated';
11
+ payload: {
12
+ plan: unknown | null;
13
+ error?: string | undefined;
14
+ };
15
+ } | {
16
+ type: 'specs.list';
17
+ payload: {
18
+ specs: unknown[];
19
+ };
20
+ } | {
21
+ type: 'specs.detail';
22
+ payload: Record<string, unknown>;
23
+ } | {
24
+ type: 'sdd.board.snapshot';
25
+ payload: Record<string, unknown> | null;
26
+ } | {
27
+ type: 'sdd.board.list';
28
+ payload: {
29
+ boards: unknown[];
30
+ };
31
+ } | {
32
+ type: 'sdd.board.lifecycle_result';
33
+ payload: {
34
+ op: 'cleanup_worktrees' | 'rollback' | 'destroy';
35
+ ok: boolean;
36
+ removed?: number;
37
+ reverted?: number;
38
+ deleted?: string[];
39
+ reason?: string;
40
+ };
41
+ } | {
42
+ type: 'sdd.spec.snapshot';
43
+ payload: Record<string, unknown>;
44
+ } | {
45
+ type: 'sdd.spec.agent_text';
46
+ payload: {
47
+ text: string;
48
+ };
49
+ } | {
50
+ type: 'sdd.spec.error';
51
+ payload: {
52
+ message: string;
53
+ };
54
+ } | {
55
+ type: 'sdd.run.started';
56
+ payload: {
57
+ runId: string;
58
+ graphId?: string;
59
+ specId?: string;
60
+ };
61
+ } | {
62
+ type: 'session.checkpoints';
63
+ payload: {
64
+ checkpoints: Array<{
65
+ index: number;
66
+ iteration: number;
67
+ timestamp: string;
68
+ label: string;
69
+ messageCount: number;
70
+ tokens: number;
71
+ }>;
72
+ };
73
+ } | {
74
+ type: 'goal-state.updated';
75
+ payload: Record<string, unknown> | null;
76
+ } | {
77
+ type: 'prefs.updated';
78
+ payload: Record<string, unknown>;
79
+ } | {
80
+ type: 'system_prompt.info';
81
+ payload: WSSystemPromptInfo;
82
+ } | {
83
+ type: 'techstack.job.started';
84
+ payload: {
85
+ jobId: string;
86
+ kind: 'inventory' | 'analyze';
87
+ };
88
+ } | {
89
+ type: 'techstack.job.progress';
90
+ payload: {
91
+ jobId: string;
92
+ phase: string;
93
+ completed: number;
94
+ total: number;
95
+ };
96
+ } | {
97
+ type: 'techstack.workspace.completed';
98
+ payload: {
99
+ jobId: string;
100
+ workspaceId: string;
101
+ ecosystem: string;
102
+ dependencyCount: number;
103
+ };
104
+ } | {
105
+ type: 'techstack.snapshot.updated';
106
+ payload: {
107
+ snapshot: import('@/stores/techstack-store').TechStackSnapshot;
108
+ stale?: boolean | undefined;
109
+ };
110
+ } | {
111
+ type: 'techstack.report.ready';
112
+ payload: {
113
+ reportId: string;
114
+ summary?: string | undefined;
115
+ };
116
+ } | {
117
+ type: 'techstack.report.delivered';
118
+ payload: {
119
+ deliveryId: string;
120
+ sessionId: string;
121
+ };
122
+ } | {
123
+ type: 'techstack.job.failed';
124
+ payload: {
125
+ jobId: string;
126
+ error: string;
127
+ };
128
+ } | {
129
+ type: 'techstack.job.cancelled';
130
+ payload: {
131
+ jobId: string;
132
+ };
133
+ } | {
134
+ type: 'client.status_update';
135
+ payload: Record<string, unknown>;
136
+ } | {
137
+ type: 'sessions.status_update';
138
+ payload: {
139
+ sessions: unknown[];
140
+ };
141
+ } | {
142
+ type: 'mailbox.event';
143
+ payload: Record<string, unknown> & {
144
+ event: string;
145
+ };
146
+ } | {
147
+ type: 'mailbox.received';
148
+ payload: Record<string, unknown>;
149
+ } | {
150
+ type: 'mailbox.agent_registered';
151
+ payload: Record<string, unknown>;
152
+ } | {
153
+ type: 'mailbox.agent_deregistered';
154
+ payload: Record<string, unknown>;
155
+ } | {
156
+ type: 'mailbox.messages';
157
+ payload: {
158
+ messages: Array<Record<string, unknown>>;
159
+ error?: string | undefined;
160
+ };
161
+ } | {
162
+ type: 'mailbox.agents';
163
+ payload: {
164
+ agents: Array<Record<string, unknown>>;
165
+ error?: string | undefined;
166
+ };
167
+ } | {
168
+ type: 'mailbox.sent';
169
+ payload: {
170
+ requestId: string;
171
+ success: boolean;
172
+ messageId?: string | undefined;
173
+ to?: string | undefined;
174
+ audience?: 'all' | 'leaders' | undefined;
175
+ error?: string | undefined;
176
+ };
177
+ } | {
178
+ type: 'mailbox.action_result';
179
+ payload: {
180
+ requestId: string;
181
+ success: boolean;
182
+ action?: 'mark-read' | 'acknowledge' | 'reopen' | 'soft-delete' | undefined;
183
+ mailId?: string | undefined;
184
+ error?: string | undefined;
185
+ };
186
+ } | {
187
+ type: 'pong';
188
+ payload?: Record<string, unknown> | undefined;
189
+ } | {
190
+ type: 'process.list';
191
+ payload: {
192
+ sessionId?: string | undefined;
193
+ processes: Array<{
194
+ pid: number;
195
+ command: string;
196
+ tool: string;
197
+ startedAt: number;
198
+ status: 'running' | 'exited' | 'killed';
199
+ protected?: boolean | undefined;
200
+ background?: boolean | undefined;
201
+ sessionId?: string | undefined;
202
+ }>;
203
+ };
204
+ } | {
205
+ type: 'brain.status';
206
+ payload: {
207
+ maxAutoRisk: string;
208
+ log: Array<{
209
+ at: number;
210
+ kind: string;
211
+ question: string;
212
+ outcome: string;
213
+ }>;
214
+ mode?: 'headless' | 'interactive' | undefined;
215
+ poolLabels?: string[] | undefined;
216
+ councilLabels?: string[] | undefined;
217
+ judgeLabel?: string | undefined;
218
+ judgeIsVoter?: boolean | undefined;
219
+ ledgerPath?: string | undefined;
220
+ };
221
+ } | {
222
+ type: 'brain.config';
223
+ payload: {
224
+ config: BrainConfigWire;
225
+ persisted: boolean;
226
+ error?: string | undefined;
227
+ };
228
+ } | {
229
+ type: 'brain.answer';
230
+ payload: SessionScopedPayload & {
231
+ question: string;
232
+ decision: {
233
+ type: string;
234
+ optionId?: string | undefined;
235
+ text?: string | undefined;
236
+ rationale?: string | undefined;
237
+ reason?: string | undefined;
238
+ prompt?: string | undefined;
239
+ };
240
+ };
241
+ } | {
242
+ type: 'brain.event';
243
+ payload: SessionScopedPayload & Record<string, unknown> & {
244
+ event: string;
245
+ };
246
+ } | {
247
+ type: 'memory.event';
248
+ payload: SessionScopedPayload & Record<string, unknown> & {
249
+ event: string;
250
+ };
251
+ } | {
252
+ type: 'session.damaged';
253
+ payload: {
254
+ sessionId: string;
255
+ detail: string;
256
+ };
257
+ } | {
258
+ type: 'session.rewound';
259
+ payload: SessionScopedPayload & {
260
+ toPromptIndex: number;
261
+ revertedFiles: string[];
262
+ removedEvents: number;
263
+ };
264
+ } | {
265
+ type: 'checkpoint.written';
266
+ payload: SessionScopedPayload & {
267
+ promptIndex: number;
268
+ promptPreview: string;
269
+ ts: string;
270
+ fileCount: number;
271
+ };
272
+ } | {
273
+ type: 'in_flight.started';
274
+ payload: SessionScopedPayload & {
275
+ context: string;
276
+ ts: string;
277
+ };
278
+ } | {
279
+ type: 'in_flight.ended';
280
+ payload: SessionScopedPayload & {
281
+ reason: 'clean' | 'aborted' | 'recovered';
282
+ ts: string;
283
+ };
284
+ } | {
285
+ type: 'model.refine_result';
286
+ payload: {
287
+ refined: string;
288
+ english: string;
289
+ error?: string | undefined;
290
+ errorKind?: 'timeout' | 'empty' | 'provider_error' | undefined;
291
+ retryTimeoutMs?: number | undefined;
292
+ fallbackRef?: string | undefined;
293
+ refinedWith?: {
294
+ provider: string;
295
+ model: string;
296
+ } | undefined;
297
+ };
298
+ } | {
299
+ type: 'mailbox.cleared';
300
+ payload: {
301
+ error?: string | undefined;
302
+ };
303
+ } | {
304
+ type: 'mailbox.purged';
305
+ payload: Record<string, unknown> & {
306
+ error?: string | undefined;
307
+ };
308
+ } | {
309
+ type: 'cron.snapshot';
310
+ payload: {
311
+ count: number;
312
+ maxConcurrent: number;
313
+ jobs: Array<{
314
+ name: string;
315
+ intervalMs: number;
316
+ action: string;
317
+ enabled: boolean;
318
+ lastRun: string | null;
319
+ nextRun: string;
320
+ runCount: number;
321
+ overdue: boolean;
322
+ }>;
323
+ };
324
+ } | {
325
+ type: 'cron.job_fired';
326
+ payload: {
327
+ name: string;
328
+ action: string;
329
+ runCount: number;
330
+ ts: string;
331
+ };
332
+ } | {
333
+ type: 'terminal.output';
334
+ payload: {
335
+ id: string;
336
+ data: string;
337
+ };
338
+ } | {
339
+ type: 'terminal.exit';
340
+ payload: {
341
+ id: string;
342
+ exitCode: number;
343
+ signal?: number | undefined;
344
+ };
345
+ } | {
346
+ type: 'prompts.journal';
347
+ payload: WSPromptsJournalPayload;
348
+ };
349
+ /** One entry from the hierarchical prompt journal (mirrors core `PromptJournalEntry`). */
350
+ export interface WSPromptJournalEntry {
351
+ id: string;
352
+ timestamp: string;
353
+ sessionId: string;
354
+ projectRoot: string;
355
+ role: 'user' | 'system' | 'assistant' | 'tool';
356
+ category: string;
357
+ content: string;
358
+ rawContent?: string | undefined;
359
+ metadata: {
360
+ model?: string | undefined;
361
+ provider?: string | undefined;
362
+ iterationIndex?: number | undefined;
363
+ tokenEstimate: number;
364
+ characterCount: number;
365
+ lineCount: number;
366
+ activeTools?: string[] | undefined;
367
+ contextFiles?: string[] | undefined;
368
+ durationMs?: number | undefined;
369
+ decisionReason?: string | undefined;
370
+ tags?: string[] | undefined;
371
+ };
372
+ }
373
+ export interface WSPromptsJournalPayload {
374
+ enabled: boolean;
375
+ entries: WSPromptJournalEntry[];
376
+ error?: string | undefined;
377
+ }
378
+ /** One selectable identity-prompt size, with its upper-bound token estimate. */
379
+ export interface WSSystemPromptVariantInfo {
380
+ variant: 'lite' | 'default' | 'pro';
381
+ label: string;
382
+ hint: string;
383
+ tokens: number;
384
+ }
385
+ /**
386
+ * Payload of `system_prompt.info`.
387
+ *
388
+ * `chosen` is false until the user has explicitly picked a variant at least
389
+ * once — the config loader materializes a default variant for every config, so
390
+ * this flag is the only way the browser can tell a fresh install from a
391
+ * deliberate "Standard" and decide whether to open the picker unprompted.
392
+ */
393
+ export interface WSSystemPromptInfo {
394
+ current: 'lite' | 'default' | 'pro';
395
+ chosen: boolean;
396
+ variants: WSSystemPromptVariantInfo[];
397
+ error?: string | undefined;
398
+ }
399
+ //# sourceMappingURL=server-message-system.d.ts.map