@wrongstack/webui 0.287.0 → 0.289.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 (276) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/assets/AnalyticsDashboard-qGVC0XiK.js +1 -0
  3. package/dist/assets/AudienceMemoryPanel-CxAGL0gP.js +3 -0
  4. package/dist/assets/ChangesView-Bc6demyA.js +1 -0
  5. package/dist/assets/ChronicleDashboard-CwWcOmB3.js +1 -0
  6. package/dist/assets/CodeEditor-JY7CfGGl.js +1 -0
  7. package/dist/assets/CodeMap-BDgG3Rjz.js +1 -0
  8. package/dist/assets/CronJobsPanel-CqA5Tmx-.js +1 -0
  9. package/dist/assets/DebugDashboard-DlSJuEnl.js +1 -0
  10. package/dist/assets/DesignGalleryView-Cw9pbmsU.js +1 -0
  11. package/dist/assets/GoalView-B9BA9Jlk.js +1 -0
  12. package/dist/assets/KanbanView-CvKWtMXO.js +1 -0
  13. package/dist/assets/MailboxDetailView-dtLgBAb5.js +1 -0
  14. package/dist/assets/MemoryManager-BX9vS8Sc.js +1 -0
  15. package/dist/assets/OfficeMapPanel-D87MJFyb.css +1 -0
  16. package/dist/assets/OfficeMapPanel-DBafq6N3.js +4 -0
  17. package/dist/assets/ProcessMonitor-B0wlr4xu.js +1 -0
  18. package/dist/assets/QueuePanel-Cbd6WEUu.js +1 -0
  19. package/dist/assets/RefreshDebugView-BU6_CzHg.js +1 -0
  20. package/dist/assets/SddBoardView-ChpDmoWH.js +2 -0
  21. package/dist/assets/SddFlowGraph-ZGRYKvG4.js +1 -0
  22. package/dist/assets/SddWizard-C9EU3uMP.js +1 -0
  23. package/dist/assets/SessionsDashboard-BZjGcI8m.js +1 -0
  24. package/dist/assets/SetupScreen-OLD-xwmi.js +1 -0
  25. package/dist/assets/SkillDetailView-cBe0gnN1.js +3 -0
  26. package/dist/assets/SpecsView-BXqQnduk.js +1 -0
  27. package/dist/assets/TechStackView-whP83IaE.js +1 -0
  28. package/dist/assets/TerminalPanel-DYJvz1GK.js +1 -0
  29. package/dist/assets/activity-B6TyDCwd.js +5 -0
  30. package/dist/assets/activity-BZm_Psbt.js +5 -0
  31. package/dist/assets/activity-Bhoxw076.js +5 -0
  32. package/dist/assets/activity-CWFY3Fhi.js +5 -0
  33. package/dist/assets/activity-DVZ7t5as.js +5 -0
  34. package/dist/assets/activity-DiuZra5w.js +5 -0
  35. package/dist/assets/activity-DkwwCy23.js +5 -0
  36. package/dist/assets/chat-store-BJ55HZKb.js +13 -0
  37. package/dist/assets/{commandPalette-C5U6qfth.js → commandPalette-CGMq-qlP.js} +1 -1
  38. package/dist/assets/{commandPalette-C4o2rUOp.js → commandPalette-CUh_kgfp.js} +1 -1
  39. package/dist/assets/{commandPalette-CBJfByB7.js → commandPalette-Dfk74u87.js} +1 -1
  40. package/dist/assets/{commandPalette-DUootORZ.js → commandPalette-DpaemFux.js} +1 -1
  41. package/dist/assets/{commandPalette-BcMV6x3_.js → commandPalette-Nlxs0V7J.js} +1 -1
  42. package/dist/assets/{commandPalette-CrYfIhnW.js → commandPalette-aaAou3Tl.js} +1 -1
  43. package/dist/assets/{commandPalette-Dgd8HfNm.js → commandPalette-tFxIIhvU.js} +1 -1
  44. package/dist/assets/i18n-BcnwAuXt.js +2 -0
  45. package/dist/assets/index-MIiPbE0D.js +151 -0
  46. package/dist/assets/index-dpcVzvHS.css +1 -0
  47. package/dist/assets/markdown-CF2fGOZh.js +44 -0
  48. package/dist/assets/{monaco-MjnRih9i.js → monaco-BgFAljXl.js} +201 -201
  49. package/dist/assets/{monaco-theme-DhdHiZEb.js → monaco-theme-DxkhltWi.js} +1 -1
  50. package/dist/assets/{session-store-zbDVE9MI.js → session-store-CgCoJmdF.js} +1 -1
  51. package/dist/assets/settings-4BR882HN.js +1 -0
  52. package/dist/assets/settings-B5P4V9M6.js +1 -0
  53. package/dist/assets/settings-Cjxo5UVP.js +1 -0
  54. package/dist/assets/settings-CnViO4_M.js +1 -0
  55. package/dist/assets/settings-CyzkAhwD.js +1 -0
  56. package/dist/assets/settings-jrfJX8W2.js +1 -0
  57. package/dist/assets/settings-llUXRsji.js +1 -0
  58. package/dist/assets/shared-aqSRO8IM.js +1 -0
  59. package/dist/assets/ui-store-lBwi9h6q.js +1 -0
  60. package/dist/assets/utils-BLVofF8S.js +1 -0
  61. package/dist/assets/{vendor-BShi5_Dg.css → vendor-BBksTEZc.css} +1 -1
  62. package/dist/assets/vendor-JNPeA-SL.js +76 -0
  63. package/dist/assets/ws-client-3f38Kop2.js +1 -0
  64. package/dist/components/AgentOfficeView.d.ts +3 -0
  65. package/dist/components/AgentOfficeView.d.ts.map +1 -0
  66. package/dist/components/AnalyticsDashboard.d.ts.map +1 -1
  67. package/dist/components/AudienceMemoryPanel.d.ts +2 -0
  68. package/dist/components/AudienceMemoryPanel.d.ts.map +1 -0
  69. package/dist/components/BoardView.d.ts +2 -2
  70. package/dist/components/ChatInput/slash-routing.d.ts +4 -4
  71. package/dist/components/ChatInput/slash-routing.d.ts.map +1 -1
  72. package/dist/components/ChatInput.d.ts.map +1 -1
  73. package/dist/components/CheckpointTimeline.d.ts.map +1 -1
  74. package/dist/components/ChronicleDashboard.d.ts +2 -0
  75. package/dist/components/ChronicleDashboard.d.ts.map +1 -0
  76. package/dist/components/CodeMap.d.ts +9 -0
  77. package/dist/components/CodeMap.d.ts.map +1 -0
  78. package/dist/components/CommandPalette/index.d.ts.map +1 -1
  79. package/dist/components/ContextDashboard.d.ts.map +1 -1
  80. package/dist/components/DebugDashboard.d.ts.map +1 -1
  81. package/dist/components/DesignGalleryView.d.ts.map +1 -1
  82. package/dist/components/FleetPanel.d.ts.map +1 -1
  83. package/dist/components/{AutoPhaseView.d.ts → GoalView.d.ts} +4 -4
  84. package/dist/components/GoalView.d.ts.map +1 -0
  85. package/dist/components/InspectorPanel.d.ts.map +1 -1
  86. package/dist/components/KanbanCleanerAlert.d.ts +6 -0
  87. package/dist/components/KanbanCleanerAlert.d.ts.map +1 -0
  88. package/dist/components/KanbanView.d.ts +14 -0
  89. package/dist/components/KanbanView.d.ts.map +1 -1
  90. package/dist/components/MailboxDetailView.d.ts.map +1 -1
  91. package/dist/components/MailboxPanel.d.ts.map +1 -1
  92. package/dist/components/MemoryManager/MemoryDetail.d.ts +17 -0
  93. package/dist/components/MemoryManager/MemoryDetail.d.ts.map +1 -0
  94. package/dist/components/MemoryManager/MemoryDrawer.d.ts +25 -0
  95. package/dist/components/MemoryManager/MemoryDrawer.d.ts.map +1 -0
  96. package/dist/components/MemoryManager/MemoryEditor.d.ts +12 -0
  97. package/dist/components/MemoryManager/MemoryEditor.d.ts.map +1 -0
  98. package/dist/components/MemoryManager/MemoryFilters.d.ts +19 -0
  99. package/dist/components/MemoryManager/MemoryFilters.d.ts.map +1 -0
  100. package/dist/components/MemoryManager/MemoryGraph.d.ts +4 -35
  101. package/dist/components/MemoryManager/MemoryGraph.d.ts.map +1 -1
  102. package/dist/components/MemoryManager/MemoryList.d.ts +13 -0
  103. package/dist/components/MemoryManager/MemoryList.d.ts.map +1 -0
  104. package/dist/components/MemoryManager/index.d.ts +0 -13
  105. package/dist/components/MemoryManager/index.d.ts.map +1 -1
  106. package/dist/components/MemoryManager/shared.d.ts +51 -0
  107. package/dist/components/MemoryManager/shared.d.ts.map +1 -0
  108. package/dist/components/MessageBubble/index.d.ts.map +1 -1
  109. package/dist/components/OfficeMapCanvas/edges.d.ts +15 -0
  110. package/dist/components/OfficeMapCanvas/edges.d.ts.map +1 -0
  111. package/dist/components/OfficeMapCanvas/nodes.d.ts +53 -0
  112. package/dist/components/OfficeMapCanvas/nodes.d.ts.map +1 -0
  113. package/dist/components/OfficeMapCanvas/resolve.d.ts +17 -2
  114. package/dist/components/OfficeMapCanvas/resolve.d.ts.map +1 -1
  115. package/dist/components/OfficeMapCanvas/utils.d.ts +28 -1
  116. package/dist/components/OfficeMapCanvas/utils.d.ts.map +1 -1
  117. package/dist/components/OfficeMapCanvas.d.ts.map +1 -1
  118. package/dist/components/OfficeMapPanel.d.ts.map +1 -1
  119. package/dist/components/PhasePanel.d.ts.map +1 -1
  120. package/dist/components/RefinePanel.d.ts +5 -1
  121. package/dist/components/RefinePanel.d.ts.map +1 -1
  122. package/dist/components/SddWizard.d.ts.map +1 -1
  123. package/dist/components/SessionsDashboard.d.ts.map +1 -1
  124. package/dist/components/SettingsPanel/ChimeraSettingsPanel.d.ts +10 -0
  125. package/dist/components/SettingsPanel/ChimeraSettingsPanel.d.ts.map +1 -0
  126. package/dist/components/SettingsPanel/index.d.ts.map +1 -1
  127. package/dist/components/SetupScreen.d.ts.map +1 -1
  128. package/dist/components/SidePanel/AgentsPanel.d.ts.map +1 -1
  129. package/dist/components/SidePanel/SessionPanel.d.ts.map +1 -1
  130. package/dist/components/SidePanel/index.d.ts.map +1 -1
  131. package/dist/components/SkillDetailView.d.ts.map +1 -1
  132. package/dist/components/TaskActivityTimeline.d.ts +31 -0
  133. package/dist/components/TaskActivityTimeline.d.ts.map +1 -0
  134. package/dist/components/TaskExecutionAttempts.d.ts +28 -0
  135. package/dist/components/TaskExecutionAttempts.d.ts.map +1 -0
  136. package/dist/components/TaskIntelligencePanel.d.ts +42 -0
  137. package/dist/components/TaskIntelligencePanel.d.ts.map +1 -0
  138. package/dist/components/TaskRiskPanel.d.ts +31 -0
  139. package/dist/components/TaskRiskPanel.d.ts.map +1 -0
  140. package/dist/components/TechStackView/DependencyDetail.d.ts +20 -0
  141. package/dist/components/TechStackView/DependencyDetail.d.ts.map +1 -0
  142. package/dist/components/TechStackView/DependencyTable.d.ts +17 -0
  143. package/dist/components/TechStackView/DependencyTable.d.ts.map +1 -0
  144. package/dist/components/TechStackView/FindingsPanel.d.ts +15 -0
  145. package/dist/components/TechStackView/FindingsPanel.d.ts.map +1 -0
  146. package/dist/components/TechStackView/TechStackToolbar.d.ts +26 -0
  147. package/dist/components/TechStackView/TechStackToolbar.d.ts.map +1 -0
  148. package/dist/components/TechStackView/index.d.ts +18 -0
  149. package/dist/components/TechStackView/index.d.ts.map +1 -0
  150. package/dist/components/TechStackView/shared.d.ts +73 -0
  151. package/dist/components/TechStackView/shared.d.ts.map +1 -0
  152. package/dist/components/TodosPanel.d.ts.map +1 -1
  153. package/dist/components/activity-bar/index.d.ts.map +1 -1
  154. package/dist/components/codemap-model.d.ts +64 -0
  155. package/dist/components/codemap-model.d.ts.map +1 -0
  156. package/dist/components/index.d.ts +1 -1
  157. package/dist/components/index.d.ts.map +1 -1
  158. package/dist/hooks/index.d.ts +1 -0
  159. package/dist/hooks/index.d.ts.map +1 -1
  160. package/dist/hooks/useGlobalKeyboardShortcuts.d.ts.map +1 -1
  161. package/dist/hooks/useHorizontalScroll.d.ts +17 -0
  162. package/dist/hooks/useHorizontalScroll.d.ts.map +1 -0
  163. package/dist/hooks/useMemoryForFile.d.ts +30 -0
  164. package/dist/hooks/useMemoryForFile.d.ts.map +1 -0
  165. package/dist/hooks/useScrollPosition.d.ts +16 -0
  166. package/dist/hooks/useScrollPosition.d.ts.map +1 -0
  167. package/dist/hooks/useWebSocket.d.ts +30 -22
  168. package/dist/hooks/useWebSocket.d.ts.map +1 -1
  169. package/dist/hooks/ws-handlers/fleet-handlers.d.ts.map +1 -1
  170. package/dist/hooks/ws-handlers/misc-handlers.d.ts +4 -4
  171. package/dist/hooks/ws-handlers/misc-handlers.d.ts.map +1 -1
  172. package/dist/hooks/ws-handlers/session-handlers.d.ts.map +1 -1
  173. package/dist/hooks/ws-handlers/techstack-handlers.d.ts +13 -0
  174. package/dist/hooks/ws-handlers/techstack-handlers.d.ts.map +1 -0
  175. package/dist/hooks/ws-handlers.d.ts +3 -0
  176. package/dist/hooks/ws-handlers.d.ts.map +1 -1
  177. package/dist/index.css +2881 -2
  178. package/dist/index.css.map +3 -3
  179. package/dist/index.html +15 -17
  180. package/dist/index.js +40038 -27150
  181. package/dist/index.js.map +4 -4
  182. package/dist/lib/agent-office.d.ts +96 -0
  183. package/dist/lib/agent-office.d.ts.map +1 -0
  184. package/dist/lib/desktop-host.d.ts.map +1 -1
  185. package/dist/lib/kanban-cleaner.d.ts +28 -0
  186. package/dist/lib/kanban-cleaner.d.ts.map +1 -0
  187. package/dist/lib/kanban-metadata.d.ts +7 -0
  188. package/dist/lib/kanban-metadata.d.ts.map +1 -0
  189. package/dist/lib/plugin-enablement.d.ts +37 -0
  190. package/dist/lib/plugin-enablement.d.ts.map +1 -0
  191. package/dist/lib/view-navigation.d.ts +1 -1
  192. package/dist/lib/view-navigation.d.ts.map +1 -1
  193. package/dist/lib/ws-client.d.ts +61 -17
  194. package/dist/lib/ws-client.d.ts.map +1 -1
  195. package/dist/providers.json +30 -0
  196. package/dist/stores/chat-store.d.ts.map +1 -1
  197. package/dist/stores/codemap-activity-store.d.ts +79 -0
  198. package/dist/stores/codemap-activity-store.d.ts.map +1 -0
  199. package/dist/stores/fleet-store.d.ts.map +1 -1
  200. package/dist/stores/{autophase-store.d.ts → goal-run-store.d.ts} +12 -12
  201. package/dist/stores/goal-run-store.d.ts.map +1 -0
  202. package/dist/stores/goal-state-store.d.ts +12 -0
  203. package/dist/stores/goal-state-store.d.ts.map +1 -0
  204. package/dist/stores/index.d.ts +5 -2
  205. package/dist/stores/index.d.ts.map +1 -1
  206. package/dist/stores/kanban-store.d.ts.map +1 -1
  207. package/dist/stores/local-prefs.d.ts +26 -0
  208. package/dist/stores/local-prefs.d.ts.map +1 -1
  209. package/dist/stores/mailbox-store.d.ts +16 -0
  210. package/dist/stores/mailbox-store.d.ts.map +1 -1
  211. package/dist/stores/monitor-store.d.ts +61 -0
  212. package/dist/stores/monitor-store.d.ts.map +1 -1
  213. package/dist/stores/office-map-store.d.ts +4 -0
  214. package/dist/stores/office-map-store.d.ts.map +1 -1
  215. package/dist/stores/session-store.d.ts.map +1 -1
  216. package/dist/stores/techstack-store.d.ts +110 -0
  217. package/dist/stores/techstack-store.d.ts.map +1 -0
  218. package/dist/stores/types.d.ts +19 -0
  219. package/dist/stores/types.d.ts.map +1 -1
  220. package/dist/stores/ui-store.d.ts +19 -7
  221. package/dist/stores/ui-store.d.ts.map +1 -1
  222. package/dist/stores/viz-store.d.ts +6 -0
  223. package/dist/stores/viz-store.d.ts.map +1 -1
  224. package/dist/types.d.ts +567 -121
  225. package/dist/types.d.ts.map +1 -1
  226. package/package.json +7 -6
  227. package/dist/assets/AnalyticsDashboard-Lwr7vcaY.js +0 -1
  228. package/dist/assets/AutoPhaseView-Dm2ALbiB.js +0 -1
  229. package/dist/assets/ChangesView-CVcdAOd0.js +0 -1
  230. package/dist/assets/CodeEditor-DJCl9lsb.js +0 -1
  231. package/dist/assets/CronJobsPanel-B21inkB5.js +0 -1
  232. package/dist/assets/DebugDashboard-BppNFFs9.js +0 -1
  233. package/dist/assets/DesignGalleryView-BKfKAS1f.js +0 -1
  234. package/dist/assets/KanbanView-Bc2UIVD2.js +0 -1
  235. package/dist/assets/MailboxDetailView-b8e-UFpl.js +0 -1
  236. package/dist/assets/OfficeMapPanel-DmW-omSm.js +0 -4
  237. package/dist/assets/ProcessMonitor-4Il_i86w.js +0 -1
  238. package/dist/assets/QueuePanel-Ikqk4oth.js +0 -1
  239. package/dist/assets/RefreshDebugView-BQ7J1C4N.js +0 -1
  240. package/dist/assets/SddBoardView-B2ECODCt.js +0 -2
  241. package/dist/assets/SddFlowGraph-DmZbA2K1.js +0 -1
  242. package/dist/assets/SddWizard-CPYgixwo.js +0 -1
  243. package/dist/assets/SessionsDashboard-DZ2kQo_0.js +0 -1
  244. package/dist/assets/SetupScreen-CnfDy-Zu.js +0 -1
  245. package/dist/assets/SkillDetailView-Df1mNWLj.js +0 -3
  246. package/dist/assets/SpecsView-C0zbOk7n.js +0 -1
  247. package/dist/assets/TerminalPanel-B-fOpicS.js +0 -1
  248. package/dist/assets/activity-BlfRLrUt.js +0 -5
  249. package/dist/assets/activity-C6fV-S38.js +0 -5
  250. package/dist/assets/activity-Csy0Hk3h.js +0 -5
  251. package/dist/assets/activity-DEmOOQMt.js +0 -5
  252. package/dist/assets/activity-DFMWzed9.js +0 -5
  253. package/dist/assets/activity-Dn9wzdq-.js +0 -5
  254. package/dist/assets/activity-GAfT06yP.js +0 -5
  255. package/dist/assets/chat-store-CQq9AeA9.js +0 -5
  256. package/dist/assets/i18n-CLLrYq46.js +0 -2
  257. package/dist/assets/index-BwLKTDt1.js +0 -159
  258. package/dist/assets/index-Dk3-IFDU.css +0 -1
  259. package/dist/assets/markdown-BRAejDWd.js +0 -44
  260. package/dist/assets/settings-Bc58aJZk.js +0 -1
  261. package/dist/assets/settings-Bp9YKTVi.js +0 -1
  262. package/dist/assets/settings-C5VZmgTv.js +0 -1
  263. package/dist/assets/settings-CPPzs9tv.js +0 -1
  264. package/dist/assets/settings-D97B_3tS.js +0 -1
  265. package/dist/assets/settings-DLpAN_Sw.js +0 -1
  266. package/dist/assets/settings-KWv7WsjE.js +0 -1
  267. package/dist/assets/ui-store-Dm48nEb1.js +0 -1
  268. package/dist/assets/utils-C9L1kxOy.js +0 -1
  269. package/dist/assets/vendor-B51hXwIj.js +0 -70
  270. package/dist/assets/ws-client-Bbu1u6TM.js +0 -1
  271. package/dist/assets/xyflow-BDdNcuaV.js +0 -7
  272. package/dist/assets/xyflow-DtxX27Jz.css +0 -1
  273. package/dist/components/AutoPhaseView.d.ts.map +0 -1
  274. package/dist/lib/analytics.d.ts +0 -38
  275. package/dist/lib/analytics.d.ts.map +0 -1
  276. package/dist/stores/autophase-store.d.ts.map +0 -1
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Usage } from '@wrongstack/core';
2
- import type { KanbanBoard, KanbanBoardSummary, KanbanTask } from '@wrongstack/kanban';
2
+ import type { KanbanBoard, KanbanBoardPresence, KanbanBoardSummary, KanbanEvent, KanbanTask } from '@wrongstack/kanban';
3
3
  export interface WSMessage {
4
4
  type: string;
5
5
  payload: unknown;
@@ -27,6 +27,8 @@ export interface WSSessionStart {
27
27
  replayUsage?: Usage | undefined;
28
28
  /** True when no provider+model is configured yet — show the setup screen. */
29
29
  needsSetup?: boolean | undefined;
30
+ /** Feature negotiation prevents a newer WebUI from sending messages to an older backend. */
31
+ protocolCapabilities?: string[] | undefined;
30
32
  };
31
33
  }
