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

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 (491) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/{account-identity-B3vLwm9O.mjs → account-identity-DCBpVurJ.mjs} +1 -1
  3. package/dist/{adapter-Dz1fX5Wa.mjs → adapter-D6IpEDIo.mjs} +1 -1
  4. package/dist/adapters/config/index.d.mts +1 -1
  5. package/dist/adapters/config/index.mjs +1 -1
  6. package/dist/adapters/index.d.mts +2 -2
  7. package/dist/adapters/index.mjs +1 -1
  8. package/dist/adapters/node.d.mts +1 -1
  9. package/dist/adapters/node.mjs +1 -1
  10. package/dist/artifact-OnwP6uaD.mjs +1 -0
  11. package/dist/attempt-record-codec-CqKq0NIB.mjs +1 -0
  12. package/dist/{auth-C6tVtaOX.mjs → auth-CeH3w2fi.mjs} +1 -1
  13. package/dist/authority-state-bootstrap-rnsTk0u7.mjs +1 -0
  14. package/dist/{automation-trigger-ByjNlClm.mjs → automation-trigger-D_xKqEoV.mjs} +1 -1
  15. package/dist/bus/index.mjs +1 -1
  16. package/dist/{caller-owned-adapter-stub-C1M7FKrv.mjs → caller-owned-adapter-stub-egWCuKcE.mjs} +1 -1
  17. package/dist/{canonical-model-DXOvCaVg.mjs → canonical-model-DwuFQ02A.mjs} +1 -1
  18. package/dist/{capabilities-DEvmD9VJ.mjs → capabilities-DGqMG9M3.mjs} +1 -1
  19. package/dist/{client-BkznbdsO.mjs → client-CTqzLpVx.mjs} +1 -1
  20. package/dist/clients/index.d.mts +1 -1
  21. package/dist/clients/index.mjs +1 -1
  22. package/dist/clients/managed-install.d.mts +1 -1
  23. package/dist/clients/managed-install.mjs +1 -1
  24. package/dist/code-execution/worker-entry.d.mts +1 -1
  25. package/dist/code-execution/worker-entry.mjs +1 -1
  26. package/dist/{code-execution-Ckmn8OZu.mjs → code-execution-BMmUATcc.mjs} +1 -1
  27. package/dist/{code-execution-CweDSWco.mjs → code-execution-C2PgBdmE.mjs} +1 -1
  28. package/dist/{code-execution-DqkQjKa1.mjs → code-execution-Mo1jztUH.mjs} +1 -1
  29. package/dist/{compression-CtgeVLpP.mjs → compression-3DauETKU.mjs} +1 -1
  30. package/dist/{config-namespace-CjWvw8ij.mjs → config-namespace-MjFuIPyL.mjs} +1 -1
  31. package/dist/contracts/adapter/index.d.mts +2 -2
  32. package/dist/contracts/adapter/index.mjs +1 -1
  33. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  34. package/dist/contracts/artifact/index.d.mts +3 -3
  35. package/dist/contracts/artifact/index.mjs +1 -1
  36. package/dist/contracts/auth/index.d.mts +2 -2
  37. package/dist/contracts/auth/index.mjs +1 -1
  38. package/dist/contracts/automation-trigger/index.d.mts +3 -3
  39. package/dist/contracts/automation-trigger/index.mjs +1 -1
  40. package/dist/contracts/canonical-model/index.d.mts +1 -1
  41. package/dist/contracts/canonical-model/index.mjs +1 -1
  42. package/dist/contracts/capabilities/index.d.mts +1 -1
  43. package/dist/contracts/capabilities/index.mjs +1 -1
  44. package/dist/contracts/client/index.d.mts +2 -2
  45. package/dist/contracts/client/index.mjs +1 -1
  46. package/dist/contracts/code-execution/index.d.mts +1 -1
  47. package/dist/contracts/code-execution/index.mjs +1 -1
  48. package/dist/contracts/common/index.d.mts +1 -1
  49. package/dist/contracts/config/index.d.mts +1 -1
  50. package/dist/contracts/config/index.mjs +1 -1
  51. package/dist/contracts/extension/index.d.mts +5 -5
  52. package/dist/contracts/extension/index.mjs +1 -1
  53. package/dist/contracts/facet/index.d.mts +1 -1
  54. package/dist/contracts/facet/index.mjs +1 -1
  55. package/dist/contracts/harness/index.d.mts +1 -1
  56. package/dist/contracts/harness/index.mjs +1 -1
  57. package/dist/contracts/host/index.d.mts +1 -1
  58. package/dist/contracts/host/index.mjs +1 -1
  59. package/dist/contracts/index.d.mts +102 -102
  60. package/dist/contracts/index.mjs +1 -1
  61. package/dist/contracts/materialization/index.d.mts +2 -3
  62. package/dist/contracts/materialization/index.mjs +1 -1
  63. package/dist/contracts/model-registry/index.d.mts +1 -1
  64. package/dist/contracts/model-registry/index.mjs +1 -1
  65. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  66. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  67. package/dist/contracts/platform/index.d.mts +1 -1
  68. package/dist/contracts/platform/index.mjs +1 -1
  69. package/dist/contracts/provider/index.d.mts +2 -2
  70. package/dist/contracts/provider/index.mjs +1 -1
  71. package/dist/contracts/reaction/index.d.mts +1 -1
  72. package/dist/contracts/reaction/index.mjs +1 -1
  73. package/dist/contracts/session/index.d.mts +2 -2
  74. package/dist/contracts/session/index.mjs +1 -1
  75. package/dist/contracts/shared/index.d.mts +2 -2
  76. package/dist/contracts/shared/index.mjs +1 -1
  77. package/dist/contracts/skill/index.d.mts +1 -1
  78. package/dist/contracts/skill/index.mjs +1 -1
  79. package/dist/contracts/telemetry/index.d.mts +1 -1
  80. package/dist/contracts/telemetry/index.mjs +1 -1
  81. package/dist/contracts/timeout/index.d.mts +1 -1
  82. package/dist/contracts/timeout/index.mjs +1 -1
  83. package/dist/contracts/toast/index.mjs +1 -1
  84. package/dist/contracts/variant/index.d.mts +1 -1
  85. package/dist/contracts/variant/index.mjs +1 -1
  86. package/dist/contracts/worker/index.d.mts +1 -1
  87. package/dist/contracts/worker/index.mjs +1 -1
  88. package/dist/contracts/workflow/index.d.mts +2 -2
  89. package/dist/contracts/workflow/index.mjs +1 -1
  90. package/dist/{contribution-Crm-mctl.d.mts → contribution-BoTMoHVB.d.mts} +2 -2
  91. package/dist/{definition-u_5rYQtc.d.mts → definition-BgY763Q4.d.mts} +1 -1
  92. package/dist/{definition-BH4QLGLI.mjs → definition-YGj42UeO.mjs} +1 -1
  93. package/dist/{detached-extension-handle-DAXKQT9c.mjs → detached-extension-handle-B9c_6Pcb.mjs} +1 -1
  94. package/dist/execution-attempt-owner-recovery-BNERIDH0.mjs +1 -0
  95. package/dist/{execution-attempt-repository-CgB7uiYD.d.mts → execution-attempt-repository-CtFZfBfp.d.mts} +111 -3
  96. package/dist/{execution-target-BcoF_oDB.mjs → execution-target-CqaBmnvX.mjs} +1 -1
  97. package/dist/{extension-Bfkr2DBs.mjs → extension-B51JzHJu.mjs} +1 -1
  98. package/dist/extension-C4lFc8-j.mjs +1 -0
  99. package/dist/{filesystem-service-CiUw0YN5.mjs → filesystem-service-DGqU-6x-.mjs} +1 -1
  100. package/dist/framework-packages-CZJDukan.mjs +1 -0
  101. package/dist/git/index.mjs +1 -1
  102. package/dist/{globby-QBDqstzq.mjs → globby-BT0rrriG.mjs} +1 -1
  103. package/dist/{handlers-BsHAFtye.mjs → handlers-CBbFzDHc.mjs} +1 -1
  104. package/dist/{harness-YQ2ewID9.mjs → harness-GNtHsoh4.mjs} +1 -1
  105. package/dist/{hook-responses-DcapjzLb.d.mts → hook-responses-BSCAdJ3i.d.mts} +1 -1
  106. package/dist/{index-QJW9g1mG.d.mts → index-BVRQOZbm.d.mts} +1 -1
  107. package/dist/{index-LryUXslm.d.mts → index-BZlmWCcW.d.mts} +3 -3
  108. package/dist/{index-rygpcDBV.d.mts → index-BZtasAZP.d.mts} +1 -1
  109. package/dist/{index-Bsr4rZl0.d.mts → index-BdbYIlDL.d.mts} +18 -18
  110. package/dist/{index-BxOFB25y.d.mts → index-BkY6zO7p.d.mts} +138 -115
  111. package/dist/{index-DZXpKlyB.d.mts → index-CDLHgV7v.d.mts} +14 -14
  112. package/dist/{index-CfJKwWJa.d.mts → index-CQtttPGm.d.mts} +1 -1
  113. package/dist/{index-BADuMxcP.d.mts → index-CYmQt2lF.d.mts} +100 -100
  114. package/dist/{index-J-kv32zv.d.mts → index-CYwbfa0_.d.mts} +2 -2
  115. package/dist/{index-DZnb56vt2.d.mts → index-C_OLvAr_.d.mts} +1 -1
  116. package/dist/{index-BvgLFm-U.d.mts → index-Cau0jTTM.d.mts} +1 -1
  117. package/dist/{index-BwccWakG.d.mts → index-D0DfEO45.d.mts} +1 -1
  118. package/dist/{index-COOM1j_L2.d.mts → index-DIYgFhTZ2.d.mts} +4 -4
  119. package/dist/{index-LOh6AEqx.d.mts → index-DJ0Muy2s.d.mts} +4 -4
  120. package/dist/{index-C1PfDEIV.d.mts → index-F6hV4tWI.d.mts} +35 -35
  121. package/dist/{index-CiKzWCW02.d.mts → index-LwOw7ZLk2.d.mts} +19 -19
  122. package/dist/{index-BakMNLkB.d.mts → index-PTp68NH1.d.mts} +92 -92
  123. package/dist/{index-vXmPEZ5O.d.mts → index-R2BZejEz.d.mts} +591 -726
  124. package/dist/{index-DIhkK4Y0.d.mts → index-RpG4EP3u.d.mts} +1 -1
  125. package/dist/{index-Bo3LRb2u.d.mts → index-dL0Oet1j.d.mts} +1 -1
  126. package/dist/{index-Cbv_3Xi12.d.mts → index-mylsCg6V2.d.mts} +1 -1
  127. package/dist/{index-BDzqNCXs.d.mts → index-nPpqnP7P.d.mts} +1 -1
  128. package/dist/kernel/cli/index.d.mts +2 -2
  129. package/dist/kernel/cli/index.mjs +1 -1
  130. package/dist/kernel/cli/register.d.mts +1 -1
  131. package/dist/kernel/cli/register.mjs +1 -1
  132. package/dist/kernel/cli/schemas.mjs +1 -1
  133. package/dist/kernel/extension/index.d.mts +1 -1
  134. package/dist/kernel/extension/index.mjs +1 -1
  135. package/dist/kernel/index.d.mts +5 -5
  136. package/dist/kernel/index.mjs +1 -1
  137. package/dist/kernel/namespace/index.d.mts +1 -1
  138. package/dist/kernel/namespace/index.mjs +1 -1
  139. package/dist/kernel/observability/index.d.mts +1 -1
  140. package/dist/kernel/observability/index.mjs +1 -1
  141. package/dist/kernel/providers/index.d.mts +1 -1
  142. package/dist/kernel/providers/index.mjs +1 -1
  143. package/dist/kernel/window/index.d.mts +1 -1
  144. package/dist/kernel/window/index.mjs +1 -1
  145. package/dist/kind-registration-BNhVCSaT.mjs +1 -0
  146. package/dist/{lib-271rPR7A.mjs → lib-B8Yv4IY-.mjs} +1 -1
  147. package/dist/{lib-RFpLjUda.mjs → lib-hwdGyO-m.mjs} +1 -1
  148. package/dist/{load-extensions-D9inWcDy.mjs → load-extensions-CNT2Nd9h.mjs} +1 -1
  149. package/dist/{load-extensions-CY8ELnCp.d.mts → load-extensions-D0yT_Kta.d.mts} +1 -1
  150. package/dist/materialization-Dx1z_MDj.mjs +1 -0
  151. package/dist/mcp-http-server/index.mjs +1 -1
  152. package/dist/model-B6t_-_sp.mjs +1 -0
  153. package/dist/{namespace-BymM0nl_.d.mts → namespace-C7wggVcn.d.mts} +9 -9
  154. package/dist/namespace-D4zmxaC4.mjs +1 -0
  155. package/dist/{namespace-DdqVQSyc.d.mts → namespace-Dh5fTXYt.d.mts} +2 -2
  156. package/dist/{namespace-DlrX8feY.d.mts → namespace-WeSQXdAL.d.mts} +45 -45
  157. package/dist/{namespace-BL7lHlmg.mjs → namespace-ZAIFBrIy.mjs} +1 -1
  158. package/dist/{native-session-supervisor-LKio8XZn.mjs → native-session-supervisor-BlGzmZrH.mjs} +1 -1
  159. package/dist/node/bus-server/index.d.mts +1 -1
  160. package/dist/node/bus-server/index.mjs +1 -1
  161. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  162. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  163. package/dist/{orchestrator-shared-BGlN-m-V.mjs → orchestrator-shared-BKMtjTE9.mjs} +1 -1
  164. package/dist/{ownership-memory-handler-BpGdR_uG.mjs → ownership-memory-handler-BCu1EjFO.mjs} +1 -1
  165. package/dist/{package-DkpF17X_.d.mts → package-C9XYuN9J.d.mts} +20 -6
  166. package/dist/{package-CzKoZ1k0.mjs → package-D7c2HC-S.mjs} +2 -2
  167. package/dist/{package-JtjbO-Oi.mjs → package-buHQFmTH.mjs} +1 -1
  168. package/dist/package.json +1 -1
  169. package/dist/packages-BhhBcPgz.mjs +1 -0
  170. package/dist/{packages-Cx-BwSZr.d.mts → packages-DAqep89i.d.mts} +12 -39
  171. package/dist/{profile-N5qGUpF0.mjs → profile-DBDvy9uc.mjs} +1 -1
  172. package/dist/{provider-context-zTDSH2x9.mjs → provider-context-CSb0qX1c.mjs} +1 -1
  173. package/dist/{provider-context-CG42JlP9.mjs → provider-context-CTOrOW54.mjs} +1 -1
  174. package/dist/{reaction-D3TNwPK8.mjs → reaction-OQibmmDW.mjs} +1 -1
  175. package/dist/{resolved-sq8RXNDf.mjs → resolved-ONt3rOMh.mjs} +1 -1
  176. package/dist/rules/index.d.mts +1 -1
  177. package/dist/rules/index.mjs +1 -1
  178. package/dist/rules/schemas.d.mts +1 -1
  179. package/dist/runtime-bun/index.mjs +1 -1
  180. package/dist/runtime-node/code-execution/index.d.mts +2 -2
  181. package/dist/runtime-node/code-execution/index.mjs +1 -1
  182. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  183. package/dist/runtime-node/extension-validation.d.mts +1 -1
  184. package/dist/runtime-node/extension-validation.mjs +1 -1
  185. package/dist/runtime-node/index.d.mts +6 -6
  186. package/dist/runtime-node/index.mjs +20 -20
  187. package/dist/runtime-node/makaio-config.d.mts +1 -1
  188. package/dist/runtime-node/makaio-config.mjs +1 -1
  189. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  190. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  191. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  192. package/dist/{schema-Dq-7si8u.mjs → schema-B8jinlbH.mjs} +1 -1
  193. package/dist/{schema-C9PauHXt.d.mts → schema-wArHaxA9.d.mts} +2 -2
  194. package/dist/{schemas-QWDnauKX.mjs → schemas-BUK9I-Oz.mjs} +1 -1
  195. package/dist/{schemas-BDZFd3Wb.d.mts → schemas-BjNlwTDl.d.mts} +2 -2
  196. package/dist/{context-resolution-BrtoXnez.d.mts → schemas-C5FreSE0.d.mts} +133 -539
  197. package/dist/{schemas-_2Syo_01.mjs → schemas-CSDiTBsU.mjs} +1 -1
  198. package/dist/{schemas-BfO5jkrL.mjs → schemas-CbhvgFQs.mjs} +1 -1
  199. package/dist/schemas-hzbKeyyt.mjs +1 -0
  200. package/dist/{selection-DL3ric7K.mjs → selection-7SkHsmWs.mjs} +1 -1
  201. package/dist/services/adapter-runtime/index.d.mts +3 -3
  202. package/dist/services/adapter-runtime/index.mjs +1 -1
  203. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  204. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  205. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  206. package/dist/services/adapter-subsystem/index.mjs +1 -1
  207. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  208. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  209. package/dist/services/agent-runtime/index.d.mts +2 -2
  210. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  211. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  212. package/dist/services/automation-trigger/index.mjs +1 -1
  213. package/dist/services/capability/index.d.mts +2 -2
  214. package/dist/services/capability/index.mjs +1 -1
  215. package/dist/services/code-execution/index.d.mts +1 -1
  216. package/dist/services/code-execution/index.mjs +1 -1
  217. package/dist/services/codebase/index.d.mts +2 -2
  218. package/dist/services/codebase/namespace.d.mts +1 -1
  219. package/dist/services/codebase/schemas.d.mts +1 -1
  220. package/dist/services/compression/index.d.mts +2 -2
  221. package/dist/services/compression/namespace.d.mts +1 -1
  222. package/dist/services/compression/schemas.d.mts +1 -1
  223. package/dist/services/context-rules/index.d.mts +1 -1
  224. package/dist/services/context-rules/index.mjs +1 -1
  225. package/dist/services/execution-target/index.d.mts +3 -3
  226. package/dist/services/execution-target/index.mjs +1 -1
  227. package/dist/services/execution-target/namespace.d.mts +1 -1
  228. package/dist/services/execution-target/namespace.mjs +1 -1
  229. package/dist/services/execution-target/schemas.d.mts +1 -1
  230. package/dist/services/execution-target/schemas.mjs +1 -1
  231. package/dist/services/filesystem/index.d.mts +1 -1
  232. package/dist/services/filesystem/index.mjs +1 -1
  233. package/dist/services/git/namespace.mjs +1 -1
  234. package/dist/services/git/schemas.mjs +1 -1
  235. package/dist/services/harness/index.mjs +1 -1
  236. package/dist/services/index.d.mts +45 -66
  237. package/dist/services/index.mjs +1 -1
  238. package/dist/services/log-import/browser.d.mts +2 -2
  239. package/dist/services/log-import/index.d.mts +2 -2
  240. package/dist/services/log-import/log-import.d.mts +1 -1
  241. package/dist/services/log-import/log-import.mjs +1 -1
  242. package/dist/services/log-import/namespace.mjs +1 -1
  243. package/dist/services/log-import/schemas.mjs +1 -1
  244. package/dist/services/materialization/index.d.mts +13 -34
  245. package/dist/services/materialization/index.mjs +1 -1
  246. package/dist/services/model-registry/index.d.mts +1 -1
  247. package/dist/services/model-registry/index.mjs +1 -1
  248. package/dist/services/preferences/index.d.mts +2 -2
  249. package/dist/services/preferences/schemas.d.mts +1 -1
  250. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  251. package/dist/services/provider-context/index.d.mts +1 -1
  252. package/dist/services/provider-context/index.mjs +1 -1
  253. package/dist/services/provider-runtime/index.mjs +1 -1
  254. package/dist/services/session/handlers/index.d.mts +1 -1
  255. package/dist/services/session/handlers/index.mjs +1 -1
  256. package/dist/services/session/index.d.mts +9 -9
  257. package/dist/services/session/index.mjs +1 -1
  258. package/dist/services/session/messages/namespace.d.mts +1 -1
  259. package/dist/services/session/messages/namespace.mjs +1 -1
  260. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  261. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  262. package/dist/services/session/session-events/namespace.d.mts +1 -1
  263. package/dist/services/session/session-events/namespace.mjs +1 -1
  264. package/dist/services/session/storage/namespace.d.mts +1 -1
  265. package/dist/services/session/storage/schema.d.mts +1 -1
  266. package/dist/services/session/testing/index.mjs +1 -1
  267. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  268. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  269. package/dist/services/session/turns/namespace.d.mts +1 -1
  270. package/dist/services/session/turns/namespace.mjs +1 -1
  271. package/dist/services/session-editor/index.d.mts +1 -1
  272. package/dist/services/session-editor/index.mjs +1 -1
  273. package/dist/services/settings/index.d.mts +3 -3
  274. package/dist/services/settings/index.mjs +1 -1
  275. package/dist/services/settings/namespace.mjs +1 -1
  276. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  277. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  278. package/dist/services/settings/storage/index.d.mts +3 -3
  279. package/dist/services/settings/storage/index.mjs +1 -1
  280. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  281. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  282. package/dist/services/subagent/index.d.mts +1 -1
  283. package/dist/services/subagent/index.mjs +1 -1
  284. package/dist/services/subagent-template/index.d.mts +2 -2
  285. package/dist/services/subagent-template/namespace.d.mts +1 -1
  286. package/dist/services/subagent-template/schemas.d.mts +1 -1
  287. package/dist/services/tool-approval/index.d.mts +1 -1
  288. package/dist/services/tool-approval/index.mjs +1 -1
  289. package/dist/services/tools/index.d.mts +1 -1
  290. package/dist/services/tools/index.mjs +1 -1
  291. package/dist/services/tray-menu/index.d.mts +3 -3
  292. package/dist/services/tray-menu/index.mjs +1 -1
  293. package/dist/services/tray-menu/namespace.d.mts +1 -1
  294. package/dist/services/tray-menu/schemas.d.mts +1 -1
  295. package/dist/services/turn/index.d.mts +1 -1
  296. package/dist/services/turn/namespace.d.mts +1 -1
  297. package/dist/services/workflow-transitions/index.d.mts +1 -1
  298. package/dist/services/workflow-transitions/index.mjs +1 -1
  299. package/dist/{session-CXOPk3yg.mjs → session-BDFNAcuY.mjs} +1 -1
  300. package/dist/{session-BOpTI79g.mjs → session-CQAuApxe.mjs} +1 -1
  301. package/dist/{shared-B9AWRm9A.mjs → shared-BYP7z9xy.mjs} +1 -1
  302. package/dist/{skill-DGNtc_ww.mjs → skill-1gU2q1KT.mjs} +1 -1
  303. package/dist/{src-DEgV239R.mjs → src-D4Gx0QHf.mjs} +1 -1
  304. package/dist/storage/drizzle/client.d.mts +1 -1
  305. package/dist/storage/drizzle/client.mjs +1 -1
  306. package/dist/storage/drizzle/index.d.mts +1 -1
  307. package/dist/storage/drizzle/index.mjs +1 -1
  308. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  309. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  310. package/dist/storage/handlers/index.d.mts +1 -1
  311. package/dist/storage/handlers/index.mjs +1 -1
  312. package/dist/{tool-approval-service-BFDOFUGC.mjs → tool-approval-service-7mzJVMo_.mjs} +1 -1
  313. package/dist/{tools-DWKWX3eV.mjs → tools-Cyo6BuGM.mjs} +1 -1
  314. package/dist/{transition-DFA_ckdP.d.mts → transition-CwMPKBjz.d.mts} +2 -2
  315. package/dist/{types-p55qvq922.d.mts → types-BOF825V52.d.mts} +1 -1
  316. package/dist/{types-DkfDRSTr.d.mts → types-Dg_acP9p.d.mts} +36 -36
  317. package/dist/ui-kernel/index.d.mts +1 -1
  318. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  319. package/dist/{version-BYeVh1pI.mjs → version-3xWJDCeF.mjs} +1 -1
  320. package/dist/{view-builder-CYW_9n4A.d.mts → view-builder-D76L0Db8.d.mts} +209 -15
  321. package/dist/{visibility-DtDLRBdr.mjs → visibility-C5sLzqyS.mjs} +1 -1
  322. package/dist/{worker-B4nD_Erm.mjs → worker-9X0QNB1k.mjs} +1 -1
  323. package/dist/{worker-CLsRbzpk.mjs → worker-BwUhRg7i.mjs} +1 -1
  324. package/dist/workflow-B3MWrYhG.mjs +1 -0
  325. package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -2
  326. package/dist/workflow-engine/execution-attempt-repository.mjs +1 -1
  327. package/dist/workflow-engine/index.d.mts +52 -52
  328. package/dist/workflow-engine/index.mjs +1 -1
  329. package/dist/workflow-engine/package.d.mts +1 -1
  330. package/dist/workflow-engine/package.mjs +1 -1
  331. package/dist/workflow-engine/provider-operation.d.mts +1 -1
  332. package/dist/workflow-engine/testing/conformance.d.mts +1 -1
  333. package/dist/workflow-engine/testing/conformance.mjs +3 -1
  334. package/dist/workflow-engine/testing/index.d.mts +9 -6
  335. package/dist/workflow-engine/testing/index.mjs +1 -1
  336. package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
  337. package/dist/workflow-engine/testing/sqlite.mjs +63 -55
  338. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  339. package/dist/{workflow-transitions-c_VQbyV0.mjs → workflow-transitions-B7HtjuAn.mjs} +1 -1
  340. package/dist/workflow-worker-zYb2UguP.mjs +2 -0
  341. package/package.json +1 -1
  342. package/dist/artifact-ClvHqL3w.mjs +0 -1
  343. package/dist/attempt-record-codec-B32Whx75.mjs +0 -1
  344. package/dist/authority-state-bootstrap-7Cgb9TR2.mjs +0 -1
  345. package/dist/extension-Cz39YNXy.mjs +0 -1
  346. package/dist/framework-packages-BHgul8Kl.mjs +0 -1
  347. package/dist/materialization-B_LA9pfy.mjs +0 -1
  348. package/dist/model-DrzPt3ou.mjs +0 -1
  349. package/dist/namespace-sCPb79-7.mjs +0 -1
  350. package/dist/packages-Bp124-gx.mjs +0 -1
  351. package/dist/schemas-CNkUEbIr.mjs +0 -1
  352. package/dist/workflow-H8hsEikC.mjs +0 -1
  353. package/dist/workflow-worker-CmIkKnpF.mjs +0 -2
  354. /package/dist/{adapter-auth-runtime-DHHppU4f.mjs → adapter-auth-runtime-DGY1CDxj.mjs} +0 -0
  355. /package/dist/{adapter-binding-D68U_Hmh.d.mts → adapter-binding-fGIz-ss3.d.mts} +0 -0
  356. /package/dist/{ajv-krzJXh1X.mjs → ajv-DWgn_plp.mjs} +0 -0
  357. /package/dist/{attach-error-Cb3GbeKe.mjs → attach-error-B-vXQFLQ.mjs} +0 -0
  358. /package/dist/{attempt-fixtures-CnrnF5_4.mjs → attempt-fixtures-Dpfgqll0.mjs} +0 -0
  359. /package/dist/{base-orchestrator-DA95InJU.d.mts → base-orchestrator-BeLqYKJG.d.mts} +0 -0
  360. /package/dist/{bootstrap-start-client-DrvofWwi.mjs → bootstrap-start-client-BYoxrgMk.mjs} +0 -0
  361. /package/dist/{capability-j3NekkIu.mjs → capability-Bw4tsDQu.mjs} +0 -0
  362. /package/dist/{capability-service-s4ZYSEWc.d.mts → capability-service-BlYnun2M.d.mts} +0 -0
  363. /package/dist/{client-f5A-6La5.d.mts → client-CtOWHpFB.d.mts} +0 -0
  364. /package/dist/{client-binary-version-verifier-kd9LP9AQ.d.mts → client-binary-version-verifier-BwmToeS1.d.mts} +0 -0
  365. /package/dist/{client-binary-version-verifier-0lCKZOTg.mjs → client-binary-version-verifier-sv-Uv0lB.mjs} +0 -0
  366. /package/dist/{clients-namespace-q4PqU1cA.d.mts → clients-namespace-Bf73bcZh.d.mts} +0 -0
  367. /package/dist/{config-namespace-Cp71zTT0.d.mts → config-namespace-BbLLd4V0.d.mts} +0 -0
  368. /package/dist/{create-static-mount-CmQgA0jq.mjs → create-static-mount-BQnyEUH1.mjs} +0 -0
  369. /package/dist/{cross-spawn-CZygZJMH.mjs → cross-spawn-DPrJR9Nq.mjs} +0 -0
  370. /package/dist/{cursor-storage-bsc9lZKk.mjs → cursor-storage-iJ6vBOWd.mjs} +0 -0
  371. /package/dist/{definition-BHSzhrUf.d.mts → definition-aS9AM2ht.d.mts} +0 -0
  372. /package/dist/{definitions-CRpdnHYM.mjs → definitions-CYZTuMdL.mjs} +0 -0
  373. /package/dist/{descriptor-to-package-CcjdoWP4.mjs → descriptor-to-package-FBkLjHZo.mjs} +0 -0
  374. /package/dist/{drizzle-Bzc-OGVI.mjs → drizzle-CIf_jdYI.mjs} +0 -0
  375. /package/dist/{esm-i-S5TW72.mjs → esm-BH4Kmq3r.mjs} +0 -0
  376. /package/dist/{event-B8ELuk6k.mjs → event-m7_IdhOS.mjs} +0 -0
  377. /package/dist/{execution-attempt-repository-D0cCU7dI.mjs → execution-attempt-repository-D_qR7NyG.mjs} +0 -0
  378. /package/dist/{extension-context-BmU5XKjI.d.mts → extension-context-41A1ZUus.d.mts} +0 -0
  379. /package/dist/{extension-discovery-DnO7bINK.d.mts → extension-discovery-DNB1VVsV.d.mts} +0 -0
  380. /package/dist/{extension-namespace-QoTTwKPt.mjs → extension-namespace-twXNwE4R.mjs} +0 -0
  381. /package/dist/{extension-package-provenance-aYrZuS4W.mjs → extension-package-provenance-CTYdo0yF.mjs} +0 -0
  382. /package/dist/{facet-BnMh7Jyc.mjs → facet-Cly0VpTI.mjs} +0 -0
  383. /package/dist/{filesystem-service-BBArEDPL.d.mts → filesystem-service-DOrm4Llq.d.mts} +0 -0
  384. /package/dist/{handler-DF1fVDpf.mjs → handler-COkV00I9.mjs} +0 -0
  385. /package/dist/{host-B-_ntOMH.mjs → host-CiHn8Yog.mjs} +0 -0
  386. /package/dist/{identity-OjRlG6dZ.mjs → identity-BULrIHmo.mjs} +0 -0
  387. /package/dist/{index-xaBSwHxJ.d.mts → index-BB4EWIf3.d.mts} +0 -0
  388. /package/dist/{index-DYHxzwok2.d.mts → index-BBq5I7SB2.d.mts} +0 -0
  389. /package/dist/{index-NhW2h2wH2.d.mts → index-BJjdUzfw2.d.mts} +0 -0
  390. /package/dist/{index-CsFN2nv7.d.mts → index-BKvzOrbF.d.mts} +0 -0
  391. /package/dist/{index-D-JbTXIH.d.mts → index-BO8n7zAS.d.mts} +0 -0
  392. /package/dist/{index-Co1da7YK.d.mts → index-BbAqoQmv.d.mts} +0 -0
  393. /package/dist/{index-DSLTgc7h2.d.mts → index-BcTwLu9C2.d.mts} +0 -0
  394. /package/dist/{index-Dn_SGTgp.d.mts → index-Bg5iXHk5.d.mts} +0 -0
  395. /package/dist/{index-CPWBGotQ.d.mts → index-BiXqOfhl.d.mts} +0 -0
  396. /package/dist/{index-DSN2t48K.d.mts → index-BjaQsfAr.d.mts} +0 -0
  397. /package/dist/{index-mK-rgiit.d.mts → index-Bk865qJX.d.mts} +0 -0
  398. /package/dist/{index-CkpR5sIH.d.mts → index-Bq4PHWe9.d.mts} +0 -0
  399. /package/dist/{index-DW4SE_sH.d.mts → index-CUHWylh4.d.mts} +0 -0
  400. /package/dist/{index-CcrXttC02.d.mts → index-CavvxFdG2.d.mts} +0 -0
  401. /package/dist/{index-CDLf3Fka2.d.mts → index-Cb3NfGSV2.d.mts} +0 -0
  402. /package/dist/{index-Df1c_2PF.d.mts → index-Ce_l029J.d.mts} +0 -0
  403. /package/dist/{index-D94yE5Dr.d.mts → index-CgVdz5IV.d.mts} +0 -0
  404. /package/dist/{index-KAAnSRZt.d.mts → index-Ck5amD5_.d.mts} +0 -0
  405. /package/dist/{index-BB0HypzC.d.mts → index-ClJjlOox.d.mts} +0 -0
  406. /package/dist/{index-CGJgZGqN.d.mts → index-CoGo6HFE.d.mts} +0 -0
  407. /package/dist/{index-CrcfeFOo.d.mts → index-DR9-fFwc.d.mts} +0 -0
  408. /package/dist/{index-B-zl-O-Y.d.mts → index-Q29tcu5N.d.mts} +0 -0
  409. /package/dist/{index-DQD2-jcL.d.mts → index-VVJqONaI.d.mts} +0 -0
  410. /package/dist/{index-D6RMsZko.d.mts → index-gK54T8Am.d.mts} +0 -0
  411. /package/dist/{index-D_sMzTvv.d.mts → index-jW7MJ2_q.d.mts} +0 -0
  412. /package/dist/{index-CBixkF0n.d.mts → index-l5HeyxKn.d.mts} +0 -0
  413. /package/dist/{index-BDAfOYSw2.d.mts → index-oucWFlFP2.d.mts} +0 -0
  414. /package/dist/{index-Bf2MgOni.d.mts → index-z-YJG2cw.d.mts} +0 -0
  415. /package/dist/{index-C9xVZ-gt.d.mts → index-zvgQ8ErF.d.mts} +0 -0
  416. /package/dist/{json-value-pX6xnLGw.d.mts → json-value-C57MkQrB.d.mts} +0 -0
  417. /package/dist/{json-value-BBZ6uGwc.mjs → json-value-DM-EjTC1.mjs} +0 -0
  418. /package/dist/{jsonl-transport-DQIlRX_y.mjs → jsonl-transport-QQuABrN7.mjs} +0 -0
  419. /package/dist/{lib-6eNAiNK7.mjs → lib-Sx8gBJvV.mjs} +0 -0
  420. /package/dist/{model-registry-C9rFu3kV.mjs → model-registry-B7ThN_s3.mjs} +0 -0
  421. /package/dist/{model-registry-Cixxx2jv.mjs → model-registry-DNHDnyvs.mjs} +0 -0
  422. /package/dist/{modes-DwsJ3yVl.mjs → modes-CyG4sgs_.mjs} +0 -0
  423. /package/dist/{namespace-NXm_zvL1.mjs → namespace-BFlSY040.mjs} +0 -0
  424. /package/dist/{namespace-DiwqpB-c.mjs → namespace-BGgY903U.mjs} +0 -0
  425. /package/dist/{namespace-BMG3RCdr.d.mts → namespace-BY5-nA4j.d.mts} +0 -0
  426. /package/dist/{namespace-CVg_cpkh.d.mts → namespace-Bn-ryJn5.d.mts} +0 -0
  427. /package/dist/{namespace-Cs-cOyrn.d.mts → namespace-By3nEmBH.d.mts} +0 -0
  428. /package/dist/{namespace-Du0accdE.mjs → namespace-C9d0aoYT.mjs} +0 -0
  429. /package/dist/{namespace-Dw5H_KCF.d.mts → namespace-CPC1vbOu.d.mts} +0 -0
  430. /package/dist/{namespace-CPR2xem0.d.mts → namespace-Ca4sQ8X-.d.mts} +0 -0
  431. /package/dist/{namespace-BoyqQiW9.d.mts → namespace-D1qK-Ed3.d.mts} +0 -0
  432. /package/dist/{namespace-9ychTEk_.d.mts → namespace-DE3oGhaN.d.mts} +0 -0
  433. /package/dist/{namespace-DG0hjPcx.d.mts → namespace-DENdNdK0.d.mts} +0 -0
  434. /package/dist/{namespace-jVTsuZHX.mjs → namespace-DHrItZyM.mjs} +0 -0
  435. /package/dist/{namespace-DykqxEyX.d.mts → namespace-DInMixc8.d.mts} +0 -0
  436. /package/dist/{namespace-CQEYu8az.d.mts → namespace-DP0WWpTO.d.mts} +0 -0
  437. /package/dist/{namespace-BGDq7HmW.d.mts → namespace-DkAlBY9o.d.mts} +0 -0
  438. /package/dist/{namespace-BW3Bfu9h.mjs → namespace-QXCaZK3I.mjs} +0 -0
  439. /package/dist/{namespace-tjoxekmf.mjs → namespace-ZN49zpqw.mjs} +0 -0
  440. /package/dist/{orchestrator-shared-BzqqcY2z.d.mts → orchestrator-shared-2vuCvljs.d.mts} +0 -0
  441. /package/dist/{out-8bOYN6EF.mjs → out-Rz-t3WeC.mjs} +0 -0
  442. /package/dist/{ownership-recovery-guard-DyW5vGBr.mjs → ownership-recovery-guard-Ce9-C5Sa.mjs} +0 -0
  443. /package/dist/{package-DttKA9wN.mjs → package-DfjGt5oK.mjs} +0 -0
  444. /package/dist/{package-EGTn-Ng1.mjs → package-Tt2uoAFf.mjs} +0 -0
  445. /package/dist/{platform-CxyYPrkf.mjs → platform-C-fDsuEl.mjs} +0 -0
  446. /package/dist/{provider-operation-B2wQST6N.d.mts → provider-operation-BwrIrOeY.d.mts} +0 -0
  447. /package/dist/{providers-C-eekMxD.mjs → providers-DVlsnJaY.mjs} +0 -0
  448. /package/dist/{providers-namespace-DsKTnuO1.d.mts → providers-namespace-C56pGeTO.d.mts} +0 -0
  449. /package/dist/{quick-lru-CCEnf7y6.mjs → quick-lru-uXa2PNb5.mjs} +0 -0
  450. /package/dist/{registry-Dk12tAfv.mjs → registry-CZf8VGBh.mjs} +0 -0
  451. /package/dist/{schema-C0opCPww.mjs → schema-DIHGEQx3.mjs} +0 -0
  452. /package/dist/{schema-introspection-6-r_KEJQ.mjs → schema-introspection-CSnLZJpC.mjs} +0 -0
  453. /package/dist/{schemas-Dxvjq-Bi.d.mts → schemas-B0zhTfet.d.mts} +0 -0
  454. /package/dist/{schemas-ClGDFa44.d.mts → schemas-B2Q284-G.d.mts} +0 -0
  455. /package/dist/{schemas--LAbwXvw.d.mts → schemas-BJKx29Sp.d.mts} +0 -0
  456. /package/dist/{schemas-BivbWRkG.mjs → schemas-BKnJj2i-.mjs} +0 -0
  457. /package/dist/{schemas-DmULJ7Jk.d.mts → schemas-BMGJLkdK2.d.mts} +0 -0
  458. /package/dist/{schemas-B2UbGJpJ.d.mts → schemas-BSBb1KFq.d.mts} +0 -0
  459. /package/dist/{schemas-CeHU889f.mjs → schemas-BapfTRqp.mjs} +0 -0
  460. /package/dist/{schemas-Bk50UoMA.d.mts → schemas-BsZJHdvY.d.mts} +0 -0
  461. /package/dist/{schemas-CzGN0eqW.d.mts → schemas-CITR9cWN.d.mts} +0 -0
  462. /package/dist/{schemas-B8hKbBwI.mjs → schemas-CnFVygzI.mjs} +0 -0
  463. /package/dist/{schemas-scyC2tFF.mjs → schemas-DDCAGKRi.mjs} +0 -0
  464. /package/dist/{schemas-CBpjAhut.d.mts → schemas-DmE-a0kN.d.mts} +0 -0
  465. /package/dist/{schemas-Wqo3_F6-.d.mts → schemas-gfrOgGau.d.mts} +0 -0
  466. /package/dist/{schemas-CHRuwe18.d.mts → schemas-wPB7RnHB.d.mts} +0 -0
  467. /package/dist/{semver-BI7kTNsY.mjs → semver-D_D2mA48.mjs} +0 -0
  468. /package/dist/{server-lifecycle-B_OZnoe-.mjs → server-lifecycle-AvBVeCFR.mjs} +0 -0
  469. /package/dist/{server-lifecycle-WFZcCMwF.d.mts → server-lifecycle-CREtXADx.d.mts} +0 -0
  470. /package/dist/{session-lineage-C9kppcCa.d.mts → session-lineage-CRLvurB-.d.mts} +0 -0
  471. /package/dist/{shared-schemas-CQ6blrEW.mjs → shared-schemas-kUho6Kmw.mjs} +0 -0
  472. /package/dist/{src-DIyWekjW.mjs → src-DnLncoLg.mjs} +0 -0
  473. /package/dist/{storage-namespace-BZce8kkW.mjs → storage-namespace-CH4j0_Zs.mjs} +0 -0
  474. /package/dist/{storage-namespace-BWU-8rvj.d.mts → storage-namespace-JBh9nkKw.d.mts} +0 -0
  475. /package/dist/{storage-namespace-definition-Cca-zwXU.mjs → storage-namespace-definition-BJCbqVWz.mjs} +0 -0
  476. /package/dist/{storage-namespace-definition-B-8JKvzm.d.mts → storage-namespace-definition-C0mnpnC_.d.mts} +0 -0
  477. /package/dist/{supports-color-SV_FgSN2.mjs → supports-color-BBMFnbC4.mjs} +0 -0
  478. /package/dist/{telemetry-BqoC87F-.mjs → telemetry-CUkZrhW6.mjs} +0 -0
  479. /package/dist/{timeout-DVlN2Zhy.mjs → timeout-DeBYTGBR.mjs} +0 -0
  480. /package/dist/{tray-menu-service-eVVxgPLc.mjs → tray-menu-service-thAhpcPA.mjs} +0 -0
  481. /package/dist/{types-BnPJa-C_.d.mts → types-9ldZyQTb.d.mts} +0 -0
  482. /package/dist/{types-DQTCNM2i.d.mts → types-BMkn9jOe.d.mts} +0 -0
  483. /package/dist/{types-Cwza95hS.mjs → types-CjjNAiHa.mjs} +0 -0
  484. /package/dist/{types-DxHeL0pF.d.mts → types-DJuxNrac.d.mts} +0 -0
  485. /package/dist/{types-BFeWU3WM.d.mts → types-eCGV_g6P.d.mts} +0 -0
  486. /package/dist/{types-8rMNe3AS.d.mts → types-xXv0lUeU.d.mts} +0 -0
  487. /package/dist/{ui-config-B35GloSX.mjs → ui-config-9hlZAJOS.mjs} +0 -0
  488. /package/dist/{variant-Dwnge3J_.mjs → variant-73kFgYBK.mjs} +0 -0
  489. /package/dist/{window-registry-DQP5P2_0.d.mts → window-registry-CGaYVD7l.d.mts} +0 -0
  490. /package/dist/{window-registry-CKiMJjId.mjs → window-registry-CzAwaPKL.mjs} +0 -0
  491. /package/dist/{zod-json-schema-Dixc-B1T.mjs → zod-json-schema-B9TYYq3e.mjs} +0 -0
