@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
@@ -1,4 +1,4 @@
1
- import type { ControlPlaneRecentEvent, SharedApprovalRecord, SharedSessionInputRecord, SharedSessionMessage, SharedSessionRecord, SharedSessionSubmission, SteerSharedSessionMessageInput, SubmitSharedSessionMessageInput } from '../control-plane/index.js';
1
+ import type { ControlPlaneRecentEvent, RegisterSharedSessionInput, SharedApprovalRecord, SharedSessionInputRecord, SharedSessionMessage, SharedSessionRecord, SharedSessionRegisterResult, SharedSessionSubmission, SteerSharedSessionMessageInput, SubmitSharedSessionMessageInput } from '../control-plane/index.js';
2
2
  import type { RequestSharedApprovalInput } from '../control-plane/index.js';
3
3
  import type { PermissionPromptDecision } from '../permissions/prompt.js';
4
4
  import { type AuthInspectionSnapshot } from './auth/inspection.js';
@@ -22,15 +22,30 @@ export interface OperatorSessionsClient {
22
22
  list(limit?: number): readonly SharedSessionRecord[];
23
23
  get(sessionId: string): SharedSessionRecord | null;
24
24
  messages(sessionId: string, limit?: number): readonly SharedSessionMessage[];
25
- inputs(sessionId: string, limit?: number): readonly SharedSessionInputRecord[];
25
+ inputs(sessionId: string, limit?: number, options?: {
26
+ readonly state?: string | undefined;
27
+ readonly since?: number | undefined;
28
+ }): readonly SharedSessionInputRecord[];
26
29
  ensureSession(input?: OperatorSessionEnsureInput): Promise<SharedSessionRecord>;
30
+ register(input: RegisterSharedSessionInput): Promise<SharedSessionRegisterResult>;
27
31
  close(sessionId: string): Promise<SharedSessionRecord | null>;
28
32
  reopen(sessionId: string): Promise<SharedSessionRecord | null>;
33
+ /** Detach a surface's participant/route from a session without closing it
34
+ * (detach != close != kill). Idempotent; see sessions.detach. */
35
+ detach(sessionId: string, surfaceId: string): Promise<SharedSessionRecord | null>;
36
+ /** Permanently remove a session (W5-S1: delete != close). Requires the
37
+ * session already closed — see sessions.delete. */
38
+ delete(sessionId: string): Promise<'deleted' | 'not-found' | 'active'>;
29
39
  bindAgent(sessionId: string, agentId: string): Promise<SharedSessionRecord | null>;
30
40
  submitMessage(input: SubmitSharedSessionMessageInput): Promise<SharedSessionSubmission>;
31
41
  steerMessage(input: SteerSharedSessionMessageInput): Promise<SharedSessionSubmission>;
32
42
  followUpMessage(input: SubmitSharedSessionMessageInput): Promise<SharedSessionSubmission>;
33
43
  cancelInput(sessionId: string, inputId: string): Promise<SharedSessionInputRecord | null>;
44
+ /** A live surface marks a collected input delivered (`consumed:false`) or
45
+ * consumed/completed (`consumed:true`). See sessions.inputs.deliver. */
46
+ deliverInput(sessionId: string, inputId: string, options?: {
47
+ readonly consumed?: boolean | undefined;
48
+ }): Promise<SharedSessionInputRecord | null>;
34
49
  }
35
50
  export interface OperatorTasksClient {
36
51
  snapshot(): UiTasksSnapshot;
@@ -49,6 +64,9 @@ export interface OperatorApprovalsClient {
49
64
  readonly actor: string;
50
65
  readonly actorSurface?: string | undefined;
51
66
  readonly note?: string | undefined;
67
+ /** Optional per-hunk selection (edit-tool approvals) — the broker filters
68
+ * the approval's own edit list to these indices server-side. */
69
+ readonly selectedHunks?: readonly number[] | undefined;
52
70
  }): Promise<SharedApprovalRecord | null>;
