@makaio/framework 1.0.0-dev-1788511348215 → 1.0.0-dev-1788811230746

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 (300) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapters/config/index.d.mts +1 -1
  3. package/dist/adapters/index.d.mts +2 -2
  4. package/dist/adapters/node.d.mts +1 -1
  5. package/dist/attempt-fixtures-CnrnF5_4.mjs +1 -0
  6. package/dist/attempt-record-codec-B32Whx75.mjs +1 -0
  7. package/dist/authority-state-bootstrap-7Cgb9TR2.mjs +1 -0
  8. package/dist/bootstrap-start-client-DrvofWwi.mjs +1 -0
  9. package/dist/bus/index.d.mts +27 -9
  10. package/dist/bus/index.mjs +1 -1
  11. package/dist/bus-CobBUqjo.mjs +2 -0
  12. package/dist/bus-Uy9C3TBM.mjs +1 -0
  13. package/dist/clients/index.d.mts +1 -1
  14. package/dist/clients/managed-install.d.mts +1 -1
  15. package/dist/code-execution/worker-entry.d.mts +1 -1
  16. package/dist/{context-resolution-841T7jBI.d.mts → context-resolution-C2VBZhaR.d.mts} +5 -5
  17. package/dist/contracts/adapter/index.d.mts +2 -2
  18. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  19. package/dist/contracts/artifact/index.d.mts +2 -2
  20. package/dist/contracts/auth/index.d.mts +2 -2
  21. package/dist/contracts/automation-trigger/index.d.mts +3 -3
  22. package/dist/contracts/canonical-model/index.d.mts +1 -1
  23. package/dist/contracts/capabilities/index.d.mts +2 -2
  24. package/dist/contracts/client/index.d.mts +2 -2
  25. package/dist/contracts/code-execution/index.d.mts +1 -1
  26. package/dist/contracts/common/index.d.mts +1 -1
  27. package/dist/contracts/config/index.d.mts +1 -1
  28. package/dist/contracts/extension/index.d.mts +5 -5
  29. package/dist/contracts/facet/index.d.mts +1 -1
  30. package/dist/contracts/harness/index.d.mts +1 -1
  31. package/dist/contracts/host/index.d.mts +1 -1
  32. package/dist/contracts/index.d.mts +1254 -42
  33. package/dist/contracts/index.mjs +1 -1
  34. package/dist/contracts/materialization/index.d.mts +3 -3
  35. package/dist/contracts/model-registry/index.d.mts +1 -1
  36. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  37. package/dist/contracts/platform/index.d.mts +1 -1
  38. package/dist/contracts/provider/index.d.mts +2 -2
  39. package/dist/contracts/reaction/index.d.mts +1 -1
  40. package/dist/contracts/session/index.d.mts +2 -2
  41. package/dist/contracts/shared/index.d.mts +2 -2
  42. package/dist/contracts/skill/index.d.mts +1 -1
  43. package/dist/contracts/telemetry/index.d.mts +1 -1
  44. package/dist/contracts/timeout/index.d.mts +1 -1
  45. package/dist/contracts/variant/index.d.mts +1 -1
  46. package/dist/contracts/worker/index.d.mts +2 -2
  47. package/dist/contracts/worker/index.mjs +1 -1
  48. package/dist/contracts/workflow/index.d.mts +2 -2
  49. package/dist/{contribution-CUHLVLsT.d.mts → contribution-Crm-mctl.d.mts} +2 -2
  50. package/dist/{definition-DyGImhyi.d.mts → definition-u_5rYQtc.d.mts} +1 -1
  51. package/dist/{detached-extension-handle-D0aI0pJA.mjs → detached-extension-handle-DAXKQT9c.mjs} +1 -1
  52. package/dist/execution-attempt-repository-Djg3qDRv.mjs +1 -0
  53. package/dist/{execution-attempt-repository-DY4KTptE.d.mts → execution-attempt-repository-OryBjQQI.d.mts} +740 -9
  54. package/dist/{execution-target-H0RWV7Py.mjs → execution-target-BcoF_oDB.mjs} +1 -1
  55. package/dist/{hook-responses-9Ywsqzzq.d.mts → hook-responses-DcapjzLb.d.mts} +1 -1
  56. package/dist/{index-C6aSnO8m.d.mts → index-9PUmCySn.d.mts} +587 -67
  57. package/dist/{index-BmilK-co2.d.mts → index-B6Kr3cxD2.d.mts} +245 -46
  58. package/dist/{index-BNzUyVwV.d.mts → index-BDDavX2S.d.mts} +2 -2
  59. package/dist/{index-DHnSLGP4.d.mts → index-BDzqNCXs.d.mts} +1 -1
  60. package/dist/{index-Wbd_syN2.d.mts → index-BTCodvXA.d.mts} +41 -36
  61. package/dist/{index-B0VO0rAl.d.mts → index-Bo3LRb2u.d.mts} +1 -1
  62. package/dist/{index-Dg11JxKZ.d.mts → index-BwccWakG.d.mts} +1 -1
  63. package/dist/{index-DHH-93YD.d.mts → index-BxTM9lY0.d.mts} +3 -3
  64. package/dist/{index-CDud4NAm.d.mts → index-CAYbui7g.d.mts} +28 -21
  65. package/dist/{index-CPRQ4dWX.d.mts → index-CBixkF0n.d.mts} +12 -0
  66. package/dist/{index-C146Eq_J.d.mts → index-CXH1Bk0W.d.mts} +3 -3
  67. package/dist/{index-BmevAPME2.d.mts → index-Cbv_3Xi12.d.mts} +1 -1
  68. package/dist/{index-DWBkiiXH.d.mts → index-CfJKwWJa.d.mts} +1 -1
  69. package/dist/{index-B0yMCJW8.d.mts → index-CgqEyk9R.d.mts} +1 -1
  70. package/dist/{index-DI2lS7VT.d.mts → index-CnGHGFMC.d.mts} +13 -13
  71. package/dist/{index-B_8bA2JW.d.mts → index-DEpAI8CY.d.mts} +1 -1
  72. package/dist/{index-CIEycZrt.d.mts → index-DIhkK4Y0.d.mts} +1 -1
  73. package/dist/{index-DNI6UF9h.d.mts → index-Df9L5wwp.d.mts} +10 -10
  74. package/dist/{index-Bqk0pJBQ2.d.mts → index-DrO6QLwf2.d.mts} +1 -1
  75. package/dist/{index-DXtQRehh.d.mts → index-DsjUnKyr.d.mts} +1 -1
  76. package/dist/{index-Cny5RvjO.d.mts → index-J-kv32zv.d.mts} +2 -2
  77. package/dist/{index-CmwAJ8-5.d.mts → index-QJW9g1mG.d.mts} +1 -1
  78. package/dist/kernel/cli/index.d.mts +2 -2
  79. package/dist/kernel/cli/register.d.mts +1 -1
  80. package/dist/kernel/extension/index.d.mts +1 -1
  81. package/dist/kernel/index.d.mts +5 -5
  82. package/dist/kernel/namespace/index.d.mts +1 -1
  83. package/dist/kernel/observability/index.d.mts +1 -1
  84. package/dist/kernel/providers/index.d.mts +1 -1
  85. package/dist/kernel/window/index.d.mts +1 -1
  86. package/dist/{lib-Cm-uEoC1.mjs → lib-271rPR7A.mjs} +1 -1
  87. package/dist/{lib-BpGvHZye.mjs → lib-RFpLjUda.mjs} +1 -1
  88. package/dist/{load-extensions-BQoXaHhR.d.mts → load-extensions-CY8ELnCp.d.mts} +1 -1
  89. package/dist/{load-extensions-DG5LvPyM.mjs → load-extensions-D9inWcDy.mjs} +1 -1
  90. package/dist/{namespace-K23m4b0n.d.mts → namespace-BkOvOAU5.d.mts} +6 -6
  91. package/dist/node/bus-server/index.d.mts +1 -1
  92. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  93. package/dist/node/transports/index.d.mts +56 -16
  94. package/dist/node/transports/index.mjs +2 -2
  95. package/dist/package-DEYXB80d.mjs +7 -0
  96. package/dist/{package-efR90JGe.d.mts → package-eOEt1w6u.d.mts} +498 -17
  97. package/dist/package.json +1 -1
  98. package/dist/rules/index.d.mts +1 -1
  99. package/dist/rules/schemas.d.mts +1 -1
  100. package/dist/runtime-bun/index.mjs +1 -1
  101. package/dist/runtime-node/code-execution/index.d.mts +2 -2
  102. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  103. package/dist/runtime-node/extension-validation.d.mts +1 -1
  104. package/dist/runtime-node/extension-validation.mjs +1 -1
  105. package/dist/runtime-node/index.d.mts +6 -6
  106. package/dist/runtime-node/index.mjs +24 -24
  107. package/dist/runtime-node/makaio-config.d.mts +1 -1
  108. package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
  109. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  110. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  111. package/dist/runtime-node/workflow-worker/worker-entry.d.mts +69 -9
  112. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  113. package/dist/schemas-CeHU889f.mjs +1 -0
  114. package/dist/{schemas-BCXvEWyF.d.mts → schemas-DqnA42bw.d.mts} +4 -4
  115. package/dist/{schemas-D7EeKBDJ.d.mts → schemas-DuJs6Iqj.d.mts} +4 -4
  116. package/dist/scoped-bus-DwVrmi_1.mjs +1 -0
  117. package/dist/services/adapter-runtime/index.d.mts +3 -3
  118. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  119. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  120. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  121. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  122. package/dist/services/agent-runtime/index.d.mts +2 -2
  123. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  124. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  125. package/dist/services/capability/index.d.mts +2 -2
  126. package/dist/services/code-execution/index.d.mts +1 -1
  127. package/dist/services/codebase/index.d.mts +2 -2
  128. package/dist/services/codebase/namespace.d.mts +1 -1
  129. package/dist/services/codebase/schemas.d.mts +1 -1
  130. package/dist/services/compression/index.d.mts +2 -2
  131. package/dist/services/compression/namespace.d.mts +1 -1
  132. package/dist/services/compression/schemas.d.mts +1 -1
  133. package/dist/services/context-rules/index.d.mts +1 -1
  134. package/dist/services/execution-target/index.d.mts +3 -3
  135. package/dist/services/execution-target/index.mjs +1 -1
  136. package/dist/services/execution-target/namespace.d.mts +1 -1
  137. package/dist/services/execution-target/namespace.mjs +1 -1
  138. package/dist/services/execution-target/schemas.d.mts +1 -1
  139. package/dist/services/execution-target/schemas.mjs +1 -1
  140. package/dist/services/filesystem/index.d.mts +1 -1
  141. package/dist/services/filesystem/namespace.d.mts +6 -6
  142. package/dist/services/filesystem/schemas.d.mts +3 -3
  143. package/dist/services/index.d.mts +48 -46
  144. package/dist/services/index.mjs +1 -1
  145. package/dist/services/log-import/browser.d.mts +2 -2
  146. package/dist/services/log-import/index.d.mts +2 -2
  147. package/dist/services/log-import/log-import.d.mts +1 -1
  148. package/dist/services/materialization/index.d.mts +1 -1
  149. package/dist/services/model-registry/index.d.mts +1 -1
  150. package/dist/services/preferences/index.d.mts +2 -2
  151. package/dist/services/preferences/schemas.d.mts +1 -1
  152. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  153. package/dist/services/provider-context/index.d.mts +1 -1
  154. package/dist/services/session/handlers/index.d.mts +1 -1
  155. package/dist/services/session/index.d.mts +9 -9
  156. package/dist/services/session/messages/namespace.d.mts +1 -1
  157. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  158. package/dist/services/session/session-events/namespace.d.mts +1 -1
  159. package/dist/services/session/storage/namespace.d.mts +1 -1
  160. package/dist/services/session/storage/schema.d.mts +1 -1
  161. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  162. package/dist/services/session/turns/namespace.d.mts +1 -1
  163. package/dist/services/session-editor/index.d.mts +1 -1
  164. package/dist/services/settings/index.d.mts +3 -3
  165. package/dist/services/settings/namespace.d.mts +4 -4
  166. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  167. package/dist/services/settings/storage/index.d.mts +3 -3
  168. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  169. package/dist/services/subagent/index.d.mts +1 -1
  170. package/dist/services/subagent-template/index.d.mts +2 -2
  171. package/dist/services/subagent-template/namespace.d.mts +1 -1
  172. package/dist/services/subagent-template/schemas.d.mts +1 -1
  173. package/dist/services/tool-approval/index.d.mts +1 -1
  174. package/dist/services/tools/index.d.mts +1 -1
  175. package/dist/services/tray-menu/index.d.mts +3 -3
  176. package/dist/services/tray-menu/namespace.d.mts +1 -1
  177. package/dist/services/tray-menu/schemas.d.mts +1 -1
  178. package/dist/services/turn/index.d.mts +1 -1
  179. package/dist/services/turn/namespace.d.mts +1 -1
  180. package/dist/services/workflow-transitions/index.d.mts +1 -1
  181. package/dist/{src-BmSQ3rlz.mjs → src-DEgV239R.mjs} +1 -1
  182. package/dist/storage/drizzle/client.d.mts +1 -1
  183. package/dist/storage/drizzle/index.d.mts +1 -1
  184. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  185. package/dist/storage/handlers/index.d.mts +1 -1
  186. package/dist/{transition-D3zUBTPc.d.mts → transition-BB138WkK.d.mts} +2 -2
  187. package/dist/{types-DcxBYlPA.d.mts → types-CR23FzmK.d.mts} +3 -3
  188. package/dist/{types-CtDGkyLx2.d.mts → types-p55qvq922.d.mts} +1 -1
  189. package/dist/ui-kernel/index.d.mts +1 -1
  190. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  191. package/dist/{view-builder-B0j9p5C0.d.mts → view-builder-qIGQrZfs.d.mts} +1 -1
  192. package/dist/worker-DPTYFyNP.mjs +1 -0
  193. package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -2
  194. package/dist/workflow-engine/execution-attempt-repository.mjs +1 -1
  195. package/dist/workflow-engine/index.d.mts +396 -177
  196. package/dist/workflow-engine/index.mjs +1 -1
  197. package/dist/workflow-engine/package.d.mts +1 -1
  198. package/dist/workflow-engine/package.mjs +1 -1
  199. package/dist/workflow-engine/provider-operation.d.mts +1 -1
  200. package/dist/workflow-engine/testing/conformance.d.mts +85 -0
  201. package/dist/workflow-engine/testing/conformance.mjs +1 -0
  202. package/dist/workflow-engine/testing/index.d.mts +63 -4
  203. package/dist/workflow-engine/testing/index.mjs +1 -1
  204. package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
  205. package/dist/workflow-engine/testing/sqlite.mjs +136 -39
  206. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  207. package/dist/workflow-worker-BW3CE0YG.mjs +2 -0
  208. package/package.json +13 -1
  209. package/dist/attempt-record-codec-dC9LSFUE.mjs +0 -1
  210. package/dist/authority-state-bootstrap-eitx6Ukn.mjs +0 -1
  211. package/dist/await-trigger-Bkg2BQfg.mjs +0 -1
  212. package/dist/bus-D6NoBhIV.mjs +0 -2
  213. package/dist/bus-UgFdHybD.mjs +0 -1
  214. package/dist/package-Cgjpm9om.mjs +0 -7
  215. package/dist/schemas-TK29KWx-.mjs +0 -1
  216. package/dist/scoped-bus-DoPmCJeM.mjs +0 -1
  217. package/dist/worker-CARV52hT.mjs +0 -1
  218. package/dist/workflow-worker-Dul-wcOR.mjs +0 -1
  219. /package/dist/{adapter-binding-CATvmGuz.d.mts → adapter-binding-D68U_Hmh.d.mts} +0 -0
  220. /package/dist/{base-orchestrator-B4YW6z_Q.d.mts → base-orchestrator-DA95InJU.d.mts} +0 -0
  221. /package/dist/{capability-service-BW1-teFU.d.mts → capability-service-s4ZYSEWc.d.mts} +0 -0
  222. /package/dist/{client-binary-version-verifier-lcv83Hq3.d.mts → client-binary-version-verifier-kd9LP9AQ.d.mts} +0 -0
  223. /package/dist/{client-BG0WX5Vz.d.mts → client-f5A-6La5.d.mts} +0 -0
  224. /package/dist/{clients-namespace-DLAjOTTb.d.mts → clients-namespace-q4PqU1cA.d.mts} +0 -0
  225. /package/dist/{config-namespace-CH7sJZ4f.d.mts → config-namespace-Cp71zTT0.d.mts} +0 -0
  226. /package/dist/{create-static-mount-DxuixuLZ.mjs → create-static-mount-CmQgA0jq.mjs} +0 -0
  227. /package/dist/{definition-BrgzUuFk.d.mts → definition-BHSzhrUf.d.mts} +0 -0
  228. /package/dist/{extension-context-QmFuHdq5.d.mts → extension-context-BmU5XKjI.d.mts} +0 -0
  229. /package/dist/{extension-discovery-Dhu3WplO.d.mts → extension-discovery-DnO7bINK.d.mts} +0 -0
  230. /package/dist/{filesystem-service-ZJ43SbBi.d.mts → filesystem-service-BBArEDPL.d.mts} +0 -0
  231. /package/dist/{index-BC-6qNeo.d.mts → index-B-zl-O-Y.d.mts} +0 -0
  232. /package/dist/{index-BfV8U4XX.d.mts → index-BB0HypzC.d.mts} +0 -0
  233. /package/dist/{index-8y4hT9WL.d.mts → index-Bf2MgOni.d.mts} +0 -0
  234. /package/dist/{index-6trZYnUP2.d.mts → index-BhOMZWZa2.d.mts} +0 -0
  235. /package/dist/{index-BkbnC65b.d.mts → index-C-cnB1Te.d.mts} +0 -0
  236. /package/dist/{index-B4svZC6L.d.mts → index-C9xVZ-gt.d.mts} +0 -0
  237. /package/dist/{index-kzIjbrS02.d.mts → index-CDLf3Fka2.d.mts} +0 -0
  238. /package/dist/{index-jxPncqWZ2.d.mts → index-COOM1j_L2.d.mts} +0 -0
  239. /package/dist/{index-BuMsrli0.d.mts → index-CPWBGotQ.d.mts} +0 -0
  240. /package/dist/{index-pvX-BIpr2.d.mts → index-CcrXttC02.d.mts} +0 -0
  241. /package/dist/{index-B5dP8rj6.d.mts → index-CkpR5sIH.d.mts} +0 -0
  242. /package/dist/{index-CmbkCxj-.d.mts → index-Co1da7YK.d.mts} +0 -0
  243. /package/dist/{index-VzLAV0Yt.d.mts → index-CrcfeFOo.d.mts} +0 -0
  244. /package/dist/{index-BM56936c.d.mts → index-CsFN2nv7.d.mts} +0 -0
  245. /package/dist/{index-CVpaGijY.d.mts → index-D-JbTXIH.d.mts} +0 -0
  246. /package/dist/{index-B-3I98nw.d.mts → index-D6RMsZko.d.mts} +0 -0
  247. /package/dist/{index-l01zsChf.d.mts → index-D94yE5Dr.d.mts} +0 -0
  248. /package/dist/{index-D037TVsm.d.mts → index-DQD2-jcL.d.mts} +0 -0
  249. /package/dist/{index-D8D-yibS2.d.mts → index-DSLTgc7h2.d.mts} +0 -0
  250. /package/dist/{index-CL0Jo1b92.d.mts → index-DSN2t48K.d.mts} +0 -0
  251. /package/dist/{index-DQ8o3JGi.d.mts → index-DW4SE_sH.d.mts} +0 -0
  252. /package/dist/{index-DgspOUa72.d.mts → index-DYHxzwok2.d.mts} +0 -0
  253. /package/dist/{index-BMRB9yhF.d.mts → index-D_sMzTvv.d.mts} +0 -0
  254. /package/dist/{index-BFWvT0NG.d.mts → index-Df1c_2PF.d.mts} +0 -0
  255. /package/dist/{index-B2Y1Wvbh.d.mts → index-Dn_SGTgp.d.mts} +0 -0
  256. /package/dist/{index-C4V8Pmi4.d.mts → index-KAAnSRZt.d.mts} +0 -0
  257. /package/dist/{index-Ek4y8M9J2.d.mts → index-NhW2h2wH2.d.mts} +0 -0
  258. /package/dist/{index-CqdMbYmR.d.mts → index-mK-rgiit.d.mts} +0 -0
  259. /package/dist/{index-BTEJfzjE.d.mts → index-xaBSwHxJ.d.mts} +0 -0
  260. /package/dist/{json-value-DPqb-SJ8.d.mts → json-value-pX6xnLGw.d.mts} +0 -0
  261. /package/dist/{jsonl-transport-Cyyh5Wje.mjs → jsonl-transport-DQIlRX_y.mjs} +0 -0
  262. /package/dist/{lib-BqV8hYtk.mjs → lib-6eNAiNK7.mjs} +0 -0
  263. /package/dist/{namespace-DknCutQZ.d.mts → namespace-2qvc6E2Y.d.mts} +0 -0
  264. /package/dist/{namespace-DBO1OzYB.d.mts → namespace-9ychTEk_.d.mts} +0 -0
  265. /package/dist/{namespace-CVFaZv8x.d.mts → namespace-BGDq7HmW.d.mts} +0 -0
  266. /package/dist/{namespace-BUYDmd0r.d.mts → namespace-CPR2xem0.d.mts} +0 -0
  267. /package/dist/{namespace-CPG6u60N.d.mts → namespace-CQEYu8az.d.mts} +0 -0
  268. /package/dist/{namespace-DqZweTbX.d.mts → namespace-CVg_cpkh.d.mts} +0 -0
  269. /package/dist/{namespace-DOezqDti.d.mts → namespace-CirognbA.d.mts} +0 -0
  270. /package/dist/{namespace-l-HG1rLF.d.mts → namespace-Cs-cOyrn.d.mts} +0 -0
  271. /package/dist/{namespace-BNp7n_gu.d.mts → namespace-CxXNlHpn.d.mts} +0 -0
  272. /package/dist/{namespace-BdAK0lD8.d.mts → namespace-DAINF1II.d.mts} +0 -0
  273. /package/dist/{namespace-B0ftHlK3.d.mts → namespace-DG0hjPcx.d.mts} +0 -0
  274. /package/dist/{namespace-BRuHzhPo.d.mts → namespace-DokogwAZ.d.mts} +0 -0
  275. /package/dist/{namespace-BGRHcrmp.d.mts → namespace-DykqxEyX.d.mts} +0 -0
  276. /package/dist/{orchestrator-shared-CNHSImNY.d.mts → orchestrator-shared-BzqqcY2z.d.mts} +0 -0
  277. /package/dist/{packages-CxPMEg8D.d.mts → packages-Cx-BwSZr.d.mts} +0 -0
  278. /package/dist/{provider-operation-DbdyFwNm.d.mts → provider-operation-B2wQST6N.d.mts} +0 -0
  279. /package/dist/{providers-namespace-CfZKp-C0.d.mts → providers-namespace-DsKTnuO1.d.mts} +0 -0
  280. /package/dist/{schema-B3Pf7JP7.d.mts → schema-zSyY22Ck.d.mts} +0 -0
  281. /package/dist/{schemas-ChmQldVH.d.mts → schemas--LAbwXvw.d.mts} +0 -0
  282. /package/dist/{schemas-CF8QwRqt.d.mts → schemas-Bk50UoMA.d.mts} +0 -0
  283. /package/dist/{schemas-bfZNpl0B.d.mts → schemas-CHRuwe18.d.mts} +0 -0
  284. /package/dist/{schemas-D7ScxLrf.d.mts → schemas-ClGDFa44.d.mts} +0 -0
  285. /package/dist/{schemas-BGvkTiCx.d.mts → schemas-CzGN0eqW.d.mts} +0 -0
  286. /package/dist/{schemas-C1mxTfd7.d.mts → schemas-D0_kfoDf.d.mts} +0 -0
  287. /package/dist/{schemas-Pe892GgN.d.mts → schemas-DmULJ7Jk.d.mts} +0 -0
  288. /package/dist/{schemas-B50oWBuj.d.mts → schemas-Dn1JDTPw.d.mts} +0 -0
  289. /package/dist/{schemas-B6Q-qdmn.d.mts → schemas-Dxvjq-Bi.d.mts} +0 -0
  290. /package/dist/{server-lifecycle-L8zja8t8.d.mts → server-lifecycle-WFZcCMwF.d.mts} +0 -0
  291. /package/dist/{session-lineage-bUkd3fqx.d.mts → session-lineage-C9kppcCa.d.mts} +0 -0
  292. /package/dist/{src-BacfeiI4.mjs → src-DIyWekjW.mjs} +0 -0
  293. /package/dist/{storage-namespace-YmE8XCCL.d.mts → storage-namespace-BWU-8rvj.d.mts} +0 -0
  294. /package/dist/{storage-namespace-definition-BsnYAPot.d.mts → storage-namespace-definition-B-8JKvzm.d.mts} +0 -0
  295. /package/dist/{types-DdpSEmTO.d.mts → types-8rMNe3AS.d.mts} +0 -0
  296. /package/dist/{types-DnK6Wa_Y.d.mts → types-BFeWU3WM.d.mts} +0 -0
  297. /package/dist/{types-tyv0B605.d.mts → types-BnPJa-C_.d.mts} +0 -0
  298. /package/dist/{types-OKJCOjme.d.mts → types-DQTCNM2i.d.mts} +0 -0
  299. /package/dist/{types-BlB23n4f.d.mts → types-DxHeL0pF.d.mts} +0 -0
  300. /package/dist/{window-registry-Pcf35cac.d.mts → window-registry-DQP5P2_0.d.mts} +0 -0
