@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,6 +1,5 @@
1
- import { l as JsonValue$1 } from "./json-value-DPqb-SJ8.mjs";
2
- import { s as MessageBlock$1 } from "./index-CmwAJ8-5.mjs";
3
- import { t as ContractStorageNamespaceDefinition } from "./storage-namespace-definition-BsnYAPot.mjs";
1
+ import { a as JsonValue$1 } from "./json-value-C1RGgS0a.mjs";
2
+ import { s as MessageBlock$1 } from "./index-CSN_0sCo.mjs";
4
3
  import * as _$zod from "zod";
5
4
  import { z } from "zod";
6
5
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -107,11 +106,6 @@ declare const MakaioSessionAgentSchema$1: z.ZodObject<{
107
106
  adapterId: z.ZodString;
108
107
  adapterName: z.ZodString;
109
108
  sessionId: z.ZodString;
110
- runtimeOwner: z.ZodOptional<z.ZodObject<{
111
- machineId: z.ZodString;
112
- instanceId: z.ZodString;
113
- }, z.core.$strip>>;
114
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
115
109
  adapterSessionId: z.ZodOptional<z.ZodString>;
116
110
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
117
111
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -168,11 +162,6 @@ declare const MakaioSessionSchema: z.ZodObject<{
168
162
  adapterId: z.ZodString;
169
163
  adapterName: z.ZodString;
170
164
  sessionId: z.ZodString;
171
- runtimeOwner: z.ZodOptional<z.ZodObject<{
172
- machineId: z.ZodString;
173
- instanceId: z.ZodString;
174
- }, z.core.$strip>>;
175
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
176
165
  adapterSessionId: z.ZodOptional<z.ZodString>;
177
166
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
178
167
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -316,11 +305,6 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
316
305
  adapterId: z.ZodString;
317
306
  adapterName: z.ZodString;
318
307
  sessionId: z.ZodString;
319
- runtimeOwner: z.ZodOptional<z.ZodObject<{
320
- machineId: z.ZodString;
321
- instanceId: z.ZodString;
322
- }, z.core.$strip>>;
323
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
324
308
  adapterSessionId: z.ZodOptional<z.ZodString>;
325
309
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
326
310
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -538,11 +522,6 @@ declare const SessionSnapshotSchema: z.ZodObject<{
538
522
  adapterId: z.ZodString;
539
523
  adapterName: z.ZodString;
540
524
  sessionId: z.ZodString;
541
- runtimeOwner: z.ZodOptional<z.ZodObject<{
542
- machineId: z.ZodString;
543
- instanceId: z.ZodString;
544
- }, z.core.$strip>>;
545
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
546
525
  adapterSessionId: z.ZodOptional<z.ZodString>;
547
526
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
548
527
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -671,11 +650,6 @@ declare const SessionSnapshotSchema: z.ZodObject<{
671
650
  adapterId: z.ZodString;
672
651
  adapterName: z.ZodString;
673
652
  sessionId: z.ZodString;
674
- runtimeOwner: z.ZodOptional<z.ZodObject<{
675
- machineId: z.ZodString;
676
- instanceId: z.ZodString;
677
- }, z.core.$strip>>;
678
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
679
653
  adapterSessionId: z.ZodOptional<z.ZodString>;
680
654
  currentAdapterSessionId: z.ZodOptional<z.ZodString>;
681
655
  currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
@@ -1552,8 +1526,8 @@ type Turn$1 = z.infer<typeof TurnSchema$1>;
1552
1526
  */
1553
1527
  declare const MessageRoutingStatusSchema: z.ZodEnum<{
1554
1528
  completed: "completed";
1555
- acknowledged: "acknowledged";
1556
1529
  sent: "sent";
1530
+ acknowledged: "acknowledged";
1557
1531
  }>;
1558
1532
  type MessageRoutingStatus = z.infer<typeof MessageRoutingStatusSchema>;
1559
1533
  /**
@@ -1564,8 +1538,8 @@ declare const MessageRoutingSchema$1: z.ZodObject<{
1564
1538
  agentId: z.ZodString;
1565
1539
  status: z.ZodEnum<{
1566
1540
  completed: "completed";
1567
- acknowledged: "acknowledged";
1568
1541
  sent: "sent";
1542
+ acknowledged: "acknowledged";
1569
1543
  }>;
1570
1544
  timestamp: z.ZodNumber;
1571
1545
  error: z.ZodOptional<z.ZodString>;
@@ -2548,7 +2522,7 @@ declare const OrchestratorSchemas: {
2548
2522
  systemPrompt: "systemPrompt";
2549
2523
  fullPrefix: "fullPrefix";
2550
2524
  }>>;
2551
- turnContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue>>>>;
2525
+ turnContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
2552
2526
  requestCorrelation: z.ZodOptional<z.ZodObject<{
2553
2527
  sessionId: z.ZodOptional<z.ZodString>;
2554
2528
  turnId: z.ZodOptional<z.ZodString>;
@@ -4570,2590 +4544,33 @@ declare const SessionCreatedEventSchema: z.ZodObject<{
4570
4544
  branch: "branch";
4571
4545
  rewrite: "rewrite";
4572
4546
  coordinator: "coordinator";
4573
- aside: "aside";
4574
- }>>;
4575
- createdAt: z.ZodNumber;
4576
- originWindowId: z.ZodOptional<z.ZodString>;
4577
- }, z.core.$strip>;
4578
- declare const SessionUpdatedEventSchema: z.ZodObject<{
4579
- sessionId: z.ZodString;
4580
- changedProperties: z.ZodArray<z.ZodString>;
4581
- }, z.core.$strip>;
4582
- type SessionCreated = z.infer<typeof SessionCreatedEventSchema>;
4583
- type SessionUpdatedEvent = z.infer<typeof SessionUpdatedEventSchema>;
4584
- //#endregion
4585
- //#region core/contracts/src/session/session-ownership-claim-status.d.ts
4586
- /** Lifecycle state of a durable adapter-session ownership claim. */
4587
- declare const AdapterSessionClaimStatusSchema: z.ZodEnum<{
4588
- abandoned: "abandoned";
4589
- held: "held";
4590
- releasing: "releasing";
4591
- }>;
4592
- /** {@inheritDoc AdapterSessionClaimStatusSchema} */
4593
- type AdapterSessionClaimStatus = z.infer<typeof AdapterSessionClaimStatusSchema>;
4594
- //#endregion
4595
- //#region core/contracts/src/session/session-ownership-recovery.d.ts
4596
- /** Exact runtime binding a recovery transfers to its replacement connector. */
4597
- declare const RuntimeBindingSchema: z.ZodObject<{
4598
- adapterId: z.ZodString;
4599
- ownerMachineId: z.ZodString;
4600
- ownerInstanceId: z.ZodString;
4601
- }, z.core.$strip>;
4602
- /** {@inheritDoc RuntimeBindingSchema} */
4603
- type RuntimeBinding = z.infer<typeof RuntimeBindingSchema>;
4604
- /** Durable row image restored when a recovery is refused before dispatch. */
4605
- declare const SessionOwnershipRecoveryPreimageSchema: z.ZodObject<{
4606
- status: z.ZodEnum<{
4607
- idle: "idle";
4608
- active: "active";
4609
- starting: "starting";
4610
- dead: "dead";
4611
- disposed: "disposed";
4612
- }>;
4613
- adapterId: z.ZodString;
4614
- binding: z.ZodOptional<z.ZodObject<{
4615
- adapterId: z.ZodString;
4616
- ownerMachineId: z.ZodString;
4617
- ownerInstanceId: z.ZodString;
4618
- }, z.core.$strip>>;
4619
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4620
- }, z.core.$strip>;
4621
- /** {@inheritDoc SessionOwnershipRecoveryPreimageSchema} */
4622
- type SessionOwnershipRecoveryPreimage = z.infer<typeof SessionOwnershipRecoveryPreimageSchema>;
4623
- /** Attempt and preimage created by one successful guarded reservation. */
4624
- declare const SessionOwnershipRecoveryReservationSchema: z.ZodObject<{
4625
- attemptId: z.ZodString;
4626
- preimage: z.ZodObject<{
4627
- status: z.ZodEnum<{
4628
- idle: "idle";
4629
- active: "active";
4630
- starting: "starting";
4631
- dead: "dead";
4632
- disposed: "disposed";
4633
- }>;
4634
- adapterId: z.ZodString;
4635
- binding: z.ZodOptional<z.ZodObject<{
4636
- adapterId: z.ZodString;
4637
- ownerMachineId: z.ZodString;
4638
- ownerInstanceId: z.ZodString;
4639
- }, z.core.$strip>>;
4640
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4641
- }, z.core.$strip>;
4642
- }, z.core.$strip>;
4643
- /** {@inheritDoc SessionOwnershipRecoveryReservationSchema} */
4644
- type SessionOwnershipRecoveryReservation = z.infer<typeof SessionOwnershipRecoveryReservationSchema>;
4645
- /** Terminal action for an attempt-fenced recovery lifecycle. */
4646
- declare const SessionOwnershipRecoveryTerminalActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4647
- kind: z.ZodLiteral<"rollback">;
4648
- preimage: z.ZodObject<{
4649
- status: z.ZodEnum<{
4650
- idle: "idle";
4651
- active: "active";
4652
- starting: "starting";
4653
- dead: "dead";
4654
- disposed: "disposed";
4655
- }>;
4656
- adapterId: z.ZodString;
4657
- binding: z.ZodOptional<z.ZodObject<{
4658
- adapterId: z.ZodString;
4659
- ownerMachineId: z.ZodString;
4660
- ownerInstanceId: z.ZodString;
4661
- }, z.core.$strip>>;
4662
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4663
- }, z.core.$strip>;
4664
- }, z.core.$strip>, z.ZodObject<{
4665
- kind: z.ZodLiteral<"succeeded">;
4666
- }, z.core.$strip>, z.ZodObject<{
4667
- kind: z.ZodLiteral<"failed">;
4668
- }, z.core.$strip>], "kind">;
4669
- /** {@inheritDoc SessionOwnershipRecoveryTerminalActionSchema} */
4670
- type SessionOwnershipRecoveryTerminalAction = z.infer<typeof SessionOwnershipRecoveryTerminalActionSchema>;
4671
- /** Atomically terminalize a recovery only while its exact attempt still owns the row. */
4672
- declare const SessionOwnershipFinalizeRecoveryRequestSchema: z.ZodObject<{
4673
- agentId: z.ZodString;
4674
- attemptId: z.ZodString;
4675
- binding: z.ZodObject<{
4676
- adapterId: z.ZodString;
4677
- ownerMachineId: z.ZodString;
4678
- ownerInstanceId: z.ZodString;
4679
- }, z.core.$strip>;
4680
- action: z.ZodDiscriminatedUnion<[z.ZodObject<{
4681
- kind: z.ZodLiteral<"rollback">;
4682
- preimage: z.ZodObject<{
4683
- status: z.ZodEnum<{
4684
- idle: "idle";
4685
- active: "active";
4686
- starting: "starting";
4687
- dead: "dead";
4688
- disposed: "disposed";
4689
- }>;
4690
- adapterId: z.ZodString;
4691
- binding: z.ZodOptional<z.ZodObject<{
4692
- adapterId: z.ZodString;
4693
- ownerMachineId: z.ZodString;
4694
- ownerInstanceId: z.ZodString;
4695
- }, z.core.$strip>>;
4696
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4697
- }, z.core.$strip>;
4698
- }, z.core.$strip>, z.ZodObject<{
4699
- kind: z.ZodLiteral<"succeeded">;
4700
- }, z.core.$strip>, z.ZodObject<{
4701
- kind: z.ZodLiteral<"failed">;
4702
- }, z.core.$strip>], "kind">;
4703
- }, z.core.$strip>;
4704
- /** {@inheritDoc SessionOwnershipFinalizeRecoveryRequestSchema} */
4705
- type SessionOwnershipFinalizeRecoveryRequest = z.infer<typeof SessionOwnershipFinalizeRecoveryRequestSchema>;
4706
- /** Result of an attempt-fenced recovery terminal transition. */
4707
- declare const SessionOwnershipFinalizeRecoveryResponseSchema: z.ZodObject<{
4708
- applied: z.ZodBoolean;
4709
- }, z.core.$strip>;
4710
- /** {@inheritDoc SessionOwnershipFinalizeRecoveryResponseSchema} */
4711
- type SessionOwnershipFinalizeRecoveryResult = z.infer<typeof SessionOwnershipFinalizeRecoveryResponseSchema>;
4712
- /** Exact generation observed on a key while recovery was planned. */
4713
- declare const SessionOwnershipRecoveryOwnerGenerationSchema: z.ZodObject<{
4714
- claimId: z.ZodString;
4715
- claimToken: z.ZodString;
4716
- fence: z.ZodNumber;
4717
- ownerInstanceId: z.ZodNullable<z.ZodString>;
4718
- status: z.ZodEnum<{
4719
- abandoned: "abandoned";
4720
- held: "held";
4721
- releasing: "releasing";
4722
- }>;
4723
- }, z.core.$strip>;
4724
- /** {@inheritDoc SessionOwnershipRecoveryOwnerGenerationSchema} */
4725
- type SessionOwnershipRecoveryOwnerGeneration = z.infer<typeof SessionOwnershipRecoveryOwnerGenerationSchema>;
4726
- /** Snapshot a recovery reservation must replace atomically. */
4727
- declare const SessionOwnershipRecoveryGuardSchema: z.ZodObject<{
4728
- expectedStatus: z.ZodEnum<{
4729
- idle: "idle";
4730
- active: "active";
4731
- starting: "starting";
4732
- dead: "dead";
4733
- disposed: "disposed";
4734
- }>;
4735
- expectedPreimage: z.ZodObject<{
4736
- status: z.ZodEnum<{
4737
- idle: "idle";
4738
- active: "active";
4739
- starting: "starting";
4740
- dead: "dead";
4741
- disposed: "disposed";
4742
- }>;
4743
- adapterId: z.ZodString;
4744
- binding: z.ZodOptional<z.ZodObject<{
4745
- adapterId: z.ZodString;
4746
- ownerMachineId: z.ZodString;
4747
- ownerInstanceId: z.ZodString;
4748
- }, z.core.$strip>>;
4749
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4750
- }, z.core.$strip>;
4751
- expectedRevision: z.ZodNumber;
4752
- expectedCurrencyFence: z.ZodNumber;
4753
- expectedCurrency: z.ZodObject<{
4754
- adapterSessionId: z.ZodNullable<z.ZodString>;
4755
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
4756
- currentAdapterSessionIdState: z.ZodEnum<{
4757
- confirmed: "confirmed";
4758
- moved: "moved";
4759
- inherited: "inherited";
4760
- }>;
4761
- }, z.core.$strip>;
4762
- ownerGeneration: z.ZodNullable<z.ZodObject<{
4763
- claimId: z.ZodString;
4764
- claimToken: z.ZodString;
4765
- fence: z.ZodNumber;
4766
- ownerInstanceId: z.ZodNullable<z.ZodString>;
4767
- status: z.ZodEnum<{
4768
- abandoned: "abandoned";
4769
- held: "held";
4770
- releasing: "releasing";
4771
- }>;
4772
- }, z.core.$strip>>;
4773
- }, z.core.$strip>;
4774
- /** {@inheritDoc SessionOwnershipRecoveryGuardSchema} */
4775
- type SessionOwnershipRecoveryGuard$1 = z.infer<typeof SessionOwnershipRecoveryGuardSchema>;
4776
- //#endregion
4777
- //#region core/contracts/src/session/session-ownership-storage-namespace.d.ts
4778
- /**
4779
- * Identity of the namespace a provider session is owned within.
4780
- *
4781
- * A provider session ID is only unique inside the runtime that stores it: the
4782
- * same ID may exist on another machine, or under another adapter runtime on the
4783
- * same machine, and those are different conversations. This triple is therefore
4784
- * the ownership key, and the claim table's unique index over it is what makes
4785
- * "exactly one winner" a property of the schema rather than of handler code.
4786
- */
4787
- declare const AdapterSessionClaimKeySchema: z.ZodObject<{
4788
- machineId: z.ZodString;
4789
- adapterId: z.ZodString;
4790
- providerSessionId: z.ZodString;
4791
- }, z.core.$strip>;
4792
- /** {@inheritDoc AdapterSessionClaimKeySchema} */
4793
- type AdapterSessionClaimKey = z.infer<typeof AdapterSessionClaimKeySchema>;
4794
- /**
4795
- * A durable ownership claim on one provider-native session.
4796
- *
4797
- * `claimToken` identifies the claim generation opaquely; `fence` orders
4798
- * generations. The two always change together — a takeover mints a new token
4799
- * and a higher fence — so a stale owner can be rejected by comparison
4800
- * (`fence`) rather than by recognition (`claimToken`), which is what lets a
4801
- * write arriving from a previous process be refused rather than applied.
4802
- */
4803
- declare const AdapterSessionClaimRecordSchema: z.ZodObject<{
4804
- machineId: z.ZodString;
4805
- adapterId: z.ZodString;
4806
- providerSessionId: z.ZodString;
4807
- claimId: z.ZodString;
4808
- adapterName: z.ZodString;
4809
- sessionId: z.ZodString;
4810
- agentId: z.ZodString;
4811
- ownerInstanceId: z.ZodNullable<z.ZodString>;
4812
- claimToken: z.ZodString;
4813
- fence: z.ZodNumber;
4814
- status: z.ZodEnum<{
4815
- abandoned: "abandoned";
4816
- held: "held";
4817
- releasing: "releasing";
4818
- }>;
4819
- claimedAt: z.ZodNumber;
4820
- updatedAt: z.ZodNumber;
4821
- }, z.core.$strip>;
4822
- /** {@inheritDoc AdapterSessionClaimRecordSchema} */
4823
- type AdapterSessionClaimRecord$1 = z.infer<typeof AdapterSessionClaimRecordSchema>;
4824
- /**
4825
- * One runtime process acting for one machine that has taken an ownership
4826
- * generation. Instance rows are durable diagnostics and are never deleted.
4827
- */
4828
- declare const RuntimeInstanceRecordSchema: z.ZodObject<{
4829
- instanceId: z.ZodString;
4830
- machineId: z.ZodString;
4831
- incarnation: z.ZodNumber;
4832
- startedAt: z.ZodNumber;
4833
- retiredAt: z.ZodNullable<z.ZodNumber>;
4834
- }, z.core.$strip>;
4835
- /** {@inheritDoc RuntimeInstanceRecordSchema} */
4836
- type RuntimeInstanceRecord$1 = z.infer<typeof RuntimeInstanceRecordSchema>;
4837
- /** Runtime process on whose behalf an ownership generation is taken. */
4838
- declare const OwnershipOwnerInstanceSchema: z.ZodObject<{
4839
- instanceId: z.ZodString;
4840
- }, z.core.$strip>;
4841
- /** {@inheritDoc OwnershipOwnerInstanceSchema} */
4842
- type OwnershipOwnerInstance = z.infer<typeof OwnershipOwnerInstanceSchema>;
4843
- /** How many runtime processes may own claims on one machine. */
4844
- declare const OwnershipTopologySchema: z.ZodEnum<{
4845
- "machine-exclusive": "machine-exclusive";
4846
- "shared-machine": "shared-machine";
4847
- }>;
4848
- /**
4849
- * Durable ownership state of one agent.
4850
- *
4851
- * `revision` and `currencyFence` are the two orderings a currency write is
4852
- * checked against, and they answer different questions:
4853
- * - `currencyFence` — *which generation* last wrote this currency. A write from
4854
- * a lower fence is a stale owner and is refused outright.
4855
- * - `revision` — *which write* the caller read before computing its target. A
4856
- * mismatch means the row moved under the caller within the same generation.
4857
- *
4858
- * `revision` is bumped exclusively by the ownership seam. Any other writer
4859
- * bumping it would make the compare-and-swap fail for reasons unrelated to
4860
- * currency, which is the same as not having it.
4861
- */
4862
- declare const AgentSessionOwnershipRecordSchema: z.ZodObject<{
4863
- agentId: z.ZodString;
4864
- sessionId: z.ZodString;
4865
- currency: z.ZodObject<{
4866
- adapterSessionId: z.ZodNullable<z.ZodString>;
4867
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
4868
- currentAdapterSessionIdState: z.ZodEnum<{
4869
- confirmed: "confirmed";
4870
- moved: "moved";
4871
- inherited: "inherited";
4872
- }>;
4873
- }, z.core.$strip>;
4874
- revision: z.ZodNumber;
4875
- currencyFence: z.ZodNumber;
4876
- claims: z.ZodArray<z.ZodObject<{
4877
- machineId: z.ZodString;
4878
- adapterId: z.ZodString;
4879
- providerSessionId: z.ZodString;
4880
- claimId: z.ZodString;
4881
- adapterName: z.ZodString;
4882
- sessionId: z.ZodString;
4883
- agentId: z.ZodString;
4884
- ownerInstanceId: z.ZodNullable<z.ZodString>;
4885
- claimToken: z.ZodString;
4886
- fence: z.ZodNumber;
4887
- status: z.ZodEnum<{
4888
- abandoned: "abandoned";
4889
- held: "held";
4890
- releasing: "releasing";
4891
- }>;
4892
- claimedAt: z.ZodNumber;
4893
- updatedAt: z.ZodNumber;
4894
- }, z.core.$strip>>;
4895
- }, z.core.$strip>;
4896
- /** {@inheritDoc AgentSessionOwnershipRecordSchema} */
4897
- type AgentSessionOwnershipRecord = z.infer<typeof AgentSessionOwnershipRecordSchema>;
4898
- /**
4899
- * Request payload for `storage:sessionOwnership.claim`.
4900
- *
4901
- * One call is the whole reservation: it takes the claim and — when
4902
- * `designateLead` is supplied — designates the session's lead agent in the same
4903
- * transaction. Splitting those into two calls is what leaves the window where a
4904
- * provider session is owned by an agent the session does not yet call its lead,
4905
- * and a movement announced in that window has no legitimate writer.
4906
- */
4907
- declare const SessionOwnershipClaimRequestSchema: z.ZodObject<{
4908
- machineId: z.ZodString;
4909
- adapterId: z.ZodString;
4910
- providerSessionId: z.ZodNullable<z.ZodString>;
4911
- adapterName: z.ZodString;
4912
- ownerInstance: z.ZodOptional<z.ZodObject<{
4913
- instanceId: z.ZodString;
4914
- }, z.core.$strip>>;
4915
- topology: z.ZodDefault<z.ZodEnum<{
4916
- "machine-exclusive": "machine-exclusive";
4917
- "shared-machine": "shared-machine";
4918
- }>>;
4919
- recoveryGuard: z.ZodOptional<z.ZodObject<{
4920
- expectedStatus: z.ZodEnum<{
4921
- idle: "idle";
4922
- active: "active";
4923
- starting: "starting";
4924
- dead: "dead";
4925
- disposed: "disposed";
4926
- }>;
4927
- expectedPreimage: z.ZodObject<{
4928
- status: z.ZodEnum<{
4929
- idle: "idle";
4930
- active: "active";
4931
- starting: "starting";
4932
- dead: "dead";
4933
- disposed: "disposed";
4934
- }>;
4935
- adapterId: z.ZodString;
4936
- binding: z.ZodOptional<z.ZodObject<{
4937
- adapterId: z.ZodString;
4938
- ownerMachineId: z.ZodString;
4939
- ownerInstanceId: z.ZodString;
4940
- }, z.core.$strip>>;
4941
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4942
- }, z.core.$strip>;
4943
- expectedRevision: z.ZodNumber;
4944
- expectedCurrencyFence: z.ZodNumber;
4945
- expectedCurrency: z.ZodObject<{
4946
- adapterSessionId: z.ZodNullable<z.ZodString>;
4947
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
4948
- currentAdapterSessionIdState: z.ZodEnum<{
4949
- confirmed: "confirmed";
4950
- moved: "moved";
4951
- inherited: "inherited";
4952
- }>;
4953
- }, z.core.$strip>;
4954
- ownerGeneration: z.ZodNullable<z.ZodObject<{
4955
- claimId: z.ZodString;
4956
- claimToken: z.ZodString;
4957
- fence: z.ZodNumber;
4958
- ownerInstanceId: z.ZodNullable<z.ZodString>;
4959
- status: z.ZodEnum<{
4960
- abandoned: "abandoned";
4961
- held: "held";
4962
- releasing: "releasing";
4963
- }>;
4964
- }, z.core.$strip>>;
4965
- }, z.core.$strip>>;
4966
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
4967
- sessionId: z.ZodString;
4968
- agentId: z.ZodString;
4969
- claimToken: z.ZodString;
4970
- supersedes: z.ZodOptional<z.ZodObject<{
4971
- claimToken: z.ZodString;
4972
- }, z.core.$strip>>;
4973
- designateLead: z.ZodOptional<z.ZodObject<{
4974
- expectedLeadAgentId: z.ZodNullable<z.ZodString>;
4975
- clear: z.ZodOptional<z.ZodLiteral<true>>;
4976
- restore: z.ZodOptional<z.ZodLiteral<true>>;
4977
- }, z.core.$strip>>;
4978
- }, z.core.$strip>;
4979
- /** {@inheritDoc SessionOwnershipClaimRequestSchema} */
4980
- type SessionOwnershipClaimRequest = z.infer<typeof SessionOwnershipClaimRequestSchema>;
4981
- /**
4982
- * Validate and normalize an ownership claim at the storage trust boundary.
4983
- *
4984
- * Storage handlers call this even when bus validation is disabled so schema
4985
- * defaults and cross-field refinements remain part of the durable invariant.
4986
- * @param value - Untrusted claim request received by a storage handler.
4987
- * @returns The fully validated claim request with schema defaults applied.
4988
- */
4989
- declare function normalizeSessionOwnershipClaimRequest$1(value: unknown): SessionOwnershipClaimRequest;
4990
- declare const SessionOwnershipClaimResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4991
- outcome: z.ZodLiteral<"claimed">;
4992
- claim: z.ZodNullable<z.ZodObject<{
4993
- machineId: z.ZodString;
4994
- adapterId: z.ZodString;
4995
- providerSessionId: z.ZodString;
4996
- claimId: z.ZodString;
4997
- adapterName: z.ZodString;
4998
- sessionId: z.ZodString;
4999
- agentId: z.ZodString;
5000
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5001
- claimToken: z.ZodString;
5002
- fence: z.ZodNumber;
5003
- status: z.ZodEnum<{
5004
- abandoned: "abandoned";
5005
- held: "held";
5006
- releasing: "releasing";
5007
- }>;
5008
- claimedAt: z.ZodNumber;
5009
- updatedAt: z.ZodNumber;
5010
- }, z.core.$strip>>;
5011
- recovery: z.ZodOptional<z.ZodObject<{
5012
- attemptId: z.ZodString;
5013
- preimage: z.ZodObject<{
5014
- status: z.ZodEnum<{
5015
- idle: "idle";
5016
- active: "active";
5017
- starting: "starting";
5018
- dead: "dead";
5019
- disposed: "disposed";
5020
- }>;
5021
- adapterId: z.ZodString;
5022
- binding: z.ZodOptional<z.ZodObject<{
5023
- adapterId: z.ZodString;
5024
- ownerMachineId: z.ZodString;
5025
- ownerInstanceId: z.ZodString;
5026
- }, z.core.$strip>>;
5027
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5028
- }, z.core.$strip>;
5029
- }, z.core.$strip>>;
5030
- leadDesignated: z.ZodBoolean;
5031
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
5032
- }, z.core.$strip>, z.ZodObject<{
5033
- outcome: z.ZodLiteral<"idempotent">;
5034
- claim: z.ZodNullable<z.ZodObject<{
5035
- machineId: z.ZodString;
5036
- adapterId: z.ZodString;
5037
- providerSessionId: z.ZodString;
5038
- claimId: z.ZodString;
5039
- adapterName: z.ZodString;
5040
- sessionId: z.ZodString;
5041
- agentId: z.ZodString;
5042
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5043
- claimToken: z.ZodString;
5044
- fence: z.ZodNumber;
5045
- status: z.ZodEnum<{
5046
- abandoned: "abandoned";
5047
- held: "held";
5048
- releasing: "releasing";
5049
- }>;
5050
- claimedAt: z.ZodNumber;
5051
- updatedAt: z.ZodNumber;
5052
- }, z.core.$strip>>;
5053
- recovery: z.ZodOptional<z.ZodObject<{
5054
- attemptId: z.ZodString;
5055
- preimage: z.ZodObject<{
5056
- status: z.ZodEnum<{
5057
- idle: "idle";
5058
- active: "active";
5059
- starting: "starting";
5060
- dead: "dead";
5061
- disposed: "disposed";
5062
- }>;
5063
- adapterId: z.ZodString;
5064
- binding: z.ZodOptional<z.ZodObject<{
5065
- adapterId: z.ZodString;
5066
- ownerMachineId: z.ZodString;
5067
- ownerInstanceId: z.ZodString;
5068
- }, z.core.$strip>>;
5069
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5070
- }, z.core.$strip>;
5071
- }, z.core.$strip>>;
5072
- leadDesignated: z.ZodBoolean;
5073
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
5074
- }, z.core.$strip>, z.ZodObject<{
5075
- outcome: z.ZodLiteral<"already-claimed">;
5076
- holder: z.ZodObject<{
5077
- machineId: z.ZodString;
5078
- adapterId: z.ZodString;
5079
- providerSessionId: z.ZodString;
5080
- claimId: z.ZodString;
5081
- adapterName: z.ZodString;
5082
- sessionId: z.ZodString;
5083
- agentId: z.ZodString;
5084
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5085
- claimToken: z.ZodString;
5086
- fence: z.ZodNumber;
5087
- status: z.ZodEnum<{
5088
- abandoned: "abandoned";
5089
- held: "held";
5090
- releasing: "releasing";
5091
- }>;
5092
- claimedAt: z.ZodNumber;
5093
- updatedAt: z.ZodNumber;
5094
- }, z.core.$strip>;
5095
- }, z.core.$strip>, z.ZodObject<{
5096
- outcome: z.ZodLiteral<"agent-disposed">;
5097
- }, z.core.$strip>, z.ZodObject<{
5098
- outcome: z.ZodLiteral<"session-not-active">;
5099
- status: z.ZodEnum<{
5100
- closed: "closed";
5101
- discovered: "discovered";
5102
- archived: "archived";
5103
- }>;
5104
- }, z.core.$strip>, z.ZodObject<{
5105
- outcome: z.ZodLiteral<"lead-conflict">;
5106
- currentLeadAgentId: z.ZodNullable<z.ZodString>;
5107
- }, z.core.$strip>, z.ZodObject<{
5108
- outcome: z.ZodLiteral<"not-found">;
5109
- missing: z.ZodEnum<{
5110
- agent: "agent";
5111
- session: "session";
5112
- }>;
5113
- }, z.core.$strip>, z.ZodObject<{
5114
- outcome: z.ZodLiteral<"currency-changed">;
5115
- revision: z.ZodNumber;
5116
- currencyFence: z.ZodNumber;
5117
- currency: z.ZodObject<{
5118
- adapterSessionId: z.ZodNullable<z.ZodString>;
5119
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5120
- currentAdapterSessionIdState: z.ZodEnum<{
5121
- confirmed: "confirmed";
5122
- moved: "moved";
5123
- inherited: "inherited";
5124
- }>;
5125
- }, z.core.$strip>;
5126
- }, z.core.$strip>, z.ZodObject<{
5127
- outcome: z.ZodLiteral<"recovery-conflict">;
5128
- status: z.ZodEnum<{
5129
- idle: "idle";
5130
- active: "active";
5131
- starting: "starting";
5132
- dead: "dead";
5133
- disposed: "disposed";
5134
- }>;
5135
- ownerGeneration: z.ZodNullable<z.ZodObject<{
5136
- claimId: z.ZodString;
5137
- claimToken: z.ZodString;
5138
- fence: z.ZodNumber;
5139
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5140
- status: z.ZodEnum<{
5141
- abandoned: "abandoned";
5142
- held: "held";
5143
- releasing: "releasing";
5144
- }>;
5145
- }, z.core.$strip>>;
5146
- }, z.core.$strip>], "outcome">;
5147
- /** {@inheritDoc SessionOwnershipClaimResponseSchema} */
5148
- type SessionOwnershipClaimResult = z.infer<typeof SessionOwnershipClaimResponseSchema>;
5149
- /**
5150
- * Request payload for `storage:sessionOwnership.settleCurrency`.
5151
- *
5152
- * The write is guarded twice, because two different things can be wrong. The
5153
- * `claimToken` + `fence` pair answers "may this caller write at all"; the
5154
- * `expectedRevision` answers "did the caller compute its target from the state
5155
- * it is overwriting". A settle that passes the first and fails the second is a
5156
- * lost race inside one generation, not a stale owner, and the caller's recovery
5157
- * differs accordingly.
5158
- */
5159
- declare const SessionOwnershipSettleCurrencyRequestSchema: z.ZodObject<{
5160
- agentId: z.ZodString;
5161
- claimToken: z.ZodString;
5162
- fence: z.ZodNumber;
5163
- expectedRevision: z.ZodNumber;
5164
- target: z.ZodObject<{
5165
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5166
- currentAdapterSessionIdState: z.ZodEnum<{
5167
- confirmed: "confirmed";
5168
- moved: "moved";
5169
- inherited: "inherited";
5170
- }>;
5171
- }, z.core.$strip>;
5172
- }, z.core.$strip>;
5173
- /** {@inheritDoc SessionOwnershipSettleCurrencyRequestSchema} */
5174
- type SessionOwnershipSettleCurrencyRequest = z.infer<typeof SessionOwnershipSettleCurrencyRequestSchema>;
5175
- /**
5176
- * Result of `storage:sessionOwnership.settleCurrency`.
5177
- *
5178
- * `sessionSnapshotUpdated` reports whether the session row's currency was
5179
- * refreshed alongside the agent's. Storage decides that by reading the session's
5180
- * lead designation inside the same transaction as the write — a caller that
5181
- * checked lead-ness first and passed a flag would be acting on a read that the
5182
- * write no longer agrees with.
5183
- *
5184
- * That refresh publishes the settled currency **resolved onto the session row's
5185
- * own terms, not copied from `target`**, exactly as a lead designation does (see
5186
- * {@link SessionOwnershipClaimRequestSchema}'s `designateLead`): `inherited`
5187
- * points at the reading row's own `adapterSessionId`, and a lead's origin is
5188
- * generally not its session's, so a verbatim copy would leave the session
5189
- * resolving to its own origin while the lead resolves elsewhere. What the
5190
- * session row ends up carrying is what `resolveResumableAdapterSessionId` yields
5191
- * for the settled lead — so a settle of `inherited` can legitimately leave the
5192
- * session row reading `confirmed` or `moved`.
5193
- *
5194
- * A missing claim is `not-owner`, not `not-found`: the agent exists, the caller
5195
- * simply has no authority over it. Callers that need to report *who* owns it
5196
- * instead read the claim through `listClaims`.
5197
- *
5198
- * Authority is decided before order: a caller whose claim row is gone is
5199
- * `not-owner` even when its fence is also stale, because `superseded` names the
5200
- * generation that outranked it and there is no such generation to name. The
5201
- * authority a caller presents is the *pair* `claimToken` + `fence`, so a live
5202
- * claim carrying a different fence than the caller named is `not-owner` too —
5203
- * that pair never existed, and reporting `superseded` would have to name a
5204
- * `currentFence` that outranks nothing (it may even be below the caller's own).
5205
- *
5206
- * A claim is an ownership of an agent *in a session*, so a claim filed under a
5207
- * session the agent has since left is `not-owner` as well. Whole-record writes
5208
- * can move an agent between sessions; a generation taken while it was in the old
5209
- * one no longer represents any ownership of it, and settling under it would
5210
- * publish its currency into a session its holder was never part of.
5211
- * `release` deliberately does **not** apply that rule — see
5212
- * {@link SessionOwnershipReleaseRequestSchema}.
5213
- */
5214
- declare const SessionOwnershipSettleCurrencyResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5215
- outcome: z.ZodLiteral<"settled">;
5216
- revision: z.ZodNumber;
5217
- currency: z.ZodObject<{
5218
- adapterSessionId: z.ZodNullable<z.ZodString>;
5219
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5220
- currentAdapterSessionIdState: z.ZodEnum<{
5221
- confirmed: "confirmed";
5222
- moved: "moved";
5223
- inherited: "inherited";
5224
- }>;
5225
- }, z.core.$strip>;
5226
- sessionSnapshotUpdated: z.ZodBoolean;
5227
- }, z.core.$strip>, z.ZodObject<{
5228
- outcome: z.ZodLiteral<"idempotent">;
5229
- revision: z.ZodNumber;
5230
- currency: z.ZodObject<{
5231
- adapterSessionId: z.ZodNullable<z.ZodString>;
5232
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5233
- currentAdapterSessionIdState: z.ZodEnum<{
5234
- confirmed: "confirmed";
5235
- moved: "moved";
5236
- inherited: "inherited";
5237
- }>;
5238
- }, z.core.$strip>;
5239
- sessionSnapshotUpdated: z.ZodLiteral<false>;
5240
- }, z.core.$strip>, z.ZodObject<{
5241
- outcome: z.ZodLiteral<"superseded">;
5242
- currentFence: z.ZodNumber;
5243
- }, z.core.$strip>, z.ZodObject<{
5244
- outcome: z.ZodLiteral<"currency-changed">;
5245
- revision: z.ZodNumber;
5246
- currency: z.ZodObject<{
5247
- adapterSessionId: z.ZodNullable<z.ZodString>;
5248
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5249
- currentAdapterSessionIdState: z.ZodEnum<{
5250
- confirmed: "confirmed";
5251
- moved: "moved";
5252
- inherited: "inherited";
5253
- }>;
5254
- }, z.core.$strip>;
5255
- }, z.core.$strip>, z.ZodObject<{
5256
- outcome: z.ZodLiteral<"not-owner">;
5257
- }, z.core.$strip>, z.ZodObject<{
5258
- outcome: z.ZodLiteral<"agent-disposed">;
5259
- }, z.core.$strip>, z.ZodObject<{
5260
- outcome: z.ZodLiteral<"not-found">;
5261
- }, z.core.$strip>], "outcome">;
5262
- /** {@inheritDoc SessionOwnershipSettleCurrencyResponseSchema} */
5263
- type SessionOwnershipSettleCurrencyResult = z.infer<typeof SessionOwnershipSettleCurrencyResponseSchema>;
5264
- /**
5265
- * What the provider did with an agent's conversation.
5266
- *
5267
- * The two members differ in what they *know*, not in how far they got, and the
5268
- * difference decides whether a key may be freed. `confirmed` names a successor
5269
- * the provider acknowledged, so the generations the agent held before it are
5270
- * genuinely retired. `demote` says only that the conversation left, with no
5271
- * acknowledged successor — the provider may still be live under the ID being
5272
- * voided, so its claim is taken (or kept) rather than released.
5273
- */
5274
- declare const OwnershipMovementSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5275
- kind: z.ZodLiteral<"confirmed">;
5276
- providerSessionId: z.ZodString;
5277
- claimToken: z.ZodString;
5278
- }, z.core.$strip>, z.ZodObject<{
5279
- kind: z.ZodLiteral<"demote">;
5280
- claimToken: z.ZodString;
5281
- }, z.core.$strip>], "kind">;
5282
- /** {@inheritDoc OwnershipMovementSchema} */
5283
- type OwnershipMovement = z.infer<typeof OwnershipMovementSchema>;
5284
- /**
5285
- * Request payload for `storage:sessionOwnership.settleMovement`.
5286
- *
5287
- * One call is the whole movement: acquire (or recognize) the successor
5288
- * generation, settle the agent's currency under it, retire the predecessors it
5289
- * replaces and refresh the session snapshot — in one transaction. Composed from
5290
- * `claim` + `settleCurrency` + `release` by a caller, the same act is three
5291
- * transactions with two windows in which a crash strands a key or publishes a
5292
- * currency no generation owns.
5293
- */
5294
- declare const SessionOwnershipSettleMovementRequestSchema$1: z.ZodObject<{
5295
- machineId: z.ZodString;
5296
- adapterId: z.ZodString;
5297
- adapterName: z.ZodString;
5298
- ownerInstance: z.ZodOptional<z.ZodObject<{
5299
- instanceId: z.ZodString;
5300
- }, z.core.$strip>>;
5301
- topology: z.ZodDefault<z.ZodEnum<{
5302
- "machine-exclusive": "machine-exclusive";
5303
- "shared-machine": "shared-machine";
5304
- }>>;
5305
- sessionId: z.ZodString;
5306
- agentId: z.ZodString;
5307
- expectedRevision: z.ZodNumber;
5308
- movement: z.ZodDiscriminatedUnion<[z.ZodObject<{
5309
- kind: z.ZodLiteral<"confirmed">;
5310
- providerSessionId: z.ZodString;
5311
- claimToken: z.ZodString;
5312
- }, z.core.$strip>, z.ZodObject<{
5313
- kind: z.ZodLiteral<"demote">;
5314
- claimToken: z.ZodString;
5315
- }, z.core.$strip>], "kind">;
5316
- }, z.core.$strip>;
5317
- /** {@inheritDoc SessionOwnershipSettleMovementRequestSchema} */
5318
- type SessionOwnershipSettleMovementRequest = z.infer<typeof SessionOwnershipSettleMovementRequestSchema$1>;
5319
- /**
5320
- * Result of `storage:sessionOwnership.settleMovement`.
5321
- *
5322
- * Every outcome other than `settled` leaves the store exactly as it was: the
5323
- * claims phase runs inside the same transaction as the settle, so a refusal
5324
- * reached after a generation was allocated rolls that allocation back with it.
5325
- *
5326
- * **The generation the response names is the one the settle wrote through**, not
5327
- * the one the caller sent. An agent that already held the target key is settled
5328
- * under the claim it already has, and the request's token names no row at all —
5329
- * so a caller that carried its own token into a later release would retire a
5330
- * generation that never existed and leave the real one blocking the key.
5331
- */
5332
- declare const SessionOwnershipSettleMovementResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5333
- outcome: z.ZodLiteral<"settled">;
5334
- revision: z.ZodNumber;
5335
- currency: z.ZodObject<{
5336
- adapterSessionId: z.ZodNullable<z.ZodString>;
5337
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5338
- currentAdapterSessionIdState: z.ZodEnum<{
5339
- confirmed: "confirmed";
5340
- moved: "moved";
5341
- inherited: "inherited";
5342
- }>;
5343
- }, z.core.$strip>;
5344
- sessionSnapshotUpdated: z.ZodBoolean;
5345
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
5346
- claim: z.ZodObject<{
5347
- machineId: z.ZodString;
5348
- adapterId: z.ZodString;
5349
- providerSessionId: z.ZodString;
5350
- claimId: z.ZodString;
5351
- adapterName: z.ZodString;
5352
- sessionId: z.ZodString;
5353
- agentId: z.ZodString;
5354
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5355
- claimToken: z.ZodString;
5356
- fence: z.ZodNumber;
5357
- status: z.ZodEnum<{
5358
- abandoned: "abandoned";
5359
- held: "held";
5360
- releasing: "releasing";
5361
- }>;
5362
- claimedAt: z.ZodNumber;
5363
- updatedAt: z.ZodNumber;
5364
- }, z.core.$strip>;
5365
- }, z.core.$strip>, z.ZodObject<{
5366
- outcome: z.ZodLiteral<"idempotent">;
5367
- revision: z.ZodNumber;
5368
- currency: z.ZodObject<{
5369
- adapterSessionId: z.ZodNullable<z.ZodString>;
5370
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5371
- currentAdapterSessionIdState: z.ZodEnum<{
5372
- confirmed: "confirmed";
5373
- moved: "moved";
5374
- inherited: "inherited";
5375
- }>;
5376
- }, z.core.$strip>;
5377
- sessionSnapshotUpdated: z.ZodLiteral<false>;
5378
- claim: z.ZodNullable<z.ZodObject<{
5379
- machineId: z.ZodString;
5380
- adapterId: z.ZodString;
5381
- providerSessionId: z.ZodString;
5382
- claimId: z.ZodString;
5383
- adapterName: z.ZodString;
5384
- sessionId: z.ZodString;
5385
- agentId: z.ZodString;
5386
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5387
- claimToken: z.ZodString;
5388
- fence: z.ZodNumber;
5389
- status: z.ZodEnum<{
5390
- abandoned: "abandoned";
5391
- held: "held";
5392
- releasing: "releasing";
5393
- }>;
5394
- claimedAt: z.ZodNumber;
5395
- updatedAt: z.ZodNumber;
5396
- }, z.core.$strip>>;
5397
- }, z.core.$strip>, z.ZodObject<{
5398
- outcome: z.ZodLiteral<"already-claimed">;
5399
- holder: z.ZodObject<{
5400
- machineId: z.ZodString;
5401
- adapterId: z.ZodString;
5402
- providerSessionId: z.ZodString;
5403
- claimId: z.ZodString;
5404
- adapterName: z.ZodString;
5405
- sessionId: z.ZodString;
5406
- agentId: z.ZodString;
5407
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5408
- claimToken: z.ZodString;
5409
- fence: z.ZodNumber;
5410
- status: z.ZodEnum<{
5411
- abandoned: "abandoned";
5412
- held: "held";
5413
- releasing: "releasing";
5414
- }>;
5415
- claimedAt: z.ZodNumber;
5416
- updatedAt: z.ZodNumber;
5417
- }, z.core.$strip>;
5418
- }, z.core.$strip>, z.ZodObject<{
5419
- outcome: z.ZodLiteral<"superseded">;
5420
- currentFence: z.ZodNumber;
5421
- }, z.core.$strip>, z.ZodObject<{
5422
- outcome: z.ZodLiteral<"currency-changed">;
5423
- revision: z.ZodNumber;
5424
- currency: z.ZodObject<{
5425
- adapterSessionId: z.ZodNullable<z.ZodString>;
5426
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5427
- currentAdapterSessionIdState: z.ZodEnum<{
5428
- confirmed: "confirmed";
5429
- moved: "moved";
5430
- inherited: "inherited";
5431
- }>;
5432
- }, z.core.$strip>;
5433
- }, z.core.$strip>, z.ZodObject<{
5434
- outcome: z.ZodLiteral<"not-owner">;
5435
- }, z.core.$strip>, z.ZodObject<{
5436
- outcome: z.ZodLiteral<"agent-disposed">;
5437
- }, z.core.$strip>, z.ZodObject<{
5438
- outcome: z.ZodLiteral<"not-found">;
5439
- }, z.core.$strip>], "outcome">;
5440
- /** {@inheritDoc SessionOwnershipSettleMovementResponseSchema} */
5441
- type SessionOwnershipSettleMovementResult = z.infer<typeof SessionOwnershipSettleMovementResponseSchema>;
5442
- /**
5443
- * How a claim is given up.
5444
- *
5445
- * - `released` — the provider session is provably done with; the row is removed
5446
- * and the key becomes claimable again.
5447
- * - `releasing` — teardown started but is not confirmed; the row stays and keeps
5448
- * blocking.
5449
- * - `abandoned` — the owner failed after dispatching to the provider; the row
5450
- * stays and keeps blocking until an explicit takeover names its token, or
5451
- * until that same generation later confirms teardown with a `released` of its
5452
- * own (see {@link AdapterSessionClaimStatusSchema}). Storage does not judge
5453
- * whether that takeover is legitimate.
5454
- *
5455
- * Only the first frees the key. A failure after dispatch must never take that
5456
- * path: the provider process may still be alive, and a second owner attaching
5457
- * to a live conversation is the exact outcome this aggregate exists to prevent.
5458
- */
5459
- declare const AdapterSessionClaimDispositionSchema: z.ZodEnum<{
5460
- released: "released";
5461
- abandoned: "abandoned";
5462
- releasing: "releasing";
5463
- }>;
5464
- /** {@inheritDoc AdapterSessionClaimDispositionSchema} */
5465
- type AdapterSessionClaimDisposition = z.infer<typeof AdapterSessionClaimDispositionSchema>;
5466
- /**
5467
- * Request payload for `storage:sessionOwnership.release`.
5468
- *
5469
- * The token and the agent are the whole of the authority, deliberately less than
5470
- * `settleCurrency` asks for: that op additionally requires the claim to be filed
5471
- * under the agent's *current* session, because it exercises the claim as
5472
- * authority over that agent's currency. Giving a claim up needs no authority
5473
- * beyond having been the one who took it. Demanding session membership here
5474
- * would strand exactly the claims that most need retiring — an agent moved to
5475
- * another session would leave its old generation unreleasable, blocking the
5476
- * ownership key against everyone, forever.
5477
- */
5478
- declare const SessionOwnershipReleaseRequestSchema: z.ZodObject<{
5479
- agentId: z.ZodString;
5480
- claimToken: z.ZodString;
5481
- disposition: z.ZodEnum<{
5482
- released: "released";
5483
- abandoned: "abandoned";
5484
- releasing: "releasing";
5485
- }>;
5486
- }, z.core.$strip>;
5487
- /** {@inheritDoc SessionOwnershipReleaseRequestSchema} */
5488
- type SessionOwnershipReleaseRequest = z.infer<typeof SessionOwnershipReleaseRequestSchema>;
5489
- /** Result of `storage:sessionOwnership.release`. */
5490
- declare const SessionOwnershipReleaseResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5491
- outcome: z.ZodLiteral<"released">;
5492
- }, z.core.$strip>, z.ZodObject<{
5493
- outcome: z.ZodLiteral<"marked">;
5494
- claim: z.ZodObject<{
5495
- machineId: z.ZodString;
5496
- adapterId: z.ZodString;
5497
- providerSessionId: z.ZodString;
5498
- claimId: z.ZodString;
5499
- adapterName: z.ZodString;
5500
- sessionId: z.ZodString;
5501
- agentId: z.ZodString;
5502
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5503
- claimToken: z.ZodString;
5504
- fence: z.ZodNumber;
5505
- status: z.ZodEnum<{
5506
- abandoned: "abandoned";
5507
- held: "held";
5508
- releasing: "releasing";
5509
- }>;
5510
- claimedAt: z.ZodNumber;
5511
- updatedAt: z.ZodNumber;
5512
- }, z.core.$strip>;
5513
- }, z.core.$strip>, z.ZodObject<{
5514
- outcome: z.ZodLiteral<"not-owner">;
5515
- holder: z.ZodObject<{
5516
- machineId: z.ZodString;
5517
- adapterId: z.ZodString;
5518
- providerSessionId: z.ZodString;
5519
- claimId: z.ZodString;
5520
- adapterName: z.ZodString;
5521
- sessionId: z.ZodString;
5522
- agentId: z.ZodString;
5523
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5524
- claimToken: z.ZodString;
5525
- fence: z.ZodNumber;
5526
- status: z.ZodEnum<{
5527
- abandoned: "abandoned";
5528
- held: "held";
5529
- releasing: "releasing";
5530
- }>;
5531
- claimedAt: z.ZodNumber;
5532
- updatedAt: z.ZodNumber;
5533
- }, z.core.$strip>;
5534
- }, z.core.$strip>, z.ZodObject<{
5535
- outcome: z.ZodLiteral<"not-found">;
5536
- }, z.core.$strip>], "outcome">;
5537
- /** {@inheritDoc SessionOwnershipReleaseResponseSchema} */
5538
- type SessionOwnershipReleaseResult = z.infer<typeof SessionOwnershipReleaseResponseSchema>;
5539
- /**
5540
- * Request payload for `storage:sessionOwnership.releaseAgentClaims`.
5541
- *
5542
- * The plural of `release`, and not a convenience: **omitting `claimToken` is the
5543
- * teardown fan-out**, which exists because reading an agent's claims and
5544
- * releasing them one by one cannot see a claim taken in between — and an agent
5545
- * legitimately holds two mid-movement. One predicate over `agent_id` retires
5546
- * whatever is there at the instant the statement runs, which is the only shape
5547
- * that can be complete.
5548
- *
5549
- * Naming a token scopes the act to exactly one generation, which is the rollback
5550
- * form: a start that failed before dispatch must give up the generation it took
5551
- * and nothing else, because the agent may hold a second one from an unrelated
5552
- * in-flight movement.
5553
- *
5554
- * **Not `disposed`-guarded**, unlike every other ownership operation. Giving a
5555
- * claim up is the one act a removed agent must still perform; guarding it would
5556
- * strand exactly the claims that most need retiring.
5557
- */
5558
- declare const SessionOwnershipReleaseAgentClaimsRequestSchema: z.ZodObject<{
5559
- agentId: z.ZodString;
5560
- claimToken: z.ZodOptional<z.ZodString>;
5561
- disposition: z.ZodEnum<{
5562
- released: "released";
5563
- abandoned: "abandoned";
5564
- releasing: "releasing";
5565
- }>;
5566
- }, z.core.$strip>;
5567
- /** {@inheritDoc SessionOwnershipReleaseAgentClaimsRequestSchema} */
5568
- type SessionOwnershipReleaseAgentClaimsRequest = z.infer<typeof SessionOwnershipReleaseAgentClaimsRequestSchema>;
5569
- /**
5570
- * Result of `storage:sessionOwnership.releaseAgentClaims`.
5571
- *
5572
- * Not a discriminated union, because there is no failure to model: an agent with
5573
- * no claims — including one whose row is gone entirely — yields empty lists
5574
- * rather than an error, which is what makes teardown idempotent.
5575
- */
5576
- declare const SessionOwnershipReleaseAgentClaimsResponseSchema: z.ZodObject<{
5577
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
5578
- markedClaims: z.ZodArray<z.ZodObject<{
5579
- machineId: z.ZodString;
5580
- adapterId: z.ZodString;
5581
- providerSessionId: z.ZodString;
5582
- claimId: z.ZodString;
5583
- adapterName: z.ZodString;
5584
- sessionId: z.ZodString;
5585
- agentId: z.ZodString;
5586
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5587
- claimToken: z.ZodString;
5588
- fence: z.ZodNumber;
5589
- status: z.ZodEnum<{
5590
- abandoned: "abandoned";
5591
- held: "held";
5592
- releasing: "releasing";
5593
- }>;
5594
- claimedAt: z.ZodNumber;
5595
- updatedAt: z.ZodNumber;
5596
- }, z.core.$strip>>;
5597
- claimTokenNotFound: z.ZodBoolean;
5598
- }, z.core.$strip>;
5599
- /** {@inheritDoc SessionOwnershipReleaseAgentClaimsResponseSchema} */
5600
- type SessionOwnershipReleaseAgentClaimsResult = z.infer<typeof SessionOwnershipReleaseAgentClaimsResponseSchema>;
5601
- /**
5602
- * Request payload for `storage:sessionOwnership.listClaims`.
5603
- *
5604
- * `machineId` is mandatory because reconciliation is a per-machine act: a
5605
- * runtime may only reason about liveness of owners on its own machine, and a
5606
- * query that could span machines invites a takeover decision that has no
5607
- * evidence behind it.
5608
- */
5609
- declare const SessionOwnershipListClaimsRequestSchema: z.ZodObject<{
5610
- machineId: z.ZodString;
5611
- adapterId: z.ZodOptional<z.ZodString>;
5612
- providerSessionId: z.ZodOptional<z.ZodString>;
5613
- statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
5614
- abandoned: "abandoned";
5615
- held: "held";
5616
- releasing: "releasing";
5617
- }>>>;
5618
- }, z.core.$strip>;
5619
- /** {@inheritDoc SessionOwnershipListClaimsRequestSchema} */
5620
- type SessionOwnershipListClaimsRequest = z.infer<typeof SessionOwnershipListClaimsRequestSchema>;
5621
- /**
5622
- * Session ownership storage namespace.
5623
- *
5624
- * The durable seam of the session-ownership aggregate. Its invariant:
5625
- *
5626
- * A provider-native session has exactly one durable runtime owner within its
5627
- * machine/adapter namespace. Agent currency may only be changed by the current
5628
- * claim generation. Session currency is a persisted snapshot of the designated
5629
- * lead's currency.
5630
- *
5631
- * **Why a dedicated namespace.** `storage:session.update` is a partial-update
5632
- * surface with no notion of who is allowed to write. Widening it with
5633
- * compare-and-swap semantics would put a versioned-write contract on every
5634
- * existing caller, turning one seam's concurrency problem into a storage-wide
5635
- * one. The operations here are the narrow alternative: every one of them states
5636
- * its authority up front, and they are the only writers of the agent currency
5637
- * columns and of the claim table.
5638
- *
5639
- * **No second writer, including for the session snapshot.** The currency pair
5640
- * is on neither `storage:session.update` nor `storage:session.set`, so a
5641
- * snapshot written here can only be superseded by another write through this
5642
- * seam — one that had to present a claim generation to get in. That is what
5643
- * makes the snapshot's freshness derivable rather than hoped for.
5644
- *
5645
- * **Transactionality.** These handlers run multi-row writes inside
5646
- * `executeTransaction` from `@makaio/storage-drizzle`, which is a deliberate
5647
- * exception to the single-statement rule the other session storage handlers
5648
- * follow. That rule exists because a bare `db.transaction()` holds a write lock
5649
- * across await boundaries and deadlocks against concurrent handlers on the same
5650
- * connection; `executeTransaction` closes exactly that hole by serializing
5651
- * transaction callbacks per database handle before opening one, so a second
5652
- * transaction queues instead of colliding at `BEGIN`. The serialization is
5653
- * process-local by construction, which is why cross-process exclusivity is NOT
5654
- * derived from it: "exactly one winner" comes from the claim table's unique
5655
- * index over the ownership key, and the acquiring statement is an insert against
5656
- * that index rather than a read-then-write. The transaction supplies atomicity
5657
- * across the claim, agent and session rows; the index supplies exclusivity.
5658
- * @example
5659
- * ```typescript
5660
- * import { SessionOwnershipStorageSubjects } from '@makaio/framework/contracts';
5661
- *
5662
- * const result = await bus.request(SessionOwnershipStorageSubjects.claim, {
5663
- * machineId, adapterId, adapterName, providerSessionId,
5664
- * sessionId, agentId, claimToken,
5665
- * designateLead: { expectedLeadAgentId: null },
5666
- * });
5667
- * // 'already-claimed' means another runtime owns the thread: degrade, never resume.
5668
- * ```
5669
- */
5670
- declare const SessionOwnershipStorageNamespace: ContractStorageNamespaceDefinition<"sessionOwnership", {
5671
- /**
5672
- * Read one agent's durable ownership state.
5673
- *
5674
- * **Not a consistent snapshot**, in either direction: the agent row and its
5675
- * claims are read as two statements, so a concurrent claim or release can
5676
- * show up in one and not the other. A reader may therefore observe a claim
5677
- * whose fence the agent's `currencyFence` does not yet account for, or a
5678
- * `currencyFence` whose authoring claim has already been released. Both are
5679
- * legitimate instants of the aggregate; a reader that needs authority must
5680
- * ask for it (`settleCurrency`) rather than infer it from this read.
5681
- *
5682
- * Subject: `storage:sessionOwnership.read`
5683
- * Type: Request (RPC)
5684
- */
5685
- read: {
5686
- request: z.ZodObject<{
5687
- agentId: z.ZodString;
5688
- }, z.core.$strip>;
5689
- response: z.ZodObject<{
5690
- ownership: z.ZodNullable<z.ZodObject<{
5691
- agentId: z.ZodString;
5692
- sessionId: z.ZodString;
5693
- currency: z.ZodObject<{
5694
- adapterSessionId: z.ZodNullable<z.ZodString>;
5695
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5696
- currentAdapterSessionIdState: z.ZodEnum<{
5697
- confirmed: "confirmed";
5698
- moved: "moved";
5699
- inherited: "inherited";
5700
- }>;
5701
- }, z.core.$strip>;
5702
- revision: z.ZodNumber;
5703
- currencyFence: z.ZodNumber;
5704
- claims: z.ZodArray<z.ZodObject<{
5705
- machineId: z.ZodString;
5706
- adapterId: z.ZodString;
5707
- providerSessionId: z.ZodString;
5708
- claimId: z.ZodString;
5709
- adapterName: z.ZodString;
5710
- sessionId: z.ZodString;
5711
- agentId: z.ZodString;
5712
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5713
- claimToken: z.ZodString;
5714
- fence: z.ZodNumber;
5715
- status: z.ZodEnum<{
5716
- abandoned: "abandoned";
5717
- held: "held";
5718
- releasing: "releasing";
5719
- }>;
5720
- claimedAt: z.ZodNumber;
5721
- updatedAt: z.ZodNumber;
5722
- }, z.core.$strip>>;
5723
- }, z.core.$strip>>;
5724
- }, z.core.$strip>;
5725
- };
5726
- /**
5727
- * Take or take over the ownership claim on a provider session, optionally
5728
- * designating the claiming agent as the session's lead in the same
5729
- * transaction.
5730
- *
5731
- * With `providerSessionId: null` it is the **keyless reservation**: no claim
5732
- * row at all, and the designation plus its currency mirror are the whole
5733
- * effect. That is the fresh-start shape — there is no provider identity to
5734
- * own yet, and the designation still has to be atomic and compare-and-swap.
5735
- *
5736
- * Subject: `storage:sessionOwnership.claim`
5737
- * Type: Request (RPC)
5738
- */
5739
- claim: {
5740
- request: z.ZodObject<{
5741
- machineId: z.ZodString;
5742
- adapterId: z.ZodString;
5743
- providerSessionId: z.ZodNullable<z.ZodString>;
5744
- adapterName: z.ZodString;
5745
- ownerInstance: z.ZodOptional<z.ZodObject<{
5746
- instanceId: z.ZodString;
5747
- }, z.core.$strip>>;
5748
- topology: z.ZodDefault<z.ZodEnum<{
5749
- "machine-exclusive": "machine-exclusive";
5750
- "shared-machine": "shared-machine";
5751
- }>>;
5752
- recoveryGuard: z.ZodOptional<z.ZodObject<{
5753
- expectedStatus: z.ZodEnum<{
5754
- idle: "idle";
5755
- active: "active";
5756
- starting: "starting";
5757
- dead: "dead";
5758
- disposed: "disposed";
5759
- }>;
5760
- expectedPreimage: z.ZodObject<{
5761
- status: z.ZodEnum<{
5762
- idle: "idle";
5763
- active: "active";
5764
- starting: "starting";
5765
- dead: "dead";
5766
- disposed: "disposed";
5767
- }>;
5768
- adapterId: z.ZodString;
5769
- binding: z.ZodOptional<z.ZodObject<{
5770
- adapterId: z.ZodString;
5771
- ownerMachineId: z.ZodString;
5772
- ownerInstanceId: z.ZodString;
5773
- }, z.core.$strip>>;
5774
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5775
- }, z.core.$strip>;
5776
- expectedRevision: z.ZodNumber;
5777
- expectedCurrencyFence: z.ZodNumber;
5778
- expectedCurrency: z.ZodObject<{
5779
- adapterSessionId: z.ZodNullable<z.ZodString>;
5780
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5781
- currentAdapterSessionIdState: z.ZodEnum<{
5782
- confirmed: "confirmed";
5783
- moved: "moved";
5784
- inherited: "inherited";
5785
- }>;
5786
- }, z.core.$strip>;
5787
- ownerGeneration: z.ZodNullable<z.ZodObject<{
5788
- claimId: z.ZodString;
5789
- claimToken: z.ZodString;
5790
- fence: z.ZodNumber;
5791
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5792
- status: z.ZodEnum<{
5793
- abandoned: "abandoned";
5794
- held: "held";
5795
- releasing: "releasing";
5796
- }>;
5797
- }, z.core.$strip>>;
5798
- }, z.core.$strip>>;
5799
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5800
- sessionId: z.ZodString;
5801
- agentId: z.ZodString;
5802
- claimToken: z.ZodString;
5803
- supersedes: z.ZodOptional<z.ZodObject<{
5804
- claimToken: z.ZodString;
5805
- }, z.core.$strip>>;
5806
- designateLead: z.ZodOptional<z.ZodObject<{
5807
- expectedLeadAgentId: z.ZodNullable<z.ZodString>;
5808
- clear: z.ZodOptional<z.ZodLiteral<true>>;
5809
- restore: z.ZodOptional<z.ZodLiteral<true>>;
5810
- }, z.core.$strip>>;
5811
- }, z.core.$strip>;
5812
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
5813
- outcome: z.ZodLiteral<"claimed">;
5814
- claim: z.ZodNullable<z.ZodObject<{
5815
- machineId: z.ZodString;
5816
- adapterId: z.ZodString;
5817
- providerSessionId: z.ZodString;
5818
- claimId: z.ZodString;
5819
- adapterName: z.ZodString;
5820
- sessionId: z.ZodString;
5821
- agentId: z.ZodString;
5822
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5823
- claimToken: z.ZodString;
5824
- fence: z.ZodNumber;
5825
- status: z.ZodEnum<{
5826
- abandoned: "abandoned";
5827
- held: "held";
5828
- releasing: "releasing";
5829
- }>;
5830
- claimedAt: z.ZodNumber;
5831
- updatedAt: z.ZodNumber;
5832
- }, z.core.$strip>>;
5833
- recovery: z.ZodOptional<z.ZodObject<{
5834
- attemptId: z.ZodString;
5835
- preimage: z.ZodObject<{
5836
- status: z.ZodEnum<{
5837
- idle: "idle";
5838
- active: "active";
5839
- starting: "starting";
5840
- dead: "dead";
5841
- disposed: "disposed";
5842
- }>;
5843
- adapterId: z.ZodString;
5844
- binding: z.ZodOptional<z.ZodObject<{
5845
- adapterId: z.ZodString;
5846
- ownerMachineId: z.ZodString;
5847
- ownerInstanceId: z.ZodString;
5848
- }, z.core.$strip>>;
5849
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5850
- }, z.core.$strip>;
5851
- }, z.core.$strip>>;
5852
- leadDesignated: z.ZodBoolean;
5853
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
5854
- }, z.core.$strip>, z.ZodObject<{
5855
- outcome: z.ZodLiteral<"idempotent">;
5856
- claim: z.ZodNullable<z.ZodObject<{
5857
- machineId: z.ZodString;
5858
- adapterId: z.ZodString;
5859
- providerSessionId: z.ZodString;
5860
- claimId: z.ZodString;
5861
- adapterName: z.ZodString;
5862
- sessionId: z.ZodString;
5863
- agentId: z.ZodString;
5864
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5865
- claimToken: z.ZodString;
5866
- fence: z.ZodNumber;
5867
- status: z.ZodEnum<{
5868
- abandoned: "abandoned";
5869
- held: "held";
5870
- releasing: "releasing";
5871
- }>;
5872
- claimedAt: z.ZodNumber;
5873
- updatedAt: z.ZodNumber;
5874
- }, z.core.$strip>>;
5875
- recovery: z.ZodOptional<z.ZodObject<{
5876
- attemptId: z.ZodString;
5877
- preimage: z.ZodObject<{
5878
- status: z.ZodEnum<{
5879
- idle: "idle";
5880
- active: "active";
5881
- starting: "starting";
5882
- dead: "dead";
5883
- disposed: "disposed";
5884
- }>;
5885
- adapterId: z.ZodString;
5886
- binding: z.ZodOptional<z.ZodObject<{
5887
- adapterId: z.ZodString;
5888
- ownerMachineId: z.ZodString;
5889
- ownerInstanceId: z.ZodString;
5890
- }, z.core.$strip>>;
5891
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5892
- }, z.core.$strip>;
5893
- }, z.core.$strip>>;
5894
- leadDesignated: z.ZodBoolean;
5895
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
5896
- }, z.core.$strip>, z.ZodObject<{
5897
- outcome: z.ZodLiteral<"already-claimed">;
5898
- holder: z.ZodObject<{
5899
- machineId: z.ZodString;
5900
- adapterId: z.ZodString;
5901
- providerSessionId: z.ZodString;
5902
- claimId: z.ZodString;
5903
- adapterName: z.ZodString;
5904
- sessionId: z.ZodString;
5905
- agentId: z.ZodString;
5906
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5907
- claimToken: z.ZodString;
5908
- fence: z.ZodNumber;
5909
- status: z.ZodEnum<{
5910
- abandoned: "abandoned";
5911
- held: "held";
5912
- releasing: "releasing";
5913
- }>;
5914
- claimedAt: z.ZodNumber;
5915
- updatedAt: z.ZodNumber;
5916
- }, z.core.$strip>;
5917
- }, z.core.$strip>, z.ZodObject<{
5918
- outcome: z.ZodLiteral<"agent-disposed">;
5919
- }, z.core.$strip>, z.ZodObject<{
5920
- outcome: z.ZodLiteral<"session-not-active">;
5921
- status: z.ZodEnum<{
5922
- closed: "closed";
5923
- discovered: "discovered";
5924
- archived: "archived";
5925
- }>;
5926
- }, z.core.$strip>, z.ZodObject<{
5927
- outcome: z.ZodLiteral<"lead-conflict">;
5928
- currentLeadAgentId: z.ZodNullable<z.ZodString>;
5929
- }, z.core.$strip>, z.ZodObject<{
5930
- outcome: z.ZodLiteral<"not-found">;
5931
- missing: z.ZodEnum<{
5932
- agent: "agent";
5933
- session: "session";
5934
- }>;
5935
- }, z.core.$strip>, z.ZodObject<{
5936
- outcome: z.ZodLiteral<"currency-changed">;
5937
- revision: z.ZodNumber;
5938
- currencyFence: z.ZodNumber;
5939
- currency: z.ZodObject<{
5940
- adapterSessionId: z.ZodNullable<z.ZodString>;
5941
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
5942
- currentAdapterSessionIdState: z.ZodEnum<{
5943
- confirmed: "confirmed";
5944
- moved: "moved";
5945
- inherited: "inherited";
5946
- }>;
5947
- }, z.core.$strip>;
5948
- }, z.core.$strip>, z.ZodObject<{
5949
- outcome: z.ZodLiteral<"recovery-conflict">;
5950
- status: z.ZodEnum<{
5951
- idle: "idle";
5952
- active: "active";
5953
- starting: "starting";
5954
- dead: "dead";
5955
- disposed: "disposed";
5956
- }>;
5957
- ownerGeneration: z.ZodNullable<z.ZodObject<{
5958
- claimId: z.ZodString;
5959
- claimToken: z.ZodString;
5960
- fence: z.ZodNumber;
5961
- ownerInstanceId: z.ZodNullable<z.ZodString>;
5962
- status: z.ZodEnum<{
5963
- abandoned: "abandoned";
5964
- held: "held";
5965
- releasing: "releasing";
5966
- }>;
5967
- }, z.core.$strip>>;
5968
- }, z.core.$strip>], "outcome">;
5969
- }; /** Terminalize a recovery attempt under its opaque attempt fence. */
5970
- finalizeRecovery: {
5971
- request: z.ZodObject<{
5972
- agentId: z.ZodString;
5973
- attemptId: z.ZodString;
5974
- binding: z.ZodObject<{
5975
- adapterId: z.ZodString;
5976
- ownerMachineId: z.ZodString;
5977
- ownerInstanceId: z.ZodString;
5978
- }, z.core.$strip>;
5979
- action: z.ZodDiscriminatedUnion<[z.ZodObject<{
5980
- kind: z.ZodLiteral<"rollback">;
5981
- preimage: z.ZodObject<{
5982
- status: z.ZodEnum<{
5983
- idle: "idle";
5984
- active: "active";
5985
- starting: "starting";
5986
- dead: "dead";
5987
- disposed: "disposed";
5988
- }>;
5989
- adapterId: z.ZodString;
5990
- binding: z.ZodOptional<z.ZodObject<{
5991
- adapterId: z.ZodString;
5992
- ownerMachineId: z.ZodString;
5993
- ownerInstanceId: z.ZodString;
5994
- }, z.core.$strip>>;
5995
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
5996
- }, z.core.$strip>;
5997
- }, z.core.$strip>, z.ZodObject<{
5998
- kind: z.ZodLiteral<"succeeded">;
5999
- }, z.core.$strip>, z.ZodObject<{
6000
- kind: z.ZodLiteral<"failed">;
6001
- }, z.core.$strip>], "kind">;
6002
- }, z.core.$strip>;
6003
- response: z.ZodObject<{
6004
- applied: z.ZodBoolean;
6005
- }, z.core.$strip>;
6006
- };
6007
- /**
6008
- * Write an agent's adapter-session currency under a claim generation, and
6009
- * mirror it onto the session row when the agent is the designated lead.
6010
- *
6011
- * What is settled here is what a restart resumes: the resume-identity path
6012
- * resolves an agent's currency from this row whenever it has been settled,
6013
- * and falls back to the session row only for rows written before the agent
6014
- * row could carry currency at all.
6015
- *
6016
- * Subject: `storage:sessionOwnership.settleCurrency`
6017
- * Type: Request (RPC)
6018
- */
6019
- settleCurrency: {
6020
- request: z.ZodObject<{
6021
- agentId: z.ZodString;
6022
- claimToken: z.ZodString;
6023
- fence: z.ZodNumber;
6024
- expectedRevision: z.ZodNumber;
6025
- target: z.ZodObject<{
6026
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6027
- currentAdapterSessionIdState: z.ZodEnum<{
6028
- confirmed: "confirmed";
6029
- moved: "moved";
6030
- inherited: "inherited";
6031
- }>;
6032
- }, z.core.$strip>;
6033
- }, z.core.$strip>;
6034
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6035
- outcome: z.ZodLiteral<"settled">;
6036
- revision: z.ZodNumber;
6037
- currency: z.ZodObject<{
6038
- adapterSessionId: z.ZodNullable<z.ZodString>;
6039
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6040
- currentAdapterSessionIdState: z.ZodEnum<{
6041
- confirmed: "confirmed";
6042
- moved: "moved";
6043
- inherited: "inherited";
6044
- }>;
6045
- }, z.core.$strip>;
6046
- sessionSnapshotUpdated: z.ZodBoolean;
6047
- }, z.core.$strip>, z.ZodObject<{
6048
- outcome: z.ZodLiteral<"idempotent">;
6049
- revision: z.ZodNumber;
6050
- currency: z.ZodObject<{
6051
- adapterSessionId: z.ZodNullable<z.ZodString>;
6052
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6053
- currentAdapterSessionIdState: z.ZodEnum<{
6054
- confirmed: "confirmed";
6055
- moved: "moved";
6056
- inherited: "inherited";
6057
- }>;
6058
- }, z.core.$strip>;
6059
- sessionSnapshotUpdated: z.ZodLiteral<false>;
6060
- }, z.core.$strip>, z.ZodObject<{
6061
- outcome: z.ZodLiteral<"superseded">;
6062
- currentFence: z.ZodNumber;
6063
- }, z.core.$strip>, z.ZodObject<{
6064
- outcome: z.ZodLiteral<"currency-changed">;
6065
- revision: z.ZodNumber;
6066
- currency: z.ZodObject<{
6067
- adapterSessionId: z.ZodNullable<z.ZodString>;
6068
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6069
- currentAdapterSessionIdState: z.ZodEnum<{
6070
- confirmed: "confirmed";
6071
- moved: "moved";
6072
- inherited: "inherited";
6073
- }>;
6074
- }, z.core.$strip>;
6075
- }, z.core.$strip>, z.ZodObject<{
6076
- outcome: z.ZodLiteral<"not-owner">;
6077
- }, z.core.$strip>, z.ZodObject<{
6078
- outcome: z.ZodLiteral<"agent-disposed">;
6079
- }, z.core.$strip>, z.ZodObject<{
6080
- outcome: z.ZodLiteral<"not-found">;
6081
- }, z.core.$strip>], "outcome">;
6082
- };
6083
- /**
6084
- * Record a provider-session movement in full: acquire or recognize the
6085
- * successor generation, settle the agent's currency under it, retire the
6086
- * predecessors it replaces, and mirror the result onto the session row —
6087
- * all in one transaction.
6088
- *
6089
- * The composite `settleCurrency` exists inside. Callers use this one;
6090
- * `settleCurrency` remains the single-step primitive the claim/settle
6091
- * interleavings are exercised through.
6092
- *
6093
- * Subject: `storage:sessionOwnership.settleMovement`
6094
- * Type: Request (RPC)
6095
- */
6096
- settleMovement: {
6097
- request: z.ZodObject<{
6098
- machineId: z.ZodString;
6099
- adapterId: z.ZodString;
6100
- adapterName: z.ZodString;
6101
- ownerInstance: z.ZodOptional<z.ZodObject<{
6102
- instanceId: z.ZodString;
6103
- }, z.core.$strip>>;
6104
- topology: z.ZodDefault<z.ZodEnum<{
6105
- "machine-exclusive": "machine-exclusive";
6106
- "shared-machine": "shared-machine";
6107
- }>>;
6108
- sessionId: z.ZodString;
6109
- agentId: z.ZodString;
6110
- expectedRevision: z.ZodNumber;
6111
- movement: z.ZodDiscriminatedUnion<[z.ZodObject<{
6112
- kind: z.ZodLiteral<"confirmed">;
6113
- providerSessionId: z.ZodString;
6114
- claimToken: z.ZodString;
6115
- }, z.core.$strip>, z.ZodObject<{
6116
- kind: z.ZodLiteral<"demote">;
6117
- claimToken: z.ZodString;
6118
- }, z.core.$strip>], "kind">;
6119
- }, z.core.$strip>;
6120
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6121
- outcome: z.ZodLiteral<"settled">;
6122
- revision: z.ZodNumber;
6123
- currency: z.ZodObject<{
6124
- adapterSessionId: z.ZodNullable<z.ZodString>;
6125
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6126
- currentAdapterSessionIdState: z.ZodEnum<{
6127
- confirmed: "confirmed";
6128
- moved: "moved";
6129
- inherited: "inherited";
6130
- }>;
6131
- }, z.core.$strip>;
6132
- sessionSnapshotUpdated: z.ZodBoolean;
6133
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
6134
- claim: z.ZodObject<{
6135
- machineId: z.ZodString;
6136
- adapterId: z.ZodString;
6137
- providerSessionId: z.ZodString;
6138
- claimId: z.ZodString;
6139
- adapterName: z.ZodString;
6140
- sessionId: z.ZodString;
6141
- agentId: z.ZodString;
6142
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6143
- claimToken: z.ZodString;
6144
- fence: z.ZodNumber;
6145
- status: z.ZodEnum<{
6146
- abandoned: "abandoned";
6147
- held: "held";
6148
- releasing: "releasing";
6149
- }>;
6150
- claimedAt: z.ZodNumber;
6151
- updatedAt: z.ZodNumber;
6152
- }, z.core.$strip>;
6153
- }, z.core.$strip>, z.ZodObject<{
6154
- outcome: z.ZodLiteral<"idempotent">;
6155
- revision: z.ZodNumber;
6156
- currency: z.ZodObject<{
6157
- adapterSessionId: z.ZodNullable<z.ZodString>;
6158
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6159
- currentAdapterSessionIdState: z.ZodEnum<{
6160
- confirmed: "confirmed";
6161
- moved: "moved";
6162
- inherited: "inherited";
6163
- }>;
6164
- }, z.core.$strip>;
6165
- sessionSnapshotUpdated: z.ZodLiteral<false>;
6166
- claim: z.ZodNullable<z.ZodObject<{
6167
- machineId: z.ZodString;
6168
- adapterId: z.ZodString;
6169
- providerSessionId: z.ZodString;
6170
- claimId: z.ZodString;
6171
- adapterName: z.ZodString;
6172
- sessionId: z.ZodString;
6173
- agentId: z.ZodString;
6174
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6175
- claimToken: z.ZodString;
6176
- fence: z.ZodNumber;
6177
- status: z.ZodEnum<{
6178
- abandoned: "abandoned";
6179
- held: "held";
6180
- releasing: "releasing";
6181
- }>;
6182
- claimedAt: z.ZodNumber;
6183
- updatedAt: z.ZodNumber;
6184
- }, z.core.$strip>>;
6185
- }, z.core.$strip>, z.ZodObject<{
6186
- outcome: z.ZodLiteral<"already-claimed">;
6187
- holder: z.ZodObject<{
6188
- machineId: z.ZodString;
6189
- adapterId: z.ZodString;
6190
- providerSessionId: z.ZodString;
6191
- claimId: z.ZodString;
6192
- adapterName: z.ZodString;
6193
- sessionId: z.ZodString;
6194
- agentId: z.ZodString;
6195
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6196
- claimToken: z.ZodString;
6197
- fence: z.ZodNumber;
6198
- status: z.ZodEnum<{
6199
- abandoned: "abandoned";
6200
- held: "held";
6201
- releasing: "releasing";
6202
- }>;
6203
- claimedAt: z.ZodNumber;
6204
- updatedAt: z.ZodNumber;
6205
- }, z.core.$strip>;
6206
- }, z.core.$strip>, z.ZodObject<{
6207
- outcome: z.ZodLiteral<"superseded">;
6208
- currentFence: z.ZodNumber;
6209
- }, z.core.$strip>, z.ZodObject<{
6210
- outcome: z.ZodLiteral<"currency-changed">;
6211
- revision: z.ZodNumber;
6212
- currency: z.ZodObject<{
6213
- adapterSessionId: z.ZodNullable<z.ZodString>;
6214
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6215
- currentAdapterSessionIdState: z.ZodEnum<{
6216
- confirmed: "confirmed";
6217
- moved: "moved";
6218
- inherited: "inherited";
6219
- }>;
6220
- }, z.core.$strip>;
6221
- }, z.core.$strip>, z.ZodObject<{
6222
- outcome: z.ZodLiteral<"not-owner">;
6223
- }, z.core.$strip>, z.ZodObject<{
6224
- outcome: z.ZodLiteral<"agent-disposed">;
6225
- }, z.core.$strip>, z.ZodObject<{
6226
- outcome: z.ZodLiteral<"not-found">;
6227
- }, z.core.$strip>], "outcome">;
6228
- };
6229
- /**
6230
- * Give up a claim — freeing the ownership key only on a clean release.
6231
- *
6232
- * Subject: `storage:sessionOwnership.release`
6233
- * Type: Request (RPC)
6234
- */
6235
- release: {
6236
- request: z.ZodObject<{
6237
- agentId: z.ZodString;
6238
- claimToken: z.ZodString;
6239
- disposition: z.ZodEnum<{
6240
- released: "released";
6241
- abandoned: "abandoned";
6242
- releasing: "releasing";
6243
- }>;
6244
- }, z.core.$strip>;
6245
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6246
- outcome: z.ZodLiteral<"released">;
6247
- }, z.core.$strip>, z.ZodObject<{
6248
- outcome: z.ZodLiteral<"marked">;
6249
- claim: z.ZodObject<{
6250
- machineId: z.ZodString;
6251
- adapterId: z.ZodString;
6252
- providerSessionId: z.ZodString;
6253
- claimId: z.ZodString;
6254
- adapterName: z.ZodString;
6255
- sessionId: z.ZodString;
6256
- agentId: z.ZodString;
6257
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6258
- claimToken: z.ZodString;
6259
- fence: z.ZodNumber;
6260
- status: z.ZodEnum<{
6261
- abandoned: "abandoned";
6262
- held: "held";
6263
- releasing: "releasing";
6264
- }>;
6265
- claimedAt: z.ZodNumber;
6266
- updatedAt: z.ZodNumber;
6267
- }, z.core.$strip>;
6268
- }, z.core.$strip>, z.ZodObject<{
6269
- outcome: z.ZodLiteral<"not-owner">;
6270
- holder: z.ZodObject<{
6271
- machineId: z.ZodString;
6272
- adapterId: z.ZodString;
6273
- providerSessionId: z.ZodString;
6274
- claimId: z.ZodString;
6275
- adapterName: z.ZodString;
6276
- sessionId: z.ZodString;
6277
- agentId: z.ZodString;
6278
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6279
- claimToken: z.ZodString;
6280
- fence: z.ZodNumber;
6281
- status: z.ZodEnum<{
6282
- abandoned: "abandoned";
6283
- held: "held";
6284
- releasing: "releasing";
6285
- }>;
6286
- claimedAt: z.ZodNumber;
6287
- updatedAt: z.ZodNumber;
6288
- }, z.core.$strip>;
6289
- }, z.core.$strip>, z.ZodObject<{
6290
- outcome: z.ZodLiteral<"not-found">;
6291
- }, z.core.$strip>], "outcome">;
6292
- };
6293
- /**
6294
- * Give up every claim an agent holds, or exactly one of them, in a single
6295
- * statement — the teardown fan-out and the reservation rollback.
6296
- *
6297
- * Subject: `storage:sessionOwnership.releaseAgentClaims`
6298
- * Type: Request (RPC)
6299
- */
6300
- releaseAgentClaims: {
6301
- request: z.ZodObject<{
6302
- agentId: z.ZodString;
6303
- claimToken: z.ZodOptional<z.ZodString>;
6304
- disposition: z.ZodEnum<{
6305
- released: "released";
6306
- abandoned: "abandoned";
6307
- releasing: "releasing";
6308
- }>;
6309
- }, z.core.$strip>;
6310
- response: z.ZodObject<{
6311
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
6312
- markedClaims: z.ZodArray<z.ZodObject<{
6313
- machineId: z.ZodString;
6314
- adapterId: z.ZodString;
6315
- providerSessionId: z.ZodString;
6316
- claimId: z.ZodString;
6317
- adapterName: z.ZodString;
6318
- sessionId: z.ZodString;
6319
- agentId: z.ZodString;
6320
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6321
- claimToken: z.ZodString;
6322
- fence: z.ZodNumber;
6323
- status: z.ZodEnum<{
6324
- abandoned: "abandoned";
6325
- held: "held";
6326
- releasing: "releasing";
6327
- }>;
6328
- claimedAt: z.ZodNumber;
6329
- updatedAt: z.ZodNumber;
6330
- }, z.core.$strip>>;
6331
- claimTokenNotFound: z.ZodBoolean;
6332
- }, z.core.$strip>;
6333
- };
6334
- /**
6335
- * List the claims recorded for a machine — the read reconciliation and
6336
- * ownership diagnostics run on.
6337
- *
6338
- * Subject: `storage:sessionOwnership.listClaims`
6339
- * Type: Request (RPC)
6340
- */
6341
- listClaims: {
6342
- request: z.ZodObject<{
6343
- machineId: z.ZodString;
6344
- adapterId: z.ZodOptional<z.ZodString>;
6345
- providerSessionId: z.ZodOptional<z.ZodString>;
6346
- statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
6347
- abandoned: "abandoned";
6348
- held: "held";
6349
- releasing: "releasing";
6350
- }>>>;
6351
- }, z.core.$strip>;
6352
- response: z.ZodObject<{
6353
- claims: z.ZodArray<z.ZodObject<{
6354
- machineId: z.ZodString;
6355
- adapterId: z.ZodString;
6356
- providerSessionId: z.ZodString;
6357
- claimId: z.ZodString;
6358
- adapterName: z.ZodString;
6359
- sessionId: z.ZodString;
6360
- agentId: z.ZodString;
6361
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6362
- claimToken: z.ZodString;
6363
- fence: z.ZodNumber;
6364
- status: z.ZodEnum<{
6365
- abandoned: "abandoned";
6366
- held: "held";
6367
- releasing: "releasing";
6368
- }>;
6369
- claimedAt: z.ZodNumber;
6370
- updatedAt: z.ZodNumber;
6371
- }, z.core.$strip>>;
6372
- }, z.core.$strip>;
6373
- };
6374
- /**
6375
- * Stamp every row for a runtime process as retired without releasing its
6376
- * claims. Repeating the operation is idempotent.
6377
- *
6378
- * Subject: `storage:sessionOwnership.retireInstance`
6379
- * Type: Request (RPC)
6380
- */
6381
- retireInstance: {
6382
- request: z.ZodObject<{
6383
- instanceId: z.ZodString;
6384
- }, z.core.$strip>;
6385
- response: z.ZodObject<{
6386
- retiredMachines: z.ZodNumber;
6387
- }, z.core.$strip>;
6388
- };
6389
- /**
6390
- * Read one runtime-instance row for diagnostics only.
6391
- *
6392
- * Subject: `storage:sessionOwnership.getRuntimeInstance`
6393
- * Type: Request (RPC)
6394
- */
6395
- getRuntimeInstance: {
6396
- request: z.ZodObject<{
6397
- instanceId: z.ZodString;
6398
- machineId: z.ZodString;
6399
- }, z.core.$strip>;
6400
- response: z.ZodObject<{
6401
- instance: z.ZodNullable<z.ZodObject<{
6402
- instanceId: z.ZodString;
6403
- machineId: z.ZodString;
6404
- incarnation: z.ZodNumber;
6405
- startedAt: z.ZodNumber;
6406
- retiredAt: z.ZodNullable<z.ZodNumber>;
6407
- }, z.core.$strip>>;
6408
- }, z.core.$strip>;
6409
- };
6410
- }, Record<string, never>>;
6411
- /**
6412
- * Typed subjects for session ownership storage operations.
6413
- */
6414
- declare const SessionOwnershipStorageSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"storage:sessionOwnership", {
6415
- /**
6416
- * Read one agent's durable ownership state.
6417
- *
6418
- * **Not a consistent snapshot**, in either direction: the agent row and its
6419
- * claims are read as two statements, so a concurrent claim or release can
6420
- * show up in one and not the other. A reader may therefore observe a claim
6421
- * whose fence the agent's `currencyFence` does not yet account for, or a
6422
- * `currencyFence` whose authoring claim has already been released. Both are
6423
- * legitimate instants of the aggregate; a reader that needs authority must
6424
- * ask for it (`settleCurrency`) rather than infer it from this read.
6425
- *
6426
- * Subject: `storage:sessionOwnership.read`
6427
- * Type: Request (RPC)
6428
- */
6429
- read: {
6430
- request: z.ZodObject<{
6431
- agentId: z.ZodString;
6432
- }, z.core.$strip>;
6433
- response: z.ZodObject<{
6434
- ownership: z.ZodNullable<z.ZodObject<{
6435
- agentId: z.ZodString;
6436
- sessionId: z.ZodString;
6437
- currency: z.ZodObject<{
6438
- adapterSessionId: z.ZodNullable<z.ZodString>;
6439
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6440
- currentAdapterSessionIdState: z.ZodEnum<{
6441
- confirmed: "confirmed";
6442
- moved: "moved";
6443
- inherited: "inherited";
6444
- }>;
6445
- }, z.core.$strip>;
6446
- revision: z.ZodNumber;
6447
- currencyFence: z.ZodNumber;
6448
- claims: z.ZodArray<z.ZodObject<{
6449
- machineId: z.ZodString;
6450
- adapterId: z.ZodString;
6451
- providerSessionId: z.ZodString;
6452
- claimId: z.ZodString;
6453
- adapterName: z.ZodString;
6454
- sessionId: z.ZodString;
6455
- agentId: z.ZodString;
6456
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6457
- claimToken: z.ZodString;
6458
- fence: z.ZodNumber;
6459
- status: z.ZodEnum<{
6460
- abandoned: "abandoned";
6461
- held: "held";
6462
- releasing: "releasing";
6463
- }>;
6464
- claimedAt: z.ZodNumber;
6465
- updatedAt: z.ZodNumber;
6466
- }, z.core.$strip>>;
6467
- }, z.core.$strip>>;
6468
- }, z.core.$strip>;
6469
- };
6470
- /**
6471
- * Take or take over the ownership claim on a provider session, optionally
6472
- * designating the claiming agent as the session's lead in the same
6473
- * transaction.
6474
- *
6475
- * With `providerSessionId: null` it is the **keyless reservation**: no claim
6476
- * row at all, and the designation plus its currency mirror are the whole
6477
- * effect. That is the fresh-start shape — there is no provider identity to
6478
- * own yet, and the designation still has to be atomic and compare-and-swap.
6479
- *
6480
- * Subject: `storage:sessionOwnership.claim`
6481
- * Type: Request (RPC)
6482
- */
6483
- claim: {
6484
- request: z.ZodObject<{
6485
- machineId: z.ZodString;
6486
- adapterId: z.ZodString;
6487
- providerSessionId: z.ZodNullable<z.ZodString>;
6488
- adapterName: z.ZodString;
6489
- ownerInstance: z.ZodOptional<z.ZodObject<{
6490
- instanceId: z.ZodString;
6491
- }, z.core.$strip>>;
6492
- topology: z.ZodDefault<z.ZodEnum<{
6493
- "machine-exclusive": "machine-exclusive";
6494
- "shared-machine": "shared-machine";
6495
- }>>;
6496
- recoveryGuard: z.ZodOptional<z.ZodObject<{
6497
- expectedStatus: z.ZodEnum<{
6498
- idle: "idle";
6499
- active: "active";
6500
- starting: "starting";
6501
- dead: "dead";
6502
- disposed: "disposed";
6503
- }>;
6504
- expectedPreimage: z.ZodObject<{
6505
- status: z.ZodEnum<{
6506
- idle: "idle";
6507
- active: "active";
6508
- starting: "starting";
6509
- dead: "dead";
6510
- disposed: "disposed";
6511
- }>;
6512
- adapterId: z.ZodString;
6513
- binding: z.ZodOptional<z.ZodObject<{
6514
- adapterId: z.ZodString;
6515
- ownerMachineId: z.ZodString;
6516
- ownerInstanceId: z.ZodString;
6517
- }, z.core.$strip>>;
6518
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
6519
- }, z.core.$strip>;
6520
- expectedRevision: z.ZodNumber;
6521
- expectedCurrencyFence: z.ZodNumber;
6522
- expectedCurrency: z.ZodObject<{
6523
- adapterSessionId: z.ZodNullable<z.ZodString>;
6524
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6525
- currentAdapterSessionIdState: z.ZodEnum<{
6526
- confirmed: "confirmed";
6527
- moved: "moved";
6528
- inherited: "inherited";
6529
- }>;
6530
- }, z.core.$strip>;
6531
- ownerGeneration: z.ZodNullable<z.ZodObject<{
6532
- claimId: z.ZodString;
6533
- claimToken: z.ZodString;
6534
- fence: z.ZodNumber;
6535
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6536
- status: z.ZodEnum<{
6537
- abandoned: "abandoned";
6538
- held: "held";
6539
- releasing: "releasing";
6540
- }>;
6541
- }, z.core.$strip>>;
6542
- }, z.core.$strip>>;
6543
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
6544
- sessionId: z.ZodString;
6545
- agentId: z.ZodString;
6546
- claimToken: z.ZodString;
6547
- supersedes: z.ZodOptional<z.ZodObject<{
6548
- claimToken: z.ZodString;
6549
- }, z.core.$strip>>;
6550
- designateLead: z.ZodOptional<z.ZodObject<{
6551
- expectedLeadAgentId: z.ZodNullable<z.ZodString>;
6552
- clear: z.ZodOptional<z.ZodLiteral<true>>;
6553
- restore: z.ZodOptional<z.ZodLiteral<true>>;
6554
- }, z.core.$strip>>;
6555
- }, z.core.$strip>;
6556
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6557
- outcome: z.ZodLiteral<"claimed">;
6558
- claim: z.ZodNullable<z.ZodObject<{
6559
- machineId: z.ZodString;
6560
- adapterId: z.ZodString;
6561
- providerSessionId: z.ZodString;
6562
- claimId: z.ZodString;
6563
- adapterName: z.ZodString;
6564
- sessionId: z.ZodString;
6565
- agentId: z.ZodString;
6566
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6567
- claimToken: z.ZodString;
6568
- fence: z.ZodNumber;
6569
- status: z.ZodEnum<{
6570
- abandoned: "abandoned";
6571
- held: "held";
6572
- releasing: "releasing";
6573
- }>;
6574
- claimedAt: z.ZodNumber;
6575
- updatedAt: z.ZodNumber;
6576
- }, z.core.$strip>>;
6577
- recovery: z.ZodOptional<z.ZodObject<{
6578
- attemptId: z.ZodString;
6579
- preimage: z.ZodObject<{
6580
- status: z.ZodEnum<{
6581
- idle: "idle";
6582
- active: "active";
6583
- starting: "starting";
6584
- dead: "dead";
6585
- disposed: "disposed";
6586
- }>;
6587
- adapterId: z.ZodString;
6588
- binding: z.ZodOptional<z.ZodObject<{
6589
- adapterId: z.ZodString;
6590
- ownerMachineId: z.ZodString;
6591
- ownerInstanceId: z.ZodString;
6592
- }, z.core.$strip>>;
6593
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
6594
- }, z.core.$strip>;
6595
- }, z.core.$strip>>;
6596
- leadDesignated: z.ZodBoolean;
6597
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
6598
- }, z.core.$strip>, z.ZodObject<{
6599
- outcome: z.ZodLiteral<"idempotent">;
6600
- claim: z.ZodNullable<z.ZodObject<{
6601
- machineId: z.ZodString;
6602
- adapterId: z.ZodString;
6603
- providerSessionId: z.ZodString;
6604
- claimId: z.ZodString;
6605
- adapterName: z.ZodString;
6606
- sessionId: z.ZodString;
6607
- agentId: z.ZodString;
6608
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6609
- claimToken: z.ZodString;
6610
- fence: z.ZodNumber;
6611
- status: z.ZodEnum<{
6612
- abandoned: "abandoned";
6613
- held: "held";
6614
- releasing: "releasing";
6615
- }>;
6616
- claimedAt: z.ZodNumber;
6617
- updatedAt: z.ZodNumber;
6618
- }, z.core.$strip>>;
6619
- recovery: z.ZodOptional<z.ZodObject<{
6620
- attemptId: z.ZodString;
6621
- preimage: z.ZodObject<{
6622
- status: z.ZodEnum<{
6623
- idle: "idle";
6624
- active: "active";
6625
- starting: "starting";
6626
- dead: "dead";
6627
- disposed: "disposed";
6628
- }>;
6629
- adapterId: z.ZodString;
6630
- binding: z.ZodOptional<z.ZodObject<{
6631
- adapterId: z.ZodString;
6632
- ownerMachineId: z.ZodString;
6633
- ownerInstanceId: z.ZodString;
6634
- }, z.core.$strip>>;
6635
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
6636
- }, z.core.$strip>;
6637
- }, z.core.$strip>>;
6638
- leadDesignated: z.ZodBoolean;
6639
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
6640
- }, z.core.$strip>, z.ZodObject<{
6641
- outcome: z.ZodLiteral<"already-claimed">;
6642
- holder: z.ZodObject<{
6643
- machineId: z.ZodString;
6644
- adapterId: z.ZodString;
6645
- providerSessionId: z.ZodString;
6646
- claimId: z.ZodString;
6647
- adapterName: z.ZodString;
6648
- sessionId: z.ZodString;
6649
- agentId: z.ZodString;
6650
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6651
- claimToken: z.ZodString;
6652
- fence: z.ZodNumber;
6653
- status: z.ZodEnum<{
6654
- abandoned: "abandoned";
6655
- held: "held";
6656
- releasing: "releasing";
6657
- }>;
6658
- claimedAt: z.ZodNumber;
6659
- updatedAt: z.ZodNumber;
6660
- }, z.core.$strip>;
6661
- }, z.core.$strip>, z.ZodObject<{
6662
- outcome: z.ZodLiteral<"agent-disposed">;
6663
- }, z.core.$strip>, z.ZodObject<{
6664
- outcome: z.ZodLiteral<"session-not-active">;
6665
- status: z.ZodEnum<{
6666
- closed: "closed";
6667
- discovered: "discovered";
6668
- archived: "archived";
6669
- }>;
6670
- }, z.core.$strip>, z.ZodObject<{
6671
- outcome: z.ZodLiteral<"lead-conflict">;
6672
- currentLeadAgentId: z.ZodNullable<z.ZodString>;
6673
- }, z.core.$strip>, z.ZodObject<{
6674
- outcome: z.ZodLiteral<"not-found">;
6675
- missing: z.ZodEnum<{
6676
- agent: "agent";
6677
- session: "session";
6678
- }>;
6679
- }, z.core.$strip>, z.ZodObject<{
6680
- outcome: z.ZodLiteral<"currency-changed">;
6681
- revision: z.ZodNumber;
6682
- currencyFence: z.ZodNumber;
6683
- currency: z.ZodObject<{
6684
- adapterSessionId: z.ZodNullable<z.ZodString>;
6685
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6686
- currentAdapterSessionIdState: z.ZodEnum<{
6687
- confirmed: "confirmed";
6688
- moved: "moved";
6689
- inherited: "inherited";
6690
- }>;
6691
- }, z.core.$strip>;
6692
- }, z.core.$strip>, z.ZodObject<{
6693
- outcome: z.ZodLiteral<"recovery-conflict">;
6694
- status: z.ZodEnum<{
6695
- idle: "idle";
6696
- active: "active";
6697
- starting: "starting";
6698
- dead: "dead";
6699
- disposed: "disposed";
6700
- }>;
6701
- ownerGeneration: z.ZodNullable<z.ZodObject<{
6702
- claimId: z.ZodString;
6703
- claimToken: z.ZodString;
6704
- fence: z.ZodNumber;
6705
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6706
- status: z.ZodEnum<{
6707
- abandoned: "abandoned";
6708
- held: "held";
6709
- releasing: "releasing";
6710
- }>;
6711
- }, z.core.$strip>>;
6712
- }, z.core.$strip>], "outcome">;
6713
- }; /** Terminalize a recovery attempt under its opaque attempt fence. */
6714
- finalizeRecovery: {
6715
- request: z.ZodObject<{
6716
- agentId: z.ZodString;
6717
- attemptId: z.ZodString;
6718
- binding: z.ZodObject<{
6719
- adapterId: z.ZodString;
6720
- ownerMachineId: z.ZodString;
6721
- ownerInstanceId: z.ZodString;
6722
- }, z.core.$strip>;
6723
- action: z.ZodDiscriminatedUnion<[z.ZodObject<{
6724
- kind: z.ZodLiteral<"rollback">;
6725
- preimage: z.ZodObject<{
6726
- status: z.ZodEnum<{
6727
- idle: "idle";
6728
- active: "active";
6729
- starting: "starting";
6730
- dead: "dead";
6731
- disposed: "disposed";
6732
- }>;
6733
- adapterId: z.ZodString;
6734
- binding: z.ZodOptional<z.ZodObject<{
6735
- adapterId: z.ZodString;
6736
- ownerMachineId: z.ZodString;
6737
- ownerInstanceId: z.ZodString;
6738
- }, z.core.$strip>>;
6739
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
6740
- }, z.core.$strip>;
6741
- }, z.core.$strip>, z.ZodObject<{
6742
- kind: z.ZodLiteral<"succeeded">;
6743
- }, z.core.$strip>, z.ZodObject<{
6744
- kind: z.ZodLiteral<"failed">;
6745
- }, z.core.$strip>], "kind">;
6746
- }, z.core.$strip>;
6747
- response: z.ZodObject<{
6748
- applied: z.ZodBoolean;
6749
- }, z.core.$strip>;
6750
- };
6751
- /**
6752
- * Write an agent's adapter-session currency under a claim generation, and
6753
- * mirror it onto the session row when the agent is the designated lead.
6754
- *
6755
- * What is settled here is what a restart resumes: the resume-identity path
6756
- * resolves an agent's currency from this row whenever it has been settled,
6757
- * and falls back to the session row only for rows written before the agent
6758
- * row could carry currency at all.
6759
- *
6760
- * Subject: `storage:sessionOwnership.settleCurrency`
6761
- * Type: Request (RPC)
6762
- */
6763
- settleCurrency: {
6764
- request: z.ZodObject<{
6765
- agentId: z.ZodString;
6766
- claimToken: z.ZodString;
6767
- fence: z.ZodNumber;
6768
- expectedRevision: z.ZodNumber;
6769
- target: z.ZodObject<{
6770
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6771
- currentAdapterSessionIdState: z.ZodEnum<{
6772
- confirmed: "confirmed";
6773
- moved: "moved";
6774
- inherited: "inherited";
6775
- }>;
6776
- }, z.core.$strip>;
6777
- }, z.core.$strip>;
6778
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6779
- outcome: z.ZodLiteral<"settled">;
6780
- revision: z.ZodNumber;
6781
- currency: z.ZodObject<{
6782
- adapterSessionId: z.ZodNullable<z.ZodString>;
6783
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6784
- currentAdapterSessionIdState: z.ZodEnum<{
6785
- confirmed: "confirmed";
6786
- moved: "moved";
6787
- inherited: "inherited";
6788
- }>;
6789
- }, z.core.$strip>;
6790
- sessionSnapshotUpdated: z.ZodBoolean;
6791
- }, z.core.$strip>, z.ZodObject<{
6792
- outcome: z.ZodLiteral<"idempotent">;
6793
- revision: z.ZodNumber;
6794
- currency: z.ZodObject<{
6795
- adapterSessionId: z.ZodNullable<z.ZodString>;
6796
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6797
- currentAdapterSessionIdState: z.ZodEnum<{
6798
- confirmed: "confirmed";
6799
- moved: "moved";
6800
- inherited: "inherited";
6801
- }>;
6802
- }, z.core.$strip>;
6803
- sessionSnapshotUpdated: z.ZodLiteral<false>;
6804
- }, z.core.$strip>, z.ZodObject<{
6805
- outcome: z.ZodLiteral<"superseded">;
6806
- currentFence: z.ZodNumber;
6807
- }, z.core.$strip>, z.ZodObject<{
6808
- outcome: z.ZodLiteral<"currency-changed">;
6809
- revision: z.ZodNumber;
6810
- currency: z.ZodObject<{
6811
- adapterSessionId: z.ZodNullable<z.ZodString>;
6812
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6813
- currentAdapterSessionIdState: z.ZodEnum<{
6814
- confirmed: "confirmed";
6815
- moved: "moved";
6816
- inherited: "inherited";
6817
- }>;
6818
- }, z.core.$strip>;
6819
- }, z.core.$strip>, z.ZodObject<{
6820
- outcome: z.ZodLiteral<"not-owner">;
6821
- }, z.core.$strip>, z.ZodObject<{
6822
- outcome: z.ZodLiteral<"agent-disposed">;
6823
- }, z.core.$strip>, z.ZodObject<{
6824
- outcome: z.ZodLiteral<"not-found">;
6825
- }, z.core.$strip>], "outcome">;
6826
- };
6827
- /**
6828
- * Record a provider-session movement in full: acquire or recognize the
6829
- * successor generation, settle the agent's currency under it, retire the
6830
- * predecessors it replaces, and mirror the result onto the session row —
6831
- * all in one transaction.
6832
- *
6833
- * The composite `settleCurrency` exists inside. Callers use this one;
6834
- * `settleCurrency` remains the single-step primitive the claim/settle
6835
- * interleavings are exercised through.
6836
- *
6837
- * Subject: `storage:sessionOwnership.settleMovement`
6838
- * Type: Request (RPC)
6839
- */
6840
- settleMovement: {
6841
- request: z.ZodObject<{
6842
- machineId: z.ZodString;
6843
- adapterId: z.ZodString;
6844
- adapterName: z.ZodString;
6845
- ownerInstance: z.ZodOptional<z.ZodObject<{
6846
- instanceId: z.ZodString;
6847
- }, z.core.$strip>>;
6848
- topology: z.ZodDefault<z.ZodEnum<{
6849
- "machine-exclusive": "machine-exclusive";
6850
- "shared-machine": "shared-machine";
6851
- }>>;
6852
- sessionId: z.ZodString;
6853
- agentId: z.ZodString;
6854
- expectedRevision: z.ZodNumber;
6855
- movement: z.ZodDiscriminatedUnion<[z.ZodObject<{
6856
- kind: z.ZodLiteral<"confirmed">;
6857
- providerSessionId: z.ZodString;
6858
- claimToken: z.ZodString;
6859
- }, z.core.$strip>, z.ZodObject<{
6860
- kind: z.ZodLiteral<"demote">;
6861
- claimToken: z.ZodString;
6862
- }, z.core.$strip>], "kind">;
6863
- }, z.core.$strip>;
6864
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6865
- outcome: z.ZodLiteral<"settled">;
6866
- revision: z.ZodNumber;
6867
- currency: z.ZodObject<{
6868
- adapterSessionId: z.ZodNullable<z.ZodString>;
6869
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6870
- currentAdapterSessionIdState: z.ZodEnum<{
6871
- confirmed: "confirmed";
6872
- moved: "moved";
6873
- inherited: "inherited";
6874
- }>;
6875
- }, z.core.$strip>;
6876
- sessionSnapshotUpdated: z.ZodBoolean;
6877
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
6878
- claim: z.ZodObject<{
6879
- machineId: z.ZodString;
6880
- adapterId: z.ZodString;
6881
- providerSessionId: z.ZodString;
6882
- claimId: z.ZodString;
6883
- adapterName: z.ZodString;
6884
- sessionId: z.ZodString;
6885
- agentId: z.ZodString;
6886
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6887
- claimToken: z.ZodString;
6888
- fence: z.ZodNumber;
6889
- status: z.ZodEnum<{
6890
- abandoned: "abandoned";
6891
- held: "held";
6892
- releasing: "releasing";
6893
- }>;
6894
- claimedAt: z.ZodNumber;
6895
- updatedAt: z.ZodNumber;
6896
- }, z.core.$strip>;
6897
- }, z.core.$strip>, z.ZodObject<{
6898
- outcome: z.ZodLiteral<"idempotent">;
6899
- revision: z.ZodNumber;
6900
- currency: z.ZodObject<{
6901
- adapterSessionId: z.ZodNullable<z.ZodString>;
6902
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6903
- currentAdapterSessionIdState: z.ZodEnum<{
6904
- confirmed: "confirmed";
6905
- moved: "moved";
6906
- inherited: "inherited";
6907
- }>;
6908
- }, z.core.$strip>;
6909
- sessionSnapshotUpdated: z.ZodLiteral<false>;
6910
- claim: z.ZodNullable<z.ZodObject<{
6911
- machineId: z.ZodString;
6912
- adapterId: z.ZodString;
6913
- providerSessionId: z.ZodString;
6914
- claimId: z.ZodString;
6915
- adapterName: z.ZodString;
6916
- sessionId: z.ZodString;
6917
- agentId: z.ZodString;
6918
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6919
- claimToken: z.ZodString;
6920
- fence: z.ZodNumber;
6921
- status: z.ZodEnum<{
6922
- abandoned: "abandoned";
6923
- held: "held";
6924
- releasing: "releasing";
6925
- }>;
6926
- claimedAt: z.ZodNumber;
6927
- updatedAt: z.ZodNumber;
6928
- }, z.core.$strip>>;
6929
- }, z.core.$strip>, z.ZodObject<{
6930
- outcome: z.ZodLiteral<"already-claimed">;
6931
- holder: z.ZodObject<{
6932
- machineId: z.ZodString;
6933
- adapterId: z.ZodString;
6934
- providerSessionId: z.ZodString;
6935
- claimId: z.ZodString;
6936
- adapterName: z.ZodString;
6937
- sessionId: z.ZodString;
6938
- agentId: z.ZodString;
6939
- ownerInstanceId: z.ZodNullable<z.ZodString>;
6940
- claimToken: z.ZodString;
6941
- fence: z.ZodNumber;
6942
- status: z.ZodEnum<{
6943
- abandoned: "abandoned";
6944
- held: "held";
6945
- releasing: "releasing";
6946
- }>;
6947
- claimedAt: z.ZodNumber;
6948
- updatedAt: z.ZodNumber;
6949
- }, z.core.$strip>;
6950
- }, z.core.$strip>, z.ZodObject<{
6951
- outcome: z.ZodLiteral<"superseded">;
6952
- currentFence: z.ZodNumber;
6953
- }, z.core.$strip>, z.ZodObject<{
6954
- outcome: z.ZodLiteral<"currency-changed">;
6955
- revision: z.ZodNumber;
6956
- currency: z.ZodObject<{
6957
- adapterSessionId: z.ZodNullable<z.ZodString>;
6958
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
6959
- currentAdapterSessionIdState: z.ZodEnum<{
6960
- confirmed: "confirmed";
6961
- moved: "moved";
6962
- inherited: "inherited";
6963
- }>;
6964
- }, z.core.$strip>;
6965
- }, z.core.$strip>, z.ZodObject<{
6966
- outcome: z.ZodLiteral<"not-owner">;
6967
- }, z.core.$strip>, z.ZodObject<{
6968
- outcome: z.ZodLiteral<"agent-disposed">;
6969
- }, z.core.$strip>, z.ZodObject<{
6970
- outcome: z.ZodLiteral<"not-found">;
6971
- }, z.core.$strip>], "outcome">;
6972
- };
6973
- /**
6974
- * Give up a claim — freeing the ownership key only on a clean release.
6975
- *
6976
- * Subject: `storage:sessionOwnership.release`
6977
- * Type: Request (RPC)
6978
- */
6979
- release: {
6980
- request: z.ZodObject<{
6981
- agentId: z.ZodString;
6982
- claimToken: z.ZodString;
6983
- disposition: z.ZodEnum<{
6984
- released: "released";
6985
- abandoned: "abandoned";
6986
- releasing: "releasing";
6987
- }>;
6988
- }, z.core.$strip>;
6989
- response: z.ZodDiscriminatedUnion<[z.ZodObject<{
6990
- outcome: z.ZodLiteral<"released">;
6991
- }, z.core.$strip>, z.ZodObject<{
6992
- outcome: z.ZodLiteral<"marked">;
6993
- claim: z.ZodObject<{
6994
- machineId: z.ZodString;
6995
- adapterId: z.ZodString;
6996
- providerSessionId: z.ZodString;
6997
- claimId: z.ZodString;
6998
- adapterName: z.ZodString;
6999
- sessionId: z.ZodString;
7000
- agentId: z.ZodString;
7001
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7002
- claimToken: z.ZodString;
7003
- fence: z.ZodNumber;
7004
- status: z.ZodEnum<{
7005
- abandoned: "abandoned";
7006
- held: "held";
7007
- releasing: "releasing";
7008
- }>;
7009
- claimedAt: z.ZodNumber;
7010
- updatedAt: z.ZodNumber;
7011
- }, z.core.$strip>;
7012
- }, z.core.$strip>, z.ZodObject<{
7013
- outcome: z.ZodLiteral<"not-owner">;
7014
- holder: z.ZodObject<{
7015
- machineId: z.ZodString;
7016
- adapterId: z.ZodString;
7017
- providerSessionId: z.ZodString;
7018
- claimId: z.ZodString;
7019
- adapterName: z.ZodString;
7020
- sessionId: z.ZodString;
7021
- agentId: z.ZodString;
7022
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7023
- claimToken: z.ZodString;
7024
- fence: z.ZodNumber;
7025
- status: z.ZodEnum<{
7026
- abandoned: "abandoned";
7027
- held: "held";
7028
- releasing: "releasing";
7029
- }>;
7030
- claimedAt: z.ZodNumber;
7031
- updatedAt: z.ZodNumber;
7032
- }, z.core.$strip>;
7033
- }, z.core.$strip>, z.ZodObject<{
7034
- outcome: z.ZodLiteral<"not-found">;
7035
- }, z.core.$strip>], "outcome">;
7036
- };
7037
- /**
7038
- * Give up every claim an agent holds, or exactly one of them, in a single
7039
- * statement — the teardown fan-out and the reservation rollback.
7040
- *
7041
- * Subject: `storage:sessionOwnership.releaseAgentClaims`
7042
- * Type: Request (RPC)
7043
- */
7044
- releaseAgentClaims: {
7045
- request: z.ZodObject<{
7046
- agentId: z.ZodString;
7047
- claimToken: z.ZodOptional<z.ZodString>;
7048
- disposition: z.ZodEnum<{
7049
- released: "released";
7050
- abandoned: "abandoned";
7051
- releasing: "releasing";
7052
- }>;
7053
- }, z.core.$strip>;
7054
- response: z.ZodObject<{
7055
- releasedProviderSessionIds: z.ZodArray<z.ZodString>;
7056
- markedClaims: z.ZodArray<z.ZodObject<{
7057
- machineId: z.ZodString;
7058
- adapterId: z.ZodString;
7059
- providerSessionId: z.ZodString;
7060
- claimId: z.ZodString;
7061
- adapterName: z.ZodString;
7062
- sessionId: z.ZodString;
7063
- agentId: z.ZodString;
7064
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7065
- claimToken: z.ZodString;
7066
- fence: z.ZodNumber;
7067
- status: z.ZodEnum<{
7068
- abandoned: "abandoned";
7069
- held: "held";
7070
- releasing: "releasing";
7071
- }>;
7072
- claimedAt: z.ZodNumber;
7073
- updatedAt: z.ZodNumber;
7074
- }, z.core.$strip>>;
7075
- claimTokenNotFound: z.ZodBoolean;
7076
- }, z.core.$strip>;
7077
- };
7078
- /**
7079
- * List the claims recorded for a machine — the read reconciliation and
7080
- * ownership diagnostics run on.
7081
- *
7082
- * Subject: `storage:sessionOwnership.listClaims`
7083
- * Type: Request (RPC)
7084
- */
7085
- listClaims: {
7086
- request: z.ZodObject<{
7087
- machineId: z.ZodString;
7088
- adapterId: z.ZodOptional<z.ZodString>;
7089
- providerSessionId: z.ZodOptional<z.ZodString>;
7090
- statuses: z.ZodOptional<z.ZodArray<z.ZodEnum<{
7091
- abandoned: "abandoned";
7092
- held: "held";
7093
- releasing: "releasing";
7094
- }>>>;
7095
- }, z.core.$strip>;
7096
- response: z.ZodObject<{
7097
- claims: z.ZodArray<z.ZodObject<{
7098
- machineId: z.ZodString;
7099
- adapterId: z.ZodString;
7100
- providerSessionId: z.ZodString;
7101
- claimId: z.ZodString;
7102
- adapterName: z.ZodString;
7103
- sessionId: z.ZodString;
7104
- agentId: z.ZodString;
7105
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7106
- claimToken: z.ZodString;
7107
- fence: z.ZodNumber;
7108
- status: z.ZodEnum<{
7109
- abandoned: "abandoned";
7110
- held: "held";
7111
- releasing: "releasing";
7112
- }>;
7113
- claimedAt: z.ZodNumber;
7114
- updatedAt: z.ZodNumber;
7115
- }, z.core.$strip>>;
7116
- }, z.core.$strip>;
7117
- };
7118
- /**
7119
- * Stamp every row for a runtime process as retired without releasing its
7120
- * claims. Repeating the operation is idempotent.
7121
- *
7122
- * Subject: `storage:sessionOwnership.retireInstance`
7123
- * Type: Request (RPC)
7124
- */
7125
- retireInstance: {
7126
- request: z.ZodObject<{
7127
- instanceId: z.ZodString;
7128
- }, z.core.$strip>;
7129
- response: z.ZodObject<{
7130
- retiredMachines: z.ZodNumber;
7131
- }, z.core.$strip>;
7132
- };
7133
- /**
7134
- * Read one runtime-instance row for diagnostics only.
7135
- *
7136
- * Subject: `storage:sessionOwnership.getRuntimeInstance`
7137
- * Type: Request (RPC)
7138
- */
7139
- getRuntimeInstance: {
7140
- request: z.ZodObject<{
7141
- instanceId: z.ZodString;
7142
- machineId: z.ZodString;
7143
- }, z.core.$strip>;
7144
- response: z.ZodObject<{
7145
- instance: z.ZodNullable<z.ZodObject<{
7146
- instanceId: z.ZodString;
7147
- machineId: z.ZodString;
7148
- incarnation: z.ZodNumber;
7149
- startedAt: z.ZodNumber;
7150
- retiredAt: z.ZodNullable<z.ZodNumber>;
7151
- }, z.core.$strip>>;
7152
- }, z.core.$strip>;
7153
- };
7154
- }>, "storage:sessionOwnership">;
4547
+ aside: "aside";
4548
+ }>>;
4549
+ createdAt: z.ZodNumber;
4550
+ originWindowId: z.ZodOptional<z.ZodString>;
4551
+ }, z.core.$strip>;
4552
+ declare const SessionUpdatedEventSchema: z.ZodObject<{
4553
+ sessionId: z.ZodString;
4554
+ changedProperties: z.ZodArray<z.ZodString>;
4555
+ }, z.core.$strip>;
4556
+ type SessionCreated = z.infer<typeof SessionCreatedEventSchema>;
4557
+ type SessionUpdatedEvent = z.infer<typeof SessionUpdatedEventSchema>;
7155
4558
  //#endregion