53
71
  approve(approvalId: string, actor: string, actorSurface?: string, note?: string): Promise<SharedApprovalRecord | null>;
54
72
  deny(approvalId: string, actor: string, actorSurface?: string, note?: string): Promise<SharedApprovalRecord | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"operator-client.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/operator-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,+BAA+B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAA+B,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAChG,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,KAAK,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAAE,s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H,MAAM,WAAW,uBAAuB;IACtC,OAAO,IAAI,SAAS,MAAM,EAAE,CAAC;IAC7B,gBAAgB,IAAI,OAAO,CAAC,SAAS,uBAAuB,EAAE,CAAC,CAAC;IAChE,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IAC7E,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;IACzE,QAAQ,IAAI,OAAO,CAAC,yBAAyB,CAAC,CAAC;IAC/C,eAAe,IAAI,OAAO,CAAC,uBAAuB,CAAC,CAAC;IACpD,cAAc,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACnD;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,IAAI,4BAA4B,CAAC;IACzC,YAAY,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,uBAAuB,EAAE,CAAC;CAClE;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,sBAAsB,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,mBAAmB,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,uBAAuB,CAAC;IAC5C,QAAQ,CAAC,YAAY,EAAE,0BAA0B,CAAC;IAClD,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,gBAAgB,CAAC;CACvC;AAeD,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,sBAAsB,GAAG,cAAc,CA2HrF"}
@@ -18,15 +18,25 @@ export function createOperatorClient(services) {
18
18
  list: (limit = 100) => services.sessionBroker.listSessions(normalizeLimit(limit)),
19
19
  get: (sessionId) => services.sessionBroker.getSession(sessionId),
20
20
  messages: (sessionId, limit = 100) => services.sessionBroker.getMessages(sessionId, normalizeLimit(limit)),
21
- inputs: (sessionId, limit = 100) => services.sessionBroker.getInputs(sessionId, normalizeLimit(limit)),
21
+ inputs: (sessionId, limit = 100, options) => (options && (options.state !== undefined || options.since !== undefined))
22
+ ? services.sessionBroker.getInputsSince(sessionId, {
23
+ ...(options.state !== undefined ? { state: options.state } : {}),
24
+ ...(options.since !== undefined ? { since: options.since } : {}),
25
+ limit: normalizeLimit(limit),
26
+ })
27
+ : services.sessionBroker.getInputs(sessionId, normalizeLimit(limit)),
22
28
  ensureSession: (input = {}) => services.sessionBroker.ensureSession(input),
29
+ register: (input) => services.sessionBroker.register(input),
23
30
  close: (sessionId) => services.sessionBroker.closeSession(sessionId),
24
31
  reopen: (sessionId) => services.sessionBroker.reopenSession(sessionId),
32
+ detach: (sessionId, surfaceId) => services.sessionBroker.detachParticipant(sessionId, surfaceId),
33
+ delete: (sessionId) => services.sessionBroker.deleteSession(sessionId),
25
34
  bindAgent: (sessionId, agentId) => services.sessionBroker.bindAgent(sessionId, agentId),
26
35
  submitMessage: (input) => services.sessionBroker.submitMessage(input),
27
36
  steerMessage: (input) => services.sessionBroker.steerMessage(input),
28
37
  followUpMessage: (input) => services.sessionBroker.followUpMessage(input),
29
38
  cancelInput: (sessionId, inputId) => services.sessionBroker.cancelInput(sessionId, inputId),
39
+ deliverInput: (sessionId, inputId, options = {}) => services.sessionBroker.markInputDelivered(sessionId, inputId, options),
30
40
  };