32
34
  export interface WSSessionEnd {
@@ -75,12 +77,22 @@ export interface WSThinkingDelta {
75
77
  text: string;
76
78
  };
77
79
  }
80
+ export interface WSCodeMapFileTarget {
81
+ filePath: string;
82
+ operation: 'read' | 'write' | 'edit' | 'delete' | 'search';
83
+ line?: number | undefined;
84
+ endLine?: number | undefined;
85
+ }
78
86
  export interface WSToolUseStart {
79
87
  type: 'tool.started';
80
88
  payload: SessionScopedPayload & {
81
89
  id: string;
82
90
  name: string;
91
+ traceId?: string | undefined;
92
+ agentId?: string | undefined;
93
+ agentName?: string | undefined;
83
94
  input?: unknown | undefined;
95
+ fileTargets?: WSCodeMapFileTarget[] | undefined;
84
96
  messageId: string;
85
97
  };
86
98
  }
@@ -89,10 +101,17 @@ export interface WSToolProgress {
89
101
  payload: SessionScopedPayload & {
90
102
  name: string;
91
103
  id: string;
104
+ traceId?: string | undefined;
105
+ agentId?: string | undefined;
106
+ agentName?: string | undefined;
92
107
  event: {
93
108
  type: 'log' | 'warning' | 'metric' | 'file_changed' | 'partial_output';
94
109
  text?: string | undefined;
95
110
  data?: Record<string, unknown>;
111
+ path?: string | undefined;
112
+ operation?: 'write' | 'edit' | 'delete' | 'rename' | undefined;
113
+ line?: number | undefined;
114
+ endLine?: number | undefined;
96
115
  };
97
116
  };
98
117
  }
