@makaio/framework 1.0.0-dev-1787670071418 → 1.0.0-dev-1787670559522

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 (527) hide show
  1. package/README.md +0 -2
  2. package/dist/.makaio-build.json +2 -2
  3. package/dist/{account-identity-B3vLwm9O.mjs → account-identity-DGpXd8h_.mjs} +1 -1
  4. package/dist/adapter-BkdJaOOG.mjs +1 -0
  5. package/dist/adapter-subsystem/index.d.mts +76 -118
  6. package/dist/adapter-subsystem/index.mjs +1 -1
  7. package/dist/adapters/claude/index.d.mts +5 -5
  8. package/dist/adapters/config/index.d.mts +1 -1
  9. package/dist/adapters/config/index.mjs +1 -1
  10. package/dist/adapters/index.d.mts +53 -73
  11. package/dist/adapters/index.mjs +6 -6
  12. package/dist/adapters/node.d.mts +1 -1
  13. package/dist/adapters/node.mjs +1 -1
  14. package/dist/adapters/stream-session/index.mjs +1 -1
  15. package/dist/agent-namespace-D51PODFf.mjs +1 -0
  16. package/dist/{artifact-Btbuib48.mjs → artifact-k3veR4Yx.mjs} +1 -1
  17. package/dist/attach-error-BSlc7JfL.mjs +1 -0
  18. package/dist/{auth-C6tVtaOX.mjs → auth-A1K_7q-8.mjs} +1 -1
  19. package/dist/{authority-state-bootstrap-CLYus369.mjs → authority-state-bootstrap-YwtEImIB.mjs} +1 -1
  20. package/dist/{automation-trigger-ByjNlClm.mjs → automation-trigger-CuSdQwir.mjs} +1 -1
  21. package/dist/bus/index.d.mts +4 -22
  22. package/dist/bus/index.mjs +1 -1
  23. package/dist/bus-BIj0_aG6.mjs +1 -0
  24. package/dist/{bus-D6NoBhIV.mjs → bus-CqgrphNE.mjs} +1 -1
  25. package/dist/{canonical-model-DXOvCaVg.mjs → canonical-model-DJASlL4m.mjs} +1 -1
  26. package/dist/capabilities-Bqckjh7G.mjs +1 -0
  27. package/dist/capability-service-CJHNkjvm.mjs +1 -0
  28. package/dist/{client-BkznbdsO.mjs → client-BL5__WT0.mjs} +1 -1
  29. package/dist/clients/index.d.mts +1 -1
  30. package/dist/clients/index.mjs +1 -1
  31. package/dist/clients/managed-install.d.mts +1 -1
  32. package/dist/clients/managed-install.mjs +1 -1
  33. package/dist/{compression-CtgeVLpP.mjs → compression-BbttSqm8.mjs} +1 -1
  34. package/dist/{config-namespace-CjWvw8ij.mjs → config-namespace-CyzeLWSg.mjs} +1 -1
  35. package/dist/{context-resolution-841T7jBI.d.mts → context-resolution-ya9TXKg-.d.mts} +1 -1
  36. package/dist/contracts/adapter/index.d.mts +3 -3
  37. package/dist/contracts/adapter/index.mjs +1 -1
  38. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  39. package/dist/contracts/artifact/index.d.mts +2 -2
  40. package/dist/contracts/artifact/index.mjs +1 -1
  41. package/dist/contracts/auth/index.d.mts +2 -2
  42. package/dist/contracts/auth/index.mjs +1 -1
  43. package/dist/contracts/automation-trigger/index.d.mts +3 -3
  44. package/dist/contracts/automation-trigger/index.mjs +1 -1
  45. package/dist/contracts/canonical-model/index.d.mts +1 -1
  46. package/dist/contracts/canonical-model/index.mjs +1 -1
  47. package/dist/contracts/capabilities/index.d.mts +1 -1
  48. package/dist/contracts/capabilities/index.mjs +1 -1
  49. package/dist/contracts/client/index.d.mts +2 -2
  50. package/dist/contracts/client/index.mjs +1 -1
  51. package/dist/contracts/common/index.d.mts +1 -1
  52. package/dist/contracts/config/index.d.mts +1 -1
  53. package/dist/contracts/config/index.mjs +1 -1
  54. package/dist/contracts/extension/index.d.mts +5 -5
  55. package/dist/contracts/extension/index.mjs +1 -1
  56. package/dist/contracts/facet/index.d.mts +1 -1
  57. package/dist/contracts/facet/index.mjs +1 -1
  58. package/dist/contracts/harness/index.d.mts +1 -1
  59. package/dist/contracts/harness/index.mjs +1 -1
  60. package/dist/contracts/host/index.d.mts +1 -1
  61. package/dist/contracts/host/index.mjs +1 -1
  62. package/dist/contracts/index.d.mts +47 -57
  63. package/dist/contracts/index.mjs +1 -1
  64. package/dist/contracts/materialization/index.d.mts +3 -3
  65. package/dist/contracts/materialization/index.mjs +1 -1
  66. package/dist/contracts/model-registry/index.d.mts +1 -1
  67. package/dist/contracts/model-registry/index.mjs +1 -1
  68. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  69. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  70. package/dist/contracts/platform/index.d.mts +1 -1
  71. package/dist/contracts/platform/index.mjs +1 -1
  72. package/dist/contracts/provider/index.d.mts +2 -2
  73. package/dist/contracts/provider/index.mjs +1 -1
  74. package/dist/contracts/reaction/index.d.mts +1 -1
  75. package/dist/contracts/reaction/index.mjs +1 -1
  76. package/dist/contracts/session/index.d.mts +3 -3
  77. package/dist/contracts/session/index.mjs +1 -1
  78. package/dist/contracts/shared/index.d.mts +3 -3
  79. package/dist/contracts/shared/index.mjs +1 -1
  80. package/dist/contracts/skill/index.d.mts +1 -1
  81. package/dist/contracts/skill/index.mjs +1 -1
  82. package/dist/contracts/telemetry/index.d.mts +1 -1
  83. package/dist/contracts/telemetry/index.mjs +1 -1
  84. package/dist/contracts/timeout/index.d.mts +1 -1
  85. package/dist/contracts/timeout/index.mjs +1 -1
  86. package/dist/contracts/toast/index.mjs +1 -1
  87. package/dist/contracts/variant/index.d.mts +1 -1
  88. package/dist/contracts/variant/index.mjs +1 -1
  89. package/dist/contracts/worker-node/index.d.mts +1 -1
  90. package/dist/contracts/worker-node/index.mjs +1 -1
  91. package/dist/contracts/workflow/index.d.mts +2 -2
  92. package/dist/contracts/workflow/index.mjs +1 -1
  93. package/dist/{contribution-CUHLVLsT.d.mts → contribution-BB5bjx3f.d.mts} +2 -2
  94. package/dist/core/index.d.mts +2 -25
  95. package/dist/{definition-DyGImhyi.d.mts → definition-BYgHlmMw.d.mts} +1 -1
  96. package/dist/{definition-BH4QLGLI.mjs → definition-CDg-Jq1T.mjs} +1 -1
  97. package/dist/{detached-extension-handle-D0aI0pJA.mjs → detached-extension-handle-DKd17UB6.mjs} +1 -1
  98. package/dist/drizzle/meta/_journal.json +0 -28
  99. package/dist/event-DR8U9Efx.mjs +1 -0
  100. package/dist/{execution-attempt-repository-BJ2W6wwx.d.mts → execution-attempt-repository-DFyAnchJ.d.mts} +1 -1
  101. package/dist/{execution-target-H0RWV7Py.mjs → execution-target-ByNwZh5-.mjs} +1 -1
  102. package/dist/{extension-Cz39YNXy.mjs → extension-DMdmj9gi.mjs} +1 -1
  103. package/dist/{extension-Bfkr2DBs.mjs → extension-DUmibvMk.mjs} +1 -1
  104. package/dist/{extension-discovery-Dhu3WplO.d.mts → extension-discovery-Fhps4icD.d.mts} +1 -9
  105. package/dist/{filesystem-service-CiUw0YN5.mjs → filesystem-service-FAtd9gWH.mjs} +1 -1
  106. package/dist/framework-packages-D_2hBZ-p.mjs +1 -0
  107. package/dist/git/index.mjs +2 -2
  108. package/dist/{globby-QBDqstzq.mjs → globby-BBLuT_vy.mjs} +1 -1
  109. package/dist/handlers-2yd00VEq.mjs +57 -0
  110. package/dist/{harness-YQ2ewID9.mjs → harness-KxbWGL4I.mjs} +1 -1
  111. package/dist/{hook-responses-9Ywsqzzq.d.mts → hook-responses-uCXAICTU.d.mts} +1 -1
  112. package/dist/identity-DC3Pk0ps.mjs +1 -0
  113. package/dist/{index-D-4jv_66.d.mts → index-1UcQWrZy.d.mts} +149 -149
  114. package/dist/{index-D8D-yibS2.d.mts → index-B0xJgTi-.d.mts} +4 -4
  115. package/dist/{index-CYjgoYeX.d.mts → index-BMVZs6pm.d.mts} +3 -3
  116. package/dist/{index-CPi0UpRh.d.mts → index-BSQ30wYP.d.mts} +1 -1
  117. package/dist/{index-DXtQRehh.d.mts → index-Bl7KWFod.d.mts} +1 -1
  118. package/dist/{index-D_4K3Tf_.d.mts → index-BtdK8HeH.d.mts} +168 -43
  119. package/dist/{index-C146Eq_J.d.mts → index-C-JzEkqs.d.mts} +1802 -536
  120. package/dist/{index-DI2lS7VT.d.mts → index-CER64zYO.d.mts} +15 -15
  121. package/dist/{index-BkbnC65b.d.mts → index-CM75k-Ff.d.mts} +17 -189
  122. package/dist/{index-CmwAJ8-5.d.mts → index-CSN_0sCo.d.mts} +1 -1
  123. package/dist/{index-CIEycZrt.d.mts → index-C__EQfKa.d.mts} +1 -1
  124. package/dist/{index-B0VO0rAl.d.mts → index-CfiCJPP6.d.mts} +1 -1
  125. package/dist/{index-BNzUyVwV.d.mts → index-CqQYgsbB.d.mts} +170 -513
  126. package/dist/{index-B0yMCJW8.d.mts → index-DI7-tIL3.d.mts} +14 -39
  127. package/dist/{index-CMekqu_D.d.mts → index-DxYDRoDE2.d.mts} +8 -28
  128. package/dist/index-OsbtyMgx2.d.mts +98 -0
  129. package/dist/{index-DJ2KgJDJ2.d.mts → index-cPqSpWQC.d.mts} +12 -12
  130. package/dist/{index-DNI6UF9h.d.mts → index-e4Txan9i.d.mts} +4 -4
  131. package/dist/{index-CPRQ4dWX.d.mts → index-nydhGvXa.d.mts} +23 -0
  132. package/dist/json-value-C1RGgS0a.d.mts +72 -0
  133. package/dist/json-value-D57aJhVn.mjs +1 -0
  134. package/dist/kernel/cli/index.d.mts +2 -2
  135. package/dist/kernel/cli/index.mjs +1 -1
  136. package/dist/kernel/cli/register.d.mts +1 -1
  137. package/dist/kernel/cli/register.mjs +1 -1
  138. package/dist/kernel/cli/schemas.mjs +1 -1
  139. package/dist/kernel/extension/index.d.mts +1 -1
  140. package/dist/kernel/extension/index.mjs +1 -1
  141. package/dist/kernel/index.d.mts +5 -5
  142. package/dist/kernel/index.mjs +1 -1
  143. package/dist/kernel/namespace/index.d.mts +1 -1
  144. package/dist/kernel/namespace/index.mjs +1 -1
  145. package/dist/kernel/observability/index.d.mts +1 -1
  146. package/dist/kernel/observability/index.mjs +1 -1
  147. package/dist/kernel/providers/index.d.mts +1 -1
  148. package/dist/kernel/providers/index.mjs +1 -1
  149. package/dist/kernel/window/index.d.mts +1 -1
  150. package/dist/kernel/window/index.mjs +1 -1
  151. package/dist/{lib-Cm-uEoC1.mjs → lib-B_rJ6r0T.mjs} +1 -1
  152. package/dist/{lib-BpGvHZye.mjs → lib-CnOAtohU.mjs} +2 -2
  153. package/dist/{load-extensions-DG5LvPyM.mjs → load-extensions-CW9uzNR5.mjs} +1 -1
  154. package/dist/{load-extensions-BQoXaHhR.d.mts → load-extensions-DUpaMQ7G.d.mts} +1 -1
  155. package/dist/{materialization-lVd9_-jr.mjs → materialization-CcpCDhXh.mjs} +1 -1
  156. package/dist/mcp-http-server/index.mjs +1 -1
  157. package/dist/model-ZH3L1dPW.mjs +1 -0
  158. package/dist/{namespace-BL7lHlmg.mjs → namespace-B7bntOB8.mjs} +1 -1
  159. package/dist/{namespace-BNp7n_gu.d.mts → namespace-BgEiY7r1.d.mts} +3 -3
  160. package/dist/{namespace-DknCutQZ.d.mts → namespace-C6CVEGH8.d.mts} +0 -50
  161. package/dist/{namespace-C06lJSuj.d.mts → namespace-ChnRTUG4.d.mts} +6 -6
  162. package/dist/namespace-CxrOLeeP.mjs +1 -0
  163. package/dist/{namespace-BRuHzhPo.d.mts → namespace-DSlfFhB1.d.mts} +2 -154
  164. package/dist/{native-session-supervisor-LKio8XZn.mjs → native-session-supervisor-fZYPUk0-.mjs} +1 -1
  165. package/dist/node/bus-server/index.d.mts +1 -1
  166. package/dist/node/bus-server/index.mjs +1 -1
  167. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  168. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  169. package/dist/{orchestrator-shared-CNHSImNY.d.mts → orchestrator-shared-B-KRW1Z0.d.mts} +10 -9
  170. package/dist/orchestrator-shared-CTCZc6Vl.mjs +1 -0
  171. package/dist/ownership-memory-handler-Bblp93YC.mjs +1 -0
  172. package/dist/{package-BNFTUFLB.d.mts → package-Bf3hyuzs.d.mts} +2 -2
  173. package/dist/{package-JtjbO-Oi.mjs → package-CddkNbZI.mjs} +1 -1
  174. package/dist/{package-B01gmu75.mjs → package-ypz4rKvn.mjs} +1 -1
  175. package/dist/package.json +1 -1
  176. package/dist/{profile-N5qGUpF0.mjs → profile-BtznZlq3.mjs} +1 -1
  177. package/dist/{provider-context-zTDSH2x9.mjs → provider-context-BrLZYnDW.mjs} +1 -1
  178. package/dist/{provider-context-CG42JlP9.mjs → provider-context-Dh-VOOYF.mjs} +1 -1
  179. package/dist/{reaction-D3TNwPK8.mjs → reaction-BS0k4eNN.mjs} +1 -1
  180. package/dist/{registry-Dk12tAfv.mjs → registry-BO_bOoky.mjs} +1 -1
  181. package/dist/{resolved-sq8RXNDf.mjs → resolved-DMByz1_2.mjs} +1 -1
  182. package/dist/rules/index.d.mts +1 -1
  183. package/dist/rules/index.mjs +1 -1
  184. package/dist/rules/schemas.d.mts +1 -1
  185. package/dist/runtime-bun/index.mjs +1 -1
  186. package/dist/runtime-node/extension-discovery.d.mts +2 -2
  187. package/dist/runtime-node/extension-discovery.mjs +1 -1
  188. package/dist/runtime-node/extension-validation.d.mts +1 -1
  189. package/dist/runtime-node/extension-validation.mjs +1 -1
  190. package/dist/runtime-node/index.d.mts +4 -6
  191. package/dist/runtime-node/index.mjs +24 -24
  192. package/dist/runtime-node/makaio-config.d.mts +1 -1
  193. package/dist/runtime-node/makaio-config.mjs +1 -1
  194. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  195. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  196. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  197. package/dist/{schema-Dq-7si8u.mjs → schema-DBG7Jq5_.mjs} +1 -1
  198. package/dist/{schema-B3Pf7JP7.d.mts → schema-DKTzriEY.d.mts} +3 -250
  199. package/dist/{schemas-C1mxTfd7.d.mts → schemas-B7zo7Zcx.d.mts} +4 -60
  200. package/dist/schemas-BqD8LlQw.mjs +1 -0
  201. package/dist/{schemas-QWDnauKX.mjs → schemas-CsjN7cmM.mjs} +1 -1
  202. package/dist/schemas-CvHFbzdy.mjs +1 -0
  203. package/dist/{schemas-BfO5jkrL.mjs → schemas-DSkBOdx_.mjs} +1 -1
  204. package/dist/{schemas-OWvBn7AH.d.mts → schemas-DZH9lpxs.d.mts} +4 -4
  205. package/dist/schemas-DplrlAyR.mjs +1 -0
  206. package/dist/{schemas-Dd13TMgU.d.mts → schemas-DvMbcABQ.d.mts} +4 -4
  207. package/dist/scoped-bus-ClwTWqX8.mjs +1 -0
  208. package/dist/{selection-DL3ric7K.mjs → selection-7Ku8DBnh.mjs} +1 -1
  209. package/dist/services/adapter-runtime/index.d.mts +4 -4
  210. package/dist/services/adapter-runtime/index.mjs +1 -1
  211. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  212. package/dist/services/adapter-runtime/schemas.d.mts +2 -2
  213. package/dist/services/adapter-runtime/schemas.mjs +1 -1
  214. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  215. package/dist/services/adapter-subsystem/index.mjs +1 -1
  216. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  217. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  218. package/dist/services/agent-runtime/index.d.mts +2 -2
  219. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  220. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  221. package/dist/services/automation-trigger/index.mjs +1 -1
  222. package/dist/services/capability/index.d.mts +2 -3
  223. package/dist/services/capability/index.mjs +1 -1
  224. package/dist/services/codebase/index.d.mts +2 -2
  225. package/dist/services/codebase/namespace.d.mts +1 -1
  226. package/dist/services/codebase/schemas.d.mts +1 -1
  227. package/dist/services/compression/index.d.mts +2 -2
  228. package/dist/services/compression/namespace.d.mts +1 -1
  229. package/dist/services/compression/schemas.d.mts +1 -1
  230. package/dist/services/context-rules/index.d.mts +1 -1
  231. package/dist/services/context-rules/index.mjs +1 -1
  232. package/dist/services/execution-target/index.d.mts +3 -3
  233. package/dist/services/execution-target/index.mjs +1 -1
  234. package/dist/services/execution-target/namespace.d.mts +1 -1
  235. package/dist/services/execution-target/namespace.mjs +1 -1
  236. package/dist/services/execution-target/schemas.d.mts +1 -1
  237. package/dist/services/execution-target/schemas.mjs +1 -1
  238. package/dist/services/filesystem/index.d.mts +1 -1
  239. package/dist/services/filesystem/index.mjs +1 -1
  240. package/dist/services/filesystem/namespace.d.mts +6 -6
  241. package/dist/services/filesystem/schemas.d.mts +3 -3
  242. package/dist/services/git/namespace.d.mts +0 -18
  243. package/dist/services/git/namespace.mjs +1 -1
  244. package/dist/services/git/schemas.d.mts +1 -10
  245. package/dist/services/git/schemas.mjs +1 -1
  246. package/dist/services/harness/index.mjs +1 -1
  247. package/dist/services/index.d.mts +61 -161
  248. package/dist/services/index.mjs +1 -1
  249. package/dist/services/log-import/browser.d.mts +2 -2
  250. package/dist/services/log-import/index.d.mts +2 -2
  251. package/dist/services/log-import/log-import.d.mts +1 -1
  252. package/dist/services/log-import/log-import.mjs +1 -1
  253. package/dist/services/log-import/namespace.mjs +1 -1
  254. package/dist/services/log-import/schemas.mjs +1 -1
  255. package/dist/services/materialization/index.d.mts +1 -1
  256. package/dist/services/materialization/index.mjs +1 -1
  257. package/dist/services/model-registry/index.d.mts +1 -1
  258. package/dist/services/model-registry/index.mjs +1 -1
  259. package/dist/services/preferences/index.d.mts +2 -2
  260. package/dist/services/preferences/schemas.d.mts +1 -1
  261. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  262. package/dist/services/provider-context/index.d.mts +1 -1
  263. package/dist/services/provider-context/index.mjs +1 -1
  264. package/dist/services/provider-runtime/index.mjs +1 -1
  265. package/dist/services/session/handlers/index.d.mts +1 -1
  266. package/dist/services/session/handlers/index.mjs +1 -1
  267. package/dist/services/session/index.d.mts +10 -10
  268. package/dist/services/session/index.mjs +1 -1
  269. package/dist/services/session/messages/namespace.d.mts +1 -1
  270. package/dist/services/session/messages/namespace.mjs +1 -1
  271. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  272. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  273. package/dist/services/session/session-events/namespace.d.mts +1 -1
  274. package/dist/services/session/session-events/namespace.mjs +1 -1
  275. package/dist/services/session/storage/namespace.d.mts +1 -1
  276. package/dist/services/session/storage/schema.d.mts +2 -2
  277. package/dist/services/session/storage/schema.mjs +1 -1
  278. package/dist/services/session/testing/index.d.mts +1 -22
  279. package/dist/services/session/testing/index.mjs +14 -38
  280. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  281. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  282. package/dist/services/session/turns/namespace.d.mts +1 -1
  283. package/dist/services/session/turns/namespace.mjs +1 -1
  284. package/dist/services/session-editor/index.d.mts +1 -1
  285. package/dist/services/session-editor/index.mjs +1 -1
  286. package/dist/services/settings/index.d.mts +3 -3
  287. package/dist/services/settings/index.mjs +1 -1
  288. package/dist/services/settings/namespace.d.mts +4 -4
  289. package/dist/services/settings/namespace.mjs +1 -1
  290. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  291. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  292. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  293. package/dist/services/settings/storage/index.d.mts +3 -3
  294. package/dist/services/settings/storage/index.mjs +1 -1
  295. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  296. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  297. package/dist/services/subagent/index.d.mts +1 -1
  298. package/dist/services/subagent/index.mjs +1 -1
  299. package/dist/services/subagent-template/index.d.mts +2 -2
  300. package/dist/services/subagent-template/namespace.d.mts +1 -1
  301. package/dist/services/subagent-template/schemas.d.mts +1 -1
  302. package/dist/services/tool-approval/index.d.mts +1 -1
  303. package/dist/services/tool-approval/index.mjs +1 -1
  304. package/dist/services/tools/index.d.mts +1 -1
  305. package/dist/services/tools/index.mjs +1 -1
  306. package/dist/services/tray-menu/index.d.mts +3 -3
  307. package/dist/services/tray-menu/index.mjs +1 -1
  308. package/dist/services/tray-menu/namespace.d.mts +1 -1
  309. package/dist/services/tray-menu/schemas.d.mts +1 -1
  310. package/dist/services/turn/index.d.mts +1 -1
  311. package/dist/services/turn/namespace.d.mts +1 -1
  312. package/dist/services/workflow-transitions/index.d.mts +1 -1
  313. package/dist/services/workflow-transitions/index.mjs +1 -1
  314. package/dist/session-BMy2kRpX.mjs +90 -0
  315. package/dist/session-Cipx34j6.mjs +1 -0
  316. package/dist/{shared-B9AWRm9A.mjs → shared-BFVuCDPx.mjs} +1 -1
  317. package/dist/{skill-DGNtc_ww.mjs → skill-C1D51nhh.mjs} +1 -1
  318. package/dist/{src-BmSQ3rlz.mjs → src-xbmzokNe.mjs} +1 -1
  319. package/dist/storage/drizzle/client.d.mts +1 -1
  320. package/dist/storage/drizzle/client.mjs +1 -1
  321. package/dist/storage/drizzle/index.d.mts +2 -41
  322. package/dist/storage/drizzle/index.mjs +1 -1
  323. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  324. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  325. package/dist/storage/handlers/index.d.mts +1 -1
  326. package/dist/storage/handlers/index.mjs +1 -1
  327. package/dist/tool-approval-service-BVgN9Q1r.mjs +1 -0
  328. package/dist/{tools-DWKWX3eV.mjs → tools-DxwHox1a.mjs} +1 -1
  329. package/dist/{transition-D3zUBTPc.d.mts → transition-C_Ka6b0-.d.mts} +6 -6
  330. package/dist/{types-CtDGkyLx2.d.mts → types-BNjPhj_a.d.mts} +1 -1
  331. package/dist/{types-OKJCOjme.d.mts → types-ClpEaoAm.d.mts} +4 -24
  332. package/dist/{types-DcxBYlPA.d.mts → types-CwvN4uN2.d.mts} +49 -3029
  333. package/dist/ui-kernel/index.d.mts +1 -1
  334. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  335. package/dist/utils/index.d.mts +1 -22
  336. package/dist/utils/index.mjs +2 -2
  337. package/dist/utils/project-manifest.mjs +1 -1
  338. package/dist/{version-BYeVh1pI.mjs → version-BfNnVAGr.mjs} +1 -1
  339. package/dist/{view-builder-B0j9p5C0.d.mts → view-builder-KYsPqV-5.d.mts} +4 -4
  340. package/dist/{visibility-DtDLRBdr.mjs → visibility-Dl1o2I01.mjs} +1 -1
  341. package/dist/worker-node-BDOYPEpi.mjs +1 -0
  342. package/dist/{worker-node-Dtf9ilsR.mjs → worker-node-DJ41Tr-F.mjs} +1 -1
  343. package/dist/workflow-Hzc5jlnV.mjs +1 -0
  344. package/dist/workflow-engine/execution-attempt-repository.d.mts +1 -1
  345. package/dist/workflow-engine/index.d.mts +95 -95
  346. package/dist/workflow-engine/index.mjs +1 -1
  347. package/dist/workflow-engine/package.d.mts +1 -1
  348. package/dist/workflow-engine/package.mjs +1 -1
  349. package/dist/workflow-engine/provider-operation.d.mts +1 -1
  350. package/dist/workflow-engine/testing/index.d.mts +2 -2
  351. package/dist/workflow-engine/testing/index.mjs +1 -1
  352. package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
  353. package/dist/workflow-engine/testing/sqlite.mjs +1 -1
  354. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  355. package/dist/{workflow-transitions-c_VQbyV0.mjs → workflow-transitions-DM0fN_eP.mjs} +1 -1
  356. package/dist/workflow-worker-DARC7UZl.mjs +1 -0
  357. package/package.json +1 -18
  358. package/dist/adapter-Dz1fX5Wa.mjs +0 -1
  359. package/dist/attach-error-Cb3GbeKe.mjs +0 -1
  360. package/dist/bus-UgFdHybD.mjs +0 -1
  361. package/dist/caller-owned-adapter-stub-C1M7FKrv.mjs +0 -1
  362. package/dist/capabilities-BUwuA7XX.mjs +0 -1
  363. package/dist/capability-j3NekkIu.mjs +0 -1
  364. package/dist/code-execution/worker-entry.d.mts +0 -21
  365. package/dist/code-execution/worker-entry.mjs +0 -1
  366. package/dist/code-execution-Ckmn8OZu.mjs +0 -1
  367. package/dist/code-execution-CweDSWco.mjs +0 -1
  368. package/dist/code-execution-DqkQjKa1.mjs +0 -1
  369. package/dist/contracts/code-execution/index.d.mts +0 -2
  370. package/dist/contracts/code-execution/index.mjs +0 -1
  371. package/dist/drizzle/0034_m_msha1388.sql +0 -41
  372. package/dist/drizzle/0035_m_mshgj6x7.sql +0 -40
  373. package/dist/drizzle/0036_m_msivwbgm.sql +0 -1
  374. package/dist/drizzle/0037_runtime_instance_incarnation_counter.sql +0 -6
  375. package/dist/event-B8ELuk6k.mjs +0 -1
  376. package/dist/framework-packages-BHgul8Kl.mjs +0 -1
  377. package/dist/handlers-BsHAFtye.mjs +0 -57
  378. package/dist/identity-OjRlG6dZ.mjs +0 -1
  379. package/dist/index-Bqk0pJBQ2.d.mts +0 -138
  380. package/dist/index-Cny5RvjO.d.mts +0 -800
  381. package/dist/index-DHnSLGP4.d.mts +0 -268
  382. package/dist/index-DQ8o3JGi.d.mts +0 -132
  383. package/dist/index-DWBkiiXH.d.mts +0 -18
  384. package/dist/index-Dg11JxKZ.d.mts +0 -496
  385. package/dist/json-value-BBZ6uGwc.mjs +0 -1
  386. package/dist/json-value-DPqb-SJ8.d.mts +0 -177
  387. package/dist/model-DrzPt3ou.mjs +0 -1
  388. package/dist/namespace-sCPb79-7.mjs +0 -1
  389. package/dist/npm-package-name-DuTYVICk.mjs +0 -1
  390. package/dist/orchestrator-shared-BGlN-m-V.mjs +0 -1
  391. package/dist/ownership-memory-handler-BpGdR_uG.mjs +0 -1
  392. package/dist/ownership-recovery-guard-DyW5vGBr.mjs +0 -1
  393. package/dist/package-DttKA9wN.mjs +0 -1
  394. package/dist/runtime-node/code-execution/index.d.mts +0 -3
  395. package/dist/runtime-node/code-execution/index.mjs +0 -1
  396. package/dist/schemas-C3kyQWGf.mjs +0 -1
  397. package/dist/schemas-TK29KWx-.mjs +0 -1
  398. package/dist/schemas-_2Syo_01.mjs +0 -1
  399. package/dist/scoped-bus-DoPmCJeM.mjs +0 -1
  400. package/dist/services/code-execution/index.d.mts +0 -2
  401. package/dist/services/code-execution/index.mjs +0 -1
  402. package/dist/session-BOpTI79g.mjs +0 -1
  403. package/dist/session-CXOPk3yg.mjs +0 -95
  404. package/dist/tool-approval-service-BFDOFUGC.mjs +0 -1
  405. package/dist/types-Cwza95hS.mjs +0 -1
  406. package/dist/types-DnK6Wa_Y.d.mts +0 -260
  407. package/dist/worker-node-CjuQb9hl.mjs +0 -1
  408. package/dist/workflow-C4mck_NW.mjs +0 -1
  409. package/dist/workflow-worker-aNbdgqml.mjs +0 -1
  410. /package/dist/{adapter-auth-runtime-DHHppU4f.mjs → adapter-auth-runtime-D9Lnl7cc.mjs} +0 -0
  411. /package/dist/{adapter-binding-CATvmGuz.d.mts → adapter-binding-B-FBoCys.d.mts} +0 -0
  412. /package/dist/{ajv-krzJXh1X.mjs → ajv-L5fKxaia.mjs} +0 -0
  413. /package/dist/{attempt-record-codec-BYfYkj4M.mjs → attempt-record-codec-DaFLKR5C.mjs} +0 -0
  414. /package/dist/{await-trigger-Bkg2BQfg.mjs → await-trigger-ph1S0zVI.mjs} +0 -0
  415. /package/dist/{base-orchestrator-B4YW6z_Q.d.mts → base-orchestrator-D9u4NyiM.d.mts} +0 -0
  416. /package/dist/{client-BG0WX5Vz.d.mts → client-4ihewPUm.d.mts} +0 -0
  417. /package/dist/{client-binary-version-verifier-0lCKZOTg.mjs → client-binary-version-verifier-DJajc_Ff.mjs} +0 -0
  418. /package/dist/{client-binary-version-verifier-lcv83Hq3.d.mts → client-binary-version-verifier-jDDZ64Ah.d.mts} +0 -0
  419. /package/dist/{clients-namespace-DLAjOTTb.d.mts → clients-namespace-DFWuUawf.d.mts} +0 -0
  420. /package/dist/{config-namespace-CH7sJZ4f.d.mts → config-namespace-D1kyZj0B.d.mts} +0 -0
  421. /package/dist/{create-static-mount-DxuixuLZ.mjs → create-static-mount-9tnGpIeK.mjs} +0 -0
  422. /package/dist/{cross-spawn-CZygZJMH.mjs → cross-spawn-BIgueAqr.mjs} +0 -0
  423. /package/dist/{cursor-storage-bsc9lZKk.mjs → cursor-storage-ROWfiTh1.mjs} +0 -0
  424. /package/dist/{definition-BrgzUuFk.d.mts → definition-DB-kKc0d.d.mts} +0 -0
  425. /package/dist/{definitions-CRpdnHYM.mjs → definitions-CF6YmEhL.mjs} +0 -0
  426. /package/dist/{descriptor-to-package-CcjdoWP4.mjs → descriptor-to-package-BecVCopf.mjs} +0 -0
  427. /package/dist/{drizzle-Bzc-OGVI.mjs → drizzle-CPv3vdTE.mjs} +0 -0
  428. /package/dist/{esm-i-S5TW72.mjs → esm-CBFWM8u_.mjs} +0 -0
  429. /package/dist/{extension-context-QmFuHdq5.d.mts → extension-context-DzB7ydM3.d.mts} +0 -0
  430. /package/dist/{extension-namespace-QoTTwKPt.mjs → extension-namespace-B554RmCp.mjs} +0 -0
  431. /package/dist/{extension-package-provenance-aYrZuS4W.mjs → extension-package-provenance-Dh_-Z-tE.mjs} +0 -0
  432. /package/dist/{facet-BnMh7Jyc.mjs → facet-DVsW12iF.mjs} +0 -0
  433. /package/dist/{filesystem-service-ZJ43SbBi.d.mts → filesystem-service-Cm2RHKBa.d.mts} +0 -0
  434. /package/dist/{handler-DF1fVDpf.mjs → handler-Bqlk-6BY.mjs} +0 -0
  435. /package/dist/{host-B-_ntOMH.mjs → host-k5yoyKHg.mjs} +0 -0
  436. /package/dist/{index-8NdPPzUh2.d.mts → index--atUpi5l2.d.mts} +0 -0
  437. /package/dist/{index-Ek4y8M9J2.d.mts → index-42UdYStR.d.mts} +0 -0
  438. /package/dist/{index-C4V8Pmi4.d.mts → index-BJAB-BW_.d.mts} +0 -0
  439. /package/dist/{index-l01zsChf.d.mts → index-BJMezANn.d.mts} +0 -0
  440. /package/dist/{index-D037TVsm.d.mts → index-BQprJNA_.d.mts} +0 -0
  441. /package/dist/{index-B4svZC6L.d.mts → index-BRCrFirq.d.mts} +0 -0
  442. /package/dist/{index-jxPncqWZ2.d.mts → index-BSbGB23v.d.mts} +0 -0
  443. /package/dist/{index-BMRB9yhF.d.mts → index-BVcQcphK.d.mts} +0 -0
  444. /package/dist/{index-B2Y1Wvbh.d.mts → index-BcvqDfcN.d.mts} +0 -0
  445. /package/dist/{index-DgspOUa72.d.mts → index-BeENojSx2.d.mts} +0 -0
  446. /package/dist/{index-VzLAV0Yt.d.mts → index-Beo_Ik8-.d.mts} +0 -0
  447. /package/dist/{index-CqdMbYmR.d.mts → index-BgGe9WZz.d.mts} +0 -0
  448. /package/dist/{index-kzIjbrS02.d.mts → index-Bqm0ahTQ.d.mts} +0 -0
  449. /package/dist/{index-B-3I98nw.d.mts → index-C7HcDpHE.d.mts} +0 -0
  450. /package/dist/{index-pvX-BIpr2.d.mts → index-CK3f0bAL.d.mts} +0 -0
  451. /package/dist/{index-B5dP8rj6.d.mts → index-CQuRTeRa.d.mts} +0 -0
  452. /package/dist/{index-BC-6qNeo.d.mts → index-CRmE88hi.d.mts} +0 -0
  453. /package/dist/{index-CVpaGijY.d.mts → index-CvW9_SzR.d.mts} +0 -0
  454. /package/dist/{index-BFWvT0NG.d.mts → index-CxSSdIZz.d.mts} +0 -0
  455. /package/dist/{index-BmevAPME2.d.mts → index-DBadVauL.d.mts} +0 -0
  456. /package/dist/{index-BM56936c.d.mts → index-DP3o_13U.d.mts} +0 -0
  457. /package/dist/{index-BfV8U4XX.d.mts → index-DgOfgjx3.d.mts} +0 -0
  458. /package/dist/{index-8y4hT9WL.d.mts → index-DwLRZscE.d.mts} +0 -0
  459. /package/dist/{index-CmbkCxj-.d.mts → index-E4SET1AA.d.mts} +0 -0
  460. /package/dist/{index-BuMsrli0.d.mts → index-OADt3xlS.d.mts} +0 -0
  461. /package/dist/{capability-service-BW1-teFU.d.mts → index-Ol9RBB0W2.d.mts} +0 -0
  462. /package/dist/{index-CL0Jo1b92.d.mts → index-aoxdnhJ42.d.mts} +0 -0
  463. /package/dist/{index-BTEJfzjE.d.mts → index-bIe_57cL.d.mts} +0 -0
  464. /package/dist/{jsonl-transport-Cyyh5Wje.mjs → jsonl-transport-Bp_6pB2a.mjs} +0 -0
  465. /package/dist/{lib-BqV8hYtk.mjs → lib-Bwdd2m81.mjs} +0 -0
  466. /package/dist/{model-registry-Cixxx2jv.mjs → model-registry-Y854mUml.mjs} +0 -0
  467. /package/dist/{model-registry-C9rFu3kV.mjs → model-registry-yURX738J.mjs} +0 -0
  468. /package/dist/{modes-DwsJ3yVl.mjs → modes-DmUsjHdV.mjs} +0 -0
  469. /package/dist/{namespace-jVTsuZHX.mjs → namespace-B9FEGuEu.mjs} +0 -0
  470. /package/dist/{namespace-NXm_zvL1.mjs → namespace-BFqkUTJp.mjs} +0 -0
  471. /package/dist/{namespace-BUYDmd0r.d.mts → namespace-Bi3CmYQy.d.mts} +0 -0
  472. /package/dist/{namespace-CVFaZv8x.d.mts → namespace-BusZERU8.d.mts} +0 -0
  473. /package/dist/{namespace-B0ftHlK3.d.mts → namespace-ByP1Iipi.d.mts} +0 -0
  474. /package/dist/{namespace-BGRHcrmp.d.mts → namespace-C1D77w7U.d.mts} +0 -0
  475. /package/dist/{namespace-Du0accdE.mjs → namespace-CFjdyNXG.mjs} +0 -0
  476. /package/dist/{namespace-DiwqpB-c.mjs → namespace-CfIW0hpQ.mjs} +0 -0
  477. /package/dist/{namespace-BW3Bfu9h.mjs → namespace-CkBbNFSU.mjs} +0 -0
  478. /package/dist/{namespace-DOezqDti.d.mts → namespace-CrDlawqu.d.mts} +0 -0
  479. /package/dist/{namespace-BdAK0lD8.d.mts → namespace-DX1Ec15L.d.mts} +0 -0
  480. /package/dist/{namespace-tjoxekmf.mjs → namespace-DbNWsPFY.mjs} +0 -0
  481. /package/dist/{namespace-CPG6u60N.d.mts → namespace-Dgg0uoe6.d.mts} +0 -0
  482. /package/dist/{namespace-l-HG1rLF.d.mts → namespace-DwZwGXgF.d.mts} +0 -0
  483. /package/dist/{namespace-DqZweTbX.d.mts → namespace-s2y_NFKf.d.mts} +0 -0
  484. /package/dist/{namespace-DBO1OzYB.d.mts → namespace-yREpGJgG.d.mts} +0 -0
  485. /package/dist/{out-8bOYN6EF.mjs → out-DrhwCgqM.mjs} +0 -0
  486. /package/dist/{package-EGTn-Ng1.mjs → package-CBdvjyyZ.mjs} +0 -0
  487. /package/dist/{packages-Bp124-gx.mjs → packages-FBv3fAOR.mjs} +0 -0
  488. /package/dist/{packages-CxPMEg8D.d.mts → packages-N3-2Kl-Y.d.mts} +0 -0
  489. /package/dist/{platform-CxyYPrkf.mjs → platform-BrsMv_S3.mjs} +0 -0
  490. /package/dist/{provider-operation-DbdyFwNm.d.mts → provider-operation-DJ_TLZFf.d.mts} +0 -0
  491. /package/dist/{providers-C-eekMxD.mjs → providers-CCcn4Ndp.mjs} +0 -0
  492. /package/dist/{providers-namespace-CfZKp-C0.d.mts → providers-namespace-DeJBh6MP.d.mts} +0 -0
  493. /package/dist/{quick-lru-CCEnf7y6.mjs → quick-lru-uwB0hP-y.mjs} +0 -0
  494. /package/dist/{schema-introspection-6-r_KEJQ.mjs → schema-introspection-C1wvklj9.mjs} +0 -0
  495. /package/dist/{schema-C0opCPww.mjs → schema-jIapW8Kb.mjs} +0 -0
  496. /package/dist/{schemas-BXc9qOpl.d.mts → schemas-B3bfVYcL.d.mts} +0 -0
  497. /package/dist/{schemas-BivbWRkG.mjs → schemas-BNdiVBWh.mjs} +0 -0
  498. /package/dist/{schemas-B6Q-qdmn.d.mts → schemas-CD0wOQxx.d.mts} +0 -0
  499. /package/dist/{schemas-B50oWBuj.d.mts → schemas-CeUI2i5j.d.mts} +0 -0
  500. /package/dist/{schemas-ChmQldVH.d.mts → schemas-Cg-Kwp8c.d.mts} +0 -0
  501. /package/dist/{schemas-Pe892GgN.d.mts → schemas-Cv3rR9Sz.d.mts} +0 -0
  502. /package/dist/{schemas-B8hKbBwI.mjs → schemas-DgwEVUt-.mjs} +0 -0
  503. /package/dist/{schemas-D7ScxLrf.d.mts → schemas-VbB1FTxx.d.mts} +0 -0
  504. /package/dist/{schemas-scyC2tFF.mjs → schemas-mLpOfMoN.mjs} +0 -0
  505. /package/dist/{schemas-bfZNpl0B.d.mts → schemas-qA279_j_.d.mts} +0 -0
  506. /package/dist/{schemas-BGvkTiCx.d.mts → schemas-sMoRnBdZ.d.mts} +0 -0
  507. /package/dist/{semver-BI7kTNsY.mjs → semver-DTXuyLcK.mjs} +0 -0
  508. /package/dist/{server-lifecycle-L8zja8t8.d.mts → server-lifecycle-C_8iKgat.d.mts} +0 -0
  509. /package/dist/{server-lifecycle-B_OZnoe-.mjs → server-lifecycle-DKx_fWlq.mjs} +0 -0
  510. /package/dist/{session-lineage-bUkd3fqx.d.mts → session-lineage-D5E142LU.d.mts} +0 -0
  511. /package/dist/{shared-schemas-CQ6blrEW.mjs → shared-schemas-aahW97QW.mjs} +0 -0
  512. /package/dist/{src-BacfeiI4.mjs → src-DHqsl5Pg.mjs} +0 -0
  513. /package/dist/{storage-namespace-BZce8kkW.mjs → storage-namespace-Dz2jsssp.mjs} +0 -0
  514. /package/dist/{storage-namespace-YmE8XCCL.d.mts → storage-namespace-Tf3P5yJ5.d.mts} +0 -0
  515. /package/dist/{storage-namespace-definition-Cca-zwXU.mjs → storage-namespace-definition-CDef0E20.mjs} +0 -0
  516. /package/dist/{supports-color-SV_FgSN2.mjs → supports-color-i7OTnKcZ.mjs} +0 -0
  517. /package/dist/{telemetry-BqoC87F-.mjs → telemetry-BvCBUjFg.mjs} +0 -0
  518. /package/dist/{timeout-DVlN2Zhy.mjs → timeout-B0nYjLc8.mjs} +0 -0
  519. /package/dist/{tray-menu-service-eVVxgPLc.mjs → tray-menu-service-Deo6yyP8.mjs} +0 -0
  520. /package/dist/{types-DdpSEmTO.d.mts → types-CNS55jvt.d.mts} +0 -0
  521. /package/dist/{types-tyv0B605.d.mts → types-Ce6LL25v.d.mts} +0 -0
  522. /package/dist/{types-BlB23n4f.d.mts → types-xCdGghb2.d.mts} +0 -0
  523. /package/dist/{ui-config-B35GloSX.mjs → ui-config-BIyGzMNL.mjs} +0 -0
  524. /package/dist/{variant-Dwnge3J_.mjs → variant-B4uWdxW7.mjs} +0 -0
  525. /package/dist/{window-registry-Pcf35cac.d.mts → window-registry-BLtVx3Iw.d.mts} +0 -0
  526. /package/dist/{window-registry-CKiMJjId.mjs → window-registry-CoBJq3u4.mjs} +0 -0
  527. /package/dist/{zod-json-schema-Dixc-B1T.mjs → zod-json-schema-BAGAFfCN.mjs} +0 -0