7156
4559
  //#region core/contracts/src/session/schemas/ownership.d.ts
4560
+ /**
4561
+ * How many runtime processes may own claims on one machine.
4562
+ *
4563
+ * Only `machine-exclusive` licenses "no adapter answers for this instance" as
4564
+ * evidence that an owner is gone: with peers on the same machine, an
4565
+ * unanswered probe means "not mine", never "nobody's". The default is
4566
+ * `shared-machine` everywhere, because neither the desktop runtime nor the
4567
+ * isolated workflow runtime can prove exclusivity while workflow workers and
4568
+ * relay peers may host adapters of their own.
4569
+ */
4570
+ declare const OwnershipTopologySchema: z.ZodEnum<{
4571
+ "machine-exclusive": "machine-exclusive";
4572
+ "shared-machine": "shared-machine";
4573
+ }>;
7157
4574
  /** {@inheritDoc OwnershipTopologySchema} */
7158
4575
  type OwnershipTopology$1 = z.infer<typeof OwnershipTopologySchema>;
7159
4576
  /**
@@ -7169,7 +4586,6 @@ declare const SessionOwnershipPrincipalSchema: z.ZodObject<{
7169
4586
  agentId: z.ZodString;
7170
4587
  adapterId: z.ZodString;
7171
4588
  adapterName: z.ZodString;
7172
- ownerInstanceId: z.ZodString;
7173
4589
  machineId: z.ZodOptional<z.ZodString>;
7174
4590
  }, z.core.$strip>;
7175
4591
  /** {@inheritDoc SessionOwnershipPrincipalSchema} */