@@ -101,10 +120,50 @@ export interface WSToolExecuted {
101
120
  payload: SessionScopedPayload & {
102
121
  id: string;
103
122
  name: string;
123
+ traceId?: string | undefined;
124
+ agentId?: string | undefined;
125
+ agentName?: string | undefined;
104
126
  durationMs: number;
105
127
  ok: boolean;
106
128
  input?: unknown | undefined;
129
+ fileTargets?: WSCodeMapFileTarget[] | undefined;
107
130
  output?: string | undefined;
131
+ outputBytes?: number | undefined;
132
+ outputTokens?: number | undefined;
133
+ outputLines?: number | undefined;
134
+ };
135
+ }
136
+ /** Subagent tool lifecycle dedicated to CodeMap; intentionally does not create chat bubbles. */
137
+ export interface WSCodeMapToolStarted {
138
+ type: 'codemap.tool_started';
139
+ payload: SessionScopedPayload & {
140
+ parentSessionId?: string | undefined;
141
+ traceId?: string | undefined;
142
+ agentId: string;
143
+ agentName: string;
144
+ id: string;
145
+ name: string;
146
+ input?: unknown | undefined;
147
+ fileTargets?: WSCodeMapFileTarget[] | undefined;
148
+ output?: string | undefined;
149
+ outputBytes?: number | undefined;
150
+ outputTokens?: number | undefined;
151
+ outputLines?: number | undefined;
152
+ };
153
+ }
154
+ export interface WSCodeMapToolExecuted {
155
+ type: 'codemap.tool_executed';
156
+ payload: SessionScopedPayload & {
157
+ parentSessionId?: string | undefined;
158
+ traceId?: string | undefined;
159
+ agentId: string;
160
+ agentName: string;
161
+ id?: string | undefined;
162
+ name: string;
163
+ durationMs: number;
164
+ ok: boolean;
165
+ input?: unknown | undefined;
166
+ fileTargets?: WSCodeMapFileTarget[] | undefined;
108
167
  };
109
168
  }