@@ -1,2 +0,0 @@
1
- import{resolveMakaioHome as e}from"./runtime-node/makaio-config.mjs";import{t}from"./extension-package-provenance-aYrZuS4W.mjs";import{b as n,c as r,g as i,l as a,n as o,u as s,v as c}from"./bootstrap-start-client-DrvofWwi.mjs";import{mintOrRotateWorkflowExecutionBusSecret as l}from"./runtime-node/workflow-execution-bus-access.mjs";import{execFile as u,spawn as d}from"node:child_process";import*as f from"node:fs/promises";import{access as p}from"node:fs/promises";import*as m from"node:path";import{basename as ee,isAbsolute as te,join as ne,relative as re}from"node:path";import*as h from"node:crypto";import{randomUUID as g}from"node:crypto";import{constants as ie}from"node:fs";import{BusAbortError as ae,createBusInstance as _,isRequestCancellation as oe,waitForSubscriptionPropagation as se}from"@makaio/framework/bus";import{AdapterSubjects as ce,BoundedRecoveryEvidenceSchema as le,ExecutionAttemptSchemas as v,ExecutionAttemptSubjects as y,FrameworkContractNamespaces as ue,FrameworkStorageNamespaces as b,JsonValueSchema as de,PROVIDER_ALLOCATION_REF_VERSION as fe,ProviderAllocationRefSchema as pe,RECOVERY_EVIDENCE_LIMITS as x,WorkerCapabilitiesSchema as me,WorkerSchemas as he,WorkerSubjects as S,WorkflowRunContextSchema as ge,WorkflowRunResultSchema as _e,WorkflowWorkerConfigSchema as ve,createWorkflowCancelSubject as ye}from"@makaio/framework/contracts";import{ExtensionCoordinator as be,KernelSubjects as xe,coalesceExtensionOverrides as Se,filterEligibleExtensions as Ce}from"@makaio/framework/kernel";import{BaseService as we}from"@makaio/framework/service-base";import{AdapterRuntimeSubjects as Te,registerAdapterRuntimeIdentityHandlers as Ee}from"@makaio/framework/services/adapter-runtime";import{CLIDetectionNamespace as De,CLIDetectionSubjects as Oe}from"@makaio/framework/services/cli-detection/namespace";import{SessionOrchestratorToken as ke,ToolRegistryToken as Ae,canonicalModelPackage as je,createSubagentServicePackage as Me,createToolContributionProcessor as Ne,frameworkCorePackages as C,sessionBridgePackage as Pe,sessionOrchestratorPackage as Fe,sessionPackage as Ie,sessionStoragePackage as Le,toolRegistryPackage as Re}from"@makaio/framework/services";import{AdapterSubsystemSubjects as ze}from"@makaio/framework/services/adapter-subsystem";import{createClientsCorePackage as Be}from"@makaio/framework/clients";import{AdapterSubsystemToken as w,createAdapterSubsystemContributionProcessor as Ve,createAdapterSubsystemPackage as He,orderAfterAdapterSubsystem as Ue}from"@makaio/framework/adapter-subsystem";import{execa as We}from"execa";import Ge from"piscina";import{ExecutionAttemptAuthority as Ke,WORKFLOW_WORKLOAD_KIND as qe,WORKFLOW_WORKLOAD_VERSION as Je,WorkflowStorageSubjects as Ye,buildWorkflowAttemptInstruction as Xe,parseWorkflowAttemptInstruction as T,runAuthorityDispatchedAttempt as Ze,toCommittedWorkflowRunnerResult as Qe}from"@makaio/framework/workflow-engine";import{runWorkflowOrchestrator as $e}from"@makaio/framework/workflow-engine/workflow-orchestrator";import{setTimeout as et}from"node:timers/promises";function E(e){return e.on(ce.getCapabilities,async t=>{let{adapterName:n,adapterId:r}=t.payload;if(r){await t.next();return}if(n){let r=await e.requestOptional(Te.resolveId,{adapterName:n}),i=r.handled?r.data.adapterId:void 0;i&&(t.payload.adapterId=i)}await t.next()},{priority:20})}function D(e){let{coordinator:t,configRepository:n,platformDefaults:r,prepareAuthRuntime:i,runtimeSnapshotHandlerPriority:a,runtimeDefinitionHandlerPriority:o}=e,s=He({configRepository:n,coordinator:t,platformDefaults:r,...i!==void 0&&{prepareAuthRuntime:i},...a!==void 0&&{runtimeSnapshotHandlerPriority:a},...o!==void 0&&{runtimeDefinitionHandlerPriority:o}});return t.registerContributionProcessor(Ve({getAdapterSubsystemService:()=>t.getExtensionService(w)})),{adapterSubsystemPackage:s}}function O(e){let{bus:t,currentMachineId:n}=e,r=Ee(t,{currentMachineId:n,listKnownAdapterNames:e.listKnownAdapterNames??(async()=>{let{configs:e}=await t.request(ze.listAdapterConfigs,{});return e.map(e=>e.name)}),...e.resolveLiveAdapterId!==void 0&&{resolveLiveAdapterId:e.resolveLiveAdapterId},...e.resolveLiveAdapterIdentity!==void 0&&{resolveLiveAdapterIdentity:e.resolveLiveAdapterIdentity},...e.listLiveAdapterIdentities!==void 0&&{listLiveAdapterIdentities:e.listLiveAdapterIdentities}}),i=E(t);return{cleanup:()=>{r.cleanup(),i()}}}function k(e,t){if(!(e instanceof Error))return!1;let{rootPackageName:n,subpath:r}=tt(t),i=(r===void 0?[t]:[t,n]).flatMap(e=>[`Cannot find package '${e}'`,`Cannot find module '${e}'`,`Cannot find package "${e}"`,`Cannot find module "${e}"`]),a=e;return(a.code===`ERR_MODULE_NOT_FOUND`||a.code===`MODULE_NOT_FOUND`)&&i.some(t=>e.message.includes(t))||a.code===`ERR_PACKAGE_PATH_NOT_EXPORTED`&&r!==void 0&&e.message.includes(`Package subpath '${r}' is not defined by "exports"`)&&nt(e.message,n)?!0:i.some(t=>e.message.includes(t))}async function A(e){try{return await import(e)}catch(t){if(k(t,e))return null;throw t}}function tt(e){let t=e.split(`/`);return e.startsWith(`@`)?{rootPackageName:t.slice(0,2).join(`/`),subpath:t.length>2?`./${t.slice(2).join(`/`)}`:void 0}:{rootPackageName:t[0]??e,subpath:t.length>1?`./${t.slice(1).join(`/`)}`:void 0}}function nt(e,t){let n=t,r=t.replaceAll(`/`,`\\`);return e.includes(`/${n}/package.json`)||e.includes(`\\${r}\\package.json`)}async function j(e,t=process.env,n=process.platform){let r=t[Object.keys(t).find(e=>e.toUpperCase()===`PATH`)??`PATH`]??``,i=(t.PATHEXT??`.EXE;.CMD;.BAT;.COM`).split(`;`).filter(Boolean),a=n===`win32`?m.extname(e)===``?i:[``,...i]:[``];for(let t of r.split(m.delimiter)){let n=t.replace(/^"|"$/gu,``),r=m.resolve(n||process.cwd());for(let t of a){let n=m.join(r,`${e}${t}`);try{return await p(n,ie.X_OK),n}catch{}}}}async function M(e,t=5e3,n=1e3){let{stdout:r}=await We(e,[`--version`],{forceKillAfterDelay:n,timeout:t});return r}function rt(e){return e.match(/(\d+\.\d+\.\d+)/u)?.[1]??`unknown`}async function it(e,t=j,n=M){try{let r=await t(e);if(r===void 0)return{binary:e,found:!1};let i=await n(r);return i.length===0?{binary:e,found:!1}:{binary:e,found:!0,path:r,version:rt(i)}}catch{return{binary:e,found:!1}}}async function at(e,t=j,n=M){return Promise.all(e.map(e=>it(e,t,n)))}var ot=class extends we{constructor(e){super(e)}onInit(){this.registerHandler(Oe.scan,async e=>{let t=await at(e.payload.binaries);e.setResult({results:t})})}};const N={name:`makaio.cli-detection`,displayName:`CLI Detection`,version:`0.1.0`,critical:!0,surface:`any`,namespaces:[De],create:e=>new ot(e.bus)};function P(e,t){e.push(...st(t))}function st(e){return e===void 0?[]:typeof e==`function`?[e]:[...e]}function ct(e,t=[]){let n=new Set([e]),r=new Set,i=new Map;for(let e of t)typeof e==`string`?n.add(e):(r.add(e.id),e.version!==void 0&&i.set(e.id,e.version));return{hosts:n,capabilities:r,...i.size>0?{capabilityVersions:i}:{}}}function lt(e=[]){return e.some(e=>typeof e==`string`&&e===`node`)?e:[`node`,...e]}function F(e){return Se(Ce(dt(e.packages,e.configProvider),e.surface,e.runtimeEnvironment))}function ut(e,n){let r=F(n),i=new Set(r.map(t));return e.filter(({ownerPackage:e})=>i.has(e)).map(({package:e})=>e)}function dt(e,t){return t?e.filter(e=>t.loadEnabled(e.name)!==!1):e}function I(e,t){return e.filter(e=>e.runtimeOwnership?.[t]===!0).map(e=>e.name)}function ft(e,t){let n=I(e,t);if(n.length>1)throw Error(`Multiple extensions own runtimeOwnership.${t}: ${n.join(`, `)}`)}function L(e){return ft(e,`sessionOrchestrator`),I(e,`sessionOrchestrator`).length===0}function pt(e){return e===!0||L(e)?C:C.filter(e=>e.name!==ke.name)}function R(e,t,n){let r=[];try{for(let i of e){let e=i.runtimeBoot;e&&P(r,e.configure({bus:t,registerContributionProcessor:e=>{r.push(n.registerContributionProcessor(e))},forEachActiveExtension:e=>{n.forEachActiveExtension(e)}}))}}catch(e){let t=[];for(let e of[...r].reverse())try{e()}catch(e){t.push(e)}throw t.length>0?AggregateError([e,...t],`Extension boot contribution failed and rollback cleanup reported additional errors`,{cause:e}):e}return r}function mt(){let e=process.env.MAKAIO_SKIP_EXTENSIONS;if(!e)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(t)}var z=class{pool;constructor(e){this.pool=new Ge({filename:e.workerEntry,maxThreads:e.maxConcurrency??4,idleTimeout:e.idleTimeoutMs??3e4})}async run(e,t,n){return this.pool.run(e,{signal:t,transferList:n})}onMessage(e){return this.pool.on(`message`,e),()=>this.pool.off(`message`,e)}async dispose(){await this.pool.destroy()}},B=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`MaterializationError`}};function V(e,t,n){let r=m.resolve(t)+m.sep,i=m.resolve(e);if(i!==m.resolve(t)&&!i.startsWith(r))throw new B(`${n} escapes allowed root: ${e} is not within ${t}`,`containment-violation`)}async function H(e,t,n,r){let i=r??await f.realpath(t),a;try{a=await f.realpath(e)}catch{return e}let o=i+m.sep;if(a!==i&&!a.startsWith(o))throw new B(`${n} escapes allowed root via symlink: real path ${a} is not within ${i}`,`symlink-escape`);return a}function U(e){let t=e.indexOf(`-`);if(t===-1)throw new B(`Invalid SRI integrity format: ${e}`,`contribution-integrity-mismatch`);return{algorithm:e.slice(0,t),digest:e.slice(t+1)}}async function ht(e,t){let n=await f.readFile(e);return h.createHash(t).update(n).digest(`base64`)}const W=new Set([`.git`,`node_modules`]);function gt(e){return W.has(e.toLowerCase())}async function _t(e,t){let n=t.toLowerCase();if(!W.has(n))return!1;if(t===n)return!0;try{let[r,i]=await Promise.all([f.lstat(m.join(e,t)),f.lstat(m.join(e,n))]);return r.dev===i.dev&&r.ino===i.ino}catch(e){if(e.code===`ENOENT`)return!1;throw e}}const vt=W,yt=new Set([`.DS_Store`]);async function G(e,t){let n=h.createHash(t),r=[];async function i(t){let n=await f.readdir(t,{withFileTypes:!0});for(let a of n){let n=m.join(t,a.name);if(a.isSymbolicLink())throw new B(`Contribution package contains a symbolic link: ${m.relative(e,n)}`,`symlink-escape`);if(a.isDirectory()){vt.has(a.name)||await i(n);continue}if(a.isFile()){yt.has(a.name)||r.push(m.relative(e,n));continue}throw new B(`Contribution package contains an unsupported filesystem entry: ${m.relative(e,n)}`,`contribution-integrity-mismatch`)}}await i(e),r.sort();for(let t of r)n.update(t.split(m.sep).join(`/`)),n.update(`\0`),n.update(await f.readFile(m.join(e,t))),n.update(`\0`);return`${t}-${n.digest(`base64`)}`}async function K(e,t=`sha256`){let n=h.createHash(t),r=[];async function i(t){let n=await f.readdir(t,{withFileTypes:!0});for(let a of n){let n=m.join(t,a.name);if(!await _t(t,a.name)){if(a.isDirectory()){await i(n);continue}if(a.isFile()){r.push(m.relative(e,n));continue}throw a.isSymbolicLink()?new B(`Workspace root contains a symbolic link: ${m.relative(e,n)}`,`symlink-escape`):new B(`Workspace root contains an unsupported filesystem entry: ${m.relative(e,n)}`,`unsupported-filesystem-entry`)}}}await i(e),r.sort();for(let t of r){n.update(t),n.update(`\0`);let r=await f.readFile(m.join(e,t));n.update(r),n.update(`\0`)}return`${t}-${n.digest(`base64`)}`}async function bt(e,t,n){let r=m.join(t,`node_modules`,e.packageName);V(r,t,`Contribution package directory`),await H(r,t,`Contribution package directory`,n);let i=m.join(r,`package.json`),a;try{a=await f.readFile(i,`utf-8`)}catch{throw new B(`Contribution package not found: ${e.packageName} (expected at ${r})`,`contribution-missing`)}let o=JSON.parse(a);if(o.name!==e.packageName)throw new B(`Contribution identity mismatch: expected ${e.packageName}, found ${o.name??`<none>`}`,`contribution-missing`);if(o.version!==e.version)throw new B(`Contribution version mismatch for ${e.packageName}: expected ${e.version}, found ${o.version??`<none>`}`,`contribution-version-mismatch`);let s=m.join(r,e.entrypoint);V(s,r,`Contribution entrypoint`),await H(s,t,`Contribution entrypoint`,n);try{await f.access(s)}catch{throw new B(`Contribution entrypoint not found for ${e.packageName}: ${e.entrypoint}`,`contribution-entrypoint-mismatch`)}let{algorithm:c}=U(e.integrity),l;try{l=await G(r,c)}catch(t){if(t instanceof B)throw t;let n=typeof t==`object`&&t&&`code`in t&&typeof t.code==`string`?t.code:void 0;throw n!==void 0&&!n.startsWith(`ERR_`)?new B(`Contribution package cannot be read for ${e.packageName}`,`contribution-entrypoint-mismatch`):t}if(l!==e.integrity)throw new B(`Contribution integrity mismatch for ${e.packageName}: expected ${e.integrity}, computed ${l}`,`contribution-integrity-mismatch`);return s}async function xt(e,t,n){let r=await n.resolveWorkspaceRoot(e.workspaceId);if(r===void 0)throw new B(`Unknown workspace ID: ${e.workspaceId}`,`unknown-workspace`);try{if(!(await f.stat(r)).isDirectory())throw new B(`Workspace root is not a directory: ${r}`,`containment-violation`)}catch(e){throw e instanceof B?e:new B(`Workspace root does not exist: ${r}`,`containment-violation`)}let i=await f.realpath(r),a=m.resolve(r,e.sourcePath);if(V(a,r,`Source path`),m.relative(r,a).split(m.sep).some(gt))throw new B(`Workflow source path selects excluded workspace content: ${e.sourcePath}`,`source-path-mismatch`);await H(a,r,`Source path`,i);let o=await K(r);if(o!==e.rootDigest)throw new B(`Workspace root digest mismatch: expected ${e.rootDigest}, computed ${o}`,`digest-mismatch`);try{await f.access(a)}catch{throw new B(`Workflow source file not found: ${a}`,`source-missing`)}return{workspaceRoot:r,sourcePath:a,contributionEntrypoints:await Promise.all(t.map(e=>bt(e,r,i))),platform:process.platform,arch:process.arch}}var St=class{options;manifest;pool;constructor(e){this.options=e,this.manifest=e.manifest}async run(e,t,n){this.pool??=new z(this.options);let r=n??this.manifest,i=await this.materializeTask(e,r,t);return{state:`uncommitted`,result:await this.pool.run(i,t)}}runWithReadiness(e,t,r,a){this.pool??=new z(this.options);let o=this.pool,s,c=!1,l,u=new Promise((t,r)=>{l=r,s=o.onMessage(r=>{n(r)&&r.executionAttemptId===a.executionAttemptId&&(r.executionId!==e.executionId||r.cancelSubject!==e.cancelSubject||(c=!0,s?.(),t(r)))})}),d=r??this.manifest,f=i(a.bootstrapDeadlineAt,t,async(t,n)=>{let r=await this.materializeTask(e,d,n);return o.run({...r,kind:`attempt-bound`,executionAttemptId:a.executionAttemptId,bootstrapDeadlineAt:a.bootstrapDeadlineAt,bootstrapPort:t},n,[t])});return f.then(()=>{c||(c=!0,s?.(),l(Error(`Workflow worker completed before ready signal: ${e.executionId}`)))},e=>{c||(c=!0,s?.(),l(e instanceof Error?e:Error(String(e))))}),{result:f,ready:u}}async dispose(){await this.pool?.dispose()}async materializeTask(e,t,n){if(n.throwIfAborted(),!(e.source.kind===`path`||t.contributionRefs.length>0))return{kind:`unbound`,config:e,manifest:t,contributionEntrypoints:[]};let r=e.materializationSpec;if(r?.kind!==`local-directory`)throw Error(`ThinWorkflowPiscinaRunner requires a local-directory materialization spec for path-backed workflows or declared contributions.`);if(this.options.resolveWorkspaceRoot===void 0)throw Error(`ThinWorkflowPiscinaRunner requires a host workspace-root resolver for local-directory materialization.`);let i=await xt(r,t.contributionRefs,{resolveWorkspaceRoot:this.options.resolveWorkspaceRoot});if(n.throwIfAborted(),e.source.kind!==`path`)throw Error(`local-directory materialization requires a path-backed workflow source.`);return{kind:`unbound`,config:{...e,source:{kind:`path`,path:i.sourcePath}},manifest:t,contributionEntrypoints:i.contributionEntrypoints}}};function Ct(e){return e.mode===`source`?ne(e.moduleDir,`workflow-worker`,`worker-entry.ts`):ne(e.moduleDir,`workflow-worker`,`worker-entry.mjs`)}var wt=class{options;terminalAuthority=`authority`;constructor(e){this.options=e}async run(e,t,n,r){let i={...e,terminalAuthority:`authority`},a=n??this.options.manifest,o=this.options.requirements,s=r?.dispatchMetadata;t.throwIfAborted();let c=e.source.kind===`path`?await this.options.readRunContext?.(e.executionId,t):void 0;t.throwIfAborted();let l=Xe({id:g(),revision:`1`,config:e,...c==null?{}:{runContext:c},preservation:{required:[]}});return{state:`authority-committed`,result:Qe(await Ze({authority:this.options.authority,executionId:e.executionId,instruction:l,dispatch:e=>this.options.dispatch({executionAttemptId:e,config:i,...a!==void 0&&{manifest:a},...o!==void 0&&{requirements:o},...s!==void 0&&{metadata:s}},t)}),e)}}},Tt=class{#e;constructor(e){this.#e=e.bus}async run(e,t,n){let r=ve.parse(e),i=await s(r);return{state:`uncommitted`,result:await $e({config:await a(r,i,this.#e,t),loaded:i,bus:this.#e,signal:t})}}};function Et(){return{contributionRefs:[]}}function Dt(e){if(e.workflowRunner?.mode===`worker`&&!e.executionAttemptRepository)throw Error(`Worker dispatch mode requires an ExecutionAttemptRepository. Pass 'executionAttemptRepository' to createNodeWorkflowRunnerPackageOptions when workflowRunner.mode is 'worker'.`);let t;if(e.executionAttemptRepository){let n=e.executionAttemptBootstrapTimeoutMs;if(n===void 0)throw Error(`An ExecutionAttemptRepository requires executionAttemptBootstrapTimeoutMs`);t=new Ke(e.executionAttemptRepository,{bootstrapTimeoutMs:n})}let n=ee(e.runtimeModuleDir)===`src`?`source`:`dist`,r=Ot({moduleDir:e.runtimeModuleDir,defaultWorkerEntryMode:n,runner:e.workflowRunner,bus:e.bus,authority:t});return{...r!==void 0&&{workflowRunner:r},executorConfig:{busUrl:e.busUrl,busAuth:{kind:`none`},platformDefaults:e.platformDefaults,makaioHome:e.makaioHome},...e.executionAttemptRepository!==void 0&&{executionAttemptRepository:e.executionAttemptRepository},...t!==void 0&&{executionAttemptAuthority:t},...e.workflowMaterializationSpecResolvers!==void 0&&{workflowMaterializationSpecResolvers:e.workflowMaterializationSpecResolvers}}}function Ot(e){let{runner:t}=e;if(t)switch(t.mode){case void 0:case`in-process`:if(e.bus===void 0)throw Error(`InProcessWorkflowRunner requires a bus instance. Pass 'bus' to createNodeWorkflowRunner when runner.mode is 'in-process'.`);return new Tt({bus:e.bus});case`worker`:{if(e.authority===void 0)throw Error(`WorkerRunner requires an ExecutionAttemptAuthority. Pass 'authority' to createNodeWorkflowRunner when runner.mode is 'worker'.`);let n=e.bus,r=t.dispatch??(n===void 0?void 0:(e,t)=>n.request(S.dispatch,{executionAttemptId:e.executionAttemptId,config:e.config,manifest:e.manifest,requirements:e.requirements,metadata:e.metadata},{signal:t}));if(r===void 0)throw Error(`WorkerRunner requires either a dispatch function or a bus instance. Pass 'bus' to createNodeWorkflowRunner when runner.mode is 'worker'.`);return new wt({dispatch:r,authority:e.authority,...n!==void 0&&{readRunContext:async(e,t)=>(await n.request(Ye.getRunContext,{executionId:e},{signal:t})).runContext},...t.manifest!==void 0&&{manifest:t.manifest},...t.requirements!==void 0&&{requirements:t.requirements}})}case`piscina`:return new St({workerEntry:t.workerEntry??Ct({moduleDir:e.moduleDir,mode:t.workerEntryMode??e.defaultWorkerEntryMode}),manifest:t.manifest??Et(),...t.resolveWorkspaceRoot!==void 0&&{resolveWorkspaceRoot:t.resolveWorkspaceRoot},maxConcurrency:t.maxConcurrency,idleTimeoutMs:t.idleTimeoutMs})}}const kt=new Set([`accepted`,`duplicate`]);var q=class extends Error{decision;result;reason;constructor(e,t,n=`authority-rejected`){super(`Outcome delivery ${n===`deadline-exceeded`?`deadline exceeded`:`rejected by Authority`} (decision=${e}, executionId=${t.executionId}, status=${t.status})`),this.decision=e,this.result=t,this.reason=n,this.name=`OutcomeDeliveryError`}},J=class extends Error{decision;payload;reason;constructor(e,t,n=`authority-rejected`){super(`Attempt outcome delivery ${n===`deadline-exceeded`?`deadline exceeded`:`rejected by Authority`} (decision=${e}, executionAttemptId=${t.executionAttemptId}, outcome=${t.outcome.kind})`),this.decision=e,this.payload=t,this.reason=n,this.name=`AttemptOutcomeDeliveryError`}},At=class extends Error{reason;constructor(e=`deadline-exceeded`){super(`Authority request delivery deadline exceeded`),this.reason=e,this.name=`AuthorityRequestDeliveryError`}};function jt(e){let t={maxRetries:e?.maxRetries??7,baseDelayMs:e?.baseDelayMs??1e3,maxDelayMs:e?.maxDelayMs??3e4,deadlineMs:e?.deadlineMs??12e4};if(!Number.isSafeInteger(t.maxRetries)||t.maxRetries<0)throw TypeError(`Outcome submission maxRetries must be a non-negative safe integer, got ${t.maxRetries}`);for(let[e,n]of Object.entries({baseDelayMs:t.baseDelayMs,maxDelayMs:t.maxDelayMs,deadlineMs:t.deadlineMs}))if(!Number.isFinite(n)||n<=0)throw TypeError(`Outcome submission ${e} must be a positive finite number, got ${n}`);return t}async function Mt(e,t,n,r){let i=t.baseDelayMs*2**(e-1),a=n-Date.now(),o=Math.min(i,t.maxDelayMs,a);await new Promise(e=>setTimeout(e,o));let s=n-Date.now();if(s<=0)return!1;if(r!==void 0){let e;try{await Promise.race([r(),new Promise(t=>{e=setTimeout(t,s)})])}catch{}finally{e!==void 0&&clearTimeout(e)}}return Date.now()<n}async function Nt(e,t,n,r){let i=jt(n?.retry),a=n?.reconnect,o=Date.now()+i.deadlineMs,s;for(let n=0;n<=i.maxRetries;n++){if(o-Date.now()<=0||n>0&&!await Mt(n,i,o,a))throw t();try{let n=o-Date.now();if(n<=0)throw t();return await e(n)}catch(e){if(r(e))throw e;if(s=e,Date.now()>=o)throw t()}}throw s??t()}async function Pt(e,t){return await Nt(e,()=>new At,t,()=>!1)}async function Ft(e,t,n){return await Nt(async n=>{let r=await e(n);if(kt.has(r))return r;throw t(r)},()=>t(`deadline-exceeded`,`deadline-exceeded`),n,e=>e instanceof q||e instanceof J)}async function It(e,t,n){return await Ft(async n=>(await e.request(S.control.outcome.submit,{executionAttemptId:t.executionAttemptId,executionId:t.executionId,result:t.result},{timeout:n})).decision,(e,n)=>n===void 0?new q(e,t.result):new q(e,t.result,n),n)}async function Lt(e,t,n){return await Ft(async n=>(await e.request(y.outcome.submit,t,{timeout:n})).decision,(e,n)=>n===void 0?new J(e,t):new J(e,t,n),n)}const Rt={maxRetries:3,baseDelayMs:200,maxDelayMs:2e3,deadlineMs:1e4},zt={persistentStorage:!0,customCapabilities:[`workflow.local-runtime`,`workflow.thin-runner`],suspensionStrategy:`wait-in-process`,supportsRecovery:!1,materializationModes:[`local-directory`]};function Bt(e){let t=new Set,n;return{conclude:r=>{if(n!==void 0)return;n={evidence:le.parse({source:e.slice(0,x.source),summary:r.slice(0,x.summary),observedAt:new Date().toISOString()})};let i=[...t];t.clear();for(let e of i)try{e(n)}catch(e){console.error(`[PiscinaThinWorkflowProvider] Infrastructure-conclusion observer failed:`,e)}},observe:e=>n===void 0?(t.add(e),()=>t.delete(e)):(e(n),()=>void 0)}}var Vt=class{executionAttemptId;controller;detachCallerAbort;infrastructure;revokeBusIdentity;constructor(e,t,n,r,i){this.executionAttemptId=e,this.controller=t,this.detachCallerAbort=n,this.infrastructure=r,this.revokeBusIdentity=i}cancel(e){return this.controller.abort(e??`Worker cancelled`),this.detachCallerAbort(),Promise.resolve()}terminate(){return this.controller.abort(`Worker terminated`),this.detachCallerAbort(),this.revokeBusIdentity(),Promise.resolve()}release(){return this.detachCallerAbort(),this.revokeBusIdentity(),Promise.resolve()}observeInfrastructureConclusion(e){return this.infrastructure.observe(e)}},Ht=class{options;environment=`piscina`;allocationLifetime=`provisioner-process-bound`;baseCapabilities;constructor(e){this.options=e,this.baseCapabilities=me.parse({...zt,...e.baseCapabilities,suspensionStrategy:e.baseCapabilities?.suspensionStrategy??zt.suspensionStrategy,supportsRecovery:!1})}get id(){return this.options.id}get displayName(){return this.options.displayName}async provision(e,t){t.throwIfAborted();let n=new AbortController,r=Bt(this.id),i=()=>{n.abort(t.reason)};t.addEventListener(`abort`,i,{once:!0});let a=()=>t.removeEventListener(`abort`,i),o;try{let{executionAttemptId:i,executionId:s,workerConfig:c}=e;if(!c.busUrl)throw Error(`PiscinaThinWorkflowProvider requires a bus URL to provision an execution attempt (executionAttemptId=${i}, executionId=${s})`);let u=this.buildAllocationRef(i),d=l({executionAttemptId:i,executionId:s});o=d.cleanup;let f=new Vt(i,n,a,r,d.cleanup);t.throwIfAborted();let p=this.options.runner.runWithReadiness({...c,busAuth:{kind:`hmac`,secret:d.secret}},n.signal,e.workerManifest,{executionAttemptId:i,bootstrapDeadlineAt:e.bootstrapDeadlineAt});return p.ready.then(()=>this.submitOutcomeOnSettlement(p.result,s,i,c.workflowId,r.conclude),e=>{n.abort(e),p.result.catch(()=>void 0),r.conclude(`Piscina worker for attempt '${i}' was refused before its workflow run was admitted: `+(e instanceof Error?e.message:String(e)))}),{kind:`allocated`,allocationRef:u,handle:f}}catch(e){throw n.abort(e),a(),o?.(),e}}async submitOutcomeOnSettlement(e,t,n,r,i){let a;try{a=await e}catch(e){a={executionId:t,workflowId:r,status:`failed`,error:e instanceof Error?e.message:String(e)}}try{let e={...Rt,...this.options.outcomeRetry};await It(this.options.bus,{executionAttemptId:n,executionId:t,result:a},{retry:e})}catch(e){e instanceof q?console.error(`[PiscinaThinWorkflowProvider] Outcome rejected for execution '${t}' attempt '${n}' (decision=${e.decision}):`,e):console.error(`[PiscinaThinWorkflowProvider] Failed to submit outcome for execution '${t}' attempt '${n}':`,e),i(`Piscina worker for attempt '${n}' ended without an acknowledged outcome because outcome submission could not be completed`)}}buildAllocationRef(e){let t={version:fe,providerId:this.id,providerData:{executionAttemptId:e,allocatedAt:Date.now()}};return pe.parse(t)}};const Ut=[Le,Pe,Ie];function Wt(e){let t;return()=>(t??=(async()=>{let t=[];for(let n of[...e].reverse())try{await n()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Isolated workflow runtime shutdown reported errors`)})(),t)}function Gt(e,t,n){return O({bus:e,currentMachineId:n,resolveLiveAdapterId:e=>t.getExtensionService(w)?.resolveLiveAdapterId(e),resolveLiveAdapterIdentity:e=>t.getExtensionService(w)?.resolveLiveAdapterIdentity(e),listLiveAdapterIdentities:()=>t.getExtensionService(w)?.getLiveAdapterIdentities()??[]})}async function Kt(e){let t=_();t.registerNamespaces([...ue,...b]);let{context:n}=e,r=new be(t,{surface:`headless`,extensionContextBase:{cwd:n.cwd,platform:n.platform,homedir:n.homedir,makaioHome:n.makaioHome,username:n.username,machineId:n.machineId,tryImport:A}}),i,a=[()=>t.disconnect()],o=Wt(a);try{await e.connectAuthority(t);let s=[...e.contributedPackages,...await e.loadContributedPackages?.(t)??[]],{adapterSubsystemPackage:c}=D({coordinator:r,configRepository:e.configRepository,platformDefaults:{cwd:n.cwd},runtimeSnapshotHandlerPriority:1,runtimeDefinitionHandlerPriority:1,...e.prepareAuthRuntime!==void 0&&{prepareAuthRuntime:e.prepareAuthRuntime}}),l=Be({definitions:s.flatMap(e=>e.clients??[]),binaryResolutionPolicy:`global-only`});r.registerContributionProcessor(Ne());let u=[...Ut,c,je,...L(s)?[Fe]:[],Me(1),Re,N,l,...Ue(s)];r.load(u),a.push(...R(u,t,r)),a.push(()=>r.shutdown()),await r.startAll(),i=Gt(t,r,n.machineId),a.push(()=>{i?.cleanup(),i=void 0});let d=r.getExtensionService(Ae);if(d===void 0)throw Error(`Isolated workflow tool registry did not start.`);for(let t of e.toolsets)await d.register(t);return await t.emit(xe.ready,{machineId:n.machineId}),{bus:t,coordinator:r,machineId:n.machineId,shutdown:o}}catch(e){throw await o().catch(()=>void 0),e}}function qt(e){return Number.isInteger(e)&&e>=1&&e<=2147483647}function Y(e,t){try{process.kill(-e,t)}catch(e){if(e.code!==`ESRCH`)throw e}}async function Jt(e,t){try{process.kill(-e,0)}catch(e){if(e.code===`ESRCH`)return!1;throw e}let n;try{n=await Yt(t)}catch{return!0}let r=!1;for(let t of n.trim().split(`
2
- `)){let[n,i,a]=t.trim().split(/\s+/);if(n===``||i===void 0||a!==void 0||!/^\d+$/.test(n)||i===``||Number(n)===e&&(r=!0,!i.startsWith(`Z`)))return!0}return!r}function Yt(e){return new Promise((t,n)=>{u(`ps`,[`-A`,`-o`,`pgid=,stat=`],{timeout:e,maxBuffer:1024*1024},(e,r)=>{if(e!==null){n(e);return}t(r)})})}async function Xt(e){if(e===void 0)return!0;try{Y(e,`SIGKILL`);let t=Date.now()+2e3;for(;Date.now()<t;){let n=t-Date.now();if(n<=0)break;if(!await Jt(e,Math.min(1e3,n)))return!0;await et(20)}}catch{}return!1}async function Zt(e){if(e.signal?.aborted)return{status:`cancelled`,exitCode:null};if(!qt(e.recipe.timeoutMs))return{status:`spawn-failed`,exitCode:null,message:`Setup timeout must be an integer between 1 and 2147483647 milliseconds`};if(process.platform===`win32`)return{status:`spawn-failed`,exitCode:null,message:`Setup process groups require a POSIX host`};try{return await Qt(e)}catch{return{status:`spawn-failed`,exitCode:null,message:`Could not start the setup command`}}}function Qt(e){return new Promise(t=>{let n=d(e.recipe.command,e.recipe.args,{cwd:e.workspaceRoot,env:{...process.env,...e.recipe.env,...e.env},shell:!1,detached:!0,stdio:`ignore`}),r,i,a=e=>{if(r===void 0&&(r=e,n.pid!==void 0))try{Y(n.pid,`SIGTERM`),i=setTimeout(()=>{try{n.pid!==void 0&&Y(n.pid,`SIGKILL`)}catch{r=`stop-failed`}},200)}catch{r=`stop-failed`}},o=()=>a(`cancelled`),s=setTimeout(()=>a(`timed-out`),e.recipe.timeoutMs);e.signal?.addEventListener(`abort`,o,{once:!0}),e.signal?.aborted&&o(),n.once(`error`,()=>{r=`spawn-failed`}),n.once(`close`,a=>{clearTimeout(s),clearTimeout(i),e.signal?.removeEventListener(`abort`,o),Xt(n.pid).then(e=>{t({status:e?r??(a===0?`completed`:`failed`):`stop-failed`,exitCode:a})})})})}async function $t(e,t,n){if(m.isAbsolute(t)||t.includes(`\\`)||t.split(`/`).includes(`..`))throw Error(`Source root must be workspace-relative`);let r=e;for(let i of t.split(`/`).filter(e=>e!==``&&e!==`.`))if(r=m.join(r,i),V(r,e,`Source root`),await H(r,e,`Source root`,e),n&&await f.mkdir(r).catch(e=>{if(e.code!==`EEXIST`)throw e}),!(await f.stat(r)).isDirectory())throw Error(`Source root must be a directory`);return H(r,e,`Source root`,e)}async function en(e){e.signal?.throwIfAborted();let{requirement:t}=e,n=m.resolve(e.workspaceRoot);if(!m.isAbsolute(e.workspaceRoot)||n===m.parse(n).root)throw Error(`Workspace root must be an absolute, non-filesystem-root directory`);if(t.sourceRoots.length>1)throw Error(`Multiple source roots are not implemented`);if(t.sourceRoots.some(e=>e.source!==void 0)){if(e.realizeSource===void 0)throw Error(`Source acquisition requires an installed strategy`);if(t.provisioning!==`create`||t.custody!==`disposable`)throw Error(`Source acquisition currently requires a created disposable workspace`)}if(t.provisioning===`create`&&await f.mkdir(n),!(await f.lstat(n)).isDirectory())throw Error(`Workspace root must be a directory, not a symlink`);let r=await f.realpath(n),i=[];for(let n of t.sourceRoots){let a=await $t(r,n.path,t.provisioning===`create`);n.source!==void 0&&(await e.realizeSource({source:n.source,destination:a,signal:e.signal}),e.signal?.throwIfAborted()),i.push({id:n.id,path:a})}return tn(t,{workspaceRoot:r,sourceRoots:i})}function tn(e,t){let n=t.workspaceRoot,r=e.custody,i=!1,a=!0,o;return{binding:t,async runSetup(t={}){if(o!==void 0||i||!a)throw Error(`Workspace setup is unavailable`);if(t.signal?.aborted)return{status:`cancelled`,exitCode:null};i=!0;try{for(let[r,i]of e.setup.entries()){let e=await Zt({...t,recipe:i,workspaceRoot:n});if(a=e.status!==`stop-failed`,e.status!==`completed`)return{...e,commandIndex:r}}return{status:`completed`,exitCode:0}}finally{i=!1}},release(){return i||!a?Promise.reject(Error(`Workspace commands have not stopped`)):(o??=r===`external`?Promise.resolve():f.rm(n,{recursive:!0,force:!0}),o)}}}function X(e,t){return e instanceof ae?oe(e,t):t?.aborted===!0?e===t.reason||e instanceof DOMException&&e.name===`AbortError`?!0:e instanceof Error&&e.name===`AbortError`&&`code`in e&&e.code===`ABORT_ERR`&&Object.is(e.cause,t.reason):!1}async function nn(e,t,n,r){let i=v[`instruction.get`].response.parse(await e.request(y.instruction.get,{executionAttemptId:t,runtimeGeneration:n},{signal:r}));if(i.decision===`found`)return i.instruction;throw Error(`Attempt instruction read refused: ${i.refusalReason}`)}async function rn(e,t,n,r){let{executionAttemptId:i,runtimeGeneration:a}=t,o=v[`operation.admit`].response.parse(await Pt(async t=>await e.request(y.operation.admit,{executionAttemptId:i,runtimeGeneration:a,operationKind:n,admissionKey:r},{timeout:t}),{retry:t.retry,reconnect:t.reconnect}));if(o.decision===`refused`||o.operationId===void 0)throw Error(`Attempt ${n} admission refused: ${o.refusalReason??`missing-operation-id`}`);return o.operationId}function Z(e){return(e instanceof Error?e.message:String(e)).slice(0,8192)||`Local execution failed without a diagnostic message`}function an(e,t){return e.find(e=>e.kind===t.workload.kind&&e.version===t.workload.version)}function on(e){return{signal:e??new AbortController().signal,release:()=>{}}}async function Q(e,t,n,r,i,a){let o=await Lt(e,{executionAttemptId:t.executionAttemptId,runtimeGeneration:t.runtimeGeneration,...i===void 0?{}:{operationId:i},outcome:r},{retry:t.retry,reconnect:t.reconnect});if(a!==void 0&&n!==void 0&&r.kind===`workload-result`&&n.preservation.required.length===0)try{await a.release()}catch{console.warn(`[makaio-worker] Acknowledged workspace cleanup failed.`)}return{outcome:r,decision:o}}async function sn(e,t,n,r){let i=v[`operation.report`].response.parse(await Pt(async i=>await e.request(y.operation.report,{executionAttemptId:t.executionAttemptId,runtimeGeneration:t.runtimeGeneration,operationId:n,result:{kind:`workspace-prepared`,binding:r.binding}},{timeout:i}),{retry:t.retry,reconnect:t.reconnect}));return i.decision===`refused`?void 0:i.binding}function cn(e){if(e.status!==`completed`)return e.status===`cancelled`?{kind:`cancelled`}:e.status===`stop-failed`?{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace setup stop-failed`}:{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace setup ${e.status}`}}async function ln(e,t,n,r){if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,void 0);let i=await rn(e,t,`workspace-preparation`,`workspace-preparation:${n.id}:${t.runtimeGeneration}`);if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},i,void 0);let a,o;try{if(t.workspaceRoot===void 0)throw Error(`Workspace preparation requires an explicit local root`);let e=await(t.preparation??{prepare:en}).prepare({requirement:n.workspace,workspaceRoot:t.workspaceRoot,signal:r});a=e,o=await e.runSetup({signal:r,env:t.setupEnv})}catch(o){return await Q(e,t,n,X(o,r)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`workspace-preparation`,message:Z(o)},i,a)}let s=cn(o);if(s!==void 0)return await Q(e,t,n,s,i,a);if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},i,a);let c=await sn(e,t,i,a);return c===void 0?await Q(e,t,n,{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace preparation report refused by the Authority`},i,a):r.aborted?await Q(e,t,n,{kind:`cancelled`},void 0,a):{handle:a,binding:c}}async function un(e,t,n,r,i){if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,void 0);let a,o;if(n.workspace!==void 0){let r=await ln(e,t,n,i.signal);if(`outcome`in r)return r;a=r.handle,o=r.binding}if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,a);let s=await rn(e,t,`workload-invocation`,`workload-invocation:${n.id}:${t.runtimeGeneration}`);if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},s,a);let c;try{c={kind:`workload-result`,result:de.parse(await r.invoke({instruction:n,...o===void 0?{}:{workspace:o},signal:i.signal}))}}catch(e){c=X(e,i.signal)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`workload-invocation`,message:Z(e)}}return await Q(e,t,n,c,s,a)}async function $(e,t){let n;try{n=await nn(e,t.executionAttemptId,t.runtimeGeneration,t.signal)}catch(n){if(oe(n,t.signal))return await Q(e,t,void 0,{kind:`cancelled`},void 0,void 0);throw n}let r=an(t.adapters,n);if(r===void 0)return await Q(e,t,n,{kind:`technical-failure`,stage:`startup`,message:`Required adapter '${n.workload.kind}' version '${n.workload.version}' is unavailable`},void 0,void 0);let i;try{i=await(r.bindControl?.({instruction:n,signal:t.signal})??on(t.signal))}catch(r){let i=X(r,t.signal)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`startup`,message:Z(r)};return await Q(e,t,n,i,void 0,void 0)}try{return await un(e,t,n,r,i)}finally{try{i.release()}catch{console.warn(`[makaio-worker] Workload control release failed.`)}}}async function dn(e,t,n,r,i){let a=he[`runtime.inputs.get`].response.parse(await e.request(S.runtime.inputs.get,{executionAttemptId:t},{signal:i}));if(a.runtimeInputs===null)throw Error(`Selected Worker Runtime inputs are unavailable`);return ge.parse({...n,...a.runtimeInputs,createdAt:0,env:r})}function fn(e,t){let n=(e,t)=>{let n=re(e,t);return n===``||!te(n)&&n!==`..`&&!n.startsWith(`../`)&&!n.startsWith(`..\\`)};return n(e,t)||n(t,e)}async function pn(t,n,r,i){let a=await t.loadContributions(r,i);i.throwIfAborted();let o=e();return await Kt({connectAuthority:e=>t.connectBus(e,n,i),contributedPackages:[...a],configRepository:t.configRepository,context:{cwd:r.workspaceRoot,platform:r.platform,homedir:o,makaioHome:o,username:`workflow-worker`,machineId:`headless-worker-${t.executionAttemptId}`},toolsets:[...t.toolsets],...t.prepareAuthRuntime!==void 0&&{prepareAuthRuntime:t.prepareAuthRuntime}})}function mn(e,t,n){let r={...e.workflowEnv},i,a=!0;return{adapter:{kind:qe,version:Je,async bindControl({instruction:t,signal:r}){let i=T(t);if(i.executionId!==e.executionId)throw Error(`Workflow instruction execution identity mismatch`);let a=new AbortController,o=n.on(ye(i.cancelSubject),()=>a.abort());try{return await se(o),{signal:AbortSignal.any([...r===void 0?[]:[r],a.signal]),release:o}}catch(e){throw o(),e}},async invoke({instruction:o,workspace:s,signal:c}){let l=T(o);a=o.preservation.required.length!==0;let u=c??new AbortController().signal,d;try{u.throwIfAborted();let a=await dn(n,e.executionAttemptId,l,r,u),o=await e.materialize(a,u);(s===void 0||!fn(o.context.workspaceRoot,s.workspaceRoot))&&(i=o.cleanup);let c=hn(o.context,s);return u.throwIfAborted(),d=await pn(e,t,c,u),u.throwIfAborted(),await e.execute(d.bus,a,c,u)}finally{await d?.shutdown()}}},async releaseExecutable(e){e===void 0||a||e.outcome.kind===`workload-result`&&(e.decision!==`accepted`&&e.decision!==`duplicate`||await i?.().catch(()=>void 0))}}}function hn(e,t){return t===void 0?e:{...e,workspaceRoot:t.workspaceRoot}}async function gn(e,t){if(!(t.outcome.kind!==`workload-result`||e.onPostCommit===void 0))try{let n=_e.parse(t.outcome.result);await e.onPostCommit(n,t.decision)}catch{}}async function _n(e,t){t.throwIfAborted();let n={...e.workflowEnv},i=g(),a=await c(e.bootstrapDeadlineAt,t,t=>e.bootstrap(t)),{connection:s,endpoint:l}=await o({executionAttemptId:e.executionAttemptId,runtimeIncarnationId:i,bootstrapDeadlineAt:e.bootstrapDeadlineAt,signal:t,createConnection:()=>vn(e,a)}),u=s.bus,d=mn({...e,workflowEnv:n},a,u),f;try{let n=await r(u,{executionAttemptId:e.executionAttemptId,runtimeIncarnationId:i,signal:t});return l.bindGeneration(n),f=await $(u,{executionAttemptId:e.executionAttemptId,runtimeGeneration:n,workspaceRoot:e.workspaceRoot,setupEnv:e.setupEnv,adapters:[d.adapter],signal:t,retry:e.outcomeRetry,reconnect:()=>u.reconnect()}),await gn(e,f),f}finally{try{await d.releaseExecutable(f)}finally{l.cleanup(),await s.close()}}}function vn(e,t){let n=_();return n.registerNamespaces([...ue,...b]),{bus:n,async connect(r){try{await e.connectBus(n,t,r),r.throwIfAborted()}catch(e){throw n.disconnect(),e}},close:()=>n.disconnect()}}export{R as A,xt as C,P as D,ct as E,k as F,A as I,O as L,ut as M,pt as N,lt as O,N as P,D as R,ht as S,bt as T,B as _,J as a,G as b,q as c,Ot as d,Dt as f,St as g,Ct as h,Ht as i,F as j,mt as k,Lt as l,wt as m,$ as n,At as o,Tt as p,Kt as r,kt as s,_n as t,It as u,V as v,U as w,K as x,H as y,E as z};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes