@makaio/framework 1.0.0-dev-1788721567504 → 1.0.0-dev-1788832451167

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 (309) 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/{artifact-Btbuib48.mjs → artifact-ClvHqL3w.mjs} +1 -1
  6. package/dist/attempt-fixtures-CnrnF5_4.mjs +1 -0
  7. package/dist/attempt-record-codec-B32Whx75.mjs +1 -0
  8. package/dist/authority-state-bootstrap-7Cgb9TR2.mjs +1 -0
  9. package/dist/bootstrap-start-client-DrvofWwi.mjs +1 -0
  10. package/dist/bus/index.d.mts +46 -28
  11. package/dist/bus/index.mjs +1 -1
  12. package/dist/bus-CobBUqjo.mjs +2 -0
  13. package/dist/bus-Uy9C3TBM.mjs +1 -0
  14. package/dist/clients/index.d.mts +1 -1
  15. package/dist/clients/managed-install.d.mts +1 -1
  16. package/dist/code-execution/worker-entry.d.mts +1 -1
  17. package/dist/{context-resolution-CoKFKIqz.d.mts → context-resolution-BrtoXnez.d.mts} +97 -18
  18. package/dist/contracts/adapter/index.d.mts +2 -2
  19. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  20. package/dist/contracts/artifact/index.d.mts +3 -3
  21. package/dist/contracts/artifact/index.mjs +1 -1
  22. package/dist/contracts/auth/index.d.mts +2 -2
  23. package/dist/contracts/automation-trigger/index.d.mts +3 -3
  24. package/dist/contracts/canonical-model/index.d.mts +1 -1
  25. package/dist/contracts/capabilities/index.d.mts +2 -2
  26. package/dist/contracts/client/index.d.mts +2 -2
  27. package/dist/contracts/code-execution/index.d.mts +1 -1
  28. package/dist/contracts/common/index.d.mts +1 -1
  29. package/dist/contracts/config/index.d.mts +1 -1
  30. package/dist/contracts/extension/index.d.mts +5 -5
  31. package/dist/contracts/facet/index.d.mts +1 -1
  32. package/dist/contracts/harness/index.d.mts +1 -1
  33. package/dist/contracts/host/index.d.mts +1 -1
  34. package/dist/contracts/index.d.mts +901 -183
  35. package/dist/contracts/index.mjs +1 -1
  36. package/dist/contracts/materialization/index.d.mts +3 -3
  37. package/dist/contracts/materialization/index.mjs +1 -1
  38. package/dist/contracts/model-registry/index.d.mts +1 -1
  39. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  40. package/dist/contracts/platform/index.d.mts +1 -1
  41. package/dist/contracts/provider/index.d.mts +2 -2
  42. package/dist/contracts/reaction/index.d.mts +1 -1
  43. package/dist/contracts/session/index.d.mts +2 -2
  44. package/dist/contracts/shared/index.d.mts +2 -2
  45. package/dist/contracts/skill/index.d.mts +1 -1
  46. package/dist/contracts/telemetry/index.d.mts +1 -1
  47. package/dist/contracts/timeout/index.d.mts +1 -1
  48. package/dist/contracts/variant/index.d.mts +1 -1
  49. package/dist/contracts/worker/index.d.mts +2 -2
  50. package/dist/contracts/worker/index.mjs +1 -1
  51. package/dist/contracts/workflow/index.d.mts +2 -2
  52. package/dist/contracts/workflow/index.mjs +1 -1
  53. package/dist/{contribution-CUHLVLsT.d.mts → contribution-Crm-mctl.d.mts} +2 -2
  54. package/dist/{definition-DyGImhyi.d.mts → definition-u_5rYQtc.d.mts} +1 -1
  55. package/dist/{detached-extension-handle-D0aI0pJA.mjs → detached-extension-handle-DAXKQT9c.mjs} +1 -1
  56. package/dist/{execution-attempt-repository-CRdrgou3.d.mts → execution-attempt-repository-CgB7uiYD.d.mts} +242 -9
  57. package/dist/execution-attempt-repository-D0cCU7dI.mjs +1 -0
  58. package/dist/{execution-target-H0RWV7Py.mjs → execution-target-BcoF_oDB.mjs} +1 -1
  59. package/dist/{hook-responses-9Ywsqzzq.d.mts → hook-responses-DcapjzLb.d.mts} +1 -1
  60. package/dist/{index-D1wTWSLR.d.mts → index-BADuMxcP.d.mts} +458 -458
  61. package/dist/{index-8NdPPzUh2.d.mts → index-BDAfOYSw2.d.mts} +12 -12
  62. package/dist/{index-DHnSLGP4.d.mts → index-BDzqNCXs.d.mts} +1 -1
  63. package/dist/{index-CxwqnZpT.d.mts → index-BakMNLkB.d.mts} +175 -80
  64. package/dist/{index-B0VO0rAl.d.mts → index-Bo3LRb2u.d.mts} +1 -1
  65. package/dist/{index-CVcG4Q3X.d.mts → index-Bsr4rZl0.d.mts} +13 -13
  66. package/dist/{index-B_8bA2JW.d.mts → index-BvgLFm-U.d.mts} +1 -1
  67. package/dist/{index-Dg11JxKZ.d.mts → index-BwccWakG.d.mts} +1 -1
  68. package/dist/{index-BJdkVFX9.d.mts → index-BxOFB25y.d.mts} +335 -78
  69. package/dist/{index-37_b--BH.d.mts → index-C1PfDEIV.d.mts} +52 -47
  70. package/dist/{index-CPRQ4dWX.d.mts → index-CBixkF0n.d.mts} +12 -0
  71. package/dist/{index-CyWGSxrs.d.mts → index-CGJgZGqN.d.mts} +292 -292
  72. package/dist/{index--Ws52sWV2.d.mts → index-COOM1j_L2.d.mts} +4 -4
  73. package/dist/{index-BmevAPME2.d.mts → index-Cbv_3Xi12.d.mts} +1 -1
  74. package/dist/{index-DWBkiiXH.d.mts → index-CfJKwWJa.d.mts} +1 -1
  75. package/dist/{index-DV38-klA2.d.mts → index-CiKzWCW02.d.mts} +273 -26
  76. package/dist/{index-AdcDBUnc.d.mts → index-D6RMsZko.d.mts} +95 -95
  77. package/dist/{index-CIEycZrt.d.mts → index-DIhkK4Y0.d.mts} +1 -1
  78. package/dist/{index-BKIxdzIw.d.mts → index-DZXpKlyB.d.mts} +21 -21
  79. package/dist/{index-DBD_oFEt2.d.mts → index-DZnb56vt2.d.mts} +1 -1
  80. package/dist/{index-Cny5RvjO.d.mts → index-J-kv32zv.d.mts} +2 -2
  81. package/dist/{index-BNzUyVwV.d.mts → index-LOh6AEqx.d.mts} +10 -10
  82. package/dist/{index-CYjgoYeX.d.mts → index-LryUXslm.d.mts} +3 -3
  83. package/dist/{index-CFI6FxC7.d.mts → index-QJW9g1mG.d.mts} +2 -2
  84. package/dist/{index-B0yMCJW8.d.mts → index-rygpcDBV.d.mts} +1 -1
  85. package/dist/{index-I5a37JCm.d.mts → index-vXmPEZ5O.d.mts} +382 -82
  86. package/dist/kernel/cli/index.d.mts +2 -2
  87. package/dist/kernel/cli/register.d.mts +1 -1
  88. package/dist/kernel/extension/index.d.mts +1 -1
  89. package/dist/kernel/index.d.mts +5 -5
  90. package/dist/kernel/namespace/index.d.mts +1 -1
  91. package/dist/kernel/observability/index.d.mts +1 -1
  92. package/dist/kernel/providers/index.d.mts +1 -1
  93. package/dist/kernel/window/index.d.mts +1 -1
  94. package/dist/{lib-Cm-uEoC1.mjs → lib-271rPR7A.mjs} +1 -1
  95. package/dist/{lib-BpGvHZye.mjs → lib-RFpLjUda.mjs} +1 -1
  96. package/dist/{load-extensions-BQoXaHhR.d.mts → load-extensions-CY8ELnCp.d.mts} +1 -1
  97. package/dist/{load-extensions-DG5LvPyM.mjs → load-extensions-D9inWcDy.mjs} +1 -1
  98. package/dist/{materialization-lVd9_-jr.mjs → materialization-B_LA9pfy.mjs} +1 -1
  99. package/dist/{namespace-DOezqDti.d.mts → namespace-BymM0nl_.d.mts} +27 -27
  100. package/dist/{namespace-Bo94cenp.d.mts → namespace-Cs-cOyrn.d.mts} +136 -136
  101. package/dist/{namespace-BdAK0lD8.d.mts → namespace-DdqVQSyc.d.mts} +2 -2
  102. package/dist/{namespace-BRuHzhPo.d.mts → namespace-DlrX8feY.d.mts} +45 -45
  103. package/dist/{namespace-CsnrP8AD.d.mts → namespace-Dw5H_KCF.d.mts} +1 -1
  104. package/dist/{namespace-CstawJgN.d.mts → namespace-DykqxEyX.d.mts} +2 -2
  105. package/dist/node/bus-server/index.d.mts +1 -1
  106. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  107. package/dist/node/transports/index.d.mts +56 -16
  108. package/dist/node/transports/index.mjs +2 -2
  109. package/dist/package-CzKoZ1k0.mjs +7 -0
  110. package/dist/{package-DkZmsdCd.d.mts → package-DkpF17X_.d.mts} +458 -17
  111. package/dist/package.json +1 -1
  112. package/dist/rules/index.d.mts +1 -1
  113. package/dist/rules/schemas.d.mts +1 -1
  114. package/dist/runtime-bun/index.mjs +1 -1
  115. package/dist/runtime-node/code-execution/index.d.mts +2 -2
  116. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  117. package/dist/runtime-node/extension-validation.d.mts +1 -1
  118. package/dist/runtime-node/extension-validation.mjs +1 -1
  119. package/dist/runtime-node/index.d.mts +6 -6
  120. package/dist/runtime-node/index.mjs +24 -24
  121. package/dist/runtime-node/makaio-config.d.mts +1 -1
  122. package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
  123. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  124. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  125. package/dist/runtime-node/workflow-worker/worker-entry.d.mts +22 -2
  126. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  127. package/dist/{schema-B3Pf7JP7.d.mts → schema-C9PauHXt.d.mts} +2 -2
  128. package/dist/{schemas-CJKHYluy.d.mts → schemas-B2UbGJpJ.d.mts} +15 -15
  129. package/dist/{schemas-B50oWBuj.d.mts → schemas-BDZFd3Wb.d.mts} +2 -2
  130. package/dist/schemas-CNkUEbIr.mjs +1 -0
  131. package/dist/schemas-CeHU889f.mjs +1 -0
  132. package/dist/{schemas-DTJtS14K.d.mts → schemas-ClGDFa44.d.mts} +136 -136
  133. package/dist/scoped-bus-DwVrmi_1.mjs +1 -0
  134. package/dist/services/adapter-runtime/index.d.mts +3 -3
  135. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  136. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  137. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  138. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  139. package/dist/services/agent-runtime/index.d.mts +2 -2
  140. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  141. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  142. package/dist/services/capability/index.d.mts +2 -2
  143. package/dist/services/code-execution/index.d.mts +1 -1
  144. package/dist/services/codebase/index.d.mts +2 -2
  145. package/dist/services/codebase/namespace.d.mts +1 -1
  146. package/dist/services/codebase/schemas.d.mts +1 -1
  147. package/dist/services/compression/index.d.mts +2 -2
  148. package/dist/services/compression/namespace.d.mts +1 -1
  149. package/dist/services/compression/schemas.d.mts +1 -1
  150. package/dist/services/context-rules/index.d.mts +4 -4
  151. package/dist/services/execution-target/index.d.mts +3 -3
  152. package/dist/services/execution-target/index.mjs +1 -1
  153. package/dist/services/execution-target/namespace.d.mts +1 -1
  154. package/dist/services/execution-target/namespace.mjs +1 -1
  155. package/dist/services/execution-target/schemas.d.mts +1 -1
  156. package/dist/services/execution-target/schemas.mjs +1 -1
  157. package/dist/services/filesystem/index.d.mts +1 -1
  158. package/dist/services/filesystem/namespace.d.mts +6 -6
  159. package/dist/services/filesystem/schemas.d.mts +3 -3
  160. package/dist/services/index.d.mts +124 -122
  161. package/dist/services/index.mjs +1 -1
  162. package/dist/services/log-import/browser.d.mts +2 -2
  163. package/dist/services/log-import/index.d.mts +2 -2
  164. package/dist/services/log-import/log-import.d.mts +1 -1
  165. package/dist/services/materialization/index.d.mts +1 -1
  166. package/dist/services/model-registry/index.d.mts +1 -1
  167. package/dist/services/preferences/index.d.mts +2 -2
  168. package/dist/services/preferences/schemas.d.mts +1 -1
  169. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  170. package/dist/services/provider-context/index.d.mts +1 -1
  171. package/dist/services/session/handlers/index.d.mts +1 -1
  172. package/dist/services/session/index.d.mts +9 -9
  173. package/dist/services/session/messages/namespace.d.mts +1 -1
  174. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  175. package/dist/services/session/session-events/namespace.d.mts +1 -1
  176. package/dist/services/session/storage/namespace.d.mts +1 -1
  177. package/dist/services/session/storage/schema.d.mts +1 -1
  178. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  179. package/dist/services/session/turns/namespace.d.mts +1 -1
  180. package/dist/services/session-editor/index.d.mts +1 -1
  181. package/dist/services/settings/index.d.mts +3 -3
  182. package/dist/services/settings/namespace.d.mts +12 -12
  183. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  184. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  185. package/dist/services/settings/storage/index.d.mts +3 -3
  186. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  187. package/dist/services/subagent/index.d.mts +1 -1
  188. package/dist/services/subagent-template/index.d.mts +2 -2
  189. package/dist/services/subagent-template/namespace.d.mts +1 -1
  190. package/dist/services/subagent-template/schemas.d.mts +1 -1
  191. package/dist/services/tool-approval/index.d.mts +1 -1
  192. package/dist/services/tools/index.d.mts +1 -1
  193. package/dist/services/tray-menu/index.d.mts +3 -3
  194. package/dist/services/tray-menu/namespace.d.mts +1 -1
  195. package/dist/services/tray-menu/schemas.d.mts +1 -1
  196. package/dist/services/turn/index.d.mts +1 -1
  197. package/dist/services/turn/namespace.d.mts +1 -1
  198. package/dist/services/workflow-transitions/index.d.mts +1 -1
  199. package/dist/{src-BmSQ3rlz.mjs → src-DEgV239R.mjs} +1 -1
  200. package/dist/storage/drizzle/client.d.mts +1 -1
  201. package/dist/storage/drizzle/index.d.mts +1 -1
  202. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  203. package/dist/storage/handlers/index.d.mts +1 -1
  204. package/dist/{transition-DxsrTsn4.d.mts → transition-DFA_ckdP.d.mts} +2 -2
  205. package/dist/{types-Czdm5op1.d.mts → types-DkfDRSTr.d.mts} +356 -356
  206. package/dist/{types-CtDGkyLx2.d.mts → types-p55qvq922.d.mts} +1 -1
  207. package/dist/ui-kernel/index.d.mts +1 -1
  208. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  209. package/dist/{view-builder-D-Wz_l_B.d.mts → view-builder-CYW_9n4A.d.mts} +1 -1
  210. package/dist/worker-B4nD_Erm.mjs +1 -0
  211. package/dist/{workflow-BomH9DBB.mjs → workflow-H8hsEikC.mjs} +1 -1
  212. package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -2
  213. package/dist/workflow-engine/execution-attempt-repository.mjs +1 -1
  214. package/dist/workflow-engine/index.d.mts +300 -216
  215. package/dist/workflow-engine/index.mjs +1 -1
  216. package/dist/workflow-engine/package.d.mts +1 -1
  217. package/dist/workflow-engine/package.mjs +1 -1
  218. package/dist/workflow-engine/provider-operation.d.mts +1 -1
  219. package/dist/workflow-engine/testing/conformance.d.mts +85 -0
  220. package/dist/workflow-engine/testing/conformance.mjs +1 -0
  221. package/dist/workflow-engine/testing/index.d.mts +12 -5
  222. package/dist/workflow-engine/testing/index.mjs +1 -1
  223. package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
  224. package/dist/workflow-engine/testing/sqlite.mjs +75 -46
  225. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  226. package/dist/workflow-worker-CmIkKnpF.mjs +2 -0
  227. package/package.json +13 -1
  228. package/dist/attempt-record-codec-BORASgzn.mjs +0 -1
  229. package/dist/authority-state-bootstrap-eitx6Ukn.mjs +0 -1
  230. package/dist/bus-D6NoBhIV.mjs +0 -2
  231. package/dist/bus-UgFdHybD.mjs +0 -1
  232. package/dist/package-UemD2NWn.mjs +0 -7
  233. package/dist/runtime-registration-client-BTtFpt_k.mjs +0 -1
  234. package/dist/schemas-C3kyQWGf.mjs +0 -1
  235. package/dist/schemas-TK29KWx-.mjs +0 -1
  236. package/dist/scoped-bus-DoPmCJeM.mjs +0 -1
  237. package/dist/worker-DlRdLf2d.mjs +0 -1
  238. package/dist/workflow-worker-DjUfKshi.mjs +0 -1
  239. /package/dist/{adapter-binding-CATvmGuz.d.mts → adapter-binding-D68U_Hmh.d.mts} +0 -0
  240. /package/dist/{base-orchestrator-B4YW6z_Q.d.mts → base-orchestrator-DA95InJU.d.mts} +0 -0
  241. /package/dist/{capability-service-BW1-teFU.d.mts → capability-service-s4ZYSEWc.d.mts} +0 -0
  242. /package/dist/{client-binary-version-verifier-lcv83Hq3.d.mts → client-binary-version-verifier-kd9LP9AQ.d.mts} +0 -0
  243. /package/dist/{client-BG0WX5Vz.d.mts → client-f5A-6La5.d.mts} +0 -0
  244. /package/dist/{clients-namespace-DLAjOTTb.d.mts → clients-namespace-q4PqU1cA.d.mts} +0 -0
  245. /package/dist/{config-namespace-CH7sJZ4f.d.mts → config-namespace-Cp71zTT0.d.mts} +0 -0
  246. /package/dist/{create-static-mount-DxuixuLZ.mjs → create-static-mount-CmQgA0jq.mjs} +0 -0
  247. /package/dist/{definition-BrgzUuFk.d.mts → definition-BHSzhrUf.d.mts} +0 -0
  248. /package/dist/{extension-context-QmFuHdq5.d.mts → extension-context-BmU5XKjI.d.mts} +0 -0
  249. /package/dist/{extension-discovery-Dhu3WplO.d.mts → extension-discovery-DnO7bINK.d.mts} +0 -0
  250. /package/dist/{filesystem-service-ZJ43SbBi.d.mts → filesystem-service-BBArEDPL.d.mts} +0 -0
  251. /package/dist/{index-BC-6qNeo.d.mts → index-B-zl-O-Y.d.mts} +0 -0
  252. /package/dist/{index-BfV8U4XX.d.mts → index-BB0HypzC.d.mts} +0 -0
  253. /package/dist/{index-8y4hT9WL.d.mts → index-Bf2MgOni.d.mts} +0 -0
  254. /package/dist/{index-B4svZC6L.d.mts → index-C9xVZ-gt.d.mts} +0 -0
  255. /package/dist/{index-kzIjbrS02.d.mts → index-CDLf3Fka2.d.mts} +0 -0
  256. /package/dist/{index-BuMsrli0.d.mts → index-CPWBGotQ.d.mts} +0 -0
  257. /package/dist/{index-pvX-BIpr2.d.mts → index-CcrXttC02.d.mts} +0 -0
  258. /package/dist/{index-B5dP8rj6.d.mts → index-CkpR5sIH.d.mts} +0 -0
  259. /package/dist/{index-CmbkCxj-.d.mts → index-Co1da7YK.d.mts} +0 -0
  260. /package/dist/{index-VzLAV0Yt.d.mts → index-CrcfeFOo.d.mts} +0 -0
  261. /package/dist/{index-BM56936c.d.mts → index-CsFN2nv7.d.mts} +0 -0
  262. /package/dist/{index-CVpaGijY.d.mts → index-D-JbTXIH.d.mts} +0 -0
  263. /package/dist/{index-l01zsChf.d.mts → index-D94yE5Dr.d.mts} +0 -0
  264. /package/dist/{index-D037TVsm.d.mts → index-DQD2-jcL.d.mts} +0 -0
  265. /package/dist/{index-D8D-yibS2.d.mts → index-DSLTgc7h2.d.mts} +0 -0
  266. /package/dist/{index-CL0Jo1b92.d.mts → index-DSN2t48K.d.mts} +0 -0
  267. /package/dist/{index-DQ8o3JGi.d.mts → index-DW4SE_sH.d.mts} +0 -0
  268. /package/dist/{index-DgspOUa72.d.mts → index-DYHxzwok2.d.mts} +0 -0
  269. /package/dist/{index-BMRB9yhF.d.mts → index-D_sMzTvv.d.mts} +0 -0
  270. /package/dist/{index-BFWvT0NG.d.mts → index-Df1c_2PF.d.mts} +0 -0
  271. /package/dist/{index-B2Y1Wvbh.d.mts → index-Dn_SGTgp.d.mts} +0 -0
  272. /package/dist/{index-C4V8Pmi4.d.mts → index-KAAnSRZt.d.mts} +0 -0
  273. /package/dist/{index-Ek4y8M9J2.d.mts → index-NhW2h2wH2.d.mts} +0 -0
  274. /package/dist/{index-CqdMbYmR.d.mts → index-mK-rgiit.d.mts} +0 -0
  275. /package/dist/{index-BTEJfzjE.d.mts → index-xaBSwHxJ.d.mts} +0 -0
  276. /package/dist/{json-value-DPqb-SJ8.d.mts → json-value-pX6xnLGw.d.mts} +0 -0
  277. /package/dist/{jsonl-transport-Cyyh5Wje.mjs → jsonl-transport-DQIlRX_y.mjs} +0 -0
  278. /package/dist/{lib-BqV8hYtk.mjs → lib-6eNAiNK7.mjs} +0 -0
  279. /package/dist/{namespace-DBO1OzYB.d.mts → namespace-9ychTEk_.d.mts} +0 -0
  280. /package/dist/{namespace-CVFaZv8x.d.mts → namespace-BGDq7HmW.d.mts} +0 -0
  281. /package/dist/{namespace-K23m4b0n.d.mts → namespace-BMG3RCdr.d.mts} +0 -0
  282. /package/dist/{namespace-CPm9dhi2.d.mts → namespace-BoyqQiW9.d.mts} +0 -0
  283. /package/dist/{namespace-BUYDmd0r.d.mts → namespace-CPR2xem0.d.mts} +0 -0
  284. /package/dist/{namespace-CPG6u60N.d.mts → namespace-CQEYu8az.d.mts} +0 -0
  285. /package/dist/{namespace-DqZweTbX.d.mts → namespace-CVg_cpkh.d.mts} +0 -0
  286. /package/dist/{namespace-B0ftHlK3.d.mts → namespace-DG0hjPcx.d.mts} +0 -0
  287. /package/dist/{orchestrator-shared-CNHSImNY.d.mts → orchestrator-shared-BzqqcY2z.d.mts} +0 -0
  288. /package/dist/{packages-CxPMEg8D.d.mts → packages-Cx-BwSZr.d.mts} +0 -0
  289. /package/dist/{provider-operation-DbdyFwNm.d.mts → provider-operation-B2wQST6N.d.mts} +0 -0
  290. /package/dist/{providers-namespace-CfZKp-C0.d.mts → providers-namespace-DsKTnuO1.d.mts} +0 -0
  291. /package/dist/{schemas-ChmQldVH.d.mts → schemas--LAbwXvw.d.mts} +0 -0
  292. /package/dist/{schemas-CF8QwRqt.d.mts → schemas-Bk50UoMA.d.mts} +0 -0
  293. /package/dist/{schemas-BCXvEWyF.d.mts → schemas-CBpjAhut.d.mts} +0 -0
  294. /package/dist/{schemas-bfZNpl0B.d.mts → schemas-CHRuwe18.d.mts} +0 -0
  295. /package/dist/{schemas-BGvkTiCx.d.mts → schemas-CzGN0eqW.d.mts} +0 -0
  296. /package/dist/{schemas-Pe892GgN.d.mts → schemas-DmULJ7Jk.d.mts} +0 -0
  297. /package/dist/{schemas-B6Q-qdmn.d.mts → schemas-Dxvjq-Bi.d.mts} +0 -0
  298. /package/dist/{schemas-CenET9Cq.d.mts → schemas-Wqo3_F6-.d.mts} +0 -0
  299. /package/dist/{server-lifecycle-L8zja8t8.d.mts → server-lifecycle-WFZcCMwF.d.mts} +0 -0
  300. /package/dist/{session-lineage-bUkd3fqx.d.mts → session-lineage-C9kppcCa.d.mts} +0 -0
  301. /package/dist/{src-BacfeiI4.mjs → src-DIyWekjW.mjs} +0 -0
  302. /package/dist/{storage-namespace-YmE8XCCL.d.mts → storage-namespace-BWU-8rvj.d.mts} +0 -0
  303. /package/dist/{storage-namespace-definition-BsnYAPot.d.mts → storage-namespace-definition-B-8JKvzm.d.mts} +0 -0
  304. /package/dist/{types-DdpSEmTO.d.mts → types-8rMNe3AS.d.mts} +0 -0
  305. /package/dist/{types-DnK6Wa_Y.d.mts → types-BFeWU3WM.d.mts} +0 -0
  306. /package/dist/{types-tyv0B605.d.mts → types-BnPJa-C_.d.mts} +0 -0
  307. /package/dist/{types-OKJCOjme.d.mts → types-DQTCNM2i.d.mts} +0 -0
  308. /package/dist/{types-BlB23n4f.d.mts → types-DxHeL0pF.d.mts} +0 -0
  309. /package/dist/{window-registry-Pcf35cac.d.mts → window-registry-DQP5P2_0.d.mts} +0 -0
