@makaio/framework 1.0.0-dev-1788721567504 → 1.0.0-dev-1788832451167
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +2 -2
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/node.d.mts +1 -1
- package/dist/{artifact-Btbuib48.mjs → artifact-ClvHqL3w.mjs} +1 -1
- package/dist/attempt-fixtures-CnrnF5_4.mjs +1 -0
- package/dist/attempt-record-codec-B32Whx75.mjs +1 -0
- package/dist/authority-state-bootstrap-7Cgb9TR2.mjs +1 -0
- package/dist/bootstrap-start-client-DrvofWwi.mjs +1 -0
- package/dist/bus/index.d.mts +46 -28
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-CobBUqjo.mjs +2 -0
- package/dist/bus-Uy9C3TBM.mjs +1 -0
- package/dist/clients/index.d.mts +1 -1
- package/dist/clients/managed-install.d.mts +1 -1
- package/dist/code-execution/worker-entry.d.mts +1 -1
- package/dist/{context-resolution-CoKFKIqz.d.mts → context-resolution-BrtoXnez.d.mts} +97 -18
- package/dist/contracts/adapter/index.d.mts +2 -2
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +3 -3
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/auth/index.d.mts +2 -2
- package/dist/contracts/automation-trigger/index.d.mts +3 -3
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/capabilities/index.d.mts +2 -2
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/code-execution/index.d.mts +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +1 -1
- package/dist/contracts/extension/index.d.mts +5 -5
- package/dist/contracts/facet/index.d.mts +1 -1
- package/dist/contracts/harness/index.d.mts +1 -1
- package/dist/contracts/host/index.d.mts +1 -1
- package/dist/contracts/index.d.mts +901 -183
- 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/native-session-supervisor/index.d.mts +1 -1
- package/dist/contracts/platform/index.d.mts +1 -1
- package/dist/contracts/provider/index.d.mts +2 -2
- package/dist/contracts/reaction/index.d.mts +1 -1
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/shared/index.d.mts +2 -2
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/worker/index.d.mts +2 -2
- package/dist/contracts/worker/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +2 -2
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{contribution-CUHLVLsT.d.mts → contribution-Crm-mctl.d.mts} +2 -2
- package/dist/{definition-DyGImhyi.d.mts → definition-u_5rYQtc.d.mts} +1 -1
- package/dist/{detached-extension-handle-D0aI0pJA.mjs → detached-extension-handle-DAXKQT9c.mjs} +1 -1
- package/dist/{execution-attempt-repository-CRdrgou3.d.mts → execution-attempt-repository-CgB7uiYD.d.mts} +242 -9
- package/dist/execution-attempt-repository-D0cCU7dI.mjs +1 -0
- package/dist/{execution-target-H0RWV7Py.mjs → execution-target-BcoF_oDB.mjs} +1 -1
- package/dist/{hook-responses-9Ywsqzzq.d.mts → hook-responses-DcapjzLb.d.mts} +1 -1
- package/dist/{index-D1wTWSLR.d.mts → index-BADuMxcP.d.mts} +458 -458
- package/dist/{index-8NdPPzUh2.d.mts → index-BDAfOYSw2.d.mts} +12 -12
- package/dist/{index-DHnSLGP4.d.mts → index-BDzqNCXs.d.mts} +1 -1
- package/dist/{index-CxwqnZpT.d.mts → index-BakMNLkB.d.mts} +175 -80
- package/dist/{index-B0VO0rAl.d.mts → index-Bo3LRb2u.d.mts} +1 -1
- package/dist/{index-CVcG4Q3X.d.mts → index-Bsr4rZl0.d.mts} +13 -13
- package/dist/{index-B_8bA2JW.d.mts → index-BvgLFm-U.d.mts} +1 -1
- package/dist/{index-Dg11JxKZ.d.mts → index-BwccWakG.d.mts} +1 -1
- package/dist/{index-BJdkVFX9.d.mts → index-BxOFB25y.d.mts} +335 -78
- package/dist/{index-37_b--BH.d.mts → index-C1PfDEIV.d.mts} +52 -47
- package/dist/{index-CPRQ4dWX.d.mts → index-CBixkF0n.d.mts} +12 -0
- package/dist/{index-CyWGSxrs.d.mts → index-CGJgZGqN.d.mts} +292 -292
- package/dist/{index--Ws52sWV2.d.mts → index-COOM1j_L2.d.mts} +4 -4
- package/dist/{index-BmevAPME2.d.mts → index-Cbv_3Xi12.d.mts} +1 -1
- package/dist/{index-DWBkiiXH.d.mts → index-CfJKwWJa.d.mts} +1 -1
- package/dist/{index-DV38-klA2.d.mts → index-CiKzWCW02.d.mts} +273 -26
- package/dist/{index-AdcDBUnc.d.mts → index-D6RMsZko.d.mts} +95 -95
- package/dist/{index-CIEycZrt.d.mts → index-DIhkK4Y0.d.mts} +1 -1
- package/dist/{index-BKIxdzIw.d.mts → index-DZXpKlyB.d.mts} +21 -21
- package/dist/{index-DBD_oFEt2.d.mts → index-DZnb56vt2.d.mts} +1 -1
- package/dist/{index-Cny5RvjO.d.mts → index-J-kv32zv.d.mts} +2 -2
- package/dist/{index-BNzUyVwV.d.mts → index-LOh6AEqx.d.mts} +10 -10
- package/dist/{index-CYjgoYeX.d.mts → index-LryUXslm.d.mts} +3 -3
- package/dist/{index-CFI6FxC7.d.mts → index-QJW9g1mG.d.mts} +2 -2
- package/dist/{index-B0yMCJW8.d.mts → index-rygpcDBV.d.mts} +1 -1
- package/dist/{index-I5a37JCm.d.mts → index-vXmPEZ5O.d.mts} +382 -82
- package/dist/kernel/cli/index.d.mts +2 -2
- package/dist/kernel/cli/register.d.mts +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/index.d.mts +5 -5
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/{lib-Cm-uEoC1.mjs → lib-271rPR7A.mjs} +1 -1
- package/dist/{lib-BpGvHZye.mjs → lib-RFpLjUda.mjs} +1 -1
- package/dist/{load-extensions-BQoXaHhR.d.mts → load-extensions-CY8ELnCp.d.mts} +1 -1
- package/dist/{load-extensions-DG5LvPyM.mjs → load-extensions-D9inWcDy.mjs} +1 -1
- package/dist/{materialization-lVd9_-jr.mjs → materialization-B_LA9pfy.mjs} +1 -1
- package/dist/{namespace-DOezqDti.d.mts → namespace-BymM0nl_.d.mts} +27 -27
- package/dist/{namespace-Bo94cenp.d.mts → namespace-Cs-cOyrn.d.mts} +136 -136
- package/dist/{namespace-BdAK0lD8.d.mts → namespace-DdqVQSyc.d.mts} +2 -2
- package/dist/{namespace-BRuHzhPo.d.mts → namespace-DlrX8feY.d.mts} +45 -45
- package/dist/{namespace-CsnrP8AD.d.mts → namespace-Dw5H_KCF.d.mts} +1 -1
- package/dist/{namespace-CstawJgN.d.mts → namespace-DykqxEyX.d.mts} +2 -2
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/transports/index.d.mts +56 -16
- package/dist/node/transports/index.mjs +2 -2
- package/dist/package-CzKoZ1k0.mjs +7 -0
- package/dist/{package-DkZmsdCd.d.mts → package-DkpF17X_.d.mts} +458 -17
- package/dist/package.json +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/code-execution/index.d.mts +2 -2
- 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 +6 -6
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.d.mts +22 -2
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-B3Pf7JP7.d.mts → schema-C9PauHXt.d.mts} +2 -2
- package/dist/{schemas-CJKHYluy.d.mts → schemas-B2UbGJpJ.d.mts} +15 -15
- package/dist/{schemas-B50oWBuj.d.mts → schemas-BDZFd3Wb.d.mts} +2 -2
- package/dist/schemas-CNkUEbIr.mjs +1 -0
- package/dist/schemas-CeHU889f.mjs +1 -0
- package/dist/{schemas-DTJtS14K.d.mts → schemas-ClGDFa44.d.mts} +136 -136
- package/dist/scoped-bus-DwVrmi_1.mjs +1 -0
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- 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 +3 -3
- package/dist/services/adapter-subsystem/namespace.d.mts +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 +2 -2
- package/dist/services/code-execution/index.d.mts +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 +4 -4
- 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/namespace.mjs +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/execution-target/schemas.mjs +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/index.d.mts +124 -122
- 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/materialization/index.d.mts +1 -1
- package/dist/services/model-registry/index.d.mts +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/session/handlers/index.d.mts +1 -1
- package/dist/services/session/index.d.mts +9 -9
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/session-events/namespace.d.mts +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/testing/orchestrator-shared.d.mts +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/namespace.d.mts +12 -12
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/subagent/index.d.mts +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/tools/index.d.mts +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- 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/services/workflow-transitions/index.d.mts +1 -1
- package/dist/{src-BmSQ3rlz.mjs → src-DEgV239R.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +1 -1
- package/dist/storage/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/{transition-DxsrTsn4.d.mts → transition-DFA_ckdP.d.mts} +2 -2
- package/dist/{types-Czdm5op1.d.mts → types-DkfDRSTr.d.mts} +356 -356
- package/dist/{types-CtDGkyLx2.d.mts → types-p55qvq922.d.mts} +1 -1
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/{view-builder-D-Wz_l_B.d.mts → view-builder-CYW_9n4A.d.mts} +1 -1
- package/dist/worker-B4nD_Erm.mjs +1 -0
- package/dist/{workflow-BomH9DBB.mjs → workflow-H8hsEikC.mjs} +1 -1
- package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -2
- package/dist/workflow-engine/execution-attempt-repository.mjs +1 -1
- package/dist/workflow-engine/index.d.mts +300 -216
- 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/provider-operation.d.mts +1 -1
- package/dist/workflow-engine/testing/conformance.d.mts +85 -0
- package/dist/workflow-engine/testing/conformance.mjs +1 -0
- package/dist/workflow-engine/testing/index.d.mts +12 -5
- package/dist/workflow-engine/testing/index.mjs +1 -1
- package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
- package/dist/workflow-engine/testing/sqlite.mjs +75 -46
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-CmIkKnpF.mjs +2 -0
- package/package.json +13 -1
- package/dist/attempt-record-codec-BORASgzn.mjs +0 -1
- package/dist/authority-state-bootstrap-eitx6Ukn.mjs +0 -1
- package/dist/bus-D6NoBhIV.mjs +0 -2
- package/dist/bus-UgFdHybD.mjs +0 -1
- package/dist/package-UemD2NWn.mjs +0 -7
- package/dist/runtime-registration-client-BTtFpt_k.mjs +0 -1
- package/dist/schemas-C3kyQWGf.mjs +0 -1
- package/dist/schemas-TK29KWx-.mjs +0 -1
- package/dist/scoped-bus-DoPmCJeM.mjs +0 -1
- package/dist/worker-DlRdLf2d.mjs +0 -1
- package/dist/workflow-worker-DjUfKshi.mjs +0 -1
- /package/dist/{adapter-binding-CATvmGuz.d.mts → adapter-binding-D68U_Hmh.d.mts} +0 -0
- /package/dist/{base-orchestrator-B4YW6z_Q.d.mts → base-orchestrator-DA95InJU.d.mts} +0 -0
- /package/dist/{capability-service-BW1-teFU.d.mts → capability-service-s4ZYSEWc.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-lcv83Hq3.d.mts → client-binary-version-verifier-kd9LP9AQ.d.mts} +0 -0
- /package/dist/{client-BG0WX5Vz.d.mts → client-f5A-6La5.d.mts} +0 -0
- /package/dist/{clients-namespace-DLAjOTTb.d.mts → clients-namespace-q4PqU1cA.d.mts} +0 -0
- /package/dist/{config-namespace-CH7sJZ4f.d.mts → config-namespace-Cp71zTT0.d.mts} +0 -0
- /package/dist/{create-static-mount-DxuixuLZ.mjs → create-static-mount-CmQgA0jq.mjs} +0 -0
- /package/dist/{definition-BrgzUuFk.d.mts → definition-BHSzhrUf.d.mts} +0 -0
- /package/dist/{extension-context-QmFuHdq5.d.mts → extension-context-BmU5XKjI.d.mts} +0 -0
- /package/dist/{extension-discovery-Dhu3WplO.d.mts → extension-discovery-DnO7bINK.d.mts} +0 -0
- /package/dist/{filesystem-service-ZJ43SbBi.d.mts → filesystem-service-BBArEDPL.d.mts} +0 -0
- /package/dist/{index-BC-6qNeo.d.mts → index-B-zl-O-Y.d.mts} +0 -0
- /package/dist/{index-BfV8U4XX.d.mts → index-BB0HypzC.d.mts} +0 -0
- /package/dist/{index-8y4hT9WL.d.mts → index-Bf2MgOni.d.mts} +0 -0
- /package/dist/{index-B4svZC6L.d.mts → index-C9xVZ-gt.d.mts} +0 -0
- /package/dist/{index-kzIjbrS02.d.mts → index-CDLf3Fka2.d.mts} +0 -0
- /package/dist/{index-BuMsrli0.d.mts → index-CPWBGotQ.d.mts} +0 -0
- /package/dist/{index-pvX-BIpr2.d.mts → index-CcrXttC02.d.mts} +0 -0
- /package/dist/{index-B5dP8rj6.d.mts → index-CkpR5sIH.d.mts} +0 -0
- /package/dist/{index-CmbkCxj-.d.mts → index-Co1da7YK.d.mts} +0 -0
- /package/dist/{index-VzLAV0Yt.d.mts → index-CrcfeFOo.d.mts} +0 -0
- /package/dist/{index-BM56936c.d.mts → index-CsFN2nv7.d.mts} +0 -0
- /package/dist/{index-CVpaGijY.d.mts → index-D-JbTXIH.d.mts} +0 -0
- /package/dist/{index-l01zsChf.d.mts → index-D94yE5Dr.d.mts} +0 -0
- /package/dist/{index-D037TVsm.d.mts → index-DQD2-jcL.d.mts} +0 -0
- /package/dist/{index-D8D-yibS2.d.mts → index-DSLTgc7h2.d.mts} +0 -0
- /package/dist/{index-CL0Jo1b92.d.mts → index-DSN2t48K.d.mts} +0 -0
- /package/dist/{index-DQ8o3JGi.d.mts → index-DW4SE_sH.d.mts} +0 -0
- /package/dist/{index-DgspOUa72.d.mts → index-DYHxzwok2.d.mts} +0 -0
- /package/dist/{index-BMRB9yhF.d.mts → index-D_sMzTvv.d.mts} +0 -0
- /package/dist/{index-BFWvT0NG.d.mts → index-Df1c_2PF.d.mts} +0 -0
- /package/dist/{index-B2Y1Wvbh.d.mts → index-Dn_SGTgp.d.mts} +0 -0
- /package/dist/{index-C4V8Pmi4.d.mts → index-KAAnSRZt.d.mts} +0 -0
- /package/dist/{index-Ek4y8M9J2.d.mts → index-NhW2h2wH2.d.mts} +0 -0
- /package/dist/{index-CqdMbYmR.d.mts → index-mK-rgiit.d.mts} +0 -0
- /package/dist/{index-BTEJfzjE.d.mts → index-xaBSwHxJ.d.mts} +0 -0
- /package/dist/{json-value-DPqb-SJ8.d.mts → json-value-pX6xnLGw.d.mts} +0 -0
- /package/dist/{jsonl-transport-Cyyh5Wje.mjs → jsonl-transport-DQIlRX_y.mjs} +0 -0
- /package/dist/{lib-BqV8hYtk.mjs → lib-6eNAiNK7.mjs} +0 -0
- /package/dist/{namespace-DBO1OzYB.d.mts → namespace-9ychTEk_.d.mts} +0 -0
- /package/dist/{namespace-CVFaZv8x.d.mts → namespace-BGDq7HmW.d.mts} +0 -0
- /package/dist/{namespace-K23m4b0n.d.mts → namespace-BMG3RCdr.d.mts} +0 -0
- /package/dist/{namespace-CPm9dhi2.d.mts → namespace-BoyqQiW9.d.mts} +0 -0
- /package/dist/{namespace-BUYDmd0r.d.mts → namespace-CPR2xem0.d.mts} +0 -0
- /package/dist/{namespace-CPG6u60N.d.mts → namespace-CQEYu8az.d.mts} +0 -0
- /package/dist/{namespace-DqZweTbX.d.mts → namespace-CVg_cpkh.d.mts} +0 -0
- /package/dist/{namespace-B0ftHlK3.d.mts → namespace-DG0hjPcx.d.mts} +0 -0
- /package/dist/{orchestrator-shared-CNHSImNY.d.mts → orchestrator-shared-BzqqcY2z.d.mts} +0 -0
- /package/dist/{packages-CxPMEg8D.d.mts → packages-Cx-BwSZr.d.mts} +0 -0
- /package/dist/{provider-operation-DbdyFwNm.d.mts → provider-operation-B2wQST6N.d.mts} +0 -0
- /package/dist/{providers-namespace-CfZKp-C0.d.mts → providers-namespace-DsKTnuO1.d.mts} +0 -0
- /package/dist/{schemas-ChmQldVH.d.mts → schemas--LAbwXvw.d.mts} +0 -0
- /package/dist/{schemas-CF8QwRqt.d.mts → schemas-Bk50UoMA.d.mts} +0 -0
- /package/dist/{schemas-BCXvEWyF.d.mts → schemas-CBpjAhut.d.mts} +0 -0
- /package/dist/{schemas-bfZNpl0B.d.mts → schemas-CHRuwe18.d.mts} +0 -0
- /package/dist/{schemas-BGvkTiCx.d.mts → schemas-CzGN0eqW.d.mts} +0 -0
- /package/dist/{schemas-Pe892GgN.d.mts → schemas-DmULJ7Jk.d.mts} +0 -0
- /package/dist/{schemas-B6Q-qdmn.d.mts → schemas-Dxvjq-Bi.d.mts} +0 -0
- /package/dist/{schemas-CenET9Cq.d.mts → schemas-Wqo3_F6-.d.mts} +0 -0
- /package/dist/{server-lifecycle-L8zja8t8.d.mts → server-lifecycle-WFZcCMwF.d.mts} +0 -0
- /package/dist/{session-lineage-bUkd3fqx.d.mts → session-lineage-C9kppcCa.d.mts} +0 -0
- /package/dist/{src-BacfeiI4.mjs → src-DIyWekjW.mjs} +0 -0
- /package/dist/{storage-namespace-YmE8XCCL.d.mts → storage-namespace-BWU-8rvj.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-BsnYAPot.d.mts → storage-namespace-definition-B-8JKvzm.d.mts} +0 -0
- /package/dist/{types-DdpSEmTO.d.mts → types-8rMNe3AS.d.mts} +0 -0
- /package/dist/{types-DnK6Wa_Y.d.mts → types-BFeWU3WM.d.mts} +0 -0
- /package/dist/{types-tyv0B605.d.mts → types-BnPJa-C_.d.mts} +0 -0
- /package/dist/{types-OKJCOjme.d.mts → types-DQTCNM2i.d.mts} +0 -0
- /package/dist/{types-BlB23n4f.d.mts → types-DxHeL0pF.d.mts} +0 -0
- /package/dist/{window-registry-Pcf35cac.d.mts → window-registry-DQP5P2_0.d.mts} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { l as ProviderOperationOwnershipRecord, o as ProviderOperationClaimDecision, s as ProviderOperationMutationDecision } from "./provider-operation-
|
|
2
|
-
import { B as
|
|
1
|
+
import { l as ProviderOperationOwnershipRecord, o as ProviderOperationClaimDecision, s as ProviderOperationMutationDecision } from "./provider-operation-B2wQST6N.mjs";
|
|
2
|
+
import { $ as RuntimeReadinessDecision, A as MarkRuntimeReadyInput, B as ReadBootstrapStartStateInput, C as ExecutionAttemptRepository, D as GetInstructionInput, E as ExecutionOwnerId, F as PendingAttemptAbandonmentDecision, G as RecordProvisionerIncarnationLostInput, H as RecordAllocationTerminatedInput, J as RegisterRuntimeInput, K as RecordProvisioningAbsentInput, L as ProvisionerIncarnationLossDecision, M as OperationCompletionDecision, N as OperationReportDecision, O as HandoffProviderOperationInput, P as OutcomeCodec, R as ProvisioningAbsenceDecision, U as RecordInfrastructureFailureInput, V as RecordAllocationInput, W as RecordProviderOperationUncertaintyInput, X as ReportOperationInput, Y as RenewProviderOperationClaimInput, Z as RuntimeOutcomeFence, a as AllocationRefEvolutionDecision, b as ExecutionAttemptOutcomeDecision, et as RuntimeRegistrationDecision, f as CompleteOperationInput, h as DurableOutcome, i as AllocationRefEvolution, j as OperationAdmissionDecision, k as InfrastructureFailureDecision, n as AdmitOperationInput, o as AllocationTerminationDecision, p as DiscoveredAllocationDecision, q as RecoverableAttemptRecord, r as AllocationRecordingDecision, s as AttemptControlState, tt as TakeOverProviderOperationInput, u as BeginProvisioningInput, x as ExecutionAttemptRecord, z as ProvisioningClaimDecision } from "./execution-attempt-repository-CgB7uiYD.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
3
4
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
4
5
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
5
|
-
import { IWorkflowRunner, LoopGateHandler, MakaioNodeExtension, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, WorkerMaterializationSpec, WorkflowDefinition, WorkflowExecution, WorkflowRunContext, WorkflowRunResult } from "@makaio/framework/contracts";
|
|
6
|
+
import { ExecutionAttemptBootstrapAwaitStartResponse, ExecutionAttemptInstruction, ExecutionAttemptOutcome, IWorkflowRunner, LoopGateHandler, MakaioNodeExtension, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, WorkerMaterializationSpec, WorkflowDefinition, WorkflowExecution, WorkflowRunContext, WorkflowRunResult } from "@makaio/framework/contracts";
|
|
6
7
|
import { BaseService } from "@makaio/framework/service-base";
|
|
7
8
|
import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
|
|
8
9
|
import { AutomationTriggerBindingRuntime } from "@makaio/framework/services/automation-trigger";
|
|
@@ -83,6 +84,24 @@ interface WorkflowMaterializationSpecResolver {
|
|
|
83
84
|
resolve(input: WorkflowMaterializationSpecResolution): Promise<WorkerMaterializationSpec | undefined>;
|
|
84
85
|
}
|
|
85
86
|
//#endregion
|
|
87
|
+
//#region subsystems/workflow-engine/src/bootstrap-start.d.ts
|
|
88
|
+
/** A single bounded observation, not a new bootstrap budget. */
|
|
89
|
+
interface BootstrapStartOptions {
|
|
90
|
+
/** Request cancellation or owner shutdown. */
|
|
91
|
+
readonly signal: AbortSignal;
|
|
92
|
+
/** Absolute request deadline in Unix milliseconds. */
|
|
93
|
+
readonly deadline: number;
|
|
94
|
+
}
|
|
95
|
+
/** Start authorization shared by credential ingress and authenticated runtime ingress. */
|
|
96
|
+
interface BootstrapStartAuthority {
|
|
97
|
+
/**
|
|
98
|
+
* Observe the durable allocation before entering runtime registration.
|
|
99
|
+
* @param identity - Trusted owner and attempt identity.
|
|
100
|
+
* @param options - Cancellation and the current request's deadline.
|
|
101
|
+
*/
|
|
102
|
+
awaitBootstrapStart(identity: ReadBootstrapStartStateInput, options: BootstrapStartOptions): Promise<ExecutionAttemptBootstrapAwaitStartResponse>;
|
|
103
|
+
}
|
|
104
|
+
//#endregion
|
|
86
105
|
//#region subsystems/workflow-engine/src/execution-attempt-authority.d.ts
|
|
87
106
|
/**
|
|
88
107
|
* Execution attempt Authority service.
|
|
@@ -113,8 +132,9 @@ interface WorkflowMaterializationSpecResolver {
|
|
|
113
132
|
* are lost on crash; the host recovery coordinator owns recovery decisions.
|
|
114
133
|
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
115
134
|
*/
|
|
116
|
-
declare class ExecutionAttemptAuthority<TOutcome> {
|
|
135
|
+
declare class ExecutionAttemptAuthority<TOutcome> implements BootstrapStartAuthority {
|
|
117
136
|
private readonly repository;
|
|
137
|
+
private readonly bootstrapTimeoutMs;
|
|
118
138
|
/**
|
|
119
139
|
* In-process waiters keyed by `executionAttemptId`.
|
|
120
140
|
*
|
|
@@ -125,17 +145,40 @@ declare class ExecutionAttemptAuthority<TOutcome> {
|
|
|
125
145
|
private readonly waiters;
|
|
126
146
|
/**
|
|
127
147
|
* @param repository - Injected durable attempt persistence port.
|
|
148
|
+
* @param options - Explicit host-owned bootstrap budget frozen when each attempt is created.
|
|
128
149
|
*/
|
|
129
|
-
constructor(repository: ExecutionAttemptRepository<TOutcome
|
|
150
|
+
constructor(repository: ExecutionAttemptRepository<TOutcome>, options: {
|
|
151
|
+
readonly bootstrapTimeoutMs: number;
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Wait for durable allocation without registering or admitting a Runtime.
|
|
155
|
+
* @param identity - Trusted owner and attempt identity.
|
|
156
|
+
* @param options - Request cancellation and absolute deadline.
|
|
157
|
+
* @returns A bounded, renewable start decision.
|
|
158
|
+
*/
|
|
159
|
+
awaitBootstrapStart(identity: ReadBootstrapStartStateInput, options: BootstrapStartOptions): Promise<ExecutionAttemptBootstrapAwaitStartResponse>;
|
|
130
160
|
/**
|
|
131
161
|
* Create a new execution attempt with an Authority-generated ID.
|
|
132
162
|
*
|
|
133
163
|
* Persists the attempt through the repository and installs an in-process
|
|
134
164
|
* waiter for the committed outcome. Must be called before dispatch.
|
|
135
165
|
* @param executionId - Owner identifier the attempt belongs to.
|
|
166
|
+
* @param instruction - Portable immutable assignment to snapshot before dispatch.
|
|
136
167
|
* @returns The persisted attempt record.
|
|
137
168
|
*/
|
|
138
|
-
createAttempt(executionId: ExecutionOwnerId): Promise<ExecutionAttemptRecord>;
|
|
169
|
+
createAttempt(executionId: ExecutionOwnerId, instruction: ExecutionAttemptInstruction): Promise<ExecutionAttemptRecord>;
|
|
170
|
+
/**
|
|
171
|
+
* Read this attempt's frozen assignment through the owner-scoped repository port.
|
|
172
|
+
* @param input - Attempt and trusted owner identity.
|
|
173
|
+
* @returns The stored assignment, or null for an owner mismatch or missing attempt.
|
|
174
|
+
*/
|
|
175
|
+
getInstruction(input: GetInstructionInput): Promise<ExecutionAttemptInstruction | null>;
|
|
176
|
+
/**
|
|
177
|
+
* Accept successful Preparation without settling the attempt's outcome waiter.
|
|
178
|
+
* @param input - Preparation result, operation correlation and trusted owner identity.
|
|
179
|
+
* @returns The repository's durable acceptance, replay or refusal.
|
|
180
|
+
*/
|
|
181
|
+
reportOperation(input: ReportOperationInput): Promise<OperationReportDecision>;
|
|
139
182
|
/**
|
|
140
183
|
* Claim durable ownership of provider provisioning for an active attempt.
|
|
141
184
|
*
|
|
@@ -315,9 +358,10 @@ declare class ExecutionAttemptAuthority<TOutcome> {
|
|
|
315
358
|
* @param executionAttemptId - The attempt submitting the outcome.
|
|
316
359
|
* @param executionId - Owner identifier the attempt belongs to.
|
|
317
360
|
* @param result - The rendering to commit, from {@link canonicalizeOutcome}.
|
|
361
|
+
* @param runtimeFence - Runtime slot that must remain current for a fresh commit.
|
|
318
362
|
* @returns The durable decision with the canonical outcome when applicable.
|
|
319
363
|
*/
|
|
320
|
-
commitOutcome(executionAttemptId: string, executionId: ExecutionOwnerId, result: DurableOutcome<TOutcome
|
|
364
|
+
commitOutcome(executionAttemptId: string, executionId: ExecutionOwnerId, result: DurableOutcome<TOutcome>, runtimeFence?: RuntimeOutcomeFence): Promise<ExecutionAttemptOutcomeDecision<TOutcome>>;
|
|
321
365
|
/**
|
|
322
366
|
* Obtain the in-process promise for a committed outcome.
|
|
323
367
|
*
|
|
@@ -456,6 +500,379 @@ declare class ExecutionAttemptAuthority<TOutcome> {
|
|
|
456
500
|
private settleWaiterInternal;
|
|
457
501
|
}
|
|
458
502
|
//#endregion
|
|
503
|
+
//#region subsystems/workflow-engine/src/outcome-convergence.d.ts
|
|
504
|
+
/**
|
|
505
|
+
* Input handed to {@link OutcomeConvergence.converge}.
|
|
506
|
+
*
|
|
507
|
+
* Named rather than inlined so an owner-side realization can state the shape
|
|
508
|
+
* it implements against, and so a consumer can pin it from the public surface.
|
|
509
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
510
|
+
*/
|
|
511
|
+
interface OutcomeConvergenceInput<TOutcome> {
|
|
512
|
+
/** Owner identifier the attempt belongs to. */
|
|
513
|
+
readonly executionId: ExecutionOwnerId;
|
|
514
|
+
/** Authority-created attempt identifier. */
|
|
515
|
+
readonly executionAttemptId: string;
|
|
516
|
+
/** The canonical committed outcome, never the submitter's copy of it. */
|
|
517
|
+
readonly outcome: TOutcome;
|
|
518
|
+
/** The durable decision that produced the committed outcome. */
|
|
519
|
+
readonly decision: 'accepted' | 'duplicate';
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Owner-side convergence of a committed attempt outcome.
|
|
523
|
+
*
|
|
524
|
+
* Runs after the durable commit and before waiter settlement and ACK. It is
|
|
525
|
+
* idempotent by contract: it is re-entered for every duplicate retry, because
|
|
526
|
+
* a worker whose first submission committed but did not converge resubmits
|
|
527
|
+
* the same outcome, receives `duplicate`, and must converge again.
|
|
528
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
529
|
+
*/
|
|
530
|
+
interface OutcomeConvergence<TOutcome> {
|
|
531
|
+
/**
|
|
532
|
+
* Converge owner state with the committed outcome.
|
|
533
|
+
* @param input - Attempt identity, the canonical committed outcome, and the
|
|
534
|
+
* durable decision that produced it.
|
|
535
|
+
*/
|
|
536
|
+
converge(input: OutcomeConvergenceInput<TOutcome>): Promise<void>;
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* Owner-side validation that runs before the durable commit.
|
|
540
|
+
*
|
|
541
|
+
* Performs reads only: an outcome it rejects never becomes an immutable
|
|
542
|
+
* attempt outcome, so a corrected retry is not answered as a conflict. What
|
|
543
|
+
* it inspects is the canonical outcome the attempt will hold, obtained from
|
|
544
|
+
* `ExecutionAttemptAuthority.canonicalizeOutcome` before the commit.
|
|
545
|
+
*
|
|
546
|
+
* **A realization must be retry-stable.** {@link submitAttemptOutcome} runs it
|
|
547
|
+
* ahead of every commit, including the retry of a submission that already
|
|
548
|
+
* committed, so its verdict may depend only on the submission itself and on
|
|
549
|
+
* owner facts no convergence step rewrites — never on owner state convergence
|
|
550
|
+
* moves forward. A validator that read, say, a mutable lifecycle status would
|
|
551
|
+
* reject the identical retry of an outcome its own convergence already
|
|
552
|
+
* committed, and the waiter for that outcome would never settle.
|
|
553
|
+
*
|
|
554
|
+
* Retry-stable is measured on the outcome, not on its text. A retry need not
|
|
555
|
+
* render the same text as the first commit: `sameDurableOutcome` judges
|
|
556
|
+
* two texts the same outcome whatever member order they carry and answers
|
|
557
|
+
* `duplicate` for such a retry, while the validator sees the retry's own
|
|
558
|
+
* canonical rendering, never the stored one. Its verdict may therefore turn
|
|
559
|
+
* only on what `sameDurableOutcome` compares — the members and their values
|
|
560
|
+
* — and never on member order or any other detail of one particular
|
|
561
|
+
* rendering. A validator that keyed on which member comes first would reject
|
|
562
|
+
* the retry the repository is about to report as `duplicate`, and the
|
|
563
|
+
* committed-but-unconverged waiter could never recover. Validating the stored
|
|
564
|
+
* representation instead is not an option, for the reason the next paragraph
|
|
565
|
+
* gives: validation runs ahead of the commit, where the retry's rendering is
|
|
566
|
+
* the only one there is.
|
|
567
|
+
*
|
|
568
|
+
* The rule is stated here rather than worked around downstream because the
|
|
569
|
+
* order it constrains is the one that keeps a spoofed outcome out of durable
|
|
570
|
+
* storage: validation cannot move behind the commit without committing what
|
|
571
|
+
* it exists to reject. The workflow adapter's `validateOutcomeExecutionIdentity`
|
|
572
|
+
* satisfies it by correlating the submitted result against immutable durable
|
|
573
|
+
* identity — the execution's own id and workflow id, and the run context's
|
|
574
|
+
* terminal-authority binding, none of which outcome convergence touches.
|
|
575
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
576
|
+
*/
|
|
577
|
+
interface OutcomePreCommitValidation<TOutcome> {
|
|
578
|
+
/**
|
|
579
|
+
* Validate an outcome against owner state.
|
|
580
|
+
*
|
|
581
|
+
* Called again for every retry of the same submission, so the same outcome
|
|
582
|
+
* owes the same verdict — the same as `sameDurableOutcome` reads it,
|
|
583
|
+
* which ignores member order and every other rendering detail, not the
|
|
584
|
+
* same text.
|
|
585
|
+
*
|
|
586
|
+
* The outcome handed over is the canonical one — what the attempt will
|
|
587
|
+
* hold and what {@link OutcomeConvergence.converge} will receive — not the
|
|
588
|
+
* submitter's copy of it. A codec may normalize while serializing, so
|
|
589
|
+
* validating the copy would let an outcome the validator would have
|
|
590
|
+
* rejected become the immutable committed one.
|
|
591
|
+
* @param executionId - Owner identifier the attempt belongs to.
|
|
592
|
+
* @param outcome - Canonical outcome about to be committed.
|
|
593
|
+
* @throws When the outcome must not be committed.
|
|
594
|
+
*/
|
|
595
|
+
validate(executionId: ExecutionOwnerId, outcome: TOutcome): Promise<void>;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* Dependencies of {@link submitAttemptOutcome}.
|
|
599
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
600
|
+
*/
|
|
601
|
+
interface AttemptOutcomeSubmissionDeps<TOutcome> {
|
|
602
|
+
/** Authority that commits the outcome and holds the in-process waiter. */
|
|
603
|
+
readonly authority: ExecutionAttemptAuthority<TOutcome>;
|
|
604
|
+
/** Owner convergence that runs for `accepted` and `duplicate` decisions. */
|
|
605
|
+
readonly convergence: OutcomeConvergence<TOutcome>;
|
|
606
|
+
/** Optional owner validation that runs before the durable commit. */
|
|
607
|
+
readonly validation?: OutcomePreCommitValidation<TOutcome>;
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* Input of {@link submitAttemptOutcome}.
|
|
611
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
612
|
+
*/
|
|
613
|
+
interface AttemptOutcomeSubmission<TOutcome> {
|
|
614
|
+
/** Owner identifier the attempt belongs to. */
|
|
615
|
+
readonly executionId: ExecutionOwnerId;
|
|
616
|
+
/** Authority-created attempt identifier. */
|
|
617
|
+
readonly executionAttemptId: string;
|
|
618
|
+
/** Outcome the worker submitted. */
|
|
619
|
+
readonly outcome: TOutcome;
|
|
620
|
+
/** Originating runtime slot, checked atomically at commit after owner validation. */
|
|
621
|
+
readonly runtimeFence?: RuntimeOutcomeFence;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* Submit an attempt outcome through the generic owner boundary.
|
|
625
|
+
*
|
|
626
|
+
* Order: one canonicalization of the submitted outcome, optional pre-commit
|
|
627
|
+
* validation of that canonical value, durable commit of that same rendering
|
|
628
|
+
* through the authority, owner convergence for `accepted` and `duplicate`,
|
|
629
|
+
* then waiter settlement on a fresh decode of the text the decision reports
|
|
630
|
+
* as committed. The decision kind is returned for the caller's
|
|
631
|
+
* acknowledgement.
|
|
632
|
+
*
|
|
633
|
+
* Invariants this function keeps:
|
|
634
|
+
* - the submission is rendered exactly once, and the submitter's object is
|
|
635
|
+
* never read again after that: an outcome the caller mutates while an await
|
|
636
|
+
* is pending can reach neither the validation nor the durable write;
|
|
637
|
+
* - validation and convergence see one and the same value: the canonical
|
|
638
|
+
* outcome the attempt holds, never the submitter's copy of it;
|
|
639
|
+
* - convergence only ever sees `decision.outcome`, the repository's own
|
|
640
|
+
* committed object;
|
|
641
|
+
* - the waiter settles on a value decoded afresh from the text the attempt
|
|
642
|
+
* stores — the decision's own text, which for a `duplicate` is the first
|
|
643
|
+
* commit's rather than the retry's — so what a runner receives is the
|
|
644
|
+
* committed outcome even when convergence mutated the object it was handed;
|
|
645
|
+
* - a throwing convergence leaves the outcome durably committed and the
|
|
646
|
+
* waiter pending, so the worker's retry yields `duplicate` and converges
|
|
647
|
+
* again; nothing is rejected or deleted here. That recovery path runs the
|
|
648
|
+
* validation again first, which is why {@link OutcomePreCommitValidation}
|
|
649
|
+
* owes a retry-stable verdict;
|
|
650
|
+
* - `conflict` and `fenced` skip convergence and settlement; their waiter
|
|
651
|
+
* rejection already happened inside `ExecutionAttemptAuthority.commitOutcome`.
|
|
652
|
+
* @param deps - Authority, convergence, and optional validation.
|
|
653
|
+
* @param input - Attempt identity and submitted outcome.
|
|
654
|
+
* @returns The durable decision kind.
|
|
655
|
+
* @typeParam TOutcome - Owner-specific outcome type committed per attempt.
|
|
656
|
+
*/
|
|
657
|
+
declare function submitAttemptOutcome<TOutcome>(deps: AttemptOutcomeSubmissionDeps<TOutcome>, input: AttemptOutcomeSubmission<TOutcome>): Promise<'accepted' | 'duplicate' | 'conflict' | 'fenced'>;
|
|
658
|
+
//#endregion
|
|
659
|
+
//#region subsystems/workflow-engine/src/execution-attempt-handlers.d.ts
|
|
660
|
+
/** Owner-specific interpretation of a terminal report against its frozen assignment. */
|
|
661
|
+
interface AttemptOutcomeDecodingInput {
|
|
662
|
+
/** Immutable instruction stored when the Attempt was created. */
|
|
663
|
+
readonly instruction: ExecutionAttemptInstruction;
|
|
664
|
+
/** Technical failure or adapter-produced result reported by the Runtime. */
|
|
665
|
+
readonly outcome: ExecutionAttemptOutcome;
|
|
666
|
+
}
|
|
667
|
+
/** Dependencies for the generic instruction, Preparation, and outcome request handlers. */
|
|
668
|
+
interface ExecutionAttemptHandlersDeps<TOutcome> extends AttemptOutcomeSubmissionDeps<TOutcome> {
|
|
669
|
+
/**
|
|
670
|
+
* Decode against immutable assignment facts, not the owner's mutable current state.
|
|
671
|
+
* Must produce the same outcome for retries of the same report.
|
|
672
|
+
* @param input - Frozen instruction and terminal wire report.
|
|
673
|
+
* @returns The owner-specific outcome passed through canonical commit and convergence.
|
|
674
|
+
*/
|
|
675
|
+
decodeOutcome(input: AttemptOutcomeDecodingInput): TOutcome | Promise<TOutcome>;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Register generic Runtime ingress; no Workflow result or owner lifecycle is assumed.
|
|
679
|
+
*
|
|
680
|
+
* Preparation acceptance and operation completion are one Authority write.
|
|
681
|
+
* Terminal reports commit, converge, settle the waiter, then receive their ACK.
|
|
682
|
+
* Local host code uses the typed Authority/submission ports directly; these wire
|
|
683
|
+
* handlers follow the same authenticated-peer rule as Runtime registration.
|
|
684
|
+
* @param bus - Bus that receives authenticated Runtime requests.
|
|
685
|
+
* @param deps - Authority and owner-side outcome adapter.
|
|
686
|
+
* @returns Cleanup function for all three handlers.
|
|
687
|
+
*/
|
|
688
|
+
declare function registerExecutionAttemptHandlers<TOutcome>(bus: IMakaioBus, deps: ExecutionAttemptHandlersDeps<TOutcome>): () => void;
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region subsystems/workflow-engine/src/workflow-attempt-outcome.d.ts
|
|
691
|
+
/** Technical failure retained as such rather than fabricated into a workflow-produced result. */
|
|
692
|
+
type WorkflowAttemptTechnicalFailure = Extract<ExecutionAttemptOutcome, {
|
|
693
|
+
kind: 'technical-failure';
|
|
694
|
+
}>;
|
|
695
|
+
/** Confirmed cooperative stop retained independently of a workflow-produced result. */
|
|
696
|
+
type WorkflowAttemptCancellation = Extract<ExecutionAttemptOutcome, {
|
|
697
|
+
kind: 'cancelled';
|
|
698
|
+
}>;
|
|
699
|
+
/** Canonical owner outcome: a workflow result, infrastructure failure, or confirmed cancellation. */
|
|
700
|
+
type WorkflowAttemptOutcome = WorkflowRunResult | WorkflowAttemptTechnicalFailure | WorkflowAttemptCancellation;
|
|
701
|
+
/** Production codec schema for workflow-owned Attempt outcomes. */
|
|
702
|
+
declare const WorkflowAttemptOutcomeSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
703
|
+
executionId: z.ZodString;
|
|
704
|
+
workflowId: z.ZodString;
|
|
705
|
+
status: z.ZodLiteral<"completed">;
|
|
706
|
+
artifact: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
kind: z.ZodString;
|
|
708
|
+
id: z.ZodString;
|
|
709
|
+
revision: z.ZodString;
|
|
710
|
+
scope: z.ZodObject<{
|
|
711
|
+
level: z.ZodString;
|
|
712
|
+
ids: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
713
|
+
}, z.core.$strip>;
|
|
714
|
+
schemaVersion: z.ZodString;
|
|
715
|
+
data: z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>;
|
|
716
|
+
relations: z.ZodArray<z.ZodObject<{
|
|
717
|
+
type: z.ZodString;
|
|
718
|
+
target: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
719
|
+
refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
|
|
720
|
+
kind: z.ZodString;
|
|
721
|
+
id: z.ZodString;
|
|
722
|
+
revision: z.ZodString;
|
|
723
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
724
|
+
refClass: z.ZodDefault<z.ZodLiteral<"local">>;
|
|
725
|
+
artifact: z.ZodObject<{
|
|
726
|
+
refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
|
|
727
|
+
kind: z.ZodString;
|
|
728
|
+
id: z.ZodString;
|
|
729
|
+
revision: z.ZodString;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
localId: z.ZodString;
|
|
732
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
733
|
+
refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
|
|
734
|
+
kind: z.ZodString;
|
|
735
|
+
id: z.ZodString;
|
|
736
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
737
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
738
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
739
|
+
refClass: z.ZodLiteral<"entity">;
|
|
740
|
+
entityType: z.ZodString;
|
|
741
|
+
id: z.ZodString;
|
|
742
|
+
}, z.core.$strict>], "refClass">>;
|
|
743
|
+
}, z.core.$strip>>;
|
|
744
|
+
confidence: z.ZodOptional<z.ZodObject<{
|
|
745
|
+
level: z.ZodEnum<{
|
|
746
|
+
inferred: "inferred";
|
|
747
|
+
confirmed: "confirmed";
|
|
748
|
+
assumed: "assumed";
|
|
749
|
+
stated: "stated";
|
|
750
|
+
verified: "verified";
|
|
751
|
+
}>;
|
|
752
|
+
basis: z.ZodArray<z.ZodObject<{
|
|
753
|
+
kind: z.ZodString;
|
|
754
|
+
actor: z.ZodObject<{
|
|
755
|
+
kind: z.ZodString;
|
|
756
|
+
id: z.ZodString;
|
|
757
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
758
|
+
}, z.core.$strip>;
|
|
759
|
+
timestamp: z.ZodNumber;
|
|
760
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
761
|
+
evidenceRef: z.ZodOptional<z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
762
|
+
refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
|
|
763
|
+
kind: z.ZodString;
|
|
764
|
+
id: z.ZodString;
|
|
765
|
+
revision: z.ZodString;
|
|
766
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
767
|
+
refClass: z.ZodDefault<z.ZodLiteral<"local">>;
|
|
768
|
+
artifact: z.ZodObject<{
|
|
769
|
+
refClass: z.ZodDefault<z.ZodLiteral<"artifact">>;
|
|
770
|
+
kind: z.ZodString;
|
|
771
|
+
id: z.ZodString;
|
|
772
|
+
revision: z.ZodString;
|
|
773
|
+
}, z.core.$strip>;
|
|
774
|
+
localId: z.ZodString;
|
|
775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
776
|
+
refClass: z.ZodDefault<z.ZodLiteral<"evidence">>;
|
|
777
|
+
kind: z.ZodString;
|
|
778
|
+
id: z.ZodString;
|
|
779
|
+
revision: z.ZodOptional<z.ZodString>;
|
|
780
|
+
locator: z.ZodOptional<z.ZodString>;
|
|
781
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
782
|
+
refClass: z.ZodLiteral<"entity">;
|
|
783
|
+
entityType: z.ZodString;
|
|
784
|
+
id: z.ZodString;
|
|
785
|
+
}, z.core.$strict>], "refClass">>>;
|
|
786
|
+
}, z.core.$strip>>;
|
|
787
|
+
}, z.core.$strip>>;
|
|
788
|
+
representations: z.ZodOptional<z.ZodObject<{
|
|
789
|
+
markdown: z.ZodOptional<z.ZodString>;
|
|
790
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
791
|
+
plaintext: z.ZodOptional<z.ZodString>;
|
|
792
|
+
}, z.core.$strip>>;
|
|
793
|
+
actor: z.ZodObject<{
|
|
794
|
+
kind: z.ZodString;
|
|
795
|
+
id: z.ZodString;
|
|
796
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
797
|
+
}, z.core.$strip>;
|
|
798
|
+
timestamp: z.ZodNumber;
|
|
799
|
+
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
800
|
+
}, z.core.$strip>>;
|
|
801
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
802
|
+
executionId: z.ZodString;
|
|
803
|
+
workflowId: z.ZodString;
|
|
804
|
+
status: z.ZodLiteral<"failed">;
|
|
805
|
+
error: z.ZodString;
|
|
806
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
807
|
+
executionId: z.ZodString;
|
|
808
|
+
workflowId: z.ZodString;
|
|
809
|
+
status: z.ZodLiteral<"cancelled">;
|
|
810
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
811
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
812
|
+
executionId: z.ZodString;
|
|
813
|
+
workflowId: z.ZodString;
|
|
814
|
+
status: z.ZodLiteral<"paused">;
|
|
815
|
+
pausedAtGateId: z.ZodString;
|
|
816
|
+
pausedAtFrameId: z.ZodString;
|
|
817
|
+
}, z.core.$strict>], "status">, z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
818
|
+
kind: z.ZodLiteral<"technical-failure">;
|
|
819
|
+
stage: z.ZodEnum<{
|
|
820
|
+
"workspace-preparation": "workspace-preparation";
|
|
821
|
+
"workload-invocation": "workload-invocation";
|
|
822
|
+
startup: "startup";
|
|
823
|
+
}>;
|
|
824
|
+
message: z.ZodString;
|
|
825
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
826
|
+
kind: z.ZodLiteral<"workload-result">;
|
|
827
|
+
result: z.ZodType<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, _$_makaio_contracts0.JsonValue>>;
|
|
828
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
829
|
+
kind: z.ZodLiteral<"cancelled">;
|
|
830
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
831
|
+
}, z.core.$strict>], "kind">, z.ZodTransform<{
|
|
832
|
+
kind: "technical-failure";
|
|
833
|
+
stage: "workspace-preparation" | "workload-invocation" | "startup";
|
|
834
|
+
message: string;
|
|
835
|
+
} | {
|
|
836
|
+
kind: "cancelled";
|
|
837
|
+
reason?: string | undefined;
|
|
838
|
+
}, {
|
|
839
|
+
kind: "technical-failure";
|
|
840
|
+
stage: "workspace-preparation" | "workload-invocation" | "startup";
|
|
841
|
+
message: string;
|
|
842
|
+
} | {
|
|
843
|
+
kind: "workload-result";
|
|
844
|
+
result: _$_makaio_contracts0.JsonValue;
|
|
845
|
+
} | {
|
|
846
|
+
kind: "cancelled";
|
|
847
|
+
reason?: string | undefined;
|
|
848
|
+
}>>]>;
|
|
849
|
+
/** Durable workflow-owner codec; generic Attempt persistence does not interpret owner outcomes. */
|
|
850
|
+
declare const workflowAttemptOutcomeCodec: OutcomeCodec<WorkflowAttemptOutcome>;
|
|
851
|
+
/**
|
|
852
|
+
* Interpret a generic terminal report against its immutable workflow assignment.
|
|
853
|
+
* @param input - Frozen assignment and the Runtime's generic outcome report.
|
|
854
|
+
* @returns An owner-typed outcome to canonicalize, commit, and then converge.
|
|
855
|
+
*/
|
|
856
|
+
declare function decodeWorkflowAttemptOutcome(input: AttemptOutcomeDecodingInput): WorkflowAttemptOutcome;
|
|
857
|
+
/** Workflow identity used to project an already-converged runtime outcome to a runner completion. */
|
|
858
|
+
interface CommittedWorkflowOutcomeIdentity {
|
|
859
|
+
/** Workflow execution whose state has already converged. */
|
|
860
|
+
readonly executionId: string;
|
|
861
|
+
/** Workflow definition that owns that execution. */
|
|
862
|
+
readonly workflowId: string;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Project an already committed and converged outcome for the workflow runner API.
|
|
866
|
+
*
|
|
867
|
+
* This is an owner status projection, not a result to submit or persist. A
|
|
868
|
+
* runtime outcome retains its own kind in Attempt storage; the WorkflowExecution
|
|
869
|
+
* has already converged before this helper is called.
|
|
870
|
+
* @param outcome - Canonical outcome returned after owner convergence.
|
|
871
|
+
* @param identity - Immutable identity of the converged workflow execution.
|
|
872
|
+
* @returns Workflow status used by the runner's authority-committed completion.
|
|
873
|
+
*/
|
|
874
|
+
declare function toCommittedWorkflowRunnerResult(outcome: WorkflowAttemptOutcome, identity: CommittedWorkflowOutcomeIdentity): WorkflowRunResult;
|
|
875
|
+
//#endregion
|
|
459
876
|
//#region subsystems/workflow-engine/src/workflow-executor.d.ts
|
|
460
877
|
/**
|
|
461
878
|
* Core workflow executor service.
|
|
@@ -468,11 +885,14 @@ declare class ExecutionAttemptAuthority<TOutcome> {
|
|
|
468
885
|
* - Manages cancellation and cleanup
|
|
469
886
|
*/
|
|
470
887
|
declare class WorkflowExecutor extends BaseService {
|
|
888
|
+
private readonly workflowRunner?;
|
|
889
|
+
private readonly executionAttemptAuthority?;
|
|
471
890
|
/** Drizzle storage handler registration for the composition root. */
|
|
472
891
|
static readonly storage: {
|
|
473
892
|
readonly drizzle: typeof registerDrizzleWorkflowStorage;
|
|
474
893
|
};
|
|
475
894
|
private readonly config;
|
|
895
|
+
private stopBootstrapWaits?;
|
|
476
896
|
private readonly activeExecutions;
|
|
477
897
|
private readonly executionTasks;
|
|
478
898
|
private readonly shellAbortControllers;
|
|
@@ -488,8 +908,6 @@ declare class WorkflowExecutor extends BaseService {
|
|
|
488
908
|
private readonly durableLifecycleTransitions;
|
|
489
909
|
private readonly lifecyclePublications;
|
|
490
910
|
private readonly publishingLifecycleExecutions;
|
|
491
|
-
private readonly workflowRunner?;
|
|
492
|
-
private readonly executionAttemptAuthority?;
|
|
493
911
|
private readonly materializationSpecResolvers;
|
|
494
912
|
/**
|
|
495
913
|
* Create a new workflow executor.
|
|
@@ -498,7 +916,7 @@ declare class WorkflowExecutor extends BaseService {
|
|
|
498
916
|
* @param workflowRunner - Optional workflow-level runner for isolated execution
|
|
499
917
|
* @param executionAttemptAuthority - Optional Authority for Worker dispatch runners
|
|
500
918
|
*/
|
|
501
|
-
constructor(bus: IMakaioBus, config?: Partial<ExecutorConfig>, workflowRunner?: IWorkflowRunner, executionAttemptAuthority?: ExecutionAttemptAuthority<
|
|
919
|
+
constructor(bus: IMakaioBus, config?: Partial<ExecutorConfig>, workflowRunner?: IWorkflowRunner | undefined, executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowAttemptOutcome> | undefined);
|
|
502
920
|
/**
|
|
503
921
|
* Register a host resolver used to freeze workspace materialization before a
|
|
504
922
|
* path-backed execution is persisted.
|
|
@@ -533,6 +951,28 @@ declare class WorkflowExecutor extends BaseService {
|
|
|
533
951
|
accepted: boolean;
|
|
534
952
|
status: WorkflowExecution['status'];
|
|
535
953
|
}>;
|
|
954
|
+
/**
|
|
955
|
+
* Fail the workflow owner after a technical Attempt outcome has been committed.
|
|
956
|
+
* Startup and Preparation failures can precede loading the workflow definition,
|
|
957
|
+
* so this path uses the durable owner context, not a fabricated runner result.
|
|
958
|
+
* @param executionId - Durable authority-owned execution identity.
|
|
959
|
+
* @param failure - Canonical technical failure retained in Attempt storage.
|
|
960
|
+
* @returns The durable status after idempotent failure convergence.
|
|
961
|
+
*/
|
|
962
|
+
readonly acceptAuthorityTechnicalFailure: (executionId: string, failure: WorkflowAttemptTechnicalFailure) => Promise<{
|
|
963
|
+
accepted: boolean;
|
|
964
|
+
status: WorkflowExecution["status"];
|
|
965
|
+
}>;
|
|
966
|
+
/**
|
|
967
|
+
* Cancel the workflow owner after its technical Attempt cancellation is committed.
|
|
968
|
+
* @param executionId - Durable authority-owned execution identity.
|
|
969
|
+
* @param cancellation - Canonical cancellation retained in Attempt storage.
|
|
970
|
+
* @returns The durable status after idempotent cancellation convergence.
|
|
971
|
+
*/
|
|
972
|
+
readonly acceptAuthorityCancellation: (executionId: string, cancellation: WorkflowAttemptCancellation) => Promise<{
|
|
973
|
+
accepted: boolean;
|
|
974
|
+
status: WorkflowExecution["status"];
|
|
975
|
+
}>;
|
|
536
976
|
private resolveAuthorityRunnerReplay;
|
|
537
977
|
private loadAuthorityRunnerContext;
|
|
538
978
|
private registerAuthorityResultFinalizer;
|
|
@@ -910,7 +1350,9 @@ interface WorkflowEngineServiceOptions {
|
|
|
910
1350
|
* When omitted, the workflow engine operates without attempt tracking
|
|
911
1351
|
* (framework-only, in-process, and Piscina modes).
|
|
912
1352
|
*/
|
|
913
|
-
executionAttemptRepository?: ExecutionAttemptRepository<
|
|
1353
|
+
executionAttemptRepository?: ExecutionAttemptRepository<WorkflowAttemptOutcome>;
|
|
1354
|
+
/** Explicit creation-time bootstrap budget, required only when constructing an Authority. */
|
|
1355
|
+
executionAttemptBootstrapTimeoutMs?: number;
|
|
914
1356
|
/**
|
|
915
1357
|
* Pre-built execution attempt Authority.
|
|
916
1358
|
*
|
|
@@ -922,7 +1364,7 @@ interface WorkflowEngineServiceOptions {
|
|
|
922
1364
|
* construction. When both are provided, the pre-built Authority is used
|
|
923
1365
|
* and the repository is ignored.
|
|
924
1366
|
*/
|
|
925
|
-
executionAttemptAuthority?: ExecutionAttemptAuthority<
|
|
1367
|
+
executionAttemptAuthority?: ExecutionAttemptAuthority<WorkflowAttemptOutcome>;
|
|
926
1368
|
/** Host-owned resolvers that create portable specs for path-backed starts. */
|
|
927
1369
|
workflowMaterializationSpecResolvers?: readonly WorkflowMaterializationSpecResolver[];
|
|
928
1370
|
/**
|
|
@@ -963,12 +1405,11 @@ declare class WorkflowEngineService extends BaseService {
|
|
|
963
1405
|
/**
|
|
964
1406
|
* Execution attempt Authority owned by this package service.
|
|
965
1407
|
*
|
|
966
|
-
* Present
|
|
967
|
-
*
|
|
968
|
-
* framework-only, in-process, and Piscina modes.
|
|
1408
|
+
* Present when the host supplies a prebuilt Authority or a repository with
|
|
1409
|
+
* an explicit bootstrap budget, independently of runner mode.
|
|
969
1410
|
* @returns Authority instance, or `undefined` when no repository is injected.
|
|
970
1411
|
*/
|
|
971
|
-
get executionAttemptAuthority(): ExecutionAttemptAuthority<
|
|
1412
|
+
get executionAttemptAuthority(): ExecutionAttemptAuthority<WorkflowAttemptOutcome> | undefined;
|
|
972
1413
|
/**
|
|
973
1414
|
* Register a named workflow success finalizer with the owned executor.
|
|
974
1415
|
*
|
|
@@ -1051,4 +1492,4 @@ declare function createWorkflowEnginePackage(options?: WorkflowEngineServiceOpti
|
|
|
1051
1492
|
*/
|
|
1052
1493
|
declare const workflowEnginePackage: MakaioNodeExtension<IMakaioBus>;
|
|
1053
1494
|
//#endregion
|
|
1054
|
-
export { WorkflowEngineServiceOptions as a,
|
|
1495
|
+
export { WorkflowWorkspaceRootResolver as A, OutcomePreCommitValidation as C, BootstrapStartOptions as D, BootstrapStartAuthority as E, WorkflowMaterializationSpecResolution as O, OutcomeConvergenceInput as S, ExecutionAttemptAuthority as T, ExecutionAttemptHandlersDeps as _, WorkflowEngineServiceOptions as a, AttemptOutcomeSubmissionDeps as b, CommittedWorkflowOutcomeIdentity as c, WorkflowAttemptOutcomeSchema as d, WorkflowAttemptTechnicalFailure as f, AttemptOutcomeDecodingInput as g, workflowAttemptOutcomeCodec as h, WorkflowEngineService as i, registerDrizzleWorkflowStorage as j, WorkflowMaterializationSpecResolver as k, WorkflowAttemptCancellation as l, toCommittedWorkflowRunnerResult as m, createWorkflowEnginePackage as n, WorkflowTriggerReconciler as o, decodeWorkflowAttemptOutcome as p, workflowEnginePackage as r, WorkflowExecutor as s, WorkflowEngineToken as t, WorkflowAttemptOutcome as u, registerExecutionAttemptHandlers as v, submitAttemptOutcome as w, OutcomeConvergence as x, AttemptOutcomeSubmission as y };
|
package/dist/package.json
CHANGED
package/dist/rules/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-
|
|
1
|
+
import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-Bk50UoMA.mjs";
|
|
2
2
|
|
|
3
3
|
//#region packages/rules/src/evaluator.d.ts
|
|
4
4
|
/**
|
package/dist/rules/schemas.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-
|
|
1
|
+
import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-Bk50UoMA.mjs";
|
|
2
2
|
export { ConditionSchema, ExpressionConditionSchema, FieldConditionSchema, FieldOperatorSchema, JsonObjectSchema, JsonValueSchema, RuleSchema, RuleSetOptionsSchema, ScalarValueSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DispatchingAuth as e,createWebSocketCloseEvent as t}from"@makaio/framework/node/transports";import{HonoWebSocketBridge as n,startBusServer as r}from"@makaio/framework/node/bus-server";import{ExplicitDescriptorDiscovery as i,FileConfigStorage as a,FileRegistryCache as o,FilesystemDescriptorDiscovery as s,MergedDescriptorDiscovery as c,NodeCredentialProvider as l,StoredCredentialProvider as u,bootMakaioRuntimeCore as d,bootMakaioRuntimeCore as f,bridgeExtensionBrowserEntries as ee,createHonoRouteGraph as p,createHttpRouteGraphBuilder as m,entrypointStem as h,isCliContributionLike as g,isMakaioExtensionLike as _,isMissingOptionalRuntimePackage as v,isWithinDirectory as y,loadExtensions as b,loadOrCreateMachineIdentity as x,machineKeysExist as S,registerAdapterNameResolver as C,resolveConventionEntrypoint as w,resolveStaticModelRegistryPath as T,runMigrations as E,tryImport as D,validateMachineKeys as O}from"@makaio/framework/runtime-node";import{isIP as k}from"node:net";var A=class{raw;eventListeners={message:new Set,close:new Set,error:new Set,open:new Set};constructor(e){this.raw=e}get readyState(){return this.raw.readyState}send(e){if(typeof e==`string`){this.raw.send(e);return}if(e instanceof Blob){e.arrayBuffer().then(e=>{this.raw.readyState===1&&this.raw.send(new Uint8Array(e))}).catch(()=>{this.dispatchError()});return}if(e instanceof ArrayBuffer){this.raw.send(new Uint8Array(e));return}ArrayBuffer.isView(e)&&this.raw.send(e)}close(e,t){this.raw.close(e,t)}addEventListener(e,t){this.eventListeners[e]?.add(t)}removeEventListener(e,t){this.eventListeners[e]?.delete(t)}dispatchMessage(e){let t=new MessageEvent(`message`,{data:e});for(let e of this.eventListeners.message)e(t)}dispatchClose(e,n){let r=t(e,n);for(let e of this.eventListeners.close)e(r)}dispatchError(){let e=new Event(`error`);for(let t of this.eventListeners.error)t(e)}},j=class{options;bridge;busServer=null;busReady=!1;connecting=!1;constructor(e){this.options=e,this.bridge=new n}get dispatchingAuth(){return this.options.auth instanceof e?this.options.auth:void 0}createWebSocketHandler(){let e=this.bridge,t=()=>this.busReady,n=new WeakMap;return{binaryType:`arraybuffer`,open(r){if(!t()){r.close(1013,`Bus server not ready`);return}let i=new A(r);n.set(r,i),e.accept(i)},message(e,t){n.get(e)?.dispatchMessage(t)},close(e,t,r){n.get(e)?.dispatchClose(t,r),n.delete(e)}}}async connect(e,t){if(this.connecting||this.busServer)throw Error(`[BunBusServerTransport] connect() called while transport is already connected or connecting`);this.connecting=!0;try{this.busServer=await r({websocket:this.bridge,bus:e,auth:this.options.auth,loopbackName:this.options.loopbackName??`bun`}),this.busReady=!0}catch(e){throw await this.stopBusServer(`startup error`),e}finally{this.connecting=!1}}async disconnect(){await this.stopBusServer(`shutdown`),this.bridge.close()}async stopBusServer(e){this.busReady=!1,this.busServer&&=(await this.busServer.stop().catch(t=>{console.error(`[BunBusServerTransport] Failed to stop bus server during ${e}:`,t)}),null)}};function M(e){if(e.headers.get(`upgrade`)?.toLowerCase()!==`websocket`)return!1;let{pathname:t}=new URL(e.url);return t===`/bus`?!0:t===`/`&&e.headers.get(`origin`)===null}function te(e){return(t,n)=>M(t)?n.upgrade(t)?void 0:new Response(`WebSocket upgrade failed`,{status:426,headers:{Upgrade:`websocket`}}):e.fetch(t)}function N(e){return e.port}async function P(e){let{port:t,hostname:n}=e.bunServer,r=e.createMount??(await import(`../create-static-mount-
|
|
1
|
+
import{DispatchingAuth as e,createWebSocketCloseEvent as t}from"@makaio/framework/node/transports";import{HonoWebSocketBridge as n,startBusServer as r}from"@makaio/framework/node/bus-server";import{ExplicitDescriptorDiscovery as i,FileConfigStorage as a,FileRegistryCache as o,FilesystemDescriptorDiscovery as s,MergedDescriptorDiscovery as c,NodeCredentialProvider as l,StoredCredentialProvider as u,bootMakaioRuntimeCore as d,bootMakaioRuntimeCore as f,bridgeExtensionBrowserEntries as ee,createHonoRouteGraph as p,createHttpRouteGraphBuilder as m,entrypointStem as h,isCliContributionLike as g,isMakaioExtensionLike as _,isMissingOptionalRuntimePackage as v,isWithinDirectory as y,loadExtensions as b,loadOrCreateMachineIdentity as x,machineKeysExist as S,registerAdapterNameResolver as C,resolveConventionEntrypoint as w,resolveStaticModelRegistryPath as T,runMigrations as E,tryImport as D,validateMachineKeys as O}from"@makaio/framework/runtime-node";import{isIP as k}from"node:net";var A=class{raw;eventListeners={message:new Set,close:new Set,error:new Set,open:new Set};constructor(e){this.raw=e}get readyState(){return this.raw.readyState}send(e){if(typeof e==`string`){this.raw.send(e);return}if(e instanceof Blob){e.arrayBuffer().then(e=>{this.raw.readyState===1&&this.raw.send(new Uint8Array(e))}).catch(()=>{this.dispatchError()});return}if(e instanceof ArrayBuffer){this.raw.send(new Uint8Array(e));return}ArrayBuffer.isView(e)&&this.raw.send(e)}close(e,t){this.raw.close(e,t)}addEventListener(e,t){this.eventListeners[e]?.add(t)}removeEventListener(e,t){this.eventListeners[e]?.delete(t)}dispatchMessage(e){let t=new MessageEvent(`message`,{data:e});for(let e of this.eventListeners.message)e(t)}dispatchClose(e,n){let r=t(e,n);for(let e of this.eventListeners.close)e(r)}dispatchError(){let e=new Event(`error`);for(let t of this.eventListeners.error)t(e)}},j=class{options;bridge;busServer=null;busReady=!1;connecting=!1;constructor(e){this.options=e,this.bridge=new n}get dispatchingAuth(){return this.options.auth instanceof e?this.options.auth:void 0}createWebSocketHandler(){let e=this.bridge,t=()=>this.busReady,n=new WeakMap;return{binaryType:`arraybuffer`,open(r){if(!t()){r.close(1013,`Bus server not ready`);return}let i=new A(r);n.set(r,i),e.accept(i)},message(e,t){n.get(e)?.dispatchMessage(t)},close(e,t,r){n.get(e)?.dispatchClose(t,r),n.delete(e)}}}async connect(e,t){if(this.connecting||this.busServer)throw Error(`[BunBusServerTransport] connect() called while transport is already connected or connecting`);this.connecting=!0;try{this.busServer=await r({websocket:this.bridge,bus:e,auth:this.options.auth,loopbackName:this.options.loopbackName??`bun`}),this.busReady=!0}catch(e){throw await this.stopBusServer(`startup error`),e}finally{this.connecting=!1}}async disconnect(){await this.stopBusServer(`shutdown`),this.bridge.close()}async stopBusServer(e){this.busReady=!1,this.busServer&&=(await this.busServer.stop().catch(t=>{console.error(`[BunBusServerTransport] Failed to stop bus server during ${e}:`,t)}),null)}};function M(e){if(e.headers.get(`upgrade`)?.toLowerCase()!==`websocket`)return!1;let{pathname:t}=new URL(e.url);return t===`/bus`?!0:t===`/`&&e.headers.get(`origin`)===null}function te(e){return(t,n)=>M(t)?n.upgrade(t)?void 0:new Response(`WebSocket upgrade failed`,{status:426,headers:{Upgrade:`websocket`}}):e.fetch(t)}function N(e){return e.port}async function P(e){let{port:t,hostname:n}=e.bunServer,r=e.createMount??(await import(`../create-static-mount-CmQgA0jq.mjs`)).defaultCreateMount;return f(e.transport,t,n,{...e,createMount:r})}function F(e,t){let n=e,r=t;return{fetch(e,t){return n(e,t)},websocket:{binaryType:t.binaryType,open(e){r.open(e)},message(e,t){r.message(e,t)},close(e,t,n){r.close(e,t,n)}},activate(i){n=R(e,i),r=z(t,i)}}}function I(e){let t=[];return e.forEachActiveExtension((e,n)=>{B(n)&&t.push(n)}),t}function L(e){return Array.isArray(e)?e.flatMap(e=>L(e)):B(e)?[e]:[]}function R(e,t){return t.reduce((e,t)=>t.bun.createFetch?.(e)??e,e)}function z(e,t){return t.reduce((e,t)=>t.bun.createWebSocketHandler?.(e)??e,e)}function B(e){if(!H(e))return!1;let t=e.bun;return typeof e.name==`string`&&typeof e.displayName==`string`&&V(t)}function V(e){if(!H(e))return!1;let t=e.createFetch,n=e.createWebSocketHandler;return(t===void 0||typeof t==`function`)&&(n===void 0||typeof n==`function`)}function H(e){return typeof e==`object`&&!!e}function U(e){let t=e.timeoutMs??1e4,n=e.exit??(e=>process.exit(e)),r=!1;return async i=>{if(r)return;r=!0,console.info(`[${e.label}] ${i} received, shutting down...`);let a=setTimeout(()=>{console.error(`[${e.label}] Graceful shutdown timed out, forcing exit`),n(1)},t);try{process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutting down runtime...`),await e.runtime.shutdown(),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Stopping Bun server...`),W(e.bunServer,e.label),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutdown complete`),clearTimeout(a),n(0)}catch(t){W(e.bunServer,e.label),clearTimeout(a),console.error(`[${e.label}] Shutdown error:`,t),n(1)}}}function W(e,t){let n=e.stop?.(!0);G(n)&&n.catch(e=>{console.warn(`[${t}] Bun server stop failed during shutdown:`,e)})}function G(e){return typeof e==`object`&&!!e&&typeof e.catch==`function`}const K=/^(?=.{1,253}$)(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;function q(e){let t=e.env??process.env,n=e.defaultPort??3e3,r=e.defaultHost??`0.0.0.0`;return{port:J(t.PORT,n,e),host:Y(t.HOST,r,e)}}function J(e,t,n){let r=e?.trim(),i=r&&/^\d+$/.test(r)?Number.parseInt(r,10):NaN;return Number.isInteger(i)&&i>=1&&i<=65535?i:e===void 0?t:Z(`Invalid PORT: ${e}`,t,n)}function Y(e,t,n){let r=e?.trim();return r&&X(r)?r:e===void 0?t:Q(`Invalid HOST: ${e}`,t,n)}function X(e){return k(e)!==0||e===`localhost`||K.test(e)}function Z(e,t,n){return $(e,String(t),n),t}function Q(e,t,n){return $(e,t,n),t}function $(e,t,n){if((n.invalid??`throw`)===`throw`)throw Error(e);console.warn(`[${n.appName}] ${e}, falling back to ${t}`)}export{j as BunBusServerTransportProvider,i as ExplicitDescriptorDiscovery,a as FileConfigStorage,o as FileRegistryCache,s as FilesystemDescriptorDiscovery,c as MergedDescriptorDiscovery,l as NodeCredentialProvider,u as StoredCredentialProvider,P as bootMakaioRuntime,d as bootMakaioRuntimeCore,ee as bridgeExtensionBrowserEntries,I as collectActiveBunHostPackages,R as composeBunHostFetch,z as composeBunHostWebSocket,F as createBunHostRouter,te as createBunRouteGraphFetch,U as createGracefulShutdown,p as createHonoRouteGraph,m as createHttpRouteGraphBuilder,h as entrypointStem,g as isCliContributionLike,_ as isMakaioExtensionLike,v as isMissingOptionalRuntimePackage,y as isWithinDirectory,b as loadExtensions,x as loadOrCreateMachineIdentity,S as machineKeysExist,L as normalizeBunHostPackages,q as readBunServerEnv,C as registerAdapterNameResolver,w as resolveConventionEntrypoint,N as resolveListeningPort,T as resolveStaticModelRegistryPath,E as runMigrations,D as tryImport,O as validateMachineKeys};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as CODE_EXECUTION_DEFAULT_MAX_PROGRAM_FILES, c as CODE_EXECUTION_DEFAULT_MAX_SOURCE_BYTES, d as PiscinaCodeExecutionProviderOptions, i as CODE_EXECUTION_DEFAULT_MAX_INVOCATIONS_PER_WORKER, n as CODE_EXECUTION_DEFAULT_MAX_ARGUMENT_BYTES, o as CODE_EXECUTION_DEFAULT_MAX_QUEUED_INVOCATIONS, r as CODE_EXECUTION_DEFAULT_MAX_CONCURRENCY, s as CODE_EXECUTION_DEFAULT_MAX_RESULT_BYTES, t as CODE_EXECUTION_DEFAULT_IDLE_TIMEOUT_MS } from "../../types-
|
|
2
|
-
import { t as PiscinaCodeExecutionProvider } from "../../index-
|
|
1
|
+
import { a as CODE_EXECUTION_DEFAULT_MAX_PROGRAM_FILES, c as CODE_EXECUTION_DEFAULT_MAX_SOURCE_BYTES, d as PiscinaCodeExecutionProviderOptions, i as CODE_EXECUTION_DEFAULT_MAX_INVOCATIONS_PER_WORKER, n as CODE_EXECUTION_DEFAULT_MAX_ARGUMENT_BYTES, o as CODE_EXECUTION_DEFAULT_MAX_QUEUED_INVOCATIONS, r as CODE_EXECUTION_DEFAULT_MAX_CONCURRENCY, s as CODE_EXECUTION_DEFAULT_MAX_RESULT_BYTES, t as CODE_EXECUTION_DEFAULT_IDLE_TIMEOUT_MS } from "../../types-BFeWU3WM.mjs";
|
|
2
|
+
import { t as PiscinaCodeExecutionProvider } from "../../index-BwccWakG.mjs";
|
|
3
3
|
export { CODE_EXECUTION_DEFAULT_IDLE_TIMEOUT_MS, CODE_EXECUTION_DEFAULT_MAX_ARGUMENT_BYTES, CODE_EXECUTION_DEFAULT_MAX_CONCURRENCY, CODE_EXECUTION_DEFAULT_MAX_INVOCATIONS_PER_WORKER, CODE_EXECUTION_DEFAULT_MAX_PROGRAM_FILES, CODE_EXECUTION_DEFAULT_MAX_QUEUED_INVOCATIONS, CODE_EXECUTION_DEFAULT_MAX_RESULT_BYTES, CODE_EXECUTION_DEFAULT_MAX_SOURCE_BYTES, PiscinaCodeExecutionProvider, PiscinaCodeExecutionProviderOptions };
|