@@ -1,18 +1,17 @@
1
- import { g as OwnedAdapterInstance, h as MachineScopedAdapterInstance, w as Turn$1 } from "./index-B0yMCJW8.mjs";
2
- import { a as PipelineStep, o as SessionEditorAction, t as ActionCategory } from "./types-BlB23n4f.mjs";
1
+ import { C as Turn$1, g as OwnedAdapterInstance, h as MachineScopedAdapterInstance } from "./index-DI7-tIL3.mjs";
2
+ import { a as PipelineStep, o as SessionEditorAction, t as ActionCategory } from "./types-xCdGghb2.mjs";
3
3
  import { z } from "zod";
4
4
  import * as _$_makaio_core0 from "@makaio/framework/core";
5
5
  import { ExtractSubjectPayload, SubjectDefinition } from "@makaio/framework/core";
6
6
  import { IMakaioBus } from "@makaio/framework/bus";
7
7
  import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
8
- import { AIReasoningLevel, AdapterRuntimeOptions, AdapterSelection, AdapterSessionClaimRecord, AgentRole, BranchKind, ContextWindowState, ForkOptions, ForkTransforms, ICapabilityProvider, IMakaioSession, JsonValue, MakaioSessionAgent, MakaioSessionEvent, Message, MessageBlock, MessageInput, NativeLocalityVerdict, OwnershipTopology, ResolvedProviderContext, RuntimeInstanceRecord, SessionContext, SessionEventType, SessionExtensionContext, SessionLineage, SessionLineageKind, SessionMessage, SessionMessageBlock, SessionMessageOrigin, SessionOwnershipReclaimReason, SessionOwnershipRecoveryGuard, SessionOwnershipReserveStartServiceResult, SessionSubjects, StartAgentRequest, StartAgentResponse, TurnIngestionMarker, TurnInitiator, TurnUsage } from "@makaio/framework/contracts";
8
+ import { AIReasoningLevel, AdapterRuntimeOptions, AdapterSelection, AdapterSessionClaimRecord, AgentRole, BranchKind, ContextWindowState, ForkOptions, ForkTransforms, ICapabilityProvider, IMakaioSession, JsonValue, MakaioSessionAgent, MakaioSessionEvent, Message, MessageBlock, MessageInput, NativeLocalityVerdict, OwnershipTopology, ResolvedProviderContext, SessionContext, SessionEventType, SessionExtensionContext, SessionLineage, SessionLineageKind, SessionMessage, SessionMessageBlock, SessionMessageOrigin, SessionOwnershipReclaimReason, SessionOwnershipReserveStartServiceResult, SessionSubjects, TurnIngestionMarker, TurnInitiator, TurnUsage } from "@makaio/framework/contracts";
9
9
  import { BaseService } from "@makaio/framework/service-base";
