@makaio/framework 1.0.0-dev-1781472900225 → 1.0.0-dev-1781729394463
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.
- package/dist/.makaio-build.json +2 -2
- package/dist/{account-identity-D-9gunfD.mjs → account-identity-D5TUafYg.mjs} +1 -1
- package/dist/adapter-B5I7Wp4y.mjs +1 -0
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +3 -3
- package/dist/adapters/index.mjs +1 -1
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/await-trigger-DcMVmNW5.mjs +1 -0
- package/dist/bus/index.d.mts +21 -21
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-BgodbPl9.mjs +2 -0
- package/dist/bus-HgaFcCZ1.mjs +1 -0
- package/dist/canonical-model-BWGkgf3v.mjs +1 -0
- package/dist/{client-D24ebgGH.mjs → client-BO-0jTSV.mjs} +1 -1
- package/dist/compression-DMoeVgKx.mjs +1 -0
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +7 -7
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- package/dist/contracts/extension/index.mjs +1 -1
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/facet/index.mjs +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/harness/index.mjs +1 -1
- package/dist/contracts/host/index.d.mts +1 -1
- package/dist/contracts/host/index.mjs +1 -1
- package/dist/contracts/index.d.mts +208 -9719
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +3 -3
- package/dist/contracts/materialization/index.mjs +1 -1
- package/dist/contracts/model-registry/index.d.mts +1 -1
- package/dist/contracts/model-registry/index.mjs +1 -1
- package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/native-session-supervisor/index.mjs +1 -1
- package/dist/contracts/platform/index.d.mts +1 -1
- package/dist/contracts/platform/index.mjs +1 -1
- package/dist/contracts/provider/index.d.mts +3 -3
- package/dist/contracts/provider/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +2 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/skill/index.mjs +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.mjs +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/toast/index.mjs +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/variant/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +3 -0
- package/dist/contracts/workflow/index.mjs +1 -0
- package/dist/definition-BJ_975aA.mjs +1 -0
- package/dist/{definition-B2FH_eOh.d.mts → definition-Cllhr9mi.d.mts} +13 -2
- package/dist/{definition-CZcVOhXZ.d.mts → definition-b9jyJqPD.d.mts} +1 -1
- package/dist/{detached-extension-handle-BYxNmLfv.mjs → detached-extension-handle-Cx6-0eqg.mjs} +1 -1
- package/dist/drizzle/0020_m_mqf47r9j.sql +1 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/{extension-CTkoi8MV.mjs → extension-BJHRahFl.mjs} +1 -1
- package/dist/{extension-DNrcv3V7.mjs → extension-CfL70C5n.mjs} +1 -1
- package/dist/{filesystem-service-T8JOIWeP.mjs → filesystem-service-Bmyqo6po.mjs} +1 -1
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-Bos1vjKj.mjs → globby-D4SANVoq.mjs} +1 -1
- package/dist/{handlers-Cpy9Q8ho.mjs → handlers-BAycjV02.mjs} +2 -2
- package/dist/{harness-HEpELa_v.mjs → harness-DkUpbsuY.mjs} +1 -1
- package/dist/{index-BafN3wmA.d.mts → index-BAQ6QBcU.d.mts} +18 -18
- package/dist/{index-DDAviCTa.d.mts → index-BEzRpWsS.d.mts} +393 -354
- package/dist/{index-CciZTbYG.d.mts → index-CW_LbXdg.d.mts} +4 -4
- package/dist/{index-DKR_B-Oa.d.mts → index-CYHWOXUm.d.mts} +1 -1
- package/dist/{index-CKaFWH2Q.d.mts → index-CZJc-V9L.d.mts} +40 -19
- package/dist/index-Cjo24O5I.d.mts +10036 -0
- package/dist/{index-C2XLjebs.d.mts → index-CmHdpW0E.d.mts} +4 -4
- package/dist/{index-nEJX7pZ7.d.mts → index-D1KPCXBN.d.mts} +3 -3
- package/dist/{index-6QvT0ljq.d.mts → index-D9-vOJvZ.d.mts} +1 -1
- package/dist/{index-DGbTPRLw.d.mts → index-DKNmj2sa.d.mts} +22 -22
- package/dist/{index-BQ8H7cvY.d.mts → index-DLNRgZPo2.d.mts} +1 -1
- package/dist/{index-xeg-bqxO.d.mts → index-DMz-2ACU.d.mts} +105 -105
- package/dist/{index-DUI1W-zN.d.mts → index-DTBQOCar.d.mts} +8 -8
- package/dist/{index-XzH0OovV.d.mts → index-DWKCb-eJ.d.mts} +2 -2
- package/dist/{index-BBteExwv.d.mts → index-DiifAKRu.d.mts} +11 -4
- package/dist/{index-ldkFQKNM.d.mts → index-Dw7ErgWU.d.mts} +10 -457
- package/dist/{index-BZuF4I8O.d.mts → index-NkNbYFud.d.mts} +1 -55
- package/dist/{index-DBd4CgV5.d.mts → index-aciWhUWw.d.mts} +393 -393
- package/dist/{index-BaajomEP.d.mts → index-kwq54nx4.d.mts} +15 -15
- package/dist/{index-DNmENr9M.d.mts → index-mU2lnU7O.d.mts} +6 -6
- package/dist/json-value-DtIkQN7g.d.mts +57 -0
- package/dist/kernel/cli/index.d.mts +2 -2
- package/dist/kernel/cli/index.mjs +1 -1
- package/dist/kernel/cli/register.d.mts +1 -1
- package/dist/kernel/cli/register.mjs +1 -1
- package/dist/kernel/cli/schemas.mjs +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/extension/index.mjs +1 -1
- package/dist/kernel/index.d.mts +5 -5
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/namespace/index.mjs +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/observability/index.mjs +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/providers/index.mjs +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/kernel/window/index.mjs +1 -1
- package/dist/{lib-DkLlhp9Z.mjs → lib-Ba55od_d.mjs} +3 -3
- package/dist/{lib-jOuIcSs9.mjs → lib-CM_BUxN8.mjs} +1 -1
- package/dist/{load-extensions-D-DyzN4j.mjs → load-extensions-Cze1RHcG.mjs} +1 -1
- package/dist/{load-extensions-CQqw0Smr.d.mts → load-extensions-DNRIy4zC.d.mts} +1 -1
- package/dist/loop-gate-handlers-CwU5zAGs.mjs +1 -0
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/{namespace-Ba1gUpUu.d.mts → namespace-3yGm4WF9.d.mts} +2 -2
- package/dist/{namespace-D8fZyqIh.d.mts → namespace-B95uYmZB.d.mts} +30 -30
- package/dist/{namespace-BxrHvS5c.mjs → namespace-C-piH3w4.mjs} +1 -1
- package/dist/{namespace-BQgZChZl.d.mts → namespace-COEUMuHL.d.mts} +154 -154
- package/dist/{namespace-Q-z7Lr2f.d.mts → namespace-CTsfVI3H.d.mts} +3 -3
- package/dist/{namespace-vf2H23bo.d.mts → namespace-DYJZAGzR.d.mts} +76 -39
- package/dist/namespace-DibbhCPP.mjs +1 -0
- package/dist/{native-session-supervisor-DbrqcFq9.mjs → native-session-supervisor-7ElwM6Is.mjs} +1 -1
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/{orchestrator-shared-yFP8e7d5.mjs → orchestrator-shared-Cxk3x8Vs.mjs} +1 -1
- package/dist/{package-fwIv7zzj.d.mts → package-MmQvNJ3u.d.mts} +1 -1
- package/dist/package-rdrXr17q.mjs +1 -0
- package/dist/package.json +1 -1
- package/dist/{profile-r4G32bCH.mjs → profile-BMBXUqqh.mjs} +1 -1
- package/dist/{provider-context-Ds6GNYnE.mjs → provider-context-DC_eq7es.mjs} +1 -1
- package/dist/provider-context-DjSUpHSM.mjs +1 -0
- package/dist/{providers-namespace-C0C-Sb4N.d.mts → providers-namespace-5GoTlHXz.d.mts} +7 -7
- package/dist/{registry-udUhXSIC.mjs → registry-U_3aYSin.mjs} +2 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/extension-discovery.d.mts +1 -1
- package/dist/runtime-node/extension-validation.d.mts +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +3 -3
- package/dist/runtime-node/index.mjs +2 -2
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-zLCdL-0u.d.mts → schema-B2bO5Yui.d.mts} +28 -2
- package/dist/{schema-atatXwNg.mjs → schema-D6WAI8OL.mjs} +1 -1
- package/dist/schemas-BWasvfw2.mjs +1 -0
- package/dist/{schemas-fEoe6H0K.d.mts → schemas-CDBn9MTz.d.mts} +154 -154
- package/dist/schemas-CE1gbhxu.mjs +1 -0
- package/dist/{schemas-IDGAJ_zv.d.mts → schemas-CscdPqCt.d.mts} +3 -3
- package/dist/{schemas-BbFAwUpf.d.mts → schemas-DMMWmWjq.d.mts} +1 -1
- package/dist/scoped-bus-H3xMYR0E.mjs +1 -0
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/index.mjs +1 -1
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +2 -2
- package/dist/services/adapter-subsystem/index.mjs +1 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/adapter-subsystem/namespace.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/capability/index.d.mts +1 -1
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +1 -1
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +3 -3
- package/dist/services/execution-target/index.mjs +1 -1
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.d.mts +1 -1
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +140 -140
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/log-import.mjs +1 -1
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/model-registry/index.d.mts +1 -1
- package/dist/services/model-registry/index.mjs +1 -1
- package/dist/services/preferences/index.d.mts +2 -2
- package/dist/services/preferences/schemas.d.mts +1 -1
- package/dist/services/preferences/storage-namespace.d.mts +2 -2
- package/dist/services/provider-context/index.d.mts +1 -1
- package/dist/services/provider-context/index.mjs +1 -1
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +9 -9
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.mjs +2 -1
- package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session/turns/namespace.mjs +1 -1
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/session-editor/index.mjs +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/index.mjs +1 -1
- package/dist/services/settings/namespace.mjs +1 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/clients-namespace.mjs +1 -1
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- package/dist/services/tray-menu/index.mjs +1 -1
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/session-0nWT4st6.mjs +39 -0
- package/dist/session-Bey-bzcX.mjs +1 -0
- package/dist/{skill-B_VlGon5.mjs → skill-N-ttlp1i.mjs} +1 -1
- package/dist/{src-6n-8M8EU.mjs → src-Ck2sbaDa.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +1 -1
- package/dist/storage/drizzle/client.mjs +1 -1
- package/dist/storage/drizzle/index.d.mts +1 -1
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/storage/handlers/index.mjs +1 -1
- package/dist/{tool-approval-service-B_28RhuK.mjs → tool-approval-service-DEQiipxj.mjs} +1 -1
- package/dist/{tools-BpzJterj.mjs → tools-uAgIrqan.mjs} +1 -1
- package/dist/transition-Coowd2dA.d.mts +454 -0
- package/dist/{types-BB8iIAjZ.d.mts → types-BslClRkH.d.mts} +1 -1
- package/dist/{types-DaznHkuE.d.mts → types-Cagp7JXb.d.mts} +279 -260
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/{version-SYP_DX4M.mjs → version-DoV_pSzT.mjs} +1 -1
- package/dist/workflow-BCKOJ4UC.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +61 -31
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/workflow-orchestrator.d.mts +3 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/{workflow-worker-CjuRYLmJ.mjs → workflow-worker-CojIlB6k.mjs} +1 -1
- package/package.json +1 -1
- package/dist/adapter-ux2xaQ6H.mjs +0 -1
- package/dist/await-trigger-uKEHY8E4.mjs +0 -1
- package/dist/bus-EZNBPRYi.mjs +0 -2
- package/dist/bus-TDrZtNyc.mjs +0 -1
- package/dist/canonical-model-BE7t86yt.mjs +0 -1
- package/dist/compression-Cy9DIqyr.mjs +0 -1
- package/dist/definition-Bija4lGr.mjs +0 -1
- package/dist/namespace-CH_NWUKW.mjs +0 -1
- package/dist/package-lxB0vpby.mjs +0 -1
- package/dist/primitive-runtime-BSg8J7VX.mjs +0 -1
- package/dist/schemas-Dvm_0GDr.mjs +0 -1
- package/dist/scoped-bus-CRC3ba_l.mjs +0 -1
- package/dist/session-Is5VSP2V.mjs +0 -1
- package/dist/session-ZAJrcudH.mjs +0 -39
- /package/dist/{ajv-Cx19PP7Q.mjs → ajv-B5dPIck0.mjs} +0 -0
- /package/dist/{base-orchestrator-BRq4MXa7.d.mts → base-orchestrator-Cw0vpNgB.d.mts} +0 -0
- /package/dist/{capability-service-CHl8rrwb.mjs → capability-service-XlymTzz1.mjs} +0 -0
- /package/dist/{cleanEnvForAdapter-D32WnVuy.mjs → cleanEnvForAdapter-BooAgM2R.mjs} +0 -0
- /package/dist/{client-D2ZftNb6.d.mts → client-CebV_fZc.d.mts} +0 -0
- /package/dist/{clients-namespace-CeAB0t06.d.mts → clients-namespace-Bt_VTkEU.d.mts} +0 -0
- /package/dist/{config-namespace-DW5KHKPW.mjs → config-namespace-CY9leBnE.mjs} +0 -0
- /package/dist/{config-namespace-DloU-hNB.d.mts → config-namespace-DqdFE6zk.d.mts} +0 -0
- /package/dist/{create-static-mount-Bi0VpYS8.mjs → create-static-mount-DkK28kKW.mjs} +0 -0
- /package/dist/{cross-spawn-C58yEvsS.mjs → cross-spawn-CDXy3BjE.mjs} +0 -0
- /package/dist/{cursor-storage-CpuT5POU.mjs → cursor-storage-luQAg7E_.mjs} +0 -0
- /package/dist/{definition-BdxbXbrq.d.mts → definition-CuJvtYeG.d.mts} +0 -0
- /package/dist/{descriptor-to-package-D-FNxohm.mjs → descriptor-to-package-DdpjpT7n.mjs} +0 -0
- /package/dist/{drizzle-D7dkDEB5.mjs → drizzle-DVTAl7Us.mjs} +0 -0
- /package/dist/{esm-CP2zvvlx.mjs → esm-CQG9Pc7n.mjs} +0 -0
- /package/dist/{event-DaXakaHo.mjs → event-DguYjV6D.mjs} +0 -0
- /package/dist/{execution-target-Da6Vjvba.mjs → execution-target-BR8bLkCR.mjs} +0 -0
- /package/dist/{extension-discovery-Bv5FDtrM.d.mts → extension-discovery-CIZn5bkq.d.mts} +0 -0
- /package/dist/{extension-namespace-O3sKdnY9.mjs → extension-namespace-v3K0qVry.mjs} +0 -0
- /package/dist/{facet-Q_vgXb23.mjs → facet-BM4y4aQP.mjs} +0 -0
- /package/dist/{filesystem-service-89fN-2Dd.d.mts → filesystem-service-Cwp0sWNc.d.mts} +0 -0
- /package/dist/{handler-BIA3ld4C.mjs → handler-2bPhRn0u.mjs} +0 -0
- /package/dist/{host-DFqmG2qO.mjs → host-vY07gek-.mjs} +0 -0
- /package/dist/{identity-CA5MzB19.mjs → identity-BarL3JYI.mjs} +0 -0
- /package/dist/{index-BVhnqzDC2.d.mts → index-B92mToDo2.d.mts} +0 -0
- /package/dist/{index-9vCtepE32.d.mts → index-BWIkf5oJ.d.mts} +0 -0
- /package/dist/{index-cFuQpzIm.d.mts → index-BjoOSg95.d.mts} +0 -0
- /package/dist/{index-BeNVLvtk2.d.mts → index-BvLXySoB2.d.mts} +0 -0
- /package/dist/{index-DJSffYTW2.d.mts → index-C23g_M_J2.d.mts} +0 -0
- /package/dist/{index-kOSSuOcK.d.mts → index-C4nStEdA.d.mts} +0 -0
- /package/dist/{index-DHHKwLww.d.mts → index-COI1tjAf.d.mts} +0 -0
- /package/dist/{index-DLPjliGd.d.mts → index-CfIW5biI.d.mts} +0 -0
- /package/dist/{index-orAkFukT.d.mts → index-CpKikwK4.d.mts} +0 -0
- /package/dist/{index-CkPIPbx9.d.mts → index-Cr9lh21j.d.mts} +0 -0
- /package/dist/{index-CBTp2XuF.d.mts → index-CuHqL95P.d.mts} +0 -0
- /package/dist/{index-CfpfkKih.d.mts → index-D3ahzHwb.d.mts} +0 -0
- /package/dist/{index-BE-yMFTz.d.mts → index-D7Hkmrr3.d.mts} +0 -0
- /package/dist/{index-DWqSqcpW.d.mts → index-DOOrKin9.d.mts} +0 -0
- /package/dist/{index-CYZqADXY2.d.mts → index-DUD7wikz2.d.mts} +0 -0
- /package/dist/{index-BUilJdHr.d.mts → index-Dfi8Rorw.d.mts} +0 -0
- /package/dist/{index-BplsE3qw.d.mts → index-DtwGhFFQ.d.mts} +0 -0
- /package/dist/{index-DVgKfgh1.d.mts → index-OGIC4puQ.d.mts} +0 -0
- /package/dist/{index-D0RWuwl5.d.mts → index-Y8rMeYYX.d.mts} +0 -0
- /package/dist/{index-BtL_9HBk.d.mts → index-gAFwNiJT.d.mts} +0 -0
- /package/dist/{index-DdCyeZ59.d.mts → index-wq7XeqyG.d.mts} +0 -0
- /package/dist/{jsonl-transport-Bb8ltqOe.mjs → jsonl-transport-CGPgD8iU.mjs} +0 -0
- /package/dist/{lib-BmcGxHXH.mjs → lib-ZKtnbCqH.mjs} +0 -0
- /package/dist/{materialization-DsPIGQP1.mjs → materialization-DBXjSiBn.mjs} +0 -0
- /package/dist/{model-registry-DQDclqdw.mjs → model-registry-C2VXobZj.mjs} +0 -0
- /package/dist/{model-registry-DLeMw3l8.mjs → model-registry-rYICIwyR.mjs} +0 -0
- /package/dist/{namespace-CEqkI6Zu.d.mts → namespace-65uwTpbg.d.mts} +0 -0
- /package/dist/{namespace-6u1Uf-iw2.d.mts → namespace-6sIu5nBI2.d.mts} +0 -0
- /package/dist/{namespace-q5dD3acO.d.mts → namespace-B3ol3pc-.d.mts} +0 -0
- /package/dist/{namespace-DrpHLJAy.mjs → namespace-BO3tODGC.mjs} +0 -0
- /package/dist/{namespace-uGUGfpGQ.mjs → namespace-BdO4e1Fm.mjs} +0 -0
- /package/dist/{namespace-2G7A4Sza.d.mts → namespace-BsYKEMd8.d.mts} +0 -0
- /package/dist/{namespace-DMhz3yvr.d.mts → namespace-CQ8uza7o.d.mts} +0 -0
- /package/dist/{namespace-zWB-ULrX.mjs → namespace-CVMZVqB5.mjs} +0 -0
- /package/dist/{namespace-nQS4XwnT.d.mts → namespace-D2s-4pyg.d.mts} +0 -0
- /package/dist/{namespace-FJsnoEQy.mjs → namespace-DBHwyhME.mjs} +0 -0
- /package/dist/{namespace-CN-Llu7H.mjs → namespace-DYSFDC2G.mjs} +0 -0
- /package/dist/{namespace-DcUwOJ4f.d.mts → namespace-Dk4OslmY.d.mts} +0 -0
- /package/dist/{namespace-B1Bldc48.d.mts → namespace-KMxsPJwm.d.mts} +0 -0
- /package/dist/{namespace-DKnJL0Ja.d.mts → namespace-LUNf8zo5.d.mts} +0 -0
- /package/dist/{namespace-UUw-S7ia.mjs → namespace-wke7juzy.mjs} +0 -0
- /package/dist/{orchestrator-shared-CbS4ueeq.d.mts → orchestrator-shared-ChOdIgh6.d.mts} +0 -0
- /package/dist/{out-BUHr98Xe.mjs → out-BoEZjBNz.mjs} +0 -0
- /package/dist/{package-YQeRE8bV.mjs → package-CF_Zm2v4.mjs} +0 -0
- /package/dist/{platform-CsO-MRJP.mjs → platform-DnbSvm2u.mjs} +0 -0
- /package/dist/{providers-FEZT2bQG.mjs → providers-Bd7BOZs0.mjs} +0 -0
- /package/dist/{quick-lru-C7AXdpbU.mjs → quick-lru-6e7I1Bgf.mjs} +0 -0
- /package/dist/{schema-Ba64XQjo.mjs → schema-DHlTAy0N.mjs} +0 -0
- /package/dist/{schema-introspection-D5FaI5B_.mjs → schema-introspection-B7xODt4I.mjs} +0 -0
- /package/dist/{schemas-9QC3nvYP.mjs → schemas-ArqQTC0Q.mjs} +0 -0
- /package/dist/{schemas-DznsZ0bq.d.mts → schemas-B6tEKf9T.d.mts} +0 -0
- /package/dist/{schemas-CRS7tkFP.d.mts → schemas-BemsLc_V.d.mts} +0 -0
- /package/dist/{schemas-C5iazMbM2.d.mts → schemas-ByssHRGU2.d.mts} +0 -0
- /package/dist/{schemas-5kegIs9D.mjs → schemas-CPI00yvh.mjs} +0 -0
- /package/dist/{schemas-Cae5dubB.d.mts → schemas-D4zaFE2p.d.mts} +0 -0
- /package/dist/{schemas-9Ifo5zSf.d.mts → schemas-DKncXGnb.d.mts} +0 -0
- /package/dist/{schemas-DZfBym73.d.mts → schemas-DWfo0wp4.d.mts} +0 -0
- /package/dist/{schemas-BxI5Yq8d.d.mts → schemas-DmGRSeIq.d.mts} +0 -0
- /package/dist/{schemas-BSAKbVyd.d.mts → schemas-KlH1hB7u.d.mts} +0 -0
- /package/dist/{schemas-DAYPhB5K.mjs → schemas-XeIBqwvE.mjs} +0 -0
- /package/dist/{semver-ClOD8k8c.mjs → semver-CIhHqMkw.mjs} +0 -0
- /package/dist/{server-lifecycle-CFQaPTf7.mjs → server-lifecycle-C5Z5PSMD.mjs} +0 -0
- /package/dist/{server-lifecycle-5iHxcgBO.d.mts → server-lifecycle-_AA6EfzL.d.mts} +0 -0
- /package/dist/{session-lineage-D_8W1MI0.d.mts → session-lineage-Cht4jbvV.d.mts} +0 -0
- /package/dist/{shared-schemas-jG3EtHZT.mjs → shared-schemas-BEVG96xW.mjs} +0 -0
- /package/dist/{src-CRDOZl7K.mjs → src-_VODAJnf.mjs} +0 -0
- /package/dist/{storage-namespace-C1JVmZF1.mjs → storage-namespace-D5q9CrBp.mjs} +0 -0
- /package/dist/{storage-namespace-gey7EUhM.d.mts → storage-namespace-Di1A3DMm.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-BPYSLTfN.d.mts → storage-namespace-definition-BffdI5Bz.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-Df8S3E3r.mjs → storage-namespace-definition-CzXPW45M.mjs} +0 -0
- /package/dist/{supports-color-AnssSSH9.mjs → supports-color-DcXkvGDF.mjs} +0 -0
- /package/dist/{telemetry-DdbvlZ8s.mjs → telemetry-Cvi4rxiE.mjs} +0 -0
- /package/dist/{tray-menu-service-am356993.mjs → tray-menu-service-B2AxiQqL.mjs} +0 -0
- /package/dist/{types-DhlQpVEb.d.mts → types-BMS6yfLS.d.mts} +0 -0
- /package/dist/{types-xLd-e0wf.d.mts → types-Bo78h9e3.d.mts} +0 -0
- /package/dist/{types-D-GeeSdd.d.mts → types-CPmOg4X7.d.mts} +0 -0
- /package/dist/{types-Bj7cOrBQ.d.mts → types-DCvp_swt.d.mts} +0 -0
- /package/dist/{variant-BdNN5edM.mjs → variant-5huHjUTm.mjs} +0 -0
- /package/dist/{window-registry-LRjWPwr4.mjs → window-registry-PkrFIwX2.mjs} +0 -0
- /package/dist/{window-registry-CA6AC8n7.d.mts → window-registry-ofIUQnfo.d.mts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as PageSurfaceConfig, s as SurfaceId } from "../schemas-
|
|
1
|
+
import { r as PageSurfaceConfig, s as SurfaceId } from "../schemas-BemsLc_V.mjs";
|
|
2
2
|
import * as _$zod from "zod";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SurfaceCapabilitySchema, c as SurfaceIdSchema, i as SurfaceCapability, l as isPageVisibleOnSurface, n as PageSchemas, o as SurfaceDeclaration, r as PageSurfaceConfig, s as SurfaceId, t as PageMetadata } from "../../schemas-
|
|
1
|
+
import { a as SurfaceCapabilitySchema, c as SurfaceIdSchema, i as SurfaceCapability, l as isPageVisibleOnSurface, n as PageSchemas, o as SurfaceDeclaration, r as PageSurfaceConfig, s as SurfaceId, t as PageMetadata } from "../../schemas-BemsLc_V.mjs";
|
|
2
2
|
export { PageMetadata, PageSchemas, PageSurfaceConfig, SurfaceCapability, SurfaceCapabilitySchema, SurfaceDeclaration, SurfaceId, SurfaceIdSchema, isPageVisibleOnSurface };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{t}from"./semver-
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{t}from"./semver-CIhHqMkw.mjs";import{z as n}from"zod";var r=e(t(),1);const i=n.string().min(1).refine(e=>e.trim().length>0&&(0,r.validRange)(e)!==null,{message:`Must be a valid semver range (e.g. ">=1.0.0 <2.0.0", "^1.5.0")`});function a(e,t){return(0,r.satisfies)(e,t,{includePrerelease:!0})}function o(e){let t=(0,r.validRange)(e);return t===`*`||t===`>=0.0.0`||t===`>=0.0.0-0`}const s=n.string().min(1).refine(e=>(0,r.valid)(e)!==null&&!e.startsWith(`v`),{message:`Must be a valid semver version (e.g. "1.0.0")`});export{a as i,i as n,o as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,r as t,t as n}from"./json-value-CmhSGMLv.mjs";import{b as r,f as i,y as a}from"./artifact-B3npq1cy.mjs";import{a as o}from"./visibility-Cb62p9bv.mjs";import"./credential-ref-YWQQENEo.mjs";import{t as s}from"./provider-context-DjSUpHSM.mjs";import{a as c,o as l}from"./schemas-CE1gbhxu.mjs";import{z as u}from"zod";import{createBusNamespace as d,getFullSubjectForSubjectDefinition as f,observability as ee}from"@makaio/framework/core";const p=u.enum([`wait-in-process`,`exit-and-redispatch`,`exit-and-resume`]),te=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`path`),path:u.string().min(1)}).strict(),u.object({kind:u.literal(`source`),filename:u.string().min(1),source:u.string()}).strict()]),m=u.object({source:te.optional(),requirements:u.object({isolation:u.enum([`local`,`container`,`remote`]).optional(),capabilities:u.array(u.string()).optional()}).catchall(e).optional(),providers:u.record(u.string(),e).optional()}).catchall(e),h=u.object({kind:u.string().min(1),id:u.string().min(1)});function ne(e){return`${ie(e.kind)}:${ie(e.id)}`}function re(e){let t=ae(e);if(t<1)throw Error(`Invalid artifact ref key: ${e}`);let n=oe(e.slice(t+1));if(n.length===0)throw Error(`Invalid artifact ref key (empty id): ${e}`);return{kind:oe(e.slice(0,t)),id:n}}function ie(e){return e.replace(/\\/g,`\\\\`).replace(/:/g,`\\:`)}function ae(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(t){t=!1;continue}if(r===`\\`){t=!0;continue}if(r===`:`)return n}return-1}function oe(e){let t=``,n=!1;for(let r of e){if(n){if(r!==`\\`&&r!==`:`)throw Error(`Invalid artifact ref key component: ${e}`);t+=r,n=!1;continue}if(r===`\\`){n=!0;continue}t+=r}if(n)throw Error(`Invalid artifact ref key component: ${e}`);return t}const g=u.union([u.string(),u.number(),u.boolean(),u.null()]),se=u.union([g,u.object({$in:u.array(g)}).strict(),u.object({$ne:g}).strict(),u.object({$exists:u.boolean()}).strict(),u.object({$startsWith:u.string()}).strict(),u.object({$endsWith:u.string()}).strict()]),ce=u.record(u.string(),se),_=u.object({type:u.literal(`bus-event`),subject:u.string(),filter:ce.optional(),filterExpression:u.string().optional()}),le=u.object({type:u.literal(`extension`),extensionType:u.string().regex(/^[a-z0-9-]+:[a-z0-9._-]+$/),config:n.optional()}),v=u.discriminatedUnion(`type`,[u.object({type:u.literal(`manual`)}),u.object({type:u.literal(`cron`),schedule:u.string(),timezone:u.string().optional()}),u.object({type:u.literal(`webhook`),event:u.string(),branch:u.string().optional(),repo:u.string().optional()}),le,_]),y=u.discriminatedUnion(`type`,[u.object({type:u.literal(`global`)}).strict(),u.object({type:u.literal(`workspace`),id:u.string().min(1)}).strict(),u.object({type:u.literal(`session`),id:u.string().min(1)}).strict(),u.object({type:u.literal(`external`),kind:u.string().min(1),id:u.string().min(1)}).strict()]),b=u.string().min(1),x=u.object({kind:u.string().min(1),schemaVersion:u.string().min(1),scope:r,resolve:u.string().min(1).optional(),create:u.string().min(1).optional(),statusPath:u.string().min(1).optional()}),ue=u.object({kind:u.string().min(1),schemaVersion:u.string().min(1),scope:r,dataExpression:u.string().optional()}),de=u.object({file:u.string().min(1),line:u.number().int().positive().optional(),column:u.number().int().positive().optional()}),S=u.enum([`station`,`delegate-agent`,`delegate-role`,`parallel`,`gate`,`iterate`,`iterate-chain`,`loop`,`sequence`]),fe=u.enum([`all-settled`,`fail-fast`]),C=u.object({id:u.string().min(1),when:b.optional(),skip:b.optional(),writes:u.array(ue).optional()}),w=u.lazy(()=>u.discriminatedUnion(`type`,[E,pe,me,he,ge,_e,ve,be,T])),T=C.extend({type:u.literal(`sequence`),nodes:u.lazy(()=>u.array(w))}),E=C.extend({type:u.literal(`station`),prompt:u.string().min(1),role:u.string().min(1).optional(),outputSchema:t.optional(),timeoutMs:u.number().int().positive().optional(),completion:c.optional()}),pe=C.extend({type:u.literal(`delegate-agent`),agentId:u.string().min(1),inputExpression:u.string().optional(),outputSchema:t.optional()}),me=C.extend({type:u.literal(`delegate-role`),role:u.string().min(1),prompt:u.string().min(1),outputSchema:t.optional(),timeoutMs:u.number().int().positive().optional(),completion:c.optional()}),he=C.extend({type:u.literal(`parallel`),mode:fe.optional(),branches:u.record(u.string().min(1),u.lazy(()=>T))}),ge=C.extend({type:u.literal(`gate`),prompt:u.string().min(1),title:u.string().optional(),autoAction:u.enum([`approve`,`reject`]),timeoutMs:u.number().int().positive().nullable(),resumeSchema:t.optional()}),_e=C.extend({type:u.literal(`iterate`),collection:u.string().min(1),body:u.lazy(()=>T),concurrency:u.number().int().nonnegative().optional()}),ve=C.extend({type:u.literal(`iterate-chain`),collection:u.string().min(1),body:u.lazy(()=>T)}),ye=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`pass`)}).strict(),u.object({kind:u.literal(`loop`)}).strict(),u.object({kind:u.literal(`escalate`),reason:u.string().min(1)}).strict()]),be=C.extend({type:u.literal(`loop`),maxRounds:u.number().int().positive(),body:u.lazy(()=>T),gate:u.object({handler:u.string().min(1),input:u.string().min(1).optional(),config:e.optional(),escalation:u.object({title:u.string().optional(),prompt:u.string().min(1),resumeSchema:t.optional(),autoAction:u.enum([`approve`,`reject`]).default(`reject`),timeoutMs:u.number().int().positive().nullable().default(null)}).strict().optional()}).strict()}),xe=u.object({factoryId:u.string().min(1),preview:u.array(u.lazy(()=>w)).optional(),sourceLocation:de.optional()}),D=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`editor`)}).strict(),u.object({kind:u.literal(`extension`),extension:u.string().min(1),externalId:u.string().min(1).optional(),syncedAt:u.string().datetime().optional(),metadata:n.default({})}).strict()]),O=u.object({schema:t,initial:e.optional()}),k=u.object({id:u.string().min(1),name:u.string().optional(),description:u.string().optional(),inputSchema:t.optional(),configSchema:t.optional(),outputSchema:t.optional(),state:O.optional(),artifact:x.optional(),root:T,triggers:u.array(v).optional(),scope:y.default({type:`global`}),canvasLayout:u.record(u.string(),e).optional(),source:D.optional(),executionHints:m.optional()}),A=u.enum([`pending`,`running`,`paused`,`completed`,`failed`,`cancelled`]),j=u.object({id:u.string(),workflowId:u.string(),coordinatorSessionId:u.string().optional(),status:A,inputs:e,config:n.optional(),startedAt:u.number(),completedAt:u.number().optional(),error:u.string().optional(),reason:u.string().optional(),triggerPayload:n.optional(),scope:y,artifactRef:h.optional()}),M=u.object({frameId:u.string(),nodeId:u.string(),nodeType:S,path:u.array(u.string()),parentFrameId:u.string().optional(),status:u.enum([`pending`,`running`,`waiting`,`completed`,`failed`,`skipped`,`cancelled`]),attempt:u.number().int().nonnegative().default(0),iteration:u.number().int().nonnegative().optional(),branchKey:u.string().optional(),output:e.optional(),error:u.string().optional(),startedAt:u.number().optional(),completedAt:u.number().optional()}),N=u.enum([`waiting`,`resumed`,`rejected`,`timed-out`,`cancelled`]),Se=u.object({executionId:u.string(),nodeId:u.string(),frameId:u.string(),schema:t,prompt:u.string().optional(),status:N,autoAction:u.enum([`approve`,`reject`]),timeoutMs:u.number().int().positive().nullable(),resumeData:e.optional(),reason:u.string().optional(),createdAt:u.number(),resolvedAt:u.number().optional()}),P=u.object({adapterName:u.string().min(1),model:u.string().optional(),reasoningEffort:o.optional(),harnessId:u.string().optional(),systemPrompt:u.string().optional(),contextMode:l.optional(),providerContext:s.optional(),completion:c.optional()}),Ce=P,we=u.object({scope:y.optional()}),Te=u.object({startedAt:u.number(),id:u.string()}),Ee=1,De=500,Oe=50,ke=u.object({workflowId:u.string().min(1).optional(),scope:y.optional(),status:A.optional(),artifactRef:h.optional(),limit:u.number().int().min(1).max(500).default(50),cursor:Te.optional()}).refine(e=>e.workflowId!==void 0||e.scope!==void 0||e.artifactRef!==void 0,{message:`Either workflowId, scope, or artifactRef is required.`}),Ae=200,je=100,Me=10,Ne=u.object({refs:u.array(h).min(1).max(200),limitPerRef:u.number().int().min(1).max(100).default(10)}),Pe=u.object({executionId:u.string().min(1).optional(),status:N.optional(),limit:u.number().int().min(1).max(500).default(50)}).refine(e=>e.executionId!==void 0||e.status!==void 0,{message:`Either executionId or status is required.`}),F=u.enum([`station`,`delegate-agent`,`delegate-role`,`gate`]),Fe=u.enum([`station`]),Ie=u.object({input:u.number().int().nonnegative(),output:u.number().int().nonnegative(),cached:u.number().int().nonnegative().optional()}),Le=u.object({duration:u.number().nonnegative(),tokenUsage:Ie.optional(),estimatedCost:u.number().nonnegative().optional(),toolCalls:u.number().int().nonnegative().optional()}),Re=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`none`)}).strict(),u.object({kind:u.literal(`hmac`),secret:u.string().min(1)}).strict()]),ze=u.object({cwd:u.string().min(1),env:u.record(u.string(),u.string()).optional()}),Be=u.object({executionId:u.string().min(1),stepId:u.string().min(1),reason:u.string().optional()});function Ve(e){let t=e.indexOf(`.`);if(t<=0||t===e.length-1)throw Error(`Invalid step cancel subject: ${e}`);return{subject:e.slice(t+1),$meta:{namespace:e.slice(0,t),isRequest:!1,payload:{},local:!1,channel:!1}}}const He=u.object({executionId:u.string().min(1),reason:u.string().optional()});function Ue(e){let t=e.indexOf(`.`);if(t<=0||t===e.length-1)throw Error(`Invalid workflow cancel subject: ${e}`);return{subject:e.slice(t+1),$meta:{namespace:e.slice(0,t),isRequest:!1,payload:{},local:!1,channel:!1}}}const We=u.object({stepId:u.string().min(1),executionId:u.string().min(1),workflowId:u.string().min(1),coordinatorSessionId:u.string().min(1),stepType:Fe,stepDefinition:E,resolvedInputs:n,busUrl:u.string().optional(),busAuth:Re.default({kind:`none`}),platformDefaults:ze,cancelSubject:u.string().min(1)}).superRefine((e,t)=>{e.stepType!==e.stepDefinition.type&&t.addIssue({code:`custom`,path:[`stepDefinition`,`type`],message:`stepDefinition.type must match stepType (${e.stepType})`})}),Ge=`Workflow cancelled`,Ke=u.object({status:u.enum([`completed`,`failed`]),output:e.optional(),error:u.string().optional(),telemetry:Le}),qe=u.enum([`running`,`completed`,`failed`,`skipped`]),I=u.object({executionId:u.string().min(1),frameId:u.string().min(1),stepId:u.string().min(1),stepType:F,status:qe,startedAt:u.number().optional(),completedAt:u.number().optional(),durationMs:u.number().nonnegative().optional(),inputTokens:u.number().int().nonnegative().optional(),outputTokens:u.number().int().nonnegative().optional(),estimatedCost:u.number().nonnegative().optional(),toolCallCount:u.number().int().nonnegative().optional(),input:u.string().optional(),output:u.string().optional()}),Je=u.enum([`triggered-by`,`feedback-loop`,`rerun-of`]),L=u.object({sourceExecutionId:u.string().min(1),targetExecutionId:u.string().min(1),linkType:Je,metadata:u.record(u.string(),u.unknown()).optional()}),Ye=u.object({sourceExecutionId:u.string().min(1).optional(),targetExecutionId:u.string().min(1).optional()}).refine(e=>e.sourceExecutionId!==void 0||e.targetExecutionId!==void 0,{message:`Either sourceExecutionId or targetExecutionId is required.`}),Xe={RUN_CONTEXT_NOT_FOUND:`WORKFLOW_RUN_CONTEXT_NOT_FOUND`,SNAPSHOT_UNAVAILABLE:`WORKFLOW_SNAPSHOT_UNAVAILABLE`,SOURCE_MISMATCH:`WORKFLOW_SOURCE_MISMATCH`,NOT_EXECUTABLE:`WORKFLOW_NOT_EXECUTABLE`,HANDLER_UNAVAILABLE:`WORKFLOW_HANDLER_UNAVAILABLE`};var Ze=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`WorkflowError`}};const R=u.string().refine(e=>e===``||e.startsWith(`/`),{message:`JSON Patch paths must be empty or start with "/".`}),Qe=u.object({op:u.enum([`add`,`replace`,`test`]),path:R,value:e}).strict(),$e=u.object({op:u.literal(`remove`),path:R}).strict(),et=u.object({op:u.enum([`move`,`copy`]),path:R,from:R}).strict(),z=u.discriminatedUnion(`op`,[Qe,$e,et]),tt=u.object({type:u.literal(`artifact-query`),query:i,select:u.enum([`latest`,`all`]),optional:u.boolean().optional()}),nt=u.object({type:u.literal(`bus-request`),subject:u.string().min(1),payload:u.record(u.string(),u.unknown()).optional(),optional:u.boolean().optional()}),rt=u.discriminatedUnion(`type`,[tt,nt]),it=u.object({type:u.literal(`artifact`),kind:u.string().min(1),schemaVersion:u.string().min(1),scope:r,metadata:u.record(u.string(),u.unknown()).optional()}),at=u.object({type:u.literal(`bus-event`),subject:u.string().min(1),payload:u.record(u.string(),u.unknown()).optional()}),ot=u.discriminatedUnion(`type`,[it,at]),st=u.object({content:u.string(),metadata:u.record(u.string(),u.unknown()).optional()}),ct=u.object({sources:u.record(u.string(),st)}),lt=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`none`)}).strict(),u.object({kind:u.literal(`hmac`),secret:u.string().min(1)}).strict()]),B=u.discriminatedUnion(`kind`,[u.object({kind:u.literal(`path`),path:u.string().min(1)}).strict(),u.object({kind:u.literal(`source`),filename:u.string().min(1),source:u.string()}).strict(),u.object({kind:u.literal(`definition`),workflowId:u.string().min(1)}).strict()]),ut=u.object({source:B,definition:k.optional(),executionId:u.string().min(1),workflowId:u.string().min(1),triggerPayload:n.default({}),inputs:e.default({}),config:n.optional(),artifactRef:h.optional(),scope:y.default({type:`global`}),busUrl:u.string().optional(),busAuth:lt.default({kind:`none`}),context:u.object({repoPath:u.string().min(1),makaioHome:u.string().min(1),os:u.enum([`darwin`,`linux`,`win32`]),arch:u.string().min(1),worktree:u.string().optional()}),env:u.record(u.string(),u.string()).default({}),coordinatorSessionId:u.string().min(1),executionHints:m.optional(),cancelSubject:u.string().min(1),suspensionStrategy:p.default(`wait-in-process`)}),V=u.object({executionId:u.string().min(1),workflowId:u.string().min(1)}),dt=u.discriminatedUnion(`status`,[V.extend({status:u.literal(`completed`),artifact:a.optional()}).strict(),V.extend({status:u.literal(`failed`),error:u.string().min(1)}).strict(),V.extend({status:u.literal(`cancelled`),reason:u.string().min(1).optional()}).strict(),V.extend({status:u.literal(`paused`),pausedAtGateId:u.string().min(1),pausedAtFrameId:u.string().min(1)}).strict()]),ft=u.object({name:u.string().min(1),importPath:u.string().min(1)}),pt=u.object({packages:u.array(ft).default([])}),mt=u.object({executionId:u.string().min(1),workflowId:u.string().min(1),source:B,definitionSnapshot:k.optional(),workerManifest:pt.default({packages:[]}),inputs:e.default({}),config:n.optional(),scope:y.default({type:`global`}),triggerPayload:n.default({}),artifactRef:h.optional(),coordinatorSessionId:u.string().min(1),executionHints:m.optional(),dispatchMetadata:n.optional(),cancelSubject:u.string().min(1),context:u.object({repoPath:u.string().min(1),makaioHome:u.string().min(1),os:u.enum([`darwin`,`linux`,`win32`]),arch:u.string().min(1),worktree:u.string().optional()}),env:u.record(u.string(),u.string()).default({}),createdAt:u.number(),suspensionStrategy:p.default(`wait-in-process`)}).superRefine((e,t)=>{e.source.kind===`definition`&&e.definitionSnapshot===void 0&&t.addIssue({code:u.ZodIssueCode.custom,path:[`definitionSnapshot`],message:`definitionSnapshot is required when source.kind is "definition"`})}),H=u.object({executionId:u.string().min(1),workflowId:u.string().min(1),workflowName:u.string().optional(),status:u.enum([`pending`,`running`,`paused`,`completed`,`failed`,`cancelled`]),startedAt:u.number(),completedAt:u.number().optional(),durationMs:u.number().nonnegative().optional(),totalInputTokens:u.number().int().nonnegative().optional(),totalOutputTokens:u.number().int().nonnegative().optional(),totalEstimatedCost:u.number().nonnegative().optional(),error:u.string().optional(),failedNodeId:u.string().optional()}),ht=u.object({executionId:u.string().min(1),frameId:u.string().min(1),nodeId:u.string().min(1),nodeType:F,path:u.array(u.string()),status:u.enum([`pending`,`running`,`waiting`,`completed`,`failed`,`skipped`,`cancelled`]),attempt:u.number().int().nonnegative(),iteration:u.number().int().nonnegative().optional(),branchKey:u.string().optional(),startedAt:u.number().optional(),completedAt:u.number().optional(),durationMs:u.number().nonnegative().optional(),inputTokens:u.number().int().nonnegative().optional(),outputTokens:u.number().int().nonnegative().optional(),estimatedCost:u.number().nonnegative().optional(),error:u.string().optional()}),gt=u.object({executionId:u.string().min(1),frameId:u.string().min(1),nodeId:u.string().min(1),artifact:x,revision:u.string().min(1).optional(),writtenAt:u.number()}),_t=u.object({executionId:u.string().min(1),nodeId:u.string().min(1),frameId:u.string().min(1),status:u.enum([`waiting`,`resumed`,`rejected`,`timed-out`,`cancelled`]),prompt:u.string().optional(),openedAt:u.number(),resolvedAt:u.number().optional(),resumeData:e.optional()}),vt=u.object({executionId:u.string().min(1),inputTokens:u.number().int().nonnegative(),outputTokens:u.number().int().nonnegative(),cachedTokens:u.number().int().nonnegative().optional(),estimatedCost:u.number().nonnegative(),byModel:u.record(u.string(),u.object({inputTokens:u.number().int().nonnegative(),outputTokens:u.number().int().nonnegative(),estimatedCost:u.number().nonnegative()})).optional()}),yt=u.object({total:u.number().int().nonnegative(),byStatus:u.object({pending:u.number().int().nonnegative(),running:u.number().int().nonnegative(),paused:u.number().int().nonnegative(),completed:u.number().int().nonnegative(),failed:u.number().int().nonnegative(),cancelled:u.number().int().nonnegative()}),totalDurationMs:u.number().nonnegative(),totalInputTokens:u.number().int().nonnegative(),totalOutputTokens:u.number().int().nonnegative(),totalEstimatedCost:u.number().nonnegative()}),bt=u.object({executionId:u.string().min(1),frameId:u.string().min(1),factoryId:u.string().min(1),materializedNodeIds:u.array(u.string().min(1)),factoryInput:t.optional(),materializedAt:u.number()}),xt=u.object({message:u.string().min(1),details:u.string().min(1).optional(),kind:u.string().min(1).optional(),metadata:e.optional()}).strict(),U=u.object({executionId:u.string(),stepId:u.string(),stepType:u.enum([`station`,`delegate-agent`,`delegate-role`,`gate`])}),W=U.extend({stepType:u.literal(`gate`)}),St=u.discriminatedUnion(`source`,[W.extend({frameId:u.string(),action:u.enum([`approve`,`reject`]),source:u.literal(`user`),reason:u.string().optional()}),W.extend({frameId:u.string(),action:u.enum([`approve`,`reject`]),source:u.literal(`timeout`)}),W.extend({frameId:u.string(),source:u.literal(`cancelled`)})]),Ct=W.extend({workflowId:u.string(),workflowName:u.string(),title:u.string(),message:u.string(),autoAction:u.enum([`approve`,`reject`]),timeoutMs:u.number().nullable(),openedAt:u.number()}),wt={getDefinition:{request:u.object({id:u.string()}),response:u.object({workflow:k.nullable()})},setDefinition:{request:u.object({workflow:k}),response:u.object({id:u.string()})},deleteDefinition:{request:u.object({id:u.string()}),response:u.object({deleted:u.boolean()})},listDefinitions:{request:we,response:u.object({workflows:u.array(k)})},"definition.created":k,"definition.updated":k,"definition.deleted":u.object({id:u.string()}),start:{request:u.object({workflowId:u.string(),input:e.optional(),config:e.optional(),artifactRef:h.optional(),scope:y.optional(),executionHints:m.optional(),parentSessionId:u.string().optional(),triggerPayload:n.optional()}),response:u.object({executionId:u.string()})},rerun:{request:u.object({executionId:u.string().min(1),mode:u.enum([`snapshot`,`current`]),input:e.optional(),config:e.optional(),artifactRef:h.optional(),scope:y.optional(),executionHints:m.optional(),parentSessionId:u.string().optional(),triggerPayload:n.optional(),reason:u.string().min(1).optional()}),response:u.object({executionId:u.string()})},cancel:{request:u.object({executionId:u.string(),reason:u.string().optional()}),response:u.object({cancelled:u.boolean()})},getExecution:{request:u.object({executionId:u.string()}),response:u.object({execution:j.nullable()})},listExecutions:{request:ke,response:u.object({executions:u.array(j)})},listExecutionsByArtifactRefs:{request:Ne,response:u.object({executionsByRef:u.record(u.string(),u.array(j))})},listSpans:{request:u.object({executionId:u.string()}),response:u.object({spans:u.array(I)})},listGateInstances:{request:Pe,response:u.object({gates:u.array(Se)})},setExecutionLink:{request:u.object({link:L}),response:u.object({id:u.string()})},listExecutionLinks:{request:Ye,response:u.object({links:u.array(L)})},listFrames:{request:u.object({executionId:u.string().min(1)}),response:u.object({frames:u.array(M)})},listTriggerTypes:{request:u.object({}),response:u.object({triggerTypes:u.array(u.object({type:u.string(),displayName:u.string(),icon:u.string(),category:u.string(),description:u.string().optional(),configJsonSchema:t,outputJsonSchema:t,source:u.string()}))})},runFile:{request:u.object({filePath:u.string().min(1),triggerPayload:n.optional(),scope:y.optional()}),response:u.object({executionId:u.string()})},resolveRole:{request:u.object({roleId:u.string().min(1)}),response:P},resolveAgent:{request:u.object({agentId:u.string().min(1)}),response:Ce},getRunContext:{request:u.object({executionId:u.string().min(1)}),response:mt},"execution.started":u.object({executionId:u.string(),workflowId:u.string(),coordinatorSessionId:u.string().optional(),startedAt:u.number().nonnegative().optional(),artifactRef:h.optional()}),"execution.completed":u.object({executionId:u.string(),workflowId:u.string(),totalDuration:u.number(),completedAt:u.number().nonnegative().optional()}),"execution.failed":u.object({executionId:u.string(),workflowId:u.string(),error:u.string(),failedStepId:u.string().optional(),completedAt:u.number().nonnegative().optional()}),"execution.cancelled":u.object({executionId:u.string(),workflowId:u.string(),reason:u.string().optional(),completedAt:u.number().nonnegative().optional()}),"execution.progress":u.object({executionId:u.string().min(1),workflowId:u.string().min(1),frameId:u.string().min(1),nodeId:u.string().min(1),progress:xt,emittedAt:u.number().int().nonnegative()}),"execution.paused":ee.schema(u.object({executionId:u.string(),workflowId:u.string(),pausedAtGateId:u.string().min(1),pausedAtFrameId:u.string().min(1)}),{traceAll:!0}),"step.beforeStart":U,"step.started":U.extend({sessionId:u.string().optional(),subagentId:u.string().optional()}),"step.completed":U.extend({result:e.optional(),duration:u.number()}),"step.failed":U.extend({error:u.string()}),"step.skipped":U.extend({reason:u.string().optional(),condition:u.string().optional()}),"gate.requested":Ct,"gate.awaitApproval":{request:Ct,response:u.object({action:u.enum([`approve`,`reject`]),source:u.enum([`user`,`timeout`]),reason:u.string().optional()})},"gate.respond":{request:u.object({executionId:u.string(),gateId:u.string(),action:u.enum([`approve`,`reject`]),frameId:u.string().optional(),resumeData:e,reason:u.string().optional()}),response:u.object({accepted:u.boolean()})},"gate.resolved":St,"frame.started":u.object({executionId:u.string(),frameId:u.string(),nodeId:u.string(),nodeType:S,path:u.array(u.string()),parentFrameId:u.string().optional(),startedAt:u.number().nonnegative().optional()}),"frame.completed":u.object({executionId:u.string(),frameId:u.string(),nodeId:u.string(),output:e.optional(),duration:u.number().nonnegative().optional(),completedAt:u.number().nonnegative().optional()}),"frame.failed":u.object({executionId:u.string(),frameId:u.string(),nodeId:u.string(),error:u.string(),duration:u.number().nonnegative().optional(),completedAt:u.number().nonnegative().optional()}),"frame.sessionLinked":u.object({executionId:u.string(),frameId:u.string(),sessionId:u.string()}).strict(),"gate.suspended":u.object({executionId:u.string(),frameId:u.string(),nodeId:u.string(),schema:t,prompt:u.string().optional(),title:u.string().optional(),autoAction:u.enum([`approve`,`reject`]),timeoutMs:u.number().nullable(),openedAt:u.number()}),"gate.resumed":u.object({executionId:u.string(),frameId:u.string(),nodeId:u.string(),resumeData:e}),"dynamic.materialized":u.object({executionId:u.string(),frameId:u.string(),factoryId:u.string().min(1),materializedNodes:u.number().int().nonnegative()}),"artifact.updated":u.object({executionId:u.string(),frameId:u.string(),artifactRef:u.object({kind:u.string().min(1),id:u.string().min(1)}),paths:u.array(u.string()),operation:u.string().min(1),revision:u.string().min(1).optional()}),"worklog.get":{request:u.object({executionId:u.string().min(1)}),response:u.object({summary:H.nullable()})},"worklog.list":{request:u.object({workflowId:u.string().min(1).optional(),status:A.optional(),limit:u.number().int().positive().optional(),offset:u.number().int().nonnegative().optional()}),response:u.object({items:u.array(H),total:u.number().int().nonnegative()})},"worklog.stats":{request:u.object({workflowId:u.string().min(1).optional(),since:u.number().int().nonnegative().optional(),until:u.number().int().nonnegative().optional()}),response:u.object({stats:yt})},"worklog.changed":u.object({executionId:u.string().min(1)}),"state.get":{request:u.object({executionId:u.string().min(1)}),response:u.object({executionId:u.string().min(1),sequence:u.number().int().nonnegative(),value:e})},"state.patch":{request:u.object({executionId:u.string().min(1),expectedSequence:u.number().int().nonnegative(),patch:u.array(z),nextValue:e}),response:u.object({executionId:u.string().min(1),sequence:u.number().int().positive(),value:e})},"state.updated":u.object({executionId:u.string().min(1),sequence:u.number().int().positive(),patch:u.array(z),value:e,updatedAt:u.number().int().positive()})},Tt=d(`workflow`,wt),Et=Tt.subjects;function Dt(e,t){G(e,t,void 0,0,[],`root`,void 0,void 0)}function G(e,t,n,r,i,a,o,s){let c={parent:n,depth:r,ancestors:i,relationship:a,...o!==void 0&&{index:o},...s!==void 0&&{branchKey:s}};if(t.enter?.(e,c)===!1)return;let l=[...i,e.id],u=r+1;switch(e.type){case`sequence`:{let n=e;for(let r=0;r<n.nodes.length;r++)G(n.nodes[r],t,e,u,l,`sequence-child`,r,void 0);break}case`parallel`:{let n=e;for(let[r,i]of Object.entries(n.branches))G(i,t,e,u,l,`parallel-branch`,void 0,r);break}case`iterate`:G(e.body,t,e,u,l,`iterate-body`,void 0,void 0);break;case`iterate-chain`:G(e.body,t,e,u,l,`iterate-chain-body`,void 0,void 0);break;case`loop`:G(e.body,t,e,u,l,`loop-body`,void 0,void 0);break}t.leave?.(e,c)}function Ot(e){switch(e){case`station`:case`delegate-agent`:case`delegate-role`:case`gate`:return`leaf`;case`parallel`:case`iterate`:case`iterate-chain`:case`loop`:return`control`;case`sequence`:return`structural`}}function kt(e,t,n){return e===`parallel-branch`&&t!==void 0?[{kind:`branch`,key:t}]:e===`sequence-child`&&n!==void 0?[{kind:`index`,value:n}]:e===`iterate-body`||e===`iterate-chain-body`||e===`loop-body`?[{kind:`body`}]:[]}function At(e){return e.replace(/\\/g,`\\\\`).replace(/\//g,`\\/`)}function jt(e){return e.map(e=>{switch(e.kind){case`node`:return`n:${At(e.id)}`;case`branch`:return`b:${At(e.key)}`;case`index`:return`i:${e.value}`;case`body`:return`body`}}).join(`/`)}function Mt(e){let t=[],n=[],r=new Map,i=[],a=[],o=[];return Dt(e.root,{enter(e,s){let c=kt(s.relationship,s.branchKey,s.index),l={kind:`node`,id:e.id};i.push(...c,l),o.push(c.length+1);let u=[...i],d=jt(u),f=a.at(-1);if(t.push({key:d,nodeId:e.id,type:e.type,role:Ot(e.type),path:u,parentKey:f,...s.branchKey!==void 0&&{branchKey:s.branchKey}}),f!==void 0&&s.parent!==void 0)switch(s.parent.type){case`sequence`:{n.push({sourceKey:f,targetKey:d,kind:`contains`});let e=r.get(f);e!==void 0&&n.push({sourceKey:e,targetKey:d,kind:`sequence`}),r.set(f,d);break}case`parallel`:n.push({sourceKey:f,targetKey:d,kind:`branch`});break;case`iterate`:case`iterate-chain`:case`loop`:n.push({sourceKey:f,targetKey:d,kind:`body`});break;default:n.push({sourceKey:f,targetKey:d,kind:`contains`});break}a.push(d)},leave(){let e=o.pop()??0;i.splice(i.length-e,e),a.pop()}}),{nodes:t,edges:n}}function K(e){return q(e.body.nodes,e.id)}function q(e,t){for(let n of e){if(n.type===`loop`)return`Nested loop '${n.id}' found inside loop '${t}' — V1 does not support nested loops`;if(n.type===`sequence`){let e=q(n.nodes,t);if(e)return e}if(n.type===`parallel`)for(let e of Object.values(n.branches)){let n=q(e.nodes,t);if(n)return n}if(n.type===`iterate`||n.type===`iterate-chain`){let e=n.body,r=q(e.nodes,t);if(r)return r}}}const J=new WeakMap,Nt=new WeakMap;function Y(e){let{$schema:t,...n}=u.toJSONSchema(e);return n}function X(e,t,n){let r=J.get(e);if(r!==void 0&&t.set(e.id,r),e.type===`sequence`)for(let r of e.nodes)X(r,t,n);else if(e.type===`parallel`)for(let r of Object.values(e.branches))X(r,t,n);else if(e.type===`iterate`)X(e.body,t,n);else if(e.type===`iterate-chain`)X(e.body,t,n);else if(e.type===`loop`){if(n!==void 0){let t=Nt.get(e);t!==void 0&&n.set(e.gate.handler,t)}X(e.body,t,n)}}function Pt(e,t,n){let r={id:e,type:`station`,prompt:e,...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip}};return J.set(r,t),r}function Ft(e,t,n){return{id:e,type:`delegate-agent`,agentId:t.agentId,...t.inputExpression!==void 0&&{inputExpression:t.inputExpression},...t.outputSchema!==void 0&&{outputSchema:t.outputSchema},...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip}}}function It(e,t,n){return{id:e,type:`delegate-role`,role:t,prompt:n?.prompt??e,...n?.when!==void 0&&{when:n.when},...n?.skip!==void 0&&{skip:n.skip},...n?.outputSchema!==void 0&&{outputSchema:n.outputSchema},...n?.timeoutMs!==void 0&&{timeoutMs:n.timeoutMs},...n?.completion!==void 0&&{completion:n.completion}}}function Lt(e,t){return{id:e,type:`gate`,prompt:t.prompt,autoAction:t.autoAction,timeoutMs:t.timeoutMs,...t.title!==void 0&&{title:t.title},...t.resume!==void 0&&{resumeSchema:Y(t.resume)}}}function Rt(e,t,n){let r=`${e}__item`,i={id:r,type:`station`,prompt:r},a={id:e,type:`iterate`,collection:n.collection,body:{id:`${e}__body`,type:`sequence`,nodes:[i]},...n.concurrency!==void 0&&{concurrency:n.concurrency},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}};return J.set(i,t),a}function zt(e,t,n){return{id:e,type:`iterate-chain`,collection:n.collection,body:{id:`${e}__body`,type:`sequence`,nodes:t},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function Bt(e,t,n){let r={id:e,type:`loop`,maxRounds:n.maxRounds,body:{id:`${e}__body`,type:`sequence`,nodes:t},gate:Vt(n),...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}},i=K(r);if(i!==void 0)throw Error(i);return Nt.set(r,n.gate.evaluate),r}function Vt(e){let t=e.gate.escalation;return{handler:e.gate.handler,...e.gate.input!==void 0&&{input:e.gate.input},...e.gate.config!==void 0&&{config:e.gate.config},...t!==void 0&&{escalation:{prompt:t.prompt,autoAction:t.autoAction??`reject`,timeoutMs:t.timeoutMs??null,...t.title!==void 0&&{title:t.title},...t.resumeSchema!==void 0&&{resumeSchema:t.resumeSchema}}}}}function Ht(e){return{type:`bus-event`,subject:f(e.subject),...e.filter!==void 0&&{filter:e.filter},...e.filterExpression!==void 0&&{filterExpression:e.filterExpression}}}function Ut(){return{type:`manual`}}function Wt(e){return{type:`cron`,schedule:e.schedule,...e.timezone!==void 0&&{timezone:e.timezone}}}function Gt(e){return{type:`webhook`,event:e.event,...e.branch!==void 0&&{branch:e.branch},...e.repo!==void 0&&{repo:e.repo}}}function Kt(e){return{type:`extension`,extensionType:e.extensionType,...e.config!==void 0&&{config:e.config}}}function Z(e,t){if(e.has(t))throw Error(`Duplicate step ID: ${t}`);e.add(t)}function Q(e,t){if(Z(e,t.id),t.type===`sequence`)for(let n of t.nodes)Q(e,n);else if(t.type===`parallel`)for(let n of Object.values(t.branches))Q(e,n);else (t.type===`iterate`||t.type===`iterate-chain`||t.type===`loop`)&&Q(e,t.body)}function qt(e,t,n,r,i){let a={};return t.forEach((t,o)=>{if(t.id.length===0)throw Error(`parallel branch at index ${o} has an empty ID`);let s=t.id,c=`${e}__${s}`;Q(n,t),Z(n,c),X(t,r,i),a[s]={id:c,type:`sequence`,nodes:[t]}}),a}function Jt(e,t,n,r,i){let a=`${e}__body`,o=`${e}__item`;Z(r,a),Z(r,o),i.set(o,t);let s={id:o,type:`station`,prompt:o};return{id:e,type:`iterate`,collection:n.collection,body:{id:a,type:`sequence`,nodes:[s]},...n.concurrency!==void 0&&{concurrency:n.concurrency},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function Yt(e,t,n){return t.resume!==void 0&&(n[e]=t.resume),{id:e,type:`gate`,prompt:t.prompt,autoAction:t.autoAction,timeoutMs:t.timeoutMs,...t.title!==void 0&&{title:t.title},...t.resume!==void 0&&{resumeSchema:Y(t.resume)}}}function Xt(e,t,n,r,i,a){let o=`${e}__body`;Z(r,o);for(let e of t)Q(r,e),X(e,i,a);return{id:e,type:`iterate-chain`,collection:n.collection,body:{id:o,type:`sequence`,nodes:t},...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}}}function Zt(e,t,n,r,i,a){let o=`${e}__body`;Z(r,o);for(let e of t)Q(r,e),X(e,i,a);let s={id:e,type:`loop`,maxRounds:n.maxRounds,body:{id:o,type:`sequence`,nodes:t},gate:Vt(n),...n.when!==void 0&&{when:n.when},...n.skip!==void 0&&{skip:n.skip}},c=K(s);if(c!==void 0)throw Error(c);return a.set(n.gate.handler,n.gate.evaluate),s}function Qt(e,t){e.input=n=>(t.zodSchemas.input=n,t.definition.inputSchema=Y(n),e),e.config=n=>(t.zodSchemas.config=n,t.definition.configSchema=Y(n),e),e.output=n=>(t.zodSchemas.output=n,t.definition.outputSchema=Y(n),e),e.artifact=n=>(n.schema!==void 0&&(t.zodSchemas.artifact=n.schema),t.definition.artifact={kind:n.kind,schemaVersion:n.schemaVersion,scope:n.scope,...n.resolve!==void 0&&{resolve:n.resolve},...n.create!==void 0&&{create:n.create},...n.statusPath!==void 0&&{statusPath:n.statusPath}},e),e.state=e=>(t.definition.state={schema:e.schema,...e.initial!==void 0&&{initial:e.initial}},$(t))}function $t(e,t){let{rootNodes:n,runtimeHandlers:r,runtimeLoopGates:i,registeredIds:a,zodGates:o}=t;e.station=(t,i,o)=>(Z(a,t),n.push({id:t,type:`station`,prompt:t,...o?.when!==void 0&&{when:o.when},...o?.skip!==void 0&&{skip:o.skip}}),r.set(t,i),e),e.delegateToAgent=(t,r,i)=>{Z(a,t);let o={id:t,type:`delegate-agent`,agentId:r.agentId,...r.inputExpression!==void 0&&{inputExpression:r.inputExpression},...r.outputSchema!==void 0&&{outputSchema:r.outputSchema},...i?.when!==void 0&&{when:i.when},...i?.skip!==void 0&&{skip:i.skip}};return n.push(o),e},e.delegateToRole=(t,r,i)=>(Z(a,t),n.push({id:t,type:`delegate-role`,role:r,prompt:i?.prompt??t,...i?.when!==void 0&&{when:i.when},...i?.skip!==void 0&&{skip:i.skip},...i?.outputSchema!==void 0&&{outputSchema:i.outputSchema},...i?.timeoutMs!==void 0&&{timeoutMs:i.timeoutMs},...i?.completion!==void 0&&{completion:i.completion}}),e),e.parallel=(t,o,s)=>(Z(a,t),n.push({id:t,type:`parallel`,mode:o.mode??`all-settled`,branches:qt(t,s,a,r,i),...o.when!==void 0&&{when:o.when},...o.skip!==void 0&&{skip:o.skip}}),e),e.gate=(t,r)=>(Z(a,t),n.push(Yt(t,r,o)),e),e.iterate=(t,i,o)=>(Z(a,t),n.push(Jt(t,i,o,a,r)),e),e.iterateChain=(t,o,s)=>(Z(a,t),n.push(Xt(t,o,s,a,r,i)),e),e.loop=(t,o,s)=>(Z(a,t),n.push(Zt(t,o,s,a,r,i)),e),e.addNode=e=>en(e,a,r,i,n)}function en(e,t,n,r,i){Q(t,e),X(e,n,r),i.push(e)}function $(e){let t={id:e.definition.id,definition:e.definition,runtimeHandlers:e.runtimeHandlers,runtimeFactories:e.runtimeFactories,runtimeLoopGates:e.runtimeLoopGates,source:void 0,get zodSchemas(){return e.zodSchemas},addTrigger(t){return e.triggers.push(t),$(e)}};return Qt(t,e),$t(t,e),t}function tn(e,t){let n=[],r=new Map,i=new Map,a=new Set,o={},s={gates:o},c=new Map,l=t?.triggers?[...t.triggers]:[];return $({rootNodes:n,runtimeHandlers:r,runtimeFactories:c,runtimeLoopGates:i,registeredIds:a,zodGates:o,zodSchemas:s,definition:{id:e,...t?.name!==void 0&&{name:t.name},...t?.description!==void 0&&{description:t.description},root:{id:`${e}__root`,type:`sequence`,nodes:n},triggers:l,scope:{type:`global`}},triggers:l})}function nn(e){if(e.workflows.length===0)throw Error(`defineWorkflowBundle: workflows must not be empty`);return{workflows:Object.freeze([...e.workflows])}}const rn=u.enum([`artifact.created`,`artifact.revised`,`artifact.status.changed`]),an=u.record(u.string(),e),on=u.object({type:u.string().min(1),input:u.record(u.string(),e).optional(),executionHints:m.optional()}),sn=u.object({id:u.string().min(1),description:u.string().optional(),on:rn,when:an.optional(),action:on,enabled:u.boolean().default(!0)});export{L as $,Ce as $t,ht as A,x as At,B,M as Bt,Tt as C,Te as Ct,gt as D,le as Dt,Et as E,Ne as Et,pt as F,pe as Ft,ct as G,_e as Gt,tt as H,ge as Ht,ft as I,me as It,st as J,C as Jt,ot as K,we as Kt,dt as L,xe as Lt,yt as M,b as Mt,vt as N,D as Nt,bt as O,Pe as Ot,mt as P,k as Pt,Ye as Q,he as Qt,lt as R,j as Rt,Dt as S,Ee as St,wt as T,A as Tt,at as U,N as Ut,it as V,Se as Vt,nt as W,ve as Wt,Ze as X,S as Xt,z as Y,w as Yt,Xe as Z,fe as Zt,Bt as _,Me as _t,nn as a,v as an,Ke as at,K as b,Oe as bt,Wt as c,ne as cn,Le as ct,Gt as d,p as dn,He as dt,P as en,Je as et,Ft as f,Fe as ft,zt as g,_ as gt,Rt as h,Ue as ht,sn as i,E as in,We as it,_t as j,ue as jt,H as k,ye as kt,Kt as l,m as ln,Ie as lt,Lt as m,Ve as mt,an as n,de as nn,qe as nt,tn as o,h as on,Re as ot,It as p,F as pt,rt as q,be as qt,rn as r,O as rn,Be as rt,Ht as s,re as sn,ze as st,on as t,T as tn,I as tt,Ut as u,te as un,Ge as ut,Pt as v,je as vt,xt as w,ke as wt,Mt as x,De as xt,Y as y,Ae as yt,ut as z,y as zt};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as WorkflowExecutor, i as WorkflowEngineService, n as createWorkflowEnginePackage, o as registerDrizzleWorkflowStorage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-
|
|
1
|
+
import { a as WorkflowExecutor, i as WorkflowEngineService, n as createWorkflowEnginePackage, o as registerDrizzleWorkflowStorage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-MmQvNJ3u.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
4
4
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
@@ -735,6 +735,16 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
735
735
|
}>>;
|
|
736
736
|
}, z.core.$strip>;
|
|
737
737
|
initialState: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
|
|
738
|
+
executionLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
739
|
+
sourceExecutionId: z.ZodString;
|
|
740
|
+
targetExecutionId: z.ZodString;
|
|
741
|
+
linkType: z.ZodEnum<{
|
|
742
|
+
"triggered-by": "triggered-by";
|
|
743
|
+
"feedback-loop": "feedback-loop";
|
|
744
|
+
"rerun-of": "rerun-of";
|
|
745
|
+
}>;
|
|
746
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
747
|
+
}, z.core.$strip>>>;
|
|
738
748
|
}, z.core.$strip>;
|
|
739
749
|
response: z.ZodObject<{
|
|
740
750
|
id: z.ZodString;
|
|
@@ -944,6 +954,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
944
954
|
gate: "gate";
|
|
945
955
|
iterate: "iterate";
|
|
946
956
|
"iterate-chain": "iterate-chain";
|
|
957
|
+
loop: "loop";
|
|
947
958
|
}>;
|
|
948
959
|
path: z.ZodArray<z.ZodString>;
|
|
949
960
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -953,8 +964,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
953
964
|
cancelled: "cancelled";
|
|
954
965
|
running: "running";
|
|
955
966
|
failed: "failed";
|
|
956
|
-
skipped: "skipped";
|
|
957
967
|
waiting: "waiting";
|
|
968
|
+
skipped: "skipped";
|
|
958
969
|
}>;
|
|
959
970
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
960
971
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -989,6 +1000,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
989
1000
|
gate: "gate";
|
|
990
1001
|
iterate: "iterate";
|
|
991
1002
|
"iterate-chain": "iterate-chain";
|
|
1003
|
+
loop: "loop";
|
|
992
1004
|
}>;
|
|
993
1005
|
path: z.ZodArray<z.ZodString>;
|
|
994
1006
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -998,8 +1010,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
998
1010
|
cancelled: "cancelled";
|
|
999
1011
|
running: "running";
|
|
1000
1012
|
failed: "failed";
|
|
1001
|
-
skipped: "skipped";
|
|
1002
1013
|
waiting: "waiting";
|
|
1014
|
+
skipped: "skipped";
|
|
1003
1015
|
}>;
|
|
1004
1016
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
1005
1017
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1031,6 +1043,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1031
1043
|
gate: "gate";
|
|
1032
1044
|
iterate: "iterate";
|
|
1033
1045
|
"iterate-chain": "iterate-chain";
|
|
1046
|
+
loop: "loop";
|
|
1034
1047
|
}>;
|
|
1035
1048
|
path: z.ZodArray<z.ZodString>;
|
|
1036
1049
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -1040,8 +1053,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1040
1053
|
cancelled: "cancelled";
|
|
1041
1054
|
running: "running";
|
|
1042
1055
|
failed: "failed";
|
|
1043
|
-
skipped: "skipped";
|
|
1044
1056
|
waiting: "waiting";
|
|
1057
|
+
skipped: "skipped";
|
|
1045
1058
|
}>;
|
|
1046
1059
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
1047
1060
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -1068,8 +1081,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1068
1081
|
status: z.ZodEnum<{
|
|
1069
1082
|
cancelled: "cancelled";
|
|
1070
1083
|
rejected: "rejected";
|
|
1071
|
-
resumed: "resumed";
|
|
1072
1084
|
waiting: "waiting";
|
|
1085
|
+
resumed: "resumed";
|
|
1073
1086
|
"timed-out": "timed-out";
|
|
1074
1087
|
}>;
|
|
1075
1088
|
autoAction: z.ZodEnum<{
|
|
@@ -1200,8 +1213,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1200
1213
|
status: z.ZodEnum<{
|
|
1201
1214
|
cancelled: "cancelled";
|
|
1202
1215
|
rejected: "rejected";
|
|
1203
|
-
resumed: "resumed";
|
|
1204
1216
|
waiting: "waiting";
|
|
1217
|
+
resumed: "resumed";
|
|
1205
1218
|
"timed-out": "timed-out";
|
|
1206
1219
|
}>;
|
|
1207
1220
|
autoAction: z.ZodEnum<{
|
|
@@ -1225,8 +1238,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1225
1238
|
status: z.ZodOptional<z.ZodEnum<{
|
|
1226
1239
|
cancelled: "cancelled";
|
|
1227
1240
|
rejected: "rejected";
|
|
1228
|
-
resumed: "resumed";
|
|
1229
1241
|
waiting: "waiting";
|
|
1242
|
+
resumed: "resumed";
|
|
1230
1243
|
"timed-out": "timed-out";
|
|
1231
1244
|
}>>;
|
|
1232
1245
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -1241,8 +1254,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1241
1254
|
status: z.ZodEnum<{
|
|
1242
1255
|
cancelled: "cancelled";
|
|
1243
1256
|
rejected: "rejected";
|
|
1244
|
-
resumed: "resumed";
|
|
1245
1257
|
waiting: "waiting";
|
|
1258
|
+
resumed: "resumed";
|
|
1246
1259
|
"timed-out": "timed-out";
|
|
1247
1260
|
}>;
|
|
1248
1261
|
autoAction: z.ZodEnum<{
|
|
@@ -1276,8 +1289,8 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1276
1289
|
status: z.ZodEnum<{
|
|
1277
1290
|
cancelled: "cancelled";
|
|
1278
1291
|
rejected: "rejected";
|
|
1279
|
-
resumed: "resumed";
|
|
1280
1292
|
waiting: "waiting";
|
|
1293
|
+
resumed: "resumed";
|
|
1281
1294
|
"timed-out": "timed-out";
|
|
1282
1295
|
}>;
|
|
1283
1296
|
autoAction: z.ZodEnum<{
|
|
@@ -1366,6 +1379,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1366
1379
|
linkType: z.ZodEnum<{
|
|
1367
1380
|
"triggered-by": "triggered-by";
|
|
1368
1381
|
"feedback-loop": "feedback-loop";
|
|
1382
|
+
"rerun-of": "rerun-of";
|
|
1369
1383
|
}>;
|
|
1370
1384
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1371
1385
|
}, z.core.$strip>;
|
|
@@ -1386,6 +1400,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
1386
1400
|
linkType: z.ZodEnum<{
|
|
1387
1401
|
"triggered-by": "triggered-by";
|
|
1388
1402
|
"feedback-loop": "feedback-loop";
|
|
1403
|
+
"rerun-of": "rerun-of";
|
|
1389
1404
|
}>;
|
|
1390
1405
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1391
1406
|
}, z.core.$strip>>;
|
|
@@ -2698,7 +2713,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
2698
2713
|
tableName: "workflow_execution_frames";
|
|
2699
2714
|
dataType: "string";
|
|
2700
2715
|
columnType: "SQLiteText";
|
|
2701
|
-
data: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain";
|
|
2716
|
+
data: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop";
|
|
2702
2717
|
driverParam: string;
|
|
2703
2718
|
notNull: true;
|
|
2704
2719
|
hasDefault: false;
|
|
@@ -2711,7 +2726,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
2711
2726
|
generated: undefined;
|
|
2712
2727
|
}, {}, {
|
|
2713
2728
|
length: number | undefined;
|
|
2714
|
-
$type: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain";
|
|
2729
|
+
$type: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop";
|
|
2715
2730
|
}>;
|
|
2716
2731
|
path: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2717
2732
|
name: string;
|
|
@@ -2756,7 +2771,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
2756
2771
|
tableName: "workflow_execution_frames";
|
|
2757
2772
|
dataType: "string";
|
|
2758
2773
|
columnType: "SQLiteText";
|
|
2759
|
-
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "
|
|
2774
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "waiting" | "skipped";
|
|
2760
2775
|
driverParam: string;
|
|
2761
2776
|
notNull: true;
|
|
2762
2777
|
hasDefault: true;
|
|
@@ -2769,7 +2784,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
2769
2784
|
generated: undefined;
|
|
2770
2785
|
}, {}, {
|
|
2771
2786
|
length: number | undefined;
|
|
2772
|
-
$type: "pending" | "completed" | "cancelled" | "running" | "failed" | "
|
|
2787
|
+
$type: "pending" | "completed" | "cancelled" | "running" | "failed" | "waiting" | "skipped";
|
|
2773
2788
|
}>;
|
|
2774
2789
|
attempt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2775
2790
|
name: string;
|
|
@@ -3039,7 +3054,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3039
3054
|
tableName: "workflow_gate_instances";
|
|
3040
3055
|
dataType: "string";
|
|
3041
3056
|
columnType: "SQLiteText";
|
|
3042
|
-
data: "cancelled" | "rejected" | "
|
|
3057
|
+
data: "cancelled" | "rejected" | "waiting" | "resumed" | "timed-out";
|
|
3043
3058
|
driverParam: string;
|
|
3044
3059
|
notNull: true;
|
|
3045
3060
|
hasDefault: true;
|
|
@@ -3052,7 +3067,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3052
3067
|
generated: undefined;
|
|
3053
3068
|
}, {}, {
|
|
3054
3069
|
length: number | undefined;
|
|
3055
|
-
$type: "cancelled" | "rejected" | "
|
|
3070
|
+
$type: "cancelled" | "rejected" | "waiting" | "resumed" | "timed-out";
|
|
3056
3071
|
}>;
|
|
3057
3072
|
autoAction: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3058
3073
|
name: "auto_action";
|
|
@@ -3489,7 +3504,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3489
3504
|
tableName: "workflow_execution_links";
|
|
3490
3505
|
dataType: "string";
|
|
3491
3506
|
columnType: "SQLiteText";
|
|
3492
|
-
data: "triggered-by" | "feedback-loop";
|
|
3507
|
+
data: "triggered-by" | "feedback-loop" | "rerun-of";
|
|
3493
3508
|
driverParam: string;
|
|
3494
3509
|
notNull: true;
|
|
3495
3510
|
hasDefault: false;
|
|
@@ -3502,7 +3517,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
3502
3517
|
generated: undefined;
|
|
3503
3518
|
}, {}, {
|
|
3504
3519
|
length: number | undefined;
|
|
3505
|
-
$type: "triggered-by" | "feedback-loop";
|
|
3520
|
+
$type: "triggered-by" | "feedback-loop" | "rerun-of";
|
|
3506
3521
|
}>;
|
|
3507
3522
|
metadata: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3508
3523
|
name: string;
|
|
@@ -4537,7 +4552,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
4537
4552
|
tableName: "worklog_frame_entries";
|
|
4538
4553
|
dataType: "string";
|
|
4539
4554
|
columnType: "SQLiteText";
|
|
4540
|
-
data: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain";
|
|
4555
|
+
data: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop";
|
|
4541
4556
|
driverParam: string;
|
|
4542
4557
|
notNull: true;
|
|
4543
4558
|
hasDefault: false;
|
|
@@ -4550,7 +4565,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
4550
4565
|
generated: undefined;
|
|
4551
4566
|
}, {}, {
|
|
4552
4567
|
length: number | undefined;
|
|
4553
|
-
$type: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain";
|
|
4568
|
+
$type: "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop";
|
|
4554
4569
|
}>;
|
|
4555
4570
|
path: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4556
4571
|
name: string;
|
|
@@ -4576,7 +4591,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
4576
4591
|
tableName: "worklog_frame_entries";
|
|
4577
4592
|
dataType: "string";
|
|
4578
4593
|
columnType: "SQLiteText";
|
|
4579
|
-
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "
|
|
4594
|
+
data: "pending" | "completed" | "cancelled" | "running" | "failed" | "waiting" | "skipped";
|
|
4580
4595
|
driverParam: string;
|
|
4581
4596
|
notNull: true;
|
|
4582
4597
|
hasDefault: false;
|
|
@@ -5010,7 +5025,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
5010
5025
|
tableName: "worklog_gate_events";
|
|
5011
5026
|
dataType: "string";
|
|
5012
5027
|
columnType: "SQLiteText";
|
|
5013
|
-
data: "cancelled" | "rejected" | "
|
|
5028
|
+
data: "cancelled" | "rejected" | "waiting" | "resumed" | "timed-out";
|
|
5014
5029
|
driverParam: string;
|
|
5015
5030
|
notNull: true;
|
|
5016
5031
|
hasDefault: false;
|
|
@@ -5023,7 +5038,7 @@ declare const WorkflowStorageNamespace: _$_makaio_storage_core0.StorageNamespace
|
|
|
5023
5038
|
generated: undefined;
|
|
5024
5039
|
}, {}, {
|
|
5025
5040
|
length: number | undefined;
|
|
5026
|
-
$type: "cancelled" | "rejected" | "
|
|
5041
|
+
$type: "cancelled" | "rejected" | "waiting" | "resumed" | "timed-out";
|
|
5027
5042
|
}>;
|
|
5028
5043
|
prompt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
5029
5044
|
name: "prompt";
|
|
@@ -5982,6 +5997,16 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
5982
5997
|
}>>;
|
|
5983
5998
|
}, z.core.$strip>;
|
|
5984
5999
|
initialState: z.ZodOptional<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>;
|
|
6000
|
+
executionLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
6001
|
+
sourceExecutionId: z.ZodString;
|
|
6002
|
+
targetExecutionId: z.ZodString;
|
|
6003
|
+
linkType: z.ZodEnum<{
|
|
6004
|
+
"triggered-by": "triggered-by";
|
|
6005
|
+
"feedback-loop": "feedback-loop";
|
|
6006
|
+
"rerun-of": "rerun-of";
|
|
6007
|
+
}>;
|
|
6008
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6009
|
+
}, z.core.$strip>>>;
|
|
5985
6010
|
}, z.core.$strip>;
|
|
5986
6011
|
response: z.ZodObject<{
|
|
5987
6012
|
id: z.ZodString;
|
|
@@ -6191,6 +6216,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6191
6216
|
gate: "gate";
|
|
6192
6217
|
iterate: "iterate";
|
|
6193
6218
|
"iterate-chain": "iterate-chain";
|
|
6219
|
+
loop: "loop";
|
|
6194
6220
|
}>;
|
|
6195
6221
|
path: z.ZodArray<z.ZodString>;
|
|
6196
6222
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -6200,8 +6226,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6200
6226
|
cancelled: "cancelled";
|
|
6201
6227
|
running: "running";
|
|
6202
6228
|
failed: "failed";
|
|
6203
|
-
skipped: "skipped";
|
|
6204
6229
|
waiting: "waiting";
|
|
6230
|
+
skipped: "skipped";
|
|
6205
6231
|
}>;
|
|
6206
6232
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
6207
6233
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6236,6 +6262,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6236
6262
|
gate: "gate";
|
|
6237
6263
|
iterate: "iterate";
|
|
6238
6264
|
"iterate-chain": "iterate-chain";
|
|
6265
|
+
loop: "loop";
|
|
6239
6266
|
}>;
|
|
6240
6267
|
path: z.ZodArray<z.ZodString>;
|
|
6241
6268
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -6245,8 +6272,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6245
6272
|
cancelled: "cancelled";
|
|
6246
6273
|
running: "running";
|
|
6247
6274
|
failed: "failed";
|
|
6248
|
-
skipped: "skipped";
|
|
6249
6275
|
waiting: "waiting";
|
|
6276
|
+
skipped: "skipped";
|
|
6250
6277
|
}>;
|
|
6251
6278
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
6252
6279
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6278,6 +6305,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6278
6305
|
gate: "gate";
|
|
6279
6306
|
iterate: "iterate";
|
|
6280
6307
|
"iterate-chain": "iterate-chain";
|
|
6308
|
+
loop: "loop";
|
|
6281
6309
|
}>;
|
|
6282
6310
|
path: z.ZodArray<z.ZodString>;
|
|
6283
6311
|
parentFrameId: z.ZodOptional<z.ZodString>;
|
|
@@ -6287,8 +6315,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6287
6315
|
cancelled: "cancelled";
|
|
6288
6316
|
running: "running";
|
|
6289
6317
|
failed: "failed";
|
|
6290
|
-
skipped: "skipped";
|
|
6291
6318
|
waiting: "waiting";
|
|
6319
|
+
skipped: "skipped";
|
|
6292
6320
|
}>;
|
|
6293
6321
|
attempt: z.ZodDefault<z.ZodNumber>;
|
|
6294
6322
|
iteration: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6315,8 +6343,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6315
6343
|
status: z.ZodEnum<{
|
|
6316
6344
|
cancelled: "cancelled";
|
|
6317
6345
|
rejected: "rejected";
|
|
6318
|
-
resumed: "resumed";
|
|
6319
6346
|
waiting: "waiting";
|
|
6347
|
+
resumed: "resumed";
|
|
6320
6348
|
"timed-out": "timed-out";
|
|
6321
6349
|
}>;
|
|
6322
6350
|
autoAction: z.ZodEnum<{
|
|
@@ -6447,8 +6475,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6447
6475
|
status: z.ZodEnum<{
|
|
6448
6476
|
cancelled: "cancelled";
|
|
6449
6477
|
rejected: "rejected";
|
|
6450
|
-
resumed: "resumed";
|
|
6451
6478
|
waiting: "waiting";
|
|
6479
|
+
resumed: "resumed";
|
|
6452
6480
|
"timed-out": "timed-out";
|
|
6453
6481
|
}>;
|
|
6454
6482
|
autoAction: z.ZodEnum<{
|
|
@@ -6472,8 +6500,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6472
6500
|
status: z.ZodOptional<z.ZodEnum<{
|
|
6473
6501
|
cancelled: "cancelled";
|
|
6474
6502
|
rejected: "rejected";
|
|
6475
|
-
resumed: "resumed";
|
|
6476
6503
|
waiting: "waiting";
|
|
6504
|
+
resumed: "resumed";
|
|
6477
6505
|
"timed-out": "timed-out";
|
|
6478
6506
|
}>>;
|
|
6479
6507
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
@@ -6488,8 +6516,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6488
6516
|
status: z.ZodEnum<{
|
|
6489
6517
|
cancelled: "cancelled";
|
|
6490
6518
|
rejected: "rejected";
|
|
6491
|
-
resumed: "resumed";
|
|
6492
6519
|
waiting: "waiting";
|
|
6520
|
+
resumed: "resumed";
|
|
6493
6521
|
"timed-out": "timed-out";
|
|
6494
6522
|
}>;
|
|
6495
6523
|
autoAction: z.ZodEnum<{
|
|
@@ -6523,8 +6551,8 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6523
6551
|
status: z.ZodEnum<{
|
|
6524
6552
|
cancelled: "cancelled";
|
|
6525
6553
|
rejected: "rejected";
|
|
6526
|
-
resumed: "resumed";
|
|
6527
6554
|
waiting: "waiting";
|
|
6555
|
+
resumed: "resumed";
|
|
6528
6556
|
"timed-out": "timed-out";
|
|
6529
6557
|
}>;
|
|
6530
6558
|
autoAction: z.ZodEnum<{
|
|
@@ -6613,6 +6641,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6613
6641
|
linkType: z.ZodEnum<{
|
|
6614
6642
|
"triggered-by": "triggered-by";
|
|
6615
6643
|
"feedback-loop": "feedback-loop";
|
|
6644
|
+
"rerun-of": "rerun-of";
|
|
6616
6645
|
}>;
|
|
6617
6646
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6618
6647
|
}, z.core.$strip>;
|
|
@@ -6633,6 +6662,7 @@ declare const WorkflowStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_cor
|
|
|
6633
6662
|
linkType: z.ZodEnum<{
|
|
6634
6663
|
"triggered-by": "triggered-by";
|
|
6635
6664
|
"feedback-loop": "feedback-loop";
|
|
6665
|
+
"rerun-of": "rerun-of";
|
|
6636
6666
|
}>;
|
|
6637
6667
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6638
6668
|
}, z.core.$strip>>;
|
|
@@ -7412,7 +7442,7 @@ declare const worklogFrameEntriesDual: _$_makaio_storage_drizzle0.DualTable<"wor
|
|
|
7412
7442
|
/** Unique frame identifier within the execution. */frameId: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.IsPrimaryKey<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"frame_id", [string, ...string[]], number | undefined>>>, _$drizzle_orm0.IsPrimaryKey<_$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"frame_id", [string, ...string[]]>>>>; /** Execution this frame belongs to. */
|
|
7413
7443
|
executionId: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"execution_id", [string, ...string[]], number | undefined>>, _$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"execution_id", [string, ...string[]]>>>; /** Node identifier from the workflow definition. */
|
|
7414
7444
|
nodeId: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"node_id", [string, ...string[]], number | undefined>>, _$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"node_id", [string, ...string[]]>>>; /** Node type discriminant. */
|
|
7415
|
-
nodeType: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.$Type<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"node_type", [string, ...string[]], number | undefined>>, "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain">, _$drizzle_orm0.$Type<_$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"node_type", [string, ...string[]]>>, "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain">>;
|
|
7445
|
+
nodeType: _$_makaio_storage_drizzle0.DualBuilder<_$drizzle_orm0.$Type<_$drizzle_orm0.NotNull<_$drizzle_orm_sqlite_core0.SQLiteTextBuilderInitial<"node_type", [string, ...string[]], number | undefined>>, "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop">, _$drizzle_orm0.$Type<_$drizzle_orm0.NotNull<_$drizzle_orm_pg_core0.PgTextBuilderInitial<"node_type", [string, ...string[]]>>, "station" | "delegate-agent" | "delegate-role" | "sequence" | "parallel" | "gate" | "iterate" | "iterate-chain" | "loop">>;
|
|
7416
7446
|
/**
|
|
7417
7447
|
* Ordered path of frame IDs from the root frame to this frame (inclusive).
|
|
7418
7448
|
* Stored as a JSON array for tree correlation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,
|
|
1
|
+
import{A as e,B as t,J as n,M as r,P as i,S as a,W as o,f as s,w as c,x as l}from"../loop-gate-handlers-CwU5zAGs.mjs";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"../package-rdrXr17q.mjs";import{JsonValueSchema as y,WorkflowFrameStateSchema as b}from"@makaio/framework/contracts";const x=new Set([...b.shape.status.options]);function S(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function C(e){if(!S(e))return!1;for(let t of Object.values(e))if(!S(t)||typeof t.status!=`string`||!x.has(t.status)||`result`in t&&t.result!==void 0&&!y.safeParse(t.result).success)return!1;return!0}function w(e){let t={trigger:S(e.trigger)?e.trigger:{},steps:C(e.steps)?e.steps:{},inputs:y.safeParse(e.inputs).success?e.inputs:{}};return`item`in e&&(t.item=e.item),typeof e.index==`number`&&(t.index=e.index),t}export{f as WorkflowEngineService,v as WorkflowEngineToken,u as WorkflowExecutor,l as WorkflowStorageNamespace,a as WorkflowStorageSubjects,w as buildWorkflowExpressionContextFromResolvedInputs,m as createWorkflowEnginePackage,_ as getWorkflowState,d as initializeWorkflowState,p as patchWorkflowState,h as registerDrizzleWorkflowStorage,s as runShellStep,c as workflowDefinitionsDual,g as workflowEnginePackage,e as workflowExecutionStateDual,r as workflowExecutionStateEventsDual,i as workflowExecutionsDual,t as workflowStepSpansDual,o as worklogFrameEntriesDual,n as worklogSummariesDual};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createWorkflowEnginePackage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-
|
|
1
|
+
import { n as createWorkflowEnginePackage, r as workflowEnginePackage, t as WorkflowEngineToken } from "../package-MmQvNJ3u.mjs";
|
|
2
2
|
export { WorkflowEngineToken, createWorkflowEnginePackage, workflowEnginePackage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../package-
|
|
1
|
+
import{n as e,r as t,t as n}from"../package-rdrXr17q.mjs";export{n as WorkflowEngineToken,e as createWorkflowEnginePackage,t as workflowEnginePackage};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
-
import { StationHandler, WorkflowDefinition, WorkflowRunResult, WorkflowWorkerConfig, WorkflowZodSchemas } from "@makaio/framework/contracts";
|
|
2
|
+
import { LoopGateHandler, StationHandler, WorkflowDefinition, WorkflowRunResult, WorkflowWorkerConfig, WorkflowZodSchemas } from "@makaio/framework/contracts";
|
|
3
3
|
|
|
4
4
|
//#region subsystems/workflow-engine/src/workflow-orchestrator.d.ts
|
|
5
5
|
/**
|
|
@@ -18,6 +18,8 @@ interface LoadedWorkflow {
|
|
|
18
18
|
* Used by the orchestrator to dispatch `station`-type nodes.
|
|
19
19
|
*/
|
|
20
20
|
readonly runtimeHandlers: ReadonlyMap<string, StationHandler>;
|
|
21
|
+
/** Loop gate handler functions keyed by handler name. */
|
|
22
|
+
readonly runtimeLoopGates?: ReadonlyMap<string, LoopGateHandler>;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Input parameters for {@link runWorkflowOrchestrator}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{S as e,Y as t,a as n,h as r,i,n as a,o,s,t as c,y as l}from"../loop-gate-handlers-CwU5zAGs.mjs";import{WORKFLOW_CANCELLED_REASON as u}from"@makaio/framework/contracts";async function d(n,r,i,a){let o=await g(n,r,i);return await n.request(e.setExecution,{execution:o}),i===`completed`?await n.emit(t.execution.completed,{executionId:r.executionId,workflowId:r.workflowId,totalDuration:0,completedAt:o.completedAt}):await n.emit(t.execution.cancelled,{executionId:r.executionId,workflowId:r.workflowId,reason:a,completedAt:o.completedAt}),i===`cancelled`?{executionId:r.executionId,workflowId:r.workflowId,status:`cancelled`,...a===void 0?{}:{reason:a}}:{executionId:r.executionId,workflowId:r.workflowId,status:`completed`}}function f(e,t){return t.status===`completed`?{executionId:e.executionId,workflowId:e.workflowId,status:`completed`,...t.artifact===void 0?{}:{artifact:t.artifact}}:t.status===`cancelled`?{executionId:e.executionId,workflowId:e.workflowId,status:`cancelled`,...t.reason===void 0?{}:{reason:t.reason}}:t.status===`paused`?{executionId:e.executionId,workflowId:e.workflowId,status:`paused`,pausedAtGateId:t.pausedAtGateId,pausedAtFrameId:t.pausedAtFrameId}:{executionId:e.executionId,workflowId:e.workflowId,status:`failed`,error:t.error}}function p(e){let t,n=()=>{t=r({bus:e.bus,activeExecutions:e.activeExecutions,shellAbortControllers:e.shellAbortControllers,activeRunnerSteps:e.activeRunnerSteps,cancelTimeoutMs:l.cancelTimeoutMs},e.executionId,u).catch(t=>(console.error(`[WorkflowOrchestrator] Failed to persist cancellation for ${e.executionId}:`,t),!1))};return e.signal.addEventListener(`abort`,n,{once:!0}),e.signal.aborted&&n(),async()=>(e.signal.removeEventListener(`abort`,n),t??!1)}async function m(t,n){let r=await t.requestOptional(e.getExecution,{executionId:n});return r.handled?r.data.execution?.startedAt??void 0:void 0}async function h(e,t){return{id:t.executionId,workflowId:t.workflowId,coordinatorSessionId:t.coordinatorSessionId,status:`running`,inputs:t.inputs,config:t.config??{},startedAt:await m(e,t.executionId)??Date.now(),triggerPayload:t.triggerPayload,...t.artifactRef===void 0?{}:{artifactRef:t.artifactRef},scope:t.scope}}async function g(e,t,n){let r=Date.now();return{id:t.executionId,workflowId:t.workflowId,coordinatorSessionId:t.coordinatorSessionId,status:n,inputs:t.inputs,config:t.config??{},startedAt:await m(e,t.executionId)??r,completedAt:r,triggerPayload:t.triggerPayload,...t.artifactRef===void 0?{}:{artifactRef:t.artifactRef},scope:t.scope}}async function _(e,t,r,i,s,c,l,d,f){let p=e.suspensionStrategy===`wait-in-process`?void 0:await v(e.executionId,l,{required:!0}),m=await n({definition:t,execution:r,runContext:i,zodSchema:f?.artifact,bus:l}),h=new o(e.executionId,e.workflowId,t,r,s,l,d,void 0,m,{context:e.context,env:e.env},{suspensionStrategy:e.suspensionStrategy,resumeFrames:p,runtimeLoopGates:c}),g=h.buildExpressionContext(),_=await a(t.root,h,g);return _.status===`failed`?{status:`failed`,error:_.error}:_.status===`paused`?{status:`paused`,pausedAtGateId:_.pausedAtGateId,pausedAtFrameId:_.pausedAtFrameId}:_.status===`cancelled`||d.aborted?{status:`cancelled`,reason:u}:{status:`completed`,artifact:m?.current}}async function v(t,n,r={}){try{let a=await n.requestOptional(e.listFrames,{executionId:t});if(!a.handled){if(r.required===!0)throw Error(`Frame storage handler is required to resume execution '${t}'.`);return}return a.data.frames.length===0?void 0:i(a.data.frames)}catch(e){if(r.required===!0)throw e;return}}function y(e,t){return{executionId:e.executionId,workflowId:e.workflowId,source:e.source,definitionSnapshot:e.source.kind===`definition`?e.definition??t:t,workerManifest:{packages:[]},inputs:e.inputs,config:e.config??{},scope:e.scope,triggerPayload:e.triggerPayload,...e.artifactRef===void 0?{}:{artifactRef:e.artifactRef},...e.executionHints===void 0?{}:{executionHints:e.executionHints},coordinatorSessionId:e.coordinatorSessionId,cancelSubject:e.cancelSubject,context:e.context,env:e.env,createdAt:Date.now(),suspensionStrategy:e.suspensionStrategy}}async function b(n,r,i,a,o){i.status=`paused`,await n.request(e.setExecution,{execution:i}),await n.emit(t.execution.paused,{executionId:r.executionId,workflowId:r.workflowId,pausedAtGateId:a,pausedAtFrameId:o})}async function x(e,n,r,i,a,o){r===`completed`?await e.emit(t.execution.completed,{executionId:n.executionId,workflowId:n.workflowId,totalDuration:a-i.startedAt,completedAt:a}):r===`cancelled`?await e.emit(t.execution.cancelled,{executionId:n.executionId,workflowId:n.workflowId,reason:u,completedAt:a}):await e.emit(t.execution.failed,{executionId:n.executionId,workflowId:n.workflowId,error:o??`Workflow execution failed`,completedAt:a})}async function S(t){let{config:n,loaded:r,bus:i,signal:a}=t,{definition:o}=r;if(a.aborted)return d(i,n,`cancelled`,u);let l=await h(i,n),m=y(n,o);await s(i,l,m,o);let g=new Map(r.runtimeHandlers),v=r.runtimeLoopGates??new Map,S=new Map,C=new Map,w=new Map;S.set(n.executionId,{execution:l,workflow:o,runContext:m,runtimeHandlers:g,runtimeLoopGates:new Map(v)});let T=p({signal:a,executionId:n.executionId,bus:i,activeExecutions:S,shellAbortControllers:C,activeRunnerSteps:w}),E={status:`completed`},D=!1;try{o.root.nodes.length>0&&(c(o,v),E=await _(n,o,l,m,g,v,i,a,r.zodSchemas))}catch(e){E={status:`failed`,error:e instanceof Error?e.message:String(e)}}finally{D=await T(),S.clear()}if(D)return f(n,{status:`cancelled`,reason:u});if((a.aborted||l.status===`cancelled`)&&(E={status:`cancelled`,reason:u}),E.status===`paused`)return await b(i,n,l,E.pausedAtGateId,E.pausedAtFrameId),f(n,E);let O=Date.now(),k=E.status===`failed`?E.error:void 0;return l.status=E.status,l.completedAt=O,l.error=k,await i.request(e.setExecution,{execution:l}),await x(i,n,E.status,l,O,k),f(n,E)}export{S as runWorkflowOrchestrator};
|