@@ -1,4 +1,4 @@
1
- import { r as ExtensionDiscovery, t as DiscoveredExtension } from "../extension-discovery-Dhu3WplO.mjs";
1
+ import { r as ExtensionDiscovery, t as DiscoveredExtension } from "../extension-discovery-DnO7bINK.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region runtimes/node/src/makaio-config.d.ts
@@ -1 +1 @@
1
- import{randomBytes as e}from"node:crypto";import{getFullSubjectForSubjectDefinition as t}from"@makaio/framework/core";import{ArtifactSubjects as n,ExecutionAttemptSubjects as r,SubagentSubjects as i,WorkerSubjects as a,WorkflowSubjects as o}from"@makaio/framework/contracts";import{registerHmacIdentitySecret as s,resolveHmacIdentityPeer as c,resolveHmacIdentitySecret as l,rotateHmacIdentitySecret as u}from"@makaio/framework/node/transports";import{AdapterSubsystemSubjects as d}from"@makaio/framework/services/adapter-subsystem";import{WorkflowStorageSubjects as f}from"@makaio/framework/workflow-engine";const p=[r.runtime.register,r.operation.admit,r.operation.deliver,a.control.outcome.submit,o.getRunContext,d.listAdapters,o.bootstrapAuthorityState,o.finalizeDelegateResult,f.getExecution,f.setFrame,f.setSpan,f.listFrames,f.getGateInstance,f.setGateInstance,o.frame.started,o.frame.completed,o.frame.failed,o.frame.sessionLinked,o.execution.progress,o.gate.suspended,o.gate.resumed,o.gate.resolved,o.gate.respond,o.state.get,o.state.patch,o.resolveAgent,o.resolveRole,n.query,n.create,n.revise,o.artifact.updated,i.spawn,i.await,i.getStatus,i.kill];function m(e){return[...p.map(t),`workflow.${e}.cancel`]}function h(e){let{executionAttemptId:t,executionId:n,secret:r}=e,i=e.allowedSubjects??m(n);return{secret:r,cleanup:s(t,r,{peerKind:`workflow-execution-attempt`,claims:{executionId:n},allowedSubjects:i})}}function g(t){let n=e(32).toString(`hex`);return h({...t,secret:n})}function _(t){let{executionAttemptId:n,executionId:r}=t,i=c(n);if(i?.kind!==`workflow-execution-attempt`||i.claims?.executionId!==r)throw Error(`Cannot rotate workflow execution bus secret: attempt "${n}" is not registered for execution "${r}"`);let a=e(32).toString(`hex`);return{secret:a,cleanup:u(n,a)}}function v(e){return l(e.executionAttemptId)===null?g(e):_(e)}function y(e){return l(e)??void 0}export{m as buildExecutionAttemptAllowedSubjects,v as mintOrRotateWorkflowExecutionBusSecret,g as mintWorkflowExecutionBusSecret,h as registerWorkflowExecutionBusSecret,y as resolveWorkflowExecutionBusSecret,_ as rotateWorkflowExecutionBusSecret};
1
+ import{randomBytes as e}from"node:crypto";import{getFullSubjectForSubjectDefinition as t}from"@makaio/framework/core";import{ArtifactSubjects as n,ExecutionAttemptSubjects as r,SubagentSubjects as i,WorkerSubjects as a,WorkflowSubjects as o}from"@makaio/framework/contracts";import{registerHmacIdentitySecret as s,resolveHmacIdentityPeer as c,resolveHmacIdentitySecret as l,rotateHmacIdentitySecret as u}from"@makaio/framework/node/transports";import{AdapterSubsystemSubjects as d}from"@makaio/framework/services/adapter-subsystem";import{WorkflowStorageSubjects as f}from"@makaio/framework/workflow-engine";const p=[r.runtime.register,r.bootstrap.awaitStart,r.instruction.get,r.operation.admit,r.operation.report,r.operation.deliver,r.outcome.submit,a.runtime.inputs.get,a.control.outcome.submit,o.getRunContext,d.listAdapters,o.bootstrapAuthorityState,o.finalizeDelegateResult,f.getExecution,f.setFrame,f.setSpan,f.listFrames,f.getGateInstance,f.setGateInstance,o.frame.started,o.frame.completed,o.frame.failed,o.frame.sessionLinked,o.execution.progress,o.gate.suspended,o.gate.resumed,o.gate.resolved,o.gate.respond,o.state.get,o.state.patch,o.resolveAgent,o.resolveRole,n.query,n.create,n.revise,o.artifact.updated,i.spawn,i.await,i.getStatus,i.kill];function m(e){return[...p.map(t),`workflow.${e}.cancel`]}function h(e){let{executionAttemptId:t,executionId:n,secret:r}=e,i=e.allowedSubjects??m(n);return{secret:r,cleanup:s(t,r,{peerKind:`workflow-execution-attempt`,claims:{executionId:n},allowedSubjects:i})}}function g(t){let n=e(32).toString(`hex`);return h({...t,secret:n})}function _(t){let{executionAttemptId:n,executionId:r}=t,i=c(n);if(i?.kind!==`workflow-execution-attempt`||i.claims?.executionId!==r)throw Error(`Cannot rotate workflow execution bus secret: attempt "${n}" is not registered for execution "${r}"`);let a=e(32).toString(`hex`);return{secret:a,cleanup:u(n,a)}}function v(e){return l(e.executionAttemptId)===null?g(e):_(e)}function y(e){return l(e)??void 0}export{m as buildExecutionAttemptAllowedSubjects,v as mintOrRotateWorkflowExecutionBusSecret,g as mintWorkflowExecutionBusSecret,h as registerWorkflowExecutionBusSecret,y as resolveWorkflowExecutionBusSecret,_ as rotateWorkflowExecutionBusSecret};
@@ -1,2 +1,2 @@
1
- import { $ as ThinWorkflowPiscinaRunner, A as runHeadlessWorkflowWorker, B as PiscinaThinWorkflowProviderOptions, C as HeadlessWorkerContributionLoader, Ct as verifyContribution, D as HeadlessWorkflowWorkerDeps, E as HeadlessWorkerPostCommitObserver, Et as resolveWorkflowWorkerEntry, F as WorkflowRuntimeContributionLoader, G as OutcomeSubmitRetryConfig, H as OutcomeDeliveryError, I as createIsolatedWorkflowRuntime, J as WorkerRunnerOptions, K as submitOutcomeWithAck, L as InProcessWorkflowRunner, M as IsolatedWorkflowRuntime, N as IsolatedWorkflowRuntimeContext, O as HeadlessWorkflowWorkerResult, P as WorkflowRuntimeAuthorityConnector, Q as createNodeWorkflowRunnerPackageOptions, R as InProcessWorkflowRunnerOptions, S as HeadlessWorkerBusConnector, St as parseSriIntegrity, T as HeadlessWorkerMaterializer, Tt as WorkflowWorkerEntryResolverOptions, U as OutcomeReconnect, V as DELIVERED_DECISIONS, W as OutcomeSubmitPayload, X as NodeWorkflowRunnerPackageOptions, Y as CreateNodeWorkflowRunnerPackageOptionsParams, Z as createNodeWorkflowRunner, _ as loadWorkflowModule, _t as assertNoSymlinkEscape, a as OperationAdmissionRefusedError, b as HeadlessWorkerBootstrap, bt as computeFileDigest, c as OperationDeliveryHandler, d as RegisterWorkerRuntimeOptions, et as IWorkflowRunner, f as RuntimeRegistrationRefusedError, ft as LocalDirectoryMaterializerOptions, g as registerWorkerRuntime, gt as assertContainedIn, h as registerAndAdmitWorkflowRun, ht as WorkspaceRootResolver, i as DeliverableOperationKind, j as CreateIsolatedWorkflowRuntimeOptions, k as MaterializedWorkspace, l as OperationDeliveryHandlers, m as installOperationDeliveryEndpoint, mt as ParsedSriIntegrity, n as AdmitWorkflowRunOperationOptions, nt as ThinWorkflowPiscinaRunnerOptions, o as OperationDeliveryEndpoint, p as admitWorkflowRunOperation, pt as MaterializationError, q as WorkerRunner, r as AdmittedWorkflowRun, rt as WorkflowRunResult, s as OperationDeliveryEndpointIdentity, t as ALLOCATION_VISIBILITY_DEADLINE_MS, tt as RuntimeLoadedWorkflow, u as RegisterAndAdmitWorkflowRunOptions, v as loadWorkflowModules, vt as computeContributionPackageDigest, w as HeadlessWorkerExecutor, wt as WorkflowWorkerEntryMode, x as HeadlessWorkerBootstrapCredentials, xt as materializeLocalDirectory, y as loadWorkflowFromConfig, yt as computeDirectoryDigest, z as PiscinaThinWorkflowProvider } from "../../index-BJdkVFX9.mjs";
2
- export { ALLOCATION_VISIBILITY_DEADLINE_MS, AdmitWorkflowRunOperationOptions, AdmittedWorkflowRun, CreateIsolatedWorkflowRuntimeOptions, CreateNodeWorkflowRunnerPackageOptionsParams, DELIVERED_DECISIONS, DeliverableOperationKind, HeadlessWorkerBootstrap, HeadlessWorkerBootstrapCredentials, HeadlessWorkerBusConnector, HeadlessWorkerContributionLoader, HeadlessWorkerExecutor, HeadlessWorkerMaterializer, HeadlessWorkerPostCommitObserver, HeadlessWorkflowWorkerDeps, HeadlessWorkflowWorkerResult, IWorkflowRunner, InProcessWorkflowRunner, InProcessWorkflowRunnerOptions, IsolatedWorkflowRuntime, IsolatedWorkflowRuntimeContext, LocalDirectoryMaterializerOptions, MaterializationError, MaterializedWorkspace, NodeWorkflowRunnerPackageOptions, OperationAdmissionRefusedError, OperationDeliveryEndpoint, OperationDeliveryEndpointIdentity, OperationDeliveryHandler, OperationDeliveryHandlers, OutcomeDeliveryError, OutcomeReconnect, OutcomeSubmitPayload, OutcomeSubmitRetryConfig, ParsedSriIntegrity, PiscinaThinWorkflowProvider, PiscinaThinWorkflowProviderOptions, RegisterAndAdmitWorkflowRunOptions, RegisterWorkerRuntimeOptions, RuntimeLoadedWorkflow, RuntimeRegistrationRefusedError, ThinWorkflowPiscinaRunner, ThinWorkflowPiscinaRunnerOptions, WorkerRunner, WorkerRunnerOptions, WorkflowRunResult, WorkflowRuntimeAuthorityConnector, WorkflowRuntimeContributionLoader, WorkflowWorkerEntryMode, WorkflowWorkerEntryResolverOptions, WorkspaceRootResolver, admitWorkflowRunOperation, assertContainedIn, assertNoSymlinkEscape, computeContributionPackageDigest, computeDirectoryDigest, computeFileDigest, createIsolatedWorkflowRuntime, createNodeWorkflowRunner, createNodeWorkflowRunnerPackageOptions, installOperationDeliveryEndpoint, loadWorkflowFromConfig, loadWorkflowModule, loadWorkflowModules, materializeLocalDirectory, parseSriIntegrity, registerAndAdmitWorkflowRun, registerWorkerRuntime, resolveWorkflowWorkerEntry, runHeadlessWorkflowWorker, submitOutcomeWithAck, verifyContribution };
1
+ import { $ as AuthorityRequestDeliveryError, A as HeadlessWorkerBootstrap, B as runHeadlessWorkflowWorker, Bt as computeFileDigest, C as loadWorkflowFromConfig, Ct as WorkflowRunResult, D as WorkloadInvocationPreparation, E as WorkloadControlBinding, F as HeadlessWorkerMaterializer, Ft as WorkspaceRootResolver, G as WorkflowRuntimeContributionLoader, Gt as WorkflowWorkerEntryResolverOptions, H as IsolatedWorkflowRuntime, Ht as parseSriIntegrity, I as HeadlessWorkerPostCommitObserver, It as assertContainedIn, J as InProcessWorkflowRunnerOptions, K as createIsolatedWorkflowRuntime, Kt as resolveWorkflowWorkerEntry, L as HeadlessWorkflowWorkerDeps, Lt as assertNoSymlinkEscape, M as HeadlessWorkerBusConnector, Mt as LocalDirectoryMaterializerOptions, N as HeadlessWorkerContributionLoader, Nt as MaterializationError, O as WorkloadInvocationResult, P as HeadlessWorkerExecutor, Pt as ParsedSriIntegrity, Q as AttemptOutcomeSubmitPayload, R as HeadlessWorkflowWorkerResult, Rt as computeContributionPackageDigest, S as loadWorkflowModules, St as ThinWorkflowPiscinaRunnerOptions, T as RunWorkloadInvocationOptions, U as IsolatedWorkflowRuntimeContext, Ut as verifyContribution, V as CreateIsolatedWorkflowRuntimeOptions, Vt as materializeLocalDirectory, W as WorkflowRuntimeAuthorityConnector, Wt as WorkflowWorkerEntryMode, X as PiscinaThinWorkflowProviderOptions, Y as PiscinaThinWorkflowProvider, Z as AttemptOutcomeDeliveryError, _ as admitWorkflowRunOperation, _t as withWorkerBootstrapDeadline, a as bootstrapWorkerRuntime, at as submitAttemptOutcomeWithAck, b as registerWorkerRuntime, bt as IWorkflowRunner, c as DeliverableOperationKind, ct as WorkerRunnerOptions, d as OperationDeliveryEndpointIdentity, dt as createNodeWorkflowRunner, et as DELIVERED_DECISIONS, f as OperationDeliveryHandler, ft as createNodeWorkflowRunnerPackageOptions, g as RuntimeRegistrationRefusedError, gt as BootstrapDeadlineExceededError, h as RegisterWorkerRuntimeOptions, ht as runWorkerBootstrapExchange, i as StartedWorkerRuntime, it as OutcomeSubmitRetryConfig, j as HeadlessWorkerBootstrapCredentials, k as runWorkloadInvocation, l as OperationAdmissionRefusedError, lt as CreateNodeWorkflowRunnerPackageOptionsParams, m as RegisterAndAdmitWorkflowRunOptions, mt as WorkerBootstrapExchangeOptions, n as BootstrapStartRefusedError, nt as OutcomeReconnect, o as AdmitWorkflowRunOperationOptions, ot as submitOutcomeWithAck, p as OperationDeliveryHandlers, pt as BootstrapExchangeResult, q as InProcessWorkflowRunner, r as BootstrapWorkerRuntimeOptions, rt as OutcomeSubmitPayload, s as AdmittedWorkflowRun, st as WorkerRunner, t as BootstrapRuntimeConnection, tt as OutcomeDeliveryError, u as OperationDeliveryEndpoint, ut as NodeWorkflowRunnerPackageOptions, v as installOperationDeliveryEndpoint, vt as createWorkerBusAuth, w as InstalledWorkloadAdapter, x as loadWorkflowModule, xt as RuntimeLoadedWorkflow, y as registerAndAdmitWorkflowRun, yt as ThinWorkflowPiscinaRunner, z as MaterializedWorkspace, zt as computeDirectoryDigest } from "../../index-BxOFB25y.mjs";
2
+ export { AdmitWorkflowRunOperationOptions, AdmittedWorkflowRun, AttemptOutcomeDeliveryError, AttemptOutcomeSubmitPayload, AuthorityRequestDeliveryError, BootstrapDeadlineExceededError, BootstrapExchangeResult, BootstrapRuntimeConnection, BootstrapStartRefusedError, BootstrapWorkerRuntimeOptions, CreateIsolatedWorkflowRuntimeOptions, CreateNodeWorkflowRunnerPackageOptionsParams, DELIVERED_DECISIONS, DeliverableOperationKind, HeadlessWorkerBootstrap, HeadlessWorkerBootstrapCredentials, HeadlessWorkerBusConnector, HeadlessWorkerContributionLoader, HeadlessWorkerExecutor, HeadlessWorkerMaterializer, HeadlessWorkerPostCommitObserver, HeadlessWorkflowWorkerDeps, HeadlessWorkflowWorkerResult, IWorkflowRunner, InProcessWorkflowRunner, InProcessWorkflowRunnerOptions, InstalledWorkloadAdapter, IsolatedWorkflowRuntime, IsolatedWorkflowRuntimeContext, LocalDirectoryMaterializerOptions, MaterializationError, MaterializedWorkspace, NodeWorkflowRunnerPackageOptions, OperationAdmissionRefusedError, OperationDeliveryEndpoint, OperationDeliveryEndpointIdentity, OperationDeliveryHandler, OperationDeliveryHandlers, OutcomeDeliveryError, OutcomeReconnect, OutcomeSubmitPayload, OutcomeSubmitRetryConfig, ParsedSriIntegrity, PiscinaThinWorkflowProvider, PiscinaThinWorkflowProviderOptions, RegisterAndAdmitWorkflowRunOptions, RegisterWorkerRuntimeOptions, RunWorkloadInvocationOptions, RuntimeLoadedWorkflow, RuntimeRegistrationRefusedError, StartedWorkerRuntime, ThinWorkflowPiscinaRunner, ThinWorkflowPiscinaRunnerOptions, WorkerBootstrapExchangeOptions, WorkerRunner, WorkerRunnerOptions, WorkflowRunResult, WorkflowRuntimeAuthorityConnector, WorkflowRuntimeContributionLoader, WorkflowWorkerEntryMode, WorkflowWorkerEntryResolverOptions, WorkloadControlBinding, WorkloadInvocationPreparation, WorkloadInvocationResult, WorkspaceRootResolver, admitWorkflowRunOperation, assertContainedIn, assertNoSymlinkEscape, bootstrapWorkerRuntime, computeContributionPackageDigest, computeDirectoryDigest, computeFileDigest, createIsolatedWorkflowRuntime, createNodeWorkflowRunner, createNodeWorkflowRunnerPackageOptions, createWorkerBusAuth, installOperationDeliveryEndpoint, loadWorkflowFromConfig, loadWorkflowModule, loadWorkflowModules, materializeLocalDirectory, parseSriIntegrity, registerAndAdmitWorkflowRun, registerWorkerRuntime, resolveWorkflowWorkerEntry, runHeadlessWorkflowWorker, runWorkerBootstrapExchange, runWorkloadInvocation, submitAttemptOutcomeWithAck, submitOutcomeWithAck, verifyContribution, withWorkerBootstrapDeadline };
@@ -1 +1 @@
1
- import{_ as e,a as t,b as n,c as r,d as i,f as a,g as o,h as s,i as c,l,m as u,n as d,o as f,p,r as m,s as h,t as g,u as _,v,x as y,y as b}from"../../workflow-worker-DjUfKshi.mjs";import{a as x,d as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k,u as A}from"../../runtime-registration-client-BTtFpt_k.mjs";export{k as ALLOCATION_VISIBILITY_DEADLINE_MS,c as DELIVERED_DECISIONS,l as InProcessWorkflowRunner,p as MaterializationError,T as OperationAdmissionRefusedError,t as OutcomeDeliveryError,m as PiscinaThinWorkflowProvider,D as RuntimeRegistrationRefusedError,a as ThinWorkflowPiscinaRunner,_ as WorkerRunner,C as admitWorkflowRunOperation,u as assertContainedIn,s as assertNoSymlinkEscape,o as computeContributionPackageDigest,e as computeDirectoryDigest,v as computeFileDigest,d as createIsolatedWorkflowRuntime,h as createNodeWorkflowRunner,r as createNodeWorkflowRunnerPackageOptions,x as installOperationDeliveryEndpoint,w as loadWorkflowFromConfig,A as loadWorkflowModule,S as loadWorkflowModules,b as materializeLocalDirectory,n as parseSriIntegrity,E as registerAndAdmitWorkflowRun,O as registerWorkerRuntime,i as resolveWorkflowWorkerEntry,g as runHeadlessWorkflowWorker,f as submitOutcomeWithAck,y as verifyContribution};
1
+ import{C as e,S as t,T as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b,v as x,w as S,x as C,y as w}from"../../workflow-worker-CmIkKnpF.mjs";import{_ as T,a as E,c as D,d as O,f as k,i as A,m as j,n as M,o as N,p as P,r as F,s as I,t as L,u as R,v as z}from"../../bootstrap-start-client-DrvofWwi.mjs";export{i as AttemptOutcomeDeliveryError,h as AuthorityRequestDeliveryError,T as BootstrapDeadlineExceededError,L as BootstrapStartRefusedError,v as DELIVERED_DECISIONS,g as InProcessWorkflowRunner,r as MaterializationError,F as OperationAdmissionRefusedError,o as OutcomeDeliveryError,d as PiscinaThinWorkflowProvider,A as RuntimeRegistrationRefusedError,l as ThinWorkflowPiscinaRunner,p as WorkerRunner,E as admitWorkflowRunOperation,x as assertContainedIn,w as assertNoSymlinkEscape,M as bootstrapWorkerRuntime,a as computeContributionPackageDigest,C as computeDirectoryDigest,t as computeFileDigest,_ as createIsolatedWorkflowRuntime,s as createNodeWorkflowRunner,c as createNodeWorkflowRunnerPackageOptions,j as createWorkerBusAuth,N as installOperationDeliveryEndpoint,R as loadWorkflowFromConfig,O as loadWorkflowModule,k as loadWorkflowModules,e as materializeLocalDirectory,S as parseSriIntegrity,I as registerAndAdmitWorkflowRun,D as registerWorkerRuntime,u as resolveWorkflowWorkerEntry,y as runHeadlessWorkflowWorker,P as runWorkerBootstrapExchange,m as runWorkloadInvocation,f as submitAttemptOutcomeWithAck,b as submitOutcomeWithAck,n as verifyContribution,z as withWorkerBootstrapDeadline};
@@ -1,5 +1,15 @@
1
1
  import { WorkerContributionManifest, WorkflowRunResult } from "@makaio/framework/contracts";