31
41
  const tasks = {
32
42
  snapshot: () => services.readModels.tasks.getSnapshot(),
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/provider-accounts/registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B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AAG,aAAa,GAAG,KAAK,GAAG,YAAY,CAAC,CAAC;IACvG,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;CACtD;AAwCD,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAwOlC"}
@@ -43,7 +43,17 @@ function determineSubscriptionFreshness(expiresAt) {
43
43
  export async function buildProviderAccountSnapshot(deps) {
44
44
  const providerRegistry = deps.providerRegistry;
45
45
  const allModels = providerRegistry.listModels();
46
- const currentModel = providerRegistry.getCurrentModel?.();
46
+ // Read-only display path: an unresolved current model (e.g. a fresh isolated
47
+ // home whose pricing catalog has not hydrated, leaving the configured default
48
+ // with no materialized definition) must not turn this snapshot into a 500. Fall
49
+ // back to "no active provider" instead of letting getCurrentModel() throw.
50
+ let currentModel;
51
+ try {
52
+ currentModel = providerRegistry.getCurrentModel?.();
53
+ }
54
+ catch {
55
+ currentModel = undefined;
56
+ }
47
57
  const apiKeys = await resolveApiKeys(deps.secretsManager);
48
58
  const subscriptions = deps.subscriptionManager;
49
59
  const builtinSubscriptionProviders = new Set(listBuiltinSubscriptionProviders().map((entry) => entry.provider));
@@ -23,6 +23,7 @@ import { WorkspaceCheckpointManager } from '../workspace/checkpoint/index.js';
23
23
  import { MemoryRegistry } from '../state/memory-registry.js';
24
24
  import { MemoryStore } from '../state/memory-store.js';
25
25
  import { CodeIndexStore } from '../state/code-index-store.js';
26
+ import { CodeIndexReindexScheduler } from '../state/code-index-reindex.js';
26
27
  import type { RuntimeEventBus } from './events/index.js';
27
28
  import type { DomainDispatch, RuntimeStore } from './store/index.js';
28
29
  import { DistributedRuntimeManager } from './remote/distributed-runtime-manager.js';
@@ -80,15 +81,14 @@ export interface RuntimeServicesOptions {
80
81
  readonly panelManager?: PanelManagerLike | undefined;
81
82
  readonly keybindingsManager?: KeybindingsManagerLike | undefined;
82
83
  /**
83
- * Opt-in: kick off the repo source-tree code index's initial build
84
- * (Wave-5 wo802, W5.3 Stage A) right after construction. Fire-and-forget —
85
- * never awaited here, never blocks this call. Defaults to false/undefined
86
- * so constructing RuntimeServices never surprises a caller (including the
87
- * many test fixtures that build RuntimeServices against a real directory)
88
- * with an unrequested full source-tree walk. A real product entry point
89
- * (an interactive session bootstrap) should pass `true`.
84
+ * Opt-in: kick off the repo source-tree code index's initial build (Wave-5
85
+ * wo802, W5.3 Stage A) right after construction. Fire-and-forget — never
86
+ * awaited, never blocks. Defaults off so building RuntimeServices never runs
87
+ * an unrequested source-tree walk. Real interactive entry points pass `true`.
90
88
  */
91
89
  readonly autoStartCodeIndex?: boolean | undefined;
90
+ /** Override the broker store path (default: home-scoped durable store). */
91
+ readonly sessionStorePath?: string | undefined;
92
92
  }
93
93
  export interface RuntimeServices {
94
94
  readonly workingDirectory: string;
@@ -130,6 +130,8 @@ export interface RuntimeServices {
130
130
  * surprising for embedders that never asked for it.
131
131
  */
132
132
  readonly codeIndexStore: CodeIndexStore;
133
+ /** Wave-5 Stage B tool-site incremental reindex scheduler (bound to codeIndexStore). */
134
+ readonly codeIndexReindexScheduler: CodeIndexReindexScheduler;
133
135
  readonly serviceRegistry: ServiceRegistry;
134
136
  readonly secretsManager: SecretsManager;
135
137
  readonly subscriptionManager: SubscriptionManager;
@@ -1 +1 @@
1
- {"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../../../src/platform/runtime/services.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAwB,MAAM,wBAAwB,CAAC;AAC5G,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,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AAiB,CAAC;IAC9C,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;;;;OAQG;IACH,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAClD,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC;;;;;;;;;OASG;IACH,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,0BAA0B,EAAE,0BAA0B,CAAC;IAChE,QAAQ,CAAC,kBAAkB,EAAE,wBAAwB,CAAC;IACtD;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,WAAW,CAAC,EACjE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,YAAY,CAAC,GACvD,MAAM,IAAI,CAOZ;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,sBAAsB,GAAG,eAAe,CAkkBtF"}
@@ -8,7 +8,7 @@ import { SubscriptionManager } from '../config/subscriptions.js';
8
8
  import { AutomationDeliveryManager, AutomationManager, AutomationRouteStore } from '../automation/index.js';
9
9
  import { ChannelPluginRegistry, ChannelPolicyManager, RouteBindingManager, SurfaceRegistry } from '../channels/index.js';
10
10
  import { ChannelDeliveryRouter } from '../channels/delivery-router.js';
11
- import { ApprovalBroker, GatewayMethodCatalog, SharedSessionBroker } from '../control-plane/index.js';
11
+ import { ApprovalBroker, GatewayMethodCatalog, SharedSessionBroker, registerW3S2GatewayMethods } from '../control-plane/index.js';
12
12
  import { buildSharedSessionAgentSpawnRoutingInput } from '../control-plane/session-intents.js';
13
13
  import { WatcherRegistry } from '../watchers/index.js';
14
14
  import { ArtifactStore } from '../artifacts/index.js';
@@ -28,6 +28,7 @@ import { WorkspaceCheckpointManager } from '../workspace/checkpoint/index.js';
28
28
  import { MemoryRegistry } from '../state/memory-registry.js';
29
29
  import { MemoryStore } from '../state/memory-store.js';
30
30
  import { CodeIndexStore } from '../state/code-index-store.js';
31
+ import { CodeIndexReindexScheduler } from '../state/code-index-reindex.js';
31
32
  import { createDomainDispatch } from './store/index.js';
32
33
  import { DistributedRuntimeManager } from './remote/distributed-runtime-manager.js';
33
34
  import { RemoteRunnerRegistry, RemoteSupervisor } from './remote/index.js';
@@ -206,8 +207,9 @@ export function createRuntimeServices(options) {
206
207
  const approvalBroker = new ApprovalBroker({
207
208
  storePath: shellPaths.resolveProjectPath(surfaceRoot, 'control-plane', 'approvals.json'),
208
209
  });
210
+ // ONE home-scoped durable session store; project is DATA on each record.
209
211
  const sessionBroker = new SharedSessionBroker({
210
- storePath: shellPaths.resolveProjectPath(surfaceRoot, 'control-plane', 'sessions.json'),
212
+ storePath: options.sessionStorePath ?? shellPaths.resolveUserPath('control-plane', 'sessions.json'),
211
213
  routeBindings,
212
214
  agentStatusProvider: agentManager,
213
215
  messageSender: agentMessageBus,
@@ -238,6 +240,15 @@ export function createRuntimeServices(options) {
238
240
  if (options.autoStartCodeIndex) {
239
241
  codeIndexStore.scheduleBuild();
240
242
  }
243
+ // Wave-5 Stage B: tool-site incremental reindex. Gated on the SDK's autoStartCodeIndex opt-in
244
+ // (this library's storage.codeIndexEnabled analog) AND the built-state check inside the
245
+ // scheduler — an unbuilt index is a no-op either way.
246
+ const codeInjectionSettingEnabled = () => options.autoStartCodeIndex === true;
247
+ const codeIndexReindexScheduler = new CodeIndexReindexScheduler({
248
+ target: codeIndexStore,
249
+ workingDirectory,
250
+ isEnabled: codeInjectionSettingEnabled,
251
+ });
241
252
  const deliveryManager = new AutomationDeliveryManager({
242
253
  configManager,
243
254
  secretsManager,
@@ -449,6 +460,9 @@ export function createRuntimeServices(options) {
449
460
  remoteRunnerRegistry,
450
461
  knowledgeService,
451
462
  memoryRegistry,
463
+ codeIndex: codeIndexStore,
464
+ isCodeInjectionSettingEnabled: codeInjectionSettingEnabled,
465
+ codeIndexReindexScheduler,
452
466
  archetypeLoader,
453
467
  configManager,
454
468
  providerRegistry,
@@ -477,8 +491,7 @@ export function createRuntimeServices(options) {
477
491
  const pricing = providerRegistry.getCostFromCatalog(model);
478
492
  return (usage.inputTokens * pricing.input + usage.outputTokens * pricing.output) / 1_000_000;
479
493
  };
480
- // Orchestration engine (Wave 4, wo701) — ships alongside wrfcController,
481
- // untouched by this change. See the RuntimeServices interface comment.
494
+ // Orchestration engine (Wave 4, wo701) — ships alongside wrfcController, untouched by this change. See the RuntimeServices interface comment.
482
495
  const orchestrationEngine = createOrchestrationEngine({
483
496
  agentManager,
484
497
  configManager,
@@ -506,6 +519,7 @@ export function createRuntimeServices(options) {
506
519
  priceUsage,
507
520
  codeIndexService: codeIndexStore,
508
521
  });
522
+ registerW3S2GatewayMethods(gatewayMethods, { processRegistry, workspaceCheckpointManager, sessionBroker }); // W3-S2 (routes/register-w3-s2.ts)
509
523
  return {
510
524
  workingDirectory,
511
525
  homeDirectory,
@@ -535,6 +549,7 @@ export function createRuntimeServices(options) {
535
549
  memoryStore,
536
550
  memoryRegistry,
537
551
  codeIndexStore,
552
+ codeIndexReindexScheduler,
538
553
  serviceRegistry,
539
554
  secretsManager,
540
555
  subscriptionManager,
@@ -0,0 +1,234 @@
1
+ /**
2
+ * client.ts — the SDK session-spine surface client.
3
+ *
4
+ * The in-process coordinator that mirrors a surface's OWN session identity
5
+ * (create / resume / heartbeat / close) into the daemon-hosted session spine.
6
+ * It sits NEXT TO a surface's local session truth, never replacing it: the local
7
+ * store stays the offline read-model; this client mirrors identity to the daemon
8
+ * and buffers ops when the daemon is unreachable.
9
+ *
10
+ * This is the ONE core extracted from two near-twin implementations — the TUI's
11
+ * typed-client version (`goodvibes-tui` src/runtime/session-spine-client.ts) and
12
+ * the agent's raw-REST version (`goodvibes-agent` src/runtime/session-spine-client.ts).
13
+ * The union of their behaviors is the spec; their differences are parameterized:
14
+ *
15
+ * - TRANSPORT is injected. The core builds a canonical
16
+ * {@link RegisterSharedSessionInput} and hands it to an injected
17
+ * {@link SpineTransport}; the adapter performs the real wire call (a typed SDK
18
+ * sessions client, or a hand-rolled version-tolerant REST mirror) and folds its
19
+ * result into a {@link SpineResult}. The core NEVER assumes a typed client
20
+ * exists — that is exactly why the agent, which compiles against a pinned npm
21
+ * SDK that may predate `sessions.register`, can still use this core.
22
+ * - ACTIVATION MODE is optional. Construct WITH a `transport` for
23
+ * live-immediately mode (the agent — live for the whole process lifetime), or
24
+ * WITHOUT one for dormant-until-`activate()` mode (the TUI — activated once its
25
+ * bootstrap adopts a compatible external daemon, deactivated when the mode is
26
+ * lost).
27
+ * - PARTICIPANT identity, origin `kind`, queue bound and heartbeat window are
28
+ * options with the verified defaults.
29
+ *
30
+ * Discipline (load-bearing for the interactive-latency budget):
31
+ * - Every public method (register / reopen / heartbeat / close /
32
+ * foldLegacyRecords) is fire-and-forget: it returns `void` SYNCHRONOUSLY and
33
+ * never throws into the caller, even when the wire call rejects. Session
34
+ * start/resume/heartbeat never block the render or turn path.
35
+ * - Before a transport is attached every op is queued, never dropped-on-the-floor
36
+ * and never attempted over a transport that does not exist. Attaching flushes
37
+ * the backlog.
38
+ * - Offline ops go into a bounded ring (drop-oldest); flush is idempotent because
39
+ * register is an upsert.
40
+ * - Heartbeat is debounced/coalesced to at most one wire call per window and omits
41
+ * the title so it never renames a titled session.
42
+ * - A timer-driven keepalive fires the heartbeat on a fixed cadence INDEPENDENT of
43
+ * render/turn activity, so a live-but-idle surface keeps its participant
44
+ * lastSeenAt fresh and never falls outside the daemon's freshness/reaper windows.
45
+ */
46
+ import { logger } from '../../utils/logger.js';
47
+ import type { RegisterSharedSessionInput, SharedSessionKind, SharedSessionParticipant } from '../../control-plane/index.js';
48
+ /**
49
+ * The canonical TUI participant (TRANSPORT axis). Pass as the `participant` option
50
+ * when the surface is the operator terminal UI.
51
+ */
52
+ export declare const TUI_SPINE_PARTICIPANT: Omit<SharedSessionParticipant, 'lastSeenAt'>;
53
+ /**
54
+ * The canonical agent participant (TRANSPORT axis). `surfaceKind` stays 'service';
55
+ * the record origin `kind` ('agent') is stamped by the REST mirror server-side, not
56
+ * here — so the agent leaves `recordKind` unset.
57
+ */
58
+ export declare const AGENT_SPINE_PARTICIPANT: Omit<SharedSessionParticipant, 'lastSeenAt'>;
59
+ /** Honest reachability posture derived from this client's own wire attempts. */
60
+ export type SpineReachability = 'unknown' | 'online' | 'offline';
61
+ /**
62
+ * Outcome of a single injected-transport op, folding the two real backends' result
63
+ * vocabularies into one common core:
64
+ * - `'ok'` — the daemon applied it. Reachability → online; flush the queue.
65
+ * - `'offline'` — a transient connectivity fault (host unreachable). Reachability
66
+ * → offline; enqueue for idempotent replay on reconnect.
67
+ * - `'rejected'` — a DURABLE refusal (auth required / route missing / server error).
68
+ * NOT a connectivity fault: logged, NEVER enqueued (so it can't
69
+ * retry-forever), reachability left unchanged.
70
+ */
71
+ export type SpineOutcome = 'ok' | 'offline' | 'rejected';
72
+ export interface SpineResult {
73
+ readonly outcome: SpineOutcome;
74
+ readonly error?: string | undefined;
75
+ }
76
+ /**
77
+ * The injected async transport. Structurally satisfied by a thin adapter over the
78
+ * SDK's typed HTTP sessions client (TUI) or over a hand-rolled REST mirror (agent).
79
+ * The core only ever calls these two methods and reads the folded {@link SpineResult}.
80
+ */
81
+ export interface SpineTransport {
82
+ register(input: RegisterSharedSessionInput): Promise<SpineResult>;
83
+ close(sessionId: string): Promise<SpineResult>;
84
+ }
85
+ export interface SessionSpineRecord {
86
+ readonly sessionId: string;
87
+ readonly project: string;
88
+ readonly title?: string | undefined;
89
+ readonly userId?: string | undefined;
90
+ }
91
+ type SpineLogger = Pick<typeof logger, 'debug' | 'info'>;
92
+ export interface SessionSpineClientOptions {
93
+ /**
94
+ * The participant identity stamped onto every register/heartbeat (TRANSPORT axis).
95
+ * Required — each surface passes its own (e.g. {@link TUI_SPINE_PARTICIPANT} /
96
+ * {@link AGENT_SPINE_PARTICIPANT}).
97
+ */
98
+ readonly participant: Omit<SharedSessionParticipant, 'lastSeenAt'>;
99
+ /**
100
+ * Attach the transport at construction for LIVE-IMMEDIATELY mode (the agent is
101
+ * live for the whole process lifetime). Omit for DORMANT-UNTIL-`activate()` mode
102
+ * (the TUI activates once its bootstrap adopts a compatible external daemon).
103
+ */
104
+ readonly transport?: SpineTransport | undefined;
105
+ /**
106
+ * Origin record `kind` stamped into every built input. The TUI stamps `'tui'`;
107
+ * the agent leaves it unset (its REST mirror stamps `'agent'` server-side).
108
+ */
109
+ readonly recordKind?: SharedSessionKind | undefined;
110
+ /**
111
+ * Optional reachability probe backing {@link SessionSpineClient.probeReachability}
112
+ * (the agent's deferred-startup GET /status). Returns true when the host answered.
113
+ * Omitted for the TUI (whose reachability rides its wire calls). Runs OFF the
114
+ * interactive path.
115
+ */
116
+ readonly probe?: (() => Promise<boolean>) | undefined;
117
+ readonly now?: () => number;
118
+ readonly queueLimit?: number;
119
+ readonly heartbeatMinIntervalMs?: number;
120
+ readonly log?: SpineLogger;
121
+ }
122
+ export declare class SessionSpineClient {
123
+ private readonly participant;
124
+ private readonly recordKind;
125
+ private readonly probeImpl;
126
+ private readonly now;
127
+ private readonly queueLimit;
128
+ private readonly heartbeatMinIntervalMs;
129
+ private readonly log;
130
+ private transport;
131
+ private reachability;
132
+ private readonly records;
133
+ private readonly queue;
134
+ private lastHeartbeatAt;
135
+ private heartbeatTimer;
136
+ private flushing;
137
+ /** The most recently registered/reopened session — the keepalive heartbeat target. */
138
+ private lastSessionId;
139
+ /**
140
+ * Timer-driven keepalive: fires the heartbeat on a fixed cadence INDEPENDENT of
141
+ * render/turn activity, so a live-but-render-silent surface keeps its participant
142
+ * lastSeenAt fresh. Each tick is just a heartbeat() call, so it rides the SAME
143
+ * bounded offline-queue/reconnect handling as every other op — no new retry loop,
144
+ * no faster-than-cadence attempts against a dead daemon.
145
+ */
146
+ private keepaliveTimer;
147
+ constructor(options: SessionSpineClientOptions);
148
+ /** Honest reachability: 'unknown' until a wire call resolves, then online/offline. */
149
+ status(): SpineReachability;
150
+ /** Whether a transport is currently attached. */
151
+ get active(): boolean;
152
+ /** Current bounded offline-queue depth (for diagnostics / tests). */
153
+ get pendingOps(): number;
154
+ /** The session the keepalive heartbeat currently targets (diagnostics/tests). */
155
+ get keepaliveSessionId(): string | null;
156
+ /**
157
+ * The CANONICAL "which wire rows are mine" set: every sessionId this client
158
+ * has register()/reopen()'d and not yet close()'d, regardless of whatever id
159
+ * a caller's own local store separately uses for the same conceptual
160
+ * session. register()/reopen() send exactly the `sessionId` the caller
161
+ * passes in — this client never assumes that string also matches a local
162
+ * broker's own idea of the session's id. A cross-surface read facade (the
163
+ * SDK's SessionUnionCache) uses this to recognize its own wire mirror by
164
+ * the id ACTUALLY SENT, not by hoping a local reader's id happens to agree.
165
+ */
166
+ get mirroredSessionIds(): ReadonlySet<string>;
167
+ /**
168
+ * DORMANT-MODE activation: attach the transport once a compatible external daemon
169
+ * has been adopted. Flushes anything queued while dormant, starts the keepalive.
170
+ * Reachability stays 'unknown' until the first wire call resolves.
171
+ */
172
+ activate(transport: SpineTransport): void;
173
+ /**
174
+ * Detach the transport (daemon mode resolved to non-external, or was lost). Ops
175
+ * continue to be queued (bounded, drop-oldest) rather than dropped.
176
+ */
177
+ deactivate(reason: string): void;
178
+ /** CREATE: fire-and-forget initial registration (title stamped once). */
179
+ register(record: SessionSpineRecord): void;
180
+ /** RESUME: fire-and-forget reopen (reopen:true, no title) — the only reopen path. */
181
+ reopen(record: SessionSpineRecord): void;
182
+ /**
183
+ * HEARTBEAT: debounced re-register, coalesced to one wire call per window, no title,
184
+ * no reopen. Safe to call on every turn/render tick — internally a no-op unless the
185
+ * window has elapsed.
186
+ */
187
+ heartbeat(sessionId: string): void;
188
+ /** CLOSE: best-effort, fire-and-forget; tolerate a racing daemon stop. */
189
+ close(sessionId: string): void;
190
+ /**
191
+ * LEGACY FOLD: register each per-project record; a record whose id is in `closedIds`
192
+ * is registered then closed so a locally-closed session STAYS closed in the daemon
193
+ * (honest history). Idempotent — register is an upsert; closing an already-closed
194
+ * record is a no-op.
195
+ */
196
+ foldLegacyRecords(records: readonly SessionSpineRecord[], closedIds: ReadonlySet<string>): void;
197
+ /** Reachability probe — runs OFF the interactive path (deferred startup). Flushes on
198
+ * success. A no-op returning the current status when no `probe` option was supplied. */
199
+ probeReachability(): Promise<SpineReachability>;
200
+ /** Clears the pending heartbeat + keepalive timers; call on shutdown. */
201
+ dispose(): void;
202
+ private startKeepalive;
203
+ private stopKeepalive;
204
+ private cacheHeartbeatRecord;
205
+ private buildInput;
206
+ private withFreshLastSeen;
207
+ private dispatchRegister;
208
+ private runRegister;
209
+ private runClose;
210
+ private enqueue;
211
+ private flush;
212
+ }
213
+ export interface FoldLegacySpineStoreOptions {
214
+ readonly storePath: string;
215
+ readonly markerPath: string;
216
+ readonly project: string;
217
+ readonly now?: () => number;
218
+ readonly log?: SpineLogger;
219
+ }
220
+ export interface FoldLegacySpineStoreResult {
221
+ readonly folded: number;
222
+ readonly skipped: boolean;
223
+ }
224
+ /**
225
+ * Reads a surface's OWN project-scoped control-plane sessions.json and folds each
226
+ * record into the daemon via the client (register upsert; closed records also
227
+ * closed). Writes a marker file so subsequent runs are a no-op. Register is
228
+ * idempotent, so even a marker-less re-run is safe. Only folds the store for the
229
+ * project it is invoked from — the per-project discovery scope is documented, not
230
+ * silently "complete" across every project a surface has ever run in.
231
+ */
232
+ export declare function foldLegacySpineStore(client: Pick<SessionSpineClient, 'foldLegacyRecords'>, options: FoldLegacySpineStoreOptions): FoldLegacySpineStoreResult;
233
+ export {};
234
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/platform/runtime/session-spine/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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