@pellux/goodvibes-sdk 0.38.0 → 1.1.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 (559) hide show
  1. package/dist/contracts/artifacts/operator-contract.json +4468 -916
  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/communication.d.ts +1 -1
  6. package/dist/events/surfaces.d.ts +25 -3
  7. package/dist/events/surfaces.d.ts.map +1 -1
  8. package/dist/events/surfaces.js +22 -1
  9. package/dist/events/workflows.d.ts +7 -6
  10. package/dist/events/workflows.d.ts.map +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/platform/agents/archetypes.d.ts.map +1 -1
  14. package/dist/platform/agents/archetypes.js +7 -0
  15. package/dist/platform/agents/index.d.ts +1 -0
  16. package/dist/platform/agents/index.d.ts.map +1 -1
  17. package/dist/platform/agents/index.js +1 -0
  18. package/dist/platform/agents/orchestrator-runner.d.ts +16 -3
  19. package/dist/platform/agents/orchestrator-runner.d.ts.map +1 -1
  20. package/dist/platform/agents/orchestrator-runner.js +20 -6
  21. package/dist/platform/agents/orchestrator.d.ts +42 -10
  22. package/dist/platform/agents/orchestrator.d.ts.map +1 -1
  23. package/dist/platform/agents/orchestrator.js +68 -20
  24. package/dist/platform/agents/planner-decomposition-runner.d.ts +38 -0
  25. package/dist/platform/agents/planner-decomposition-runner.d.ts.map +1 -0
  26. package/dist/platform/agents/planner-decomposition-runner.js +113 -0
  27. package/dist/platform/agents/turn-knowledge-injection.d.ts +88 -3
  28. package/dist/platform/agents/turn-knowledge-injection.d.ts.map +1 -1
  29. package/dist/platform/agents/turn-knowledge-injection.js +147 -30
  30. package/dist/platform/agents/worktree.d.ts +126 -8
  31. package/dist/platform/agents/worktree.d.ts.map +1 -1
  32. package/dist/platform/agents/worktree.js +240 -19
  33. package/dist/platform/agents/wrfc-controller.d.ts +24 -1
  34. package/dist/platform/agents/wrfc-controller.d.ts.map +1 -1
  35. package/dist/platform/agents/wrfc-controller.js +161 -35
  36. package/dist/platform/agents/wrfc-gate-runtime.d.ts +9 -0
  37. package/dist/platform/agents/wrfc-gate-runtime.d.ts.map +1 -1
  38. package/dist/platform/agents/wrfc-gate-runtime.js +7 -3
  39. package/dist/platform/agents/wrfc-gates.d.ts +1 -1
  40. package/dist/platform/agents/wrfc-gates.d.ts.map +1 -1
  41. package/dist/platform/agents/wrfc-gates.js +7 -1
  42. package/dist/platform/agents/wrfc-types.d.ts +23 -3
  43. package/dist/platform/agents/wrfc-types.d.ts.map +1 -1
  44. package/dist/platform/automation/types.d.ts +9 -1
  45. package/dist/platform/automation/types.d.ts.map +1 -1
  46. package/dist/platform/calendar/calendar-api-shared.d.ts +25 -0
  47. package/dist/platform/calendar/calendar-api-shared.d.ts.map +1 -0
  48. package/dist/platform/calendar/calendar-api-shared.js +100 -0
  49. package/dist/platform/calendar/calendar-connector.d.ts +79 -0
  50. package/dist/platform/calendar/calendar-connector.d.ts.map +1 -0
  51. package/dist/platform/calendar/calendar-connector.js +155 -0
  52. package/dist/platform/calendar/google-calendar-api.d.ts +25 -0
  53. package/dist/platform/calendar/google-calendar-api.d.ts.map +1 -0
  54. package/dist/platform/calendar/google-calendar-api.js +89 -0
  55. package/dist/platform/calendar/http-fetch-adapter.d.ts +25 -0
  56. package/dist/platform/calendar/http-fetch-adapter.d.ts.map +1 -0
  57. package/dist/platform/calendar/http-fetch-adapter.js +25 -0
  58. package/dist/platform/calendar/ics-parser.d.ts +35 -0
  59. package/dist/platform/calendar/ics-parser.d.ts.map +1 -0
  60. package/dist/platform/calendar/ics-parser.js +236 -0
  61. package/dist/platform/calendar/index.d.ts +41 -0
  62. package/dist/platform/calendar/index.d.ts.map +1 -0
  63. package/dist/platform/calendar/index.js +49 -0
  64. package/dist/platform/calendar/merged-calendar-model.d.ts +67 -0
  65. package/dist/platform/calendar/merged-calendar-model.d.ts.map +1 -0
  66. package/dist/platform/calendar/merged-calendar-model.js +181 -0
  67. package/dist/platform/calendar/microsoft-graph-api.d.ts +25 -0
  68. package/dist/platform/calendar/microsoft-graph-api.d.ts.map +1 -0
  69. package/dist/platform/calendar/microsoft-graph-api.js +95 -0
  70. package/dist/platform/calendar/oauth-flow.d.ts +62 -0
  71. package/dist/platform/calendar/oauth-flow.d.ts.map +1 -0
  72. package/dist/platform/calendar/oauth-flow.js +305 -0
  73. package/dist/platform/calendar/oauth-providers.d.ts +43 -0
  74. package/dist/platform/calendar/oauth-providers.d.ts.map +1 -0
  75. package/dist/platform/calendar/oauth-providers.js +120 -0
  76. package/dist/platform/calendar/oauth-token-store.d.ts +72 -0
  77. package/dist/platform/calendar/oauth-token-store.d.ts.map +1 -0
  78. package/dist/platform/calendar/oauth-token-store.js +189 -0
  79. package/dist/platform/calendar/oauth-types.d.ts +274 -0
  80. package/dist/platform/calendar/oauth-types.d.ts.map +1 -0
  81. package/dist/platform/calendar/oauth-types.js +22 -0
  82. package/dist/platform/calendar/rrule.d.ts +39 -0
  83. package/dist/platform/calendar/rrule.d.ts.map +1 -0
  84. package/dist/platform/calendar/rrule.js +261 -0
  85. package/dist/platform/calendar/subscription-store.d.ts +118 -0
  86. package/dist/platform/calendar/subscription-store.d.ts.map +1 -0
  87. package/dist/platform/calendar/subscription-store.js +293 -0
  88. package/dist/platform/calendar/types.d.ts +170 -0
  89. package/dist/platform/calendar/types.d.ts.map +1 -0
  90. package/dist/platform/calendar/types.js +21 -0
  91. package/dist/platform/companion/companion-chat-attachments.d.ts +29 -0
  92. package/dist/platform/companion/companion-chat-attachments.d.ts.map +1 -0
  93. package/dist/platform/companion/companion-chat-attachments.js +121 -0
  94. package/dist/platform/companion/companion-chat-branching.d.ts +66 -0
  95. package/dist/platform/companion/companion-chat-branching.d.ts.map +1 -0
  96. package/dist/platform/companion/companion-chat-branching.js +142 -0
  97. package/dist/platform/companion/companion-chat-broker-bridge.d.ts +40 -0
  98. package/dist/platform/companion/companion-chat-broker-bridge.d.ts.map +1 -0
  99. package/dist/platform/companion/companion-chat-broker-bridge.js +14 -0
  100. package/dist/platform/companion/companion-chat-broker-sync.d.ts +38 -0
  101. package/dist/platform/companion/companion-chat-broker-sync.d.ts.map +1 -0
  102. package/dist/platform/companion/companion-chat-broker-sync.js +80 -0
  103. package/dist/platform/companion/companion-chat-gc.d.ts +63 -0
  104. package/dist/platform/companion/companion-chat-gc.d.ts.map +1 -0
  105. package/dist/platform/companion/companion-chat-gc.js +38 -0
  106. package/dist/platform/companion/companion-chat-manager.d.ts +91 -23
  107. package/dist/platform/companion/companion-chat-manager.d.ts.map +1 -1
  108. package/dist/platform/companion/companion-chat-manager.js +195 -223
  109. package/dist/platform/companion/companion-chat-persistence.d.ts +9 -1
  110. package/dist/platform/companion/companion-chat-persistence.d.ts.map +1 -1
  111. package/dist/platform/companion/companion-chat-persistence.js +10 -2
  112. package/dist/platform/companion/companion-chat-routes.d.ts +2 -1
  113. package/dist/platform/companion/companion-chat-routes.d.ts.map +1 -1
  114. package/dist/platform/companion/companion-chat-routes.js +113 -4
  115. package/dist/platform/companion/companion-chat-turn-execution.d.ts +61 -0
  116. package/dist/platform/companion/companion-chat-turn-execution.d.ts.map +1 -0
  117. package/dist/platform/companion/companion-chat-turn-execution.js +107 -0
  118. package/dist/platform/companion/companion-chat-types.d.ts +67 -0
  119. package/dist/platform/companion/companion-chat-types.d.ts.map +1 -1
  120. package/dist/platform/config/credential-status.d.ts +28 -0
  121. package/dist/platform/config/credential-status.d.ts.map +1 -0
  122. package/dist/platform/config/credential-status.js +75 -0
  123. package/dist/platform/config/index.d.ts +25 -0
  124. package/dist/platform/config/index.d.ts.map +1 -1
  125. package/dist/platform/config/index.js +18 -0
  126. package/dist/platform/config/manager.d.ts +9 -0
  127. package/dist/platform/config/manager.d.ts.map +1 -1
  128. package/dist/platform/config/manager.js +21 -2
  129. package/dist/platform/config/migrations.d.ts +48 -0
  130. package/dist/platform/config/migrations.d.ts.map +1 -0
  131. package/dist/platform/config/migrations.js +54 -0
  132. package/dist/platform/config/schema-domain-core.d.ts +10 -1
  133. package/dist/platform/config/schema-domain-core.d.ts.map +1 -1
  134. package/dist/platform/config/schema-domain-core.js +46 -3
  135. package/dist/platform/config/schema-domain-runtime.d.ts +8 -0
  136. package/dist/platform/config/schema-domain-runtime.d.ts.map +1 -1
  137. package/dist/platform/config/schema-domain-runtime.js +32 -0
  138. package/dist/platform/config/schema-types.d.ts +21 -7
  139. package/dist/platform/config/schema-types.d.ts.map +1 -1
  140. package/dist/platform/config/schema.d.ts.map +1 -1
  141. package/dist/platform/config/schema.js +2 -0
  142. package/dist/platform/control-plane/approval-broker.d.ts +11 -0
  143. package/dist/platform/control-plane/approval-broker.d.ts.map +1 -1
  144. package/dist/platform/control-plane/approval-broker.js +17 -1
  145. package/dist/platform/control-plane/approval-hunk-apply.d.ts +77 -0
  146. package/dist/platform/control-plane/approval-hunk-apply.d.ts.map +1 -0
  147. package/dist/platform/control-plane/approval-hunk-apply.js +80 -0
  148. package/dist/platform/control-plane/gateway-disabled-response.d.ts +20 -0
  149. package/dist/platform/control-plane/gateway-disabled-response.d.ts.map +1 -0
  150. package/dist/platform/control-plane/gateway-disabled-response.js +24 -0
  151. package/dist/platform/control-plane/gateway-scope-enforcement.d.ts +68 -0
  152. package/dist/platform/control-plane/gateway-scope-enforcement.d.ts.map +1 -0
  153. package/dist/platform/control-plane/gateway-scope-enforcement.js +91 -0
  154. package/dist/platform/control-plane/gateway-utils.d.ts +17 -0
  155. package/dist/platform/control-plane/gateway-utils.d.ts.map +1 -1
  156. package/dist/platform/control-plane/gateway-utils.js +30 -0
  157. package/dist/platform/control-plane/gateway.d.ts +12 -2
  158. package/dist/platform/control-plane/gateway.d.ts.map +1 -1
  159. package/dist/platform/control-plane/gateway.js +27 -31
  160. package/dist/platform/control-plane/index.d.ts +8 -1
  161. package/dist/platform/control-plane/index.d.ts.map +1 -1
  162. package/dist/platform/control-plane/index.js +8 -0
  163. package/dist/platform/control-plane/invoke-input-validation.d.ts +56 -0
  164. package/dist/platform/control-plane/invoke-input-validation.d.ts.map +1 -0
  165. package/dist/platform/control-plane/invoke-input-validation.js +163 -0
  166. package/dist/platform/control-plane/method-catalog-admin.d.ts.map +1 -1
  167. package/dist/platform/control-plane/method-catalog-admin.js +12 -1
  168. package/dist/platform/control-plane/method-catalog-calendar.d.ts +16 -0
  169. package/dist/platform/control-plane/method-catalog-calendar.d.ts.map +1 -1
  170. package/dist/platform/control-plane/method-catalog-calendar.js +21 -0
  171. package/dist/platform/control-plane/method-catalog-channels.d.ts.map +1 -1
  172. package/dist/platform/control-plane/method-catalog-channels.js +32 -3
  173. package/dist/platform/control-plane/method-catalog-control-automation.d.ts.map +1 -1
  174. package/dist/platform/control-plane/method-catalog-control-automation.js +19 -34
  175. package/dist/platform/control-plane/method-catalog-control-companion.d.ts +15 -0
  176. package/dist/platform/control-plane/method-catalog-control-companion.d.ts.map +1 -0
  177. package/dist/platform/control-plane/method-catalog-control-companion.js +176 -0
  178. package/dist/platform/control-plane/method-catalog-control-core.d.ts.map +1 -1
  179. package/dist/platform/control-plane/method-catalog-control-core.js +104 -122
  180. package/dist/platform/control-plane/method-catalog-control.d.ts.map +1 -1
  181. package/dist/platform/control-plane/method-catalog-control.js +4 -0
  182. package/dist/platform/control-plane/method-catalog-email.d.ts +17 -0
  183. package/dist/platform/control-plane/method-catalog-email.d.ts.map +1 -1
  184. package/dist/platform/control-plane/method-catalog-email.js +21 -0
  185. package/dist/platform/control-plane/method-catalog-events.d.ts +28 -0
  186. package/dist/platform/control-plane/method-catalog-events.d.ts.map +1 -1
  187. package/dist/platform/control-plane/method-catalog-events.js +74 -1
  188. package/dist/platform/control-plane/method-catalog-fleet.d.ts +24 -0
  189. package/dist/platform/control-plane/method-catalog-fleet.d.ts.map +1 -0
  190. package/dist/platform/control-plane/method-catalog-fleet.js +65 -0
  191. package/dist/platform/control-plane/method-catalog-push.d.ts +30 -0
  192. package/dist/platform/control-plane/method-catalog-push.d.ts.map +1 -0
  193. package/dist/platform/control-plane/method-catalog-push.js +80 -0
  194. package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts +84 -0
  195. package/dist/platform/control-plane/method-catalog-route-reconcile.d.ts.map +1 -0
  196. package/dist/platform/control-plane/method-catalog-route-reconcile.js +103 -0
  197. package/dist/platform/control-plane/method-catalog-runtime.d.ts.map +1 -1
  198. package/dist/platform/control-plane/method-catalog-runtime.js +83 -1
  199. package/dist/platform/control-plane/method-catalog-shared.d.ts +29 -0
  200. package/dist/platform/control-plane/method-catalog-shared.d.ts.map +1 -1
  201. package/dist/platform/control-plane/method-catalog.d.ts +9 -0
  202. package/dist/platform/control-plane/method-catalog.d.ts.map +1 -1
  203. package/dist/platform/control-plane/method-catalog.js +34 -3
  204. package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts +8 -0
  205. package/dist/platform/control-plane/operator-contract-schemas-admin.d.ts.map +1 -1
  206. package/dist/platform/control-plane/operator-contract-schemas-admin.js +22 -1
  207. package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts +18 -0
  208. package/dist/platform/control-plane/operator-contract-schemas-fleet.d.ts.map +1 -0
  209. package/dist/platform/control-plane/operator-contract-schemas-fleet.js +182 -0
  210. package/dist/platform/control-plane/operator-contract-schemas-permissions.d.ts.map +1 -1
  211. package/dist/platform/control-plane/operator-contract-schemas-permissions.js +5 -0
  212. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts +37 -0
  213. package/dist/platform/control-plane/operator-contract-schemas-runtime.d.ts.map +1 -1
  214. package/dist/platform/control-plane/operator-contract-schemas-runtime.js +100 -3
  215. package/dist/platform/control-plane/operator-contract-schemas.d.ts +1 -0
  216. package/dist/platform/control-plane/operator-contract-schemas.d.ts.map +1 -1
  217. package/dist/platform/control-plane/operator-contract-schemas.js +1 -0
  218. package/dist/platform/control-plane/operator-contract.d.ts.map +1 -1
  219. package/dist/platform/control-plane/operator-contract.js +8 -0
  220. package/dist/platform/control-plane/routes/checkpoints.d.ts +39 -0
  221. package/dist/platform/control-plane/routes/checkpoints.d.ts.map +1 -0
  222. package/dist/platform/control-plane/routes/checkpoints.js +166 -0
  223. package/dist/platform/control-plane/routes/fleet.d.ts +53 -0
  224. package/dist/platform/control-plane/routes/fleet.d.ts.map +1 -0
  225. package/dist/platform/control-plane/routes/fleet.js +153 -0
  226. package/dist/platform/control-plane/routes/gateway-verb-error.d.ts +30 -0
  227. package/dist/platform/control-plane/routes/gateway-verb-error.d.ts.map +1 -0
  228. package/dist/platform/control-plane/routes/gateway-verb-error.js +36 -0
  229. package/dist/platform/control-plane/routes/index.d.ts +0 -6
  230. package/dist/platform/control-plane/routes/index.d.ts.map +1 -1
  231. package/dist/platform/control-plane/routes/index.js +5 -5
  232. package/dist/platform/control-plane/routes/invocation-params.d.ts +23 -0
  233. package/dist/platform/control-plane/routes/invocation-params.d.ts.map +1 -0
  234. package/dist/platform/control-plane/routes/invocation-params.js +9 -0
  235. package/dist/platform/control-plane/routes/push.d.ts +26 -0
  236. package/dist/platform/control-plane/routes/push.d.ts.map +1 -0
  237. package/dist/platform/control-plane/routes/push.js +104 -0
  238. package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts +31 -0
  239. package/dist/platform/control-plane/routes/register-gateway-verb-groups.d.ts.map +1 -0
  240. package/dist/platform/control-plane/routes/register-gateway-verb-groups.js +16 -0
  241. package/dist/platform/control-plane/routes/register-w3-s2.d.ts +26 -0
  242. package/dist/platform/control-plane/routes/register-w3-s2.d.ts.map +1 -0
  243. package/dist/platform/control-plane/routes/register-w3-s2.js +8 -0
  244. package/dist/platform/control-plane/routes/session-search.d.ts +37 -0
  245. package/dist/platform/control-plane/routes/session-search.d.ts.map +1 -0
  246. package/dist/platform/control-plane/routes/session-search.js +113 -0
  247. package/dist/platform/control-plane/session-broker-gc.d.ts +16 -0
  248. package/dist/platform/control-plane/session-broker-gc.d.ts.map +1 -1
  249. package/dist/platform/control-plane/session-broker-gc.js +23 -6
  250. package/dist/platform/control-plane/session-broker-helpers.d.ts +3 -3
  251. package/dist/platform/control-plane/session-broker-helpers.d.ts.map +1 -1
  252. package/dist/platform/control-plane/session-broker-inputs.d.ts +18 -0
  253. package/dist/platform/control-plane/session-broker-inputs.d.ts.map +1 -1
  254. package/dist/platform/control-plane/session-broker-inputs.js +34 -0
  255. package/dist/platform/control-plane/session-broker-sessions.d.ts +102 -3
  256. package/dist/platform/control-plane/session-broker-sessions.d.ts.map +1 -1
  257. package/dist/platform/control-plane/session-broker-sessions.js +179 -5
  258. package/dist/platform/control-plane/session-broker-state.d.ts +20 -1
  259. package/dist/platform/control-plane/session-broker-state.d.ts.map +1 -1
  260. package/dist/platform/control-plane/session-broker-state.js +67 -5
  261. package/dist/platform/control-plane/session-broker.d.ts +51 -38
  262. package/dist/platform/control-plane/session-broker.d.ts.map +1 -1
  263. package/dist/platform/control-plane/session-broker.js +183 -75
  264. package/dist/platform/control-plane/session-store-importer.d.ts +57 -0
  265. package/dist/platform/control-plane/session-store-importer.d.ts.map +1 -0
  266. package/dist/platform/control-plane/session-store-importer.js +227 -0
  267. package/dist/platform/control-plane/session-types.d.ts +142 -7
  268. package/dist/platform/control-plane/session-types.d.ts.map +1 -1
  269. package/dist/platform/core/execution-plan.d.ts +43 -1
  270. package/dist/platform/core/execution-plan.d.ts.map +1 -1
  271. package/dist/platform/core/execution-plan.js +46 -10
  272. package/dist/platform/core/index.d.ts +1 -0
  273. package/dist/platform/core/index.d.ts.map +1 -1
  274. package/dist/platform/core/index.js +1 -0
  275. package/dist/platform/core/orchestrator-runtime.d.ts +23 -3
  276. package/dist/platform/core/orchestrator-runtime.d.ts.map +1 -1
  277. package/dist/platform/core/orchestrator-tool-runtime.d.ts +7 -0
  278. package/dist/platform/core/orchestrator-tool-runtime.d.ts.map +1 -1
  279. package/dist/platform/core/orchestrator-tool-runtime.js +10 -0
  280. package/dist/platform/core/orchestrator-turn-loop.d.ts +13 -6
  281. package/dist/platform/core/orchestrator-turn-loop.d.ts.map +1 -1
  282. package/dist/platform/core/orchestrator-turn-loop.js +29 -22
  283. package/dist/platform/core/orchestrator.d.ts +16 -10
  284. package/dist/platform/core/orchestrator.d.ts.map +1 -1
  285. package/dist/platform/core/orchestrator.js +23 -8
  286. package/dist/platform/core/plan-decomposition.d.ts +196 -0
  287. package/dist/platform/core/plan-decomposition.d.ts.map +1 -0
  288. package/dist/platform/core/plan-decomposition.js +417 -0
  289. package/dist/platform/core/plan-proposal.d.ts +39 -0
  290. package/dist/platform/core/plan-proposal.d.ts.map +1 -1
  291. package/dist/platform/core/wrfc-routing.d.ts +1 -0
  292. package/dist/platform/core/wrfc-routing.d.ts.map +1 -1
  293. package/dist/platform/core/wrfc-routing.js +51 -1
  294. package/dist/platform/daemon/boot.d.ts +69 -0
  295. package/dist/platform/daemon/boot.d.ts.map +1 -0
  296. package/dist/platform/daemon/boot.js +61 -0
  297. package/dist/platform/daemon/cli.js +2 -1
  298. package/dist/platform/daemon/control-plane.d.ts.map +1 -1
  299. package/dist/platform/daemon/control-plane.js +50 -1
  300. package/dist/platform/daemon/facade-composition.d.ts.map +1 -1
  301. package/dist/platform/daemon/facade-composition.js +6 -0
  302. package/dist/platform/daemon/facade.d.ts +15 -6
  303. package/dist/platform/daemon/facade.d.ts.map +1 -1
  304. package/dist/platform/daemon/facade.js +48 -43
  305. package/dist/platform/daemon/http/router-route-contexts.d.ts +1 -0
  306. package/dist/platform/daemon/http/router-route-contexts.d.ts.map +1 -1
  307. package/dist/platform/daemon/http/router-route-contexts.js +1 -0
  308. package/dist/platform/daemon/http/router-session-broker-adapter.d.ts +13 -0
  309. package/dist/platform/daemon/http/router-session-broker-adapter.d.ts.map +1 -0
  310. package/dist/platform/daemon/http/router-session-broker-adapter.js +27 -0
  311. package/dist/platform/daemon/http/router.d.ts +2 -1
  312. package/dist/platform/daemon/http/router.d.ts.map +1 -1
  313. package/dist/platform/daemon/http/router.js +42 -40
  314. package/dist/platform/daemon/http/runtime-route-types.d.ts +42 -4
  315. package/dist/platform/daemon/http/runtime-route-types.d.ts.map +1 -1
  316. package/dist/platform/daemon/http/webui-serving.d.ts +68 -0
  317. package/dist/platform/daemon/http/webui-serving.d.ts.map +1 -0
  318. package/dist/platform/daemon/http/webui-serving.js +230 -0
  319. package/dist/platform/daemon/index.d.ts +2 -0
  320. package/dist/platform/daemon/index.d.ts.map +1 -1
  321. package/dist/platform/daemon/index.js +1 -0
  322. package/dist/platform/daemon/service-manager.d.ts +16 -0
  323. package/dist/platform/daemon/service-manager.d.ts.map +1 -1
  324. package/dist/platform/daemon/service-manager.js +79 -15
  325. package/dist/platform/intelligence/tree-sitter/service.d.ts.map +1 -1
  326. package/dist/platform/intelligence/tree-sitter/service.js +16 -2
  327. package/dist/platform/knowledge/browser-history/readers.d.ts.map +1 -1
  328. package/dist/platform/knowledge/browser-history/readers.js +15 -5
  329. package/dist/platform/knowledge/knowledge-api.d.ts +1 -1
  330. package/dist/platform/knowledge/project-planning/service.d.ts +14 -1
  331. package/dist/platform/knowledge/project-planning/service.d.ts.map +1 -1
  332. package/dist/platform/knowledge/project-planning/service.js +77 -0
  333. package/dist/platform/knowledge/project-planning/types.d.ts +32 -0
  334. package/dist/platform/knowledge/project-planning/types.d.ts.map +1 -1
  335. package/dist/platform/orchestration/bookkeeping.d.ts +12 -0
  336. package/dist/platform/orchestration/bookkeeping.d.ts.map +1 -0
  337. package/dist/platform/orchestration/bookkeeping.js +91 -0
  338. package/dist/platform/orchestration/budget.d.ts +2 -2
  339. package/dist/platform/orchestration/cancellation.d.ts +2 -2
  340. package/dist/platform/orchestration/controller-compat.d.ts +16 -3
  341. package/dist/platform/orchestration/controller-compat.d.ts.map +1 -1
  342. package/dist/platform/orchestration/controller-compat.js +18 -4
  343. package/dist/platform/orchestration/dirty-guard.js +1 -1
  344. package/dist/platform/orchestration/engine.d.ts +26 -1
  345. package/dist/platform/orchestration/engine.d.ts.map +1 -1
  346. package/dist/platform/orchestration/engine.js +229 -25
  347. package/dist/platform/orchestration/index.d.ts +6 -4
  348. package/dist/platform/orchestration/index.d.ts.map +1 -1
  349. package/dist/platform/orchestration/index.js +3 -2
  350. package/dist/platform/orchestration/persistence.d.ts.map +1 -1
  351. package/dist/platform/orchestration/persistence.js +6 -3
  352. package/dist/platform/orchestration/phase-runner.d.ts +33 -6
  353. package/dist/platform/orchestration/phase-runner.d.ts.map +1 -1
  354. package/dist/platform/orchestration/phase-runner.js +98 -25
  355. package/dist/platform/orchestration/proposal-workstream.d.ts +56 -0
  356. package/dist/platform/orchestration/proposal-workstream.d.ts.map +1 -0
  357. package/dist/platform/orchestration/proposal-workstream.js +76 -0
  358. package/dist/platform/orchestration/scheduler.d.ts +20 -1
  359. package/dist/platform/orchestration/scheduler.d.ts.map +1 -1
  360. package/dist/platform/orchestration/scheduler.js +16 -0
  361. package/dist/platform/orchestration/types.d.ts +289 -4
  362. package/dist/platform/orchestration/types.d.ts.map +1 -1
  363. package/dist/platform/orchestration/types.js +32 -0
  364. package/dist/platform/orchestration/worktree-isolation.d.ts +33 -0
  365. package/dist/platform/orchestration/worktree-isolation.d.ts.map +1 -0
  366. package/dist/platform/orchestration/worktree-isolation.js +248 -0
  367. package/dist/platform/presentation/glyphs.d.ts +91 -0
  368. package/dist/platform/presentation/glyphs.d.ts.map +1 -0
  369. package/dist/platform/presentation/glyphs.js +93 -0
  370. package/dist/platform/presentation/index.d.ts +28 -0
  371. package/dist/platform/presentation/index.d.ts.map +1 -0
  372. package/dist/platform/presentation/index.js +27 -0
  373. package/dist/platform/presentation/thinking-phrases.d.ts +12 -0
  374. package/dist/platform/presentation/thinking-phrases.d.ts.map +1 -0
  375. package/dist/platform/presentation/thinking-phrases.js +32 -0
  376. package/dist/platform/presentation/tones.d.ts +121 -0
  377. package/dist/platform/presentation/tones.d.ts.map +1 -0
  378. package/dist/platform/presentation/tones.js +145 -0
  379. package/dist/platform/presentation/waiting-wording.d.ts +54 -0
  380. package/dist/platform/presentation/waiting-wording.d.ts.map +1 -0
  381. package/dist/platform/presentation/waiting-wording.js +51 -0
  382. package/dist/platform/providers/runtime-snapshot.d.ts.map +1 -1
  383. package/dist/platform/providers/runtime-snapshot.js +12 -2
  384. package/dist/platform/push/delivery.d.ts +48 -0
  385. package/dist/platform/push/delivery.d.ts.map +1 -0
  386. package/dist/platform/push/delivery.js +117 -0
  387. package/dist/platform/push/encryption.d.ts +41 -0
  388. package/dist/platform/push/encryption.d.ts.map +1 -0
  389. package/dist/platform/push/encryption.js +82 -0
  390. package/dist/platform/push/index.d.ts +17 -0
  391. package/dist/platform/push/index.d.ts.map +1 -0
  392. package/dist/platform/push/index.js +10 -0
  393. package/dist/platform/push/service.d.ts +75 -0
  394. package/dist/platform/push/service.d.ts.map +1 -0
  395. package/dist/platform/push/service.js +95 -0
  396. package/dist/platform/push/subscription-store.d.ts +50 -0
  397. package/dist/platform/push/subscription-store.d.ts.map +1 -0
  398. package/dist/platform/push/subscription-store.js +123 -0
  399. package/dist/platform/push/types.d.ts +68 -0
  400. package/dist/platform/push/types.d.ts.map +1 -0
  401. package/dist/platform/push/types.js +13 -0
  402. package/dist/platform/push/vapid.d.ts +54 -0
  403. package/dist/platform/push/vapid.d.ts.map +1 -0
  404. package/dist/platform/push/vapid.js +113 -0
  405. package/dist/platform/runtime/bootstrap-services.d.ts +62 -2
  406. package/dist/platform/runtime/bootstrap-services.d.ts.map +1 -1
  407. package/dist/platform/runtime/bootstrap-services.js +217 -50
  408. package/dist/platform/runtime/daemon-version-compat.d.ts +39 -0
  409. package/dist/platform/runtime/daemon-version-compat.d.ts.map +1 -0
  410. package/dist/platform/runtime/daemon-version-compat.js +75 -0
  411. package/dist/platform/runtime/detached-daemon-runtime.d.ts +26 -0
  412. package/dist/platform/runtime/detached-daemon-runtime.d.ts.map +1 -0
  413. package/dist/platform/runtime/detached-daemon-runtime.js +49 -0
  414. package/dist/platform/runtime/emitters/workflows.d.ts +1 -1
  415. package/dist/platform/runtime/emitters/workflows.d.ts.map +1 -1
  416. package/dist/platform/runtime/events/index.d.ts +13 -0
  417. package/dist/platform/runtime/events/index.d.ts.map +1 -1
  418. package/dist/platform/runtime/events/index.js +13 -0
  419. package/dist/platform/runtime/feature-flags/flags.d.ts.map +1 -1
  420. package/dist/platform/runtime/feature-flags/flags.js +39 -1
  421. package/dist/platform/runtime/fleet/adapters/agent.d.ts +2 -2
  422. package/dist/platform/runtime/fleet/adapters/agent.d.ts.map +1 -1
  423. package/dist/platform/runtime/fleet/adapters/agent.js +4 -4
  424. package/dist/platform/runtime/fleet/adapters/automation.d.ts +1 -1
  425. package/dist/platform/runtime/fleet/adapters/automation.js +1 -1
  426. package/dist/platform/runtime/fleet/adapters/code-index.d.ts +1 -1
  427. package/dist/platform/runtime/fleet/adapters/code-index.js +1 -1
  428. package/dist/platform/runtime/fleet/adapters/orchestration.d.ts +40 -18
  429. package/dist/platform/runtime/fleet/adapters/orchestration.d.ts.map +1 -1
  430. package/dist/platform/runtime/fleet/adapters/orchestration.js +138 -34
  431. package/dist/platform/runtime/fleet/adapters/schedule.d.ts +4 -4
  432. package/dist/platform/runtime/fleet/adapters/schedule.js +4 -4
  433. package/dist/platform/runtime/fleet/adapters/trigger.d.ts +3 -4
  434. package/dist/platform/runtime/fleet/adapters/trigger.d.ts.map +1 -1
  435. package/dist/platform/runtime/fleet/adapters/trigger.js +3 -4
  436. package/dist/platform/runtime/fleet/adapters/wrfc.d.ts +13 -0
  437. package/dist/platform/runtime/fleet/adapters/wrfc.d.ts.map +1 -1
  438. package/dist/platform/runtime/fleet/adapters/wrfc.js +49 -2
  439. package/dist/platform/runtime/fleet/registry.d.ts +7 -7
  440. package/dist/platform/runtime/fleet/registry.d.ts.map +1 -1
  441. package/dist/platform/runtime/fleet/registry.js +41 -7
  442. package/dist/platform/runtime/fleet/types.d.ts +9 -9
  443. package/dist/platform/runtime/fleet/types.d.ts.map +1 -1
  444. package/dist/platform/runtime/memory-spine/client.d.ts +127 -0
  445. package/dist/platform/runtime/memory-spine/client.d.ts.map +1 -0
  446. package/dist/platform/runtime/memory-spine/client.js +113 -0
  447. package/dist/platform/runtime/memory-spine/index.d.ts +11 -0
  448. package/dist/platform/runtime/memory-spine/index.d.ts.map +1 -0
  449. package/dist/platform/runtime/memory-spine/index.js +10 -0
  450. package/dist/platform/runtime/operator-client.d.ts +20 -2
  451. package/dist/platform/runtime/operator-client.d.ts.map +1 -1
  452. package/dist/platform/runtime/operator-client.js +11 -1
  453. package/dist/platform/runtime/provider-accounts/registry.d.ts.map +1 -1
  454. package/dist/platform/runtime/provider-accounts/registry.js +11 -1
  455. package/dist/platform/runtime/services.d.ts +11 -9
  456. package/dist/platform/runtime/services.d.ts.map +1 -1
  457. package/dist/platform/runtime/services.js +24 -9
  458. package/dist/platform/runtime/session-spine/client.d.ts +234 -0
  459. package/dist/platform/runtime/session-spine/client.d.ts.map +1 -0
  460. package/dist/platform/runtime/session-spine/client.js +449 -0
  461. package/dist/platform/runtime/session-spine/index.d.ts +12 -0
  462. package/dist/platform/runtime/session-spine/index.d.ts.map +1 -0
  463. package/dist/platform/runtime/session-spine/index.js +11 -0
  464. package/dist/platform/runtime/session-spine/union-cache.d.ts +225 -0
  465. package/dist/platform/runtime/session-spine/union-cache.d.ts.map +1 -0
  466. package/dist/platform/runtime/session-spine/union-cache.js +333 -0
  467. package/dist/platform/runtime/shell-command-ops.d.ts +3 -1
  468. package/dist/platform/runtime/shell-command-ops.d.ts.map +1 -1
  469. package/dist/platform/runtime/transports/daemon-http-client-validators.d.ts.map +1 -1
  470. package/dist/platform/runtime/transports/daemon-http-client-validators.js +22 -0
  471. package/dist/platform/runtime/transports/daemon-http-client.d.ts.map +1 -1
  472. package/dist/platform/runtime/transports/daemon-http-client.js +25 -2
  473. package/dist/platform/runtime/transports/http-types.d.ts +9 -2
  474. package/dist/platform/runtime/transports/http-types.d.ts.map +1 -1
  475. package/dist/platform/state/canonical-memory.d.ts +95 -0
  476. package/dist/platform/state/canonical-memory.d.ts.map +1 -0
  477. package/dist/platform/state/canonical-memory.js +155 -0
  478. package/dist/platform/state/code-index-chunking.js +1 -1
  479. package/dist/platform/state/code-index-db.d.ts +1 -1
  480. package/dist/platform/state/code-index-reindex.d.ts +73 -0
  481. package/dist/platform/state/code-index-reindex.d.ts.map +1 -0
  482. package/dist/platform/state/code-index-reindex.js +156 -0
  483. package/dist/platform/state/code-index-store.d.ts.map +1 -1
  484. package/dist/platform/state/code-index-store.js +11 -3
  485. package/dist/platform/state/index.d.ts +8 -0
  486. package/dist/platform/state/index.d.ts.map +1 -1
  487. package/dist/platform/state/index.js +4 -0
  488. package/dist/platform/state/memory-recall-contract.d.ts +118 -0
  489. package/dist/platform/state/memory-recall-contract.d.ts.map +1 -0
  490. package/dist/platform/state/memory-recall-contract.js +170 -0
  491. package/dist/platform/state/memory-registry.d.ts +8 -0
  492. package/dist/platform/state/memory-registry.d.ts.map +1 -1
  493. package/dist/platform/state/memory-registry.js +10 -0
  494. package/dist/platform/state/memory-store.d.ts +2 -0
  495. package/dist/platform/state/memory-store.d.ts.map +1 -1
  496. package/dist/platform/state/memory-store.js +4 -0
  497. package/dist/platform/state/memory-vector-store.d.ts.map +1 -1
  498. package/dist/platform/state/memory-vector-store.js +14 -3
  499. package/dist/platform/state/sqlite-store.d.ts +2 -0
  500. package/dist/platform/state/sqlite-store.d.ts.map +1 -1
  501. package/dist/platform/state/sqlite-store.js +4 -0
  502. package/dist/platform/state/sqlite-vec-loader.d.ts +1 -1
  503. package/dist/platform/state/sqlite-vec-loader.js +1 -1
  504. package/dist/platform/state/vibe-projection.d.ts +67 -0
  505. package/dist/platform/state/vibe-projection.d.ts.map +1 -0
  506. package/dist/platform/state/vibe-projection.js +115 -0
  507. package/dist/platform/tools/agent/index.d.ts.map +1 -1
  508. package/dist/platform/tools/agent/index.js +8 -0
  509. package/dist/platform/tools/agent/manager.d.ts +22 -10
  510. package/dist/platform/tools/agent/manager.d.ts.map +1 -1
  511. package/dist/platform/tools/agent/manager.js +13 -7
  512. package/dist/platform/tools/agent/schema.d.ts +26 -0
  513. package/dist/platform/tools/agent/schema.d.ts.map +1 -1
  514. package/dist/platform/tools/agent/schema.js +2 -2
  515. package/dist/platform/tools/agent/wrfc-batch-policy.d.ts +13 -0
  516. package/dist/platform/tools/agent/wrfc-batch-policy.d.ts.map +1 -1
  517. package/dist/platform/tools/agent/wrfc-batch-policy.js +60 -0
  518. package/dist/platform/tools/exec/runtime.d.ts +10 -0
  519. package/dist/platform/tools/exec/runtime.d.ts.map +1 -1
  520. package/dist/platform/tools/exec/runtime.js +27 -10
  521. package/dist/platform/tools/exec/schema.d.ts +2 -2
  522. package/dist/platform/tools/exec/schema.d.ts.map +1 -1
  523. package/dist/platform/tools/exec/schema.js +2 -1
  524. package/dist/platform/tools/fetch/runtime.d.ts +1 -1
  525. package/dist/platform/tools/index.d.ts +2 -0
  526. package/dist/platform/tools/index.d.ts.map +1 -1
  527. package/dist/platform/tools/index.js +2 -0
  528. package/dist/platform/tools/registry.d.ts +1 -1
  529. package/dist/platform/tools/registry.js +1 -1
  530. package/dist/platform/tools/state/index.d.ts +9 -0
  531. package/dist/platform/tools/state/index.d.ts.map +1 -1
  532. package/dist/platform/tools/state/index.js +60 -3
  533. package/dist/platform/types/foundation-contract.d.ts +1 -1
  534. package/dist/platform/types/foundation-contract.d.ts.map +1 -1
  535. package/dist/platform/types/index.d.ts +1 -1
  536. package/dist/platform/types/index.d.ts.map +1 -1
  537. package/dist/platform/types/tools.d.ts +1 -1
  538. package/dist/platform/utils/request-body.d.ts.map +1 -1
  539. package/dist/platform/utils/request-body.js +50 -5
  540. package/dist/platform/version.js +1 -1
  541. package/package.json +25 -9
  542. package/dist/platform/control-plane/routes/automation.d.ts +0 -3
  543. package/dist/platform/control-plane/routes/automation.d.ts.map +0 -1
  544. package/dist/platform/control-plane/routes/automation.js +0 -63
  545. package/dist/platform/control-plane/routes/context.d.ts +0 -2
  546. package/dist/platform/control-plane/routes/context.d.ts.map +0 -1
  547. package/dist/platform/control-plane/routes/context.js +0 -1
  548. package/dist/platform/control-plane/routes/operator.d.ts +0 -8
  549. package/dist/platform/control-plane/routes/operator.d.ts.map +0 -1
  550. package/dist/platform/control-plane/routes/operator.js +0 -415
  551. package/dist/platform/control-plane/routes/remote.d.ts +0 -3
  552. package/dist/platform/control-plane/routes/remote.d.ts.map +0 -1
  553. package/dist/platform/control-plane/routes/remote.js +0 -35
  554. package/dist/platform/control-plane/routes/sessions.d.ts +0 -3
  555. package/dist/platform/control-plane/routes/sessions.d.ts.map +0 -1
  556. package/dist/platform/control-plane/routes/sessions.js +0 -43
  557. package/dist/platform/control-plane/routes/tasks.d.ts +0 -3
  558. package/dist/platform/control-plane/routes/tasks.d.ts.map +0 -1
  559. package/dist/platform/control-plane/routes/tasks.js +0 -22