@@ -7189,108 +4605,25 @@ declare const SessionOwnershipReserveStartServiceRequestSchema: z.ZodObject<{
7189
4605
  agentId: z.ZodString;
7190
4606
  adapterId: z.ZodString;
7191
4607
  adapterName: z.ZodString;
7192
- ownerInstanceId: z.ZodString;
7193
4608
  machineId: z.ZodOptional<z.ZodString>;
7194
4609
  role: z.ZodEnum<{
7195
4610
  lead: "lead";
7196
4611
  member: "member";
7197
4612
  }>;
7198
4613
  resumeProviderSessionId: z.ZodNullable<z.ZodString>;
7199
- claimToken: z.ZodString;
7200
- recoveryGuard: z.ZodOptional<z.ZodObject<{
7201
- expectedStatus: z.ZodEnum<{
7202
- idle: "idle";
7203
- active: "active";
7204
- starting: "starting";
7205
- dead: "dead";
7206
- disposed: "disposed";
7207
- }>;
7208
- expectedPreimage: z.ZodObject<{
7209
- status: z.ZodEnum<{
7210
- idle: "idle";
7211
- active: "active";
7212
- starting: "starting";
7213
- dead: "dead";
7214
- disposed: "disposed";
7215
- }>;
7216
- adapterId: z.ZodString;
7217
- binding: z.ZodOptional<z.ZodObject<{
7218
- adapterId: z.ZodString;
7219
- ownerMachineId: z.ZodString;
7220
- ownerInstanceId: z.ZodString;
7221
- }, z.core.$strip>>;
7222
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7223
- }, z.core.$strip>;
7224
- expectedRevision: z.ZodNumber;
7225
- expectedCurrencyFence: z.ZodNumber;
7226
- expectedCurrency: z.ZodObject<{
7227
- adapterSessionId: z.ZodNullable<z.ZodString>;
7228
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
7229
- currentAdapterSessionIdState: z.ZodEnum<{
7230
- confirmed: "confirmed";
7231
- moved: "moved";
7232
- inherited: "inherited";
7233
- }>;
7234
- }, z.core.$strip>;
7235
- ownerGeneration: z.ZodNullable<z.ZodObject<{
7236
- claimId: z.ZodString;
7237
- claimToken: z.ZodString;
7238
- fence: z.ZodNumber;
7239
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7240
- status: z.ZodEnum<{
7241
- abandoned: "abandoned";
7242
- held: "held";
7243
- releasing: "releasing";
7244
- }>;
7245
- }, z.core.$strip>>;
7246
- }, z.core.$strip>>;
7247
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7248
4614
  expectedLeadAgentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7249
4615
  }, z.core.$strip>;
