@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
@@ -8,7 +8,8 @@ import type { AdaptivePlanner } from './adaptive-planner.js';
8
8
  import type { ExecutionPlanManager } from './execution-plan.js';
9
9
  import type { SessionMemoryStore } from './session-memory.js';
10
10
  import type { FavoritesStore } from '../providers/favorites.js';
11
- import type { TurnKnowledgeRegistrySource } from '../agents/turn-knowledge-injection.js';
11
+ import type { TurnKnowledgeRegistrySource, TurnCodeIndexSource } from '../agents/turn-knowledge-injection.js';
12
+ import type { CodeIndexReindexScheduler } from '../state/code-index-reindex.js';
12
13
  export type OrchestratorCoreServices = {
13
14
  configManager?: Pick<ConfigManager, 'get' | 'getCategory' | 'getWorkingDirectory'> | undefined;
14
15
  providerRegistry?: ProviderRegistry | undefined;
@@ -29,6 +30,25 @@ export type OrchestratorCoreServices = {
29
30
  * time.
30
31
  */
31
32
  memoryRegistry?: TurnKnowledgeRegistrySource | undefined;
33
+ /**
34
+ * Wave-5 Stage B code-index injection seam for the MAIN interactive session. Optional/
35
+ * undefined is a hard no-op (memory-only injection, base prompt byte-identical). Whether code
36
+ * hits are actually injected is additionally gated by the `agent-passive-code-injection`
37
+ * feature flag (DEFAULT OFF) and `isCodeInjectionSettingEnabled` below — both must hold.
38
+ */
39
+ codeIndex?: TurnCodeIndexSource | undefined;
40
+ /**
41
+ * Live gate for the embedder's storage.codeIndexEnabled setting. Undefined defaults to
42
+ * "allowed" — the feature flag alone then governs. ANDed with the flag each turn so a runtime
43
+ * toggle of either takes effect without reconstructing the orchestrator.
44
+ */
45
+ isCodeInjectionSettingEnabled?: (() => boolean) | undefined;
46
+ /**
47
+ * Wave-5 Stage B tool-site reindex scheduler. Optional/undefined is a hard no-op. When wired,
48
+ * a successful write/edit tool call schedules a debounced incremental reindex of the touched
49
+ * path(s) (never blocking the tool result).
50
+ */
51
+ codeIndexReindexScheduler?: Pick<CodeIndexReindexScheduler, 'onToolExecuted'> | undefined;
32
52
  };
33
53
  export declare function normalizeUsage(usage: Awaited<ReturnType<LLMProvider['chat']>>['usage']): Awaited<ReturnType<LLMProvider['chat']>>['usage'];
34
54
  export declare function estimateFreshTurnInputTokens(lastInputTokens: number, currentEstimatedTokens: number, text: string, content?: ContentPart[]): number;
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/core/orchestrator-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAA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AE,GACtB,MAAM,CAqBR;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,wBAAwB,EAClC,0BAA0B,EAAE,qBAAqB,GAChD,qBAAqB,CAEvB;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,wBAAwB,EAClC,qBAAqB,EAAE,gBAAgB,GACtC,gBAAgB,CAElB;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,wBAAwB,GACjC,IAAI,CAAC,aAAa,EAAE,KAAK,GAAG,aAAa,GAAG,qBAAqB,CAAC,CAKpE;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,wBAAwB,GAAG,gBAAgB,CAK5F;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,wBAAwB,EAClC,oBAAoB,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,GACxD,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,CAErC;AAED,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,GACb,OAAO,8BAA8B,EAAE,cAAc,CAMvD"}
@@ -19,6 +19,13 @@ export type ToolExecutionDeps = {
19
19
  runtimeBus: RuntimeEventBus | null;
20
20
  sessionId: string;
21
21
  emitterContext: EmitterContextFactory;
22
+ /**
23
+ * Wave-5 Stage B: called once per executed tool with (toolName, resolved args, success) so a
24
+ * code-index reindex scheduler can debounce an incremental reindex of touched files. Invoked
25
+ * for BOTH success and failure (the scheduler no-ops on failure); never awaited — it must not
26
+ * block the tool-result path.
27
+ */
28
+ onToolExecuted?: ((toolName: string, args: Record<string, unknown>, success: boolean) => void) | undefined;
22
29
  };
23
30
  export declare function executeToolCalls(deps: ToolExecutionDeps, turnId: string, calls: ToolCall[]): Promise<ToolResult[]>;
24
31
  export type ReconciliationDeps = {
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator-tool-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/core/orchestrator-tool-runtime.ts"],"names":[],"mapp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AAO,8BAA8B,EAAE,cAAc,GAAG,IAAW,EACnF,WAAW,GAAE,IAAI,CAAC,oBAAoB,EAAE,YAAY,CAAC,GAAG,IAAW,GAClE,MAAM,EAAE,CA4GV"}
@@ -246,6 +246,16 @@ export async function executeToolCalls(deps, turnId, calls) {
246
246
  // leave result as-is
247
247
  }
248
248
  }
249
+ if (deps.onToolExecuted) {
250
+ // Fire-and-forget: the scheduler only records a debounce timer; it must never block the
251
+ // tool-result path. Args are the ones actually executed (post-permission modification).
252
+ try {
253
+ deps.onToolExecuted(call.name, checkResult.modifiedArgs ?? call.arguments, result.success === true);
254
+ }
255
+ catch (err) {
256
+ logger.warn('onToolExecuted hook error', { tool: call.name, error: summarizeError(err) });
257
+ }
258
+ }
249
259
  results.push(result);
250
260
  }