@@ -0,0 +1,65 @@
1
+ import { EMPTY_OBJECT_SCHEMA, methodDescriptor } from './method-catalog-shared.js';
2
+ import { CHECKPOINTS_CREATE_INPUT_SCHEMA, CHECKPOINTS_CREATE_OUTPUT_SCHEMA, CHECKPOINTS_DIFF_INPUT_SCHEMA, CHECKPOINTS_DIFF_OUTPUT_SCHEMA, CHECKPOINTS_LIST_INPUT_SCHEMA, CHECKPOINTS_LIST_OUTPUT_SCHEMA, CHECKPOINTS_RESTORE_INPUT_SCHEMA, CHECKPOINTS_RESTORE_OUTPUT_SCHEMA, FLEET_LIST_INPUT_SCHEMA, FLEET_LIST_OUTPUT_SCHEMA, FLEET_SNAPSHOT_OUTPUT_SCHEMA, } from './operator-contract-schemas.js';
3
+ export const builtinGatewayFleetMethodDescriptors = [
4
+ methodDescriptor({
5
+ id: 'fleet.snapshot',
6
+ title: 'Fleet Snapshot',
7
+ description: 'Return a point-in-time capture of every live/completed runtime process (agents, WRFC chains/subtasks, workflow FSMs/triggers/schedules, watchers, background processes) as a flat, parentId-linked node list. Capped at 2000 nodes (truncated:true + totalCount when the live fleet exceeds the cap) — use fleet.list to page through a larger fleet.',
8
+ category: 'fleet',
9
+ scopes: ['read:fleet'],
10
+ transport: ['ws'],
11
+ inputSchema: EMPTY_OBJECT_SCHEMA,
12
+ outputSchema: FLEET_SNAPSHOT_OUTPUT_SCHEMA,
13
+ }),
14
+ methodDescriptor({
15
+ id: 'fleet.list',
16
+ title: 'List Fleet Processes',
17
+ description: 'Paginated, filtered (kinds/states) query over the live process registry. Cursor pagination returns disjoint pages that union to the full matching set at query time.',
18
+ category: 'fleet',
19
+ scopes: ['read:fleet'],
20
+ transport: ['ws'],
21
+ inputSchema: FLEET_LIST_INPUT_SCHEMA,
22
+ outputSchema: FLEET_LIST_OUTPUT_SCHEMA,
23
+ }),
24
+ methodDescriptor({
25
+ id: 'checkpoints.list',
26
+ title: 'List Workspace Checkpoints',
27
+ description: 'Return workspace checkpoints (whole-workspace filesystem snapshots), newest first, optionally filtered by kind/since and capped by limit.',
28
+ category: 'checkpoints',
29
+ scopes: ['read:checkpoints'],
30
+ transport: ['ws'],
31
+ inputSchema: CHECKPOINTS_LIST_INPUT_SCHEMA,
32
+ outputSchema: CHECKPOINTS_LIST_OUTPUT_SCHEMA,
33
+ }),
34
+ methodDescriptor({
35
+ id: 'checkpoints.create',
36
+ title: 'Create Workspace Checkpoint',
37
+ description: 'Create a new workspace checkpoint. Returns checkpoint:null, noop:true (not an error) when the workspace tree is identical to the most recent checkpoint — no commit, ref, or manifest entry is created in that case.',
38
+ category: 'checkpoints',
39
+ scopes: ['write:checkpoints'],
40
+ transport: ['ws'],
41
+ inputSchema: CHECKPOINTS_CREATE_INPUT_SCHEMA,
42
+ outputSchema: CHECKPOINTS_CREATE_OUTPUT_SCHEMA,
43
+ }),
44
+ methodDescriptor({
45
+ id: 'checkpoints.diff',
46
+ title: 'Diff Workspace Checkpoints',
47
+ description: 'Diff two checkpoints, or one checkpoint against the live working tree when `b` is omitted. An unknown/gc\'d checkpoint id is an honest 404, not a silent empty diff.',
48
+ category: 'checkpoints',
49
+ scopes: ['read:checkpoints'],
50
+ transport: ['ws'],
51
+ inputSchema: CHECKPOINTS_DIFF_INPUT_SCHEMA,
52
+ outputSchema: CHECKPOINTS_DIFF_OUTPUT_SCHEMA,
53
+ }),
54
+ methodDescriptor({
55
+ id: 'checkpoints.restore',
56
+ title: 'Restore Workspace Checkpoint',
57
+ description: 'DESTRUCTIVE: restore the workspace to the state captured by a checkpoint (git-backed workspace rewrite). Executes immediately with NO server-side confirmation — the calling surface (TUI/webui) owns the confirm UX before invoking this verb. An unknown/gc\'d checkpoint id is an honest 404, not a silent no-op.',
58
+ category: 'checkpoints',
59
+ scopes: ['write:checkpoints'],
60
+ dangerous: true,
61
+ transport: ['ws'],
62
+ inputSchema: CHECKPOINTS_RESTORE_INPUT_SCHEMA,
63
+ outputSchema: CHECKPOINTS_RESTORE_OUTPUT_SCHEMA,
64
+ }),
65
+ ];
@@ -0,0 +1,30 @@
1
+ /**
2
+ * method-catalog-push.ts
3
+ *
4
+ * Browser-push (Web Push) verb descriptors: the VAPID public-key read, and the
5
+ * subscription lifecycle (register / list / delete / verify) a PWA uses to
6
+ * receive approvals and completions as notifications.
7
+ *
8
+ * These are pure descriptors so `buildOperatorContract` / the generated catalog
9
+ * / api docs see them; the handlers are attached at RuntimeServices construction
10
+ * time in routes/push.ts (the same `catalog.register(descriptor, handler)`
11
+ * pattern fleet.* uses), reached over HTTP through the generic
12
+ * `/api/control-plane/methods/{id}/invoke` endpoint.
13
+ *
14
+ * Verb tails follow docs/decisions/2026-07-06-core-verb-spec.md: register is
15
+ * `create`, unregister is `delete`, the collection read is `list`, the public
16
+ * key read is `get`. `verify` (send a live test push to prove the round trip)
17
+ * is not a generic CRUD word — it is documented in the `push-delivery` exempt
18
+ * category in packages/contracts/src/core-verbs.ts.
19
+ *
20
+ * Like the other handler-registered verb groups (fleet.*, checkpoints.*,
21
+ * sessions.search) these declare `transport: ['ws']` and carry NO dedicated
22
+ * REST `http` binding: they are served by the registered in-process handler
23
+ * through the generic `/api/control-plane/methods/{id}/invoke` endpoint, not by
24
+ * a path route in the external daemon-sdk package. Advertising an `http` path
25
+ * that no route serves would trip the capability-advertisement honesty gate
26
+ * (method-catalog-route-reconcile.ts), so it is deliberately omitted.
27
+ */
28
+ import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
29
+ export declare const builtinGatewayPushMethodDescriptors: readonly GatewayMethodDescriptor[];
30
+ //# sourceMappingURL=method-catalog-push.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method-catalog-push.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-push.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAkC1E,eAAO,MAAM,mCAAmC,EAAE,SAAS,uBAAuB,EAyDjF,CAAC"}
@@ -0,0 +1,80 @@
1
+ import { BOOLEAN_SCHEMA, NUMBER_SCHEMA, STRING_SCHEMA, arraySchema, methodDescriptor, objectSchema, } from './method-catalog-shared.js';
2
+ const PUSH_SUBSCRIPTION_KEYS_SCHEMA = objectSchema({
3
+ p256dh: STRING_SCHEMA,
4
+ auth: STRING_SCHEMA,
5
+ }, ['p256dh', 'auth']);
6
+ /** The wire-safe (redacted) subscription view — no capability URL, no key material. */
7
+ const PUBLIC_PUSH_SUBSCRIPTION_SCHEMA = objectSchema({
8
+ id: STRING_SCHEMA,
9
+ principalId: STRING_SCHEMA,
10
+ endpointOrigin: STRING_SCHEMA,
11
+ endpointHash: STRING_SCHEMA,
12
+ createdAt: NUMBER_SCHEMA,
13
+ lastDeliveryAt: NUMBER_SCHEMA,
14
+ lastOutcome: STRING_SCHEMA,
15
+ }, ['id', 'principalId', 'endpointOrigin', 'endpointHash', 'createdAt']);
16
+ const PUSH_DELIVERY_RECEIPT_SCHEMA = objectSchema({
17
+ subscriptionId: STRING_SCHEMA,
18
+ endpointOrigin: STRING_SCHEMA,
19
+ outcome: STRING_SCHEMA,
20
+ httpStatus: NUMBER_SCHEMA,
21
+ detail: STRING_SCHEMA,
22
+ }, ['subscriptionId', 'endpointOrigin', 'outcome']);
23
+ export const builtinGatewayPushMethodDescriptors = [
24
+ methodDescriptor({
25
+ id: 'push.vapid.get',
26
+ title: 'Get Web Push Public Key',
27
+ description: 'Return the daemon\'s public VAPID key (base64url application-server key) that a browser client passes to pushManager.subscribe(). The matching private key never leaves the daemon and is never returned by any verb.',
28
+ category: 'push',
29
+ scopes: ['read:push'],
30
+ transport: ['ws'],
31
+ outputSchema: objectSchema({ publicKey: STRING_SCHEMA }, ['publicKey']),
32
+ }),
33
+ methodDescriptor({
34
+ id: 'push.subscriptions.create',
35
+ title: 'Register Web Push Subscription',
36
+ description: 'Store a browser Push subscription (endpoint capability URL + p256dh/auth keys) for the authenticated operator so the daemon can deliver notifications to that device. Re-registering the same endpoint updates its keys in place rather than duplicating it. The stored endpoint and keys are never returned over the wire; the response is the redacted subscription view.',
37
+ category: 'push',
38
+ scopes: ['write:push'],
39
+ transport: ['ws'],
40
+ inputSchema: objectSchema({
41
+ endpoint: STRING_SCHEMA,
42
+ keys: PUSH_SUBSCRIPTION_KEYS_SCHEMA,
43
+ }, ['endpoint', 'keys']),
44
+ outputSchema: objectSchema({ subscription: PUBLIC_PUSH_SUBSCRIPTION_SCHEMA }, ['subscription']),
45
+ }),
46
+ methodDescriptor({
47
+ id: 'push.subscriptions.list',
48
+ title: 'List Web Push Subscriptions',
49
+ description: 'List the authenticated operator\'s registered push devices as redacted subscription views (id, endpoint origin + hash, timestamps, last delivery outcome). The capability URL and key material are never included.',
50
+ category: 'push',
51
+ scopes: ['read:push'],
52
+ transport: ['ws'],
53
+ outputSchema: objectSchema({
54
+ subscriptions: arraySchema(PUBLIC_PUSH_SUBSCRIPTION_SCHEMA),
55
+ }, ['subscriptions']),
56
+ }),
57
+ methodDescriptor({
58
+ id: 'push.subscriptions.delete',
59
+ title: 'Delete Web Push Subscription',
60
+ description: 'Permanently remove one of the authenticated operator\'s push subscriptions: the stored record (endpoint + keys) is dropped and cannot be listed afterward. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND, never a 200-noop.',
61
+ category: 'push',
62
+ scopes: ['write:push'],
63
+ transport: ['ws'],
64
+ inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
65
+ outputSchema: objectSchema({
66
+ subscriptionId: STRING_SCHEMA,
67
+ deleted: BOOLEAN_SCHEMA,
68
+ }, ['subscriptionId', 'deleted']),
69
+ }),
70
+ methodDescriptor({
71
+ id: 'push.subscriptions.verify',
72
+ title: 'Send Test Web Push',
73
+ description: 'Send a live test notification to one of the authenticated operator\'s subscriptions and return an honest delivery receipt (delivered / pruned / failed). A subscription whose endpoint reports 404/410 gone is pruned as part of the attempt and the receipt says so. An unknown id, or one owned by another principal, is a 404 SUBSCRIPTION_NOT_FOUND.',
74
+ category: 'push',
75
+ scopes: ['write:push'],
76
+ transport: ['ws'],
77
+ inputSchema: objectSchema({ subscriptionId: STRING_SCHEMA }, ['subscriptionId']),
78
+ outputSchema: objectSchema({ receipt: PUSH_DELIVERY_RECEIPT_SCHEMA }, ['receipt']),
79
+ }),
80
+ ];
@@ -0,0 +1,84 @@
1
+ import type { GatewayMethodDescriptor } from './method-catalog-shared.js';
2
+ /**
3
+ * method-catalog-route-reconcile.ts
4
+ *
5
+ * Advertisement-vs-route reconciliation. Every method descriptor that
6
+ * carries an `http` binding is a promise to a caller: "this daemon actually
7
+ * serves this endpoint." Nothing previously checked that promise against
8
+ * the real dispatch table. method-catalog-email.ts's four email.* methods
9
+ * advertised /api/email/* paths that no route handler anywhere has ever
10
+ * served, so a caller invoking one through the generic method-dispatch
11
+ * endpoint (control-plane.ts's invokeGatewayMethodCall, which synthesizes a
12
+ * request from `http.path` and feeds it back into the real router) got a
13
+ * plain 404 instead of an honest "this capability isn't wired up." The ad
14
+ * lied; only a caller's own skepticism about the 404 stood between it and
15
+ * treating the capability as real.
16
+ *
17
+ * This module answers, for a batch of descriptors, whether each one's http
18
+ * binding actually resolves against the real dispatch pipeline:
19
+ * `dispatchDaemonApiRoutes` from @pellux/goodvibes-daemon-sdk, the function
20
+ * DaemonHttpRouter.dispatchApiRoutes (packages/sdk/src/platform/daemon/http/
21
+ * router.ts — read as this reconcile's route authority, never edited by it)
22
+ * ultimately delegates to for every method-catalog family except a short
23
+ * list of specialized sub-routers wired directly in router.ts ahead of that
24
+ * delegation (see SPECIALIZED_SUB_ROUTER_PREFIXES). The probe dispatches a
25
+ * synthetic Request against handler stubs that only ever return a fixed
26
+ * marker Response — no real service, manager, or handler body ever runs, so
27
+ * probing stays side-effect free even for `dangerous: true` write methods
28
+ * (email.send, automation job mutation, etc.).
29
+ *
30
+ * Scope note (read before extending): dispatchDaemonApiRoutes covers the
31
+ * operator / automation / remote / session / task route families, which is
32
+ * most of the catalog (control-core, media, channels, remote, runtime,
33
+ * knowledge). A handful of catalogs point at specialized sub-routers that
34
+ * router.ts special-cases before it ever reaches dispatchDaemonApiRoutes
35
+ * (MCP config, batch, Cloudflare, Home Assistant, model routes, companion
36
+ * chat, project planning). This module has no evidence either way for
37
+ * those paths, so it marks them 'unchecked' rather than guessing — a false
38
+ * "unavailable" verdict would just be a different flavor of the same
39
+ * dishonesty this module exists to catch.
40
+ */
41
+ export type RouteReconcileStatus = 'live' | 'unavailable' | 'unchecked';
42
+ export interface RouteReconcileResult {
43
+ readonly methodId: string;
44
+ readonly status: RouteReconcileStatus;
45
+ readonly http: {
46
+ readonly method: string;
47
+ readonly path: string;
48
+ } | null;
49
+ readonly reason: string;
50
+ }
51
+ export type RouteProbe = (method: string, path: string) => boolean | Promise<boolean>;
52
+ /**
53
+ * Path prefixes served by a specialized sub-router that router.ts dispatches
54
+ * to BEFORE falling through to dispatchDaemonApiRoutes. Kept as an explicit,
55
+ * short allowlist (not inferred) so growth here is a deliberate, reviewed
56
+ * decision rather than silent scope creep.
57
+ */
58
+ export declare const SPECIALIZED_SUB_ROUTER_PREFIXES: readonly string[];
59
+ /**
60
+ * Builds a dispatchDaemonApiRoutes-backed probe: does *any* route in the
61
+ * operator/automation/remote/session/task dispatch chain match this
62
+ * method+path? Every handler in the stub is inert — a Proxy that returns a
63
+ * single marker function for any property access, so it never needs
64
+ * updating when DaemonApiRouteHandlers gains a field (the exact kind of
65
+ * drift this reconcile exists to avoid reintroducing elsewhere).
66
+ */
67
+ export declare function createDaemonSdkRouteProbe(): RouteProbe;
68
+ /** Reconciles a single descriptor's http binding (if any) against a probe. */
69
+ export declare function reconcileHttpDescriptor(descriptor: GatewayMethodDescriptor, probe: RouteProbe): Promise<RouteReconcileResult>;
70
+ /** Reconciles a full descriptor list against a probe, in catalog order. */
71
+ export declare function reconcileCatalogRoutes(descriptors: readonly GatewayMethodDescriptor[], probe: RouteProbe): Promise<RouteReconcileResult[]>;
72
+ /**
73
+ * The regression gate. Every descriptor whose http binding was actually
74
+ * checked (status !== 'unchecked') and resolved to no live route must
75
+ * already be marked `invokable: false` at the source — i.e. the
76
+ * advertisement itself must already say "don't call this" instead of
77
+ * silently 404ing a caller who trusted it. Returns the ids that violate
78
+ * that rule. A non-empty result means some descriptor is advertised as
79
+ * live but isn't backed by a route, and isn't marked unavailable either —
80
+ * an email.inbox.list-shaped regression. Wire this into a test (or a boot
81
+ * self-check, once one exists) and fail loudly on a non-empty result.
82
+ */
83
+ export declare function findUnreconciledAdvertisements(descriptors: readonly GatewayMethodDescriptor[], results: readonly RouteReconcileResult[]): string[];
84
+ //# sourceMappingURL=method-catalog-route-reconcile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"method-catalog-route-reconcile.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-route-reconcile.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,aAAa,GAAG,WAAW,CAAC;AAExE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IACzE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,MAAM,EAQ5D,CAAC;AAkBF;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,UAAU,CAYtD;AAED,8EAA8E;AAC9E,wBAAsB,uBAAuB,CAC3C,UAAU,EAAE,uBAAuB,EACnC,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,oBAAoB,CAAC,CAuB/B;AAED,2EAA2E;AAC3E,wBAAsB,sBAAsB,CAC1C,WAAW,EAAE,SAAS,uBAAuB,EAAE,EAC/C,KAAK,EAAE,UAAU,GAChB,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAMjC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,SAAS,uBAAuB,EAAE,EAC/C,OAAO,EAAE,SAAS,oBAAoB,EAAE,GACvC,MAAM,EAAE,CAWV"}
@@ -0,0 +1,103 @@
1
+ import { dispatchDaemonApiRoutes } from '@pellux/goodvibes-daemon-sdk';
2
+ /**
3
+ * Path prefixes served by a specialized sub-router that router.ts dispatches
4
+ * to BEFORE falling through to dispatchDaemonApiRoutes. Kept as an explicit,
5
+ * short allowlist (not inferred) so growth here is a deliberate, reviewed
6
+ * decision rather than silent scope creep.
7
+ */
8
+ export const SPECIALIZED_SUB_ROUTER_PREFIXES = [
9
+ '/api/mcp',
10
+ '/api/batch',
11
+ '/api/cloudflare',
12
+ '/api/homeassistant',
13
+ '/api/models',
14
+ '/api/companion/chat',
15
+ '/api/projects/planning',
16
+ ];
17
+ const RECONCILE_PROBE_MARKER = { reconcileProbeMarker: true };
18
+ function isSpecializedSubRouterPath(path) {
19
+ return SPECIALIZED_SUB_ROUTER_PREFIXES.some((prefix) => path === prefix || path.startsWith(`${prefix}/`));
20
+ }
21
+ /**
22
+ * Replaces every `{param}` template segment with an opaque single-segment
23
+ * placeholder. Every path-matching regex in the dispatch chain matches "one
24
+ * non-slash segment" for a param slot, so a placeholder resolves the same
25
+ * way a real id would without needing one.
26
+ */
27
+ function resolveTemplatePath(template) {
28
+ return template.replace(/\{[^/}]+\}/g, 'reconcile-probe-placeholder');
29
+ }
30
+ /**
31
+ * Builds a dispatchDaemonApiRoutes-backed probe: does *any* route in the
32
+ * operator/automation/remote/session/task dispatch chain match this
33
+ * method+path? Every handler in the stub is inert — a Proxy that returns a
34
+ * single marker function for any property access, so it never needs
35
+ * updating when DaemonApiRouteHandlers gains a field (the exact kind of
36
+ * drift this reconcile exists to avoid reintroducing elsewhere).
37
+ */
38
+ export function createDaemonSdkRouteProbe() {
39
+ const marker = () => Response.json(RECONCILE_PROBE_MARKER);
40
+ const inertHandlers = new Proxy({}, { get: () => marker });
41
+ return async (method, path) => {
42
+ const request = new Request(`http://reconcile-probe.invalid${path}`, { method });
43
+ const response = await dispatchDaemonApiRoutes(request, inertHandlers);
44
+ return response !== null;
45
+ };
46
+ }
47
+ /** Reconciles a single descriptor's http binding (if any) against a probe. */
48
+ export async function reconcileHttpDescriptor(descriptor, probe) {
49
+ if (!descriptor.http) {
50
+ return { methodId: descriptor.id, status: 'unchecked', http: null, reason: 'no http binding to reconcile' };
51
+ }
52
+ const http = { method: descriptor.http.method, path: descriptor.http.path };
53
+ if (isSpecializedSubRouterPath(descriptor.http.path)) {
54
+ return {
55
+ methodId: descriptor.id,
56
+ status: 'unchecked',
57
+ http,
58
+ reason: `path is served by a specialized sub-router outside this reconcile's checked scope: ${descriptor.http.path}`,
59
+ };
60
+ }
61
+ const probePath = resolveTemplatePath(descriptor.http.path);
62
+ const resolved = await probe(descriptor.http.method, probePath);
63
+ return resolved
64
+ ? { methodId: descriptor.id, status: 'live', http, reason: 'route resolved via dispatchDaemonApiRoutes' }
65
+ : {
66
+ methodId: descriptor.id,
67
+ status: 'unavailable',
68
+ http,
69
+ reason: `no registered route serves ${descriptor.http.method} ${descriptor.http.path}`,
70
+ };
71
+ }
72
+ /** Reconciles a full descriptor list against a probe, in catalog order. */
73
+ export async function reconcileCatalogRoutes(descriptors, probe) {
74
+ const results = [];
75
+ for (const descriptor of descriptors) {
76
+ results.push(await reconcileHttpDescriptor(descriptor, probe));
77
+ }
78
+ return results;
79
+ }
80
+ /**
81
+ * The regression gate. Every descriptor whose http binding was actually
82
+ * checked (status !== 'unchecked') and resolved to no live route must
83
+ * already be marked `invokable: false` at the source — i.e. the
84
+ * advertisement itself must already say "don't call this" instead of
85
+ * silently 404ing a caller who trusted it. Returns the ids that violate
86
+ * that rule. A non-empty result means some descriptor is advertised as
87
+ * live but isn't backed by a route, and isn't marked unavailable either —
88
+ * an email.inbox.list-shaped regression. Wire this into a test (or a boot
89
+ * self-check, once one exists) and fail loudly on a non-empty result.
90
+ */
91
+ export function findUnreconciledAdvertisements(descriptors, results) {
92
+ const descriptorsById = new Map(descriptors.map((descriptor) => [descriptor.id, descriptor]));
93
+ const violations = [];
94
+ for (const result of results) {
95
+ if (result.status !== 'unavailable')
96
+ continue;
97
+ const descriptor = descriptorsById.get(result.methodId);
98
+ if (descriptor && descriptor.invokable !== false) {
99
+ violations.push(result.methodId);
100
+ }
101
+ }
102
+ return violations;
103
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAqH1E,eAAO,MAAM,sCAAsC,EAAE,SAAS,uBAAuB,EAyXpF,CAAC"}
1
+ {"version":3,"file":"method-catalog-runtime.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AA6H1E,eAAO,MAAM,sCAAsC,EAAE,SAAS,uBAAuB,EA2cpF,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { EMPTY_OBJECT_SCHEMA, BOOLEAN_SCHEMA, STRING_SCHEMA, NUMBER_SCHEMA, objectSchema, listOutputSchema, entityOutputSchema, bodyEnvelopeSchema, methodDescriptor, runtimeEventId, arraySchema, } from './method-catalog-shared.js';
2
2
  import { enumSchema, nullableSchema } from './operator-contract-schemas-shared.js';
3
- import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
3
+ import { CONTINUITY_SNAPSHOT_SCHEMA, DISTRIBUTED_NODE_HOST_CONTRACT_SCHEMA, HEALTH_SNAPSHOT_SCHEMA, INTELLIGENCE_SNAPSHOT_SCHEMA, MEMORY_DOCTOR_REPORT_SCHEMA, MEMORY_VECTOR_STATS_SCHEMA, MEMORY_CLASS_SCHEMA, MEMORY_SCOPE_SCHEMA, MEMORY_REVIEW_STATE_SCHEMA, MEMORY_PROVENANCE_KIND_SCHEMA, MEMORY_PROVENANCE_LINK_SCHEMA, MEMORY_RECORD_SCHEMA, MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA, MEMORY_RECORD_DELETE_OUTPUT_SCHEMA, PROVIDER_ACCOUNT_SNAPSHOT_SCHEMA, PROVIDER_RUNTIME_SNAPSHOT_SCHEMA, PROVIDER_USAGE_SNAPSHOT_SCHEMA, REMOTE_PAIR_APPROVAL_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_OUTPUT_SCHEMA, REMOTE_PAIR_REQUESTS_OUTPUT_SCHEMA, REMOTE_PEERS_OUTPUT_SCHEMA, REMOTE_PAIR_REQUEST_ACTION_INPUT_SCHEMA, REMOTE_PEER_DISCONNECT_INPUT_SCHEMA, REMOTE_PEER_INVOKE_INPUT_SCHEMA, REMOTE_PEER_INVOKE_OUTPUT_SCHEMA, REMOTE_PEER_OUTPUT_SCHEMA, REMOTE_PEER_TOKEN_REVOKE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_INPUT_SCHEMA, REMOTE_PEER_TOKEN_ROTATE_OUTPUT_SCHEMA, REMOTE_SNAPSHOT_SCHEMA, REMOTE_WORK_LIST_OUTPUT_SCHEMA, REMOTE_WORK_CANCEL_INPUT_SCHEMA, REMOTE_WORK_OUTPUT_SCHEMA, SECURITY_SETTINGS_REPORT_SCHEMA, SETTINGS_SNAPSHOT_SCHEMA, WORKTREE_SNAPSHOT_SCHEMA, } from './operator-contract-schemas.js';
4
4
  const MCP_SCOPE_SCHEMA = enumSchema(['project', 'global']);
5
5
  const MCP_SERVER_CONFIG_SCHEMA = objectSchema({
6
6
  name: STRING_SCHEMA,
@@ -433,6 +433,88 @@ export const builtinGatewayRuntimeMethodDescriptors = [
433
433
  }),
434
434
  outputSchema: objectSchema({ records: arraySchema(objectSchema({}, [], { additionalProperties: true })) }, ['records']),
435
435
  }),
436
+ methodDescriptor({
437
+ id: 'memory.records.add',
438
+ title: 'Add Memory Record',
439
+ description: 'Add a memory record to the daemon-owned canonical store. The daemon is the single writer for its store; a client surface routes its writes here instead of opening the store file, so two processes never write the same sql.js file. New records default to confidence 60 (the recall floor) and reviewState fresh unless the review block overrides them.',
440
+ category: 'memory',
441
+ scopes: ['write:memory'],
442
+ http: { method: 'POST', path: '/api/memory/records' },
443
+ inputSchema: bodyEnvelopeSchema({
444
+ cls: MEMORY_CLASS_SCHEMA,
445
+ summary: STRING_SCHEMA,
446
+ scope: MEMORY_SCOPE_SCHEMA,
447
+ detail: STRING_SCHEMA,
448
+ tags: arraySchema(STRING_SCHEMA),
449
+ provenance: arraySchema(MEMORY_PROVENANCE_LINK_SCHEMA),
450
+ review: objectSchema({
451
+ state: MEMORY_REVIEW_STATE_SCHEMA,
452
+ confidence: NUMBER_SCHEMA,
453
+ reviewedBy: STRING_SCHEMA,
454
+ staleReason: STRING_SCHEMA,
455
+ }),
456
+ }, ['cls', 'summary']),
457
+ outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
458
+ }),
459
+ methodDescriptor({
460
+ id: 'memory.records.search',
461
+ title: 'Search Memory Records',
462
+ description: 'Search the canonical store, literal or semantic. When semantic is requested but the semantic index cannot be consulted, the search falls back to a literal scan and states the reason in indexUnavailableReason rather than returning a silent empty result that reads as "nothing was ever stored". With recall=true the cross-surface recall-honesty contract is applied: flagged (stale/contradicted) records are excluded outright and records below the 60% confidence floor are dropped, each exclusion counted honestly.',
463
+ category: 'memory',
464
+ scopes: ['read:memory'],
465
+ http: { method: 'POST', path: '/api/memory/records/search' },
466
+ inputSchema: bodyEnvelopeSchema({
467
+ scope: MEMORY_SCOPE_SCHEMA,
468
+ cls: MEMORY_CLASS_SCHEMA,
469
+ tags: arraySchema(STRING_SCHEMA),
470
+ query: STRING_SCHEMA,
471
+ semantic: BOOLEAN_SCHEMA,
472
+ since: NUMBER_SCHEMA,
473
+ reviewState: arraySchema(MEMORY_REVIEW_STATE_SCHEMA),
474
+ minConfidence: NUMBER_SCHEMA,
475
+ provenanceKinds: arraySchema(MEMORY_PROVENANCE_KIND_SCHEMA),
476
+ staleOnly: BOOLEAN_SCHEMA,
477
+ limit: NUMBER_SCHEMA,
478
+ recall: BOOLEAN_SCHEMA,
479
+ }),
480
+ outputSchema: MEMORY_RECORD_SEARCH_OUTPUT_SCHEMA,
481
+ }),
482
+ methodDescriptor({
483
+ id: 'memory.records.get',
484
+ title: 'Get Memory Record',
485
+ description: 'Return a single memory record by id from the canonical store, or 404 when no record with that id exists.',
486
+ category: 'memory',
487
+ scopes: ['read:memory'],
488
+ http: { method: 'GET', path: '/api/memory/records/{id}' },
489
+ inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
490
+ outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
491
+ }),
492
+ methodDescriptor({
493
+ id: 'memory.records.update-review',
494
+ title: 'Update Memory Record Review',
495
+ description: 'Update a record\'s review signal (reviewState, confidence, reviewer, staleReason) in the canonical store. Marking a record stale or contradicted flags it so the recall-honesty contract will never inject it into a prompt again regardless of confidence. Returns 404 when no record with that id exists.',
496
+ category: 'memory',
497
+ scopes: ['write:memory'],
498
+ http: { method: 'POST', path: '/api/memory/records/{id}/review' },
499
+ inputSchema: bodyEnvelopeSchema({
500
+ id: STRING_SCHEMA,
501
+ state: MEMORY_REVIEW_STATE_SCHEMA,
502
+ confidence: NUMBER_SCHEMA,
503
+ reviewedBy: STRING_SCHEMA,
504
+ staleReason: STRING_SCHEMA,
505
+ }, ['id']),
506
+ outputSchema: entityOutputSchema('record', MEMORY_RECORD_SCHEMA),
507
+ }),
508
+ methodDescriptor({
509
+ id: 'memory.records.delete',
510
+ title: 'Delete Memory Record',
511
+ description: 'Permanently delete a memory record and its links from the canonical store. Delete means delete: the record is removed from the store and the semantic index, not merely flagged. Returns { deleted: false } when no record with that id existed — an honest boolean, never a 200 that pretends a phantom row was removed.',
512
+ category: 'memory',
513
+ scopes: ['write:memory'],
514
+ http: { method: 'DELETE', path: '/api/memory/records/{id}' },
515
+ inputSchema: objectSchema({ id: STRING_SCHEMA }, ['id']),
516
+ outputSchema: MEMORY_RECORD_DELETE_OUTPUT_SCHEMA,
517
+ }),
436
518
  methodDescriptor({
437
519
  id: 'scheduler.capacity',
438
520
  title: 'Scheduler Capacity',
@@ -22,6 +22,35 @@ export interface GatewayMethodDescriptor {
22
22
  readonly outputSchema?: Record<string, unknown> | undefined;
23
23
  readonly pluginId?: string | undefined;
24
24
  readonly dangerous?: boolean | undefined;
25
+ /**
26
+ * Defaults to `true`. When explicitly `false`, this method is NOT dispatchable
27
+ * through the generic HTTP/WS method-invocation surface
28
+ * (`invokeGatewayMethodCall`/`invokeWebSocketControlPlaneCall` in
29
+ * `../daemon/control-plane.ts`, guarded by `validateGatewayInvocation`, which
30
+ * rejects it with an honest 400 `NOT_INVOKABLE` before any handler or route is
31
+ * even considered) — nothing more, nothing less.
32
+ *
33
+ * This is a statement about ONE dispatch path, not a claim that the method can
34
+ * never run anywhere. Two independent reasons a descriptor carries
35
+ * `invokable: false`:
36
+ * - No route or internal handler exists at all for this build (e.g. `email.*`,
37
+ * `calendar.*` — cataloged so the contract is honest about the capability's
38
+ * shape, but genuinely unavailable everywhere).
39
+ * - A real route DOES exist and IS served (e.g. `voice.tts.stream`,
40
+ * `control.events.stream`, `artifacts.content.get`), just not through the
41
+ * generic JSON-envelope invoke path — the response is binary/streaming/HTML
42
+ * (see `metadata.responseKind`) and callers must use the direct HTTP path
43
+ * instead.
44
+ *
45
+ * A runtime that registers a real in-process handler for this method id (via
46
+ * `GatewayMethodCatalog.register(descriptor, handler)`) and calls
47
+ * `GatewayMethodCatalog.invoke()` DIRECTLY (bypassing `validateGatewayInvocation`)
48
+ * still serves it — `invoke()` itself does not consult this flag, by design: a
49
+ * consuming runtime that has wired up a genuine handler is authoritative over
50
+ * whether the method actually works, this descriptor is not. `invoke()` only
51
+ * refuses when BOTH `invokable === false` AND no handler is registered — see
52
+ * `method-catalog.ts`'s `invoke()`.
53
+ */
25
54
  readonly invokable?: boolean | undefined;
26
55
  readonly metadata?: Record<string, unknown> | undefined;
27
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"method-catalog-shared.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog-shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErE,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,CAAC;AAChE,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,eAAe,GAAG,OAAO,GAAG,aAAa,CAAC;AACvF,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,IAAI,GAAG,UAAU,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,uBAAuB;IACtC,Q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,MAAM,GAAG,sBAAsB,CAY1G"}
@@ -24,6 +24,15 @@ export declare class GatewayMethodCatalog {
24
24
  getAllScopes(options?: {
25
25
  readonly includeWrite?: boolean;
26
26
  }): string[];
27
+ /**
28
+ * Run a method's registered internal handler directly. Note this does NOT consult
29
+ * `descriptor.invokable` for a method that HAS a handler — see the field's doc
30
+ * comment in method-catalog-shared.ts: a runtime that registered a real handler is
31
+ * authoritative over whether the method works, the descriptor's `invokable` flag
32
+ * is not. `invokeGatewayMethodCall` (../daemon/control-plane.ts) is what enforces
33
+ * `invokable` for the generic HTTP/WS dispatch surface, via
34
+ * `validateGatewayInvocation`, BEFORE ever reaching here.
35
+ */
27
36
  invoke(id: string, invocation: GatewayMethodInvocation): Promise<unknown>;
28
37
  }
29
38
  //# sourceMappingURL=method-catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"method-catalog.d.ts","sourceRoot":"","sources":["../../../src/platform/control-plane/method-catalog.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AAKpC,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,uBAAuB,EACvB,8BAA8B,EAC9B,wBAAwB,EACxB,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,4BAA4B,CAAC;AA6DpC,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA8C;IACtE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6C;gBAExD,OAAO,GAAE;QAAE,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAO;IAWhE,QAAQ,CACN,UAAU,EAAE,uBAAuB,EACnC,OAAO,CAAC,EAAE,oBAAoB,EAC9B,OAAO,GAAE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AAC,EAAE,OAAO,CAAA;KAAO,GAAG,MAAM,EAAE;IAiBzE;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC;CA8BhF"}
@@ -6,7 +6,10 @@ import { builtinGatewayCalendarMethodDescriptors, } from './method-catalog-calen
6
6
  import { builtinGatewayEventDescriptors, } from './method-catalog-events.js';
7
7
  import { builtinGatewayKnowledgeMethodDescriptors, } from './method-catalog-knowledge.js';
8
8
  import { builtinGatewayMediaMethodDescriptors, } from './method-catalog-media.js';
9
+ import { builtinGatewayPushMethodDescriptors, } from './method-catalog-push.js';
9
10
  import { builtinGatewayRuntimeMethodDescriptors, } from './method-catalog-runtime.js';
11
+ import { GatewayVerbError } from './routes/gateway-verb-error.js';
12
+ import { SDKErrorCodes } from '@pellux/goodvibes-errors';
10
13
  const BUILTIN_GATEWAY_EVENTS = builtinGatewayEventDescriptors;
11
14
  const BUILTIN_GATEWAY_METHODS = [
12
15
  ...builtinGatewayControlMethodDescriptors,
@@ -17,6 +20,7 @@ const BUILTIN_GATEWAY_METHODS = [
17
20
  ...builtinGatewayKnowledgeMethodDescriptors,
18
21
  ...builtinGatewayMediaMethodDescriptors,
19
22
  ...builtinGatewayAdminMethodDescriptors,
23
+ ...builtinGatewayPushMethodDescriptors,
20
24
  ];
21
25
  function normalizeDescriptor(descriptor) {
22
26
  const id = descriptor.id.trim();
@@ -168,12 +172,39 @@ export class GatewayMethodCatalog {
168
172
  }
169
173
  return [...scopes].sort();
170
174
  }
175
+ /**
176
+ * Run a method's registered internal handler directly. Note this does NOT consult
177
+ * `descriptor.invokable` for a method that HAS a handler — see the field's doc
178
+ * comment in method-catalog-shared.ts: a runtime that registered a real handler is
179
+ * authoritative over whether the method works, the descriptor's `invokable` flag
180
+ * is not. `invokeGatewayMethodCall` (../daemon/control-plane.ts) is what enforces
181
+ * `invokable` for the generic HTTP/WS dispatch surface, via
182
+ * `validateGatewayInvocation`, BEFORE ever reaching here.
183
+ */
171
184
  async invoke(id, invocation) {
172
185
  const entry = this.methods.get(id);
173
- if (!entry)
174
- throw new Error(`Unknown gateway method: ${id}`);
175
- if (!entry.handler)
186
+ // Uncataloged id — a real machine code (METHOD_NOT_FOUND), not a prose Error, so
187
+ // any direct caller of invoke() (bypassing the HTTP dispatch's own 404 below) gets
188
+ // the same code-driven signal as invokeGatewayMethod/getGatewayMethod
189
+ // (daemon-sdk/control-routes.ts) and invokeGatewayMethodCall (../daemon/control-
190
+ // plane.ts) — distinct from NOT_INVOKABLE (cataloged but not invokable), which is
191
+ // the id existing but refusing dispatch, not the id being unknown outright.
192
+ if (!entry) {
193
+ throw new GatewayVerbError(`Unknown gateway method: ${id}`, SDKErrorCodes.METHOD_NOT_FOUND, 404);
194
+ }
195
+ if (!entry.handler) {
196
+ // A method explicitly marked invokable:false with no registered handler is
197
+ // honestly "not invokable anywhere" (see the field's doc comment) — distinct
198
+ // from a method that a caller expected to have a handler here but doesn't (a
199
+ // real bug in that caller's wiring). A GatewayVerbError flows straight through
200
+ // invokeGatewayMethodCall's existing catch into an honest 400/NOT_INVOKABLE
201
+ // instead of a generic 500 — and gives any OTHER caller of `invoke()` directly
202
+ // (bypassing the HTTP gate) the same honest, typed signal.
203
+ if (entry.descriptor.invokable === false) {
204
+ throw new GatewayVerbError(`Gateway method is not invokable and has no registered handler: ${id}`, 'NOT_INVOKABLE', 400);
205
+ }
176
206
  throw new Error(`Gateway method has no internal handler: ${id}`);
207
+ }
177
208
  return entry.handler(invocation);
178
209
  }
179
210
  }