@@ -1,8 +1,9 @@
1
- import { l as ProviderOperationOwnershipRecord, o as ProviderOperationClaimDecision, s as ProviderOperationMutationDecision } from "./provider-operation-DbdyFwNm.mjs";
2
- import { A as RecordProviderOperationUncertaintyInput, C as PendingAttemptAbandonmentDecision, D as RecordAllocationInput, E as ProvisioningClaimDecision, F as TakeOverProviderOperationInput, M as RecordProvisioningAbsentInput, N as RecoverableAttemptRecord, O as RecordAllocationTerminatedInput, P as RenewProviderOperationClaimInput, T as ProvisioningAbsenceDecision, a as BeginProvisioningInput, b as HandoffProviderOperationInput, c as DurableOutcome, g as ExecutionAttemptRepository, i as AllocationTerminationDecision, j as RecordProvisionerIncarnationLostInput, k as RecordInfrastructureFailureInput, m as ExecutionAttemptRecord, n as AllocationRefEvolution, o as DiscoveredAllocationDecision, p as ExecutionAttemptOutcomeDecision, r as AllocationRefEvolutionDecision, t as AllocationRecordingDecision, w as ProvisionerIncarnationLossDecision, x as InfrastructureFailureDecision, y as ExecutionOwnerId } from "./execution-attempt-repository-DY4KTptE.mjs";
1
+ import { l as ProviderOperationOwnershipRecord, o as ProviderOperationClaimDecision, s as ProviderOperationMutationDecision } from "./provider-operation-B2wQST6N.mjs";
2
+ import { $ as RuntimeReadinessDecision, A as MarkRuntimeReadyInput, B as ReadBootstrapStartStateInput, C as ExecutionAttemptRepository, D as GetInstructionInput, E as ExecutionOwnerId, F as PendingAttemptAbandonmentDecision, G as RecordProvisionerIncarnationLostInput, H as RecordAllocationTerminatedInput, J as RegisterRuntimeInput, K as RecordProvisioningAbsentInput, L as ProvisionerIncarnationLossDecision, M as OperationCompletionDecision, N as OperationReportDecision, O as HandoffProviderOperationInput, P as OutcomeCodec, R as ProvisioningAbsenceDecision, U as RecordInfrastructureFailureInput, V as RecordAllocationInput, W as RecordProviderOperationUncertaintyInput, X as ReportOperationInput, Y as RenewProviderOperationClaimInput, Z as RuntimeOutcomeFence, a as AllocationRefEvolutionDecision, b as ExecutionAttemptOutcomeDecision, et as RuntimeRegistrationDecision, f as CompleteOperationInput, h as DurableOutcome, i as AllocationRefEvolution, j as OperationAdmissionDecision, k as InfrastructureFailureDecision, n as AdmitOperationInput, o as AllocationTerminationDecision, p as DiscoveredAllocationDecision, q as RecoverableAttemptRecord, r as AllocationRecordingDecision, s as AttemptControlState, tt as TakeOverProviderOperationInput, u as BeginProvisioningInput, x as ExecutionAttemptRecord, z as ProvisioningClaimDecision } from "./execution-attempt-repository-OryBjQQI.mjs";
3
+ import { z } from "zod";
3
4
  import { IMakaioBus } from "@makaio/framework/bus";
