@pellux/goodvibes-sdk 0.38.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (474) hide show
  1. package/dist/contracts/artifacts/operator-contract.json +3171 -929
  2. package/dist/daemon.d.ts +2 -0
  3. package/dist/daemon.d.ts.map +1 -1
  4. package/dist/daemon.js +4 -0
  5. package/dist/events/surfaces.d.ts +25 -3
  6. package/dist/events/surfaces.d.ts.map +1 -1
  7. package/dist/events/surfaces.js +22 -1
  8. package/dist/events/workflows.d.ts +7 -6
  9. package/dist/events/workflows.d.ts.map +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/platform/agents/archetypes.d.ts.map +1 -1
  13. package/dist/platform/agents/archetypes.js +7 -0
  14. package/dist/platform/agents/index.d.ts +1 -0
  15. package/dist/platform/agents/index.d.ts.map +1 -1
  16. package/dist/platform/agents/index.js +1 -0
  17. package/dist/platform/agents/orchestrator-runner.d.ts +13 -0
  18. package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
  19. package/dist/platform/agents/orchestrator-runner.js +14 -0
  20. package/dist/platform/agents/orchestrator.d.ts +38 -6
  21. package/dist/platform/agents/orchestrator.d.ts.map +1 -1
  22. package/dist/platform/agents/orchestrator.js +66 -18
  23. package/dist/platform/agents/planner-decomposition-runner.d.ts +38 -0
  24. package/dist/platform/agents/planner-decomposition-runner.d.ts.map +1 -0
  25. package/dist/platform/agents/planner-decomposition-runner.js +113 -0
  26. package/dist/platform/agents/turn-knowledge-injection.d.ts +88 -3
  27. package/dist/platform/agents/turn-knowledge-injection.d.ts.map +1 -1
  28. package/dist/platform/agents/turn-knowledge-injection.js +147 -30
  29. package/dist/platform/agents/worktree.d.ts +126 -8
  30. package/dist/platform/agents/worktree.d.ts.map +1 -1
  31. package/dist/platform/agents/worktree.js +240 -19
  32. package/dist/platform/agents/wrfc-controller.d.ts +23 -0
  33. package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
  34. package/dist/platform/agents/wrfc-controller.js +158 -32
  35. package/dist/platform/agents/wrfc-gate-runtime.d.ts +9 -0
  36. package/dist/platform/agents/wrfc-gate-runtime.d.ts.map +1 -1
  37. package/dist/platform/agents/wrfc-gate-runtime.js +7 -3
  38. package/dist/platform/agents/wrfc-gates.d.ts +1 -1
  39. package/dist/platform/agents/wrfc-gates.d.ts.map +1 -1
  40. package/dist/platform/agents/wrfc-gates.js +7 -1
  41. package/dist/platform/agents/wrfc-types.d.ts +23 -3
  42. package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
  43. package/dist/platform/automation/types.d.ts +9 -1
  44. package/dist/platform/automation/types.d.ts.map +1 -1
  45. package/dist/platform/calendar/calendar-api-shared.d.ts +25 -0
  46. package/dist/platform/calendar/calendar-api-shared.d.ts.map +1 -0
  47. package/dist/platform/calendar/calendar-api-shared.js +100 -0
  48. package/dist/platform/calendar/calendar-connector.d.ts +79 -0
  49. package/dist/platform/calendar/calendar-connector.d.ts.map +1 -0
  50. package/dist/platform/calendar/calendar-connector.js +155 -0
  51. package/dist/platform/calendar/google-calendar-api.d.ts +25 -0
  52. package/dist/platform/calendar/google-calendar-api.d.ts.map +1 -0
  53. package/dist/platform/calendar/google-calendar-api.js +89 -0
  54. package/dist/platform/calendar/http-fetch-adapter.d.ts +25 -0
  55. package/dist/platform/calendar/http-fetch-adapter.d.ts.map +1 -0
  56. package/dist/platform/calendar/http-fetch-adapter.js +25 -0
  57. package/dist/platform/calendar/ics-parser.d.ts +35 -0
  58. package/dist/platform/calendar/ics-parser.d.ts.map +1 -0
  59. package/dist/platform/calendar/ics-parser.js +236 -0
  60. package/dist/platform/calendar/index.d.ts +41 -0
  61. package/dist/platform/calendar/index.d.ts.map +1 -0
  62. package/dist/platform/calendar/index.js +49 -0
  63. package/dist/platform/calendar/merged-calendar-model.d.ts +67 -0
  64. package/dist/platform/calendar/merged-calendar-model.d.ts.map +1 -0
  65. package/dist/platform/calendar/merged-calendar-model.js +181 -0
  66. package/dist/platform/calendar/microsoft-graph-api.d.ts +25 -0
  67. package/dist/platform/calendar/microsoft-graph-api.d.ts.map +1 -0
  68. package/dist/platform/calendar/microsoft-graph-api.js +95 -0
  69. package/dist/platform/calendar/oauth-flow.d.ts +62 -0
  70. package/dist/platform/calendar/oauth-flow.d.ts.map +1 -0
  71. package/dist/platform/calendar/oauth-flow.js +305 -0
  72. package/dist/platform/calendar/oauth-providers.d.ts +43 -0
  73. package/dist/platform/calendar/oauth-providers.d.ts.map +1 -0
  74. package/dist/platform/calendar/oauth-providers.js +120 -0
  75. package/dist/platform/calendar/oauth-token-store.d.ts +72 -0
  76. package/dist/platform/calendar/oauth-token-store.d.ts.map +1 -0
  77. package/dist/platform/calendar/oauth-token-store.js +189 -0
  78. package/dist/platform/calendar/oauth-types.d.ts +274 -0
  79. package/dist/platform/calendar/oauth-types.d.ts.map +1 -0
  80. package/dist/platform/calendar/oauth-types.js +22 -0
  81. package/dist/platform/calendar/rrule.d.ts +39 -0
  82. package/dist/platform/calendar/rrule.d.ts.map +1 -0
  83. package/dist/platform/calendar/rrule.js +261 -0
  84. package/dist/platform/calendar/subscription-store.d.ts +118 -0
  85. package/dist/platform/calendar/subscription-store.d.ts.map +1 -0
  86. package/dist/platform/calendar/subscription-store.js +293 -0
  87. package/dist/platform/calendar/types.d.ts +170 -0
  88. package/dist/platform/calendar/types.d.ts.map +1 -0
  89. package/dist/platform/calendar/types.js +21 -0
  90. package/dist/platform/companion/companion-chat-attachments.d.ts +29 -0
  91. package/dist/platform/companion/companion-chat-attachments.d.ts.map +1 -0
  92. package/dist/platform/companion/companion-chat-attachments.js +121 -0
  93. package/dist/platform/companion/companion-chat-broker-bridge.d.ts +40 -0
  94. package/dist/platform/companion/companion-chat-broker-bridge.d.ts.map +1 -0
  95. package/dist/platform/companion/companion-chat-broker-bridge.js +14 -0
  96. package/dist/platform/companion/companion-chat-broker-sync.d.ts +38 -0
  97. package/dist/platform/companion/companion-chat-broker-sync.d.ts.map +1 -0
  98. package/dist/platform/companion/companion-chat-broker-sync.js +80 -0
  99. package/dist/platform/companion/companion-chat-gc.d.ts +63 -0
  100. package/dist/platform/companion/companion-chat-gc.d.ts.map +1 -0
  101. package/dist/platform/companion/companion-chat-gc.js +38 -0
  102. package/dist/platform/companion/companion-chat-manager.d.ts +67 -20
  103. package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
  104. package/dist/platform/companion/companion-chat-manager.js +130 -144
  105. package/dist/platform/companion/companion-chat-persistence.d.ts +9 -1
  106. package/dist/platform/companion/companion-chat-persistence.d.ts.map +1 -1
  107. package/dist/platform/companion/companion-chat-persistence.js +10 -2
  108. package/dist/platform/companion/companion-chat-routes.d.ts +2 -1
  109. package/dist/platform/companion/companion-chat-routes.d.ts.map +1 -1
  110. package/dist/platform/companion/companion-chat-routes.js +37 -4
  111. package/dist/platform/config/credential-status.d.ts +28 -0
  112. package/dist/platform/config/credential-status.d.ts.map +1 -0
  113. package/dist/platform/config/credential-status.js +75 -0
  114. package/dist/platform/config/index.d.ts +25 -0
  115. package/dist/platform/config/index.d.ts.map +1 -1
  116. package/dist/platform/config/index.js +18 -0
  117. package/dist/platform/config/manager.d.ts +9 -0
  118. package/dist/platform/config/manager.d.ts.map +1 -1
  119. package/dist/platform/config/manager.js +21 -2
  120. package/dist/platform/config/migrations.d.ts +48 -0
  121. package/dist/platform/config/migrations.d.ts.map +1 -0
  122. package/dist/platform/config/migrations.js +54 -0
  123. package/dist/platform/config/schema-domain-core.d.ts +10 -1
  124. package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
  125. package/dist/platform/config/schema-domain-core.js +46 -3
  126. package/dist/platform/config/schema-types.d.ts +13 -7
  127. package/dist/platform/config/schema-types.d.ts.map +1 -1
  128. package/dist/platform/config/schema.d.ts.map +1 -1
  129. package/dist/platform/config/schema.js +2 -0
  130. package/dist/platform/control-plane/approval-broker.d.ts +11 -0
  131. package/dist/platform/control-plane/approval-broker.d.ts.map +1 -1
  132. package/dist/platform/control-plane/approval-broker.js +17 -1
  133. package/dist/platform/control-plane/approval-hunk-apply.d.ts +77 -0
  134. package/dist/platform/control-plane/approval-hunk-apply.d.ts.map +1 -0
  135. package/dist/platform/control-plane/approval-hunk-apply.js +80 -0
  136. package/dist/platform/control-plane/gateway-disabled-response.d.ts +20 -0
  137. package/dist/platform/control-plane/gateway-disabled-response.d.ts.map +1 -0
  138. package/dist/platform/control-plane/gateway-disabled-response.js +24 -0
  139. package/dist/platform/control-plane/gateway-scope-enforcement.d.ts +68 -0
  140. package/dist/platform/control-plane/gateway-scope-enforcement.d.ts.map +1 -0
  141. package/dist/platform/control-plane/gateway-scope-enforcement.js +91 -0
  142. package/dist/platform/control-plane/gateway-utils.d.ts +17 -0
  143. package/dist/platform/control-plane/gateway-utils.d.ts.map +1 -1
  144. package/dist/platform/control-plane/gateway-utils.js +30 -0
  145. package/dist/platform/control-plane/gateway.d.ts +12 -2
  146. package/dist/platform/control-plane/gateway.d.ts.map +1 -1
  147. package/dist/platform/control-plane/gateway.js +27 -31
  148. package/dist/platform/control-plane/index.d.ts +6 -1
  149. package/dist/platform/control-plane/index.d.ts.map +1 -1
  150. package/dist/platform/control-plane/index.js +4 -0
  151. package/dist/platform/control-plane/invoke-input-validation.d.ts +56 -0
  152. package/dist/platform/control-plane/invoke-input-validation.d.ts.map +1 -0
  153. package/dist/platform/control-plane/invoke-input-validation.js +163 -0
  154. package/dist/platform/control-plane/method-catalog-admin.d.ts.map +1 -1
  155. package/dist/platform/control-plane/method-catalog-admin.js +12 -1
  156. package/dist/platform/control-plane/method-catalog-calendar.d.ts +16 -0
  157. package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -1
  158. package/dist/platform/control-plane/method-catalog-calendar.js +21 -0
  159. package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
  160. package/dist/platform/control-plane/method-catalog-channels.js +32 -3
  161. package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
  162. package/dist/platform/control-plane/method-catalog-control-automation.js +19 -34
  163. package/dist/platform/control-plane/method-catalog-control-companion.d.ts +15 -0
  164. package/dist/platform/control-plane/method-catalog-control-companion.d.ts.map +1 -0
  165. package/dist/platform/control-plane/method-catalog-control-companion.js +133 -0
  166. package/dist/platform/control-plane/method-catalog-control-core.d.ts.map +1 -1
  167. package/dist/platform/control-plane/method-catalog-control-core.js +104 -122
  168. package/dist/platform/control-plane/method-catalog-control.d.ts.map +1 -1
  169. package/dist/platform/control-plane/method-catalog-control.js +4 -0
  170. package/dist/platform/control-plane/method-catalog-email.d.ts +17 -0
  171. package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -1
  172. package/dist/platform/control-plane/method-catalog-email.js +21 -0
  173. package/dist/platform/control-plane/method-catalog-events.d.ts +28 -0
  174. package/dist/platform/control-plane/method-catalog-events.d.ts.map +1 -1
  175. package/dist/platform/control-plane/method-catalog-events.js +74 -1
  176. package/dist/platform/control-plane/method-catalog-fleet.d.ts +24 -0
  177. package/dist/platform/control-plane/method-catalog-fleet.d.ts.map +1 -0
  178. package/dist/platform/control-plane/method-catalog-fleet.js +65 -0
  179. package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts +84 -0
  180. package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts.map +1 -0
  181. package/dist/platform/control-plane/method-catalog-route-reconcile.js +103 -0
  182. package/dist/platform/control-plane/method-catalog-shared.d.ts +29 -0
  183. package/dist/platform/control-plane/method-catalog-shared.d.ts.map +1 -1
  184. package/dist/platform/control-plane/method-catalog.d.ts +9 -0
  185. package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
  186. package/dist/platform/control-plane/method-catalog.js +32 -3
  187. package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts +8 -0
  188. package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
  189. package/dist/platform/control-plane/operator-contract-schemas-admin.js +22 -1
  190. package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts +18 -0
  191. package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts.map +1 -0
  192. package/dist/platform/control-plane/operator-contract-schemas-fleet.js +182 -0
  193. package/dist/platform/control-plane/operator-contract-schemas-permissions.d.ts.map +1 -1
  194. package/dist/platform/control-plane/operator-contract-schemas-permissions.js +5 -0
  195. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +29 -0
  196. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
  197. package/dist/platform/control-plane/operator-contract-schemas-runtime.js +57 -3
  198. package/dist/platform/control-plane/operator-contract-schemas.d.ts +1 -0
  199. package/dist/platform/control-plane/operator-contract-schemas.d.ts.map +1 -1
  200. package/dist/platform/control-plane/operator-contract-schemas.js +1 -0
  201. package/dist/platform/control-plane/operator-contract.d.ts.map +1 -1
  202. package/dist/platform/control-plane/operator-contract.js +8 -0
  203. package/dist/platform/control-plane/routes/checkpoints.d.ts +39 -0
  204. package/dist/platform/control-plane/routes/checkpoints.d.ts.map +1 -0
  205. package/dist/platform/control-plane/routes/checkpoints.js +166 -0
  206. package/dist/platform/control-plane/routes/fleet.d.ts +53 -0
  207. package/dist/platform/control-plane/routes/fleet.d.ts.map +1 -0
  208. package/dist/platform/control-plane/routes/fleet.js +153 -0
  209. package/dist/platform/control-plane/routes/gateway-verb-error.d.ts +30 -0
  210. package/dist/platform/control-plane/routes/gateway-verb-error.d.ts.map +1 -0
  211. package/dist/platform/control-plane/routes/gateway-verb-error.js +36 -0
  212. package/dist/platform/control-plane/routes/index.d.ts +0 -6
  213. package/dist/platform/control-plane/routes/index.d.ts.map +1 -1
  214. package/dist/platform/control-plane/routes/index.js +5 -5
  215. package/dist/platform/control-plane/routes/invocation-params.d.ts +23 -0
  216. package/dist/platform/control-plane/routes/invocation-params.d.ts.map +1 -0
  217. package/dist/platform/control-plane/routes/invocation-params.js +9 -0
  218. package/dist/platform/control-plane/routes/register-w3-s2.d.ts +26 -0
  219. package/dist/platform/control-plane/routes/register-w3-s2.d.ts.map +1 -0
  220. package/dist/platform/control-plane/routes/register-w3-s2.js +8 -0
  221. package/dist/platform/control-plane/routes/session-search.d.ts +37 -0
  222. package/dist/platform/control-plane/routes/session-search.d.ts.map +1 -0
  223. package/dist/platform/control-plane/routes/session-search.js +113 -0
  224. package/dist/platform/control-plane/session-broker-gc.d.ts +16 -0
  225. package/dist/platform/control-plane/session-broker-gc.d.ts.map +1 -1
  226. package/dist/platform/control-plane/session-broker-gc.js +23 -6
  227. package/dist/platform/control-plane/session-broker-helpers.d.ts +3 -3
  228. package/dist/platform/control-plane/session-broker-helpers.d.ts.map +1 -1
  229. package/dist/platform/control-plane/session-broker-inputs.d.ts +18 -0
  230. package/dist/platform/control-plane/session-broker-inputs.d.ts.map +1 -1
  231. package/dist/platform/control-plane/session-broker-inputs.js +34 -0
  232. package/dist/platform/control-plane/session-broker-sessions.d.ts +102 -3
  233. package/dist/platform/control-plane/session-broker-sessions.d.ts.map +1 -1
  234. package/dist/platform/control-plane/session-broker-sessions.js +179 -5
  235. package/dist/platform/control-plane/session-broker-state.d.ts +20 -1
  236. package/dist/platform/control-plane/session-broker-state.d.ts.map +1 -1
  237. package/dist/platform/control-plane/session-broker-state.js +67 -5
  238. package/dist/platform/control-plane/session-broker.d.ts +51 -38
  239. package/dist/platform/control-plane/session-broker.d.ts.map +1 -1
  240. package/dist/platform/control-plane/session-broker.js +183 -75
  241. package/dist/platform/control-plane/session-store-importer.d.ts +57 -0
  242. package/dist/platform/control-plane/session-store-importer.d.ts.map +1 -0
  243. package/dist/platform/control-plane/session-store-importer.js +227 -0
  244. package/dist/platform/control-plane/session-types.d.ts +142 -7
  245. package/dist/platform/control-plane/session-types.d.ts.map +1 -1
  246. package/dist/platform/core/execution-plan.d.ts +43 -1
  247. package/dist/platform/core/execution-plan.d.ts.map +1 -1
  248. package/dist/platform/core/execution-plan.js +46 -10
  249. package/dist/platform/core/index.d.ts +1 -0
  250. package/dist/platform/core/index.d.ts.map +1 -1
  251. package/dist/platform/core/index.js +1 -0
  252. package/dist/platform/core/orchestrator-runtime.d.ts +21 -1
  253. package/dist/platform/core/orchestrator-runtime.d.ts.map +1 -1
  254. package/dist/platform/core/orchestrator-tool-runtime.d.ts +7 -0
  255. package/dist/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
  256. package/dist/platform/core/orchestrator-tool-runtime.js +10 -0
  257. package/dist/platform/core/orchestrator-turn-loop.d.ts +8 -1
  258. package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
  259. package/dist/platform/core/orchestrator-turn-loop.js +6 -0
  260. package/dist/platform/core/orchestrator.d.ts +6 -0
  261. package/dist/platform/core/orchestrator.d.ts.map +1 -1
  262. package/dist/platform/core/orchestrator.js +15 -0
  263. package/dist/platform/core/plan-decomposition.d.ts +196 -0
  264. package/dist/platform/core/plan-decomposition.d.ts.map +1 -0
  265. package/dist/platform/core/plan-decomposition.js +417 -0
  266. package/dist/platform/core/plan-proposal.d.ts +39 -0
  267. package/dist/platform/core/plan-proposal.d.ts.map +1 -1
  268. package/dist/platform/core/wrfc-routing.d.ts +1 -0
  269. package/dist/platform/core/wrfc-routing.d.ts.map +1 -1
  270. package/dist/platform/core/wrfc-routing.js +51 -1
  271. package/dist/platform/daemon/boot.d.ts +63 -0
  272. package/dist/platform/daemon/boot.d.ts.map +1 -0
  273. package/dist/platform/daemon/boot.js +60 -0
  274. package/dist/platform/daemon/cli.js +2 -1
  275. package/dist/platform/daemon/control-plane.d.ts.map +1 -1
  276. package/dist/platform/daemon/control-plane.js +50 -1
  277. package/dist/platform/daemon/facade-composition.d.ts.map +1 -1
  278. package/dist/platform/daemon/facade-composition.js +6 -0
  279. package/dist/platform/daemon/facade.d.ts +18 -6
  280. package/dist/platform/daemon/facade.d.ts.map +1 -1
  281. package/dist/platform/daemon/facade.js +50 -43
  282. package/dist/platform/daemon/http/router-route-contexts.d.ts +1 -0
  283. package/dist/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
  284. package/dist/platform/daemon/http/router-route-contexts.js +1 -0
  285. package/dist/platform/daemon/http/router-session-broker-adapter.d.ts +13 -0
  286. package/dist/platform/daemon/http/router-session-broker-adapter.d.ts.map +1 -0
  287. package/dist/platform/daemon/http/router-session-broker-adapter.js +27 -0
  288. package/dist/platform/daemon/http/router.d.ts +1 -1
  289. package/dist/platform/daemon/http/router.d.ts.map +1 -1
  290. package/dist/platform/daemon/http/router.js +7 -22
  291. package/dist/platform/daemon/http/runtime-route-types.d.ts +42 -4
  292. package/dist/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  293. package/dist/platform/daemon/index.d.ts +2 -0
  294. package/dist/platform/daemon/index.d.ts.map +1 -1
  295. package/dist/platform/daemon/index.js +1 -0
  296. package/dist/platform/daemon/service-manager.d.ts +16 -0
  297. package/dist/platform/daemon/service-manager.d.ts.map +1 -1
  298. package/dist/platform/daemon/service-manager.js +79 -15
  299. package/dist/platform/intelligence/tree-sitter/service.d.ts.map +1 -1
  300. package/dist/platform/intelligence/tree-sitter/service.js +16 -2
  301. package/dist/platform/knowledge/browser-history/readers.d.ts.map +1 -1
  302. package/dist/platform/knowledge/browser-history/readers.js +15 -5
  303. package/dist/platform/knowledge/project-planning/service.d.ts +14 -1
  304. package/dist/platform/knowledge/project-planning/service.d.ts.map +1 -1
  305. package/dist/platform/knowledge/project-planning/service.js +77 -0
  306. package/dist/platform/knowledge/project-planning/types.d.ts +32 -0
  307. package/dist/platform/knowledge/project-planning/types.d.ts.map +1 -1
  308. package/dist/platform/orchestration/bookkeeping.d.ts +12 -0
  309. package/dist/platform/orchestration/bookkeeping.d.ts.map +1 -0
  310. package/dist/platform/orchestration/bookkeeping.js +91 -0
  311. package/dist/platform/orchestration/controller-compat.d.ts +14 -0
  312. package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
  313. package/dist/platform/orchestration/controller-compat.js +18 -4
  314. package/dist/platform/orchestration/engine.d.ts +26 -1
  315. package/dist/platform/orchestration/engine.d.ts.map +1 -1
  316. package/dist/platform/orchestration/engine.js +226 -21
  317. package/dist/platform/orchestration/index.d.ts +6 -4
  318. package/dist/platform/orchestration/index.d.ts.map +1 -1
  319. package/dist/platform/orchestration/index.js +3 -2
  320. package/dist/platform/orchestration/persistence.d.ts.map +1 -1
  321. package/dist/platform/orchestration/persistence.js +4 -1
  322. package/dist/platform/orchestration/phase-runner.d.ts +29 -2
  323. package/dist/platform/orchestration/phase-runner.d.ts.map +1 -1
  324. package/dist/platform/orchestration/phase-runner.js +98 -25
  325. package/dist/platform/orchestration/proposal-workstream.d.ts +56 -0
  326. package/dist/platform/orchestration/proposal-workstream.d.ts.map +1 -0
  327. package/dist/platform/orchestration/proposal-workstream.js +76 -0
  328. package/dist/platform/orchestration/scheduler.d.ts +19 -0
  329. package/dist/platform/orchestration/scheduler.d.ts.map +1 -1
  330. package/dist/platform/orchestration/scheduler.js +16 -0
  331. package/dist/platform/orchestration/types.d.ts +286 -1
  332. package/dist/platform/orchestration/types.d.ts.map +1 -1
  333. package/dist/platform/orchestration/types.js +32 -0
  334. package/dist/platform/orchestration/worktree-isolation.d.ts +33 -0
  335. package/dist/platform/orchestration/worktree-isolation.d.ts.map +1 -0
  336. package/dist/platform/orchestration/worktree-isolation.js +248 -0
  337. package/dist/platform/presentation/glyphs.d.ts +91 -0
  338. package/dist/platform/presentation/glyphs.d.ts.map +1 -0
  339. package/dist/platform/presentation/glyphs.js +93 -0
  340. package/dist/platform/presentation/index.d.ts +28 -0
  341. package/dist/platform/presentation/index.d.ts.map +1 -0
  342. package/dist/platform/presentation/index.js +27 -0
  343. package/dist/platform/presentation/thinking-phrases.d.ts +12 -0
  344. package/dist/platform/presentation/thinking-phrases.d.ts.map +1 -0
  345. package/dist/platform/presentation/thinking-phrases.js +32 -0
  346. package/dist/platform/presentation/tones.d.ts +121 -0
  347. package/dist/platform/presentation/tones.d.ts.map +1 -0
  348. package/dist/platform/presentation/tones.js +145 -0
  349. package/dist/platform/presentation/waiting-wording.d.ts +54 -0
  350. package/dist/platform/presentation/waiting-wording.d.ts.map +1 -0
  351. package/dist/platform/presentation/waiting-wording.js +51 -0
  352. package/dist/platform/providers/runtime-snapshot.d.ts.map +1 -1
  353. package/dist/platform/providers/runtime-snapshot.js +12 -2
  354. package/dist/platform/runtime/bootstrap-services.d.ts +62 -2
  355. package/dist/platform/runtime/bootstrap-services.d.ts.map +1 -1
  356. package/dist/platform/runtime/bootstrap-services.js +217 -50
  357. package/dist/platform/runtime/daemon-version-compat.d.ts +39 -0
  358. package/dist/platform/runtime/daemon-version-compat.d.ts.map +1 -0
  359. package/dist/platform/runtime/daemon-version-compat.js +75 -0
  360. package/dist/platform/runtime/detached-daemon-runtime.d.ts +26 -0
  361. package/dist/platform/runtime/detached-daemon-runtime.d.ts.map +1 -0
  362. package/dist/platform/runtime/detached-daemon-runtime.js +49 -0
  363. package/dist/platform/runtime/emitters/workflows.d.ts +1 -1
  364. package/dist/platform/runtime/emitters/workflows.d.ts.map +1 -1
  365. package/dist/platform/runtime/events/index.d.ts +13 -0
  366. package/dist/platform/runtime/events/index.d.ts.map +1 -1
  367. package/dist/platform/runtime/events/index.js +13 -0
  368. package/dist/platform/runtime/feature-flags/flags.d.ts.map +1 -1
  369. package/dist/platform/runtime/feature-flags/flags.js +39 -1
  370. package/dist/platform/runtime/fleet/adapters/orchestration.d.ts +40 -18
  371. package/dist/platform/runtime/fleet/adapters/orchestration.d.ts.map +1 -1
  372. package/dist/platform/runtime/fleet/adapters/orchestration.js +138 -34
  373. package/dist/platform/runtime/fleet/adapters/wrfc.d.ts +13 -0
  374. package/dist/platform/runtime/fleet/adapters/wrfc.d.ts.map +1 -1
  375. package/dist/platform/runtime/fleet/adapters/wrfc.js +48 -1
  376. package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
  377. package/dist/platform/runtime/fleet/registry.js +38 -4
  378. package/dist/platform/runtime/operator-client.d.ts +20 -2
  379. package/dist/platform/runtime/operator-client.d.ts.map +1 -1
  380. package/dist/platform/runtime/operator-client.js +11 -1
  381. package/dist/platform/runtime/provider-accounts/registry.d.ts.map +1 -1
  382. package/dist/platform/runtime/provider-accounts/registry.js +11 -1
  383. package/dist/platform/runtime/services.d.ts +9 -7
  384. package/dist/platform/runtime/services.d.ts.map +1 -1
  385. package/dist/platform/runtime/services.js +19 -4
  386. package/dist/platform/runtime/session-spine/client.d.ts +234 -0
  387. package/dist/platform/runtime/session-spine/client.d.ts.map +1 -0
  388. package/dist/platform/runtime/session-spine/client.js +449 -0
  389. package/dist/platform/runtime/session-spine/index.d.ts +12 -0
  390. package/dist/platform/runtime/session-spine/index.d.ts.map +1 -0
  391. package/dist/platform/runtime/session-spine/index.js +11 -0
  392. package/dist/platform/runtime/session-spine/union-cache.d.ts +225 -0
  393. package/dist/platform/runtime/session-spine/union-cache.d.ts.map +1 -0
  394. package/dist/platform/runtime/session-spine/union-cache.js +333 -0
  395. package/dist/platform/runtime/shell-command-ops.d.ts +3 -1
  396. package/dist/platform/runtime/shell-command-ops.d.ts.map +1 -1
  397. package/dist/platform/runtime/transports/daemon-http-client-validators.d.ts.map +1 -1
  398. package/dist/platform/runtime/transports/daemon-http-client-validators.js +22 -0
  399. package/dist/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
  400. package/dist/platform/runtime/transports/daemon-http-client.js +25 -2
  401. package/dist/platform/runtime/transports/http-types.d.ts +9 -2
  402. package/dist/platform/runtime/transports/http-types.d.ts.map +1 -1
  403. package/dist/platform/state/canonical-memory.d.ts +95 -0
  404. package/dist/platform/state/canonical-memory.d.ts.map +1 -0
  405. package/dist/platform/state/canonical-memory.js +155 -0
  406. package/dist/platform/state/code-index-reindex.d.ts +73 -0
  407. package/dist/platform/state/code-index-reindex.d.ts.map +1 -0
  408. package/dist/platform/state/code-index-reindex.js +156 -0
  409. package/dist/platform/state/code-index-store.d.ts.map +1 -1
  410. package/dist/platform/state/code-index-store.js +10 -2
  411. package/dist/platform/state/index.d.ts +8 -0
  412. package/dist/platform/state/index.d.ts.map +1 -1
  413. package/dist/platform/state/index.js +4 -0
  414. package/dist/platform/state/memory-recall-contract.d.ts +63 -0
  415. package/dist/platform/state/memory-recall-contract.d.ts.map +1 -0
  416. package/dist/platform/state/memory-recall-contract.js +94 -0
  417. package/dist/platform/state/memory-store.d.ts +2 -0
  418. package/dist/platform/state/memory-store.d.ts.map +1 -1
  419. package/dist/platform/state/memory-store.js +4 -0
  420. package/dist/platform/state/memory-vector-store.d.ts.map +1 -1
  421. package/dist/platform/state/memory-vector-store.js +13 -2
  422. package/dist/platform/state/sqlite-store.d.ts +2 -0
  423. package/dist/platform/state/sqlite-store.d.ts.map +1 -1
  424. package/dist/platform/state/sqlite-store.js +4 -0
  425. package/dist/platform/state/vibe-projection.d.ts +67 -0
  426. package/dist/platform/state/vibe-projection.d.ts.map +1 -0
  427. package/dist/platform/state/vibe-projection.js +115 -0
  428. package/dist/platform/tools/agent/index.d.ts.map +1 -1
  429. package/dist/platform/tools/agent/index.js +8 -0
  430. package/dist/platform/tools/agent/manager.d.ts +12 -0
  431. package/dist/platform/tools/agent/manager.d.ts.map +1 -1
  432. package/dist/platform/tools/agent/manager.js +6 -0
  433. package/dist/platform/tools/agent/schema.d.ts +26 -0
  434. package/dist/platform/tools/agent/schema.d.ts.map +1 -1
  435. package/dist/platform/tools/agent/schema.js +2 -2
  436. package/dist/platform/tools/agent/wrfc-batch-policy.d.ts +13 -0
  437. package/dist/platform/tools/agent/wrfc-batch-policy.d.ts.map +1 -1
  438. package/dist/platform/tools/agent/wrfc-batch-policy.js +60 -0
  439. package/dist/platform/tools/exec/runtime.d.ts +10 -0
  440. package/dist/platform/tools/exec/runtime.d.ts.map +1 -1
  441. package/dist/platform/tools/exec/runtime.js +22 -5
  442. package/dist/platform/tools/exec/schema.d.ts +1 -1
  443. package/dist/platform/tools/exec/schema.d.ts.map +1 -1
  444. package/dist/platform/tools/exec/schema.js +2 -1
  445. package/dist/platform/tools/index.d.ts +2 -0
  446. package/dist/platform/tools/index.d.ts.map +1 -1
  447. package/dist/platform/tools/index.js +2 -0
  448. package/dist/platform/tools/state/index.d.ts +9 -0
  449. package/dist/platform/tools/state/index.d.ts.map +1 -1
  450. package/dist/platform/tools/state/index.js +60 -3
  451. package/dist/platform/types/foundation-contract.d.ts +1 -1
  452. package/dist/platform/types/foundation-contract.d.ts.map +1 -1
  453. package/dist/platform/types/index.d.ts +1 -1
  454. package/dist/platform/types/index.d.ts.map +1 -1
  455. package/dist/platform/version.js +1 -1
  456. package/package.json +21 -9
  457. package/dist/platform/control-plane/routes/automation.d.ts +0 -3
  458. package/dist/platform/control-plane/routes/automation.d.ts.map +0 -1
  459. package/dist/platform/control-plane/routes/automation.js +0 -63
  460. package/dist/platform/control-plane/routes/context.d.ts +0 -2
  461. package/dist/platform/control-plane/routes/context.d.ts.map +0 -1
  462. package/dist/platform/control-plane/routes/context.js +0 -1
  463. package/dist/platform/control-plane/routes/operator.d.ts +0 -8
  464. package/dist/platform/control-plane/routes/operator.d.ts.map +0 -1
  465. package/dist/platform/control-plane/routes/operator.js +0 -415
  466. package/dist/platform/control-plane/routes/remote.d.ts +0 -3
  467. package/dist/platform/control-plane/routes/remote.d.ts.map +0 -1
  468. package/dist/platform/control-plane/routes/remote.js +0 -35
  469. package/dist/platform/control-plane/routes/sessions.d.ts +0 -3
  470. package/dist/platform/control-plane/routes/sessions.d.ts.map +0 -1
  471. package/dist/platform/control-plane/routes/sessions.js +0 -43
  472. package/dist/platform/control-plane/routes/tasks.d.ts +0 -3
  473. package/dist/platform/control-plane/routes/tasks.d.ts.map +0 -1
  474. package/dist/platform/control-plane/routes/tasks.js +0 -22
