@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
@@ -73,7 +73,25 @@ export type WorkItemState = 'pending' | 'awaiting-capacity'
73
73
  * carries the human-readable reason for as long as the item stays blocked
74
74
  * (cleared the moment it reclaims a slot).
75
75
  */
76
- | 'blocked-budget';
76
+ | 'blocked-budget'
77
+ /**
78
+ * Recoverable, not terminal — the item cannot be claimed yet because at
79
+ * least one of its `dependsOn` items has not reached 'passed'. This is a
80
+ * REFUSE-not-kill gate (BIG-3 item 2): the item sits here, out of the
81
+ * claimable waiting set (computeClaims excludes it), until the engine's
82
+ * per-tick dependency pre-pass (applyDependencyGates, engine.ts) finds every
83
+ * dependency passed and flips it back to 'pending'. `blockedReason` is
84
+ * recomputed every tick so it stays honest as dependencies change:
85
+ * - `waiting on: <titles>` while dependencies are still pending/running,
86
+ * - `dependency failed: <titles>` once a dependency has terminally failed.
87
+ * A FAILED dependency does NOT terminally fail the dependent — it stays here,
88
+ * recoverable: if that dependency is later retried (engine.retryItem) and
89
+ * passes, the next tick clears this block and the item proceeds. Only ever
90
+ * set on an item that has not started yet (no phase has run); once an item's
91
+ * dependencies are all passed at its first claim they stay passed (passed is
92
+ * terminal), so a mid-pipeline item is never re-gated.
93
+ */
94
+ | 'blocked-dependency';
77
95
  /** Token/cost usage rolled up across every agent this work-item has ever spawned. */