251
261
  return results;
@@ -13,7 +13,7 @@ import type { ModelDefinition } from '../providers/registry.js';
13
13
  import type { FavoritesStore } from '../providers/favorites.js';
14
14
  import type { AgentManager } from '../tools/agent/index.js';
15
15
  import type { ExecutionPlanManager } from './execution-plan.js';
16
- import { type TurnInjectionRecord, type TurnKnowledgeRegistrySource } from '../agents/turn-knowledge-injection.js';
16
+ import { type TurnInjectionRecord, type TurnKnowledgeRegistrySource, type TurnCodeIndexSource } from '../agents/turn-knowledge-injection.js';
17
17
  interface HookDispatcherLike {
18
18
  fire(event: HookEvent): Promise<HookResult>;
19
19
  }
@@ -73,6 +73,13 @@ export interface OrchestratorTurnLoopContext {
73
73
  readonly isPassiveKnowledgeInjectionEnabled: () => boolean;
74
74
  readonly passiveKnowledgeInjectionBudgetTokens?: number | undefined;
75
75
  readonly passiveKnowledgeInjectionRelevanceFloor?: number | undefined;
76
+ /**
77
+ * Wave-5 Stage B — repo code index for the main session's per-turn injection. Undefined is a
78
+ * hard no-op. `isPassiveCodeInjectionEnabled` resolves the combined gate (flag AND setting);
79
+ * both it and the source must be present for code hits to be considered this turn.
80
+ */
81
+ readonly codeIndex?: TurnCodeIndexSource | undefined;
82
+ readonly isPassiveCodeInjectionEnabled: () => boolean;
76
83
  /**
77
84
  * The main session has no spawn-time `AgentRecord.knowledgeInjections` baseline, so this
78
85
  * starts empty and grows monotonically for the life of the Orchestrator — no record is
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator-turn-loop.d.ts","sourceRoot":"","sources":["../../../src/platform/core/orchestrator-turn-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAe,MAAM,2BAA2B,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAc/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAShE,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EACjC,MAAM,uCAAuC,CAAC;AAc/C,UAAU,kBAAkB;IAC1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C7E,wFAAwF;IACxF,QAAQ,CAAC,yBAAyB,EAAE,MAAM,MAAM,CAAC;CAClD;AAED,wBAAsB,2BAA2B,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqerG"}
@@ -165,6 +165,10 @@ export async function executeOrchestratorTurnLoop(context) {
165
165
  }
166
166
  if (turnBudgetTokens > 0) {
167
167
  const relevanceFloor = context.passiveKnowledgeInjectionRelevanceFloor ?? DEFAULT_TURN_KNOWLEDGE_RELEVANCE_FLOOR;
168
+ // Stage B: code hits share this turn's SAME budget/floor. Gated on the separate
169
+ // (default-off) code-injection flag AND the embedder's storage.codeIndexEnabled
170
+ // setting, both folded into isPassiveCodeInjectionEnabled by the orchestrator.
171
+ const codeInjectionEnabled = !!context.codeIndex && context.isPassiveCodeInjectionEnabled();
168
172
  const { block, record: turnInjectionRecord } = buildPerTurnKnowledgeInjection({
169
173
  memoryRegistry: context.memoryRegistry,
170
174
  // The main session has no frozen "task" distinct from the live conversation —
@@ -179,6 +183,8 @@ export async function executeOrchestratorTurnLoop(context) {
179
183
  relevanceFloor,
180
184
  alreadyInjectedIds: context.getAlreadyInjectedKnowledgeIds(),
181
185
  turn: context.nextTurnKnowledgeSequence(),
186
+ codeIndex: context.codeIndex,
187
+ codeInjectionEnabled,
182
188
  });
183
189
  turnKnowledgeBlock = block;
184
190
  if (turnInjectionRecord.injectedIds.length > 0) {
@@ -316,6 +316,12 @@ export declare class Orchestrator {
316
316
  * wired in, matching {@link isReconciliationEnabled}'s convention.
317
317
  */
318
318
  private isPassiveKnowledgeInjectionEnabled;
319
+ /**
320
+ * Stage B code injection is opt-in: the `agent-passive-code-injection` flag defaults OFF
321
+ * (so a null flagManager means OFF, unlike the memory flag above), AND the embedder's
322
+ * storage.codeIndexEnabled setting must be on. Both are re-read per turn.
323
+ */
324
+ private isPassiveCodeInjectionEnabled;
319
325
  /**
320
326
  * Wave-5 (wo805): ids never to re-surface in a later per-turn knowledge block. The main
321
327
  * session has no spawn-time `AgentRecord.knowledgeInjections` baseline, so this starts
@@ -1 +1 @@
1
- {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../../src/platform/core/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAG7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAMpD,OAAO,EACL,KAAK,wBAAwB,EAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAK9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAmBnF,OAAO,EASL,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AAOnC,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,uCAAuC,CAAC;AAE/C,sFAAsF;AACtF,UAAU,kBAAkB;IAC1B,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC7C;AAMD,UAAU,4BAA4B;IACpC,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;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OAWG;IACH,OAAO,CAAC,kCAAkC;IAK1C;;;;OAIG;IACH,OAAO,CAAC,6BAA6B;IAMrC;;;;OAIG;IACH,OAAO,CAAC,8BAA8B;IAItC,wFAAwF;IACxF,OAAO,CAAC,uBAAuB;IAI/B,sGAAsG;IACtG,OAAO,CAAC,4BAA4B;IAIpC,wGAAwG;IACxG,OAAO,CAAC,yBAAyB;IAIjC;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,4BAA4B;YAetB,gBAAgB;CAa/B"}
@@ -536,6 +536,8 @@ export class Orchestrator {
536
536
  isPassiveKnowledgeInjectionEnabled: () => this.isPassiveKnowledgeInjectionEnabled(),
537
537
  passiveKnowledgeInjectionBudgetTokens: this.passiveKnowledgeInjectionBudgetTokens,
538
538
  passiveKnowledgeInjectionRelevanceFloor: this.passiveKnowledgeInjectionRelevanceFloor,
539
+ codeIndex: this.coreServices.codeIndex,
540
+ isPassiveCodeInjectionEnabled: () => this.isPassiveCodeInjectionEnabled(),
539
541
  getAlreadyInjectedKnowledgeIds: () => this.getAlreadyInjectedKnowledgeIds(),
540
542
  addInjectedKnowledgeIds: (ids) => { this.addInjectedKnowledgeIds(ids); },
541
543
  recordTurnKnowledgeInjection: (record) => { this.recordTurnKnowledgeInjection(record); },
@@ -731,6 +733,16 @@ export class Orchestrator {
731
733
  return true;
732
734
  return this.flagManager.isEnabled('agent-passive-knowledge-injection');
733
735
  }
736
+ /**
737
+ * Stage B code injection is opt-in: the `agent-passive-code-injection` flag defaults OFF
738
+ * (so a null flagManager means OFF, unlike the memory flag above), AND the embedder's
739
+ * storage.codeIndexEnabled setting must be on. Both are re-read per turn.
740
+ */
741
+ isPassiveCodeInjectionEnabled() {
742
+ const flagOn = this.flagManager?.isEnabled('agent-passive-code-injection') ?? false;
743
+ const settingOn = this.coreServices.isCodeInjectionSettingEnabled?.() ?? true;
744
+ return flagOn && settingOn;
745
+ }
734
746
  /**
735
747
  * Wave-5 (wo805): ids never to re-surface in a later per-turn knowledge block. The main
736
748
  * session has no spawn-time `AgentRecord.knowledgeInjections` baseline, so this starts
@@ -785,6 +797,9 @@ export class Orchestrator {
785
797
  runtimeBus: this.runtimeBus,
786
798
  sessionId: this.sessionId,
787
799
  emitterContext: (id) => createEmitterContext(this.sessionId, id),
800
+ onToolExecuted: this.coreServices.codeIndexReindexScheduler
801
+ ? (toolName, args, success) => this.coreServices.codeIndexReindexScheduler.onToolExecuted(toolName, args, success)
802
+ : undefined,
788
803
  }, turnId, calls);
789
804
  }
790
805
  }
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Agent-driven goal decomposition for the planner.
3
+ *
4
+ * This module is the model-decomposition counterpart to the deterministic
5
+ * heuristic path in `plan-proposal.ts`. Given a goal, it drives a bounded,
6
+ * READ-ONLY planning agent (through the injected `DecompositionRunner` seam —
7
+ * this module never imports the agent machinery, so it stays in `core` and is
8
+ * fully unit-testable with a stubbed runner), parses and STRICTLY validates
9
+ * the agent's structured output, and produces a `PlanProposal` tagged with
10
+ * honest provenance.
11
+ *
12
+ * Failure honesty is the whole point: a spawn error, a timeout/cancellation,
13
+ * or output that is still malformed after ONE repair attempt all fall back to
14
+ * the existing heuristic `singleItemProposal` path, tagged
15
+ * `decomposedBy: 'heuristic'` with a `fallbackReason`. The heuristic path is
16
+ * reused verbatim — `singleItemProposal`/`assemblePlanProposal` are never
17
+ * modified — so their existing byte-for-byte test expectations are preserved;
18
+ * provenance is layered on afterward.
19
+ *
20
+ * The module NEVER performs surgery on agent output to force it to validate:
21
+ * a proposal is accepted only when `assemblePlanProposal` reports ZERO issues
22
+ * (no dangling dependency, no dependency cycle, no unresolved phase). Anything
23
+ * short of that is one repair attempt and then an honest fallback — never a
24
+ * silent edit that drops or rewrites the agent's work items.
25
+ */
26
+ import { AdaptivePlanner } from './adaptive-planner.js';
27
+ import type { PlannerInputs, DecompositionGate } from './adaptive-planner.js';
28
+ import { type PlanProposal, type PlanProposalIssue, type RawDecomposition, type DecompositionAgentUsage } from './plan-proposal.js';
29
+ /** A phase in the agent's decomposition. Optional across the contract — items
30
+ * may share an implicit single phase. */
31
+ export interface DecompositionAgentPhase {
32
+ title: string;
33
+ description?: string;
34
+ }
35
+ /**
36
+ * A single work item in the agent's decomposition.
37
+ *
38
+ * `ordinal` fixes a stable execution order independent of array position.
39
+ * `dependsOn` entries may be either other items' titles or their ordinals
40
+ * (as a number or numeric string) — both are resolved to titles before the
41
+ * proposal is assembled.
42
+ */
43
+ export interface DecompositionAgentItem {
44
+ title: string;
45
+ brief: string;
46
+ ordinal: number;
47
+ phase?: string;
48
+ dependsOn?: Array<string | number>;
49
+ suggestedArchetype?: string;
50
+ likelyFiles?: string[];
51
+ verification?: string[];
52
+ canRunConcurrently?: boolean;
53
+ needsReview?: boolean;
54
+ }
55
+ /** The full JSON object a planning agent emits. */
56
+ export interface DecompositionAgentOutput {
57
+ phases?: DecompositionAgentPhase[];
58
+ items: DecompositionAgentItem[];
59
+ /** Extra explicit edges; `{from, to}` reads "from depends on to". */
60
+ dependencies?: Array<{
61
+ from: string | number;
62
+ to: string | number;
63
+ }>;
64
+ notes?: string[];
65
+ risks?: string[];
66
+ }
67
+ /** Hard bounds on a planning-agent run. */
68
+ export interface DecompositionBounds {
69
+ /** Maximum agent turns before the run is stopped. */
70
+ maxTurns: number;
71
+ /** Total token budget; exceeding it stops the run. */
72
+ tokenCeiling: number;
73
+ /** Wall-clock timeout in ms; exceeding it cancels the run. */
74
+ wallTimeoutMs: number;
75
+ }
76
+ export interface DecompositionRunnerRequest {
77
+ goal: string;
78
+ workingDir: string;
79
+ systemPrompt: string;
80
+ userPrompt: string;
81
+ bounds: DecompositionBounds;
82
+ /** Which attempt this is; `'repair'` prompts include prior validation errors. */
83
+ attempt: 'initial' | 'repair';
84
+ }
85
+ /**
86
+ * Terminal status of a planning-agent run.
87
+ * - `completed` — the agent finished and produced final output text.
88
+ * - `cancelled` — the run was stopped: an external kill, the wall-clock
89
+ * timeout firing, or the token ceiling being crossed all collapse to this.
90
+ * - `failed` — the agent could not be spawned or errored mid-run.
91
+ */
92
+ export type DecompositionRunStatus = 'completed' | 'cancelled' | 'failed';
93
+ export interface DecompositionRunResult {
94
+ status: DecompositionRunStatus;
95
+ /** The agent's final output text (empty when it never produced any). */
96
+ output: string;
97
+ usage?: DecompositionAgentUsage | undefined;
98
+ elapsedMs: number;
99
+ /** Error detail for `failed`, or a stop detail for `cancelled` (e.g. 'wall-timeout'). */
100
+ detail?: string | undefined;
101
+ agentId?: string | undefined;
102
+ }
103
+ export interface DecompositionRunner {
104
+ run(request: DecompositionRunnerRequest): Promise<DecompositionRunResult>;
105
+ }
106
+ export interface DecomposeGoalConstraints {
107
+ /** Concurrency capacity the plan should respect, if the caller set one. */
108
+ capacity?: number | undefined;
109
+ /** Dollar budget for the workstream, if the caller set one. */
110
+ budgetUsd?: number | undefined;
111
+ }
112
+ export interface DecomposeGoalRequest {
113
+ goal: string;
114
+ workingDir: string;
115
+ constraints?: DecomposeGoalConstraints | undefined;
116
+ /** Optional free-form user context handed to the planning agent. */
117
+ userContext?: string | undefined;
118
+ }
119
+ export interface DecompositionServiceConfig {
120
+ mode: 'agent' | 'heuristic';
121
+ bounds: DecompositionBounds;
122
+ }
123
+ /** An honest, machine-readable record of how a decomposition resolved. */
124
+ export type DecompositionOutcome = {
125
+ kind: 'agent';
126
+ itemCount: number;
127
+ repaired: boolean;
128
+ usage?: DecompositionAgentUsage | undefined;
129
+ costUsd?: number | undefined;
130
+ elapsedMs: number;
131
+ } | {
132
+ kind: 'heuristic-configured';
133
+ } | {
134
+ kind: 'gate-declined';
135
+ reasonCode: DecompositionGate['reasonCode'];
136
+ } | {
137
+ kind: 'fallback';
138
+ reason: string;
139
+ usage?: DecompositionAgentUsage | undefined;
140
+ elapsedMs?: number | undefined;
141
+ };
142
+ export interface DecomposeGoalDeps {
143
+ /** Optional token→dollars estimator; when absent, `agentCostUsd` stays undefined. */
144
+ estimateCostUsd?: ((usage: DecompositionAgentUsage) => number | undefined) | undefined;
145
+ /** Optional honest-event sink, invoked exactly once per decomposition. */
146
+ onOutcome?: ((outcome: DecompositionOutcome) => void) | undefined;
147
+ }
148
+ export interface DecomposeGoalResult {
149
+ proposal: PlanProposal;
150
+ gate: DecompositionGate;
151
+ issues: PlanProposalIssue[];
152
+ outcome: DecompositionOutcome;
153
+ }
154
+ export interface ParsedDecomposition {
155
+ ok: boolean;
156
+ raw?: RawDecomposition | undefined;
157
+ notes?: string[] | undefined;
158
+ errors: string[];
159
+ }
160
+ /**
161
+ * Parse + strictly validate a planning agent's output text into a
162
+ * `RawDecomposition` the assembler can consume. Never throws; every problem is
163
+ * accumulated into `errors` so a single repair prompt can address them all at
164
+ * once. Structural rejects: unparseable JSON, empty/absent items array, empty
165
+ * item title/brief, non-finite ordinal, empty phase title.
166
+ */
167
+ export declare function parseDecomposition(text: string): ParsedDecomposition;
168
+ /**
169
+ * Map a validated `DecompositionAgentOutput` into the `RawDecomposition` shape
170
+ * `assemblePlanProposal` consumes. Items are ordered by `ordinal` (stable on
171
+ * ties). Every referenced phase is materialized so the assembler never has to
172
+ * synthesize an "Unphased" bucket — an unresolved phase from here would be a
173
+ * real bug, not agent sloppiness. Ordinal-based dependency references are
174
+ * resolved to titles so the assembler's title resolver handles them uniformly.
175
+ */
176
+ export declare function toRawDecomposition(output: DecompositionAgentOutput): RawDecomposition;
177
+ /**
178
+ * Build the system prompt for the read-only planning agent. It is explicit
179
+ * about the exact JSON contract and about the read-only posture (the agent's
180
+ * tool set already excludes write/edit/exec; this reinforces intent).
181
+ */
182
+ export declare function buildPlannerSystemPrompt(): string;
183
+ /**
184
+ * Decompose a goal into a `PlanProposal`, honestly tagged with provenance.
185
+ *
186
+ * Control flow:
187
+ * 1. `config.mode === 'heuristic'` → the configured heuristic path (no agent).
188
+ * 2. The planner's decompose gate declines → honest single-item (no agent).
189
+ * 3. No runner available → heuristic fallback (reason: no runtime).
190
+ * 4. Agent path: run → parse → strict-validate → (assemble; issues===0 ?
191
+ * accept : ONE repair attempt) → accept-or-fallback. Spawn error,
192
+ * cancellation (kill / wall-timeout / token ceiling), or still-invalid
193
+ * output after repair all fall back to the heuristic path with a reason.
194
+ */
195
+ export declare function decomposeGoal(request: DecomposeGoalRequest, planner: AdaptivePlanner, inputs: PlannerInputs, config: DecompositionServiceConfig, runner: DecompositionRunner | null, deps?: DecomposeGoalDeps): Promise<DecomposeGoalResult>;
196
+ //# sourceMappingURL=plan-decomposition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plan-decomposition.d.ts","sourceRoot":"","sources":["../../../src/platform/core/plan-decomposition.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAM5B;0CAC0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,mDAAmD;AACnD,MAAM,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