4
5
  import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
5
- import { IWorkflowRunner, LoopGateHandler, MakaioNodeExtension, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, WorkerMaterializationSpec, WorkflowDefinition, WorkflowExecution, WorkflowRunContext, WorkflowRunResult } from "@makaio/framework/contracts";
6
+ import { ExecutionAttemptBootstrapAwaitStartResponse, ExecutionAttemptInstruction, ExecutionAttemptOutcome, IWorkflowRunner, LoopGateHandler, MakaioNodeExtension, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, WorkerMaterializationSpec, WorkflowDefinition, WorkflowExecution, WorkflowRunContext, WorkflowRunResult } from "@makaio/framework/contracts";
6
7
  import { BaseService } from "@makaio/framework/service-base";
7
8
  import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
8
9
  import { AutomationTriggerBindingRuntime } from "@makaio/framework/services/automation-trigger";
@@ -83,6 +84,24 @@ interface WorkflowMaterializationSpecResolver {
83
84
  resolve(input: WorkflowMaterializationSpecResolution): Promise<WorkerMaterializationSpec | undefined>;
84
85
  }
85
86
  //#endregion
87
+ //#region subsystems/workflow-engine/src/bootstrap-start.d.ts
88
+ /** A single bounded observation, not a new bootstrap budget. */
89
+ interface BootstrapStartOptions {
90
+ /** Request cancellation or owner shutdown. */
91
+ readonly signal: AbortSignal;
92
+ /** Absolute request deadline in Unix milliseconds. */
93
+ readonly deadline: number;
94
+ }
95
+ /** Start authorization shared by credential ingress and authenticated runtime ingress. */
96
+ interface BootstrapStartAuthority {
97
+ /**
98
+ * Observe the durable allocation before entering runtime registration.
99
+ * @param identity - Trusted owner and attempt identity.
100
+ * @param options - Cancellation and the current request's deadline.
101
+ */
102
+ awaitBootstrapStart(identity: ReadBootstrapStartStateInput, options: BootstrapStartOptions): Promise<ExecutionAttemptBootstrapAwaitStartResponse>;
103
+ }
104
+ //#endregion
86
105
  //#region subsystems/workflow-engine/src/execution-attempt-authority.d.ts