2
+ import { MessagePort } from "node:worker_threads";
2
3
 
4
+ //#region runtimes/node/src/workflow-worker/piscina-bootstrap-handoff.d.ts
5
+ /** Per-dispatch channel used only to transfer ownership of the bootstrap deadline. */
6
+ interface PiscinaBootstrapBinding {
7
+ /** Original creation-time deadline, shared by host and worker scopes. */
8
+ readonly bootstrapDeadlineAt: string;
9
+ /** Dedicated endpoint transferred exactly once to this task. */
10
+ readonly bootstrapPort: MessagePort;
11
+ }
12
+ //#endregion
3
13
  //#region runtimes/node/src/workflow-worker/worker-entry.d.ts
4
14
  /**
5
15
  * Fields every worker-entry invocation carries, whatever gate it runs behind.
@@ -48,9 +58,13 @@ interface AttemptBoundWorkerParams extends WorkflowWorkerRunParamsBase {
48
58
  readonly kind: 'attempt-bound';
49
59
  /** Authority-created attempt this runtime registers itself as the endpoint of. */
50
60
  readonly executionAttemptId: string;
61
+ /** Persisted absolute bootstrap deadline, unchanged across reconnects. */
62
+ readonly bootstrapDeadlineAt: string;
51
63
  }
52
- /** Parameters accepted by the Piscina worker entrypoint. */
64
+ /** Parameters accepted by the direct runtime entrypoint. */
53
65
  type WorkflowWorkerRunParams = UnboundWorkerParams | AttemptBoundWorkerParams;