110
169
  export interface WSIterationStarted {
@@ -191,6 +250,121 @@ export interface WSRunResult {
191
250
  };
192
251
  };
193
252
  }
253
+ export interface ChronicleEventView {
254
+ schemaVersion: number;
255
+ eventId: string;
256
+ eventType: string;
257
+ occurredAt?: string | undefined;
258
+ observedAt: string;
259
+ persistedAt: string;
260
+ sequence: number;
261
+ hash: string;
262
+ previousHash: string;
263
+ outcome?: string | undefined;
264
+ durationNs?: string | undefined;
265
+ scope: Record<string, string | undefined>;
266
+ correlation: Record<string, string | undefined>;
267
+ runtime?: {
268
+ providerId?: string;
269
+ modelId?: string;
270
+ processId?: number;
271
+ parentProcessId?: number;
272
+ } | undefined;
273
+ resource?: {
274
+ kind: string;
275
+ id: string;
276
+ path?: string;
277
+ lineStart?: number;
278
+ lineEnd?: number;
279
+ } | undefined;
280
+ attributes?: Record<string, unknown> | undefined;
281
+ tags?: Record<string, string> | undefined;
282
+ }
283
+ export interface ChronicleQuery {
284
+ eventId?: string;
285
+ eventTypes?: string[];
286
+ outcomes?: string[];
287
+ from?: string;
288
+ to?: string;
289
+ projectId?: string;
290
+ sessionId?: string;
291
+ agentId?: string;
292
+ taskId?: string;
293
+ providerId?: string;
294
+ modelId?: string;
295
+ traceId?: string;
296
+ logicalRequestId?: string;
297
+ attemptId?: string;
298
+ toolCallId?: string;
299
+ resourceKind?: string;
300
+ resourceId?: string;
301
+ path?: string;
302
+ line?: number;
303
+ text?: string;
304
+ order?: 'asc' | 'desc';
305
+ limit?: number;
306
+ cursor?: string;
307
+ tags?: Record<string, string>;
308
+ attributes?: Record<string, unknown>;
309
+ }
310
+ export type ChronicleFacet = 'eventType' | 'outcome' | 'projectId' | 'sessionId' | 'agentId' | 'taskId' | 'providerId' | 'modelId' | 'resourceKind' | 'resourcePath' | 'toolCallId';
311
+ export interface ChronicleFacetValue {
312
+ value: string;
313
+ count: number;
314
+ }
315
+ export interface ChronicleQueryResult {
316
+ events: ChronicleEventView[];
317
+ total: number;
318
+ nextCursor?: string;
319
+ scannedEvents: number;
320
+ sourceFiles: number;
321
+ invalidLines: number;
322
+ summary: ChronicleSummary;
323
+ }
324
+ export interface ChronicleSummary {
325
+ logicalRequests: number;
326
+ modelAttempts: number;
327
+ completedAttempts: number;
328
+ failedAttempts: number;
329
+ scheduledRetries: number;
330
+ fallbacks: number;
331
+ providers: number;
332
+ models: number;
333
+ inputTokens: number;
334
+ outputTokens: number;
335
+ cacheReadTokens: number;
336
+ cacheWriteTokens: number;
337
+ estimatedCostUsd: number;
338
+ providerAvgDurationMs: number;
339
+ providerP95DurationMs: number;
340
+ toolCalls: number;
341
+ completedTools: number;
342
+ failedTools: number;
343
+ toolAvgDurationMs: number;
344
+ processes: number;
345
+ failedProcesses: number;
346
+ fileEvents: number;
347
+ uniqueFiles: number;
348
+ agentEvents: number;
349
+ uniqueAgents: number;
350
+ decisions: number;
351
+ escalations: number;
352
+ failures: number;
353
+ cancellations: number;
354
+ families: Record<ChronicleSignalFamily, number>;
355
+ failuresByFamily: Record<ChronicleSignalFamily, number>;
356
+ }
357
+ export type ChronicleSignalFamily = 'llm' | 'agent' | 'tool' | 'file' | 'memory' | 'task' | 'decision' | 'runtime';
358
+ export interface ChronicleGraphResult {
359
+ nodes: ChronicleEventView[];
360
+ edges: Array<{
361
+ from: string;
362
+ to: string;
363
+ kind: string;
364
+ confidence: 'explicit' | 'correlated' | 'inferred';
365
+ }>;
366
+ truncated: boolean;
367
+ }
194
368
  export interface WSSessionStats {
195
369
  type: 'session.stats';
196
370
  payload: {
@@ -418,105 +592,76 @@ export interface WSMemoryList {
418
592
  error?: string | undefined;
419
593
  };
420
594
  }
595
+ export type SuperMemoryScope = 'project' | 'user' | 'session' | 'file' | 'symbol';
596
+ export type SuperMemoryStatus = 'active' | 'stale' | 'superseded' | 'contradicted' | 'archived' | 'deleted';
597
+ export interface SuperMemoryAnchor {
598
+ type: 'file' | 'directory' | 'symbol' | 'package' | 'command' | 'test' | 'git';
599
+ path?: string | undefined;
600
+ symbol?: string | undefined;
601
+ command?: string | undefined;
602
+ lineStart?: number | undefined;
603
+ lineEnd?: number | undefined;
604
+ }
605
+ export interface SuperMemoryEntry {
606
+ id: string;
607
+ revision: number;
608
+ scope: SuperMemoryScope;
609
+ kind: string;
610
+ status: SuperMemoryStatus;
611
+ contextPolicy?: 'eligible' | 'never' | undefined;
612
+ text: string;
613
+ summary?: string | undefined;
614
+ importance: number;
615
+ confidence: number;
616
+ freshness: number;
617
+ tags: string[];
618
+ anchors: SuperMemoryAnchor[];
619
+ audience?: {
620
+ roles?: string[];
621
+ taskTypes?: string[];
622
+ modes?: string[];
623
+ } | undefined;
624
+ supersedes?: string[] | undefined;
625
+ supersededBy?: string | undefined;
626
+ contradicts?: string[] | undefined;
627
+ createdAt: string;
628
+ updatedAt: string;
629
+ lastAccessedAt?: string | undefined;
630
+ lastVerifiedAt?: string | undefined;
631
+ expiresAt?: string | undefined;
632
+ }
633
+ export interface SuperMemoryStats {
634
+ total: number;
635
+ byStatus: Record<string, number>;
636
+ byKind: Record<string, number>;
637
+ edges: number;
638
+ }
421
639
  export interface WSMemorySuperList {
422
640
  type: 'memory.super.list';
423
641
  payload: {
424
- memories?: Array<{
425
- id: string;
426
- kind: string;
427
- status: string;
428
- text: string;
429
- tags: string[];
430
- createdAt: string;
431
- updatedAt: string;
432
- importance: number;
433
- confidence: number;
434
- revision: number;
435
- anchors: Array<{
436
- type: string;
437
- path?: string;
438
- symbol?: string;
439
- command?: string;
440
- }>;
441
- }>;
442
- stats?: {
443
- total: number;
444
- byStatus: Record<string, number>;
445
- byKind: Record<string, number>;
446
- edges: number;
447
- };
642
+ memories?: SuperMemoryEntry[] | undefined;
643
+ stats?: SuperMemoryStats | undefined;
448
644
  error?: string | undefined;
449
645
  };
450
646
  }
451
647
  export interface WSMemorySuperGet {
452
648
  type: 'memory.super.get';
453
649
  payload: {
454
- memory?: {
455
- id: string;
456
- kind: string;
457
- status: string;
458
- text: string;
459
- tags: string[];
460
- createdAt: string;
461
- updatedAt: string;
462
- importance: number;
463
- confidence: number;
464
- revision: number;
465
- anchors: Array<{
466
- type: string;
467
- path?: string;
468
- symbol?: string;
469
- command?: string;
470
- }>;
471
- };
650
+ memory?: SuperMemoryEntry | undefined;
472
651
  error?: string | undefined;
473
652
  };
474
653
  }
475
654
  export interface WSMemorySuperUpdate {
476
655
  type: 'memory.super.update';
477
656
  payload: {
478
- memory?: {
479
- id: string;
480
- kind: string;
481
- status: string;
482
- text: string;
483
- tags: string[];
484
- createdAt: string;
485
- updatedAt: string;
486
- importance: number;
487
- confidence: number;
488
- revision: number;
489
- anchors: Array<{
490
- type: string;
491
- path?: string;
492
- symbol?: string;
493
- command?: string;
494
- }>;
495
- };
657
+ memory?: SuperMemoryEntry | undefined;
496
658
  error?: string | undefined;
497
659
  };
498
660
  }
499
661
  export interface WSMemorySuperRemember {
500
662
  type: 'memory.super.remember';
501
663
  payload: {
502
- memory?: {
503
- id: string;
504
- kind: string;
505
- status: string;
506
- text: string;
507
- tags: string[];
508
- createdAt: string;
509
- updatedAt: string;
510
- importance: number;
511
- confidence: number;
512
- revision: number;
513
- anchors: Array<{
514
- type: string;
515
- path?: string;
516
- symbol?: string;
517
- command?: string;
518
- }>;
519
- };
664
+ memory?: SuperMemoryEntry | undefined;
520
665
  error?: string | undefined;
521
666
  };
522
667
  }
@@ -527,6 +672,132 @@ export interface WSMemorySuperDelete {
527
672
  message: string;
528
673
  };
529
674
  }