7250
4616
  /** {@inheritDoc SessionOwnershipReserveStartServiceRequestSchema} */
7251
4617
  type SessionOwnershipReserveStartServiceRequest = z.infer<typeof SessionOwnershipReserveStartServiceRequestSchema>;
7252
- /**
7253
- * Validate and normalize a start reservation at the service trust boundary.
7254
- * @param value - Untrusted reservation request received by the authority.
7255
- * @returns The fully validated reservation request.
7256
- */
7257
- declare function normalizeSessionOwnershipReserveStartServiceRequest$1(value: unknown): SessionOwnershipReserveStartServiceRequest;
7258
4618
  /**
7259
4619
  * What a committed reservation gives the caller to act — and to roll back — on.
7260
- *
7261
- * A provider-session claim always carries the resolved machine identity that
7262
- * names its key. A designation-only reservation may not: its storage request
7263
- * uses an inert schema filler, which is not a runtime identity and must never
7264
- * be forwarded to a settlement or persisted as a runtime owner.
7265
4620
  */
7266
- declare const SessionOwnershipReservationSchema: z.ZodUnion<readonly [z.ZodObject<{
4621
+ declare const SessionOwnershipReservationSchema: z.ZodObject<{
7267
4622
  agentId: z.ZodString;
7268
4623
  sessionId: z.ZodString;
7269
- adapterId: z.ZodString;
7270
- ownerInstanceId: z.ZodString;
7271
- leadDesignated: z.ZodBoolean;
7272
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
7273
- recovery: z.ZodOptional<z.ZodObject<{
7274
- attemptId: z.ZodString;
7275
- preimage: z.ZodObject<{
7276
- status: z.ZodEnum<{
7277
- idle: "idle";
7278
- active: "active";
7279
- starting: "starting";
7280
- dead: "dead";
7281
- disposed: "disposed";
7282
- }>;
7283
- adapterId: z.ZodString;
7284
- binding: z.ZodOptional<z.ZodObject<{
7285
- adapterId: z.ZodString;
7286
- ownerMachineId: z.ZodString;
7287
- ownerInstanceId: z.ZodString;
7288
- }, z.core.$strip>>;
7289
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7290
- }, z.core.$strip>;
7291
- }, z.core.$strip>>;
7292
4624
  machineId: z.ZodString;
7293
- claim: z.ZodObject<{
4625
+ adapterId: z.ZodString;
4626
+ claim: z.ZodNullable<z.ZodObject<{
7294
4627
  machineId: z.ZodString;
7295
4628
  adapterId: z.ZodString;
7296
4629
  providerSessionId: z.ZodString;
@@ -7298,7 +4631,6 @@ declare const SessionOwnershipReservationSchema: z.ZodUnion<readonly [z.ZodObjec
7298
4631
  adapterName: z.ZodString;
7299
4632
  sessionId: z.ZodString;
7300
4633
  agentId: z.ZodString;
7301
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7302
4634
  claimToken: z.ZodString;
7303
4635
  fence: z.ZodNumber;
7304
4636
  status: z.ZodEnum<{
@@ -7308,36 +4640,10 @@ declare const SessionOwnershipReservationSchema: z.ZodUnion<readonly [z.ZodObjec
7308
4640
  }>;
7309
4641
  claimedAt: z.ZodNumber;
7310
4642
  updatedAt: z.ZodNumber;
7311
- }, z.core.$strip>;
7312
- }, z.core.$strip>, z.ZodObject<{
7313
- agentId: z.ZodString;
7314
- sessionId: z.ZodString;
7315
- adapterId: z.ZodString;
7316
- ownerInstanceId: z.ZodString;
4643
+ }, z.core.$strip>>;
7317
4644
  leadDesignated: z.ZodBoolean;
7318
4645
  previousLeadAgentId: z.ZodNullable<z.ZodString>;
7319
- recovery: z.ZodOptional<z.ZodObject<{
7320
- attemptId: z.ZodString;
7321
- preimage: z.ZodObject<{
7322
- status: z.ZodEnum<{
7323
- idle: "idle";
7324
- active: "active";
7325
- starting: "starting";
7326
- dead: "dead";
7327
- disposed: "disposed";
7328
- }>;
7329
- adapterId: z.ZodString;
7330
- binding: z.ZodOptional<z.ZodObject<{
7331
- adapterId: z.ZodString;
7332
- ownerMachineId: z.ZodString;
7333
- ownerInstanceId: z.ZodString;
7334
- }, z.core.$strip>>;
7335
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7336
- }, z.core.$strip>;
7337
- }, z.core.$strip>>;
7338
- machineId: z.ZodOptional<z.ZodString>;
7339
- claim: z.ZodNull;
7340
- }, z.core.$strip>]>;
4646
+ }, z.core.$strip>;
7341
4647
  /** {@inheritDoc SessionOwnershipReservationSchema} */
7342
4648
  type SessionOwnershipReservation = z.infer<typeof SessionOwnershipReservationSchema>;
7343
4649
  /**
@@ -7350,34 +4656,12 @@ type SessionOwnershipReservation = z.infer<typeof SessionOwnershipReservationSch
7350
4656
  */
7351
4657
  declare const SessionOwnershipReserveStartServiceResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7352
4658
  outcome: z.ZodLiteral<"reserved">;
7353
- reservation: z.ZodUnion<readonly [z.ZodObject<{
4659
+ reservation: z.ZodObject<{
7354
4660
  agentId: z.ZodString;
7355
4661
  sessionId: z.ZodString;
7356
- adapterId: z.ZodString;
7357
- ownerInstanceId: z.ZodString;
7358
- leadDesignated: z.ZodBoolean;
7359
- previousLeadAgentId: z.ZodNullable<z.ZodString>;
7360
- recovery: z.ZodOptional<z.ZodObject<{
7361
- attemptId: z.ZodString;
7362
- preimage: z.ZodObject<{
7363
- status: z.ZodEnum<{
7364
- idle: "idle";
7365
- active: "active";
7366
- starting: "starting";
7367
- dead: "dead";
7368
- disposed: "disposed";
7369
- }>;
7370
- adapterId: z.ZodString;
7371
- binding: z.ZodOptional<z.ZodObject<{
7372
- adapterId: z.ZodString;
7373
- ownerMachineId: z.ZodString;
7374
- ownerInstanceId: z.ZodString;
7375
- }, z.core.$strip>>;
7376
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7377
- }, z.core.$strip>;
7378
- }, z.core.$strip>>;
7379
4662
  machineId: z.ZodString;
7380
- claim: z.ZodObject<{
4663
+ adapterId: z.ZodString;
4664
+ claim: z.ZodNullable<z.ZodObject<{
7381
4665
  machineId: z.ZodString;
7382
4666
  adapterId: z.ZodString;
7383
4667
  providerSessionId: z.ZodString;
@@ -7385,7 +4669,6 @@ declare const SessionOwnershipReserveStartServiceResponseSchema: z.ZodDiscrimina
7385
4669
  adapterName: z.ZodString;
7386
4670
  sessionId: z.ZodString;
7387
4671
  agentId: z.ZodString;
7388
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7389
4672
  claimToken: z.ZodString;
7390
4673
  fence: z.ZodNumber;
7391
4674
  status: z.ZodEnum<{
@@ -7395,36 +4678,10 @@ declare const SessionOwnershipReserveStartServiceResponseSchema: z.ZodDiscrimina
7395
4678
  }>;
7396
4679
  claimedAt: z.ZodNumber;
7397
4680
  updatedAt: z.ZodNumber;
7398
- }, z.core.$strip>;
7399
- }, z.core.$strip>, z.ZodObject<{
7400
- agentId: z.ZodString;
7401
- sessionId: z.ZodString;
7402
- adapterId: z.ZodString;
7403
- ownerInstanceId: z.ZodString;
4681
+ }, z.core.$strip>>;
7404
4682
  leadDesignated: z.ZodBoolean;
7405
4683
  previousLeadAgentId: z.ZodNullable<z.ZodString>;
7406
- recovery: z.ZodOptional<z.ZodObject<{
7407
- attemptId: z.ZodString;
7408
- preimage: z.ZodObject<{
7409
- status: z.ZodEnum<{
7410
- idle: "idle";
7411
- active: "active";
7412
- starting: "starting";
7413
- dead: "dead";
7414
- disposed: "disposed";
7415
- }>;
7416
- adapterId: z.ZodString;
7417
- binding: z.ZodOptional<z.ZodObject<{
7418
- adapterId: z.ZodString;
7419
- ownerMachineId: z.ZodString;
7420
- ownerInstanceId: z.ZodString;
7421
- }, z.core.$strip>>;
7422
- recoveryAttemptId: z.ZodOptional<z.ZodString>;
7423
- }, z.core.$strip>;
7424
- }, z.core.$strip>>;
7425
- machineId: z.ZodOptional<z.ZodString>;
7426
- claim: z.ZodNull;
7427
- }, z.core.$strip>]>;
4684
+ }, z.core.$strip>;
7428
4685
  }, z.core.$strip>, z.ZodObject<{
7429
4686
  outcome: z.ZodLiteral<"occupied">;
7430
4687
  holder: z.ZodObject<{
@@ -7435,7 +4692,6 @@ declare const SessionOwnershipReserveStartServiceResponseSchema: z.ZodDiscrimina
7435
4692
  adapterName: z.ZodString;
7436
4693
  sessionId: z.ZodString;
7437
4694
  agentId: z.ZodString;
7438
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7439
4695
  claimToken: z.ZodString;
7440
4696
  fence: z.ZodNumber;
7441
4697
  status: z.ZodEnum<{
@@ -7451,54 +4707,14 @@ declare const SessionOwnershipReserveStartServiceResponseSchema: z.ZodDiscrimina
7451
4707
  currentLeadAgentId: z.ZodNullable<z.ZodString>;
7452
4708
  }, z.core.$strip>, z.ZodObject<{
7453
4709
  outcome: z.ZodLiteral<"agent-disposed">;
7454
- }, z.core.$strip>, z.ZodObject<{
7455
- outcome: z.ZodLiteral<"session-not-active">;
7456
- status: z.ZodEnum<{
7457
- closed: "closed";
7458
- discovered: "discovered";
7459
- archived: "archived";
7460
- }>;
7461
4710
  }, z.core.$strip>, z.ZodObject<{
7462
4711
  outcome: z.ZodLiteral<"not-found">;
7463
4712
  missing: z.ZodEnum<{
7464
- agent: "agent";
7465
4713
  session: "session";
4714
+ agent: "agent";
7466
4715
  }>;
7467
4716
  }, z.core.$strip>, z.ZodObject<{
7468
4717
  outcome: z.ZodLiteral<"machine-identity-unavailable">;
7469
- }, z.core.$strip>, z.ZodObject<{
7470
- outcome: z.ZodLiteral<"currency-changed">;
7471
- revision: z.ZodNumber;
7472
- currencyFence: z.ZodNumber;
7473
- currency: z.ZodObject<{
7474
- adapterSessionId: z.ZodNullable<z.ZodString>;
7475
- currentAdapterSessionId: z.ZodNullable<z.ZodString>;
7476
- currentAdapterSessionIdState: z.ZodEnum<{
7477
- confirmed: "confirmed";
7478
- moved: "moved";
7479
- inherited: "inherited";
7480
- }>;
7481
- }, z.core.$strip>;
7482
- }, z.core.$strip>, z.ZodObject<{
7483
- outcome: z.ZodLiteral<"recovery-conflict">;
7484
- status: z.ZodEnum<{
7485
- idle: "idle";
7486
- active: "active";
7487
- starting: "starting";
7488
- dead: "dead";
7489
- disposed: "disposed";
7490
- }>;
7491
- ownerGeneration: z.ZodNullable<z.ZodObject<{
7492
- claimId: z.ZodString;
7493
- claimToken: z.ZodString;
7494
- fence: z.ZodNumber;
7495
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7496
- status: z.ZodEnum<{
7497
- abandoned: "abandoned";
7498
- held: "held";
7499
- releasing: "releasing";
7500
- }>;
7501
- }, z.core.$strip>>;
7502
4718
  }, z.core.$strip>], "outcome">;
7503
4719
  /** {@inheritDoc SessionOwnershipReserveStartServiceResponseSchema} */
7504
4720
  type SessionOwnershipReserveStartServiceResult$1 = z.infer<typeof SessionOwnershipReserveStartServiceResponseSchema>;
@@ -7531,7 +4747,6 @@ declare const SessionOwnershipSettleMovementServiceRequestSchema: z.ZodObject<{
7531
4747
  agentId: z.ZodString;
7532
4748
  adapterId: z.ZodString;
7533
4749
  adapterName: z.ZodString;
7534
- ownerInstanceId: z.ZodString;
7535
4750
  machineId: z.ZodOptional<z.ZodString>;
7536
4751
  movement: z.ZodDiscriminatedUnion<[z.ZodObject<{
7537
4752
  confirmed: z.ZodLiteral<true>;
@@ -7572,7 +4787,6 @@ declare const SessionOwnershipSettleMovementServiceResponseSchema: z.ZodDiscrimi
7572
4787
  adapterName: z.ZodString;
7573
4788
  sessionId: z.ZodString;
7574
4789
  agentId: z.ZodString;
7575
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7576
4790
  claimToken: z.ZodString;
7577
4791
  fence: z.ZodNumber;
7578
4792
  status: z.ZodEnum<{
@@ -7604,7 +4818,6 @@ declare const SessionOwnershipSettleMovementServiceResponseSchema: z.ZodDiscrimi
7604
4818
  adapterName: z.ZodString;
7605
4819
  sessionId: z.ZodString;
7606
4820
  agentId: z.ZodString;
7607
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7608
4821
  claimToken: z.ZodString;
7609
4822
  fence: z.ZodNumber;
7610
4823
  status: z.ZodEnum<{
@@ -7625,7 +4838,6 @@ declare const SessionOwnershipSettleMovementServiceResponseSchema: z.ZodDiscrimi
7625
4838
  adapterName: z.ZodString;
7626
4839
  sessionId: z.ZodString;
7627
4840
  agentId: z.ZodString;
7628
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7629
4841
  claimToken: z.ZodString;
7630
4842
  fence: z.ZodNumber;
7631
4843
  status: z.ZodEnum<{
@@ -7696,7 +4908,6 @@ declare const SessionOwnershipReclaimReasonSchema: z.ZodEnum<{
7696
4908
  "agent-disposed": "agent-disposed";
7697
4909
  "agent-gone": "agent-gone";
7698
4910
  "adapter-instance-gone": "adapter-instance-gone";
7699
- "owner-instance-retired": "owner-instance-retired";
7700
4911
  }>;
7701
4912
  /** {@inheritDoc SessionOwnershipReclaimReasonSchema} */
7702
4913
  type SessionOwnershipReclaimReason$1 = z.infer<typeof SessionOwnershipReclaimReasonSchema>;
@@ -7710,7 +4921,6 @@ declare const SessionOwnershipReconciledClaimSchema: z.ZodObject<{
7710
4921
  adapterName: z.ZodString;
7711
4922
  sessionId: z.ZodString;
7712
4923
  agentId: z.ZodString;
7713
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7714
4924
  claimToken: z.ZodString;
7715
4925
  fence: z.ZodNumber;
7716
4926
  status: z.ZodEnum<{
@@ -7730,7 +4940,6 @@ declare const SessionOwnershipReconciledClaimSchema: z.ZodObject<{
7730
4940
  "agent-disposed": "agent-disposed";
7731
4941
  "agent-gone": "agent-gone";
7732
4942
  "adapter-instance-gone": "adapter-instance-gone";
7733
- "owner-instance-retired": "owner-instance-retired";
7734
4943
  }>>;
7735
4944
  }, z.core.$strip>;
7736
4945
  /** {@inheritDoc SessionOwnershipReconciledClaimSchema} */
@@ -7754,7 +4963,6 @@ declare const SessionOwnershipReconcileServiceResponseSchema: z.ZodDiscriminated
7754
4963
  adapterName: z.ZodString;
7755
4964
  sessionId: z.ZodString;
7756
4965
  agentId: z.ZodString;
7757
- ownerInstanceId: z.ZodNullable<z.ZodString>;
7758
4966
  claimToken: z.ZodString;
7759
4967
  fence: z.ZodNumber;
7760
4968
  status: z.ZodEnum<{
@@ -7774,7 +4982,6 @@ declare const SessionOwnershipReconcileServiceResponseSchema: z.ZodDiscriminated
7774
4982
  "agent-disposed": "agent-disposed";
7775
4983
  "agent-gone": "agent-gone";
7776
4984
  "adapter-instance-gone": "adapter-instance-gone";
7777
- "owner-instance-retired": "owner-instance-retired";
7778
4985
  }>>;
7779
4986
  }, z.core.$strip>>;
7780
4987
  }, z.core.$strip>, z.ZodObject<{
@@ -7849,94 +5056,22 @@ declare const SessionSchemas: {
7849
5056
  agentId: _$zod.ZodString;
7850
5057
  adapterId: _$zod.ZodString;
7851
5058
  adapterName: _$zod.ZodString;
7852
- ownerInstanceId: _$zod.ZodString;
7853
5059
  machineId: _$zod.ZodOptional<_$zod.ZodString>;
7854
5060
  role: _$zod.ZodEnum<{
7855
5061
  lead: "lead";
7856
5062
  member: "member";
7857
5063
  }>;
7858
5064
  resumeProviderSessionId: _$zod.ZodNullable<_$zod.ZodString>;
7859
- claimToken: _$zod.ZodString;
7860
- recoveryGuard: _$zod.ZodOptional<_$zod.ZodObject<{
7861
- expectedStatus: _$zod.ZodEnum<{
7862
- idle: "idle";
7863
- active: "active";
7864
- starting: "starting";
7865
- dead: "dead";
7866
- disposed: "disposed";
7867
- }>;
7868
- expectedPreimage: _$zod.ZodObject<{
7869
- status: _$zod.ZodEnum<{
7870
- idle: "idle";
7871
- active: "active";
7872
- starting: "starting";
7873
- dead: "dead";
7874
- disposed: "disposed";
7875
- }>;
7876
- adapterId: _$zod.ZodString;
7877
- binding: _$zod.ZodOptional<_$zod.ZodObject<{
7878
- adapterId: _$zod.ZodString;
7879
- ownerMachineId: _$zod.ZodString;
7880
- ownerInstanceId: _$zod.ZodString;
7881
- }, _$zod_v4_core0.$strip>>;
7882
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
7883
- }, _$zod_v4_core0.$strip>;
7884
- expectedRevision: _$zod.ZodNumber;
7885
- expectedCurrencyFence: _$zod.ZodNumber;
7886
- expectedCurrency: _$zod.ZodObject<{
7887
- adapterSessionId: _$zod.ZodNullable<_$zod.ZodString>;
7888
- currentAdapterSessionId: _$zod.ZodNullable<_$zod.ZodString>;
7889
- currentAdapterSessionIdState: _$zod.ZodEnum<{
7890
- confirmed: "confirmed";
7891
- moved: "moved";
7892
- inherited: "inherited";
7893
- }>;
7894
- }, _$zod_v4_core0.$strip>;
7895
- ownerGeneration: _$zod.ZodNullable<_$zod.ZodObject<{
7896
- claimId: _$zod.ZodString;
7897
- claimToken: _$zod.ZodString;
7898
- fence: _$zod.ZodNumber;
7899
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
7900
- status: _$zod.ZodEnum<{
7901
- abandoned: "abandoned";
7902
- held: "held";
7903
- releasing: "releasing";
7904
- }>;
7905
- }, _$zod_v4_core0.$strip>>;
7906
- }, _$zod_v4_core0.$strip>>;
7907
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
7908
5065
  expectedLeadAgentId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
7909
5066
  }, _$zod_v4_core0.$strip>;
7910
5067
  response: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
7911
5068
  outcome: _$zod.ZodLiteral<"reserved">;
7912
- reservation: _$zod.ZodUnion<readonly [_$zod.ZodObject<{
5069
+ reservation: _$zod.ZodObject<{
7913
5070
  agentId: _$zod.ZodString;
7914
5071
  sessionId: _$zod.ZodString;
7915
- adapterId: _$zod.ZodString;
7916
- ownerInstanceId: _$zod.ZodString;
7917
- leadDesignated: _$zod.ZodBoolean;
7918
- previousLeadAgentId: _$zod.ZodNullable<_$zod.ZodString>;
7919
- recovery: _$zod.ZodOptional<_$zod.ZodObject<{
7920
- attemptId: _$zod.ZodString;
7921
- preimage: _$zod.ZodObject<{
7922
- status: _$zod.ZodEnum<{
7923
- idle: "idle";
7924
- active: "active";
7925
- starting: "starting";
7926
- dead: "dead";
7927
- disposed: "disposed";
7928
- }>;
7929
- adapterId: _$zod.ZodString;
7930
- binding: _$zod.ZodOptional<_$zod.ZodObject<{
7931
- adapterId: _$zod.ZodString;
7932
- ownerMachineId: _$zod.ZodString;
7933
- ownerInstanceId: _$zod.ZodString;
7934
- }, _$zod_v4_core0.$strip>>;
7935
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
7936
- }, _$zod_v4_core0.$strip>;
7937
- }, _$zod_v4_core0.$strip>>;
7938
5072
  machineId: _$zod.ZodString;
7939
- claim: _$zod.ZodObject<{
5073
+ adapterId: _$zod.ZodString;
5074
+ claim: _$zod.ZodNullable<_$zod.ZodObject<{
7940
5075
  machineId: _$zod.ZodString;
7941
5076
  adapterId: _$zod.ZodString;
7942
5077
  providerSessionId: _$zod.ZodString;
@@ -7944,7 +5079,6 @@ declare const SessionSchemas: {
7944
5079
  adapterName: _$zod.ZodString;
7945
5080
  sessionId: _$zod.ZodString;
7946
5081
  agentId: _$zod.ZodString;
7947
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
7948
5082
  claimToken: _$zod.ZodString;
7949
5083
  fence: _$zod.ZodNumber;
7950
5084
  status: _$zod.ZodEnum<{
@@ -7954,36 +5088,10 @@ declare const SessionSchemas: {
7954
5088
  }>;
7955
5089
  claimedAt: _$zod.ZodNumber;
7956
5090
  updatedAt: _$zod.ZodNumber;
7957
- }, _$zod_v4_core0.$strip>;
7958
- }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
7959
- agentId: _$zod.ZodString;
7960
- sessionId: _$zod.ZodString;
7961
- adapterId: _$zod.ZodString;
7962
- ownerInstanceId: _$zod.ZodString;
5091
+ }, _$zod_v4_core0.$strip>>;
7963
5092
  leadDesignated: _$zod.ZodBoolean;
7964
5093
  previousLeadAgentId: _$zod.ZodNullable<_$zod.ZodString>;
7965
- recovery: _$zod.ZodOptional<_$zod.ZodObject<{
7966
- attemptId: _$zod.ZodString;
7967
- preimage: _$zod.ZodObject<{
7968
- status: _$zod.ZodEnum<{
7969
- idle: "idle";
7970
- active: "active";
7971
- starting: "starting";
7972
- dead: "dead";
7973
- disposed: "disposed";
7974
- }>;
7975
- adapterId: _$zod.ZodString;
7976
- binding: _$zod.ZodOptional<_$zod.ZodObject<{
7977
- adapterId: _$zod.ZodString;
7978
- ownerMachineId: _$zod.ZodString;
7979
- ownerInstanceId: _$zod.ZodString;
7980
- }, _$zod_v4_core0.$strip>>;
7981
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
7982
- }, _$zod_v4_core0.$strip>;
7983
- }, _$zod_v4_core0.$strip>>;
7984
- machineId: _$zod.ZodOptional<_$zod.ZodString>;
7985
- claim: _$zod.ZodNull;
7986
- }, _$zod_v4_core0.$strip>]>;
5094
+ }, _$zod_v4_core0.$strip>;
7987
5095
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
7988
5096
  outcome: _$zod.ZodLiteral<"occupied">;
7989
5097
  holder: _$zod.ZodObject<{
@@ -7994,7 +5102,6 @@ declare const SessionSchemas: {
7994
5102
  adapterName: _$zod.ZodString;
7995
5103
  sessionId: _$zod.ZodString;
7996
5104
  agentId: _$zod.ZodString;
7997
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
7998
5105
  claimToken: _$zod.ZodString;
7999
5106
  fence: _$zod.ZodNumber;
8000
5107
  status: _$zod.ZodEnum<{
@@ -8010,54 +5117,14 @@ declare const SessionSchemas: {
8010
5117
  currentLeadAgentId: _$zod.ZodNullable<_$zod.ZodString>;
8011
5118
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8012
5119
  outcome: _$zod.ZodLiteral<"agent-disposed">;
8013
- }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8014
- outcome: _$zod.ZodLiteral<"session-not-active">;
8015
- status: _$zod.ZodEnum<{
8016
- closed: "closed";
8017
- discovered: "discovered";
8018
- archived: "archived";
8019
- }>;
8020
5120
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8021
5121
  outcome: _$zod.ZodLiteral<"not-found">;
8022
5122
  missing: _$zod.ZodEnum<{
8023
- agent: "agent";
8024
5123
  session: "session";
5124
+ agent: "agent";
8025
5125
  }>;
8026
5126
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8027
5127
  outcome: _$zod.ZodLiteral<"machine-identity-unavailable">;
8028
- }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8029
- outcome: _$zod.ZodLiteral<"currency-changed">;
8030
- revision: _$zod.ZodNumber;
8031
- currencyFence: _$zod.ZodNumber;
8032
- currency: _$zod.ZodObject<{
8033
- adapterSessionId: _$zod.ZodNullable<_$zod.ZodString>;
8034
- currentAdapterSessionId: _$zod.ZodNullable<_$zod.ZodString>;
8035
- currentAdapterSessionIdState: _$zod.ZodEnum<{
8036
- confirmed: "confirmed";
8037
- moved: "moved";
8038
- inherited: "inherited";
8039
- }>;
8040
- }, _$zod_v4_core0.$strip>;
8041
- }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
8042
- outcome: _$zod.ZodLiteral<"recovery-conflict">;
8043
- status: _$zod.ZodEnum<{
8044
- idle: "idle";
8045
- active: "active";
8046
- starting: "starting";
8047
- dead: "dead";
8048
- disposed: "disposed";
8049
- }>;
8050
- ownerGeneration: _$zod.ZodNullable<_$zod.ZodObject<{
8051
- claimId: _$zod.ZodString;
8052
- claimToken: _$zod.ZodString;
8053
- fence: _$zod.ZodNumber;
8054
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8055
- status: _$zod.ZodEnum<{
8056
- abandoned: "abandoned";
8057
- held: "held";
8058
- releasing: "releasing";
8059
- }>;
8060
- }, _$zod_v4_core0.$strip>>;
8061
5128
  }, _$zod_v4_core0.$strip>], "outcome">;
8062
5129
  };
8063
5130
  'ownership.settleMovement': {
@@ -8066,7 +5133,6 @@ declare const SessionSchemas: {
8066
5133
  agentId: _$zod.ZodString;
8067
5134
  adapterId: _$zod.ZodString;
8068
5135
  adapterName: _$zod.ZodString;
8069
- ownerInstanceId: _$zod.ZodString;
8070
5136
  machineId: _$zod.ZodOptional<_$zod.ZodString>;
8071
5137
  movement: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
8072
5138
  confirmed: _$zod.ZodLiteral<true>;
@@ -8098,7 +5164,6 @@ declare const SessionSchemas: {
8098
5164
  adapterName: _$zod.ZodString;
8099
5165
  sessionId: _$zod.ZodString;
8100
5166
  agentId: _$zod.ZodString;
8101
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8102
5167
  claimToken: _$zod.ZodString;
8103
5168
  fence: _$zod.ZodNumber;
8104
5169
  status: _$zod.ZodEnum<{
@@ -8130,7 +5195,6 @@ declare const SessionSchemas: {
8130
5195
  adapterName: _$zod.ZodString;
8131
5196
  sessionId: _$zod.ZodString;
8132
5197
  agentId: _$zod.ZodString;
8133
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8134
5198
  claimToken: _$zod.ZodString;
8135
5199
  fence: _$zod.ZodNumber;
8136
5200
  status: _$zod.ZodEnum<{
@@ -8151,7 +5215,6 @@ declare const SessionSchemas: {
8151
5215
  adapterName: _$zod.ZodString;
8152
5216
  sessionId: _$zod.ZodString;
8153
5217
  agentId: _$zod.ZodString;
8154
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8155
5218
  claimToken: _$zod.ZodString;
8156
5219
  fence: _$zod.ZodNumber;
8157
5220
  status: _$zod.ZodEnum<{
@@ -8207,7 +5270,6 @@ declare const SessionSchemas: {
8207
5270
  adapterName: _$zod.ZodString;
8208
5271
  sessionId: _$zod.ZodString;
8209
5272
  agentId: _$zod.ZodString;
8210
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8211
5273
  claimToken: _$zod.ZodString;
8212
5274
  fence: _$zod.ZodNumber;
8213
5275
  status: _$zod.ZodEnum<{
@@ -8235,7 +5297,6 @@ declare const SessionSchemas: {
8235
5297
  adapterName: _$zod.ZodString;
8236
5298
  sessionId: _$zod.ZodString;
8237
5299
  agentId: _$zod.ZodString;
8238
- ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
8239
5300
  claimToken: _$zod.ZodString;
8240
5301
  fence: _$zod.ZodNumber;
8241
5302
  status: _$zod.ZodEnum<{
@@ -8255,7 +5316,6 @@ declare const SessionSchemas: {
8255
5316
  "agent-disposed": "agent-disposed";
8256
5317
  "agent-gone": "agent-gone";
8257
5318
  "adapter-instance-gone": "adapter-instance-gone";
8258
- "owner-instance-retired": "owner-instance-retired";
8259
5319
  }>>;
8260
5320
  }, _$zod_v4_core0.$strip>>;
8261
5321
  }, _$zod_v4_core0.$strip>, _$zod.ZodObject<{
@@ -9009,7 +6069,7 @@ declare const SessionSchemas: {
9009
6069
  systemPrompt: "systemPrompt";
9010
6070
  fullPrefix: "fullPrefix";
9011
6071
  }>>;
9012
- turnContext: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue, _$zod_v4_core0.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue>>>>;
6072
+ turnContext: _$zod.ZodOptional<_$zod.ZodRecord<_$zod.ZodString, _$zod.ZodType<_$_makaio_contracts0.JsonValue, unknown, _$zod_v4_core0.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
9013
6073
  requestCorrelation: _$zod.ZodOptional<_$zod.ZodObject<{
9014
6074
  sessionId: _$zod.ZodOptional<_$zod.ZodString>;
9015
6075
  turnId: _$zod.ZodOptional<_$zod.ZodString>;
@@ -10381,11 +7441,6 @@ declare const SessionSchemas: {
10381
7441
  adapterId: _$zod.ZodString;
10382
7442
  adapterName: _$zod.ZodString;
10383
7443
  sessionId: _$zod.ZodString;
10384
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
10385
- machineId: _$zod.ZodString;
10386
- instanceId: _$zod.ZodString;
10387
- }, _$zod_v4_core0.$strip>>;
10388
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
10389
7444
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
10390
7445
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
10391
7446
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -10514,11 +7569,6 @@ declare const SessionSchemas: {
10514
7569
  adapterId: _$zod.ZodString;
10515
7570
  adapterName: _$zod.ZodString;
10516
7571
  sessionId: _$zod.ZodString;
10517
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
10518
- machineId: _$zod.ZodString;
10519
- instanceId: _$zod.ZodString;
10520
- }, _$zod_v4_core0.$strip>>;
10521
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
10522
7572
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
10523
7573
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
10524
7574
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -11053,11 +8103,6 @@ declare const SessionSchemas: {
11053
8103
  adapterId: _$zod.ZodString;
11054
8104
  adapterName: _$zod.ZodString;
11055
8105
  sessionId: _$zod.ZodString;
11056
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
11057
- machineId: _$zod.ZodString;
11058
- instanceId: _$zod.ZodString;
11059
- }, _$zod_v4_core0.$strip>>;
11060
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
11061
8106
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
11062
8107
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
11063
8108
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -11186,11 +8231,6 @@ declare const SessionSchemas: {
11186
8231
  adapterId: _$zod.ZodString;
11187
8232
  adapterName: _$zod.ZodString;
11188
8233
  sessionId: _$zod.ZodString;
11189
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
11190
- machineId: _$zod.ZodString;
11191
- instanceId: _$zod.ZodString;
11192
- }, _$zod_v4_core0.$strip>>;
11193
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
11194
8234
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
11195
8235
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
11196
8236
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -12242,11 +9282,6 @@ declare const SessionSchemas: {
12242
9282
  adapterId: _$zod.ZodString;
12243
9283
  adapterName: _$zod.ZodString;
12244
9284
  sessionId: _$zod.ZodString;
12245
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
12246
- machineId: _$zod.ZodString;
12247
- instanceId: _$zod.ZodString;
12248
- }, _$zod_v4_core0.$strip>>;
12249
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
12250
9285
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12251
9286
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12252
9287
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -12400,11 +9435,6 @@ declare const SessionSchemas: {
12400
9435
  adapterId: _$zod.ZodString;
12401
9436
  adapterName: _$zod.ZodString;
12402
9437
  sessionId: _$zod.ZodString;
12403
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
12404
- machineId: _$zod.ZodString;
12405
- instanceId: _$zod.ZodString;
12406
- }, _$zod_v4_core0.$strip>>;
12407
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
12408
9438
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12409
9439
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12410
9440
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -12549,11 +9579,6 @@ declare const SessionSchemas: {
12549
9579
  adapterId: _$zod.ZodString;
12550
9580
  adapterName: _$zod.ZodString;
12551
9581
  sessionId: _$zod.ZodString;
12552
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
12553
- machineId: _$zod.ZodString;
12554
- instanceId: _$zod.ZodString;
12555
- }, _$zod_v4_core0.$strip>>;
12556
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
12557
9582
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12558
9583
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12559
9584
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -12812,11 +9837,6 @@ declare const SessionSchemas: {
12812
9837
  adapterId: _$zod.ZodString;
12813
9838
  adapterName: _$zod.ZodString;
12814
9839
  sessionId: _$zod.ZodString;
12815
- runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
12816
- machineId: _$zod.ZodString;
12817
- instanceId: _$zod.ZodString;
12818
- }, _$zod_v4_core0.$strip>>;
12819
- recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
12820
9840
  adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12821
9841
  currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
12822
9842
  currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
@@ -13055,4 +10075,4 @@ type KnownSessionEvent = { [K in RuntimeKnownSessionEventType]: SessionEventBase
13055
10075
  */
13056
10076
  declare function isKnownSessionEvent(event: MakaioSessionEvent$1): event is KnownSessionEvent;
13057
10077
  //#endregion
13058
- export { SessionOwnershipClaimRequestSchema as $, safeValidateSnapshot as $n, SessionEventPayload as $t, SessionOwnershipServiceMovement as A, TurnInitiatorSchema$1 as An, SessionOwnershipRecoveryGuardSchema as At, AdapterSessionClaimKeySchema as B, AgentRole$1 as Bn, AdapterSessionClaimStatusSchema as Bt, SessionOwnershipReleaseServiceRequestSchema as C, SessionMessageOrigin$1 as Cn, RuntimeBinding as Ct, SessionOwnershipReserveStartServiceRequestSchema as D, SessionMessageSchema$1 as Dn, SessionOwnershipFinalizeRecoveryResponseSchema as Dt, SessionOwnershipReserveStartServiceRequest as E, SessionMessageRoleSchema as En, SessionOwnershipFinalizeRecoveryRequestSchema as Et, SessionOwnershipSettleMovementServiceResult as F, TurnUsageSchema$1 as Fn, SessionOwnershipRecoveryReservation as Ft, OwnershipMovement as G, ImportStatusSchema as Gn, SessionCreated as Gt, AdapterSessionClaimRecordSchema as H, BranchKind$1 as Hn, ForkTransformsSchema$1 as Ht, normalizeSessionOwnershipReserveStartServiceRequest$1 as I, UsageMetrics as In, SessionOwnershipRecoveryReservationSchema as It, OwnershipOwnerInstanceSchema as J, SessionSnapshotSchema as Jn, SessionUpdatedEventSchema as Jt, OwnershipMovementSchema as K, SNAPSHOT_VERSION as Kn, SessionCreatedEventSchema as Kt, AdapterSessionClaimDisposition as L, UsageMetricsSchema as Ln, SessionOwnershipRecoveryTerminalAction as Lt, SessionOwnershipSettleMovementServiceRequest as M, TurnStatus as Mn, SessionOwnershipRecoveryOwnerGenerationSchema as Mt, SessionOwnershipSettleMovementServiceRequestSchema as N, TurnStatusSchema$1 as Nn, SessionOwnershipRecoveryPreimage as Nt, SessionOwnershipReserveStartServiceResponseSchema as O, Turn$1 as On, SessionOwnershipFinalizeRecoveryResult as Ot, SessionOwnershipSettleMovementServiceResponseSchema as P, TurnUsage$1 as Pn, SessionOwnershipRecoveryPreimageSchema as Pt, SessionOwnershipClaimRequest as Q, SnapshotPreviewData as Qn, SESSION_EVENT_TYPES as Qt, AdapterSessionClaimDispositionSchema as R, AdapterSessionCurrencyState as Rn, SessionOwnershipRecoveryTerminalActionSchema as Rt, SessionOwnershipReleaseServiceRequest as S, SessionMessageBlockSchema as Sn, normalizeSessionOwnershipClaimRequest$1 as St, SessionOwnershipReservationSchema as T, SessionMessageRole as Tn, SessionOwnershipFinalizeRecoveryRequest as Tt, AgentSessionOwnershipRecord as U, BranchKindSchema as Un, SegmentPolicy as Ut, AdapterSessionClaimRecord$1 as V, AgentRoleSchema as Vn, ForkTransforms$1 as Vt, AgentSessionOwnershipRecordSchema as W, ImportStatus as Wn, SegmentPolicySchema as Wt, RuntimeInstanceRecord$1 as X, SnapshotExportOptionsSchema as Xn, ForkChildInfoSchema as Xt, OwnershipTopologySchema as Y, SnapshotExportOptions as Yn, ForkChildInfo as Yt, RuntimeInstanceRecordSchema as Z, SnapshotImportConflictErrorData as Zn, MakaioSessionEventSchema as Zt, SessionOwnershipReclaimReasonSchema as _, MessageRoutingSchema$1 as _n, SessionOwnershipSettleMovementRequestSchema$1 as _t, SessionPreviewData as a, NativeLocalityReason as an, SessionWithPreviewSchema as ar, SessionOwnershipReleaseAgentClaimsRequestSchema as at, SessionOwnershipReconciledClaim as b, SessionMessage$1 as bn, SessionOwnershipStorageNamespace as bt, SessionSchemas as c, NativeLocalityVerdictSchema as cn, MakaioSessionAgentSchema$1 as cr, SessionOwnershipReleaseRequest as ct, SessionOwnershipContinuationServiceRequestSchema as d, SendMessageResponse as dn, SessionOwnershipReleaseResult as dt, SessionEventType$1 as en, validateSnapshot as er, SessionOwnershipClaimResponseSchema as et, SessionOwnershipContinuationServiceResponseSchema as f, TurnCompleted as fn, SessionOwnershipSettleCurrencyRequest as ft, SessionOwnershipReclaimReason$1 as g, MessageRouting as gn, SessionOwnershipSettleMovementRequest as gt, SessionOwnershipPrincipalSchema as h, TurnStarted as hn, SessionOwnershipSettleCurrencyResult as ht, MakaioSessionEvent$1 as i, NativeForkDirectiveSchema as in, SessionRecordMetadataSchema$1 as ir, SessionOwnershipReleaseAgentClaimsRequest as it, SessionOwnershipServiceMovementSchema as j, TurnSchema$1 as jn, SessionOwnershipRecoveryOwnerGeneration as jt, SessionOwnershipReserveStartServiceResult$1 as k, TurnInitiator$2 as kn, SessionOwnershipRecoveryGuard$1 as kt, OwnershipTopology$1 as l, AgentAttachResolvedRequest as ln, SessionCreateBase as lr, SessionOwnershipReleaseRequestSchema as lt, SessionOwnershipPrincipal as m, TurnIngestionMarkerSchema$1 as mn, SessionOwnershipSettleCurrencyResponseSchema as mt, KnownSessionEvent as n, SessionEventTypeSchema as nn, SessionPreviewDataSchema as nr, SessionOwnershipListClaimsRequest as nt, SessionWithPreview as o, NativeLocalityReasonSchema as on, AgentStatus as or, SessionOwnershipReleaseAgentClaimsResponseSchema as ot, SessionOwnershipContinuationServiceResult as p, TurnIngestionMarker$1 as pn, SessionOwnershipSettleCurrencyRequestSchema as pt, OwnershipOwnerInstance as q, SessionSnapshot as qn, SessionUpdatedEvent as qt, MakaioSessionAgent$1 as r, NativeForkDirective$1 as rn, SessionRecordMetadata as rr, SessionOwnershipListClaimsRequestSchema as rt, isKnownSessionEvent as s, NativeLocalityVerdict$1 as sn, AgentStatusSchema$1 as sr, SessionOwnershipReleaseAgentClaimsResult as st, IMakaioSession$1 as t, SessionEventTypeMap as tn, MakaioSessionSchema as tr, SessionOwnershipClaimResult as tt, SessionOwnershipContinuationServiceRequest as u, SendMessageRequest as un, SessionCreateBaseSchema as ur, SessionOwnershipReleaseResponseSchema as ut, SessionOwnershipReconcileServiceResponseSchema as v, MessageRoutingStatus as vn, SessionOwnershipSettleMovementResponseSchema as vt, SessionOwnershipReservation as w, SessionMessageOriginSchema as wn, RuntimeBindingSchema as wt, SessionOwnershipReconciledClaimSchema as x, SessionMessageBlock$1 as xn, SessionOwnershipStorageSubjects$1 as xt, SessionOwnershipReconcileServiceResult as y, MessageRoutingStatusSchema as yn, SessionOwnershipSettleMovementResult as yt, AdapterSessionClaimKey as z, AdapterSessionCurrencyStateSchema as zn, AdapterSessionClaimStatus as zt };
10078
+ export { NativeForkDirective$1 as $, SessionRecordMetadata as $t, SessionOwnershipReserveStartServiceResult$1 as A, TurnUsage$1 as At, SegmentPolicySchema as B, ImportStatus as Bt, SessionOwnershipReleaseServiceRequest as C, SessionMessageSchema$1 as Ct, SessionOwnershipReserveStartServiceRequest as D, TurnSchema$1 as Dt, SessionOwnershipReservationSchema as E, TurnInitiatorSchema$1 as Et, SessionOwnershipSettleMovementServiceResponseSchema as F, AdapterSessionCurrencyStateSchema as Ft, ForkChildInfo as G, SnapshotExportOptions as Gt, SessionCreatedEventSchema as H, SNAPSHOT_VERSION as Ht, SessionOwnershipSettleMovementServiceResult as I, AgentRole$1 as It, SESSION_EVENT_TYPES as J, SnapshotPreviewData as Jt, ForkChildInfoSchema as K, SnapshotExportOptionsSchema as Kt, ForkTransforms$1 as L, AgentRoleSchema as Lt, SessionOwnershipServiceMovementSchema as M, UsageMetrics as Mt, SessionOwnershipSettleMovementServiceRequest as N, UsageMetricsSchema as Nt, SessionOwnershipReserveStartServiceRequestSchema as O, TurnStatus as Ot, SessionOwnershipSettleMovementServiceRequestSchema as P, AdapterSessionCurrencyState as Pt, SessionEventTypeSchema as Q, SessionPreviewDataSchema as Qt, ForkTransformsSchema$1 as R, BranchKind$1 as Rt, SessionOwnershipReconciledClaimSchema as S, SessionMessageRoleSchema as St, SessionOwnershipReservation as T, TurnInitiator$2 as Tt, SessionUpdatedEvent as U, SessionSnapshot as Ut, SessionCreated as V, ImportStatusSchema as Vt, SessionUpdatedEventSchema as W, SessionSnapshotSchema as Wt, SessionEventType$1 as X, validateSnapshot as Xt, SessionEventPayload as Y, safeValidateSnapshot as Yt, SessionEventTypeMap as Z, MakaioSessionSchema as Zt, SessionOwnershipReclaimReason$1 as _, SessionMessageBlock$1 as _t, SessionPreviewData as a, SessionCreateBase as an, AgentAttachResolvedRequest as at, SessionOwnershipReconcileServiceResult as b, SessionMessageOriginSchema as bt, SessionSchemas as c, TurnCompleted as ct, SessionOwnershipContinuationServiceRequest as d, TurnStarted as dt, SessionRecordMetadataSchema$1 as en, NativeForkDirectiveSchema as et, SessionOwnershipContinuationServiceRequestSchema as f, MessageRouting as ft, SessionOwnershipPrincipalSchema as g, SessionMessage$1 as gt, SessionOwnershipPrincipal as h, MessageRoutingStatusSchema as ht, MakaioSessionEvent$1 as i, MakaioSessionAgentSchema$1 as in, NativeLocalityVerdictSchema as it, SessionOwnershipServiceMovement as j, TurnUsageSchema$1 as jt, SessionOwnershipReserveStartServiceResponseSchema as k, TurnStatusSchema$1 as kt, OwnershipTopology$1 as l, TurnIngestionMarker$1 as lt, SessionOwnershipContinuationServiceResult as m, MessageRoutingStatus as mt, KnownSessionEvent as n, AgentStatus as nn, NativeLocalityReasonSchema as nt, SessionWithPreview as o, SessionCreateBaseSchema as on, SendMessageRequest as ot, SessionOwnershipContinuationServiceResponseSchema as p, MessageRoutingSchema$1 as pt, MakaioSessionEventSchema as q, SnapshotImportConflictErrorData as qt, MakaioSessionAgent$1 as r, AgentStatusSchema$1 as rn, NativeLocalityVerdict$1 as rt, isKnownSessionEvent as s, SendMessageResponse as st, IMakaioSession$1 as t, SessionWithPreviewSchema as tn, NativeLocalityReason as tt, OwnershipTopologySchema as u, TurnIngestionMarkerSchema$1 as ut, SessionOwnershipReclaimReasonSchema as v, SessionMessageBlockSchema as vt, SessionOwnershipReleaseServiceRequestSchema as w, Turn$1 as wt, SessionOwnershipReconciledClaim as x, SessionMessageRole as xt, SessionOwnershipReconcileServiceResponseSchema as y, SessionMessageOrigin$1 as yt, SegmentPolicy as z, BranchKindSchema as zt };