66
+ /** Piscina-owned attempt tasks require a host budget handoff before runtime boot. */
67
+ type PiscinaWorkerRunParams = UnboundWorkerParams | (AttemptBoundWorkerParams & PiscinaBootstrapBinding);
54
68
  /**
55
69
  * Execute a complete workflow inside an isolated worker context.
56
70
  *
@@ -78,5 +92,11 @@ type WorkflowWorkerRunParams = UnboundWorkerParams | AttemptBoundWorkerParams;
78
92
  * @throws {@link OperationAdmissionRefusedError} When the Authority refuses the run.
79
93
  */
80
94
  declare function runWorkflowInWorker(params: WorkflowWorkerRunParams): Promise<WorkflowRunResult>;
95
+ /**
96
+ * Receive host bootstrap ownership before entering the ordinary worker lifecycle.
97
+ * @param params - Piscina task, including a required handoff port for bound attempts.
98
+ * @returns The terminal workflow result.
99
+ */
100
+ declare function runPiscinaWorkflow(params: PiscinaWorkerRunParams): Promise<WorkflowRunResult>;
81
101
  //#endregion
82
- export { AttemptBoundWorkerParams, UnboundWorkerParams, WorkflowWorkerRunParams, WorkflowWorkerRunParamsBase, runWorkflowInWorker as default, runWorkflowInWorker };
102
+ export { AttemptBoundWorkerParams, UnboundWorkerParams, WorkflowWorkerRunParams, WorkflowWorkerRunParamsBase, runPiscinaWorkflow as default, runWorkflowInWorker };
@@ -1 +1 @@
1
- import{a as e,c as t,f as n,l as r,o as i}from"../../runtime-registration-client-BTtFpt_k.mjs";import{pathToFileURL as a}from"node:url";import*as o from"node:path";import{randomUUID as s}from"node:crypto";import{createBusInstance as c,waitForSubscriptionPropagation as l}from"@makaio/framework/bus";import{FrameworkContractNamespaces as u,FrameworkStorageNamespaces as d,WorkflowWorkerConfigSchema as f,createWorkflowCancelSubject as p}from"@makaio/framework/contracts";import{HmacAuth as m,WebSocketClientTransport as h}from"@makaio/framework/node/transports";import{runWorkflowOrchestrator as g}from"@makaio/framework/workflow-engine/workflow-orchestrator";import{parentPort as _}from"node:worker_threads";import{McpServerBridgeService as v}from"@makaio/framework/mcp-http-server";import{ToolRegistry as y}from"@makaio/framework/services/tools";async function b(e){let t=c();if(t.registerNamespaces(u),t.registerNamespaces(d),!e.busUrl)return{bus:t,close(){}};let n=e.busAuth.kind===`hmac`?new m({secret:e.busAuth.secret,...e.identityId!==void 0&&{identityId:e.identityId}}):void 0,r=new h({url:e.busUrl,auth:n,autoReconnect:!1});return t.registerTransport(r),await t.connect(),{bus:t,async close(){await t.disconnect()}}}async function x(e,t){let n=new y({bus:e.bus}),r=new v(e.bus),i=async()=>{try{await r.destroy()}finally{n.dispose()}};try{await r.init();for(let e of t.toolsets)await S(n,e)}catch(e){throw await i(),e}return{close:i}}async function S(e,t){await e.register(t)}function C(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`?typeof t.tools==`object`&&t.tools!==null||Array.isArray(t.adapters):!1}function w(e,t){if(C(e.default))return e.default;for(let t of Object.keys(e))if(t!==`default`&&C(e[t]))return e[t]}function T(e){return Object.freeze({bus:e?.bus,identity:Object.freeze({extensionName:`__worker__`}),dataDir:``,machineId:``,platform:process.platform,homedir:``,makaioHome:``,username:``,signal:e?.signal??new AbortController().signal,tryImport:async()=>null,getService:()=>{throw Error(`Worker-local contribution context does not expose host services.`)},hasExtension:()=>!1})}async function E(e,t){let n=await Promise.all(e.map(e=>D(e,t))),r=[];for(let e of n)r.push(...e.toolsets);return{toolsets:r}}async function D(e,t){if(!o.isAbsolute(e))throw Error(`Worker contribution entrypoint must be an absolute materialized path: ${e}`);let n=w(await import(a(e).href),e);if(!n)throw Error(`No recognizable extension export in "${e}". Expected a default export or named export with a "name" field and "tools" or "adapters" surface.`);let r=[];if(n.tools?.createToolsets){let e=n.tools.createToolsets(T(t));r.push(...e)}return{toolsets:r}}async function O(a){let o=f.parse(a.config),c=new AbortController,u=()=>c.abort(),d=a.signal??c.signal;d!==c.signal&&(d.aborted?c.abort():d.addEventListener(`abort`,u,{once:!0}));let m,h,v,y;try{if(m=await b({busUrl:o.busUrl,busAuth:o.busAuth,...a.kind===`attempt-bound`?{identityId:a.executionAttemptId}:{}}),v=m.bus.on(p(o.cancelSubject),()=>{c.abort()}),await l(v),a.contributionEntrypoints.length!==a.manifest.contributionRefs.length)throw Error(`Worker contribution materialization does not match the declared contribution identity set.`);if(a.kind===`attempt-bound`){let t=s();y=await e(m.bus,{executionAttemptId:a.executionAttemptId,runtimeIncarnationId:t},{}),await i(m.bus,{executionAttemptId:a.executionAttemptId,runtimeIncarnationId:t,endpoint:y,signal:c.signal}),_?.postMessage(n(o.executionId,o.cancelSubject,a.executionAttemptId))}let u=await E(a.contributionEntrypoints,{bus:m.bus,signal:c.signal});u.toolsets.length>0&&(h=await x(m,u));let d=await r(o);return await g({config:await t(o,d,m.bus,c.signal),loaded:d,bus:m.bus,signal:c.signal})}finally{v?.(),y?.cleanup(),d.removeEventListener(`abort`,u);try{h&&await h.close()}finally{m&&await m.close()}}}export{O as default,O as runWorkflowInWorker};
1
+ import{h as e,l as t,m as n,n as r,s as i,u as a,y as o}from"../../bootstrap-start-client-DrvofWwi.mjs";import{pathToFileURL as s}from"node:url";import*as c from"node:path";import{randomUUID as l}from"node:crypto";import{createBusInstance as u,waitForSubscriptionPropagation as d}from"@makaio/framework/bus";import{FrameworkContractNamespaces as f,FrameworkStorageNamespaces as p,WorkflowWorkerConfigSchema as m,createWorkflowCancelSubject as h}from"@makaio/framework/contracts";import{WebSocketClientTransport as g}from"@makaio/framework/node/transports";import{parentPort as _}from"node:worker_threads";import{runWorkflowOrchestrator as v}from"@makaio/framework/workflow-engine/workflow-orchestrator";import{McpServerBridgeService as y}from"@makaio/framework/mcp-http-server";import{ToolRegistry as b}from"@makaio/framework/services/tools";function x(e){let t=u();if(t.registerNamespaces(f),t.registerNamespaces(p),!e.busUrl)return{bus:t,connect:async e=>e.throwIfAborted(),close:()=>t.disconnect()};let r=n(e.busAuth.kind===`hmac`?e.busAuth.secret:void 0,e.identityId),i=new g({url:e.busUrl,auth:r,autoReconnect:!1});return t.registerTransport(i),{bus:t,async connect(e){try{e.throwIfAborted();let n=()=>t.disconnect();e.addEventListener(`abort`,n,{once:!0});try{await t.connect()}finally{e.removeEventListener(`abort`,n)}e.throwIfAborted()}catch(e){throw t.disconnect(),e}},async close(){await t.disconnect()}}}async function S(e,t=new AbortController().signal){let n=x(e);try{return await n.connect(t),n}catch(e){throw await n.close(),e}}async function C(e,t){let n=new b({bus:e.bus}),r=new y(e.bus),i=async()=>{try{await r.destroy()}finally{n.dispose()}};try{await r.init();for(let e of t.toolsets)await w(n,e)}catch(e){throw await i(),e}return{close:i}}async function w(e,t){await e.register(t)}function T(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.name==`string`?typeof t.tools==`object`&&t.tools!==null||Array.isArray(t.adapters):!1}function E(e,t){if(T(e.default))return e.default;for(let t of Object.keys(e))if(t!==`default`&&T(e[t]))return e[t]}function D(e){return Object.freeze({bus:e?.bus,identity:Object.freeze({extensionName:`__worker__`}),dataDir:``,machineId:``,platform:process.platform,homedir:``,makaioHome:``,username:``,signal:e?.signal??new AbortController().signal,tryImport:async()=>null,getService:()=>{throw Error(`Worker-local contribution context does not expose host services.`)},hasExtension:()=>!1})}async function O(e,t){let n=await Promise.all(e.map(e=>k(e,t))),r=[];for(let e of n)r.push(...e.toolsets);return{toolsets:r}}async function k(e,t){if(!c.isAbsolute(e))throw Error(`Worker contribution entrypoint must be an absolute materialized path: ${e}`);let n=E(await import(s(e).href),e);if(!n)throw Error(`No recognizable extension export in "${e}". Expected a default export or named export with a "name" field and "tools" or "adapters" surface.`);let r=[];if(n.tools?.createToolsets){let e=n.tools.createToolsets(D(t));r.push(...e)}return{toolsets:r}}async function A(e){let n=m.parse(e.config),r=new AbortController,s=()=>r.abort(),c=e.signal??r.signal;c!==r.signal&&(c.aborted?r.abort():c.addEventListener(`abort`,s,{once:!0}));let u,d,f;try{if(e.contributionEntrypoints.length!==e.manifest.contributionRefs.length)throw Error(`Worker contribution materialization does not match the declared contribution identity set.`);if(e.kind===`attempt-bound`){let t=l(),a=await j(e,n,t,r);u=a.connection,f=a.endpoint,await i(u.bus,{executionAttemptId:e.executionAttemptId,runtimeIncarnationId:t,endpoint:f,signal:r.signal}),_?.postMessage(o(n.executionId,n.cancelSubject,e.executionAttemptId))}else u=await M(n,r);let s=await O(e.contributionEntrypoints,{bus:u.bus,signal:r.signal});s.toolsets.length>0&&(d=await C(u,s));let c=await a(n);return await v({config:await t(n,c,u.bus,r.signal),loaded:c,bus:u.bus,signal:r.signal})}finally{f?.cleanup(),c.removeEventListener(`abort`,s);try{d&&await d.close()}finally{u&&await u.close()}}}function j(e,t,n,i){return r({executionAttemptId:e.executionAttemptId,runtimeIncarnationId:n,bootstrapDeadlineAt:e.bootstrapDeadlineAt,signal:i.signal,createConnection:()=>N(x({busUrl:t.busUrl,busAuth:t.busAuth,identityId:e.executionAttemptId}),t.cancelSubject,i)})}async function M(e,t){let n=N({...await S({busUrl:e.busUrl,busAuth:e.busAuth},t.signal),connect:async e=>e.throwIfAborted()},e.cancelSubject,t);try{return await n.connect(t.signal),n}catch(e){throw await n.close(),e}}function N(e,t,n){let r;return{bus:e.bus,async connect(i){await e.connect(i),i.throwIfAborted(),r=e.bus.on(h(t),()=>n.abort()),await d(r),i.throwIfAborted()},async close(){r?.(),r=void 0,await e.close()}}}async function P(t){return t.kind===`attempt-bound`&&await e(t,t.signal),A(t)}export{P as default,A as runWorkflowInWorker};
@@ -293,7 +293,7 @@ declare const sessions: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
293
293
  tableName: "sessions";
294
294
  dataType: "string";
295
295
  columnType: "SQLiteText";
296
- data: "closed" | "discovered" | "active" | "archived";
296
+ data: "closed" | "discovered" | "archived" | "active";
297
297
  driverParam: string;
298
298
  notNull: true;
299
299
  hasDefault: false;
@@ -407,7 +407,7 @@ declare const sessions: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
407
407
  tableName: "sessions";
408
408
  dataType: "string";
409
409
  columnType: "SQLiteText";
410
- data: "fork" | "subagent" | "compress" | "branch" | "rewrite" | "coordinator" | "aside";
410
+ data: "fork" | "subagent" | "compress" | "branch" | "aside" | "rewrite" | "coordinator";
411
411
  driverParam: string;
412
412
  notNull: false;
413
413
  hasDefault: false;
@@ -15,8 +15,8 @@ declare const SubagentTemplateSchema: z.ZodObject<{
15
15
  model: z.ZodOptional<z.ZodString>;
16
16
  systemPrompt: z.ZodOptional<z.ZodString>;
17
17
  contextMode: z.ZodDefault<z.ZodEnum<{
18
- fork: "fork";
19
18
  fresh: "fresh";
19
+ fork: "fork";
20
20
  }>>;
21
21
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
22
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -45,10 +45,6 @@ type SubagentTemplateSummary = z.infer<typeof SubagentTemplateSummarySchema>;
45
45
  declare const SubagentTemplateCreateSchema: z.ZodObject<{
46
46
  name: z.ZodString;
47
47
  enabled: z.ZodDefault<z.ZodBoolean>;
48
- contextMode: z.ZodDefault<z.ZodEnum<{
49
- fork: "fork";
50
- fresh: "fresh";
51
- }>>;
52
48
  adapterName: z.ZodString;
53
49
  providerConfigId: z.ZodOptional<z.ZodString>;
54
50
  model: z.ZodOptional<z.ZodString>;
@@ -56,6 +52,10 @@ declare const SubagentTemplateCreateSchema: z.ZodObject<{
56
52
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
53
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
54
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ contextMode: z.ZodDefault<z.ZodEnum<{
56
+ fresh: "fresh";
57
+ fork: "fork";
58
+ }>>;
59
59
  }, z.core.$strip>;
60
60
  type SubagentTemplateCreate = z.infer<typeof SubagentTemplateCreateSchema>;
61
61
  /**
@@ -69,8 +69,8 @@ declare const SubagentTemplateUpdateSchema: z.ZodObject<{
69
69
  model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
70
70
  systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
71
71
  contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
72
- fork: "fork";
73
72
  fresh: "fresh";
73
+ fork: "fork";
74
74
  }>>>;
75
75
  allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
76
76
  disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
@@ -114,8 +114,8 @@ declare const SubagentTemplateSettingsSchemas: {
114
114
  model: z.ZodOptional<z.ZodString>;
115
115
  systemPrompt: z.ZodOptional<z.ZodString>;
116
116
  contextMode: z.ZodDefault<z.ZodEnum<{
117
- fork: "fork";
118
117
  fresh: "fresh";
118
+ fork: "fork";
119
119
  }>>;
120
120
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
121
121
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -130,10 +130,6 @@ declare const SubagentTemplateSettingsSchemas: {
130
130
  request: z.ZodObject<{
131
131
  name: z.ZodString;
132
132
  enabled: z.ZodDefault<z.ZodBoolean>;
133
- contextMode: z.ZodDefault<z.ZodEnum<{
134
- fork: "fork";
135
- fresh: "fresh";
136
- }>>;
137
133
  adapterName: z.ZodString;
138
134
  providerConfigId: z.ZodOptional<z.ZodString>;
139
135
  model: z.ZodOptional<z.ZodString>;
@@ -141,6 +137,10 @@ declare const SubagentTemplateSettingsSchemas: {
141
137
  allowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
142
138
  disallowedTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
139
  allowedDirectories: z.ZodOptional<z.ZodArray<z.ZodString>>;
140
+ contextMode: z.ZodDefault<z.ZodEnum<{
141
+ fresh: "fresh";
142
+ fork: "fork";
143
+ }>>;
144
144
  }, z.core.$strip>;
145
145
  response: z.ZodObject<{
146
146
  id: z.ZodString;
@@ -155,8 +155,8 @@ declare const SubagentTemplateSettingsSchemas: {
155
155
  model: z.ZodOptional<z.ZodOptional<z.ZodString>>;
156
156
  systemPrompt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
157
157
  contextMode: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
158
- fork: "fork";
159
158
  fresh: "fresh";
159
+ fork: "fork";
160
160
  }>>>;
161
161
  allowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
162
162
  disallowedTools: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
@@ -191,9 +191,9 @@ declare const SubagentTemplateInstanceSchema: z.ZodObject<{
191
191
  status: z.ZodEnum<{
192
192
  completed: "completed";
193
193
  cancelled: "cancelled";
194
+ failed: "failed";
194
195
  running: "running";
195
196
  waiting_input: "waiting_input";
196
- failed: "failed";
197
197
  }>;
198
198
  createdAt: z.ZodString;
199
199
  }, z.core.$strip>;
@@ -222,9 +222,9 @@ declare const SubagentTemplateInstanceStatusSchema: z.ZodObject<{
222
222
  status: z.ZodEnum<{
223
223
  completed: "completed";
224
224
  cancelled: "cancelled";
225
+ failed: "failed";
225
226
  running: "running";
226
227
  waiting_input: "waiting_input";
227
- failed: "failed";
228
228
  }>;
229
229
  result: z.ZodOptional<z.ZodString>;
230
230
  error: z.ZodOptional<z.ZodString>;
@@ -274,9 +274,9 @@ declare const SubagentTemplateKernelSchemas: {
274
274
  status: z.ZodEnum<{
275
275
  completed: "completed";
276
276
  cancelled: "cancelled";
277
+ failed: "failed";
277
278
  running: "running";
278
279
  waiting_input: "waiting_input";
279
- failed: "failed";
280
280
  }>;
281
281
  result: z.ZodOptional<z.ZodString>;
282
282
  error: z.ZodOptional<z.ZodString>;
@@ -102,8 +102,8 @@ declare const ExecutionTargetInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
102
102
  name: z.ZodString;
103
103
  image: z.ZodOptional<z.ZodString>;
104
104
  enabled: z.ZodBoolean;
105
- scope: z.ZodString;
106
105
  busUrl: z.ZodOptional<z.ZodString>;
106
+ scope: z.ZodString;
107
107
  }, z.core.$strip>, z.ZodObject<{
108
108
  type: z.ZodLiteral<"container-isolated">;
109
109
  id: z.ZodString;
@@ -205,8 +205,8 @@ declare const ExecutionTargetSchemas: {
205
205
  name: z.ZodString;
206
206
  image: z.ZodOptional<z.ZodString>;
207
207
  enabled: z.ZodBoolean;
208
- scope: z.ZodString;
209
208
  busUrl: z.ZodOptional<z.ZodString>;
209
+ scope: z.ZodString;
210
210
  }, z.core.$strip>, z.ZodObject<{
211
211
  type: z.ZodLiteral<"container-isolated">;
212
212
  id: z.ZodString;
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./json-value-BBZ6uGwc.mjs";import{z as n}from"zod";const r=[`inline`,`summary`,`link`,`omit`],i=n.string().min(1),a=n.object({kinds:n.array(n.string().min(1)).optional(),hint:i.optional(),depth:n.number().int().min(1).max(20).optional(),nested:n.lazy(()=>o).optional()}),o=n.record(n.string().min(1),a),s=n.enum([`link`,`summary`,`full`]),c=n.object({artifactId:n.string().min(1).optional(),url:n.string().min(1).optional(),label:n.string().min(1)}),l=n.object({id:n.string().min(1),kind:n.string().min(1),revision:n.string().min(1),status:n.string().min(1).optional()}),u=n.object({breadcrumbs:n.array(c),related:n.array(c)}),d=n.object({dashboard:n.string().min(1).optional(),materialized:n.string().min(1).optional()}),f=n.object({type:n.literal(`summary`),title:n.string().min(1),text:n.string().min(1)}),p=n.object({type:n.literal(`properties`),title:n.string().min(1),rows:n.array(n.object({label:n.string().min(1),value:n.string()}))}),m=n.object({type:n.literal(`table`),title:n.string().min(1),columns:n.array(n.string().min(1)),rows:n.array(n.object({cells:n.array(n.string()),link:c.optional()}))}),h=n.object({type:n.literal(`relations`),title:n.string().min(1),groups:n.array(n.object({type:n.string().min(1),items:n.array(c)}))}),g=n.object({type:n.literal(`evidence`),title:n.string().min(1),items:n.array(n.object({kind:n.string().min(1),id:n.string().min(1),locator:n.string().min(1).optional()}))}),_=n.object({type:n.literal(`raw`),title:n.string().min(1),json:t}),v=n.object({type:n.literal(`code`),title:n.string().min(1),language:n.string().min(1),content:n.string()}),y=n.object({type:n.literal(`diagram`),title:n.string().min(1),notation:n.literal(`mermaid`),source:n.string().min(1)}),b=n.discriminatedUnion(`type`,[f,p,m,h,g,_,v,y]),x=n.object({title:n.string().min(1),artifact:l,navigation:u,sections:n.array(b),links:d}),S=e,C=n.object({level:s,params:S.optional()}),w=n.object({kind:n.literal(`entry`),via:n.string().min(1).optional(),collection:n.string().min(1).optional()});function T(e){return(t,r)=>{t.via!==void 0==(t.collection!==void 0)&&r.addIssue({code:n.ZodIssueCode.custom,message:`Entry ${e} must have exactly one of via or collection`})}}const E=n.discriminatedUnion(`kind`,[n.object({kind:n.literal(`own-view`)}),n.object({kind:n.literal(`inline`),hostRelation:n.string().min(1),as:s.optional()}),w.extend({title:n.string().min(1).optional(),hostRelation:n.string().min(1).optional()}).superRefine(T(`affordance`))]),D=n.discriminatedUnion(`kind`,[n.object({kind:n.literal(`own-view`)}),n.object({kind:n.literal(`inline`),hostRelation:n.string().min(1)}),w.superRefine(T(`request`))]);function O(e){return e}const k=n.enum([`title`,`summary`]),A=n.discriminatedUnion(`kind`,[n.object({kind:n.literal(`label`),prefix:n.string().min(1).optional()}),n.object({kind:n.literal(`field`),name:n.string().min(1),fieldId:n.string().min(1).optional()}),n.object({kind:n.literal(`issue-type`),name:n.string().min(1),typeId:n.string().min(1).optional()}),n.object({kind:n.literal(`body-fragment`),slot:n.string().min(1)}),n.object({kind:n.literal(`comment`),template:n.string().min(1)})]),ee=n.object({id:n.string().min(1),provider:n.string().min(1),namespace:n.string().min(1),target:A,appliesTo:n.array(n.enum([`workpiece`,`artifact`,`surface`])).min(1),valueMapping:n.record(n.string(),n.string()).optional(),description:n.string().min(1).optional(),params:e.optional()}),j=n.enum([`status`,`workflow`,`priority`]),M=n.object({path:n.string().min(1),semantic:j.optional(),fromLevel:s.optional(),viewRole:k.optional()}),N=n.object({mode:n.enum([`none`,`surface`,`comment`]),defaultRole:n.enum([`workpiece`,`artifact`]).optional(),semanticEvents:n.array(n.enum([`created`,`revised`,`status-changed`,`observation-added`])).optional(),projectedFields:n.array(M).optional(),affordances:n.array(E).optional()}).superRefine((e,t)=>{if(!e.projectedFields)return;let r=0,i=0;for(let t of e.projectedFields)t.viewRole===`title`&&r++,t.viewRole===`summary`&&i++;r>1&&t.addIssue({code:n.ZodIssueCode.custom,path:[`projectedFields`],message:`At most one projected field may declare viewRole: title`}),i>1&&t.addIssue({code:n.ZodIssueCode.custom,path:[`projectedFields`],message:`At most one projected field may declare viewRole: summary`})}),P=n.object({artifactId:n.string().min(1),provider:n.string().min(1),externalId:n.string().min(1),externalUrl:n.string().optional(),surfaceRole:n.enum([`workpiece`,`artifact`]),lastSyncedRevision:n.string().optional(),metadata:n.record(n.string(),n.unknown()).optional()}),F=n.object({kind:n.string().min(1),id:n.string().min(1),displayName:n.string().optional()}),I=n.object({level:n.string().min(1),ids:n.record(n.string().min(1),n.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:n.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),L=n.object({level:n.string().min(1),ids:n.record(n.string().min(1),n.string().min(1)).optional()}),R=n.object({refClass:n.literal(`artifact`).default(`artifact`),kind:n.string().min(1),id:n.string().min(1),revision:n.string().min(1)}),z=n.object({refClass:n.literal(`local`).default(`local`),artifact:R,localId:n.string().min(1)}),B=n.object({refClass:n.literal(`evidence`).default(`evidence`),kind:n.string().min(1),id:n.string().min(1),revision:n.string().min(1).optional(),locator:n.string().min(1).optional()}),V=n.strictObject({refClass:n.literal(`entity`),entityType:n.string().min(1),id:n.string().min(1)}),te=n.discriminatedUnion(`refClass`,[R,z,B,V]);function ne(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const H=n.preprocess(ne,te),U=n.discriminatedUnion(`refClass`,[R.extend({revision:n.string().min(1).optional()}),z,B,V]);function W(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const G=n.preprocess(W,U),K=n.object({type:n.string().min(1),target:H}),q=n.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),J=n.object({kind:n.string().min(1),actor:F,timestamp:n.number().int().nonnegative(),detail:n.string().optional(),evidenceRef:H.optional()}),Y=n.object({level:q,basis:n.array(J)}),X=n.object({id:n.string().min(1),kind:n.string().min(1),summary:n.string().min(1),detail:n.string().optional(),severity:n.enum([`info`,`warning`,`blocker`]).optional(),tags:n.array(n.string().min(1)).optional(),regarding:n.union([R,z]).optional(),evidence:n.union([R,B]).optional(),actor:F,timestamp:n.number().int().nonnegative()}),Z=n.object({markdown:n.string().optional(),summary:n.string().optional(),plaintext:n.string().optional()}),Q=n.object({kind:n.string().min(1),id:n.string().min(1),revision:n.string().min(1),scope:I,schemaVersion:n.string().min(1),data:e,relations:n.array(K),confidence:Y.optional(),representations:Z.optional(),actor:F,timestamp:n.number().int().nonnegative(),createdAt:n.number().int().nonnegative().optional()}),$=n.enum([`supersedes`,`manual`,`coexist`]),re=n.object({kind:n.string().min(1),description:n.string().trim().min(1),schemaVersion:n.string().min(1),dataSchema:e,scopeSchema:e.optional(),observationSchema:e.optional(),discriminator:n.union([n.string().min(1),n.array(n.string().min(1))]).optional(),conflictPolicy:$,status:n.object({path:n.string().min(1),values:n.array(n.string().min(1)).optional()}).optional(),lifecycle:n.object({defaultRelevance:n.enum([`active`,`fading`,`retired`,`archived`]).optional(),decayPolicy:n.string().min(1).optional()}).optional(),indexedFields:n.array(n.string().min(1)).optional(),searchableFields:n.array(n.string().min(1)).optional(),projection:N.optional(),defaultContext:o.optional()}),ie=n.object({type:n.string().min(1),symmetry:n.enum([`asymmetric`,`symmetric`]),implication:n.string().min(1).optional(),sourceKinds:n.array(n.string().min(1)).optional(),targetKinds:n.array(n.string().min(1)).optional(),targetRefClasses:n.array(n.enum([`artifact`,`local`,`evidence`])).optional()}),ae=n.object({kind:n.string().min(1).optional(),scope:L.optional(),ids:n.array(n.string().min(1)).optional(),currentOnly:n.boolean().optional(),search:n.string().optional(),relation:n.object({type:n.string().min(1).optional(),target:G.optional()}).optional(),confidence:n.object({maxLevel:q.optional(),minLevel:q.optional()}).optional(),indexed:n.record(n.string(),t).optional(),limit:n.number().int().min(1).optional()}),oe=n.object({base:R,target:R}),se=n.object({base:Q,target:Q,changedPaths:n.array(n.string())});export{o as $,E as A,c as B,P as C,k as D,j as E,v as F,h as G,u as H,y as I,d as J,b as K,g as L,S as M,C as N,ee as O,O as P,i as Q,l as R,ie as S,M as T,p as U,x as V,_ as W,r as X,m as Y,a as Z,q as _,re as a,B as b,L as c,K as d,H as f,J as g,I as h,$ as i,D as j,A as k,R as l,Q as m,oe as n,X as o,Z as p,f as q,se as r,ae as s,F as t,G as u,Y as v,N as w,z as x,V as y,s as z};
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";import{WorkerBootstrapDeadlineAtSchema as t}from"@makaio/framework/contracts";import{AdapterAuthConstantSchema as n,AuthEnvironmentVariableNameSchema as r,AuthMethodRefSchema as i}from"@makaio/framework/contracts/auth";const a=[`MAKAIO_GIT_TOKEN`,`MAKAIO_BUS_AUTH_SECRET`],o=n,s=e.object({machineId:e.string().trim().min(1),packageNames:e.array(e.string().trim().min(1)).min(1).refine(e=>new Set(e).size===e.length,{message:`Session runtime package names must be unique.`}).readonly()}).strict().readonly(),c=e.object({sessionId:e.string().trim().min(1),adapterName:e.string().trim().min(1),providerConfigId:e.string().trim().min(1),definitionId:e.string().trim().min(1),runtime:s,auth:e.object({mode:e.enum([`explicit`,`none`]),method:i}).strict().readonly()}).strict().superRefine((t,n)=>{t.auth.method.owner===`provider`&&t.auth.method.providerDefinitionId!==t.definitionId&&n.addIssue({code:e.ZodIssueCode.custom,message:`Provider-owned auth method must belong to the selected provider definition.`,path:[`auth`,`method`,`providerDefinitionId`]})}).readonly(),l=e.object({target:e.string().trim().min(1),values:e.record(e.string().trim().min(1),o).readonly()}).strict().readonly(),u=e.object({selector:c,scrubEnvVars:e.array(r).readonly(),processEnv:e.record(r,e.string()).readonly(),connectorDeliveries:e.array(l).readonly()}).strict().superRefine((t,n)=>{let r=new Set;for(let[i,a]of t.scrubEnvVars.entries())r.has(a)&&n.addIssue({code:e.ZodIssueCode.custom,message:`Duplicate scrub environment variable "${a}".`,path:[`scrubEnvVars`,i]}),r.add(a);for(let i of Object.keys(t.processEnv))r.has(i)||n.addIssue({code:e.ZodIssueCode.custom,message:`Every process-environment auth delivery must also belong to the scrub set.`,path:[`processEnv`,i]});let i=new Set;for(let[r,a]of t.connectorDeliveries.entries())i.has(a.target)&&n.addIssue({code:e.ZodIssueCode.custom,message:`Duplicate connector auth target "${a.target}".`,path:[`connectorDeliveries`,r,`target`]}),i.add(a.target)}).readonly(),d=e.object({busAuthSecret:e.string().optional(),gitToken:e.string().optional(),runtimeEnv:e.record(r,e.string()).optional(),sessionRuntime:s.optional(),adapterAuth:u.optional()}).strict(),f=e.enum([`simple`,`full`]),p=e.enum([`created`,`running`,`stopped`,`destroyed`]),m=e.object({sessionId:e.string(),adapter:e.string(),runtime:f.default(`simple`),image:e.string().optional()}).strict(),h=new Set([`git:`,`http:`,`https:`,`ssh:`]),g=/^git@[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?:[^\s?#]+$/;function _(e,t,n){let r=e.indexOf(`://`);if(e.length===0||e.trim()!==e||r<=0||e.includes(`?`)||e.includes(`#`))return!1;try{let i=new URL(e);if(!t.has(i.protocol)||i.hostname.length===0||i.password.length>0||i.search.length>0||i.hash.length>0)return!1;let a=(e.slice(r+3).split(`/`,1)[0]??``).includes(`@`);return n?!a||i.username.length>0:!a&&i.username.length===0}catch{return!1}}function v(e){if(g.test(e))return!0;try{let t=new URL(e).protocol;return _(e,h,t===`ssh:`)}catch{return!1}}const y=e.string().refine(v,{message:`Repository remote must use a supported credential-free Git URL.`}),b=m.extend({mode:e.literal(`container-local`),repoPath:e.string(),baseBranch:e.string()}).strict(),x=b,S=b.extend({executionId:e.string(),executionAttemptId:e.string(),bootstrapDeadlineAt:t}).strict(),C=e.union([x,S]),w=m.extend({mode:e.literal(`container-isolated`),repoUrl:y,branch:e.string().optional()}).strict(),T=e.union([C,w]),E=e.object({descriptor:T,bootstrapConfig:d}).strict().superRefine((t,n)=>{let r=t.bootstrapConfig.adapterAuth?.selector;if(r===void 0)return;r.sessionId!==t.descriptor.sessionId&&n.addIssue({code:e.ZodIssueCode.custom,message:`Container auth selector session must match the Docker descriptor.`,path:[`bootstrapConfig`,`adapterAuth`,`selector`,`sessionId`]}),r.adapterName!==t.descriptor.adapter&&n.addIssue({code:e.ZodIssueCode.custom,message:`Container auth selector adapter must match the Docker descriptor.`,path:[`bootstrapConfig`,`adapterAuth`,`selector`,`adapterName`]});let i=t.bootstrapConfig.sessionRuntime;if(i===void 0){n.addIssue({code:e.ZodIssueCode.custom,message:`Container auth selector requires a session runtime binding.`,path:[`bootstrapConfig`,`sessionRuntime`]});return}r.runtime.machineId!==i.machineId&&n.addIssue({code:e.ZodIssueCode.custom,message:`Container auth selector machine must match the session runtime.`,path:[`bootstrapConfig`,`adapterAuth`,`selector`,`runtime`,`machineId`]}),(r.runtime.packageNames.length!==i.packageNames.length||r.runtime.packageNames.some((e,t)=>e!==i.packageNames[t]))&&n.addIssue({code:e.ZodIssueCode.custom,message:`Container auth selector packages must exactly match the session runtime selection.`,path:[`bootstrapConfig`,`adapterAuth`,`selector`,`runtime`,`packageNames`]})}).readonly(),D=e.object({containerId:e.string(),worktreePath:e.string().optional(),worktreeBranch:e.string().optional()}),O=e.object({containerId:e.string(),deleteBranch:e.boolean().default(!1)}),k=e.object({success:e.boolean()}),A=e.object({containerId:e.string()}),j=e.object({state:p,sessionId:e.string(),worktreePath:e.string().optional()}),M=e.object({containerId:e.string(),sessionId:e.string(),worktreePath:e.string().optional()}),N=e.object({containerId:e.string(),sessionId:e.string(),worktreePath:e.string().optional()}),P=e.object({containerId:e.string(),sessionId:e.string(),exitCode:e.number()}),F=e.object({containerId:e.string(),sessionId:e.string()}),I=e.object({id:e.string(),name:e.string(),description:e.string().optional(),scope:e.string(),enabled:e.boolean(),createdAt:e.number(),updatedAt:e.number()}),L=I.extend({type:e.literal(`local`)}),R=I.extend({type:e.literal(`container-local`),image:e.string().optional(),env:e.record(e.string(),e.string()).optional(),busUrl:e.string().optional()}),z=I.extend({type:e.literal(`container-isolated`),image:e.string().optional(),env:e.record(e.string(),e.string()).optional(),gitCredentialMode:e.enum([`token`,`ssh-agent`]).default(`token`),repoUrl:y.optional()}),B=e.discriminatedUnion(`type`,[L,R,z]),V=e.enum([`local`,`container-local`,`container-isolated`]),H=e.discriminatedUnion(`type`,[L.omit({createdAt:!0,updatedAt:!0}),R.omit({createdAt:!0,updatedAt:!0}),z.omit({createdAt:!0,updatedAt:!0})]),U=e.object({scope:e.string().optional(),type:V.optional()}),W=e.object({executionTargetId:e.string().optional()}),G={get:{request:e.object({id:e.string()}),response:e.object({executionTarget:B.nullable()})},set:{request:e.object({executionTarget:H}),response:e.object({id:e.string()})},delete:{request:e.object({id:e.string()}),response:e.object({deleted:e.boolean()})},list:{request:U,response:e.object({executionTargets:e.array(B)})},resolve:{request:W,response:e.object({executionTarget:B})},created:B,updated:B,deleted:e.object({id:e.string()})};export{A,s as C,y as D,P as E,O as M,k as N,T as O,f as S,p as T,M as _,W as a,C as b,V as c,u as d,c as f,o as g,l as h,U as i,j,D as k,L as l,E as m,R as n,B as o,d as p,H as r,G as s,z as t,a as u,F as v,N as w,S as x,w as y};