@@ -0,0 +1,227 @@
1
+ /**
2
+ * session-store-importer.ts
3
+ *
4
+ * Boot-time migration that folds every pre-existing session store into the ONE
5
+ * home-scoped durable broker store. Idempotent and safe to run repeatedly — the
6
+ * merge is keyed on session id, so a re-run over the same sources is a no-op.
7
+ *
8
+ * Sources folded in (One-Platform Wave 1, S1 spine):
9
+ * 1. Companion chat files — ~/.goodvibes/companion-chat/sessions/*.json
10
+ * (home-scoped, projectless → project 'unknown'); INCLUDING closed sessions.
11
+ * 2. Per-project broker snapshots — <root>/.goodvibes/<surface>/control-plane/
12
+ * sessions.json (the old project-scoped store path); stamped project = <root>.
13
+ * 3. The stale agent-fork store — same broker-snapshot shape under its surface.
14
+ *
15
+ * No session is dropped (closed included); deletion remains the GC's job. Corrupt
16
+ * or partial files are logged and skipped per-file — the run never aborts.
17
+ */
18
+ import { existsSync, readdirSync } from 'node:fs';
19
+ import { join } from 'node:path';
20
+ import { PersistentStore } from '../state/persistent-store.js';
21
+ import { CompanionChatPersistence } from '../companion/companion-chat-persistence.js';
22
+ import { defaultSessionsDir } from '../companion/companion-chat-persistence.js';
23
+ import { loadSessionBrokerState, createSessionBrokerSnapshot } from './session-broker-state.js';
24
+ import { logger } from '../utils/logger.js';
25
+ import { summarizeError } from '../utils/error-display.js';
26
+ /**
27
+ * How many message bodies to retain PER SESSION when re-persisting the merged
28
+ * store. This is a per-session cap, not a global one: every session keeps its
29
+ * most-recent 2 000 bodies independently, and a session that is truncated is
30
+ * stamped with an honest `retainedMessageCount` (see createSessionBrokerSnapshot).
31
+ * Migration therefore never silently drops whole sessions' transcripts.
32
+ */
33
+ const MAX_PERSISTED_MESSAGES_PER_SESSION = 2_000;
34
+ /**
35
+ * Discover the legacy stores reachable from a single project root plus the
36
+ * home-scoped companion directory. Scans <projectRoot>/.goodvibes/<surface>/
37
+ * control-plane/sessions.json across every surface subdir (tui, goodvibes,
38
+ * agent, …). The home store itself is never returned as a source.
39
+ */
40
+ export function discoverLegacySessionSources(input) {
41
+ const sources = [];
42
+ const companionDir = input.companionSessionsDir ?? defaultSessionsDir();
43
+ sources.push({ kind: 'companion-dir', path: companionDir, project: 'unknown' });
44
+ const goodvibesRoot = join(input.projectRoot, '.goodvibes');
45
+ let surfaceDirs = [];
46
+ try {
47
+ surfaceDirs = existsSync(goodvibesRoot)
48
+ ? readdirSync(goodvibesRoot, { withFileTypes: true })
49
+ .filter((entry) => entry.isDirectory())
50
+ .map((entry) => entry.name)
51
+ : [];
52
+ }
53
+ catch (error) {
54
+ logger.warn('[session-import] failed to scan project .goodvibes root', {
55
+ root: goodvibesRoot,
56
+ error: summarizeError(error),
57
+ });
58
+ }
59
+ for (const surface of surfaceDirs) {
60
+ const storePath = join(goodvibesRoot, surface, 'control-plane', 'sessions.json');
61
+ if (existsSync(storePath)) {
62
+ sources.push({ kind: 'broker-store', path: storePath, project: input.projectRoot });
63
+ }
64
+ }
65
+ return sources;
66
+ }
67
+ /**
68
+ * Fold every source into the home store at `homeStorePath`, idempotently.
69
+ * Starts from the existing home store, merges each source keyed by session id
70
+ * (newer updatedAt wins; messages/inputs union-deduped by id), and re-persists
71
+ * atomically. A second run over the same sources produces the same store.
72
+ */
73
+ export async function importLegacySessionStores(input) {
74
+ const homeStore = new PersistentStore(input.homeStorePath);
75
+ const existing = loadSessionBrokerState(await safeLoad(homeStore));
76
+ const state = {
77
+ sessions: new Map(existing.sessions),
78
+ messages: new Map(),
79
+ inputs: new Map(),
80
+ };
81
+ for (const bucket of existing.messages.values())
82
+ for (const m of bucket)
83
+ state.messages.set(m.id, m);
84
+ for (const bucket of existing.inputs.values())
85
+ for (const i of bucket)
86
+ state.inputs.set(i.id, i);
87
+ const startCount = state.sessions.size;
88
+ const missingSources = [];
89
+ const skippedFiles = [];
90
+ for (const source of input.sources) {
91
+ if (!existsSync(source.path)) {
92
+ missingSources.push(source.path);
93
+ continue;
94
+ }
95
+ if (source.kind === 'companion-dir') {
96
+ await mergeCompanionDir(state, source, skippedFiles);
97
+ }
98
+ else {
99
+ await mergeBrokerStore(state, source, skippedFiles);
100
+ }
101
+ }
102
+ await homeStore.persist(buildSnapshot(state));
103
+ return {
104
+ total: state.sessions.size,
105
+ imported: state.sessions.size - startCount,
106
+ missingSources,
107
+ skippedFiles,
108
+ };
109
+ }
110
+ async function safeLoad(store) {
111
+ try {
112
+ return await store.load();
113
+ }
114
+ catch (error) {
115
+ logger.warn('[session-import] home store failed to load; starting empty', {
116
+ error: summarizeError(error),
117
+ });
118
+ return null;
119
+ }
120
+ }
121
+ async function mergeBrokerStore(state, source, skippedFiles) {
122
+ let loaded;
123
+ try {
124
+ const snapshot = await new PersistentStore(source.path).load();
125
+ loaded = loadSessionBrokerState(snapshot);
126
+ }
127
+ catch (error) {
128
+ logger.warn('[session-import] broker store failed to load; skipping', {
129
+ path: source.path,
130
+ error: summarizeError(error),
131
+ });
132
+ skippedFiles.push(source.path);
133
+ return;
134
+ }
135
+ for (const record of loaded.sessions.values()) {
136
+ const stamped = record.project === 'unknown' && source.project
137
+ ? { ...record, project: source.project }
138
+ : record;
139
+ upsertSession(state, stamped);
140
+ }
141
+ for (const bucket of loaded.messages.values()) {
142
+ for (const message of bucket)
143
+ if (!state.messages.has(message.id))
144
+ state.messages.set(message.id, message);
145
+ }
146
+ for (const bucket of loaded.inputs.values()) {
147
+ for (const inputRecord of bucket)
148
+ if (!state.inputs.has(inputRecord.id))
149
+ state.inputs.set(inputRecord.id, inputRecord);
150
+ }
151
+ }
152
+ async function mergeCompanionDir(state, source, skippedFiles) {
153
+ const persistence = new CompanionChatPersistence(source.path);
154
+ const stored = await persistence.loadAll();
155
+ for (const { meta, messages } of stored) {
156
+ const converted = companionMessagesToShared(meta.id, messages);
157
+ for (const message of converted)
158
+ if (!state.messages.has(message.id))
159
+ state.messages.set(message.id, message);
160
+ upsertSession(state, companionSessionToShared(meta, converted, source.project ?? 'unknown'));
161
+ }
162
+ // CompanionChatPersistence.loadAll already logs+skips corrupt files internally;
163
+ // there is no per-file signal to surface here beyond its own warnings.
164
+ void skippedFiles;
165
+ }
166
+ function upsertSession(state, incoming) {
167
+ const current = state.sessions.get(incoming.id);
168
+ if (!current || incoming.updatedAt >= current.updatedAt) {
169
+ const participants = current
170
+ ? mergeParticipants(current, incoming)
171
+ : incoming.participants;
172
+ state.sessions.set(incoming.id, { ...incoming, participants });
173
+ }
174
+ }
175
+ function mergeParticipants(current, incoming) {
176
+ const byId = new Map();
177
+ for (const p of current.participants)
178
+ byId.set(`${p.surfaceKind}:${p.surfaceId}:${p.userId ?? ''}`, p);
179
+ for (const p of incoming.participants)
180
+ byId.set(`${p.surfaceKind}:${p.surfaceId}:${p.userId ?? ''}`, p);
181
+ return [...byId.values()];
182
+ }
183
+ function companionSessionToShared(meta, messages, project) {
184
+ const lastMessageAt = messages.reduce((latest, m) => (latest === undefined || m.createdAt > latest ? m.createdAt : latest), undefined);
185
+ return {
186
+ id: meta.id,
187
+ kind: 'companion-chat',
188
+ project,
189
+ title: meta.title.trim().length > 0 ? meta.title : `Session ${meta.id}`,
190
+ status: meta.status,
191
+ createdAt: meta.createdAt,
192
+ updatedAt: meta.updatedAt,
193
+ ...(lastMessageAt !== undefined ? { lastMessageAt } : {}),
194
+ ...(meta.closedAt != null ? { closedAt: meta.closedAt } : {}),
195
+ lastActivityAt: meta.updatedAt,
196
+ messageCount: messages.length,
197
+ pendingInputCount: 0,
198
+ routeIds: [],
199
+ surfaceKinds: ['companion'],
200
+ participants: [{ surfaceKind: 'companion', surfaceId: meta.id, lastSeenAt: meta.updatedAt }],
201
+ metadata: {},
202
+ };
203
+ }
204
+ function companionMessagesToShared(sessionId, messages) {
205
+ return messages.map((message) => ({
206
+ id: message.id,
207
+ sessionId,
208
+ role: message.role,
209
+ body: message.content,
210
+ createdAt: message.createdAt,
211
+ surfaceKind: 'companion',
212
+ surfaceId: sessionId,
213
+ metadata: {},
214
+ }));
215
+ }
216
+ function buildSnapshot(state) {
217
+ const sessions = new Map(state.sessions);
218
+ const messages = new Map();
219
+ const inputs = new Map();
220
+ for (const message of state.messages.values()) {
221
+ messages.set(message.sessionId, [...(messages.get(message.sessionId) ?? []), message]);
222
+ }
223
+ for (const inputRecord of state.inputs.values()) {
224
+ inputs.set(inputRecord.sessionId, [...(inputs.get(inputRecord.sessionId) ?? []), inputRecord]);
225
+ }
226
+ return createSessionBrokerSnapshot({ sessions, messages, inputs }, MAX_PERSISTED_MESSAGES_PER_SESSION);
227
+ }
@@ -1,10 +1,18 @@
1
1
  import type { AutomationRouteBinding } from '../automation/routes.js';