10
10
  import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
11
11
  import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
12
12
  import * as _$_makaio_storage_drizzle0 from "@makaio/framework/storage/drizzle";
13
- import { MakaioDatabase, TransactionLock } from "@makaio/framework/storage/drizzle";
13
+ import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
14
14
  import * as _$drizzle_orm0 from "drizzle-orm";
15
- import { SQL } from "drizzle-orm";
16
15
  import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
17
16
 
18
17
  //#region services/core/src/session/session-service.d.ts
@@ -94,17 +93,6 @@ interface MakaioSessionServiceOptions {
94
93
  */
95
94
  declare class MakaioSessionService extends BaseService {
96
95
  private readonly options;
97
- private ownership;
98
- /**
99
- * Return the currently active ownership-authority incarnation.
100
- *
101
- * Read at adapter construction time rather than cached by the adapter
102
- * subsystem, so reinitializing this service gives every subsequently created
103
- * adapter the newly minted incarnation.
104
- * @returns Active runtime-incarnation identity.
105
- * @throws When the service has not initialized its authority.
106
- */
107
- requireOwnershipInstanceId(): string;
108
96
  /**
109
97
  * Creates a new MakaioSessionService instance.
110
98
  * @param bus - The event bus for inter-service communication
@@ -127,16 +115,6 @@ declare class MakaioSessionService extends BaseService {
127
115
  * that do not register turn storage).
128
116
  */
129
117
  protected onInit(): Promise<void>;
130
- /**
131
- * Retire this process only after the adapter subsystem's earlier teardown has
132
- * published its aggregate evidence.
133
- *
134
- * Reverse dependency ordering destroys the adapter subsystem first. The
135
- * authority then closes admission, drains operations already admitted, and
136
- * stamps retirement only when that published aggregate proves teardown was
137
- * observed.
138
- */
139
- protected onDestroy(): Promise<void>;
140
118
  /**
141
119
  * Arm the ownership reconcile behind the post-coordinator barrier.
142
120
  *
@@ -185,8 +163,6 @@ interface OwnershipAuthorityContext {
185
163
  readonly bus: IMakaioBus;
186
164
  /** Machine identity the authority owns claims under, or `undefined` when it has none. */
187
165
  readonly machineId: string | undefined;
188
- /** Runtime-incarnation identity stamped onto every generation this authority allocates. */
189
- readonly instanceId: string;
190
166
  /** {@inheritDoc OwnershipTopologySchema} */
191
167
  readonly topology: OwnershipTopology;
192
168
  }
@@ -199,24 +175,7 @@ interface OwnershipAuthorityContext {
199
175
  * the authority with *is* what every operation decides under, so there is no
200
176
  * second declaration for the two to drift apart in.
201
177
  */
202
- interface SessionOwnershipAuthorityDeps extends Omit<OwnershipAuthorityContext, 'instanceId'> {
203
- /** Runtime-incarnation identity, or a freshly minted identity in isolated compositions. */
204
- readonly instanceId?: string;
205
- }
206
- /** Private lifecycle control for the locally composed ownership authority. */
207
- interface OwnershipAuthorityHandle {
208
- /** Identity stamped onto generations allocated by this authority. */
209
- readonly instanceId: string;
210
- /** Close admission, drain admitted operations, and retire on observed teardown. */
211
- close(): Promise<void>;
212
- }
213
- /** Authority handlers and the private lifecycle control that owns them. */
214
- interface RegisteredSessionOwnershipAuthority {
215
- /** Idempotent handler cleanups for the containing service. */
216
- readonly cleanups: readonly (() => void)[];
217
- /** Private shutdown capability; deliberately not exposed as a bus subject. */
218
- readonly ownership: OwnershipAuthorityHandle;
219
- }
178
+ type SessionOwnershipAuthorityDeps = OwnershipAuthorityContext;
220
179
  /**
221
180
  * Register the session-ownership authority.
222
181
  *
@@ -225,10 +184,10 @@ interface RegisteredSessionOwnershipAuthority {
225
184
  * a caller out of storage RPCs, a reservation or a movement is three
226
185
  * transactions with windows in which a crash strands an ownership key or
227
186
  * publishes a currency no generation owns.
228
- * @param deps - Bus, machine identity, topology and optional test identity.
229
- * @returns Registered cleanups and the private retirement handle.
187
+ * @param context - Bus, machine identity and topology to compose the authority with.
188
+ * @returns Cleanup function unregistering every handler.
230
189
  */
231
- declare function registerSessionOwnershipAuthority(deps: SessionOwnershipAuthorityDeps): RegisteredSessionOwnershipAuthority;
190
+ declare function registerSessionOwnershipAuthority(context: SessionOwnershipAuthorityDeps): () => void;
232
191
  //#endregion
233
192
  //#region services/core/src/session/ownership/movement-observer.d.ts
234
193
  /**
@@ -434,8 +393,6 @@ declare function mintClaimToken(): string;
434
393
  * diagnostic must report what it observes, and a probe can straddle a delete.
435
394
  * - `agent-disposed` — the agent was removed. A disposed agent can never
436
395
  * legitimately hold a key.
437
- * - `owner-instance-retired` — storage proves the exact process that took this
438
- * generation retired itself.
439
396
  * - `adapter-instance-gone` — no adapter answers for the claim's instance.
440
397
  * Admitted **only** under `machine-exclusive`: where peers may host adapters
441
398
  * on the same machine, an unanswered probe means "not this runtime's", never
@@ -473,15 +430,6 @@ interface CoreSessionServiceHandlerDeps {
473
430
  * `'shared-machine'` — the reading no host can be wrong about.
474
431
  */
475
432
  topology?: OwnershipTopology;
476
- /** Runtime-incarnation identity stamped onto ownership generations. */
477
- instanceId?: string;
478
- }
479
- /** Core handler cleanups plus the private ownership lifecycle handle. */
480
- interface RegisteredCoreSessionServiceHandlers {
481
- /** Cleanup callbacks for the containing service. */
482
- readonly cleanups: readonly (() => void)[];
483
- /** Private authority shutdown capability. */
484
- readonly ownership: OwnershipAuthorityHandle;
485
433
  }
486
434
  /**
487
435
  * Registers the framework-core session service handlers:
@@ -499,9 +447,9 @@ interface RegisteredCoreSessionServiceHandlers {
499
447
  * `session.get` / `session.list` / `session.close` all delegate to
500
448
  * `SessionStorageSubjects.*` which may be unhandled in ephemeral mode.
501
449
  * @param deps - Bus, plus the identity the ownership authority is composed with
502
- * @returns Cleanup callbacks plus the private ownership lifecycle handle.
450
+ * @returns Array of cleanup callbacks, one per registered handler
503
451
  */
504
- declare function registerCoreSessionServiceHandlers(deps: CoreSessionServiceHandlerDeps): RegisteredCoreSessionServiceHandlers;
452
+ declare function registerCoreSessionServiceHandlers(deps: CoreSessionServiceHandlerDeps): Array<() => void>;
505
453
  //#endregion
506
454
  //#region services/core/src/session/session-orchestrator.d.ts
507
455
  /**
@@ -516,7 +464,52 @@ interface ISessionOrchestrator {
516
464
  /** Stop the orchestrator and clean up all subscriptions. */
517
465
  destroy(): void;
518
466
  }
519
- /** Coordinates session sends, recovery and turn completion. */
467
+ /**
468
+ * Slim framework session orchestrator.
469
+ *
470
+ * Composes with `SessionTurnManager` (turn lifecycle, usage accumulation,
471
+ * completion), `AdapterRegistry` (adapterName to adapterId mapping), and the
472
+ * adapter-subsystem reverse lookup for canonical `adapterId` to `adapterName`
473
+ * validation when callers select a direct adapter instance.
474
+ *
475
+ * Registers the core session orchestration handlers:
476
+ * 1. Get or create session (via `getOrCreateSession`)
477
+ * 2. Resolve any start the session has in flight (via `resolveInFlightStarts`),
478
+ * before anything probes an agent or concludes the session has none
479
+ * 2b. Refuse a send that stated targets (named ids or `'all'`) against a session
480
+ * that has none — before the start below, so a refused send leaves no agent
481
+ * and no reservation; only the default send may bootstrap a session
482
+ * 3. Start the lead agent if the session has no agents — resolves the canonical
483
+ * `adapterName` from direct selections, uses `adapterId` directly when
484
+ * provided, otherwise resolves it via `AdapterRegistry`, resolves provider
485
+ * credentials when selected, then runs the reserved start (via
486
+ * `startLeadAgent`)
487
+ * 4. Resolve target agents (via `resolveTargetAgents`)
488
+ * 5. Verify agent liveness and recover dead agents under one recovery plan
489
+ * (requestOptional `AdapterSubjects.getAgent` + `buildPlannedRecoveryContext`)
490
+ * 6. Get or create turn (via `SessionTurnManager`), generate the message ID and
491
+ * store the user message (awaited, persist-before-route) + routing records
492
+ * (fire-and-forget)
493
+ * 7. Emit `session.turn.started` + `session.user_message.sent`
494
+ * 8. Route to agents (via `routeToAgentsCore`, single shared context)
495
+ * 9. Return result with `messageId`, `turnId`, `sessionId`
496
+ *
497
+ * Explicit `session.agent.attach` handlers share the same turn manager so
498
+ * attach-time initial messages participate in the same completion lifecycle.
499
+ *
500
+ * Host-specific features (personas, MCP, execution targets, container spawn,
501
+ * connector swap, CWD/model enforcement, fork context, TurnContextEnricher) are
502
+ * handled by a host-provided orchestrator.
503
+ * @example
504
+ * ```typescript
505
+ * const orchestrator = new SessionOrchestrator(MakaioBus, 'machine-id');
506
+ *
507
+ * const { messageId, turnId, sessionId } = await MakaioBus.request(
508
+ * SessionSubjects.sendMessage,
509
+ * { sessionId: crypto.randomUUID(), adapterName: 'openai-node', message: 'Hello!' },
510
+ * );
511
+ * ```
512
+ */
520
513
  declare class SessionOrchestrator implements ISessionOrchestrator {
521
514
  private readonly bus;
522
515
  private readonly turnManager;
@@ -531,8 +524,84 @@ declare class SessionOrchestrator implements ISessionOrchestrator {
531
524
  * instance resolution).
532
525
  */
533
526
  constructor(bus: IMakaioBus | undefined, machineId: string);
534
- /** Register the `session.sendMessage` RPC handler. */
527
+ /**
528
+ * Register the `session.sendMessage` RPC handler.
529
+ *
530
+ * Core flow:
531
+ * 1. Get or create session
532
+ * 2. Join or arbitrate every start the session has in flight
533
+ * 2b. Refuse a target-stating send (named ids or `'all'`) against a session
534
+ * with no agents, before the bootstrap can leave state behind a send that
535
+ * cannot deliver
536
+ * 3. Start the lead agent if the session has no agents (canonicalize direct
537
+ * selections, resolve adapterId, resolve provider credentials, reserved start)
538
+ * 4. Resolve target agents
539
+ * 5. Verify agent liveness and recover dead agents under one recovery plan
540
+ * 6. Get or create turn (via SessionTurnManager), generate the message ID and
541
+ * store the user message (awaited) + routing records (fire-and-forget)
542
+ * 7. Emit turn.started + user_message.sent
543
+ * 8. Route to agents (routeToAgentsCore, single shared context)
544
+ * 9. Return result with messageId, turnId, sessionId
545
+ */
535
546
  private registerSendMessageHandler;
547
+ /**
548
+ * Probe this send's targets and recover the ones that are gone.
549
+ *
550
+ * **An agent whose in-flight start this send consumed *locally* needs no
551
+ * probe; one it merely out-raced does.** The distinction is the evidence
552
+ * behind the verdict. A locally joined attempt reported what it built, and
553
+ * this process ran it. A won compare-and-swap reports only that this caller
554
+ * wrote a status first: the attempt it outran belongs to a process this
555
+ * runtime cannot see, and writing `dead` does not make the agent dead. Wave 3
556
+ * cannot ask whether that process is alive (OQ-B, Wave 4) — but it can ask
557
+ * whether a *connector* answers, which is what the probe already does for
558
+ * every other target and the only instrument here that carries evidence
559
+ * across processes. Skipping it there was the send believing its own status
560
+ * write, and it is what let a second lifecycle open beside a live one.
561
+ *
562
+ * The framework orchestrator evaluates no locality, so it can make only one
563
+ * honest recovery decision: the replacement connector starts fresh and the
564
+ * stored conversation is injected. Holding it as a plan keeps the history
565
+ * assembly and the rehydrate reading one decision — a host that later resumes
566
+ * natively here changes that value alone and both sides follow.
567
+ *
568
+ * Each recovery is reserved and runs inside the in-flight-start seam, which
569
+ * the entry-point inventory requires of every service-owned path that can
570
+ * reach a lifecycle call for an *existing* agent identity: two concurrent
571
+ * sends onto one dead agent would otherwise dispatch two rehydrates, and the
572
+ * second would race the first's connector.
573
+ * @param session - Session being sent to.
574
+ * @param targetAgents - Targets this send materialised.
575
+ * @param recovering - Agents whose in-flight start this send already claimed.
576
+ * @param arbitrated - Of those, the ones claimed by compare-and-swap against another process.
577
+ * @returns The injected history, when any agent needed it, and the agents this runtime may not drive.
578
+ */
579
+ private recoverDeadTargets;
580
+ /**
581
+ * Re-resolve a send's targets around agents this runtime may not drive.
582
+ *
583
+ * The three send forms degrade differently, and the difference is deliberate:
584
+ *
585
+ * - **lead-default** — a deferred lead is always *total*, because target
586
+ * resolution raises for a session whose named lead it cannot resolve, so
587
+ * there is no state in which the default send proceeds with "the other
588
+ * usable agents". The session re-enters the fresh-start branch and gains a
589
+ * **new** lead agent, which the stored conversation is injected into. That
590
+ * is what fresh-with-history means once the old agent is owned elsewhere: a
591
+ * fresh *agent*, not a second connector bolted onto one this runtime does
592
+ * not own.
593
+ * - **`'all'`** — deliver to the usable ones; a broadcast with no recipient
594
+ * is not a delivery and fails.
595
+ * - **an explicit array** — deliver to the usable ones; a caller that named
596
+ * its agents gets a failure rather than a substitute, because substituting
597
+ * would answer a question nobody asked.
598
+ * @param context - The send's identity, target spec and start inputs.
599
+ * @param targetAgents - Targets as this send materialised them.
600
+ * @param deferredAgentIds - Agents held by a generation this runtime does not own.
601
+ * @returns The surviving targets, and what a replacement start left for the caller to finish.
602
+ * @throws A {@link SessionStartError} when every target deferred and no fresh start applies.
603
+ */
604
+ private retargetAfterDeferral;
536
605
  /**
537
606
  * Start the session's lead agent, reserved and in the order §7.1 prescribes.
538
607
  *
@@ -549,7 +618,6 @@ declare class SessionOrchestrator implements ISessionOrchestrator {
549
618
  * @param agentSelection - Public agent selection from the request.
550
619
  * @param message - User message, used as canonical-model prompt context.
551
620
  * @param sessionContext - Session context passed through to the adapter.
552
- * @param leadTransition - Whether this start creates or replaces the durable lead.
553
621
  * @returns What the adopted agents need, empty unless a race was lost.
554
622
  */
555
623
  private startLeadAgent;
@@ -591,10 +659,12 @@ declare class AdapterRegistry {
591
659
  * adapters that restart emit a fresh initialized event and the registry should
592
660
  * reflect the latest instance.
593
661
  *
594
- * Every initialization announcement carries the machine that hosts the exact
595
- * adapter ID, so event fallback may serve only that same scope. The unscoped
596
- * entry remains for legacy observers that intentionally make no ownership
597
- * assertion.
662
+ * **The event names no machine**, and the bus can span hosts, so an instance
663
+ * learned this way is *unattributed*: it says an adapter of this name exists
664
+ * somewhere reachable, not that it belongs to any particular machine. It is
665
+ * therefore cached in the unscoped scope only, and a lookup that named a
666
+ * machine is never served from it — answering one would be a guess about the
667
+ * very identity the caller was careful enough to name.
598
668
  * @param bus - The event bus to listen on
599
669
  */
600
670
  constructor(bus: IMakaioBus);
@@ -710,10 +780,6 @@ declare function resolveTargetAgents(session: IMakaioSession, targetSpec: string
710
780
  declare function findTurnByAgent(activeTurns: Map<string, Turn$1>, agentId: string): Turn$1 | undefined;
711
781
  //#endregion
712
782
  //#region services/core/src/session/utils/start-reservation.d.ts
713
- /** Adapter identity sufficient to route every reservation to one authority. */
714
- type ReservationAdapterInstance = OwnedAdapterInstance & {
715
- readonly ownerInstanceId: string;
716
- };
717
783
  /** What every start reservation names, whatever role it takes. */
718
784
  interface StartReservationIdentity {
719
785
  /** Session the agent belongs to; verified against the agent row by the authority. */
@@ -723,11 +789,9 @@ interface StartReservationIdentity {
723
789
  /** Adapter type name carried onto any claim for diagnostics. */
724
790
  readonly adapterName: string;
725
791
  /** Instance the dispatch addresses, and the machine its ownership acts are filed under. */
726
- readonly instance: ReservationAdapterInstance;
792
+ readonly instance: OwnedAdapterInstance;
727
793
  /** Provider session to reserve, or `null` for a start with no key yet. */
728
794
  readonly resumeProviderSessionId: string | null;
729
- /** Caller-minted identity for the reservation generation. */
730
- readonly claimToken: string;
731
795
  }
732
796
  /**
733
797
  * The designation half, as a union rather than an optional field.
@@ -746,10 +810,7 @@ type StartReservationDesignation = {
746
810
  /** This start leaves the designation untouched. */readonly role: Exclude<AgentRole, 'lead'>;
747
811
  };
748
812
  /** Everything a start reservation names beyond the instance it runs against. */
749
- type StartReservationRequest = StartReservationIdentity & StartReservationDesignation & {
750
- /** Atomic snapshot for a member recovery; absent for ordinary starts. */readonly recoveryGuard?: SessionOwnershipRecoveryGuard; /** Opaque fence for this guarded recovery attempt. */
751
- readonly recoveryAttemptId?: string;
752
- };
813
+ type StartReservationRequest = StartReservationIdentity & StartReservationDesignation;
753
814
  /**
754
815
  * Take one start reservation.
755
816
  *
@@ -912,8 +973,9 @@ interface RecoveryConfig {
912
973
  * while the authority files the acts under its default, which is the mixed key
913
974
  * the aggregate exists to prevent.
914
975
  *
915
- * Omitted when the caller cannot target a real machine. Such a recovery is
916
- * deferred before it can dispatch a connector.
976
+ * Omitted only by a caller that genuinely has no machine identity — a headless
977
+ * host, a test composition — where every act is unscoped and consistent for
978
+ * that reason.
917
979
  */
918
980
  machineId?: string;
919
981
  }
@@ -989,12 +1051,11 @@ interface VerifiedAgents {
989
1051
  * The caller's `recoveryConfig.plan` applies to every agent recovered in this
990
1052
  * batch and must be the same plan the caller feeds to its history assembly.
991
1053
  *
992
- * The **adapter instance is resolved per agent**, inside the exclusive recovery
993
- * attempt, and not once for the batch: a batch may span adapters, and a
994
- * persisted `adapterId` goes stale across a runtime restart or failover.
995
- * Resolving per agent is what keeps each rehydrate addressed to the live
996
- * instance that actually owns that agent's adapter, and keeps a single
997
- * unresolvable adapter from deciding the batch.
1054
+ * The **adapter instance is resolved per agent**, inside the loop, and not once
1055
+ * for the batch: a batch may span adapters, and a persisted `adapterId` goes
1056
+ * stale across a runtime restart or failover. Resolving per agent is what keeps
1057
+ * each rehydrate addressed to the live instance that actually owns that agent's
1058
+ * adapter, and keeps a single unresolvable adapter from deciding the batch.
998
1059
  * @param bus - Bus instance
999
1060
  * @param agents - Agents to verify
1000
1061
  * @param recoveryConfig - Configuration for recovering dead agents, including the shared recovery plan
@@ -1031,11 +1092,15 @@ type AgentRecoveryOutcome = /** A connector is live again; the agent carries the
1031
1092
  * Context delivery happens via the normal sendMessage path that follows
1032
1093
  * recovery (same handler invocation). No staging needed.
1033
1094
  *
1034
- * Every invocation that wins the exclusive seam reads the canonical recovery
1035
- * snapshot and resolves its live adapter instance itself. A join can leave a
1036
- * different status, binding, or holder generation behind, so carrying any of
1037
- * those planning facts into a self-reentry would make its guarded reservation
1038
- * describe the attempt it joined rather than the row it is about to claim.
1095
+ * **The instance is an input, never resolved here — and it arrives with its
1096
+ * machine.** The ownership key is `(machine, adapter instance, provider session)`,
1097
+ * so the reservation this makes has to name the very instance the rehydrate is
1098
+ * dispatched to, in the namespace of the machine that instance was derived for.
1099
+ * Resolving internally would put the reservation and the dispatch in two
1100
+ * different namespaces whenever the persisted ID went stale; taking the machine
1101
+ * as a *second*, independent input would let a caller supply two halves that
1102
+ * were never one key. The resolver hands out both together or neither, and this
1103
+ * signature only accepts it that way.
1039
1104
  *
1040
1105
  * The reserved rehydrate runs inside the in-flight-start seam, so a concurrent
1041
1106
  * consumer that finds this agent mid-recovery joins the attempt instead of
@@ -1046,10 +1111,12 @@ type AgentRecoveryOutcome = /** A connector is live again; the agent carries the
1046
1111
  * @param deadAgent - The dead agent to recover; its `adapterId` is re-stamped to the instance the
1047
1112
  * attempt actually used
1048
1113
  * @param recoveryConfig - Configuration for the recovered connector
1114
+ * @param instance - Live instance to rehydrate into and the machine its ownership acts name, resolved
1115
+ * by the caller for THIS agent
1049
1116
  * @returns The recovered agent, or the statement that this runtime may not drive it
1050
1117
  * @throws Whatever {@link failedRehydrateError} raises when the recovery failed rather than deferred
1051
1118
  */
1052
- declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, recoveryConfig: RecoveryConfig): Promise<AgentRecoveryOutcome>;
1119
+ declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, recoveryConfig: RecoveryConfig, instance: OwnedAdapterInstance): Promise<AgentRecoveryOutcome>;
1053
1120
  //#endregion
1054
1121
  //#region services/core/src/session/utils/turn-initiator.d.ts
1055
1122
  /**
@@ -1064,72 +1131,6 @@ declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, re
1064
1131
  */
1065
1132
  declare function buildTurnInitiator(source: 'extension' | 'user' | 'system' | undefined, extensionId: string | undefined): TurnInitiator;
1066
1133
  //#endregion
1067
- //#region services/core/src/session/handlers/lead-start-request.d.ts
1068
- /** Fully-owned payload supplied to a host-specific lead-start dispatcher. */
1069
- type LeadStartDispatchRequest = StartAgentRequest & {
1070
- /** Framework-minted identity of this exact attempt. */readonly agentId: string; /** Runtime incarnation selected by the ownership reservation. */
1071
- readonly ownerInstanceId: string;
1072
- };
1073
- /**
1074
- * Host-specific transport policy for one already-reserved lead start.
1075
- *
1076
- * The callback may choose how the request reaches the selected adapter, but it
1077
- * does not own identity, persistence, reservation, settlement, or cleanup.
1078
- */
1079
- type LeadStartDispatch = (request: LeadStartDispatchRequest) => Promise<StartAgentResponse>;
1080
- /** Whether this start creates the first lead or replaces an existing one. */
1081
- type LeadTransition = {
1082
- readonly kind: 'fresh';
1083
- } | {
1084
- readonly kind: 'replace';
1085
- };
1086
- /** Everything a lead transition needs beyond the payload it dispatches. */
1087
- interface LeadStartRequest {
1088
- /** Session the agent is started into. */
1089
- readonly sessionId: string;
1090
- /** Machine-scoped adapter runtime selected for dispatch and ownership. */
1091
- readonly instance: MachineScopedAdapterInstance;
1092
- /** Adapter type name, carried onto the agent row and any claim. */
1093
- readonly adapterName: string;
1094
- /** Provider config to stamp on the agent's runtime row once the start lands. */
1095
- readonly providerConfigId?: string;
1096
- /** Persona identity persisted before the adapter can create a connector. */
1097
- readonly personaId?: string;
1098
- /** Profile identity persisted before the adapter can create a connector. */
1099
- readonly profileId?: string;
1100
- /** Explicit lifecycle transition; never inferred from designation identity. */
1101
- readonly leadTransition: LeadTransition;
1102
- /** Lead designation the caller observed before entering the reservation. */
1103
- readonly expectedLeadAgentId: string | null;
1104
- /** Adapter payload, complete except for the attempt identity minted by this service. */
1105
- readonly startRequest: StartAgentRequest;
1106
- /** Optional host transport policy; the bus request remains the default. */
1107
- readonly dispatch?: LeadStartDispatch;
1108
- }
1109
- /** How a lead transition ended, for the caller that has a send to continue. */
1110
- type LeadStartResult = {
1111
- /** The agent is live, owns its provider session and is `idle` in storage. */outcome: 'started'; /** The agent row as it now stands, for the caller's in-memory session. */
1112
- agent: MakaioSessionAgent;
1113
- } | {
1114
- /** Another start won the designation race and this attempt left nothing behind. */outcome: 'lead-conflict'; /** Lead the session actually names, or `null` when it has none. */
1115
- currentLeadAgentId: string | null;
1116
- };
1117
- //#endregion
1118
- //#region services/core/src/session/handlers/lead-start.d.ts
1119
- /**
1120
- * Start or replace a session lead under the ownership reservation.
1121
- *
1122
- * The whole attempt runs inside the in-flight-start seam, registered *before*
1123
- * the agent row is written. There is therefore no instant at which a `starting`
1124
- * row is visible without an entry a concurrent consumer can join, which is what
1125
- * lets that consumer wait for this attempt instead of opening a second
1126
- * lifecycle for the same identity.
1127
- * @param bus - Bus every step is issued on.
1128
- * @param request - The start to run.
1129
- * @returns The started agent, or the designation race this start lost.
1130
- */
1131
- declare function startLeadAgent(bus: IMakaioBus, request: LeadStartRequest): Promise<LeadStartResult>;
1132
- //#endregion
1133
1134
  //#region services/core/src/session/session-orchestrator-selection.d.ts
1134
1135
  /** What resolving a fresh start's instance needs beyond the selection itself. */
1135
1136
  interface SelectionInstanceContext {
@@ -1172,8 +1173,8 @@ interface SelectionInstanceContext {
1172
1173
  * @param selection - Direct adapter selection this start runs from.
1173
1174
  * @param context - Adapter name, session identity, this runtime's machine and its instance registry.
1174
1175
  * @returns The instance and the machine, as one key.
1175
- * @throws A {@link SessionStartError} when an identity is incomplete or its
1176
- * complete explicit triple has no matching live announcement.
1176
+ * @throws A {@link SessionStartError} when a named instance carries no machine, or
1177
+ * a named machine carries no instance.
1177
1178
  */
1178
1179
  declare function resolveSelectionOwnedInstance(bus: IMakaioBus, selection: AdapterSelection, context: SelectionInstanceContext): Promise<MachineScopedAdapterInstance>;
1179
1180
  //#endregion
@@ -1668,11 +1669,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
1668
1669
  adapterId: z.ZodString;
1669
1670
  adapterName: z.ZodString;
1670
1671
  sessionId: z.ZodString;
1671
- runtimeOwner: z.ZodOptional<z.ZodObject<{
1672
- machineId: z.ZodString;
1673
- instanceId: z.ZodString;
1674
- }, z.core.$strip>>;
1675
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
1676
1672
  adapterSessionId: z.ZodOptional<z.ZodString>;
1677
1673
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
1678
1674
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -1733,11 +1729,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
1733
1729
  adapterId: z.ZodString;
1734
1730
  adapterName: z.ZodString;
1735
1731
  sessionId: z.ZodString;
1736
- runtimeOwner: z.ZodOptional<z.ZodObject<{
1737
- machineId: z.ZodString;
1738
- instanceId: z.ZodString;
1739
- }, z.core.$strip>>;
1740
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
1741
1732
  adapterSessionId: z.ZodOptional<z.ZodString>;
1742
1733
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
1743
1734
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -1817,11 +1808,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
1817
1808
  adapterId: z.ZodString;
1818
1809
  adapterName: z.ZodString;
1819
1810
  sessionId: z.ZodString;
1820
- runtimeOwner: z.ZodOptional<z.ZodObject<{
1821
- machineId: z.ZodString;
1822
- instanceId: z.ZodString;
1823
- }, z.core.$strip>>;
1824
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
1825
1811
  adapterSessionId: z.ZodOptional<z.ZodString>;
1826
1812
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
1827
1813
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -1876,11 +1862,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
1876
1862
  adapterId: z.ZodString;
1877
1863
  adapterName: z.ZodString;
1878
1864
  sessionId: z.ZodString;
1879
- runtimeOwner: z.ZodOptional<z.ZodObject<{
1880
- machineId: z.ZodString;
1881
- instanceId: z.ZodString;
1882
- }, z.core.$strip>>;
1883
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
1884
1865
  adapterSessionId: z.ZodOptional<z.ZodString>;
1885
1866
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
1886
1867
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -1986,10 +1967,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
1986
1967
  request: z.ZodObject<{
1987
1968
  agentId: z.ZodString;
1988
1969
  adapterId: z.ZodOptional<z.ZodString>;
1989
- runtimeOwner: z.ZodOptional<z.ZodObject<{
1990
- machineId: z.ZodString;
1991
- instanceId: z.ZodString;
1992
- }, z.core.$strip>>;
1993
1970
  adapterSessionId: z.ZodOptional<z.ZodString>;
1994
1971
  cwd: z.ZodOptional<z.ZodString>;
1995
1972
  model: z.ZodOptional<z.ZodString>;
@@ -2082,63 +2059,6 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
2082
2059
  }, {}, {
2083
2060
  length: number | undefined;
2084
2061
  }>;
2085
- ownerMachineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
2086
- name: "owner_machine_id";
2087
- tableName: "agents";
2088
- dataType: "string";
2089
- columnType: "SQLiteText";
2090
- data: string;
2091
- driverParam: string;
2092
- notNull: false;
2093
- hasDefault: false;
2094
- isPrimaryKey: false;
2095
- isAutoincrement: false;
2096
- hasRuntimeDefault: false;
2097
- enumValues: [string, ...string[]];
2098
- baseColumn: never;
2099
- identity: undefined;
2100
- generated: undefined;
2101
- }, {}, {
2102
- length: number | undefined;
2103
- }>;
2104
- ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
2105
- name: "owner_instance_id";
2106
- tableName: "agents";
2107
- dataType: "string";
2108
- columnType: "SQLiteText";
2109
- data: string;
2110
- driverParam: string;
2111
- notNull: false;
2112
- hasDefault: false;
2113
- isPrimaryKey: false;
2114
- isAutoincrement: false;
2115
- hasRuntimeDefault: false;
2116
- enumValues: [string, ...string[]];
2117
- baseColumn: never;
2118
- identity: undefined;
2119
- generated: undefined;
2120
- }, {}, {
2121
- length: number | undefined;
2122
- }>;
2123
- recoveryAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
2124
- name: "recovery_attempt_id";
2125
- tableName: "agents";
2126
- dataType: "string";
2127
- columnType: "SQLiteText";
2128
- data: string;
2129
- driverParam: string;
2130
- notNull: false;
2131
- hasDefault: false;
2132
- isPrimaryKey: false;
2133
- isAutoincrement: false;
2134
- hasRuntimeDefault: false;
2135
- enumValues: [string, ...string[]];
2136
- baseColumn: never;
2137
- identity: undefined;
2138
- generated: undefined;
2139
- }, {}, {
2140
- length: number | undefined;
2141
- }>;
2142
2062
  adapterSessionId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