87
106
  /**
88
107
  * Execution attempt Authority service.
@@ -113,8 +132,9 @@ interface WorkflowMaterializationSpecResolver {
113
132
  * are lost on crash; the host recovery coordinator owns recovery decisions.
114
133
  * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
115
134
  */
116
- declare class ExecutionAttemptAuthority<TOutcome> {
135
+ declare class ExecutionAttemptAuthority<TOutcome> implements BootstrapStartAuthority {
117
136
  private readonly repository;
137
+ private readonly bootstrapTimeoutMs;
118
138
  /**
119
139
  * In-process waiters keyed by `executionAttemptId`.
120
140
  *
@@ -125,17 +145,40 @@ declare class ExecutionAttemptAuthority<TOutcome> {
125
145
  private readonly waiters;
126
146
  /**
127
147
  * @param repository - Injected durable attempt persistence port.
148
+ * @param options - Explicit host-owned bootstrap budget frozen when each attempt is created.
149
+ */
150
+ constructor(repository: ExecutionAttemptRepository<TOutcome>, options: {
151
+ readonly bootstrapTimeoutMs: number;
152
+ });
153
+ /**
154
+ * Wait for durable allocation without registering or admitting a Runtime.
155
+ * @param identity - Trusted owner and attempt identity.
156
+ * @param options - Request cancellation and absolute deadline.
157
+ * @returns A bounded, renewable start decision.
128
158
  */
129
- constructor(repository: ExecutionAttemptRepository<TOutcome>);
159
+ awaitBootstrapStart(identity: ReadBootstrapStartStateInput, options: BootstrapStartOptions): Promise<ExecutionAttemptBootstrapAwaitStartResponse>;
130
160
  /**
131
161
  * Create a new execution attempt with an Authority-generated ID.
132
162
  *
133
163
  * Persists the attempt through the repository and installs an in-process
134
164
  * waiter for the committed outcome. Must be called before dispatch.
135
165
  * @param executionId - Owner identifier the attempt belongs to.
166
+ * @param instruction - Portable immutable assignment to snapshot before dispatch.
136
167
  * @returns The persisted attempt record.
137
168
  */
138
- createAttempt(executionId: ExecutionOwnerId): Promise<ExecutionAttemptRecord>;
169
+ createAttempt(executionId: ExecutionOwnerId, instruction: ExecutionAttemptInstruction): Promise<ExecutionAttemptRecord>;
170
+ /**
171
+ * Read this attempt's frozen assignment through the owner-scoped repository port.
172
+ * @param input - Attempt and trusted owner identity.
173
+ * @returns The stored assignment, or null for an owner mismatch or missing attempt.
174
+ */
175
+ getInstruction(input: GetInstructionInput): Promise<ExecutionAttemptInstruction | null>;
176
+ /**
177
+ * Accept successful Preparation without settling the attempt's outcome waiter.
178
+ * @param input - Preparation result, operation correlation and trusted owner identity.
179
+ * @returns The repository's durable acceptance, replay or refusal.
180
+ */
181
+ reportOperation(input: ReportOperationInput): Promise<OperationReportDecision>;
139
182
  /**
140
183
  * Claim durable ownership of provider provisioning for an active attempt.
141
184
  *
@@ -219,6 +262,54 @@ declare class ExecutionAttemptAuthority<TOutcome> {
219
262
  * @returns The durable termination decision.
220
263
  */
221
264
  recordAllocationTerminated(input: RecordAllocationTerminatedInput): Promise<AllocationTerminationDecision>;
265
+ /**
266
+ * Register a runtime incarnation as an attempt's endpoint.
267
+ *
268
+ * Delegates directly to the repository, which allocates the generation. No
269
+ * waiter changes: registering an endpoint says nothing about the attempt's
270
+ * canonical answer, and a refusal is a statement about the runtime rather
271
+ * than about the outcome anybody is waiting for.
272
+ * @param input - Attempt identity, owning execution, and the runtime incarnation.
273
+ * @returns The durable registration decision.
274
+ */
275
+ registerRuntime(input: RegisterRuntimeInput): Promise<RuntimeRegistrationDecision>;
276
+ /**
277
+ * Admit one operation through an attempt's start gate.
278
+ *
279
+ * Delegates directly to the repository, which mints the operation identifier
280
+ * and enforces the at-most-one guard.
281
+ * @param input - Attempt identity, owning execution, kind, idempotency key, and fence.
282
+ * @returns The durable admission decision.
283
+ */
284
+ admitOperation(input: AdmitOperationInput): Promise<OperationAdmissionDecision>;
285
+ /**
286
+ * Release the attempt's active operation.
287
+ *
288
+ * Delegates directly to the repository. A completed operation is not a
289
+ * canonical answer, so the waiter stays pending: what settles an attempt is
290
+ * a committed outcome or a terminal transition, never a freed slot.
291
+ * @param input - Attempt identity, the operation being completed, and its fence.
292
+ * @returns The durable completion decision.
293
+ */
294
+ completeOperation(input: CompleteOperationInput): Promise<OperationCompletionDecision>;
295
+ /**
296
+ * Record that a registered runtime proved itself ready.
297
+ *
298
+ * Delegates directly to the repository.
299
+ * @param input - Attempt identity, the generation the proof belongs to, and when it was observed.
300
+ * @returns The durable readiness decision.
301
+ */
302
+ markRuntimeReady(input: MarkRuntimeReadyInput): Promise<RuntimeReadinessDecision>;
303
+ /**
304
+ * Read an attempt's runtime and operation control state.
305
+ *
306
+ * Delegates directly to the repository. Unfenced and regardless of status,
307
+ * because a process recovering its view of an attempt needs exactly the
308
+ * superseded and settled ones too.
309
+ * @param executionAttemptId - Attempt whose control state to read.
310
+ * @returns The control state, or `null` when no such attempt exists.
311
+ */
312
+ getAttemptControlState(executionAttemptId: string): Promise<AttemptControlState | null>;
222
313
  /**
223
314
  * Retrieve the active attempt for a given execution.
224
315
  *
@@ -267,9 +358,10 @@ declare class ExecutionAttemptAuthority<TOutcome> {
267
358
  * @param executionAttemptId - The attempt submitting the outcome.
268
359
  * @param executionId - Owner identifier the attempt belongs to.
269
360
  * @param result - The rendering to commit, from {@link canonicalizeOutcome}.
361
+ * @param runtimeFence - Runtime slot that must remain current for a fresh commit.
270
362
  * @returns The durable decision with the canonical outcome when applicable.
271
363
  */
272
- commitOutcome(executionAttemptId: string, executionId: ExecutionOwnerId, result: DurableOutcome<TOutcome>): Promise<ExecutionAttemptOutcomeDecision<TOutcome>>;
364
+ commitOutcome(executionAttemptId: string, executionId: ExecutionOwnerId, result: DurableOutcome<TOutcome>, runtimeFence?: RuntimeOutcomeFence): Promise<ExecutionAttemptOutcomeDecision<TOutcome>>;
273
365
  /**
274
366
  * Obtain the in-process promise for a committed outcome.
275
367
  *
@@ -408,6 +500,371 @@ declare class ExecutionAttemptAuthority<TOutcome> {
408
500
  private settleWaiterInternal;
409
501
  }
410
502
  //#endregion
503
+ //#region subsystems/workflow-engine/src/outcome-convergence.d.ts
504
+ /**
505
+ * Input handed to {@link OutcomeConvergence.converge}.
506
+ *
507
+ * Named rather than inlined so an owner-side realization can state the shape
508
+ * it implements against, and so a consumer can pin it from the public surface.
509
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
510
+ */
511
+ interface OutcomeConvergenceInput<TOutcome> {
512
+ /** Owner identifier the attempt belongs to. */
513
+ readonly executionId: ExecutionOwnerId;
514
+ /** Authority-created attempt identifier. */
515
+ readonly executionAttemptId: string;
516
+ /** The canonical committed outcome, never the submitter's copy of it. */
517
+ readonly outcome: TOutcome;
518
+ /** The durable decision that produced the committed outcome. */
519
+ readonly decision: 'accepted' | 'duplicate';
520
+ }
521
+ /**
522
+ * Owner-side convergence of a committed attempt outcome.
523
+ *
524
+ * Runs after the durable commit and before waiter settlement and ACK. It is
525
+ * idempotent by contract: it is re-entered for every duplicate retry, because
526
+ * a worker whose first submission committed but did not converge resubmits
527
+ * the same outcome, receives `duplicate`, and must converge again.
528
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
529
+ */
530
+ interface OutcomeConvergence<TOutcome> {
531
+ /**
532
+ * Converge owner state with the committed outcome.
533
+ * @param input - Attempt identity, the canonical committed outcome, and the
534
+ * durable decision that produced it.
535
+ */
536
+ converge(input: OutcomeConvergenceInput<TOutcome>): Promise<void>;
537
+ }
538
+ /**
539
+ * Owner-side validation that runs before the durable commit.
540
+ *
541
+ * Performs reads only: an outcome it rejects never becomes an immutable
542
+ * attempt outcome, so a corrected retry is not answered as a conflict. What
543
+ * it inspects is the canonical outcome the attempt will hold, obtained from
544
+ * `ExecutionAttemptAuthority.canonicalizeOutcome` before the commit.
545
+ *
546
+ * **A realization must be retry-stable.** {@link submitAttemptOutcome} runs it
547
+ * ahead of every commit, including the retry of a submission that already
548
+ * committed, so its verdict may depend only on the submission itself and on
549
+ * owner facts no convergence step rewrites — never on owner state convergence
550
+ * moves forward. A validator that read, say, a mutable lifecycle status would
551
+ * reject the identical retry of an outcome its own convergence already
552
+ * committed, and the waiter for that outcome would never settle.
553
+ *
554
+ * Retry-stable is measured on the outcome, not on its text. A retry need not
555
+ * render the same text as the first commit: `sameDurableOutcome` judges
556
+ * two texts the same outcome whatever member order they carry and answers
557
+ * `duplicate` for such a retry, while the validator sees the retry's own
558
+ * canonical rendering, never the stored one. Its verdict may therefore turn
559
+ * only on what `sameDurableOutcome` compares — the members and their values
560
+ * — and never on member order or any other detail of one particular
561
+ * rendering. A validator that keyed on which member comes first would reject
562
+ * the retry the repository is about to report as `duplicate`, and the
563
+ * committed-but-unconverged waiter could never recover. Validating the stored
564
+ * representation instead is not an option, for the reason the next paragraph
565
+ * gives: validation runs ahead of the commit, where the retry's rendering is
566
+ * the only one there is.
567
+ *
568
+ * The rule is stated here rather than worked around downstream because the
569
+ * order it constrains is the one that keeps a spoofed outcome out of durable
570
+ * storage: validation cannot move behind the commit without committing what
571
+ * it exists to reject. The workflow adapter's `validateOutcomeExecutionIdentity`
572
+ * satisfies it by correlating the submitted result against immutable durable
573
+ * identity — the execution's own id and workflow id, and the run context's
574
+ * terminal-authority binding, none of which outcome convergence touches.
575
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
576
+ */
577
+ interface OutcomePreCommitValidation<TOutcome> {
578
+ /**
579
+ * Validate an outcome against owner state.
580
+ *
581
+ * Called again for every retry of the same submission, so the same outcome
582
+ * owes the same verdict — the same as `sameDurableOutcome` reads it,
583
+ * which ignores member order and every other rendering detail, not the
584
+ * same text.
585
+ *
586
+ * The outcome handed over is the canonical one — what the attempt will
587
+ * hold and what {@link OutcomeConvergence.converge} will receive — not the
588
+ * submitter's copy of it. A codec may normalize while serializing, so
589
+ * validating the copy would let an outcome the validator would have
590
+ * rejected become the immutable committed one.
591
+ * @param executionId - Owner identifier the attempt belongs to.
592
+ * @param outcome - Canonical outcome about to be committed.
593
+ * @throws When the outcome must not be committed.
594
+ */
595
+ validate(executionId: ExecutionOwnerId, outcome: TOutcome): Promise<void>;
596
+ }
597
+ /**
598
+ * Dependencies of {@link submitAttemptOutcome}.
599
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
600
+ */
601
+ interface AttemptOutcomeSubmissionDeps<TOutcome> {
602
+ /** Authority that commits the outcome and holds the in-process waiter. */
603
+ readonly authority: ExecutionAttemptAuthority<TOutcome>;
604
+ /** Owner convergence that runs for `accepted` and `duplicate` decisions. */
605
+ readonly convergence: OutcomeConvergence<TOutcome>;
606
+ /** Optional owner validation that runs before the durable commit. */
607
+ readonly validation?: OutcomePreCommitValidation<TOutcome>;
608
+ }
609
+ /**
610
+ * Input of {@link submitAttemptOutcome}.
611
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
612
+ */
613
+ interface AttemptOutcomeSubmission<TOutcome> {
614
+ /** Owner identifier the attempt belongs to. */
615
+ readonly executionId: ExecutionOwnerId;
616
+ /** Authority-created attempt identifier. */
617
+ readonly executionAttemptId: string;
618
+ /** Outcome the worker submitted. */
619
+ readonly outcome: TOutcome;
620
+ /** Originating runtime slot, checked atomically at commit after owner validation. */
621
+ readonly runtimeFence?: RuntimeOutcomeFence;
622
+ }
623
+ /**
624
+ * Submit an attempt outcome through the generic owner boundary.
625
+ *
626
+ * Order: one canonicalization of the submitted outcome, optional pre-commit
627
+ * validation of that canonical value, durable commit of that same rendering
628
+ * through the authority, owner convergence for `accepted` and `duplicate`,
629
+ * then waiter settlement on a fresh decode of the text the decision reports
630
+ * as committed. The decision kind is returned for the caller's
631
+ * acknowledgement.
632
+ *
633
+ * Invariants this function keeps:
634
+ * - the submission is rendered exactly once, and the submitter's object is
635
+ * never read again after that: an outcome the caller mutates while an await
636
+ * is pending can reach neither the validation nor the durable write;
637
+ * - validation and convergence see one and the same value: the canonical
638
+ * outcome the attempt holds, never the submitter's copy of it;
639
+ * - convergence only ever sees `decision.outcome`, the repository's own
640
+ * committed object;
641
+ * - the waiter settles on a value decoded afresh from the text the attempt
642
+ * stores — the decision's own text, which for a `duplicate` is the first
643
+ * commit's rather than the retry's — so what a runner receives is the
644
+ * committed outcome even when convergence mutated the object it was handed;
645
+ * - a throwing convergence leaves the outcome durably committed and the
646
+ * waiter pending, so the worker's retry yields `duplicate` and converges
647
+ * again; nothing is rejected or deleted here. That recovery path runs the
648
+ * validation again first, which is why {@link OutcomePreCommitValidation}
649
+ * owes a retry-stable verdict;
650
+ * - `conflict` and `fenced` skip convergence and settlement; their waiter
651
+ * rejection already happened inside `ExecutionAttemptAuthority.commitOutcome`.
652
+ * @param deps - Authority, convergence, and optional validation.
653
+ * @param input - Attempt identity and submitted outcome.
654
+ * @returns The durable decision kind.
655
+ * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
656
+ */
657
+ declare function submitAttemptOutcome<TOutcome>(deps: AttemptOutcomeSubmissionDeps<TOutcome>, input: AttemptOutcomeSubmission<TOutcome>): Promise<'accepted' | 'duplicate' | 'conflict' | 'fenced'>;
658
+ //#endregion
659
+ //#region subsystems/workflow-engine/src/execution-attempt-handlers.d.ts
660
+ /** Owner-specific interpretation of a terminal report against its frozen assignment. */
661
+ interface AttemptOutcomeDecodingInput {
662
+ /** Immutable instruction stored when the Attempt was created. */
663
+ readonly instruction: ExecutionAttemptInstruction;
664
+ /** Technical failure or adapter-produced result reported by the Runtime. */
665
+ readonly outcome: ExecutionAttemptOutcome;
666
+ }
667
+ /** Dependencies for the generic instruction, Preparation, and outcome request handlers. */
668
+ interface ExecutionAttemptHandlersDeps<TOutcome> extends AttemptOutcomeSubmissionDeps<TOutcome> {
669
+ /**
670
+ * Decode against immutable assignment facts, not the owner's mutable current state.
671
+ * Must produce the same outcome for retries of the same report.
672
+ * @param input - Frozen instruction and terminal wire report.
673
+ * @returns The owner-specific outcome passed through canonical commit and convergence.
674
+ */
675
+ decodeOutcome(input: AttemptOutcomeDecodingInput): TOutcome | Promise<TOutcome>;
676
+ }
677
+ /**
678
+ * Register generic Runtime ingress; no Workflow result or owner lifecycle is assumed.
679
+ *
680
+ * Preparation acceptance and operation completion are one Authority write.
681
+ * Terminal reports commit, converge, settle the waiter, then receive their ACK.
682
+ * Local host code uses the typed Authority/submission ports directly; these wire
683
+ * handlers follow the same authenticated-peer rule as Runtime registration.
684
+ * @param bus - Bus that receives authenticated Runtime requests.
685
+ * @param deps - Authority and owner-side outcome adapter.
686
+ * @returns Cleanup function for all three handlers.
687
+ */
688
+ declare function registerExecutionAttemptHandlers<TOutcome>(bus: IMakaioBus, deps: ExecutionAttemptHandlersDeps<TOutcome>): () => void;
689
+ //#endregion
690
+ //#region subsystems/workflow-engine/src/workflow-attempt-outcome.d.ts
691
+ /** Technical failure retained as such rather than fabricated into a workflow-produced result. */
692
+ type WorkflowAttemptTechnicalFailure = Extract<ExecutionAttemptOutcome, {
693
+ kind: 'technical-failure';
694
+ }>;
695
+ /** Confirmed cooperative stop retained independently of a workflow-produced result. */
696
+ type WorkflowAttemptCancellation = Extract<ExecutionAttemptOutcome, {
697
+ kind: 'cancelled';
698
+ }>;
699
+ /** Canonical owner outcome: a workflow result, infrastructure failure, or confirmed cancellation. */
700
+ type WorkflowAttemptOutcome = WorkflowRunResult | WorkflowAttemptTechnicalFailure | WorkflowAttemptCancellation;
701
+ /** Production codec schema for workflow-owned Attempt outcomes. */
702
+ declare const WorkflowAttemptOutcomeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
703
+ executionId: z.ZodString;
704
+ workflowId: z.ZodString;
705
+ status: z.ZodLiteral<"completed">;
706
+ artifact: z.ZodOptional<z.ZodObject<{
707
+ kind: z.ZodString;
708
+ id: z.ZodString;
709
+ revision: z.ZodString;
710
+ scope: z.ZodObject<{
711
+ level: z.ZodString;
712
+ ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
713
+ }, z.core.$strip>;
714
+ schemaVersion: z.ZodString;
715
+ data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
716
+ relations: z.ZodArray<z.ZodObject<{
717
+ type: z.ZodString;
718
+ target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
719
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
720
+ kind: z.ZodString;
721
+ id: z.ZodString;
722
+ revision: z.ZodString;
723
+ }, z.core.$strip>, z.ZodObject<{
724
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
725
+ artifact: z.ZodObject<{
726
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
727
+ kind: z.ZodString;
728
+ id: z.ZodString;
729
+ revision: z.ZodString;
730
+ }, z.core.$strip>;
731
+ localId: z.ZodString;
732
+ }, z.core.$strip>, z.ZodObject<{
733
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
734
+ kind: z.ZodString;
735
+ id: z.ZodString;
736
+ revision: z.ZodOptional<z.ZodString>;
737
+ locator: z.ZodOptional<z.ZodString>;
738
+ }, z.core.$strip>], "refClass">>;
739
+ }, z.core.$strip>>;
740
+ confidence: z.ZodOptional<z.ZodObject<{
741
+ level: z.ZodEnum<{
742
+ inferred: "inferred";
743
+ confirmed: "confirmed";
744
+ assumed: "assumed";
745
+ stated: "stated";
746
+ verified: "verified";
747
+ }>;
748
+ basis: z.ZodArray<z.ZodObject<{
749
+ kind: z.ZodString;
750
+ actor: z.ZodObject<{
751
+ kind: z.ZodString;
752
+ id: z.ZodString;
753
+ displayName: z.ZodOptional<z.ZodString>;
754
+ }, z.core.$strip>;
755
+ timestamp: z.ZodNumber;
756
+ detail: z.ZodOptional<z.ZodString>;
757
+ evidenceRef: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
758
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
759
+ kind: z.ZodString;
760
+ id: z.ZodString;
761
+ revision: z.ZodString;
762
+ }, z.core.$strip>, z.ZodObject<{
763
+ refClass: z.ZodDefault<z.ZodLiteral<"local">>;
764
+ artifact: z.ZodObject<{
765
+ refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
766
+ kind: z.ZodString;
767
+ id: z.ZodString;
768
+ revision: z.ZodString;
769
+ }, z.core.$strip>;
770
+ localId: z.ZodString;
771
+ }, z.core.$strip>, z.ZodObject<{
772
+ refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
773
+ kind: z.ZodString;
774
+ id: z.ZodString;
775
+ revision: z.ZodOptional<z.ZodString>;
776
+ locator: z.ZodOptional<z.ZodString>;
777
+ }, z.core.$strip>], "refClass">>>;
778
+ }, z.core.$strip>>;
779
+ }, z.core.$strip>>;
780
+ representations: z.ZodOptional<z.ZodObject<{
781
+ markdown: z.ZodOptional<z.ZodString>;
782
+ summary: z.ZodOptional<z.ZodString>;
783
+ plaintext: z.ZodOptional<z.ZodString>;
784
+ }, z.core.$strip>>;
785
+ actor: z.ZodObject<{
786
+ kind: z.ZodString;
787
+ id: z.ZodString;
788
+ displayName: z.ZodOptional<z.ZodString>;
789
+ }, z.core.$strip>;
790
+ timestamp: z.ZodNumber;
791
+ createdAt: z.ZodOptional<z.ZodNumber>;
792
+ }, z.core.$strip>>;
793
+ }, z.core.$strict>, z.ZodObject<{
794
+ executionId: z.ZodString;
795
+ workflowId: z.ZodString;
796
+ status: z.ZodLiteral<"failed">;
797
+ error: z.ZodString;
798
+ }, z.core.$strict>, z.ZodObject<{
799
+ executionId: z.ZodString;
800
+ workflowId: z.ZodString;
801
+ status: z.ZodLiteral<"cancelled">;
802
+ reason: z.ZodOptional<z.ZodString>;
803
+ }, z.core.$strict>, z.ZodObject<{
804
+ executionId: z.ZodString;
805
+ workflowId: z.ZodString;
806
+ status: z.ZodLiteral<"paused">;
807
+ pausedAtGateId: z.ZodString;
808
+ pausedAtFrameId: z.ZodString;
809
+ }, z.core.$strict>], "status">, z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
810
+ kind: z.ZodLiteral<"technical-failure">;
811
+ stage: z.ZodEnum<{
812
+ startup: "startup";
813
+ "workspace-preparation": "workspace-preparation";
814
+ "workload-invocation": "workload-invocation";
815
+ }>;
816
+ message: z.ZodString;
817
+ }, z.core.$strict>, z.ZodObject<{
818
+ kind: z.ZodLiteral<"workload-result">;
819
+ result: z.ZodType<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue>>;
820
+ }, z.core.$strict>, z.ZodObject<{
821
+ kind: z.ZodLiteral<"cancelled">;
822
+ reason: z.ZodOptional<z.ZodString>;
823
+ }, z.core.$strict>], "kind">, z.ZodTransform<{
824
+ kind: "technical-failure";
825
+ stage: "startup" | "workspace-preparation" | "workload-invocation";
826
+ message: string;
827
+ } | {
828
+ kind: "cancelled";
829
+ reason?: string | undefined;
830
+ }, {
831
+ kind: "technical-failure";
832
+ stage: "startup" | "workspace-preparation" | "workload-invocation";
833
+ message: string;
834
+ } | {
835
+ kind: "workload-result";
836
+ result: _$_makaio_contracts0.JsonValue;
837
+ } | {
838
+ kind: "cancelled";
839
+ reason?: string | undefined;
840
+ }>>]>;
841
+ /** Durable workflow-owner codec; generic Attempt persistence does not interpret owner outcomes. */
842
+ declare const workflowAttemptOutcomeCodec: OutcomeCodec<WorkflowAttemptOutcome>;
843
+ /**
844
+ * Interpret a generic terminal report against its immutable workflow assignment.
845
+ * @param input - Frozen assignment and the Runtime's generic outcome report.
846
+ * @returns An owner-typed outcome to canonicalize, commit, and then converge.
847
+ */
848
+ declare function decodeWorkflowAttemptOutcome(input: AttemptOutcomeDecodingInput): WorkflowAttemptOutcome;
849
+ /** Workflow identity used to project an already-converged runtime outcome to a runner completion. */
850
+ interface CommittedWorkflowOutcomeIdentity {
851
+ /** Workflow execution whose state has already converged. */
852
+ readonly executionId: string;
853
+ /** Workflow definition that owns that execution. */
854
+ readonly workflowId: string;
855
+ }
856
+ /**
857
+ * Project an already committed and converged outcome for the workflow runner API.
858
+ *
859
+ * This is an owner status projection, not a result to submit or persist. A
860
+ * runtime outcome retains its own kind in Attempt storage; the WorkflowExecution
861
+ * has already converged before this helper is called.
862
+ * @param outcome - Canonical outcome returned after owner convergence.
863
+ * @param identity - Immutable identity of the converged workflow execution.
864
+ * @returns Workflow status used by the runner's authority-committed completion.
865
+ */
866
+ declare function toCommittedWorkflowRunnerResult(outcome: WorkflowAttemptOutcome, identity: CommittedWorkflowOutcomeIdentity): WorkflowRunResult;
867
+ //#endregion
411
868
  //#region subsystems/workflow-engine/src/workflow-executor.d.ts