78
96
  export interface WorkItemUsage {
79
97
  readonly inputTokens: number;
@@ -88,6 +106,22 @@ export interface WorkItemUsage {
88
106
  readonly costState: 'priced' | 'unpriced' | 'estimated';
89
107
  }
90
108
  export declare function emptyWorkItemUsage(): WorkItemUsage;
109
+ /**
110
+ * Combine two usage rollups into one running total. The SINGLE canonical merge
111
+ * used everywhere a WorkItemUsage is accumulated — the phase-runner (folding a
112
+ * completed phase into an item), the engine (same, at the phase boundary), and
113
+ * the fleet rollup adapters (overlaying live in-flight usage onto committed
114
+ * totals). Keeping one implementation is what makes the rollup MONOTONE in
115
+ * presence: every count is summed (counts only grow) and a cost is retained
116
+ * via `??` whenever either operand carries one, so once a real token or cost
117
+ * value has appeared the merged result can never regress to absent/`null`
118
+ * (DEBT-4 item 2 — "updating" is a state, never a data wipe).
119
+ *
120
+ * Cost state stays honest rather than optimistic: 'priced' only when BOTH
121
+ * operands are priced; 'unpriced' only when NEITHER carries a cost; any mix is
122
+ * 'estimated' — a real partial sum, explicitly flagged as incomplete.
123
+ */
124
+ export declare function mergeWorkItemUsage(a: WorkItemUsage, b: WorkItemUsage): WorkItemUsage;
91
125
  /**
92
126
  * One unit of pipeline work. `visits` bounds re-review cycles the same way
93
127
  * WrfcController.retryTransportFailure/evaluateConstraints cap fix attempts —
@@ -97,6 +131,18 @@ export interface WorkItem {
97
131
  readonly id: string;
98
132
  title: string;
99
133
  readonly task: string;
134
+ /**
135
+ * IDs of the sibling work items this item depends on (BIG-3 item 2). The
136
+ * item is not claimable until EVERY id here refers to an item that has
137
+ * reached 'passed'; until then it sits in 'blocked-dependency' with an
138
+ * honest `blockedReason`. Empty (the common case) ⇒ no dependency gate, the
139
+ * item is claimable as soon as capacity and budget allow. Populated from a
140
+ * PlanProposal's resolved `dependsOn` by `fromPlanProposal`
141
+ * (proposal-workstream.ts); the assembly asserts these reference real items
142
+ * and form no cycle. JSON-safe (a plain string[]), so it serializes with the
143
+ * work item unchanged.
144
+ */
145
+ dependsOn: string[];
100
146
  /** The phase this item is currently queued for or running in; null once terminal. */
101
147
  currentPhaseId: string | null;
102
148
  state: WorkItemState;
@@ -117,16 +163,102 @@ export interface WorkItem {
117
163
  failureReason?: string | undefined;
118
164
  /** Set only while state === 'blocked-budget'; cleared the instant the item reclaims a slot. See the 'blocked-budget' state doc for recovery semantics. */
119
165
  blockedReason?: string | undefined;
166
+ /**
167
+ * Non-fatal bookkeeping notes accrued while the item PASSED its phases — e.g.
168
+ * a scoped commit that could not complete (DEBT-4 item 1). Warnings NEVER
169
+ * change the item's terminal status (that derives only from phase outcomes
170
+ * plus the explicit negating set, see bookkeeping.ts); they make a
171
+ * passed-with-caveats outcome legible instead of hiding it — or, worse,
172
+ * misreporting a genuinely-passed item as failed.
173
+ */
174
+ warnings?: string[] | undefined;
175
+ /**
176
+ * Absolute path to this item's isolated git worktree (worktree mode only).
177
+ * Set at first claim, cleared once the worktree is removed. Retained on a
178
+ * KEPT worktree (merge conflict, or a dirty tree after fail/kill) so the
179
+ * terminal summary and events can name exactly where the unmerged work lives.
180
+ */
181
+ worktreePath?: string | undefined;
182
+ /** The item's branch name inside its worktree (worktree mode only), e.g. `ws/<wsShort>/<itemShort>`. */
183
+ worktreeBranch?: string | undefined;
184
+ /**
185
+ * Integration state of the item branch relative to the base branch (worktree
186
+ * mode). `'pending'` from the moment the passed item enters the integration
187
+ * lane until its merge resolves; `'merged'` (with {@link mergeHash} set) on a
188
+ * clean merge; `'conflict'` when the lane could not merge it — the worktree is
189
+ * then KEPT and `blockedReason` carries `merge-conflict: <files>`.
190
+ */
191
+ mergeState?: ItemMergeState | undefined;
192
+ /** The merge commit hash recorded on a clean integration (mergeState === 'merged'). */
193
+ mergeHash?: string | undefined;
194
+ /**
195
+ * True when this item's worktree was deliberately KEPT rather than removed —
196
+ * a merge conflict, or a dirty tree left after fail/kill (data safety, rule
197
+ * 4). A kept worktree still lives at {@link worktreePath} for inspection.
198
+ */
199
+ worktreeKept?: boolean | undefined;
120
200
  }
121
201
  export interface WorkItemSpec {
122
202
  readonly id?: string | undefined;
123
203
  readonly title: string;
124
204
  readonly task: string;
205
+ /**
206
+ * IDs of other items in the SAME workstream this item depends on (BIG-3
207
+ * item 2). Omitted/empty ⇒ no dependency gate. Every id must match another
208
+ * item's id in the same CreateWorkstreamInput; `fromPlanProposal` asserts
209
+ * this (and acyclicity) at assembly, and the engine gates the claim path on
210
+ * it (see the 'blocked-dependency' state doc).
211
+ */
212
+ readonly dependsOn?: readonly string[] | undefined;
125
213
  }
214
+ /**
215
+ * Where a workstream's item phases run their file changes.
216
+ *
217
+ * - `shared` (DEFAULT): every item's phases run their agents in the ONE shared
218
+ * `projectRoot` working tree and scoped-commit straight onto its branch, as
219
+ * the engine has always behaved. Two items editing the same file serialize
220
+ * only by luck of scheduling — full behavioral back-compat, every pre-existing
221
+ * test passes untouched.
222
+ * - `worktree`: at first claim each item gets its own git worktree branched
223
+ * from the base branch (see IsolatedWorktree, worktree.ts). Its phases commit
224
+ * onto the item branch INSIDE that worktree, so concurrent items never touch
225
+ * each other's working tree. When an item terminates passed its branch is
226
+ * merged back into the base branch through a single sequential integration
227
+ * lane (completion order). See the engine's WorktreeIsolationManager.
228
+ */
229
+ export type WorkstreamIsolation = 'shared' | 'worktree';
230
+ /**
231
+ * The integration state of an item's isolated worktree branch relative to the
232
+ * base branch (worktree mode only; absent/`'n-a'` in shared mode). Distinct
233
+ * from WorkItemState (the pipeline state): an item can be terminally `passed`
234
+ * while its merge is still `pending` in the integration lane, or `conflict`
235
+ * after the lane hit an unmergeable branch.
236
+ */
237
+ export type ItemMergeState = 'n-a' | 'pending' | 'merged' | 'conflict';
126
238
  export interface BudgetCeiling {
127
239
  readonly maxTokens?: number | undefined;
128
240
  readonly maxCostUsd?: number | undefined;
129
241
  }
242
+ /**
243
+ * Workstream-level provenance (BIG-3 item 1) — honest, machine-readable record
244
+ * of where a workstream's items came from when it was assembled from an
245
+ * approved PlanProposal by `fromPlanProposal` (proposal-workstream.ts). Absent
246
+ * on workstreams built the compat way (`fromChainSpec`) or authored directly.
247
+ * Carried through serialization and surfaced in status/fleet so a resumed or
248
+ * observed workstream reports its origin without guessing.
249
+ */
250
+ export interface WorkstreamProvenance {
251
+ /** Whether a read-only planning agent decomposed the goal, or the heuristic single-item path did. Mirrors PlanProposal.decomposedBy. */
252
+ readonly decomposedBy?: 'agent' | 'heuristic' | undefined;
253
+ /** The id of the PlanProposal this workstream was assembled from. */
254
+ readonly proposalId?: string | undefined;
255
+ /** The proposal's execution strategy label (e.g. 'parallel', 'sequential'), for display. */
256
+ readonly strategy?: string | undefined;
257
+ /** Estimated dollar cost of the planning-agent decomposition run, when priced. */
258
+ readonly agentCostUsd?: number | undefined;
259
+ /** Wall-clock time the planning agent ran, in ms (when the agent path ran). */
260
+ readonly elapsedMs?: number | undefined;
261
+ }
130
262
  export interface Workstream {
131
263
  readonly id: string;
132
264
  title: string;
@@ -141,6 +273,20 @@ export interface Workstream {
141
273
  * an unrelated sibling to complete first.
142
274
  */
143
275
  budget?: BudgetCeiling | undefined;
276
+ /**
277
+ * Where item phases run their file changes (see {@link WorkstreamIsolation}).
278
+ * Absent is treated as `'shared'` everywhere — the default that preserves
279
+ * full behavioral back-compat. Persisted with the workstream and surfaced in
280
+ * events, so a resumed or observed workstream reports its isolation honestly.
281
+ */
282
+ readonly isolation?: WorkstreamIsolation | undefined;
283
+ /**
284
+ * Where this workstream's items came from (BIG-3 item 1). Set only when the
285
+ * workstream was assembled from an approved PlanProposal via
286
+ * `fromPlanProposal`; absent for compat/`fromChainSpec` or hand-authored
287
+ * workstreams. Persisted and surfaced for honest origin reporting.
288
+ */
289
+ readonly provenance?: WorkstreamProvenance | undefined;
144
290
  readonly createdAt: number;
145
291
  }
146
292
  /** Outcome of running a phase's configured gates for one item. */
@@ -161,6 +307,31 @@ export interface CommitExclusion {
161
307
  readonly excludedPaths: readonly string[];
162
308
  readonly skipped: boolean;
163
309
  }
310
+ /**
311
+ * Honest record of the scoped-commit bookkeeping step that runs AFTER a
312
+ * phase's gate has already passed (see phase-runner.ts commitPhaseWork). The
313
+ * commit is a POST-gate step: its outcome never decides whether the phase
314
+ * passed — the gate already did that — it only reports what happened to the
315
+ * working tree afterward, so the fleet and transcript can state "committed
316
+ * <hash>" or "commit skipped/failed" without ever contradicting the phase
317
+ * verdict (DEBT-4 item 1). Present on a PhaseResult only when the gate passed
318
+ * and a commit was therefore attempted or deliberately skipped.
319
+ */
320
+ export interface PhaseCommitOutcome {
321
+ readonly status: 'committed' | 'skipped' | 'failed';
322
+ /** The landed commit hash, present only for status 'committed'. */
323
+ readonly hash?: string | undefined;
324
+ /** Human-readable detail for 'skipped'/'failed', plus any gitignored-path note on 'committed'. */
325
+ readonly reason?: string | undefined;
326
+ /**
327
+ * True ONLY for a 'failed' commit whose failure belongs to the NEGATING SET —
328
+ * a bookkeeping failure (workspace/index corruption) that genuinely
329
+ * invalidates the phase's passed work. A negating commit failure is the one
330
+ * post-gate condition that DOES fail the item; every other commit failure is
331
+ * a non-fatal warning on a passed item. See bookkeeping.ts for the set.
332
+ */
333
+ readonly negating?: boolean | undefined;
334
+ }
164
335
  /**
165
336
  * The resume-cache unit, keyed (itemId,phaseId). On resume, every
166
337
  * (itemId,phaseId) present in a snapshot's completedResults is hydrated
@@ -177,6 +348,12 @@ export interface PhaseResult {
177
348
  readonly usage: WorkItemUsage;
178
349
  /** Present only when a scoped commit excluded launch-dirty residue (see CommitExclusion). */
179
350
  readonly commitExclusion?: CommitExclusion | undefined;
351
+ /**
352
+ * Outcome of the post-gate scoped-commit step (DEBT-4 item 1). Present only
353
+ * when this phase's gate passed and a commit was attempted or deliberately
354
+ * skipped; absent for a failed/cancelled phase (no commit is reached).
355
+ */
356
+ readonly commit?: PhaseCommitOutcome | undefined;
180
357
  }
181
358
  /** Snapshot shape written to .goodvibes/orchestration/<workstreamId>.json. */
182
359
  export interface WorkstreamSnapshot {
@@ -219,12 +396,41 @@ export type OrchestrationEvent = {
219
396
  readonly type: 'item-passed';
220
397
  readonly workstreamId: string;
221
398
  readonly itemId: string;
399
+ readonly warnings?: readonly string[] | undefined;
222
400
  } | {
223
401
  readonly type: 'item-failed';
224
402
  readonly workstreamId: string;
225
403
  readonly itemId: string;
226
404
  readonly reason: string;
227
405
  }
406
+ /**
407
+ * Dependency-gating lifecycle (BIG-3 item 2). `item-blocked-dependency`
408
+ * fires once per NEW block (not every idle tick), naming the unmet
409
+ * dependencies by id in `deps` and carrying the current human-readable
410
+ * `reason` ('waiting on: …' or 'dependency failed: …'). `item-dependency-cleared`
411
+ * fires when a previously-blocked item's dependencies all reach passed and it
412
+ * is released back to the claimable set. `item-retried` fires when a
413
+ * terminally-failed item is deliberately reset to re-run via engine.retryItem
414
+ * — the documented recovery path that lets a failed dependency (and its
415
+ * stuck dependents) recover.
416
+ */
417
+ | {
418
+ readonly type: 'item-blocked-dependency';
419
+ readonly workstreamId: string;
420
+ readonly itemId: string;
421
+ readonly phaseId: string;
422
+ readonly reason: string;
423
+ readonly deps: readonly string[];
424
+ } | {
425
+ readonly type: 'item-dependency-cleared';
426
+ readonly workstreamId: string;
427
+ readonly itemId: string;
428
+ } | {
429
+ readonly type: 'item-retried';
430
+ readonly workstreamId: string;
431
+ readonly itemId: string;
432
+ readonly reason: string;
433
+ }
228
434
  /** Emitted once per item on `importWorkstream` for every item reconciled from a crash-artifact 'in-phase' snapshot back to 'pending' — see the 'in-phase' state doc. */
229
435
  | {
230
436
  readonly type: 'item-requeued';
@@ -235,6 +441,85 @@ export type OrchestrationEvent = {
235
441
  readonly type: 'workstream-persisted';
236
442
  readonly workstreamId: string;
237
443
  }
444
+ /**
445
+ * Worktree-isolation lifecycle events (worktree mode only). Each names the
446
+ * item and, where relevant, the on-disk worktree path and branch so an
447
+ * observer (TUI, transcript) can report isolation + merge state honestly and
448
+ * point at KEPT worktrees for inspection. None of these ever fire in shared
449
+ * mode.
450
+ */
451
+ | {
452
+ readonly type: 'item-worktree-created';
453
+ readonly workstreamId: string;
454
+ readonly itemId: string;
455
+ readonly path: string;
456
+ readonly branch: string;
457
+ }
458
+ /** A passed item's branch merged cleanly into the base branch through the integration lane. */
459
+ | {
460
+ readonly type: 'item-merged';
461
+ readonly workstreamId: string;
462
+ readonly itemId: string;
463
+ readonly branch: string;
464
+ readonly hash: string;
465
+ }
466
+ /**
467
+ * The integration lane could not merge a passed item's branch — the base
468
+ * merge conflicted. The worktree + branch are KEPT (never auto-resolved,
469
+ * never silently dropped); the lane continues with the next item.
470
+ */
471
+ | {
472
+ readonly type: 'item-merge-conflict';
473
+ readonly workstreamId: string;
474
+ readonly itemId: string;
475
+ readonly branch: string;
476
+ readonly path: string;
477
+ readonly files: readonly string[];
478
+ }
479
+ /** An item's worktree + branch were removed (merged item, or a clean tree after fail/kill). */
480
+ | {
481
+ readonly type: 'item-worktree-removed';
482
+ readonly workstreamId: string;
483
+ readonly itemId: string;
484
+ readonly path: string;
485
+ }
486
+ /**
487
+ * An item's worktree was deliberately KEPT rather than removed — a merge
488
+ * conflict, or a dirty tree left behind by a failed/killed item (data
489
+ * safety). `reason` states which; `path` is where the work still lives.
490
+ */
491
+ | {
492
+ readonly type: 'item-worktree-kept';
493
+ readonly workstreamId: string;
494
+ readonly itemId: string;
495
+ readonly path: string;
496
+ readonly reason: string;
497
+ }
498
+ /**
499
+ * A KEPT worktree was evicted (removed) to stay under the kept-worktree cap —
500
+ * oldest-first, and always announced (never a silent sweep). `path` is what
501
+ * was removed.
502
+ */
503
+ | {
504
+ readonly type: 'item-worktree-evicted';
505
+ readonly workstreamId: string;
506
+ readonly itemId: string;
507
+ readonly path: string;
508
+ }
509
+ /**
510
+ * Reconciliation of an orphaned `ws/*` worktree found at import (a crash
511
+ * artifact from a prior process). `disposition` is `'adopted'` when the
512
+ * engine re-attached it to a re-queued item, or `'reported'` when it belongs
513
+ * to no known item and was left in place for the operator (NEVER deleted on
514
+ * sight).
515
+ */
516
+ | {
517
+ readonly type: 'orphan-worktree-reconciled';
518
+ readonly workstreamId: string;
519
+ readonly path: string;
520
+ readonly branch: string;
521
+ readonly disposition: 'adopted' | 'reported';
522
+ }
238
523
  /**
239
524
  * Emitted once per engine instance (Wave 6, wo-F item 4), right after the
240
525
  * launch-time dirty-tree snapshot resolves, ONLY when it is non-empty.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/platform/orchestration/types.ts"],"names":[],"mappings":"AAAA,qFAAqF;AAErF;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAE1F,2EAA2E;AAC3E,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAEjG,2EAA2E;AAC3E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EAAE,CAAA;CAAE,CAAC;AAEjF,MAAM,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC"}
@@ -12,4 +12,36 @@ export function emptyWorkItemUsage() {
12
12
  costState: 'unpriced',
13
13
  };
14
14
  }
15
+ /**
16
+ * Combine two usage rollups into one running total. The SINGLE canonical merge
17
+ * used everywhere a WorkItemUsage is accumulated — the phase-runner (folding a
18
+ * completed phase into an item), the engine (same, at the phase boundary), and
19
+ * the fleet rollup adapters (overlaying live in-flight usage onto committed
20
+ * totals). Keeping one implementation is what makes the rollup MONOTONE in
21
+ * presence: every count is summed (counts only grow) and a cost is retained
22
+ * via `??` whenever either operand carries one, so once a real token or cost
23
+ * value has appeared the merged result can never regress to absent/`null`
24
+ * (DEBT-4 item 2 — "updating" is a state, never a data wipe).
25
+ *
26
+ * Cost state stays honest rather than optimistic: 'priced' only when BOTH
27
+ * operands are priced; 'unpriced' only when NEITHER carries a cost; any mix is
28
+ * 'estimated' — a real partial sum, explicitly flagged as incomplete.
29
+ */
30
+ export function mergeWorkItemUsage(a, b) {
31
+ const sawReasoning = a.reasoningTokens !== undefined || b.reasoningTokens !== undefined;
32
+ const bothPriced = a.costState === 'priced' && b.costState === 'priced';
33
+ const neitherPriced = a.costUsd === null && b.costUsd === null;
34
+ return {
35
+ inputTokens: a.inputTokens + b.inputTokens,
36
+ outputTokens: a.outputTokens + b.outputTokens,
37
+ cacheReadTokens: a.cacheReadTokens + b.cacheReadTokens,
38
+ cacheWriteTokens: a.cacheWriteTokens + b.cacheWriteTokens,
39
+ reasoningTokens: sawReasoning ? (a.reasoningTokens ?? 0) + (b.reasoningTokens ?? 0) : undefined,
40
+ llmCallCount: a.llmCallCount + b.llmCallCount,
41
+ turnCount: a.turnCount + b.turnCount,
42
+ toolCallCount: a.toolCallCount + b.toolCallCount,
43
+ costUsd: a.costUsd !== null && b.costUsd !== null ? a.costUsd + b.costUsd : (a.costUsd ?? b.costUsd),
44
+ costState: bothPriced ? 'priced' : neitherPriced ? 'unpriced' : 'estimated',
45
+ };
46
+ }
15
47
  export const CURRENT_WORKSTREAM_SCHEMA_VERSION = 1;
@@ -0,0 +1,33 @@
1
+ /** SDK-owned platform module. This implementation is maintained in goodvibes-sdk. */
2
+ import { type CommitWorkingTreeResult } from '../agents/worktree.js';
3
+ import type { OrchestrationEvent, WorkItem, Workstream } from './types.js';
4
+ export interface WorktreeIsolationManagerDeps {
5
+ readonly projectRoot: string;
6
+ readonly emit: (event: OrchestrationEvent) => void;
7
+ readonly now?: (() => number) | undefined;
8
+ /** Bounds how many KEPT (conflict/dirty) worktrees are retained before oldest-first eviction. Default 20. */
9
+ readonly keptWorktreeCap?: number | undefined;
10
+ }
11
+ export interface ItemWorktreeHandle {
12
+ readonly path: string;
13
+ commit(message: string, paths?: string[]): Promise<CommitWorkingTreeResult>;
14
+ }
15
+ export interface WorktreeIsolationManager {
16
+ /** Ensure this item has a dedicated worktree (idempotent — created once, at first claim). Only meaningful when workstream.isolation === 'worktree'. */
17
+ ensureWorktree(workstream: Workstream, item: WorkItem): Promise<ItemWorktreeHandle>;
18
+ /**
19
+ * Enqueue a just-passed item's branch onto the sequential integration lane.
20
+ * Resolves once THIS item's attempt (merged/conflict/empty) and any
21
+ * resulting cleanup has settled. Callers that don't need to wait may let
22
+ * the returned promise run fire-and-forget (errors are caught internally —
23
+ * this never rejects).
24
+ */
25
+ enqueueIntegration(workstream: Workstream, item: WorkItem): Promise<void>;
26
+ /** Fail/kill cleanup rule: remove the item's worktree if clean, else KEEP it (data safety). No-op if the item never got a worktree. Never throws. */
27
+ cleanupTerminated(workstream: Workstream, item: WorkItem): Promise<void>;
28
+ /** Synchronous orphan scan — see the module doc. Call once, right after registering an imported workstream, before start()/tick(). */
29
+ reconcileOrphans(workstream: Workstream): void;
30
+ }
31
+ export declare function itemWorktreeBranch(workstreamId: string, itemId: string): string;
32
+ export declare function createWorktreeIsolationManager(deps: WorktreeIsolationManagerDeps): WorktreeIsolationManager;
33
+ //# sourceMappingURL=worktree-isolation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree-isolation.d.ts","sourceRoot":"","sources":["../../../src/platform/orchestration/worktree-isolation.ts"],"names":[],"mappings":"AAAA,qFAAqF;AA+CrF,OAAO,EAAoB,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE3E,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1C,6GAA6G;IAC7G,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/C;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC7E;AAED,MAAM,WAAW,wBAAwB;IACvC,uJAAuJ;IACvJ,cAAc,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACpF;;;;;;OAMG;IACH,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1E,qJAAqJ;IACrJ,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,sIAAsI;IACtI,gBAAgB,CAAC,UAAU,EAA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