2143
2063
  name: "adapter_session_id";
2144
2064
  tableName: "agents";
@@ -2498,11 +2418,6 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
2498
2418
  adapterId: z.ZodString;
2499
2419
  adapterName: z.ZodString;
2500
2420
  sessionId: z.ZodString;
2501
- runtimeOwner: z.ZodOptional<z.ZodObject<{
2502
- machineId: z.ZodString;
2503
- instanceId: z.ZodString;
2504
- }, z.core.$strip>>;
2505
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
2506
2421
  adapterSessionId: z.ZodOptional<z.ZodString>;
2507
2422
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
2508
2423
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -2563,11 +2478,6 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
2563
2478
  adapterId: z.ZodString;
2564
2479
  adapterName: z.ZodString;
2565
2480
  sessionId: z.ZodString;
2566
- runtimeOwner: z.ZodOptional<z.ZodObject<{
2567
- machineId: z.ZodString;
2568
- instanceId: z.ZodString;
2569
- }, z.core.$strip>>;
2570
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
2571
2481
  adapterSessionId: z.ZodOptional<z.ZodString>;
2572
2482
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
2573
2483
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -2647,11 +2557,6 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
2647
2557
  adapterId: z.ZodString;
2648
2558
  adapterName: z.ZodString;
2649
2559
  sessionId: z.ZodString;