412
869
  /**
413
870
  * Core workflow executor service.
@@ -420,11 +877,14 @@ declare class ExecutionAttemptAuthority<TOutcome> {
420
877
  * - Manages cancellation and cleanup
421
878
  */
422
879
  declare class WorkflowExecutor extends BaseService {
880
+ private readonly workflowRunner?;
881
+ private readonly executionAttemptAuthority?;
423
882
  /** Drizzle storage handler registration for the composition root. */
424
883
  static readonly storage: {
425
884
  readonly drizzle: typeof registerDrizzleWorkflowStorage;
426
885
  };
427
886
  private readonly config;
887
+ private stopBootstrapWaits?;
428
888
  private readonly activeExecutions;
429
889
  private readonly executionTasks;
430
890
  private readonly shellAbortControllers;
@@ -440,8 +900,6 @@ declare class WorkflowExecutor extends BaseService {
440
900
  private readonly durableLifecycleTransitions;
441
901
  private readonly lifecyclePublications;
442
902
  private readonly publishingLifecycleExecutions;
443
- private readonly workflowRunner?;
444
- private readonly executionAttemptAuthority?;
445
903
  private readonly materializationSpecResolvers;
446
904
  /**
447
905
  * Create a new workflow executor.
@@ -450,7 +908,7 @@ declare class WorkflowExecutor extends BaseService {
450
908
  * @param workflowRunner - Optional workflow-level runner for isolated execution
451
909
  * @param executionAttemptAuthority - Optional Authority for Worker dispatch runners
452
910
  */
453
- constructor(bus: IMakaioBus, config?: Partial<ExecutorConfig>, workflowRunner?: IWorkflowRunner, executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowRunResult>);
911
+ constructor(bus: IMakaioBus, config?: Partial<ExecutorConfig>, workflowRunner?: IWorkflowRunner | undefined, executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowAttemptOutcome> | undefined);
454
912
  /**
455
913
  * Register a host resolver used to freeze workspace materialization before a
456
914
  * path-backed execution is persisted.
@@ -485,6 +943,28 @@ declare class WorkflowExecutor extends BaseService {
485
943
  accepted: boolean;
486
944
  status: WorkflowExecution['status'];
487
945
  }>;
946
+ /**
947
+ * Fail the workflow owner after a technical Attempt outcome has been committed.
948
+ * Startup and Preparation failures can precede loading the workflow definition,
949
+ * so this path uses the durable owner context, not a fabricated runner result.
950
+ * @param executionId - Durable authority-owned execution identity.
951
+ * @param failure - Canonical technical failure retained in Attempt storage.
952
+ * @returns The durable status after idempotent failure convergence.
953
+ */
954
+ readonly acceptAuthorityTechnicalFailure: (executionId: string, failure: WorkflowAttemptTechnicalFailure) => Promise<{
955
+ accepted: boolean;
956
+ status: WorkflowExecution["status"];
957
+ }>;
958
+ /**
959
+ * Cancel the workflow owner after its technical Attempt cancellation is committed.
960
+ * @param executionId - Durable authority-owned execution identity.
961
+ * @param cancellation - Canonical cancellation retained in Attempt storage.
962
+ * @returns The durable status after idempotent cancellation convergence.
963
+ */
964
+ readonly acceptAuthorityCancellation: (executionId: string, cancellation: WorkflowAttemptCancellation) => Promise<{
965
+ accepted: boolean;
966
+ status: WorkflowExecution["status"];
967
+ }>;
488
968
  private resolveAuthorityRunnerReplay;
489
969
  private loadAuthorityRunnerContext;
490
970
  private registerAuthorityResultFinalizer;
@@ -862,7 +1342,9 @@ interface WorkflowEngineServiceOptions {
862
1342
  * When omitted, the workflow engine operates without attempt tracking
863
1343
  * (framework-only, in-process, and Piscina modes).
864
1344
  */
865
- executionAttemptRepository?: ExecutionAttemptRepository<WorkflowRunResult>;
1345
+ executionAttemptRepository?: ExecutionAttemptRepository<WorkflowAttemptOutcome>;
1346
+ /** Explicit creation-time bootstrap budget, required only when constructing an Authority. */
1347
+ executionAttemptBootstrapTimeoutMs?: number;
866
1348
  /**
867
1349
  * Pre-built execution attempt Authority.
868
1350
  *
@@ -874,7 +1356,7 @@ interface WorkflowEngineServiceOptions {
874
1356
  * construction. When both are provided, the pre-built Authority is used
875
1357
  * and the repository is ignored.
876
1358
  */
877
- executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowRunResult>;
1359
+ executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowAttemptOutcome>;
878
1360
  /** Host-owned resolvers that create portable specs for path-backed starts. */
879
1361
  workflowMaterializationSpecResolvers?: readonly WorkflowMaterializationSpecResolver[];
880
1362
  /**
@@ -915,12 +1397,11 @@ declare class WorkflowEngineService extends BaseService {
915
1397
  /**
916
1398
  * Execution attempt Authority owned by this package service.
917
1399
  *
918
- * Present only when an {@link ExecutionAttemptRepository} was injected at
919
- * construction time (Worker dispatch mode). Returns `undefined` for
920
- * framework-only, in-process, and Piscina modes.
1400
+ * Present when the host supplies a prebuilt Authority or a repository with
1401
+ * an explicit bootstrap budget, independently of runner mode.
921
1402
  * @returns Authority instance, or `undefined` when no repository is injected.
922
1403
  */
923
- get executionAttemptAuthority(): ExecutionAttemptAuthority<WorkflowRunResult> | undefined;
1404
+ get executionAttemptAuthority(): ExecutionAttemptAuthority<WorkflowAttemptOutcome> | undefined;
924
1405
  /**
925
1406
  * Register a named workflow success finalizer with the owned executor.
926
1407
  *
@@ -1003,4 +1484,4 @@ declare function createWorkflowEnginePackage(options?: WorkflowEngineServiceOpti
1003
1484
  */
1004
1485
  declare const workflowEnginePackage: MakaioNodeExtension<IMakaioBus>;
1005
1486
  //#endregion
1006
- export { WorkflowEngineServiceOptions as a, ExecutionAttemptAuthority as c, WorkflowWorkspaceRootResolver as d, registerDrizzleWorkflowStorage as f, WorkflowEngineService as i, WorkflowMaterializationSpecResolution as l, createWorkflowEnginePackage as n, WorkflowTriggerReconciler as o, workflowEnginePackage as r, WorkflowExecutor as s, WorkflowEngineToken as t, WorkflowMaterializationSpecResolver as u };
1487
+ export { WorkflowWorkspaceRootResolver as A, OutcomePreCommitValidation as C, BootstrapStartOptions as D, BootstrapStartAuthority as E, WorkflowMaterializationSpecResolution as O, OutcomeConvergenceInput as S, ExecutionAttemptAuthority as T, ExecutionAttemptHandlersDeps as _, WorkflowEngineServiceOptions as a, AttemptOutcomeSubmissionDeps as b, CommittedWorkflowOutcomeIdentity as c, WorkflowAttemptOutcomeSchema as d, WorkflowAttemptTechnicalFailure as f, AttemptOutcomeDecodingInput as g, workflowAttemptOutcomeCodec as h, WorkflowEngineService as i, registerDrizzleWorkflowStorage as j, WorkflowMaterializationSpecResolver as k, WorkflowAttemptCancellation as l, toCommittedWorkflowRunnerResult as m, createWorkflowEnginePackage as n, WorkflowTriggerReconciler as o, decodeWorkflowAttemptOutcome as p, workflowEnginePackage as r, WorkflowExecutor as s, WorkflowEngineToken as t, WorkflowAttemptOutcome as u, registerExecutionAttemptHandlers as v, submitAttemptOutcome as w, OutcomeConvergence as x, AttemptOutcomeSubmission as y };
package/dist/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@makaio/framework",
3
- "version": "1.0.0-dev-1788511348215",
3
+ "version": "1.0.0-dev-1788811230746",
4
4
  "type": "module"
5
5
  }
@@ -1,4 +1,4 @@
1
- import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-CF8QwRqt.mjs";
1
+ import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-Bk50UoMA.mjs";
2
2
 
3
3
  //#region packages/rules/src/evaluator.d.ts
4
4
  /**
@@ -1,2 +1,2 @@
1
- import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-CF8QwRqt.mjs";
1
+ import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-Bk50UoMA.mjs";
2
2
  export { ConditionSchema, ExpressionConditionSchema, FieldConditionSchema, FieldOperatorSchema, JsonObjectSchema, JsonValueSchema, RuleSchema, RuleSetOptionsSchema, ScalarValueSchema };