675
+ /**
676
+ * Why a memory matched the file/drawer query. Mirrors
677
+ * `MemoryMatchVia` from `@wrongstack/super-memory` (see PR #4 backend).
678
+ * Kept as a local re-declaration so the webui types module doesn't have to
679
+ * import from super-memory directly.
680
+ */
681
+ export type MemoryMatchVia = 'scope_file' | 'scope_symbol' | 'anchor_file' | 'anchor_symbol' | 'anchor_directory' | 'mention';
682
+ export interface MemoryPendingReview {
683
+ candidateId: string;
684
+ reason: string;
685
+ suggestedAction: 'delete' | 'archive' | 'update' | 'investigate';
686
+ ageDays: number;
687
+ }
688
+ /** Web-side mirror of `MemoryForFileMatch` — superset kept local for layering. */
689
+ export interface MemoryForFileMatch {
690
+ memory: SuperMemoryEntry;
691
+ matchedVia: MemoryMatchVia;
692
+ /** 0..1; higher = stronger match signal. */
693
+ matchStrength: number;
694
+ /** Populated for `status='superseded'` records when a head-of-chain exists. */
695
+ supersededByActiveId?: string | undefined;
696
+ /** Populated when hygiene has emitted a pending review candidate. */
697
+ pendingReview?: MemoryPendingReview | undefined;
698
+ }
699
+ export interface MemoryForFileResponse {
700
+ filePath: string;
701
+ primaryMatches: MemoryForFileMatch[];
702
+ symbolMatches: MemoryForFileMatch[];
703
+ relatedMatches: MemoryForFileMatch[];
704
+ totalCount: number;
705
+ activeCount: number;
706
+ supersededCount: number;
707
+ reviewPendingCount: number;
708
+ }
709
+ /**
710
+ * Request payload for `memory.super.forFile`. Cursor fields are optional —
711
+ * when both are provided, symbol-anchored memories overlapping the cursor
712
+ * range surface first (cursor-aware boost).
713
+ */
714
+ export interface WSMemorySuperForFileRequest {
715
+ /** Project-relative file path. */
716
+ filePath: string;
717
+ /** Optional caret line (1-indexed). */
718
+ lineStart?: number;
719
+ /** Optional last caret line. Pair with `lineStart`. */
720
+ lineEnd?: number;
721
+ /** Per-bucket cap. Default 50. */
722
+ limit?: number;
723
+ /** Default true. Include superseded memories (with supersededByActiveId). */
724
+ showSuperseded?: boolean;
725
+ /** Default false. Show recoverable deleted memories for one-click recovery. */
726
+ showDeleted?: boolean;
727
+ }
728
+ export interface WSMemorySuperForFile {
729
+ type: 'memory.super.forFile';
730
+ payload: {
731
+ response?: MemoryForFileResponse | undefined;
732
+ error?: string | undefined;
733
+ };
734
+ }
735
+ export interface WSMemorySuperRecover {
736
+ type: 'memory.super.recover';
737
+ payload: {
738
+ /** The restored memory (active status). */
739
+ memory?: SuperMemoryEntry | undefined;
740
+ /** True when the requested id was already active/superseded (no-op write). */
741
+ noop?: boolean | undefined;
742
+ /** Head-of-chain id when the requested id was superseded. */
743
+ activeId?: string | undefined;
744
+ error?: string | undefined;
745
+ };
746
+ }
747
+ export interface WSMemorySuperCandidateResolve {
748
+ type: 'memory.super.candidateResolve';
749
+ payload: {
750
+ /** The resolved candidate (with updated status). */
751
+ candidate?: MemoryCandidateEntry | undefined;
752
+ /** The user-facing action that was applied: accept | reject. */
753
+ resolvedAction?: 'accept' | 'reject' | undefined;
754
+ error?: string | undefined;
755
+ };
756
+ }
757
+ /** Local mirror of super-memory's `MemoryCandidate`. */
758
+ export interface MemoryCandidateEntry {
759
+ schemaVersion: 1;
760
+ id: string;
761
+ status: 'pending' | 'accepted' | 'rejected' | 'merged';
762
+ text: string;
763
+ kind: string;
764
+ confidence: number;
765
+ importance: number;
766
+ tags: string[];
767
+ anchors: SuperMemoryAnchor[];
768
+ sources: Array<{
769
+ type: 'user' | 'session' | 'tool_result' | 'project_instruction' | 'file' | 'test' | 'command' | 'legacy_memory';
770
+ sessionId?: string;
771
+ toolUseId?: string;
772
+ path?: string;
773
+ command?: string;
774
+ excerptHash?: string;
775
+ }>;
776
+ createdAt: string;
777
+ updatedAt: string;
778
+ }
779
+ export interface WSMemorySuperBackfillRecoverable {
780
+ type: 'memory.super.backfillRecoverable';
781
+ payload: {
782
+ /** Records that were backfilled into a fresh active version (dryRun=false). */
783
+ recoveredRecords?: Array<{
784
+ originalId: string;
785
+ newActiveId: string;
786
+ kind: string;
787
+ scope: string;
788
+ textPreview: string;
789
+ deletedAt: string;
790
+ persistence: string;
791
+ }> | undefined;
792
+ /** Total count of records recovered in this run. */
793
+ recovered?: number | undefined;
794
+ /** Total count examined. */
795
+ examined?: number | undefined;
796
+ /** True when the request was a dry-run (no writes). */
797
+ dryRun?: boolean | undefined;
798
+ error?: string | undefined;
799
+ };
800
+ }
530
801
  export interface WSSkillsList {
531
802
  type: 'skills.list';
532
803
  payload: {
@@ -959,21 +1230,21 @@ export interface WSModesList {
959
1230
  activeId: string;
960
1231
  };
961
1232
  }
962
- /** AutoPhase live state broadcast (see server/autophase-ws-handler.ts). */
963
- export interface WSAutoPhaseState {
964
- type: 'autophase.state';
1233
+ /** Goal live state broadcast (see server/goal-ws-handler.ts). */
1234
+ export interface WSGoalState {
1235
+ type: 'goal.state';
965
1236
  payload: Record<string, unknown>;
966
1237
  }
967
- export interface WSAutoPhaseProgress {
968
- type: 'autophase.progress';
1238
+ export interface WSGoalProgress {
1239
+ type: 'goal.progress';
969
1240
  payload: Record<string, unknown>;
970
1241
  }
971
- export interface WSAutoPhaseLifecycle {
972
- type: 'autophase.paused' | 'autophase.resumed' | 'autophase.stopped' | 'autophase.saved' | 'autophase.completed' | 'autophase.failed' | 'autophase.error' | 'autophase.cleared' | 'autophase.reverted';
1242
+ export interface WSGoalLifecycle {
1243
+ type: 'goal.paused' | 'goal.resumed' | 'goal.stopped' | 'goal.saved' | 'goal.completed' | 'goal.failed' | 'goal.error' | 'goal.cleared' | 'goal.reverted';
973
1244
  payload: Record<string, unknown>;
974
1245
  }
975
- export interface WSAutoPhaseList {
976
- type: 'autophase.list';
1246
+ export interface WSGoalList {
1247
+ type: 'goal.list';
977
1248
  payload: {
978
1249
  graphs: unknown[];
979
1250
  };
@@ -994,6 +1265,7 @@ export interface WSAgentTimelineMessage {
994
1265
  iteration: number;
995
1266
  ts: string;
996
1267
  toolName?: string | undefined;
1268
+ toolOk?: boolean | undefined;
997
1269
  costUsd?: number | undefined;
998
1270
  };
999
1271
  }
@@ -1012,7 +1284,20 @@ export interface WSKanbanResult {
1012
1284
  type: `kanban.${string}`;
1013
1285
  payload: {
1014
1286
  success: boolean;
1015
- data?: KanbanBoard | KanbanBoardSummary[] | KanbanTask | KanbanTask[] | Record<string, unknown> | null;
1287
+ data?: KanbanBoard | KanbanBoardSummary[] | KanbanTask | KanbanTask[] | KanbanEvent[] | Record<string, unknown> | null;
1288
+ error?: string | undefined;
1289
+ };
1290
+ }
1291
+ export interface WSKanbanTaskActivity {
1292
+ type: 'kanban.task.activity';
1293
+ payload: {
1294
+ success: boolean;
1295
+ data?: {
1296
+ boardId: string;
1297
+ taskId: string;
1298
+ events: KanbanEvent[];
1299
+ presence?: KanbanBoardPresence[] | undefined;
1300
+ } | undefined;
1016
1301
  error?: string | undefined;
1017
1302
  };
1018
1303
  }
@@ -1173,79 +1458,82 @@ export interface BrainConfigPatchWire {
1173
1458
  autoDenyAfterFailures?: number | null | undefined;
1174
1459
  } | null | undefined;
1175
1460
  }
1176
- export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1177
- type: 'autophase.start';
1461
+ export type WSClientMessageCore = WSUserMessage | WSToolConfirmResult | {
1462
+ type: 'side_effects.list';
1463
+ payload?: Record<string, never>;
1464
+ } | {
1465
+ type: 'goal.start';
1178
1466
  payload: {
1179
1467
  title: string;
1180
1468
  phases?: unknown[] | undefined;
1181
1469
  autonomous?: boolean | undefined;
1182
1470
  /** Per-run override of git-worktree isolation. Omitted → env default
1183
- * (WRONGSTACK_AUTOPHASE_WORKTREES). false → run on the current branch. */
1471
+ * (WRONGSTACK_GOAL_WORKTREES). false → run on the current branch. */
1184
1472
  worktrees?: boolean | undefined;
1185
1473
  };
1186
1474
  } | {
1187
- type: 'autophase.pause';
1475
+ type: 'goal.pause';
1188
1476
  payload: Record<string, never>;
1189
1477
  } | {
1190
- type: 'autophase.resume';
1478
+ type: 'goal.resume';
1191
1479
  payload: Record<string, never>;
1192
1480
  } | {
1193
- type: 'autophase.stop';
1481
+ type: 'goal.stop';
1194
1482
  payload: Record<string, never>;
1195
1483
  } | {
1196
- type: 'autophase.clear';
1484
+ type: 'goal.clear';
1197
1485
  payload?: Record<string, never>;
1198
1486
  } | {
1199
- type: 'autophase.revert';
1487
+ type: 'goal.revert';
1200
1488
  payload?: Record<string, never>;
1201
1489
  } | {
1202
- type: 'autophase.status';
1490
+ type: 'goal.status';
1203
1491
  payload?: Record<string, never>;
1204
1492
  } | {
1205
- type: 'autophase.state';
1493
+ type: 'goal.state';
1206
1494
  payload?: Record<string, never>;
1207
1495
  } | {
1208
- type: 'autophase.save';
1496
+ type: 'goal.save';
1209
1497
  payload?: Record<string, never>;
1210
1498
  } | {
1211
- type: 'autophase.list';
1499
+ type: 'goal.list';
1212
1500
  payload?: Record<string, never>;
1213
1501
  } | {
1214
- type: 'autophase.load';
1502
+ type: 'goal.load';
1215
1503
  payload: {
1216
1504
  graphId: string;
1217
1505
  };
1218
1506
  } | {
1219
- type: 'autophase.toggleAutonomous';
1507
+ type: 'goal.toggleAutonomous';
1220
1508
  payload: {
1221
1509
  autonomous?: boolean | undefined;
1222
1510
  };
1223
1511
  } | {
1224
- type: 'autophase.selectPhase';
1512
+ type: 'goal.selectPhase';
1225
1513
  payload: {
1226
1514
  phaseId: string;
1227
1515
  };
1228
1516
  } | {
1229
- type: 'autophase.taskStatus';
1517
+ type: 'goal.taskStatus';
1230
1518
  payload: {
1231
1519
  taskId: string;
1232
1520
  status: string;
1233
1521
  };
1234
1522
  } | {
1235
- type: 'autophase.moveTask';
1523
+ type: 'goal.moveTask';
1236
1524
  payload: {
1237
1525
  taskId: string;
1238
1526
  toPhaseId: string;
1239
1527
  };
1240
1528
  } | {
1241
- type: 'autophase.assignTask';
1529
+ type: 'goal.assignTask';
1242
1530
  payload: {
1243
1531
  taskId: string;
1244
1532
  agentId?: string | undefined;
1245
1533
  agentName?: string | undefined;
1246
1534
  };
1247
1535
  } | {
1248
- type: 'autophase.addTask';
1536
+ type: 'goal.addTask';
1249
1537
  payload: {
1250
1538
  phaseId: string;
1251
1539
  title: string;
@@ -1254,12 +1542,12 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1254
1542
  priority?: string | undefined;
1255
1543
  };
1256
1544
  } | {
1257
- type: 'autophase.retryTask';
1545
+ type: 'goal.retryTask';
1258
1546
  payload: {
1259
1547
  taskId: string;
1260
1548
  };
1261
1549
  } | {
1262
- type: 'autophase.runTask';
1550
+ type: 'goal.runTask';
1263
1551
  payload: {
1264
1552
  taskId: string;
1265
1553
  };
@@ -1609,30 +1897,69 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1609
1897
  text?: string | undefined;
1610
1898
  tags?: string[] | undefined;
1611
1899
  kind?: string | undefined;
1612
- status?: string | undefined;
1900
+ status?: SuperMemoryStatus | undefined;
1613
1901
  importance?: number | undefined;
1614
1902
  confidence?: number | undefined;
1615
- anchors?: Array<{
1616
- type: string;
1617
- path?: string;
1618
- symbol?: string;
1619
- command?: string;
1620
- }> | undefined;
1903
+ freshness?: number | undefined;
1904
+ anchors?: SuperMemoryAnchor[] | undefined;
1905
+ audience?: {
1906
+ roles?: string[];
1907
+ taskTypes?: string[];
1908
+ modes?: string[];
1909
+ } | undefined;
1910
+ supersedes?: string[] | undefined;
1911
+ contradicts?: string[] | undefined;
1621
1912
  };
1622
1913
  } | {
1623
1914
  type: 'memory.super.delete';
1624
1915
  payload: {
1625
1916
  id: string;
1626
1917
  reason?: string | undefined;
1918
+ neverInject?: boolean | undefined;
1627
1919
  };
1920
+ } | {
1921
+ type: 'memory.super.recover';
1922
+ payload: {
1923
+ id: string;
1924
+ reason?: string | undefined;
1925
+ };
1926
+ } | {
1927
+ type: 'memory.super.candidateResolve';
1928
+ payload: {
1929
+ candidateId: string;
1930
+ action: 'accept' | 'reject';
1931
+ reason?: string | undefined;
1932
+ };
1933
+ } | {
1934
+ type: 'memory.super.backfillRecoverable';
1935
+ payload: {
1936
+ apply: boolean;
1937
+ kinds?: string[] | undefined;
1938
+ scopes?: string[] | undefined;
1939
+ updatedAfter?: string | undefined;
1940
+ updatedBefore?: string | undefined;
1941
+ };
1942
+ } | {
1943
+ type: 'memory.super.forFile';
1944
+ payload: WSMemorySuperForFileRequest;
1628
1945
  } | {
1629
1946
  type: 'memory.super.remember';
1630
1947
  payload: {
1631
1948
  text: string;
1632
1949
  kind?: string | undefined;
1950
+ scope?: SuperMemoryScope | undefined;
1633
1951
  tags?: string[] | undefined;
1634
1952
  importance?: number | undefined;
1635
1953
  confidence?: number | undefined;
1954
+ freshness?: number | undefined;
1955
+ anchors?: SuperMemoryAnchor[] | undefined;
1956
+ audience?: {
1957
+ roles?: string[];
1958
+ taskTypes?: string[];
1959
+ modes?: string[];
1960
+ } | undefined;
1961
+ supersedes?: string[] | undefined;
1962
+ contradicts?: string[] | undefined;
1636
1963
  };
1637
1964
  } | {
1638
1965
  type: 'skills.list';
@@ -1690,6 +2017,25 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1690
2017
  } | {
1691
2018
  type: 'stats.get';
1692
2019
  payload?: SessionScopedPayload;
2020
+ } | {
2021
+ type: 'chronicle.query';
2022
+ payload: {
2023
+ query?: ChronicleQuery | undefined;
2024
+ };
2025
+ } | {
2026
+ type: 'chronicle.facet';
2027
+ payload: {
2028
+ field: ChronicleFacet;
2029
+ query?: ChronicleQuery | undefined;
2030
+ limit?: number | undefined;
2031
+ };
2032
+ } | {
2033
+ type: 'chronicle.graph';
2034
+ payload: {
2035
+ seed: ChronicleQuery;
2036
+ hops?: number;
2037
+ maxNodes?: number;
2038
+ };
1693
2039
  } | {
1694
2040
  type: 'session.save';
1695
2041
  payload?: SessionScopedPayload;
@@ -1798,6 +2144,8 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1798
2144
  };
1799
2145
  } | {
1800
2146
  type: 'goal.get';
2147
+ } | {
2148
+ type: 'goal-state.get';
1801
2149
  } | {
1802
2150
  type: 'autonomy.switch';
1803
2151
  payload: {
@@ -1888,6 +2236,10 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
1888
2236
  /** Refine on this provider/model instead of the session's — ephemeral, no session switch. */
1889
2237
  provider?: string | undefined;
1890
2238
  model?: string | undefined;
2239
+ /** Previous refinement when the user asks the preview to try again better. */
2240
+ previousRefined?: string | undefined;
2241
+ previousEnglish?: string | undefined;
2242
+ retryFeedback?: string | undefined;
1891
2243
  };
1892
2244
  } | {
1893
2245
  type: 'skills.list';
@@ -2089,7 +2441,29 @@ export type WSClientMessage = WSUserMessage | WSToolConfirmResult | {
2089
2441
  } | {
2090
2442
  type: 'webui.shutdown';
2091
2443
  };
2092
- export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingDelta | WSToolUseStart | WSToolProgress | WSToolExecuted | WSIterationStarted | WSIterationCompleted | WSIterationLimitReached | WSProviderResponse | WSProviderRetry | WSProviderError | WSProviderFallback | WSProviderStreamError | WSRunResult | WSSessionStats | WSError | WSToolConfirmNeeded | WSTrustPersisted | WSToolLoopDetected | WSDelegateStarted | WSDelegateCompleted | WSContextDebug | WSContextCompacted | WSCompactionFailed | WSContextRepaired | WSContextPct | WSContextMaxContext | WSTokenThreshold | WSTokenCostEstimateUnavailable | WSContextModesList | WSContextModeChanged | WSToolsList | WSMemoryList | WSMemorySuperList | WSMemorySuperGet | WSMemorySuperUpdate | WSMemorySuperRemember | WSMemorySuperDelete | WSSkillsList | WSSkillContent | WSDesignList | WSDesignUse | WSDesignState | WSDesignSet | WSDesignMaterialize | WSDesignVerify | WSSkillsInstalled | WSSkillsUninstalled | WSSkillsUpdated | WSSkillsCreated | WSSkillsEdited | WSSkillsExported | WSDiagGet | WSStatsGet | WSSessionsList | WSProviderCatalog | WSProviderModels | WSSavedProviders | WSProviderProbe | WSKeyOperationResult | WSAuthOAuthStatus | WSFilesList | {
2444
+ export type WSClientMessage = WSClientMessageCore;
2445
+ export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSThinkingDelta | WSToolUseStart | WSToolProgress | WSToolExecuted | WSCodeMapToolStarted | WSCodeMapToolExecuted | WSIterationStarted | WSIterationCompleted | WSIterationLimitReached | WSProviderResponse | WSProviderRetry | WSProviderError | WSProviderFallback | WSProviderStreamError | WSRunResult | WSSessionStats | WSError | WSToolConfirmNeeded | WSTrustPersisted | WSToolLoopDetected | WSDelegateStarted | WSDelegateCompleted | WSContextDebug | WSContextCompacted | WSCompactionFailed | WSContextRepaired | WSContextPct | WSContextMaxContext | WSTokenThreshold | WSTokenCostEstimateUnavailable | WSContextModesList | WSContextModeChanged | WSToolsList | WSMemoryList | WSMemorySuperList | WSMemorySuperGet | WSMemorySuperUpdate | WSMemorySuperRemember | WSMemorySuperDelete | WSMemorySuperRecover | WSMemorySuperCandidateResolve | WSMemorySuperBackfillRecoverable | WSMemorySuperForFile | WSSkillsList | WSSkillContent | WSDesignList | WSDesignUse | WSDesignState | WSDesignSet | WSDesignMaterialize | WSDesignVerify | WSSkillsInstalled | WSSkillsUninstalled | WSSkillsUpdated | WSSkillsCreated | WSSkillsEdited | WSSkillsExported | WSDiagGet | WSStatsGet | {
2446
+ type: 'chronicle.query_result';
2447
+ payload: ChronicleQueryResult;
2448
+ } | {
2449
+ type: 'chronicle.facet_result';
2450
+ payload: {
2451
+ field: ChronicleFacet;
2452
+ values: ChronicleFacetValue[];
2453
+ diagnostics: {
2454
+ sourceFiles: number;
2455
+ invalidLines: number;
2456
+ };
2457
+ };
2458
+ } | {
2459
+ type: 'chronicle.graph_result';
2460
+ payload: ChronicleGraphResult;
2461
+ } | {
2462
+ type: 'chronicle.error';
2463
+ payload: {
2464
+ message: string;
2465
+ };
2466
+ } | WSSessionsList | WSProviderCatalog | WSProviderModels | WSSavedProviders | WSProviderProbe | WSKeyOperationResult | WSAuthOAuthStatus | WSFilesList | {
2093
2467
  type: 'files.tree';
2094
2468
  payload: {
2095
2469
  root: string;
@@ -2122,7 +2496,7 @@ export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSTh
2122
2496
  plan: unknown | null;
2123
2497
  error?: string | undefined;
2124
2498
  };
2125
- } | WSModesList | WSAutoPhaseState | WSAutoPhaseProgress | WSAutoPhaseLifecycle | WSAutoPhaseList | {
2499
+ } | WSModesList | WSGoalState | WSGoalProgress | WSGoalLifecycle | WSGoalList | {
2126
2500
  type: 'specs.list';
2127
2501
  payload: {
2128
2502
  specs: unknown[];
@@ -2166,7 +2540,7 @@ export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSTh
2166
2540
  payload: {
2167
2541
  runId: string;
2168
2542
  };
2169
- } | WSEternalIteration | WSAgentTimelineMessage | WSAgentStatusChanged | WSKanbanResult | {
2543
+ } | WSEternalIteration | WSAgentTimelineMessage | WSAgentStatusChanged | WSKanbanResult | WSKanbanTaskActivity | {
2170
2544
  type: 'subagent.event';
2171
2545
  payload: SessionScopedPayload & Record<string, unknown> & {
2172
2546
  kind: string;
@@ -2184,11 +2558,62 @@ export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSTh
2184
2558
  }>;
2185
2559
  };
2186
2560
  } | {
2187
- type: 'goal.updated';
2561
+ type: 'goal-state.updated';
2188
2562
  payload: Record<string, unknown> | null;
2189
2563
  } | {
2190
2564
  type: 'prefs.updated';
2191
2565
  payload: Record<string, unknown>;
2566
+ } | {
2567
+ type: 'techstack.job.started';
2568
+ payload: {
2569
+ jobId: string;
2570
+ kind: 'inventory' | 'analyze';
2571
+ };
2572
+ } | {
2573
+ type: 'techstack.job.progress';
2574
+ payload: {
2575
+ jobId: string;
2576
+ phase: string;
2577
+ completed: number;
2578
+ total: number;
2579
+ };
2580
+ } | {
2581
+ type: 'techstack.workspace.completed';
2582
+ payload: {
2583
+ jobId: string;
2584
+ workspaceId: string;
2585
+ ecosystem: string;
2586
+ dependencyCount: number;
2587
+ };
2588
+ } | {
2589
+ type: 'techstack.snapshot.updated';
2590
+ payload: {
2591
+ snapshot: import('@/stores/techstack-store').TechStackSnapshot;
2592
+ stale?: boolean | undefined;
2593
+ };
2594
+ } | {
2595
+ type: 'techstack.report.ready';
2596
+ payload: {
2597
+ reportId: string;
2598
+ summary?: string | undefined;
2599
+ };
2600
+ } | {
2601
+ type: 'techstack.report.delivered';
2602
+ payload: {
2603
+ deliveryId: string;
2604
+ sessionId: string;
2605
+ };
2606
+ } | {
2607
+ type: 'techstack.job.failed';
2608
+ payload: {
2609
+ jobId: string;
2610
+ error: string;
2611
+ };
2612
+ } | {
2613
+ type: 'techstack.job.cancelled';
2614
+ payload: {
2615
+ jobId: string;
2616
+ };
2192
2617
  } | {
2193
2618
  type: 'client.status_update';
2194
2619
  payload: Record<string, unknown>;
@@ -2344,6 +2769,27 @@ export type WSServerMessage = WSSessionStart | WSSessionEnd | WSTextDelta | WSTh
2344
2769
  payload: SessionScopedPayload & Record<string, unknown> & {
2345
2770
  event: string;
2346
2771
  };
2772
+ } | {
2773
+ type: 'file.saved';
2774
+ payload: SessionScopedPayload & {
2775
+ filePath: string;
2776
+ };
2777
+ } | {
2778
+ type: 'codemap.file_event';
2779
+ payload: SessionScopedPayload & {
2780
+ filePath: string;
2781
+ operation: 'read' | 'write' | 'edit' | 'delete' | 'rename';
2782
+ phase: 'started' | 'completed' | 'changed';
2783
+ source: 'tool' | 'editor' | 'deterministic' | 'watcher' | 'external';
2784
+ at: number;
2785
+ traceId?: string | undefined;
2786
+ agentId?: string | undefined;
2787
+ agentName?: string | undefined;
2788
+ toolUseId?: string | undefined;
2789
+ toolName?: string | undefined;
2790
+ line?: number | undefined;
2791
+ endLine?: number | undefined;
2792
+ };
2347
2793
  } | {
2348
2794
  type: 'session.damaged';
2349
2795
  payload: {