2650
- runtimeOwner: z.ZodOptional<z.ZodObject<{
2651
- machineId: z.ZodString;
2652
- instanceId: z.ZodString;
2653
- }, z.core.$strip>>;
2654
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
2655
2560
  adapterSessionId: z.ZodOptional<z.ZodString>;
2656
2561
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
2657
2562
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -2706,11 +2611,6 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
2706
2611
  adapterId: z.ZodString;
2707
2612
  adapterName: z.ZodString;
2708
2613
  sessionId: z.ZodString;
2709
- runtimeOwner: z.ZodOptional<z.ZodObject<{
2710
- machineId: z.ZodString;
2711
- instanceId: z.ZodString;
2712
- }, z.core.$strip>>;
2713
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
2714
2614
  adapterSessionId: z.ZodOptional<z.ZodString>;
2715
2615
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
2716
2616
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -2816,10 +2716,6 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
2816
2716
  request: z.ZodObject<{
2817
2717
  agentId: z.ZodString;
2818
2718
  adapterId: z.ZodOptional<z.ZodString>;
2819
- runtimeOwner: z.ZodOptional<z.ZodObject<{
2820
- machineId: z.ZodString;
2821
- instanceId: z.ZodString;
2822
- }, z.core.$strip>>;
2823
2719
  adapterSessionId: z.ZodOptional<z.ZodString>;
2824
2720
  cwd: z.ZodOptional<z.ZodString>;
2825
2721
  model: z.ZodOptional<z.ZodString>;
@@ -2849,8 +2745,6 @@ interface SessionStorageMemoryState {
2849
2745
  readonly agents: Map<string, MakaioSessionAgent>;
2850
2746
  /** Claim rows keyed by `claimId`. */
2851
2747
  readonly claims: Map<string, AdapterSessionClaimRecord>;
2852
- /** Runtime-instance rows keyed by the process/machine pair. */
2853
- readonly runtimeInstances: Map<string, RuntimeInstanceRecord>;
2854
2748
  }
2855
2749
  /**
2856
2750
  * Allocate a fresh, empty in-memory state instance.
@@ -3698,63 +3592,6 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
3698
3592
  }, {}, {
3699
3593
  length: number | undefined;
3700
3594
  }>;
3701
- ownerMachineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
3702
- name: "owner_machine_id";
3703
- tableName: "agents";
3704
- dataType: "string";
3705
- columnType: "SQLiteText";
3706
- data: string;
3707
- driverParam: string;
3708
- notNull: false;
3709
- hasDefault: false;
3710
- isPrimaryKey: false;
3711
- isAutoincrement: false;
3712
- hasRuntimeDefault: false;
3713
- enumValues: [string, ...string[]];
3714
- baseColumn: never;
3715
- identity: undefined;
3716
- generated: undefined;
3717
- }, {}, {
3718
- length: number | undefined;
3719
- }>;
3720
- ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
3721
- name: "owner_instance_id";
3722
- tableName: "agents";
3723
- dataType: "string";
3724
- columnType: "SQLiteText";
3725
- data: string;
3726
- driverParam: string;
3727
- notNull: false;
3728
- hasDefault: false;
3729
- isPrimaryKey: false;
3730
- isAutoincrement: false;
3731
- hasRuntimeDefault: false;
3732
- enumValues: [string, ...string[]];
3733
- baseColumn: never;
3734
- identity: undefined;
3735
- generated: undefined;
3736
- }, {}, {
3737
- length: number | undefined;
3738
- }>;
3739
- recoveryAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
3740
- name: "recovery_attempt_id";
3741
- tableName: "agents";
3742
- dataType: "string";
3743
- columnType: "SQLiteText";
3744
- data: string;
3745
- driverParam: string;
3746
- notNull: false;
3747
- hasDefault: false;
3748
- isPrimaryKey: false;
3749
- isAutoincrement: false;
3750
- hasRuntimeDefault: false;
3751
- enumValues: [string, ...string[]];
3752
- baseColumn: never;
3753
- identity: undefined;
3754
- generated: undefined;
3755
- }, {}, {
3756
- length: number | undefined;
3757
- }>;
3758
3595
  adapterSessionId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
3759
3596
  name: "adapter_session_id";
3760
3597
  tableName: "agents";
@@ -4092,145 +3929,6 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
4092
3929
  };
4093
3930
  dialect: "sqlite";
4094
3931
  }>;
4095
- runtimeInstanceIncarnationCounters: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
4096
- name: "runtime_instance_incarnation_counters";
4097
- schema: undefined;
4098
- columns: {
4099
- machineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4100
- name: "machine_id";
4101
- tableName: "runtime_instance_incarnation_counters";
4102
- dataType: "string";
4103
- columnType: "SQLiteText";
4104
- data: string;
4105
- driverParam: string;
4106
- notNull: true;
4107
- hasDefault: false;
4108
- isPrimaryKey: true;
4109
- isAutoincrement: false;
4110
- hasRuntimeDefault: false;
4111
- enumValues: [string, ...string[]];
4112
- baseColumn: never;
4113
- identity: undefined;
4114
- generated: undefined;
4115
- }, {}, {
4116
- length: number | undefined;
4117
- }>;
4118
- lastAllocatedIncarnation: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4119
- name: string;
4120
- tableName: "runtime_instance_incarnation_counters";
4121
- dataType: "number";
4122
- columnType: "SQLiteInteger";
4123
- data: number;
4124
- driverParam: number;
4125
- notNull: true;
4126
- hasDefault: false;
4127
- isPrimaryKey: false;
4128
- isAutoincrement: false;
4129
- hasRuntimeDefault: false;
4130
- enumValues: undefined;
4131
- baseColumn: never;
4132
- identity: undefined;
4133
- generated: undefined;
4134
- }, {}, {}>;
4135
- };
4136
- dialect: "sqlite";
4137
- }>;
4138
- runtimeInstances: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
4139
- name: "runtime_instances";
4140
- schema: undefined;
4141
- columns: {
4142
- instanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4143
- name: "instance_id";
4144
- tableName: "runtime_instances";
4145
- dataType: "string";
4146
- columnType: "SQLiteText";
4147
- data: string;
4148
- driverParam: string;
4149
- notNull: true;
4150
- hasDefault: false;
4151
- isPrimaryKey: false;
4152
- isAutoincrement: false;
4153
- hasRuntimeDefault: false;
4154
- enumValues: [string, ...string[]];
4155
- baseColumn: never;
4156
- identity: undefined;
4157
- generated: undefined;
4158
- }, {}, {
4159
- length: number | undefined;
4160
- }>;
4161
- machineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4162
- name: "machine_id";
4163
- tableName: "runtime_instances";
4164
- dataType: "string";
4165
- columnType: "SQLiteText";
4166
- data: string;
4167
- driverParam: string;
4168
- notNull: true;
4169
- hasDefault: false;
4170
- isPrimaryKey: false;
4171
- isAutoincrement: false;
4172
- hasRuntimeDefault: false;
4173
- enumValues: [string, ...string[]];
4174
- baseColumn: never;
4175
- identity: undefined;
4176
- generated: undefined;
4177
- }, {}, {
4178
- length: number | undefined;
4179
- }>;
4180
- incarnation: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4181
- name: string;
4182
- tableName: "runtime_instances";
4183
- dataType: "number";
4184
- columnType: "SQLiteInteger";
4185
- data: number;
4186
- driverParam: number;
4187
- notNull: true;
4188
- hasDefault: false;
4189
- isPrimaryKey: false;
4190
- isAutoincrement: false;
4191
- hasRuntimeDefault: false;
4192
- enumValues: undefined;
4193
- baseColumn: never;
4194
- identity: undefined;
4195
- generated: undefined;
4196
- }, {}, {}>;
4197
- startedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4198
- name: string;
4199
- tableName: "runtime_instances";
4200
- dataType: "number";
4201
- columnType: "SQLiteInteger";
4202
- data: number;
4203
- driverParam: number;
4204
- notNull: true;
4205
- hasDefault: false;
4206
- isPrimaryKey: false;
4207
- isAutoincrement: false;
4208
- hasRuntimeDefault: false;
4209
- enumValues: undefined;
4210
- baseColumn: never;
4211
- identity: undefined;
4212
- generated: undefined;
4213
- }, {}, {}>;
4214
- retiredAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4215
- name: string;
4216
- tableName: "runtime_instances";
4217
- dataType: "number";
4218
- columnType: "SQLiteInteger";
4219
- data: number;
4220
- driverParam: number;
4221
- notNull: false;
4222
- hasDefault: false;
4223
- isPrimaryKey: false;
4224
- isAutoincrement: false;
4225
- hasRuntimeDefault: false;
4226
- enumValues: undefined;
4227
- baseColumn: never;
4228
- identity: undefined;
4229
- generated: undefined;
4230
- }, {}, {}>;
4231
- };
4232
- dialect: "sqlite";
4233
- }>;
4234
3932
  adapterSessionClaims: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
4235
3933
  name: "adapter_session_claims";
4236
3934
  schema: undefined;
@@ -4368,25 +4066,6 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
4368
4066
  }, {}, {
4369
4067
  length: number | undefined;
4370
4068
  }>;
4371
- ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4372
- name: "owner_instance_id";
4373
- tableName: "adapter_session_claims";
4374
- dataType: "string";
4375
- columnType: "SQLiteText";
4376
- data: string;
4377
- driverParam: string;
4378
- notNull: false;
4379
- hasDefault: false;
4380
- isPrimaryKey: false;
4381
- isAutoincrement: false;
4382
- hasRuntimeDefault: false;
4383
- enumValues: [string, ...string[]];
4384
- baseColumn: never;
4385
- identity: undefined;
4386
- generated: undefined;
4387
- }, {}, {
4388
- length: number | undefined;
4389
- }>;
4390
4069
  claimToken: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
4391
4070
  name: "claim_token";
4392
4071
  tableName: "adapter_session_claims";
@@ -4542,28 +4221,6 @@ declare function registerMemorySessionOwnershipStorage(bus: IMakaioBus, state?:
4542
4221
  */
4543
4222
  declare function registerDrizzleSessionOwnershipStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
4544
4223
  //#endregion
4545
- //#region services/core/src/session/storage/ownership-drizzle-claim-keys.d.ts
4546
- /** Versioned namespace for ownership-key lock identities. */
4547
- declare const SESSION_OWNERSHIP_CLAIM_LOCK_NAMESPACE = "makaio:session-ownership:claim:v1";
4548
- /** Claim-key fields that identify one provider-session ownership row. */
4549
- interface OwnershipClaimKey {
4550
- /** Runtime machine owning the provider session store. */
4551
- readonly machineId: string;
4552
- /** Adapter runtime owning the provider session. */
4553
- readonly adapterId: string;
4554
- /** Provider-native session identifier. */
4555
- readonly providerSessionId: string;
4556
- }
4557
- /**
4558
- * Build the stable transaction lock for one ownership key.
4559
- *
4560
- * JSON arrays preserve field boundaries while keeping the identity independent
4561
- * of the storage row that currently represents this key.
4562
- * @param key - Provider-session ownership key.
4563
- * @returns Stable transaction lock used before claim-row mutation.
4564
- */
4565
- declare function ownershipClaimTransactionLock(key: OwnershipClaimKey): TransactionLock;
4566
- //#endregion
4567
4224
  //#region services/core/src/session/storage/fts-search-handler.d.ts
4568
4225
  /**
4569
4226
  * Registers FTS-backed `storage:session.search` handler.
@@ -6596,8 +6253,8 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
6596
6253
  agentId: z.ZodString;
6597
6254
  status: z.ZodEnum<{
6598
6255
  completed: "completed";
6599
- acknowledged: "acknowledged";
6600
6256
  sent: "sent";
6257
+ acknowledged: "acknowledged";
6601
6258
  }>;
6602
6259
  timestamp: z.ZodNumber;
6603
6260
  error: z.ZodOptional<z.ZodString>;
@@ -6622,8 +6279,8 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
6622
6279
  agentId: z.ZodString;
6623
6280
  status: z.ZodEnum<{
6624
6281
  completed: "completed";
6625
- acknowledged: "acknowledged";
6626
6282
  sent: "sent";
6283
+ acknowledged: "acknowledged";
6627
6284
  }>;
6628
6285
  timestamp: z.ZodNumber;
6629
6286
  error: z.ZodOptional<z.ZodString>;
@@ -6710,7 +6367,7 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
6710
6367
  tableName: "message_routing";
6711
6368
  dataType: "string";
6712
6369
  columnType: "SQLiteText";
6713
- data: "completed" | "acknowledged" | "sent";
6370
+ data: "completed" | "sent" | "acknowledged";
6714
6371
  driverParam: string;
6715
6372
  notNull: true;
6716
6373
  hasDefault: false;
@@ -6781,8 +6438,8 @@ declare const MessageRoutingSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
6781
6438
  agentId: z.ZodString;
6782
6439
  status: z.ZodEnum<{
6783
6440
  completed: "completed";
6784
- acknowledged: "acknowledged";
6785
6441
  sent: "sent";
6442
+ acknowledged: "acknowledged";
6786
6443
  }>;
6787
6444
  timestamp: z.ZodNumber;
6788
6445
  error: z.ZodOptional<z.ZodString>;
@@ -6807,8 +6464,8 @@ declare const MessageRoutingSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
6807
6464
  agentId: z.ZodString;
6808
6465
  status: z.ZodEnum<{
6809
6466
  completed: "completed";
6810
- acknowledged: "acknowledged";
6811
6467
  sent: "sent";
6468
+ acknowledged: "acknowledged";
6812
6469
  }>;
6813
6470
  timestamp: z.ZodNumber;
6814
6471
  error: z.ZodOptional<z.ZodString>;
@@ -6952,7 +6609,7 @@ declare const messageRouting: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<
6952
6609
  tableName: "message_routing";
6953
6610
  dataType: "string";
6954
6611
  columnType: "SQLiteText";
6955
- data: "completed" | "acknowledged" | "sent";
6612
+ data: "completed" | "sent" | "acknowledged";
6956
6613
  driverParam: string;
6957
6614
  notNull: true;
6958
6615
  hasDefault: false;
@@ -7412,4 +7069,4 @@ interface NativeLocalityInput {
7412
7069
  */
7413
7070
  declare function evaluateNativeLocality(input: NativeLocalityInput): NativeLocalityVerdict;
7414
7071
  //#endregion
7415
- export { IngestCompletedTurnResult as $, runExclusiveStart as $n, resolveAdapterNameById as $t, registerDrizzleMessageStorage as A, FreshWithHistoryRecoveryPlan as An, SESSION_OWNERSHIP_CLAIM_LOCK_NAMESPACE as At, importCursorsDual as B, resolveTargetAgents as Bn, AgentStorageNamespace as Bt, registerDrizzleMessageRoutingStorage as C, ensureAgentCwd as Cn, fetchAgentsBySession as Ct, SelectMessage as D, buildPlannedRecoveryContext as Dn, parseForkTransforms as Dt, InsertMessage as E, verifyAndRecoverAgents as En, mapRowToSession as Et, registerMemoryTurnStorage as F, recoveryPlanResumeTarget as Fn, registerMemoryAgentStorage as Ft, ObservedSessionIngestionPolicyInput as G, ISessionOrchestrator as Gn, assembleForkContext as Gt, OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID as H, normalizeToBlocks as Hn, SessionExtensionContextImpl as Ht, registerDrizzleTurnStorage as I, StartReservationRequest as In, registerDrizzleSessionStorage as It, ObservedSessionIngestionService as J, assessClaimOwner as Jn, CONNECTOR_SWAP_DEFAULT_PIPELINE as Jt, registerObservedSessionIngestionPolicyProvider as K, SessionOrchestrator as Kn, FallbackRuntimeOptions as Kt, EmbeddingIndexManager as L, reserveStartFor as Ln, registerMemorySessionStorage as Lt, SelectTurn as M, RecoveryPlan as Mn, registerDrizzleSessionOwnershipStorage as Mt, turns as N, planAgentRecovery as Nn, registerMemorySessionOwnershipStorage as Nt, messages as O, buildRecoveryContext as On, registerFtsSearchHandler as Ot, turnsDual as P, recoveryPlanRequiresHistory as Pn, registerDrizzleAgentStorage as Pt, IngestCompletedTurnParams as Q, peekInFlightStart as Qn, normalizeSelectionString as Qt, registerDrizzleImportCursorStorage as R, findTurnByAgent as Rn, SessionStorageMemoryState as Rt, messageRoutingDual as S, buildRecoveryContextWithPipeline as Sn, SearchSessionRow as St, MessageRoutingSubjects as T, recoverAgent as Tn, fetchPreviewBySession as Tt, ObservedSessionIngestionPolicyDecision as U, TurnContextEnricher as Un, createSessionExtensionContext as Ut, IObservedSessionIngestionPolicyProvider as V, extractTextContent as Vn, AgentStorageSubjects as Vt, ObservedSessionIngestionPolicyImportStatus as W, AdapterRegistry as Wn, SessionBridge as Wt, isTrackingStub as X, enqueueAgentSettle as Xn, SelectionRefusalContext as Xt, isPolicyDiscoveredObservedSession as Y, mintClaimToken as Yn, NamedSelectionInstance as Yt, LogImportTriggerSubjects as Z, InFlightStart as Zn, describeHalfNamedInstanceRefusal as Zt, MakaioSessionConfig as _, LeadTransition as _n, SessionPreviewMaps as _t, resolveSessionResumeIdentity as a, registerResumeHandler as an, SessionUserMessageSentPayload as at, SelectMessageRouting as b, RecoveryConfig as bn, mapToSession as bt, BuildContextOptions as c, ContextWindowTrackerConfig as cn, emitSessionUserMessageSent as ct, toSessionLineage as d, resolveSelectionOwnedInstance as dn, registerMemorySessionEventStorage as dt, registerListActionsHandler as en, registerAdapterSessionMovementObserver as er, IngestTurnMessage as et, registerSessionDiscoveredHandler as f, startLeadAgent as fn, InsertSessionEvent as ft, MakaioSession as g, LeadStartResult as gn, getSessionAncestorChain as gt, registerParentResolver as h, LeadStartRequest as hn, sessionEventsDual as ht, SessionResumeIdentity as i, registerGetStatusCountsHandler as in, MakaioSessionServiceOptions as ir, SessionTurnStartedPayload as it, InsertTurn as j, NativeResumeRecoveryPlan as jn, ownershipClaimTransactionLock as jt, registerMemoryMessageStorage as k, FRESH_WITH_HISTORY_RECOVERY_PLAN as kn, OwnershipClaimKey as kt, ContextAssemblyResult as l, SessionContextWindowState as ln, registerSessionLifecycleEventWriters as lt, registerCompressLineageResolver as m, LeadStartDispatchRequest as mn, sessionEvents as mt, NativeLocalityIntent as n, resetBuiltInActionsRegistration as nn, registerSessionOwnershipAuthority as nr, EventTransform as nt, getFullConversation as o, ContextWindowTracker as on, appendSessionLifecycleEvent as ot, registerSpawningToolCallResolver as p, LeadStartDispatch as pn, SelectSessionEvent as pt, unregisterObservedSessionIngestionPolicyProvider as q, registerCoreSessionServiceHandlers as qn, pickFallbackRuntimeOptions as qt, evaluateNativeLocality as r, actionRegistry as rn, MakaioSessionService as rr, SessionLifecycleEventArgs as rt, buildSessionContext as s, AgentContextState as sn, emitSessionTurnStarted as st, NativeLocalityInput as t, registerBuiltInActions as tn, SessionOwnershipAuthorityDeps as tr, ingestCompletedTurn as tt, kindToBranchKind as u, SelectionInstanceContext as un, registerDrizzleSessionEventStorage as ut, StartTurnOptions as v, buildTurnInitiator as vn, fetchSessionPreviewMaps as vt, MessageRoutingNamespace as w, ensureAgentModel as wn, fetchMessageCountsBySession as wt, messageRouting as x, VerifiedAgents as xn, SearchFilters as xt, InsertMessageRouting as y, AgentRecoveryOutcome as yn, mapAgentsBySession as yt, importCursors as z, getOrCreateSession as zn, createSessionStorageMemoryState as zt };
7072
+ export { IngestCompletedTurnResult as $, resetBuiltInActionsRegistration as $t, registerDrizzleMessageStorage as A, getOrCreateSession as An, registerMemorySessionOwnershipStorage as At, importCursorsDual as B, mintClaimToken as Bn, createSessionExtensionContext as Bt, registerDrizzleMessageRoutingStorage as C, RecoveryPlan as Cn, fetchAgentsBySession as Ct, SelectMessage as D, StartReservationRequest as Dn, parseForkTransforms as Dt, InsertMessage as E, recoveryPlanResumeTarget as En, mapRowToSession as Et, registerMemoryTurnStorage as F, AdapterRegistry as Fn, SessionStorageMemoryState as Ft, ObservedSessionIngestionPolicyInput as G, registerAdapterSessionMovementObserver as Gn, CONNECTOR_SWAP_DEFAULT_PIPELINE as Gt, OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID as H, InFlightStart as Hn, assembleForkContext as Ht, registerDrizzleTurnStorage as I, ISessionOrchestrator as In, createSessionStorageMemoryState as It, ObservedSessionIngestionService as J, MakaioSessionService as Jn, describeHalfNamedInstanceRefusal as Jt, registerObservedSessionIngestionPolicyProvider as K, SessionOwnershipAuthorityDeps as Kn, NamedSelectionInstance as Kt, EmbeddingIndexManager as L, SessionOrchestrator as Ln, AgentStorageNamespace as Lt, SelectTurn as M, extractTextContent as Mn, registerMemoryAgentStorage as Mt, turns as N, normalizeToBlocks as Nn, registerDrizzleSessionStorage as Nt, messages as O, reserveStartFor as On, registerFtsSearchHandler as Ot, turnsDual as P, TurnContextEnricher as Pn, registerMemorySessionStorage as Pt, IngestCompletedTurnParams as Q, registerBuiltInActions as Qt, registerDrizzleImportCursorStorage as R, registerCoreSessionServiceHandlers as Rn, AgentStorageSubjects as Rt, messageRoutingDual as S, NativeResumeRecoveryPlan as Sn, SearchSessionRow as St, MessageRoutingSubjects as T, recoveryPlanRequiresHistory as Tn, fetchPreviewBySession as Tt, ObservedSessionIngestionPolicyDecision as U, peekInFlightStart as Un, FallbackRuntimeOptions as Ut, IObservedSessionIngestionPolicyProvider as V, enqueueAgentSettle as Vn, SessionBridge as Vt, ObservedSessionIngestionPolicyImportStatus as W, runExclusiveStart as Wn, pickFallbackRuntimeOptions as Wt, isTrackingStub as X, resolveAdapterNameById as Xt, isPolicyDiscoveredObservedSession as Y, MakaioSessionServiceOptions as Yn, normalizeSelectionString as Yt, LogImportTriggerSubjects as Z, registerListActionsHandler as Zt, MakaioSessionConfig as _, verifyAndRecoverAgents as _n, SessionPreviewMaps as _t, resolveSessionResumeIdentity as a, ContextWindowTrackerConfig as an, SessionUserMessageSentPayload as at, SelectMessageRouting as b, FRESH_WITH_HISTORY_RECOVERY_PLAN as bn, mapToSession as bt, BuildContextOptions as c, resolveSelectionOwnedInstance as cn, emitSessionUserMessageSent as ct, toSessionLineage as d, RecoveryConfig as dn, registerMemorySessionEventStorage as dt, actionRegistry as en, IngestTurnMessage as et, registerSessionDiscoveredHandler as f, VerifiedAgents as fn, InsertSessionEvent as ft, MakaioSession as g, recoverAgent as gn, getSessionAncestorChain as gt, registerParentResolver as h, ensureAgentModel as hn, sessionEventsDual as ht, SessionResumeIdentity as i, AgentContextState as in, SessionTurnStartedPayload as it, InsertTurn as j, resolveTargetAgents as jn, registerDrizzleAgentStorage as jt, registerMemoryMessageStorage as k, findTurnByAgent as kn, registerDrizzleSessionOwnershipStorage as kt, ContextAssemblyResult as l, buildTurnInitiator as ln, registerSessionLifecycleEventWriters as lt, registerCompressLineageResolver as m, ensureAgentCwd as mn, sessionEvents as mt, NativeLocalityIntent as n, registerResumeHandler as nn, EventTransform as nt, getFullConversation as o, SessionContextWindowState as on, appendSessionLifecycleEvent as ot, registerSpawningToolCallResolver as p, buildRecoveryContextWithPipeline as pn, SelectSessionEvent as pt, unregisterObservedSessionIngestionPolicyProvider as q, registerSessionOwnershipAuthority as qn, SelectionRefusalContext as qt, evaluateNativeLocality as r, ContextWindowTracker as rn, SessionLifecycleEventArgs as rt, buildSessionContext as s, SelectionInstanceContext as sn, emitSessionTurnStarted as st, NativeLocalityInput as t, registerGetStatusCountsHandler as tn, ingestCompletedTurn as tt, kindToBranchKind as u, AgentRecoveryOutcome as un, registerDrizzleSessionEventStorage as ut, StartTurnOptions as v, buildPlannedRecoveryContext as vn, fetchSessionPreviewMaps as vt, MessageRoutingNamespace as w, planAgentRecovery as wn, fetchMessageCountsBySession as wt, messageRouting as x, FreshWithHistoryRecoveryPlan as xn, SearchFilters as xt, InsertMessageRouting as y, buildRecoveryContext as yn, mapAgentsBySession as yt, importCursors as z, assessClaimOwner as zn, SessionExtensionContextImpl as zt };