2
2
  import type { AutomationSurfaceKind } from '../automation/types.js';
3
+ import type { SurfaceKind } from '../../events/surfaces.js';
3
4
  import type { SharedSessionInputIntent, SharedSessionInputRecord, SharedSessionRoutingIntent } from './session-intents.js';
4
5
  export type SharedSessionStatus = 'active' | 'closed';
5
6
  export type SharedSessionMessageRole = 'user' | 'assistant' | 'system';
7
+ /**
8
+ * A session participant — the identity triple {surfaceKind, surfaceId, userId?}
9
+ * standardized on the canonical (wide) {@link SurfaceKind}, so product surfaces
10
+ * (agent/webui/companion) are first-class participants alongside transport
11
+ * surfaces. `userId` is the documented identity key. This is a DIFFERENT axis
12
+ * from {@link SharedSessionRecord.kind} (the session origin).
13
+ */
6
14
  export interface SharedSessionParticipant {
7
- readonly surfaceKind: AutomationSurfaceKind;
15
+ readonly surfaceKind: SurfaceKind;
8
16
  readonly surfaceId: string;
9
17
  readonly externalId?: string | undefined;
10
18
  readonly userId?: string | undefined;
@@ -18,7 +26,7 @@ export interface SharedSessionMessage {
18
26
  readonly role: SharedSessionMessageRole;
19
27
  readonly body: string;
20
28
  readonly createdAt: number;
21
- readonly surfaceKind?: AutomationSurfaceKind | undefined;
29
+ readonly surfaceKind?: SurfaceKind | undefined;
22
30
  readonly surfaceId?: string | undefined;
23
31
  readonly routeId?: string | undefined;
24
32
  readonly agentId?: string | undefined;
@@ -27,15 +35,46 @@ export interface SharedSessionMessage {
27
35
  readonly metadata: Record<string, unknown>;
28
36
  }
29
37
  /**
30
- * Discriminates the session origin.
31
- * - 'tui': created by the operator TUI (default for existing sessions)
38
+ * Discriminates the session ORIGIN — which product created the session. This is
39
+ * a separate axis from {@link SharedSessionParticipant.surfaceKind} (the surface
40
+ * a participant speaks through). Do not conflate them: a session's origin `kind`
41
+ * is stamped once at creation; a session can have many participants across many
42
+ * surfaces.
43
+ * - 'tui': created by the operator TUI (default for existing/legacy sessions)
44
+ * - 'agent': created by an agent runtime
45
+ * - 'webui': created by the rich web client
32
46
  * - 'companion-task': created via task-submit flow (agent spawn)
33
47
  * - 'companion-chat': created via companion chat-mode API (no agent spawn; uses per-session orchestrator)
48
+ * - 'automation': created by an automation job/run
34
49
  */
35
- export type SharedSessionKind = 'tui' | 'companion-task' | 'companion-chat';
50
+ export type SharedSessionKind = 'tui' | 'agent' | 'webui' | 'companion-task' | 'companion-chat' | 'automation';
51
+ /**
52
+ * Why a session was closed. Drives the honest reopen-on-heartbeat rule:
53
+ * - 'idle-reaped': the GC sweep closed an idle session. It AUTO-REOPENS on the
54
+ * next register heartbeat from a participant (a surface coming back to a
55
+ * session the SYSTEM closed underneath it is not a conflict).
56
+ * - 'user' / 'surface': a deliberate close. It does NOT auto-reopen — register
57
+ * records the heartbeat and returns the still-closed record with a conflict
58
+ * marker unless `reopen: true` is passed (the Wave-1 honest-register semantics).
59
+ *
60
+ * Carried on the record under `metadata[SESSION_CLOSE_REASON_METADATA_KEY]` so it
61
+ * rides the wire without a schema change and old readers ignore it (metadata is
62
+ * an open record). Absent means the session is open, or was closed by a build
63
+ * that predates this field.
64
+ */
65
+ export type SharedSessionCloseReason = 'idle-reaped' | 'user' | 'surface';
36
66
  export interface SharedSessionRecord {
37
67
  readonly id: string;
38
68
  readonly kind: SharedSessionKind;
69
+ /**
70
+ * The workspace/project this session belongs to, carried as DATA on the
71
+ * record (not encoded in the store path). Typically the absolute working
72
+ * directory of the creating surface, or a stable project id. Legacy records
73
+ * lacking this field are backfilled to 'unknown' on load. Home-scoped,
74
+ * projectless surfaces (e.g. companion chat) use 'unknown'. This is what lets
75
+ * ONE home-scoped store serve every project and every surface filter honestly.
76
+ */
77
+ readonly project: string;
39
78
  readonly title: string;
40
79
  readonly status: SharedSessionStatus;
41
80
  readonly createdAt: number;
@@ -51,9 +90,19 @@ export interface SharedSessionRecord {
51
90
  */
52
91
  readonly lastActivityAt: number;
53
92
  readonly messageCount: number;
93
+ /**
94
+ * How many of this session's message BODIES are actually retained in the
95
+ * durable store, when that is fewer than {@link messageCount}. Persistence
96
+ * caps retained bodies per session (see MAX_PERSISTED_MESSAGES_PER_SESSION);
97
+ * when the cap prunes the oldest bodies, `messageCount` stays the honest
98
+ * logical total and this field records how many bodies survived. Omitted when
99
+ * nothing was pruned (retained === messageCount), so the common case carries
100
+ * no marker. Readers must treat an absent value as "fully retained".
101
+ */
102
+ readonly retainedMessageCount?: number | undefined;
54
103
  readonly pendingInputCount: number;
55
104
  readonly routeIds: readonly string[];
56
- readonly surfaceKinds: readonly AutomationSurfaceKind[];
105
+ readonly surfaceKinds: readonly SurfaceKind[];
57
106
  readonly participants: readonly SharedSessionParticipant[];
58
107
  readonly activeAgentId?: string | undefined;
59
108
  readonly lastAgentId?: string | undefined;
@@ -66,7 +115,7 @@ export interface SharedSessionSubmission {
66
115
  readonly routeBinding?: AutomationRouteBinding | undefined;
67
116
  readonly input: SharedSessionInputRecord;
68
117
  readonly intent: SharedSessionInputIntent;
69
- readonly mode: 'spawn' | 'continued-live' | 'queued-follow-up' | 'rejected';
118
+ readonly mode: 'spawn' | 'continued-live' | 'queued-follow-up' | 'queued-for-surface' | 'rejected';
70
119
  readonly state: SharedSessionInputRecord['state'];
71
120
  readonly task?: string | undefined;
72
121
  readonly activeAgentId?: string | undefined;
@@ -89,9 +138,95 @@ export interface SubmitSharedSessionMessageInput {
89
138
  export interface SteerSharedSessionMessageInput extends SubmitSharedSessionMessageInput {
90
139
  readonly allowSpawnFallback?: boolean | undefined;
91
140
  }
141
+ /**
142
+ * The participant/route attach input consumed by the broker's participant merge.
143
+ * Identical to a submit message minus `metadata`, but `surfaceKind` is the WIDE
144
+ * canonical {@link SurfaceKind} so product-surface participants (agent/webui/
145
+ * companion) — which arrive via sessions.register, not the transport submit
146
+ * path — can be merged. Transport submit inputs (narrow surfaceKind) remain
147
+ * assignable to this type.
148
+ */
149
+ export type ParticipantRouteAttachInput = Omit<SubmitSharedSessionMessageInput, 'metadata' | 'surfaceKind'> & {
150
+ readonly surfaceKind: SurfaceKind;
151
+ };
92
152
  export interface FindSharedSessionOptions {
93
153
  readonly surfaceKind?: AutomationSurfaceKind | undefined;
94
154
  readonly routeId?: string | undefined;
95
155
  readonly includeClosed?: boolean | undefined;
156
+ /** Scope the search to a single project; omit for the cross-project union. */
157
+ readonly project?: string | undefined;
158
+ }
159
+ /** Options for {@link SharedSessionBroker.listSessions}. */
160
+ export interface ListSharedSessionsOptions {
161
+ /** Scope to a single project; omit for the cross-project union (default). */
162
+ readonly project?: string | undefined;
163
+ /** Filter by origin kind. */
164
+ readonly kind?: SharedSessionKind | undefined;
165
+ /** Include closed sessions (default: closed sessions are included). */
166
+ readonly includeClosed?: boolean | undefined;
167
+ }
168
+ /** Input to {@link SharedSessionBroker.createSession}. */
169
+ export interface CreateSharedSessionInput {
170
+ readonly id?: string | undefined;
171
+ readonly kind?: SharedSessionKind | undefined;
172
+ readonly project?: string | undefined;
173
+ readonly title?: string | undefined;
174
+ readonly metadata?: Record<string, unknown> | undefined;
175
+ readonly routeBinding?: AutomationRouteBinding | undefined;
176
+ readonly participant?: SharedSessionParticipant | undefined;
177
+ }
178
+ /** Input to {@link SharedSessionBroker.ensureSession} (idempotent create-or-adopt). */
179
+ export interface EnsureSharedSessionInput {
180
+ readonly sessionId?: string | undefined;
181
+ readonly kind?: SharedSessionKind | undefined;
182
+ readonly project?: string | undefined;
183
+ readonly title?: string | undefined;
184
+ readonly metadata?: Record<string, unknown> | undefined;
185
+ readonly routeBinding?: AutomationRouteBinding | undefined;
186
+ readonly participant?: SharedSessionParticipant | undefined;
187
+ }
188
+ /**
189
+ * Input to {@link SharedSessionBroker.register} — the idempotent upsert keyed on
190
+ * a caller-supplied session id. Re-calling register with the same id is the
191
+ * heartbeat: it advances `participant.lastSeenAt`. Carries the identity spine
192
+ * (kind + project + participant triple) that {@link EnsureSharedSessionInput}
193
+ * threads into the record.
194
+ */
195
+ export interface RegisterSharedSessionInput {
196
+ readonly sessionId: string;
197
+ readonly kind?: SharedSessionKind | undefined;
198
+ readonly project?: string | undefined;
199
+ readonly title?: string | undefined;
200
+ readonly participant: SharedSessionParticipant;
201
+ /**
202
+ * Explicit intent to reopen a CLOSED session. Default `false`: registering
203
+ * against a closed id does NOT silently reopen it — it records the heartbeat
204
+ * (participant.lastSeenAt) and returns the still-closed record with an honest
205
+ * conflict marker. Pass `true` to reopen as part of the register.
206
+ */
207
+ readonly reopen?: boolean | undefined;
208
+ }
209
+ /**
210
+ * Result of {@link SharedSessionBroker.register}. Carries the record plus honest
211
+ * lifecycle disposition so a caller (and the wire) never has to guess whether a
212
+ * closed session was resurrected.
213
+ *
214
+ * SPOOFING / TRUST NOTE: the control plane uses a single-admin-token model, so
215
+ * cross-surface writes under the same token (e.g. two surfaces heartbeating the
216
+ * same session id) are LEGITIMATE co-participation, not impersonation. `register`
217
+ * merges participants freely; what it will NOT do silently is change lifecycle
218
+ * status or rename a titled session.
219
+ */
220
+ export interface SharedSessionRegisterResult {
221
+ readonly record: SharedSessionRecord;
222
+ /** True only when this call reopened a previously-closed session. */
223
+ readonly reopened: boolean;
224
+ /**
225
+ * Present when register targeted a CLOSED session without `reopen: true`. The
226
+ * record is returned as-is (still closed) with the heartbeat recorded.
227
+ */
228
+ readonly conflict?: {
229
+ readonly status: 'closed';
230
+ } | undefined;
96
231
  }
97
232
  //# sourceMappingURL=session-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-types.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/session-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACtD,MAAM,MAAM,wBAAwB,GAAG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CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,YAAY,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAC3D,QAAQ,CAAC,WAAW,CAAC,EAAE,wBAAwB,GAAG,SAAS,CAAC;CAC7D;AAED;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,WAAW,EAAE,wBAAwB,CAAC;IAC/C;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;KAAE,GAAG,SAAS,CAAC;CAC/D"}
@@ -14,16 +14,43 @@ export interface PlanItem {
14
14
  agentId?: string;
15
15
  dependencies?: string[];
16
16
  }
17
+ export type ExecutionPlanStatus = 'draft' | 'active' | 'complete' | 'failed' | 'dismissed';
17
18
  export interface ExecutionPlan {
18
19
  id: string;
19
20
  title: string;
20
21
  createdAt: string;
21
22
  updatedAt: string;
22
23
  sessionId?: string | undefined;
23
- status: 'draft' | 'active' | 'complete' | 'failed';
24
+ status: ExecutionPlanStatus;
24
25
  items: PlanItem[];
25
26
  specPath?: string;
26
27
  awaitingPlan?: boolean;
28
+ /** ISO timestamp set when the plan was dismissed/archived (status 'dismissed'). */
29
+ dismissedAt?: string;
30
+ /** The status the plan held immediately before it was dismissed — preserved so
31
+ * a completed/failed record is not silently rewritten to look like a draft. */
32
+ dismissedFrom?: Exclude<ExecutionPlanStatus, 'dismissed'>;
33
+ }
34
+ /**
35
+ * Outcome of {@link ExecutionPlanManager.dismiss}. Dismiss is intentionally
36
+ * refused mid-execution: an in-flight plan must be stopped via the workstream
37
+ * cancel path first, so `dismiss` never silently abandons running agent work.
38
+ *
39
+ * - `no-active-plan` — nothing to dismiss; no mutation.
40
+ * - `requires-cancel` — the active plan is mid-execution ('active');
41
+ * refused. Cancel the workstream first, then dismiss.
42
+ * - `dismissed` — a proposal/awaiting-approval or terminal plan was
43
+ * archived: retained on disk with status 'dismissed'
44
+ * + `dismissedAt`, and the active pointer cleared so a
45
+ * later `/plan <goal>` starts fresh.
46
+ */
47
+ export type DismissPlanOutcome = 'no-active-plan' | 'requires-cancel' | 'dismissed';
48
+ export interface DismissPlanResult {
49
+ readonly outcome: DismissPlanOutcome;
50
+ /** The archived plan (only when `outcome === 'dismissed'`). */
51
+ readonly plan?: ExecutionPlan;
52
+ /** The plan that blocked dismissal (only when `outcome === 'requires-cancel'`). */
53
+ readonly blockedBy?: ExecutionPlan;
27
54
  }
28
55
  export interface ExecutionPlanParseIssue {
29
56
  readonly line: number;
@@ -50,6 +77,21 @@ export declare class ExecutionPlanManager {
50
77
  create(title: string, items: Omit<PlanItem, 'id' | 'status'>[], sessionId?: string): ExecutionPlan;
51
78
  /** Update a plan item's status (and optionally assign an agent). */
52
79
  updateItem(planId: string, itemId: string, status: PlanItemStatus, agentId?: string): void;
80
+ /**
81
+ * Dismiss (archive) the active plan for the current session.
82
+ *
83
+ * Honest semantics for every plan state:
84
+ * - No active plan → no-op (`{ outcome: 'no-active-plan' }`), nothing written.
85
+ * - Active/mid-execution ('active') → refused (`{ outcome: 'requires-cancel' }`).
86
+ * A running plan must be stopped via the workstream cancel path first;
87
+ * dismiss never abandons in-flight agent work by fiat.
88
+ * - Proposal/awaiting-approval ('draft') or a terminal record ('complete' /
89
+ * 'failed') → archived: the plan is RETAINED on disk with status
90
+ * 'dismissed', a `dismissedAt` timestamp, and `dismissedFrom` recording
91
+ * the prior status; the active pointer is cleared so a later
92
+ * `/plan <goal>` starts a fresh plan. Nothing is deleted.
93
+ */
94
+ dismiss(sessionId?: string): DismissPlanResult;
53
95
  /** List all plans (reads directory, excludes active.json). */
54
96
  list(): ExecutionPlan[];
55
97
  private nextCreatedAt;
@@ -1 +1 @@
1
- {"version":3,"file":"execution-plan.d.ts","sourceRoot":"","sources":["../../../src/platform/core/execution-plan.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3F,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IACnD,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CA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EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa;IAoBlG,oEAAoE;IACpE,UAAU,CACR,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,IAAI;IA0BP;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,iBAAiB;IAoB9C,8DAA8D;IAC9D,IAAI,IAAI,aAAa,EAAE;IAgBvB,OAAO,CAAC,aAAa;IAUrB;;;;;;;OAOG;IACH,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM;IAwCvC;;;OAGG;IACH,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,mBAAmB;IA6HxD,uEAAuE;IACvE,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM;IAyBvC;;;;OAIG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,QAAQ,CAAC,EAAE,GAAG,IAAI;IAoD5E,mEAAmE;IACnE,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,QAAQ,EAAE;CAa9C"}
@@ -186,19 +186,55 @@ export class ExecutionPlanManager {
186
186
  item.status = status;
187
187
  if (agentId !== undefined)
188
188
  item.agentId = agentId;
189
- // Derive top-level plan status
190
- const allDone = plan.items.every((i) => i.status === 'complete' || i.status === 'skipped');
191
- const anyFailed = plan.items.some((i) => i.status === 'failed');
192
- const anyActive = plan.items.some((i) => i.status === 'in_progress');
193
- if (allDone)
194
- plan.status = 'complete';
195
- else if (anyFailed)
196
- plan.status = 'failed';
197
- else if (anyActive)
198
- plan.status = 'active';
189
+ // A dismissed plan is archived — never resurrect its top-level status from
190
+ // an item edit. Persist the item change but leave status 'dismissed'.
191
+ if (plan.status !== 'dismissed') {
192
+ // Derive top-level plan status
193
+ const allDone = plan.items.every((i) => i.status === 'complete' || i.status === 'skipped');
194
+ const anyFailed = plan.items.some((i) => i.status === 'failed');
195
+ const anyActive = plan.items.some((i) => i.status === 'in_progress');
196
+ if (allDone)
197
+ plan.status = 'complete';
198
+ else if (anyFailed)
199
+ plan.status = 'failed';
200
+ else if (anyActive)
201
+ plan.status = 'active';
202
+ }
199
203
  plan.updatedAt = new Date().toISOString();
200
204
  this.save(plan);
201
205
  }
206
+ /**
207
+ * Dismiss (archive) the active plan for the current session.
208
+ *
209
+ * Honest semantics for every plan state:
210
+ * - No active plan → no-op (`{ outcome: 'no-active-plan' }`), nothing written.
211
+ * - Active/mid-execution ('active') → refused (`{ outcome: 'requires-cancel' }`).
212
+ * A running plan must be stopped via the workstream cancel path first;
213
+ * dismiss never abandons in-flight agent work by fiat.
214
+ * - Proposal/awaiting-approval ('draft') or a terminal record ('complete' /
215
+ * 'failed') → archived: the plan is RETAINED on disk with status
216
+ * 'dismissed', a `dismissedAt` timestamp, and `dismissedFrom` recording
217
+ * the prior status; the active pointer is cleared so a later
218
+ * `/plan <goal>` starts a fresh plan. Nothing is deleted.
219
+ */
220
+ dismiss(sessionId) {
221
+ const active = this.getActive(sessionId);
222
+ if (!active)
223
+ return { outcome: 'no-active-plan' };
224
+ if (active.status === 'active') {
225
+ return { outcome: 'requires-cancel', blockedBy: active };
226
+ }
227
+ const dismissedFrom = active.status;
228
+ active.dismissedFrom = dismissedFrom;
229
+ active.status = 'dismissed';
230
+ active.dismissedAt = new Date().toISOString();
231
+ active.updatedAt = active.dismissedAt;
232
+ this.save(active);
233
+ // Clear the active pointer (archive, not delete) so the plan survives in
234
+ // list() but no longer counts as the session's active plan.
235
+ this.setActive(null, active.sessionId ?? sessionId ?? null);
236
+ return { outcome: 'dismissed', plan: active };
237
+ }
202
238
  /** List all plans (reads directory, excludes active.json). */
203
239
  list() {
204
240
  if (!existsSync(this.plansDir))
@@ -20,6 +20,7 @@ export * from './orchestrator-turn-helpers.js';
20
20
  export * from './orchestrator-turn-loop.js';
21
21
  export * from './orchestrator.js';
22
22
  export * from './plan-command-handler.js';
23
+ export * from './plan-decomposition.js';
23
24
  export * from './plan-proposal.js';
24
25
  export * from './replay-command-handler.js';
25
26
  export * from './session-lineage.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/platform/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
@@ -20,6 +20,7 @@ export * from './orchestrator-turn-helpers.js';
20
20
  export * from './orchestrator-turn-loop.js';
21
21
  export * from './orchestrator.js';
22
22
  export * from './plan-command-handler.js';
23
+ export * from './plan-decomposition.js';
23
24
  export * from './plan-proposal.js';
24
25
  export * from './replay-command-handler.js';
25
26
  export * from './session-lineage.js';