@makaio/framework 1.0.0-dev-1784889676396 → 1.0.0-dev-1785344643235
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 +3 -2
- package/dist/{account-identity-CP4DC0DL.mjs → account-identity-DFx8pwKL.mjs} +1 -1
- package/dist/{adapter-CYobxqN_.mjs → adapter-D5c5LrPN.mjs} +1 -1
- package/dist/adapters/claude/index.d.mts +204 -27
- package/dist/adapters/claude/index.mjs +3 -3
- package/dist/adapters/config/index.d.mts +2 -2
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +49 -4
- package/dist/adapters/index.mjs +3 -3
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/{artifact-DCkizHkS.mjs → artifact-DGiXqb11.mjs} +1 -1
- package/dist/attempt-record-codec-CqO1_XnE.mjs +1 -0
- package/dist/{auth-C3NOWqTU.mjs → auth-DGEdiHF6.mjs} +1 -1
- package/dist/authority-state-bootstrap-GPL_tqaT.mjs +1 -0
- package/dist/bus/index.mjs +1 -1
- package/dist/{canonical-model-EMRYCVjX.mjs → canonical-model-BAytQ4NV.mjs} +1 -1
- package/dist/capabilities-BQEp34ir.mjs +1 -0
- package/dist/{client-OYk0Ttck.mjs → client-DbS847wW.mjs} +1 -1
- package/dist/clients/index.d.mts +5 -3
- package/dist/clients/index.mjs +1 -1
- package/dist/clients/managed-install.d.mts +1 -1
- package/dist/clients/managed-install.mjs +1 -1
- package/dist/{compression-CZ_6fYq8.mjs → compression-74fFeBha.mjs} +1 -1
- package/dist/{config-namespace-DTA6EQL8.mjs → config-namespace-TVX-hG4I.mjs} +1 -1
- package/dist/{context-resolution-B9ANWbG0.d.mts → context-resolution-BQBk4Ish.d.mts} +6 -4
- 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 +2 -2
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/auth/index.d.mts +2 -2
- package/dist/contracts/auth/index.mjs +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/capabilities/index.d.mts +2 -0
- package/dist/contracts/capabilities/index.mjs +1 -0
- 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 +24 -2
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +4 -4
- 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 +1682 -9431
- 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 +2 -2
- package/dist/contracts/provider/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +2 -2
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +2 -2
- package/dist/contracts/shared/index.mjs +1 -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/timeout/index.mjs +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/worker-node/index.d.mts +2 -0
- package/dist/contracts/worker-node/index.mjs +1 -0
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{definition-K3m51lgO.mjs → definition-CJfiv8xm.mjs} +1 -1
- package/dist/{detached-extension-handle-BsywhHfk.mjs → detached-extension-handle-Ddfquy5_.mjs} +1 -1
- package/dist/drizzle/0030_remote-worker-execution.sql +6 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/execution-attempt-repository-DWXKY41_.d.mts +1056 -0
- package/dist/execution-target-Cf645pDj.mjs +1 -0
- package/dist/{extension-Cgg45Xk1.mjs → extension-DCA4pYrY.mjs} +1 -1
- package/dist/extension-hjOPs10e.mjs +1 -0
- package/dist/{filesystem-service-Cupz_Z7S.mjs → filesystem-service-DlP2HfDg.mjs} +1 -1
- package/dist/framework-packages-C3RWfJDk.mjs +1 -0
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-DWp7V-P2.mjs → globby-1yCVCk8s.mjs} +1 -1
- package/dist/{handlers-cMBmexF4.mjs → handlers-CfnLyLfE.mjs} +1 -1
- package/dist/{harness-DflvHAGV.mjs → harness-DpwsFsE7.mjs} +1 -1
- package/dist/{index-BhXCCgJV2.d.mts → index-4fE_hUP02.d.mts} +1 -1
- package/dist/{index-BMx59xb7.d.mts → index-8gKx-OVP.d.mts} +13 -7
- package/dist/index-B0Kf_OWi.d.mts +267 -0
- package/dist/{index-DRiTICBU.d.mts → index-BAXkicoQ.d.mts} +1 -1
- package/dist/{index-CnXXq6sW.d.mts → index-BC79QrGC.d.mts} +10 -10
- package/dist/{index-CvmWRumB.d.mts → index-BQLUVXIB.d.mts} +1024 -888
- package/dist/{index-CKO9S6oo.d.mts → index-BXD3kEs_.d.mts} +28 -10
- package/dist/{index-DUf47Jn_.d.mts → index-BskPjMet.d.mts} +8 -8
- package/dist/{index-CjyfQ_vQ.d.mts → index-CL-0NeQW.d.mts} +8 -5
- package/dist/{index-Cw7_69gV.d.mts → index-CRvpVIqA.d.mts} +1 -1
- package/dist/{index-7FjcxGlK.d.mts → index-CUvNKYkV.d.mts} +1 -1
- package/dist/{index-CtUTCAJ6.d.mts → index-CVaRZoiu.d.mts} +4 -4
- package/dist/{index-Cw84_Dqi.d.mts → index-CnMu8BQl.d.mts} +4 -4
- package/dist/{index-DaMfTvfz.d.mts → index-DA9g2A5P.d.mts} +1 -1
- package/dist/{index-Bi5jFT9S.d.mts → index-DJAmSnuh.d.mts} +12 -12
- package/dist/{index-pjATMrvJ.d.mts → index-DkiTJM5p.d.mts} +693 -31
- package/dist/{index-jbgHR5J2.d.mts → index-GHASUiem.d.mts} +1 -1
- package/dist/{index-BDDbcWNI.d.mts → index-HsTxm-R3.d.mts} +3 -3
- package/dist/{index-Bs3CXR232.d.mts → index-I5YG-qrb2.d.mts} +6 -6
- package/dist/{index-0Ju2i8gV.d.mts → index-SsBHjUqA.d.mts} +204 -165
- package/dist/index-XZyMxxnU.d.mts +1602 -0
- package/dist/{index-dkvGHN10.d.mts → index-brqfk9JQ.d.mts} +6 -6
- package/dist/{index-D43lQCHs.d.mts → index-q0Tiqems.d.mts} +131 -131
- package/dist/index-w_FmghjT.d.mts +7295 -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 +14 -8
- 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-BeMM738r.mjs → lib-C7-s68uf.mjs} +1 -1
- package/dist/{lib-B7TpTzkG.mjs → lib-DErgth_E.mjs} +2 -2
- package/dist/{load-extensions-BLdG90Zi.d.mts → load-extensions-BxsDB87B.d.mts} +1 -1
- package/dist/{load-extensions-CUmFCcYi.mjs → load-extensions-D0DfjYLC.mjs} +1 -1
- package/dist/{materialization-s8eR1eQ4.mjs → materialization-Jd198K3y.mjs} +1 -1
- package/dist/mcp-http-server/index.d.mts +305 -79
- package/dist/mcp-http-server/index.mjs +4 -4
- package/dist/model-BGgVmRnN.mjs +1 -0
- package/dist/modes-BheyN7SS.mjs +1 -0
- package/dist/{namespace-DwQtzlY-.mjs → namespace-BqxtpNAn.mjs} +1 -1
- package/dist/{namespace-BHliaabz.d.mts → namespace-DBm9K23m.d.mts} +6 -6
- package/dist/{namespace-zOfq1Uhn.d.mts → namespace-DI4Yx_xu.d.mts} +27 -27
- package/dist/namespace-DJfUADSV.mjs +1 -0
- package/dist/{namespace-BphMM6S82.d.mts → namespace-DPgxPa8m2.d.mts} +1 -1
- package/dist/{namespace-Bd49QmzS.d.mts → namespace-DWCEo-9M.d.mts} +0 -60
- package/dist/{namespace-CriPb5wY.d.mts → namespace-jPUGV-b2.d.mts} +42 -42
- package/dist/{native-session-supervisor-Bgz-Q1WH.mjs → native-session-supervisor-DRx0MX-d.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/node/transports/index.d.mts +81 -9
- package/dist/node/transports/index.mjs +2 -2
- package/dist/{orchestrator-shared-CY7Tu7kZ.mjs → orchestrator-shared-BxmHCPvx.mjs} +1 -1
- package/dist/package-CNUPPcU1.mjs +7 -0
- package/dist/package-DWMxGfzK.d.mts +827 -0
- package/dist/{package-DKnzOvoR.mjs → package-Dft_RItb.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/{packages-zDnokBpl.mjs → packages-DtEEP0Vt.mjs} +1 -1
- package/dist/{profile-BRi6K6am.mjs → profile-BTAI31Nt.mjs} +1 -1
- package/dist/{provider-context-DOsjOjiR.mjs → provider-context-Dq53Cgzz.mjs} +1 -1
- package/dist/{provider-context-BYkMl--1.mjs → provider-context-PZIQWcqQ.mjs} +1 -1
- package/dist/provider-operation-Cxoe2SUr.d.mts +207 -0
- package/dist/providers/index.mjs +1 -1
- package/dist/{registry-Dw6l7k3e.mjs → registry-wfF2uTty.mjs} +29 -29
- package/dist/{resolved-O2XXjTeu.mjs → resolved-DZgqql2Z.mjs} +1 -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 +4 -4
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/static/model-registry.yaml +348 -0
- 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 +7 -4
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-BO9TgmOs.d.mts → schema-Bwr_NrOS.d.mts} +2 -2
- package/dist/{schema-BI0aCHvV.mjs → schema-Dd-e89MO.mjs} +1 -1
- package/dist/{schemas-B5tMYfhC.d.mts → schemas-C4yUXs4G.d.mts} +4 -4
- package/dist/schemas-CRB2O5zo.mjs +1 -0
- package/dist/{schemas-Dgj3WaOI.mjs → schemas-Cm09dXL4.mjs} +1 -1
- package/dist/{schemas-BJ8VMXhO.mjs → schemas-DaHQzpgm.mjs} +1 -1
- package/dist/{schemas-BDC2Nqj1.d.mts → schemas-ENwK6jmV.d.mts} +14 -14
- package/dist/{schemas-ChF2z4RB.d.mts → schemas-N6x2z7Lf.d.mts} +0 -45
- package/dist/schemas-tDf_WiC8.mjs +1 -0
- package/dist/selection-BNwTKEVT.mjs +1 -0
- package/dist/service-base/index.d.mts +47 -2
- package/dist/service-base/index.mjs +1 -1
- 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 +3 -3
- 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 +7 -7
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +4 -4
- 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/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 +2 -2
- 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 +86 -371
- 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.d.mts +2 -2
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.d.mts +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/materialization/index.d.mts +1 -1
- package/dist/services/materialization/index.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/testing/index.mjs +1 -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.d.mts +14 -14
- 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/extension-configs/namespace.d.mts +3 -3
- 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/services/workflow-transitions/index.d.mts +2 -0
- package/dist/services/workflow-transitions/index.mjs +1 -0
- package/dist/{session-Carng3Yk.mjs → session-BOGCd18q.mjs} +1 -1
- package/dist/{session-idI1jk5X.mjs → session-BTFiDoGz.mjs} +1 -1
- package/dist/{session-lineage-Cte63dGx.d.mts → session-lineage-B_JW5LpF.d.mts} +1 -1
- package/dist/{shared-RP_KARKF.mjs → shared-BQ0CHIVy.mjs} +1 -1
- package/dist/{skill-CpNjWFuE.mjs → skill-BR6rkfLe.mjs} +1 -1
- package/dist/{src-XihJcAQS.mjs → src-DD0v-nIj.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 +50 -2
- 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/testing/drizzle-harness.d.mts +44 -3
- package/dist/testing/drizzle-harness.mjs +1 -1
- package/dist/{tool-approval-service-fIZ9x0kL.mjs → tool-approval-service-kBA0fRzm.mjs} +1 -1
- package/dist/tools-PdG9fO1M.mjs +1 -0
- package/dist/{transition-BodgGLZx.d.mts → transition-DuVzKt8-.d.mts} +3 -42
- package/dist/{types-LspCUW09.d.mts → types-B1MNcwgH.d.mts} +1 -1
- package/dist/{types-Bzxo7ATi.d.mts → types-BqVAOzJP.d.mts} +48 -48
- package/dist/{types-DBb5jY4Z.d.mts → types-CJ_QZ1yW.d.mts} +47 -3
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/index.mjs +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/utils/index.d.mts +18 -4
- package/dist/utils/index.mjs +1 -1
- package/dist/{version-BbWrAPld.mjs → version-CoCeMxDT.mjs} +1 -1
- package/dist/{view-builder-tU7iaxrk.d.mts → view-builder-CvoSL2oL.d.mts} +2 -1
- package/dist/visibility-qhGWmpSJ.mjs +1 -0
- package/dist/worker-node-Bl9_vqYi.mjs +1 -0
- package/dist/worker-node-DZTuT1DS.mjs +1 -0
- package/dist/workflow-BfDbgtIQ.mjs +1 -0
- package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -0
- package/dist/workflow-engine/execution-attempt-repository.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +619 -685
- 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 +2 -0
- package/dist/workflow-engine/provider-operation.mjs +1 -0
- package/dist/workflow-engine/testing/index.d.mts +146 -0
- package/dist/workflow-engine/testing/index.mjs +1 -0
- package/dist/workflow-engine/testing/sqlite.d.mts +22 -0
- package/dist/workflow-engine/testing/sqlite.mjs +130 -0
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-transitions-DSc45ixc.mjs +1 -0
- package/dist/workflow-worker-BN9XPxQO.mjs +1 -0
- package/package.json +20 -3
- package/dist/authority-state-bootstrap-C_-F_dtq.mjs +0 -1
- package/dist/execution-target-CsZXIvli.mjs +0 -1
- package/dist/extension-CjTu6mzW.mjs +0 -1
- package/dist/model-uE5IyUFJ.mjs +0 -1
- package/dist/namespace-C05pkLbN.mjs +0 -1
- package/dist/package-BSG1681x.d.mts +0 -427
- package/dist/package-DW1Upu8E.mjs +0 -7
- package/dist/schemas-BRxU_oqL.mjs +0 -1
- package/dist/schemas-C-J4W1ID.mjs +0 -1
- package/dist/selection-YRuVSdck.mjs +0 -1
- package/dist/tools-Cs2DwjCC.mjs +0 -1
- package/dist/visibility-Cb62p9bv.mjs +0 -1
- package/dist/workflow-BX-FxDb0.mjs +0 -1
- package/dist/workflow-worker-DR9qYOFc.mjs +0 -1
- /package/dist/{adapter-auth-runtime-DFBLXD5K.mjs → adapter-auth-runtime-DO-FVTXg.mjs} +0 -0
- /package/dist/{adapter-binding-Dfk_g-lP.d.mts → adapter-binding-DQchUtrK.d.mts} +0 -0
- /package/dist/{ajv-C8r45sFs.mjs → ajv-DD3SIL2i.mjs} +0 -0
- /package/dist/{attach-error-DCnzW-Yz.mjs → attach-error-C3tngg6J.mjs} +0 -0
- /package/dist/{await-trigger-UceeyCyi.mjs → await-trigger-I3lrepb8.mjs} +0 -0
- /package/dist/{base-orchestrator-5yH3l39s.d.mts → base-orchestrator-BilsQNW1.d.mts} +0 -0
- /package/dist/{capability-service-BzKBK0n2.mjs → capability-service-BqiLlRGA.mjs} +0 -0
- /package/dist/{client-DYEHDiJN.d.mts → client-B--e2qcU.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-C12PvQmz.d.mts → client-binary-version-verifier-CgjM_vGF.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-Dv7TGFxh.mjs → client-binary-version-verifier-taewmKTY.mjs} +0 -0
- /package/dist/{clients-namespace-DcFmhtLv.d.mts → clients-namespace-DfxjG2ZP.d.mts} +0 -0
- /package/dist/{config-namespace-DmP7NVju.d.mts → config-namespace-BCqvufbD.d.mts} +0 -0
- /package/dist/{create-static-mount-BLbqGmva.mjs → create-static-mount-bbQhTt6W.mjs} +0 -0
- /package/dist/{cross-spawn-BXxQUsPS.mjs → cross-spawn-B57KZuns.mjs} +0 -0
- /package/dist/{cursor-storage-DCj4uUxr.mjs → cursor-storage-DIFK_9hg.mjs} +0 -0
- /package/dist/{definition-BEvV7tbD.d.mts → definition-gnKgXU91.d.mts} +0 -0
- /package/dist/{definitions-C1pgx0Nq.mjs → definitions-xrrY0wgz.mjs} +0 -0
- /package/dist/{descriptor-to-package-VfB8lK5w.mjs → descriptor-to-package-DvF08krT.mjs} +0 -0
- /package/dist/{drizzle-oCH9H53q.mjs → drizzle-z_0SiGY8.mjs} +0 -0
- /package/dist/{esm-ClQELElL.mjs → esm-CltRnX8_.mjs} +0 -0
- /package/dist/{event-BOLVCfhH.mjs → event-CmVjR6Ib.mjs} +0 -0
- /package/dist/{extension-discovery-B6p3iZaV.d.mts → extension-discovery-CQRdbVQ6.d.mts} +0 -0
- /package/dist/{extension-namespace-vrh4ERXR.mjs → extension-namespace-Yu41YepM.mjs} +0 -0
- /package/dist/{facet-DqPBpqkl.mjs → facet-BCI00njh.mjs} +0 -0
- /package/dist/{filesystem-service-CGdboor3.d.mts → filesystem-service-CQ9yVkSz.d.mts} +0 -0
- /package/dist/{handler-GGOD_ofd.mjs → handler-Cbv9FqDO.mjs} +0 -0
- /package/dist/{hook-responses-Dg8wDvRo.d.mts → hook-responses-Dh1PWXqJ.d.mts} +0 -0
- /package/dist/{host-BfgdjlII.mjs → host-Caq6ZfSJ.mjs} +0 -0
- /package/dist/{identity-BmEHHoBw.mjs → identity-D6guMtmi.mjs} +0 -0
- /package/dist/{index-DEchpaya.d.mts → index-BIdsFcQs2.d.mts} +0 -0
- /package/dist/{index-DquI_1X5.d.mts → index-BVRQEpAg.d.mts} +0 -0
- /package/dist/{index-Brdc35b-.d.mts → index-BaZeoZoS.d.mts} +0 -0
- /package/dist/{index-BSmwpgkR.d.mts → index-ByKi34v5.d.mts} +0 -0
- /package/dist/{index-oYGf2zIe.d.mts → index-CGZQVTid.d.mts} +0 -0
- /package/dist/{index-Chy9aknK.d.mts → index-CMJZ2Z8m.d.mts} +0 -0
- /package/dist/{index-Bd1GC1kU2.d.mts → index-CjdRdsd0.d.mts} +0 -0
- /package/dist/{index-DYUxNOIX.d.mts → index-Cv-o5Krs.d.mts} +0 -0
- /package/dist/{index-DC0yVsYL.d.mts → index-DN4NOCqN2.d.mts} +0 -0
- /package/dist/{index-CcsJnJOD.d.mts → index-DR40QWlw.d.mts} +0 -0
- /package/dist/{index-BG9-vQHD.d.mts → index-DZunhZec.d.mts} +0 -0
- /package/dist/{index-BsBvs0aK.d.mts → index-DjgLchuQ.d.mts} +0 -0
- /package/dist/{index-pgYFJ5h6.d.mts → index-Dm1nUxCF.d.mts} +0 -0
- /package/dist/{index-C96LlS5m.d.mts → index-Ds5_rDEJ.d.mts} +0 -0
- /package/dist/{index-GYZs75UP.d.mts → index-dtsLKOID.d.mts} +0 -0
- /package/dist/{index-8fJ6dkzR.d.mts → index-gUhidukN.d.mts} +0 -0
- /package/dist/{index-BgpYhR2z.d.mts → index-jTaAHsul.d.mts} +0 -0
- /package/dist/{index-Ci3_i-WC2.d.mts → index-sS6KUlrx.d.mts} +0 -0
- /package/dist/{index-CFeY8lfU.d.mts → index-vA--0lOM.d.mts} +0 -0
- /package/dist/{index-BUYyZm5I.d.mts → index-vcSj12YQ.d.mts} +0 -0
- /package/dist/{index-CdEhEXlY.d.mts → index-ye0oklfU.d.mts} +0 -0
- /package/dist/{json-value-BwVdTylT.d.mts → json-value-Brslhqbm.d.mts} +0 -0
- /package/dist/{jsonl-transport-D8RBF0dK.mjs → jsonl-transport-bQl3JwIu.mjs} +0 -0
- /package/dist/{lib-3_xcE8J-.mjs → lib-DOBXZmYX.mjs} +0 -0
- /package/dist/{model-registry-CoegIvks.mjs → model-registry-CmgcPDH3.mjs} +0 -0
- /package/dist/{model-registry-BneK5SGo.mjs → model-registry-xyBKSye-.mjs} +0 -0
- /package/dist/{namespace-CDO4rY11.mjs → namespace-B8uKAzWJ.mjs} +0 -0
- /package/dist/{namespace-BsF9IxJ9.d.mts → namespace-BOkKoq34.d.mts} +0 -0
- /package/dist/{namespace-SQAGytmu.d.mts → namespace-Blp4c8GK.d.mts} +0 -0
- /package/dist/{namespace-BeED_Ojz.mjs → namespace-C-9si-fV.mjs} +0 -0
- /package/dist/{namespace-De9Mg3zv.d.mts → namespace-CErHuXtb.d.mts} +0 -0
- /package/dist/{namespace-BHj13hbA.mjs → namespace-CWGKCNZm.mjs} +0 -0
- /package/dist/{namespace-D7pE2QWv.mjs → namespace-CWUDFGOy.mjs} +0 -0
- /package/dist/{namespace-D9HNjIdc.d.mts → namespace-Cv1RFP7n.d.mts} +0 -0
- /package/dist/{namespace-CI313bRv.d.mts → namespace-Dkod-w11.d.mts} +0 -0
- /package/dist/{namespace-lWlqWTKu.d.mts → namespace-GPA7zots.d.mts} +0 -0
- /package/dist/{namespace-DWwWnLBu.mjs → namespace-HO2J9sO8.mjs} +0 -0
- /package/dist/{namespace-C238RqwB.mjs → namespace-YxU1xf-K.mjs} +0 -0
- /package/dist/{namespace-BetqZA7Z.d.mts → namespace-YytVKIgI.d.mts} +0 -0
- /package/dist/{namespace-B9CYb9Gh.d.mts → namespace-jDhZjw-i.d.mts} +0 -0
- /package/dist/{namespace-BSXHdCVh2.d.mts → namespace-tGRAod3o.d.mts} +0 -0
- /package/dist/{orchestrator-shared-BB6j8ezL.d.mts → orchestrator-shared-BHCv-l2O.d.mts} +0 -0
- /package/dist/{out-CFkI17mk.mjs → out-CvjtANXN.mjs} +0 -0
- /package/dist/{packages-DeIgn0Hn.d.mts → packages-BZ6pzFIq.d.mts} +0 -0
- /package/dist/{platform-CWhGFQFX.mjs → platform-Bv8llU9c.mjs} +0 -0
- /package/dist/{providers-CUnrif24.mjs → providers-Co5UszRH.mjs} +0 -0
- /package/dist/{providers-namespace-sPbGcZ6I.d.mts → providers-namespace-DjFkmvBR.d.mts} +0 -0
- /package/dist/{quick-lru-CTBjxfgD.mjs → quick-lru-CrOpWwrf.mjs} +0 -0
- /package/dist/{schema-cus0dJ81.mjs → schema-Db-y-09L.mjs} +0 -0
- /package/dist/{schema-introspection-BsWLmoFp.mjs → schema-introspection-DgWQCpwx.mjs} +0 -0
- /package/dist/{schemas-DYvvMd3c.d.mts → schemas-B1NWNASS.d.mts} +0 -0
- /package/dist/{schemas-CMyv7l7-.mjs → schemas-BGExwp3j.mjs} +0 -0
- /package/dist/{schemas-Dmij0PIc.d.mts → schemas-BO7uOum6.d.mts} +0 -0
- /package/dist/{schemas-BGS9RfqV.mjs → schemas-Bfxskx_2.mjs} +0 -0
- /package/dist/{schemas-BKKpQC4X2.d.mts → schemas-BtZqovRH.d.mts} +0 -0
- /package/dist/{schemas-BAvt2HDy.d.mts → schemas-CQyRBqD6.d.mts} +0 -0
- /package/dist/{schemas-D55eXBgl.d.mts → schemas-CR8hSqTy.d.mts} +0 -0
- /package/dist/{schemas-CWxf_Yut.mjs → schemas-CqRm0i9a.mjs} +0 -0
- /package/dist/{schemas-CiWCNQ9a2.d.mts → schemas-CwbYk_kZ.d.mts} +0 -0
- /package/dist/{schemas-CbMWN9-z.d.mts → schemas-DuIlOWR3.d.mts} +0 -0
- /package/dist/{schemas-B4FyOOJj.d.mts → schemas-miYxK_Z1.d.mts} +0 -0
- /package/dist/{semver-D3Y7uMEb.mjs → semver-DlM8znk4.mjs} +0 -0
- /package/dist/{server-lifecycle-C-3OgoKi.d.mts → server-lifecycle-Dsq56aqC.d.mts} +0 -0
- /package/dist/{server-lifecycle-DV6NMsgH.mjs → server-lifecycle-kmQ5PUDv.mjs} +0 -0
- /package/dist/{shared-schemas-BNCPgGYP.mjs → shared-schemas-DXwyMCwZ.mjs} +0 -0
- /package/dist/{src-ftBp6GpR.mjs → src-CCu8TwL6.mjs} +0 -0
- /package/dist/{storage-namespace-B1GI4elv.mjs → storage-namespace-BSrv0vXR.mjs} +0 -0
- /package/dist/{storage-namespace-definition-V8sc3drq.d.mts → storage-namespace-definition-BvlX0QV_.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-4UYuij1r.mjs → storage-namespace-definition-CkMKt7-I.mjs} +0 -0
- /package/dist/{storage-namespace-9N9R61pI.d.mts → storage-namespace-dfywhXR3.d.mts} +0 -0
- /package/dist/{supports-color-DwW9N6YC.mjs → supports-color-DUugCQsK.mjs} +0 -0
- /package/dist/{telemetry-B42EMbZt.mjs → telemetry-Pr3oP2rk.mjs} +0 -0
- /package/dist/{timeout-CvONPl0l.mjs → timeout-DWDhddRJ.mjs} +0 -0
- /package/dist/{tray-menu-service-Dgedanv-.mjs → tray-menu-service-BBLa-Rcv.mjs} +0 -0
- /package/dist/{types-DkFvBdIY.d.mts → types-BrcjaNPZ.d.mts} +0 -0
- /package/dist/{types-DVLq657Y.d.mts → types-DHmPneIO.d.mts} +0 -0
- /package/dist/{types-Bju4dmAg.d.mts → types-b54n1o57.d.mts} +0 -0
- /package/dist/{ui-config-B2L3Xgqo.mjs → ui-config-CyCdlns_.mjs} +0 -0
- /package/dist/{variant-ByI-RZua.mjs → variant-krjlTdJt.mjs} +0 -0
- /package/dist/{window-registry-Qcnvlhp7.d.mts → window-registry-BDnZLPVx.d.mts} +0 -0
- /package/dist/{window-registry-DsWnCc8z.mjs → window-registry-I-imZHV_.mjs} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as ExtensionDiscovery } from "./extension-discovery-
|
|
1
|
+
import { r as ExtensionDiscovery } from "./extension-discovery-CQRdbVQ6.mjs";
|
|
2
2
|
import { RegistrableBusNamespaceDefinition } from "@makaio/framework/core";
|
|
3
3
|
import { BusTransport, IMakaioBus, SubjectTelemetryProjectorRegistry } from "@makaio/framework/bus";
|
|
4
|
-
import { ExtensionConfigProvider, IWorkerNodeProvider, IWorkflowRunner, IWorkflowRunner as IWorkflowRunner$1, LoopGateHandler, NormalizedWorkerNodeCapabilities, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, TrayManifest, WorkerContributionManifest, WorkerNodeCapabilities, WorkerNodeDispatch,
|
|
4
|
+
import { ExtensionConfigProvider, IWorkerNodeProvider, IWorkflowRunner, IWorkflowRunner as IWorkflowRunner$1, LoopGateHandler, NormalizedWorkerNodeCapabilities, OutcomeAckDecision, StationHandler, StepRunnerBusAuth, StepRunnerPlatformDefaults, TrayManifest, WorkerBootstrapClaimResponse, WorkerContributionManifest, WorkerContributionRef, WorkerMaterializationSpec, WorkerNodeAllocatedOutcome, WorkerNodeCapabilities, WorkerNodeDispatch, WorkerNodeProvisionRequest, WorkerNodeRequirements, WorkerRuntimeContext, WorkflowDefinition, WorkflowRunContext, WorkflowRunResult, WorkflowRunResult as WorkflowRunResult$1, WorkflowRunnerCompletion, WorkflowRunnerCompletion as WorkflowRunnerCompletion$1, WorkflowRunnerRunOptions, WorkflowWorkerConfig, WorkflowWorkerSource, WorkflowZodSchemas } from "@makaio/framework/contracts";
|
|
5
5
|
import { DispatchingAuth, TransportAuth } from "@makaio/framework/node/transports";
|
|
6
6
|
import { StorageEngine } from "@makaio/framework/storage/drizzle";
|
|
7
7
|
import { Toolset } from "@makaio/framework/tools";
|
|
@@ -13,6 +13,7 @@ import { IAdapterConfigRepository as IAdapterConfigRepository$1, PlatformDefault
|
|
|
13
13
|
import { PersistedMachineIdentity } from "@makaio/framework/node/machine-identity";
|
|
14
14
|
import { Hono } from "hono";
|
|
15
15
|
import { ConfigProvider } from "@makaio/framework/providers";
|
|
16
|
+
import { ExecutionAttemptAuthority, ExecutionAttemptRepository, WorkflowMaterializationSpecResolver } from "@makaio/framework/workflow-engine";
|
|
16
17
|
import { Server } from "node:http";
|
|
17
18
|
|
|
18
19
|
//#region runtimes/node/src/compose-adapter-runtime.d.ts
|
|
@@ -500,6 +501,190 @@ interface WorkflowWorkerEntryResolverOptions {
|
|
|
500
501
|
*/
|
|
501
502
|
declare function resolveWorkflowWorkerEntry(options: WorkflowWorkerEntryResolverOptions): string;
|
|
502
503
|
//#endregion
|
|
504
|
+
//#region runtimes/node/src/workflow-worker/local-directory-materializer.d.ts
|
|
505
|
+
/**
|
|
506
|
+
* Host-injected resolver that maps a portable `workspaceId` to an
|
|
507
|
+
* allowed local root directory.
|
|
508
|
+
*
|
|
509
|
+
* The framework never guesses workspace locations. Product code or the
|
|
510
|
+
* host process supplies a resolver that knows which workspace IDs map
|
|
511
|
+
* to which filesystem roots. The resolver must return an absolute path
|
|
512
|
+
* that the caller is allowed to use as a workspace root.
|
|
513
|
+
*
|
|
514
|
+
* Returning `undefined` indicates the workspace ID is unknown or not
|
|
515
|
+
* allowed on this Authority.
|
|
516
|
+
* @param workspaceId - Portable workspace identifier from the materialization spec.
|
|
517
|
+
* @returns Absolute path to the allowed workspace root, or `undefined`.
|
|
518
|
+
*/
|
|
519
|
+
type WorkspaceRootResolver = (workspaceId: string) => Promise<string | undefined>;
|
|
520
|
+
/**
|
|
521
|
+
* Error thrown when local-directory materialization fails a
|
|
522
|
+
* containment, digest, or contribution verification check.
|
|
523
|
+
*
|
|
524
|
+
* All materialization verification failures use this error type
|
|
525
|
+
* so callers can distinguish verification errors from I/O errors.
|
|
526
|
+
*/
|
|
527
|
+
declare class MaterializationError extends Error {
|
|
528
|
+
readonly code: 'unknown-workspace' | 'containment-violation' | 'symlink-escape' | 'unsupported-filesystem-entry' | 'digest-mismatch' | 'snapshot-id-mismatch' | 'source-path-mismatch' | 'source-missing' | 'contribution-missing' | 'contribution-integrity-mismatch' | 'contribution-version-mismatch' | 'contribution-entrypoint-mismatch' | 'unsupported-materialization-kind';
|
|
529
|
+
/**
|
|
530
|
+
* @param message - Human-readable description of the verification failure.
|
|
531
|
+
* @param code - Machine-readable failure code for structured handling.
|
|
532
|
+
*/
|
|
533
|
+
constructor(message: string, code: 'unknown-workspace' | 'containment-violation' | 'symlink-escape' | 'unsupported-filesystem-entry' | 'digest-mismatch' | 'snapshot-id-mismatch' | 'source-path-mismatch' | 'source-missing' | 'contribution-missing' | 'contribution-integrity-mismatch' | 'contribution-version-mismatch' | 'contribution-entrypoint-mismatch' | 'unsupported-materialization-kind');
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Verify that a resolved path stays within the allowed root directory.
|
|
537
|
+
*
|
|
538
|
+
* Both `resolvedPath` and `root` are compared after `path.resolve` so
|
|
539
|
+
* relative segments and trailing separators are normalized.
|
|
540
|
+
*
|
|
541
|
+
* Exported for reuse by product materializers (e.g. workspace-snapshot)
|
|
542
|
+
* that share the same containment invariants.
|
|
543
|
+
* @param resolvedPath - Absolute path to verify.
|
|
544
|
+
* @param root - Allowed root directory.
|
|
545
|
+
* @param label - Human-readable label for error messages.
|
|
546
|
+
* @throws {@link MaterializationError} with `containment-violation` when the path escapes the root.
|
|
547
|
+
*/
|
|
548
|
+
declare function assertContainedIn(resolvedPath: string, root: string, label: string): void;
|
|
549
|
+
/**
|
|
550
|
+
* Resolve a path and verify it does not escape the root via symlinks.
|
|
551
|
+
*
|
|
552
|
+
* Uses `fs.realpath` to follow all symbolic links, then checks that
|
|
553
|
+
* the real path is still within the allowed root.
|
|
554
|
+
*
|
|
555
|
+
* Exported for reuse by product materializers (e.g. workspace-snapshot)
|
|
556
|
+
* that share the same symlink-escape invariants.
|
|
557
|
+
* @param targetPath - Absolute path to verify (may contain symlinks).
|
|
558
|
+
* @param root - Allowed root directory.
|
|
559
|
+
* @param label - Human-readable label for error messages.
|
|
560
|
+
* @param preResolvedRoot - Optional pre-resolved real path of the root
|
|
561
|
+
* directory. When provided, skips the `fs.realpath(root)` call — useful
|
|
562
|
+
* when the caller already resolved the root once per materialization.
|
|
563
|
+
* @returns The real (symlink-resolved) absolute path.
|
|
564
|
+
* @throws {@link MaterializationError} with `symlink-escape` when symlinks lead outside the root.
|
|
565
|
+
*/
|
|
566
|
+
declare function assertNoSymlinkEscape(targetPath: string, root: string, label: string, preResolvedRoot?: string): Promise<string>;
|
|
567
|
+
/**
|
|
568
|
+
* Parsed SRI integrity string with algorithm and Base64-encoded digest.
|
|
569
|
+
*
|
|
570
|
+
* Exported for reuse by product materializers that need to verify
|
|
571
|
+
* contribution integrity.
|
|
572
|
+
*/
|
|
573
|
+
interface ParsedSriIntegrity {
|
|
574
|
+
/** Hash algorithm extracted from the SRI prefix (e.g. `sha384`). */
|
|
575
|
+
readonly algorithm: string;
|
|
576
|
+
/** Base64-encoded digest extracted from the SRI suffix. */
|
|
577
|
+
readonly digest: string;
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* Parse an SRI integrity string into its hash algorithm and expected digest.
|
|
581
|
+
*
|
|
582
|
+
* Exported for reuse by product materializers that need to verify
|
|
583
|
+
* contribution integrity outside the local-directory materializer.
|
|
584
|
+
* @param integrity - SRI-format integrity string (e.g. `sha384-abc123`).
|
|
585
|
+
* @returns Parsed algorithm and Base64-encoded digest.
|
|
586
|
+
*/
|
|
587
|
+
declare function parseSriIntegrity(integrity: string): ParsedSriIntegrity;
|
|
588
|
+
/**
|
|
589
|
+
* Compute an SRI-format integrity hash of a file's contents.
|
|
590
|
+
*
|
|
591
|
+
* Exported for reuse by product materializers and manifest resolvers
|
|
592
|
+
* that need to compute SRI integrity for contribution entrypoints.
|
|
593
|
+
* @param filePath - Absolute path to the file.
|
|
594
|
+
* @param algorithm - Hash algorithm (e.g. `sha384`).
|
|
595
|
+
* @returns Base64-encoded digest of the file contents.
|
|
596
|
+
*/
|
|
597
|
+
declare function computeFileDigest(filePath: string, algorithm: string): Promise<string>;
|
|
598
|
+
/**
|
|
599
|
+
* Compute an SRI digest for the complete installed contribution package.
|
|
600
|
+
*
|
|
601
|
+
* The digest covers every regular file beneath the package root, including
|
|
602
|
+
* package.json and transitive helper modules. Paths are sorted and framed
|
|
603
|
+
* with their contents to make the result deterministic across filesystem
|
|
604
|
+
* enumeration order. Nested node_modules, Git metadata, and .DS_Store are
|
|
605
|
+
* explicitly excluded because they are not part of the package artifact.
|
|
606
|
+
*
|
|
607
|
+
* Symbolic links are rejected rather than followed: following one could make
|
|
608
|
+
* the package identity depend on content outside its declared boundary.
|
|
609
|
+
* @param packageRoot - Absolute installed package directory.
|
|
610
|
+
* @param algorithm - Hash algorithm named by the SRI reference.
|
|
611
|
+
* @returns SRI-format digest of the complete contribution package contents.
|
|
612
|
+
* @throws MaterializationError when the package contains a symbolic link or
|
|
613
|
+
* unsupported filesystem entry.
|
|
614
|
+
*/
|
|
615
|
+
declare function computeContributionPackageDigest(packageRoot: string, algorithm: string): Promise<string>;
|
|
616
|
+
/**
|
|
617
|
+
* Compute an SRI-format integrity hash of a directory by hashing a
|
|
618
|
+
* deterministic representation of its contents.
|
|
619
|
+
*
|
|
620
|
+
* Walks the directory recursively, sorts entries by relative path,
|
|
621
|
+
* and feeds each file's content into the hash. This produces a
|
|
622
|
+
* stable, reproducible digest regardless of filesystem order. Git metadata
|
|
623
|
+
* and dependency directories are excluded, but every other entry must be a
|
|
624
|
+
* regular file or directory so no unverified filesystem object can affect
|
|
625
|
+
* workflow execution.
|
|
626
|
+
* @param dirPath - Absolute path to the directory.
|
|
627
|
+
* @param algorithm - Hash algorithm (e.g. `sha256`).
|
|
628
|
+
* @returns SRI-format integrity string (e.g. `sha256-abc123`).
|
|
629
|
+
*/
|
|
630
|
+
declare function computeDirectoryDigest(dirPath: string, algorithm?: string): Promise<string>;
|
|
631
|
+
/**
|
|
632
|
+
* Resolve a contribution package to an absolute entrypoint path within
|
|
633
|
+
* the workspace root and verify its identity, version, and integrity.
|
|
634
|
+
*
|
|
635
|
+
* Reads the contribution's `package.json` to verify package name and
|
|
636
|
+
* version, then computes the SRI hash of the complete package contents and
|
|
637
|
+
* compares it to the expected integrity.
|
|
638
|
+
*
|
|
639
|
+
* Exported for reuse by product materializers (e.g. workspace-snapshot)
|
|
640
|
+
* that need the same contribution verification pipeline.
|
|
641
|
+
* @param ref - Portable contribution reference.
|
|
642
|
+
* @param workspaceRoot - Absolute workspace root path.
|
|
643
|
+
* @param preResolvedRoot - Optional pre-resolved real path of the workspace
|
|
644
|
+
* root. When provided, skips redundant `fs.realpath` calls on the root —
|
|
645
|
+
* useful when the caller already resolved it once per materialization.
|
|
646
|
+
* @returns Absolute path to the verified entrypoint file.
|
|
647
|
+
* @throws {@link MaterializationError} on identity, version, entrypoint, or integrity mismatch.
|
|
648
|
+
*/
|
|
649
|
+
declare function verifyContribution(ref: WorkerContributionRef, workspaceRoot: string, preResolvedRoot?: string): Promise<string>;
|
|
650
|
+
/**
|
|
651
|
+
* Options for creating a local-directory materializer.
|
|
652
|
+
*/
|
|
653
|
+
interface LocalDirectoryMaterializerOptions {
|
|
654
|
+
/**
|
|
655
|
+
* Host-injected resolver that maps workspace IDs to allowed local roots.
|
|
656
|
+
*
|
|
657
|
+
* Framework code never guesses workspace locations. Product code supplies
|
|
658
|
+
* a resolver that knows which workspace IDs map to which filesystem
|
|
659
|
+
* roots for this Authority instance.
|
|
660
|
+
*/
|
|
661
|
+
readonly resolveWorkspaceRoot: WorkspaceRootResolver;
|
|
662
|
+
}
|
|
663
|
+
/**
|
|
664
|
+
* Materialize a `local-directory` spec into a verified {@link WorkerRuntimeContext}.
|
|
665
|
+
*
|
|
666
|
+
* Performs the following verification steps:
|
|
667
|
+
* 1. Resolve the workspace ID to an allowed local root via the injected resolver.
|
|
668
|
+
* 2. Verify the workspace root exists and is a directory.
|
|
669
|
+
* 3. Check that the source path is contained within the workspace root.
|
|
670
|
+
* 4. Verify no symlink escapes the workspace root.
|
|
671
|
+
* 5. Verify the workspace root digest matches the expected value.
|
|
672
|
+
* 6. Verify the source file exists.
|
|
673
|
+
* 7. For each contribution: verify package identity, version, entrypoint containment,
|
|
674
|
+
* and SRI integrity.
|
|
675
|
+
*
|
|
676
|
+
* This function is idempotent: calling it again with the same spec returns an
|
|
677
|
+
* equivalent context (or an error if the filesystem has changed).
|
|
678
|
+
* @param spec - Local-directory materialization spec from the run context.
|
|
679
|
+
* @param contributions - Portable contribution references to verify.
|
|
680
|
+
* @param options - Materializer options with the injected workspace root resolver.
|
|
681
|
+
* @returns Verified worker-local runtime context with absolute paths.
|
|
682
|
+
* @throws {@link MaterializationError} on any verification failure.
|
|
683
|
+
*/
|
|
684
|
+
declare function materializeLocalDirectory(spec: Extract<WorkerMaterializationSpec, {
|
|
685
|
+
kind: 'local-directory';
|
|
686
|
+
}>, contributions: readonly WorkerContributionRef[], options: LocalDirectoryMaterializerOptions): Promise<WorkerRuntimeContext>;
|
|
687
|
+
//#endregion
|
|
503
688
|
//#region runtimes/node/src/boot-types.d.ts
|
|
504
689
|
/** Dev-mode map from npm package name to absolute workspace package directory. */
|
|
505
690
|
type DevPortalMap = ReadonlyMap<string, string>;
|
|
@@ -534,7 +719,8 @@ type WorkflowRunnerBootOptions = {
|
|
|
534
719
|
/** Use the Node runtime's concrete in-process workflow runner. */readonly mode?: 'in-process';
|
|
535
720
|
} | {
|
|
536
721
|
/** Dispatch full workflow executions to a Piscina worker-thread pool. */readonly mode: 'piscina'; /** Contribution manifest loaded inside isolated workers. */
|
|
537
|
-
readonly manifest?: WorkerContributionManifest; /**
|
|
722
|
+
readonly manifest?: WorkerContributionManifest; /** Host-owned resolver for portable local-directory workspace IDs. */
|
|
723
|
+
readonly resolveWorkspaceRoot?: WorkspaceRootResolver; /** Explicit worker entry path. Overrides workerEntryMode resolution. */
|
|
538
724
|
readonly workerEntry?: string; /** Source/dist worker entry mode used when workerEntry is omitted. */
|
|
539
725
|
readonly workerEntryMode?: WorkflowWorkerEntryMode; /** Maximum concurrent worker threads. */
|
|
540
726
|
readonly maxConcurrency?: number; /** Idle timeout before worker threads are reaped. */
|
|
@@ -824,6 +1010,28 @@ interface CoreBootOptions {
|
|
|
824
1010
|
* that runs the workflow worker entry end-to-end.
|
|
825
1011
|
*/
|
|
826
1012
|
readonly workflowRunner?: WorkflowRunnerBootOptions;
|
|
1013
|
+
/**
|
|
1014
|
+
* Host-owned allowed-root resolver for local Piscina execution.
|
|
1015
|
+
*
|
|
1016
|
+
* This is intentionally a boot seam rather than persisted workflow state:
|
|
1017
|
+
* it maps the portable workspace ID to a directory that this host is
|
|
1018
|
+
* permitted to realize.
|
|
1019
|
+
*/
|
|
1020
|
+
readonly piscinaWorkspaceRootResolver?: WorkspaceRootResolver;
|
|
1021
|
+
/** Host-owned resolvers that create portable specs for path-backed workflow starts. */
|
|
1022
|
+
readonly workflowMaterializationSpecResolvers?: readonly WorkflowMaterializationSpecResolver[];
|
|
1023
|
+
/**
|
|
1024
|
+
* Injected execution attempt persistence port for WorkerNode dispatch.
|
|
1025
|
+
*
|
|
1026
|
+
* Required when `workflowRunner.mode` is `'worker-node'`. The consuming
|
|
1027
|
+
* Factory provides the concrete implementation that owns durable attempt
|
|
1028
|
+
* records and accept/duplicate/conflict/fence decisions.
|
|
1029
|
+
*
|
|
1030
|
+
* When omitted, framework-only, in-process, and Piscina modes operate
|
|
1031
|
+
* without attempt tracking. WorkerNode mode fails fast at boot when this
|
|
1032
|
+
* is not provided.
|
|
1033
|
+
*/
|
|
1034
|
+
readonly executionAttemptRepository?: ExecutionAttemptRepository;
|
|
827
1035
|
/**
|
|
828
1036
|
* Runtime data home for config, database, machine identity, and installed
|
|
829
1037
|
* extensions. Defaults to the `MAKAIO_HOME` environment override when set,
|
|
@@ -998,6 +1206,15 @@ interface MakaioRuntime {
|
|
|
998
1206
|
readonly coordinator: ExtensionCoordinator;
|
|
999
1207
|
/**
|
|
1000
1208
|
* Shut down all services in reverse startup order.
|
|
1209
|
+
*
|
|
1210
|
+
* Every step is attempted even when an earlier one fails, and the failures
|
|
1211
|
+
* are then reported together. A host that owns process termination must
|
|
1212
|
+
* treat the rejection as an unclean exit — something the runtime started is
|
|
1213
|
+
* still holding resources it could not release — rather than logging it and
|
|
1214
|
+
* exiting as if the drain had completed.
|
|
1215
|
+
* @returns Promise that settles once every step has been attempted, resolving
|
|
1216
|
+
* on success and rejecting with an AggregateError when any step fails.
|
|
1217
|
+
* @throws An AggregateError when any shutdown step failed.
|
|
1001
1218
|
*/
|
|
1002
1219
|
shutdown(): Promise<void>;
|
|
1003
1220
|
}
|
|
@@ -1033,6 +1250,14 @@ interface ThinWorkflowPiscinaRunnerOptions {
|
|
|
1033
1250
|
readonly workerEntry: string;
|
|
1034
1251
|
/** Contribution manifest declaring which extension packages to load in workers. */
|
|
1035
1252
|
readonly manifest: WorkerContributionManifest;
|
|
1253
|
+
/**
|
|
1254
|
+
* Host-owned resolver for portable local-directory workspace IDs.
|
|
1255
|
+
*
|
|
1256
|
+
* Required when a Piscina task has a path-backed source or declared worker
|
|
1257
|
+
* contributions. The runner realizes those portable references before it
|
|
1258
|
+
* transfers the task to a worker thread.
|
|
1259
|
+
*/
|
|
1260
|
+
readonly resolveWorkspaceRoot?: WorkspaceRootResolver;
|
|
1036
1261
|
/** Maximum concurrent worker threads. @defaultValue 4 */
|
|
1037
1262
|
readonly maxConcurrency?: number;
|
|
1038
1263
|
/** Idle timeout before threads are reaped (ms). @defaultValue 30000 */
|
|
@@ -1090,9 +1315,9 @@ declare class ThinWorkflowPiscinaRunner implements IWorkflowRunner$1 {
|
|
|
1090
1315
|
* @param config - Full workflow worker configuration with source, inputs, and bus info.
|
|
1091
1316
|
* @param signal - AbortSignal for cooperative cancellation.
|
|
1092
1317
|
* @param manifest - Optional per-call manifest override.
|
|
1093
|
-
* @returns
|
|
1318
|
+
* @returns Uncommitted completion; the host executor owns finalization.
|
|
1094
1319
|
*/
|
|
1095
|
-
run(config: WorkflowWorkerConfig, signal: AbortSignal, manifest?: WorkerContributionManifest): Promise<
|
|
1320
|
+
run(config: WorkflowWorkerConfig, signal: AbortSignal, manifest?: WorkerContributionManifest): Promise<WorkflowRunnerCompletion$1>;
|
|
1096
1321
|
/**
|
|
1097
1322
|
* Execute a workflow and expose the worker bus readiness signal separately.
|
|
1098
1323
|
*
|
|
@@ -1110,6 +1335,16 @@ declare class ThinWorkflowPiscinaRunner implements IWorkflowRunner$1 {
|
|
|
1110
1335
|
* Destroy the thread pool and release all worker threads.
|
|
1111
1336
|
*/
|
|
1112
1337
|
dispose(): Promise<void>;
|
|
1338
|
+
/**
|
|
1339
|
+
* Realize portable filesystem references before transferring a task to
|
|
1340
|
+
* Piscina. Worker threads receive only verified absolute paths, never an
|
|
1341
|
+
* Authority-relative source or unchecked contribution package path.
|
|
1342
|
+
* @param config - Portable worker configuration.
|
|
1343
|
+
* @param manifest - Exact contribution identities for this execution.
|
|
1344
|
+
* @param signal - Cancellation signal for the dispatch.
|
|
1345
|
+
* @returns A worker-thread task containing verified local paths.
|
|
1346
|
+
*/
|
|
1347
|
+
private materializeTask;
|
|
1113
1348
|
}
|
|
1114
1349
|
//#endregion
|
|
1115
1350
|
//#region runtimes/node/src/workflow-worker/node-workflow-runner-factory.d.ts
|
|
@@ -1133,6 +1368,16 @@ interface CreateNodeWorkflowRunnerPackageOptionsParams {
|
|
|
1133
1368
|
* dispatch function is supplied. Ignored for Piscina mode.
|
|
1134
1369
|
*/
|
|
1135
1370
|
readonly bus?: IMakaioBus;
|
|
1371
|
+
/**
|
|
1372
|
+
* Injected execution attempt persistence port.
|
|
1373
|
+
*
|
|
1374
|
+
* Required when `workflowRunner.mode` is `'worker-node'`. Threaded
|
|
1375
|
+
* through to the workflow engine service options so the Authority
|
|
1376
|
+
* service can delegate durable decisions.
|
|
1377
|
+
*/
|
|
1378
|
+
readonly executionAttemptRepository?: ExecutionAttemptRepository;
|
|
1379
|
+
/** Host-owned resolvers for portable path-backed workflow starts. */
|
|
1380
|
+
readonly workflowMaterializationSpecResolvers?: readonly WorkflowMaterializationSpecResolver[];
|
|
1136
1381
|
}
|
|
1137
1382
|
/** Workflow engine package options produced by Node runtime composition. */
|
|
1138
1383
|
interface NodeWorkflowRunnerPackageOptions {
|
|
@@ -1149,6 +1394,23 @@ interface NodeWorkflowRunnerPackageOptions {
|
|
|
1149
1394
|
readonly platformDefaults: StepRunnerPlatformDefaults; /** Makaio data-home path forwarded to workflow workers. */
|
|
1150
1395
|
readonly makaioHome?: string;
|
|
1151
1396
|
};
|
|
1397
|
+
/**
|
|
1398
|
+
* Injected execution attempt persistence port.
|
|
1399
|
+
*
|
|
1400
|
+
* Present only when the workflow runner uses WorkerNode dispatch mode.
|
|
1401
|
+
* Forwarded to the workflow engine service for Authority construction.
|
|
1402
|
+
*/
|
|
1403
|
+
readonly executionAttemptRepository?: ExecutionAttemptRepository;
|
|
1404
|
+
/**
|
|
1405
|
+
* Execution attempt Authority constructed from the injected repository.
|
|
1406
|
+
*
|
|
1407
|
+
* Present only when the workflow runner uses WorkerNode dispatch mode.
|
|
1408
|
+
* Shared between the runner (for attempt creation before dispatch) and
|
|
1409
|
+
* the workflow engine service (for outcome commitment).
|
|
1410
|
+
*/
|
|
1411
|
+
readonly executionAttemptAuthority?: ExecutionAttemptAuthority;
|
|
1412
|
+
/** Host-owned resolvers forwarded to the workflow engine service. */
|
|
1413
|
+
readonly workflowMaterializationSpecResolvers?: readonly WorkflowMaterializationSpecResolver[];
|
|
1152
1414
|
}
|
|
1153
1415
|
/**
|
|
1154
1416
|
* Compose workflow engine options for workflow-level execution.
|
|
@@ -1175,6 +1437,13 @@ interface CreateNodeWorkflowRunnerParams {
|
|
|
1175
1437
|
* function is supplied. Ignored for Piscina mode.
|
|
1176
1438
|
*/
|
|
1177
1439
|
readonly bus?: IMakaioBus;
|
|
1440
|
+
/**
|
|
1441
|
+
* Execution attempt Authority injected into WorkerNode runners.
|
|
1442
|
+
*
|
|
1443
|
+
* Required when `runner.mode` is `'worker-node'`. The runner uses this
|
|
1444
|
+
* to create attempts before dispatch and wait for committed outcomes.
|
|
1445
|
+
*/
|
|
1446
|
+
readonly authority?: ExecutionAttemptAuthority;
|
|
1178
1447
|
}
|
|
1179
1448
|
/**
|
|
1180
1449
|
* Create a workflow-level runner based on the Node runtime configuration.
|
|
@@ -1199,6 +1468,14 @@ interface WorkerNodeRunnerOptions {
|
|
|
1199
1468
|
* Framework code calls through this seam without coupling to any pool.
|
|
1200
1469
|
*/
|
|
1201
1470
|
readonly dispatch: WorkerNodeDispatch;
|
|
1471
|
+
/**
|
|
1472
|
+
* Execution attempt Authority used to create attempts before dispatch and
|
|
1473
|
+
* wait for committed outcomes after dispatch returns.
|
|
1474
|
+
*
|
|
1475
|
+
* Required for authority-committed completions. When absent, the runner
|
|
1476
|
+
* cannot create attempts or wait for durable outcomes.
|
|
1477
|
+
*/
|
|
1478
|
+
readonly authority: ExecutionAttemptAuthority;
|
|
1202
1479
|
/**
|
|
1203
1480
|
* Extension contribution manifest forwarded to dispatched workers.
|
|
1204
1481
|
*
|
|
@@ -1222,27 +1499,144 @@ interface WorkerNodeRunnerOptions {
|
|
|
1222
1499
|
* product-agnostic. Concrete dispatch behavior (e.g. pool selection, provider
|
|
1223
1500
|
* matching, manifest resolution) lives in the product-owned composition root
|
|
1224
1501
|
* or `workerPool.dispatch` handler, not here.
|
|
1502
|
+
*
|
|
1503
|
+
* The runner creates an execution attempt through the injected Authority
|
|
1504
|
+
* before dispatch and waits for the committed outcome after dispatch returns.
|
|
1225
1505
|
*/
|
|
1226
1506
|
declare class WorkerNodeRunner implements IWorkflowRunner {
|
|
1227
1507
|
private readonly options;
|
|
1228
1508
|
/**
|
|
1229
|
-
* @param options - Dispatch seam, optional manifest, and optional requirements.
|
|
1509
|
+
* @param options - Dispatch seam, authority, optional manifest, and optional requirements.
|
|
1230
1510
|
*/
|
|
1231
1511
|
constructor(options: WorkerNodeRunnerOptions);
|
|
1232
1512
|
/**
|
|
1233
1513
|
* Execute a complete workflow by delegating to the injected dispatch seam.
|
|
1234
1514
|
*
|
|
1515
|
+
* Creates an execution attempt through the Authority before dispatch. After
|
|
1516
|
+
* the dispatch completes (allocation acceptance), waits for the committed
|
|
1517
|
+
* outcome through the Authority's in-process waiter. Returns an
|
|
1518
|
+
* `authority-committed` completion so the host executor skips fallback
|
|
1519
|
+
* finalization.
|
|
1520
|
+
*
|
|
1235
1521
|
* When `manifest` is supplied it takes precedence over the manifest baked into
|
|
1236
1522
|
* the runner at construction time, enabling per-call contribution sets.
|
|
1237
1523
|
* @param config - Full workflow worker configuration including source, inputs, and bus info.
|
|
1238
1524
|
* @param signal - AbortSignal for cooperative cancellation forwarded to the dispatch function.
|
|
1239
1525
|
* @param manifest - Optional per-call contribution manifest. Overrides the runner's default.
|
|
1240
1526
|
* @param options - Optional per-run controls forwarded to dispatch-capable providers.
|
|
1241
|
-
* @returns
|
|
1527
|
+
* @returns Authority-committed completion after the outcome RPC converges.
|
|
1242
1528
|
*/
|
|
1243
|
-
run(config: WorkflowWorkerConfig, signal: AbortSignal, manifest?: WorkerContributionManifest, options?: WorkflowRunnerRunOptions): Promise<
|
|
1529
|
+
run(config: WorkflowWorkerConfig, signal: AbortSignal, manifest?: WorkerContributionManifest, options?: WorkflowRunnerRunOptions): Promise<WorkflowRunnerCompletion>;
|
|
1244
1530
|
}
|
|
1245
1531
|
//#endregion
|
|
1532
|
+
//#region runtimes/node/src/workflow-worker/outcome-submission.d.ts
|
|
1533
|
+
/**
|
|
1534
|
+
* Tunable retry parameters for outcome submission.
|
|
1535
|
+
*
|
|
1536
|
+
* All fields are optional; the harness supplies sane defaults when
|
|
1537
|
+
* the caller omits them.
|
|
1538
|
+
*/
|
|
1539
|
+
interface OutcomeSubmitRetryConfig {
|
|
1540
|
+
/**
|
|
1541
|
+
* Maximum number of retry attempts after the first submission
|
|
1542
|
+
* attempt fails (total attempts = maxRetries + 1).
|
|
1543
|
+
* Defaults to 7.
|
|
1544
|
+
*/
|
|
1545
|
+
readonly maxRetries?: number;
|
|
1546
|
+
/**
|
|
1547
|
+
* Base delay in milliseconds for exponential back-off between
|
|
1548
|
+
* retry attempts. The actual delay for attempt N is
|
|
1549
|
+
* `baseDelayMs * 2^(N-1)`, capped at {@link maxDelayMs}.
|
|
1550
|
+
* Defaults to 1000.
|
|
1551
|
+
*/
|
|
1552
|
+
readonly baseDelayMs?: number;
|
|
1553
|
+
/**
|
|
1554
|
+
* Maximum delay in milliseconds for any single back-off pause.
|
|
1555
|
+
* Defaults to 30000.
|
|
1556
|
+
*/
|
|
1557
|
+
readonly maxDelayMs?: number;
|
|
1558
|
+
/**
|
|
1559
|
+
* Overall deadline in milliseconds from the first attempt.
|
|
1560
|
+
* The helper bounds every retry wait, reconnect, and request to
|
|
1561
|
+
* this deadline, even if maxRetries has not been reached.
|
|
1562
|
+
* Defaults to 120000.
|
|
1563
|
+
*/
|
|
1564
|
+
readonly deadlineMs?: number;
|
|
1565
|
+
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Payload for an outcome submission request.
|
|
1568
|
+
*/
|
|
1569
|
+
interface OutcomeSubmitPayload {
|
|
1570
|
+
readonly executionAttemptId: string;
|
|
1571
|
+
readonly executionId: string;
|
|
1572
|
+
readonly result: WorkflowRunResult;
|
|
1573
|
+
}
|
|
1574
|
+
/**
|
|
1575
|
+
* Outcome ACK decisions that confirm durable delivery.
|
|
1576
|
+
*
|
|
1577
|
+
* Only `accepted` and `duplicate` mean the Authority has committed
|
|
1578
|
+
* (or already had) the canonical outcome.
|
|
1579
|
+
*/
|
|
1580
|
+
declare const DELIVERED_DECISIONS: Set<OutcomeAckDecision>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Reason an outcome could not be delivered.
|
|
1583
|
+
*/
|
|
1584
|
+
type OutcomeDeliveryFailureReason = 'authority-rejected' | 'deadline-exceeded';
|
|
1585
|
+
/**
|
|
1586
|
+
* Error thrown when the Authority rejects an outcome with a non-transient
|
|
1587
|
+
* decision (`conflict` or `fenced`), or when its overall delivery deadline
|
|
1588
|
+
* expires.
|
|
1589
|
+
*/
|
|
1590
|
+
declare class OutcomeDeliveryError extends Error {
|
|
1591
|
+
readonly decision: OutcomeAckDecision | 'deadline-exceeded';
|
|
1592
|
+
readonly result: WorkflowRunResult;
|
|
1593
|
+
readonly reason: OutcomeDeliveryFailureReason;
|
|
1594
|
+
/**
|
|
1595
|
+
* @param decision - The Authority's rejection decision or deadline marker.
|
|
1596
|
+
* @param result - The immutable workflow result that was rejected.
|
|
1597
|
+
* @param reason - Stable classification of the delivery failure.
|
|
1598
|
+
*/
|
|
1599
|
+
constructor(decision: OutcomeAckDecision | 'deadline-exceeded', result: WorkflowRunResult, reason?: OutcomeDeliveryFailureReason);
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Optional reconnect callback invoked before each retry when the
|
|
1603
|
+
* previous attempt failed with a transport-level error.
|
|
1604
|
+
*
|
|
1605
|
+
* Implementations should trigger a bus reconnect (e.g.
|
|
1606
|
+
* `bus.reconnect()`) and return once the attempt has been initiated.
|
|
1607
|
+
* Failures from the reconnect attempt are non-fatal; the next retry
|
|
1608
|
+
* will naturally fail again if the transport is still down.
|
|
1609
|
+
*/
|
|
1610
|
+
type OutcomeReconnect = () => Promise<void>;
|
|
1611
|
+
/**
|
|
1612
|
+
* Submit a workflow outcome for durable acknowledgement with
|
|
1613
|
+
* decision-aware, reconnect-capable retry.
|
|
1614
|
+
*
|
|
1615
|
+
* Sends the immutable outcome via `control.outcome.submit` and retries
|
|
1616
|
+
* with exponential back-off on transient failures. Only `accepted` and
|
|
1617
|
+
* `duplicate` decisions count as successful delivery. `conflict` and
|
|
1618
|
+
* `fenced` are non-transient infrastructure rejections that terminate
|
|
1619
|
+
* immediately without further retries.
|
|
1620
|
+
*
|
|
1621
|
+
* On transport-level failures the helper invokes the optional
|
|
1622
|
+
* reconnect callback before the next retry attempt, allowing the
|
|
1623
|
+
* caller to re-establish the bus connection.
|
|
1624
|
+
*
|
|
1625
|
+
* Bounded-ness: a worker cannot wait indefinitely for delivery; if
|
|
1626
|
+
* all retry attempts are exhausted, the helper throws the last transport
|
|
1627
|
+
* error. The overall deadline bounds every wait, reconnect, and in-flight
|
|
1628
|
+
* bus request; expiry throws a deterministic {@link OutcomeDeliveryError}.
|
|
1629
|
+
* @param bus - Worker-local bus connected to the Authority.
|
|
1630
|
+
* @param payload - Attempt identity and terminal result.
|
|
1631
|
+
* @param options - Optional retry configuration and reconnect callback.
|
|
1632
|
+
* @returns Durable ACK decision (`accepted` or `duplicate`).
|
|
1633
|
+
* @throws {@link OutcomeDeliveryError} On non-transient rejection or deadline expiry.
|
|
1634
|
+
*/
|
|
1635
|
+
declare function submitOutcomeWithAck(bus: IMakaioBus, payload: OutcomeSubmitPayload, options?: {
|
|
1636
|
+
readonly retry?: OutcomeSubmitRetryConfig;
|
|
1637
|
+
readonly reconnect?: OutcomeReconnect;
|
|
1638
|
+
}): Promise<OutcomeAckDecision>;
|
|
1639
|
+
//#endregion
|
|
1246
1640
|
//#region runtimes/node/src/workflow-worker/piscina-thin-workflow-provider.d.ts
|
|
1247
1641
|
/**
|
|
1248
1642
|
* Construction options for {@link PiscinaThinWorkflowProvider}.
|
|
@@ -1256,33 +1650,98 @@ interface PiscinaThinWorkflowProviderOptions {
|
|
|
1256
1650
|
* Underlying workflow runner used to execute incoming provision requests.
|
|
1257
1651
|
*
|
|
1258
1652
|
* Typically a {@link ThinWorkflowPiscinaRunner} instance, but any
|
|
1259
|
-
* {@link
|
|
1260
|
-
* lightweight fakes without spawning real worker threads.
|
|
1653
|
+
* {@link ReadinessAwareWorkflowRunner} implementation is accepted so tests
|
|
1654
|
+
* can supply lightweight fakes without spawning real worker threads.
|
|
1655
|
+
*
|
|
1656
|
+
* Readiness is part of the requirement rather than an optional refinement:
|
|
1657
|
+
* this provider publishes `control.attempt-ready` from the runner's
|
|
1658
|
+
* post-composition signal, and a runner without one would silently never
|
|
1659
|
+
* make an attempt ready instead of failing where it is wired.
|
|
1261
1660
|
*/
|
|
1262
|
-
readonly runner:
|
|
1661
|
+
readonly runner: ReadinessAwareWorkflowRunner;
|
|
1662
|
+
/**
|
|
1663
|
+
* Bus instance used to submit workflow outcomes through the Authority's
|
|
1664
|
+
* durable `control.outcome.submit` protocol after the runner settles.
|
|
1665
|
+
*/
|
|
1666
|
+
readonly bus: IMakaioBus;
|
|
1263
1667
|
/**
|
|
1264
1668
|
* Capabilities advertised when this provider is registered.
|
|
1265
1669
|
*
|
|
1266
1670
|
* Overrides are merged onto the built-in local, delegating workflow
|
|
1267
1671
|
* capability set. The Piscina runner shares the host process filesystem and
|
|
1268
1672
|
* delegates agent/subagent execution to the host runtime.
|
|
1673
|
+
*
|
|
1674
|
+
* `supportsRecovery` is omitted from this type rather than accepted and
|
|
1675
|
+
* discarded. It is fixed by the allocation lifetime, so a host that sets it
|
|
1676
|
+
* is stating something untrue about this provider and should be told at the
|
|
1677
|
+
* call site instead of having the value silently dropped. See
|
|
1678
|
+
* {@link PiscinaThinWorkflowProvider}.
|
|
1679
|
+
*/
|
|
1680
|
+
readonly baseCapabilities?: Omit<Partial<WorkerNodeCapabilities>, 'supportsRecovery'>;
|
|
1681
|
+
/**
|
|
1682
|
+
* Optional retry configuration for outcome submission.
|
|
1683
|
+
*
|
|
1684
|
+
* The Piscina provider runs in-process, so the defaults are shorter
|
|
1685
|
+
* than the headless worker's remote defaults: 3 retries, 200 ms base
|
|
1686
|
+
* delay, 2 s cap, 10 s deadline.
|
|
1269
1687
|
*/
|
|
1270
|
-
readonly
|
|
1688
|
+
readonly outcomeRetry?: OutcomeSubmitRetryConfig;
|
|
1271
1689
|
}
|
|
1272
1690
|
/**
|
|
1273
|
-
*
|
|
1691
|
+
* Runner variant that exposes the worker-thread composition readiness signal.
|
|
1274
1692
|
*
|
|
1275
|
-
*
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
|
|
1280
|
-
|
|
1693
|
+
* Extends {@link IWorkflowRunner} because a readiness-aware runner is still a
|
|
1694
|
+
* workflow runner; this provider only ever drives it through
|
|
1695
|
+
* {@link runWithReadiness}, which is the sole path that can report an attempt
|
|
1696
|
+
* as ready.
|
|
1697
|
+
*/
|
|
1698
|
+
interface ReadinessAwareWorkflowRunner extends IWorkflowRunner {
|
|
1699
|
+
/**
|
|
1700
|
+
* Run once and separately expose the worker's post-composition readiness.
|
|
1701
|
+
* @param config - Worker configuration for the run.
|
|
1702
|
+
* @param signal - AbortSignal that cancels the run.
|
|
1703
|
+
* @param manifest - Optional per-call contribution manifest.
|
|
1704
|
+
* @returns Terminal result promise and post-composition readiness promise.
|
|
1705
|
+
*/
|
|
1706
|
+
runWithReadiness(config: WorkerNodeProvisionRequest['workerConfig'], signal: AbortSignal, manifest?: WorkerNodeProvisionRequest['workerManifest']): ThinWorkflowPiscinaRunWithReadiness;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Built-in thin workflow provider backed by the existing workflow-level
|
|
1710
|
+
* Piscina runner.
|
|
1711
|
+
*
|
|
1712
|
+
* This provider wraps an {@link IWorkflowRunner} so it can be registered
|
|
1713
|
+
* with the framework capability registry and participate in pool-driven
|
|
1714
|
+
* dispatch. Each {@link provision} call starts the underlying runner and
|
|
1715
|
+
* returns a validated {@link ProviderAllocationRef} together with an
|
|
1716
|
+
* infrastructure-only {@link WorkerNodeHandle}.
|
|
1717
|
+
*
|
|
1718
|
+
* The handle controls allocation lifecycle (cancel/terminate) but does
|
|
1719
|
+
* NOT expose readiness or workflow results. Readiness is signaled via
|
|
1720
|
+
* the worker protocol (`control.attempt-ready` bus subject) after runtime
|
|
1721
|
+
* composition. Workflow outcomes are submitted and acknowledged through
|
|
1722
|
+
* the Authority's `control.outcome.submit` bus subject.
|
|
1723
|
+
*
|
|
1724
|
+
* Piscina is a local thin workflow runner: it declares that it is NOT
|
|
1725
|
+
* recoverable. Allocation references are process-local and non-durable.
|
|
1726
|
+
*
|
|
1727
|
+
* That declaration is a consequence of the allocation lifetime, not a
|
|
1728
|
+
* configuration choice. Worker threads cannot outlive the process that
|
|
1729
|
+
* provisioned them, so there is no allocation left to discover, attach to, or
|
|
1730
|
+
* converge once that process is gone. The provider therefore implements no
|
|
1731
|
+
* recovery capability, and `supportsRecovery` stays `false` regardless of the
|
|
1732
|
+
* capability overrides a host supplies.
|
|
1281
1733
|
*/
|
|
1282
1734
|
declare class PiscinaThinWorkflowProvider implements IWorkerNodeProvider {
|
|
1283
1735
|
private readonly options;
|
|
1284
1736
|
/** Execution environment tag used for pool provider matching. */
|
|
1285
1737
|
readonly environment: "piscina";
|
|
1738
|
+
/**
|
|
1739
|
+
* Allocations are worker threads inside the provisioning process.
|
|
1740
|
+
*
|
|
1741
|
+
* When that process is gone the threads are gone with it, so there is
|
|
1742
|
+
* nothing to rediscover or converge in provider infrastructure.
|
|
1743
|
+
*/
|
|
1744
|
+
readonly allocationLifetime: "provisioner-process-bound";
|
|
1286
1745
|
/** Capabilities advertised to the pool dispatch selector. */
|
|
1287
1746
|
readonly baseCapabilities: NormalizedWorkerNodeCapabilities;
|
|
1288
1747
|
/**
|
|
@@ -1294,16 +1753,66 @@ declare class PiscinaThinWorkflowProvider implements IWorkerNodeProvider {
|
|
|
1294
1753
|
/** @returns Human-readable display name for this provider. */
|
|
1295
1754
|
get displayName(): string;
|
|
1296
1755
|
/**
|
|
1297
|
-
* Provision a new
|
|
1298
|
-
*
|
|
1299
|
-
*
|
|
1300
|
-
*
|
|
1301
|
-
*
|
|
1302
|
-
*
|
|
1756
|
+
* Provision a new local execution allocation for the given workflow
|
|
1757
|
+
* request.
|
|
1758
|
+
*
|
|
1759
|
+
* Starts the underlying runner and returns a validated allocation
|
|
1760
|
+
* reference together with an infrastructure-only handle. The handle
|
|
1761
|
+
* controls allocation lifecycle (cancel/terminate) via an internal
|
|
1762
|
+
* {@link AbortController} wired to the runner's signal.
|
|
1763
|
+
*
|
|
1764
|
+
* Cooperative cancellation: if the caller's `signal` is already
|
|
1765
|
+
* aborted, or becomes aborted before the runner starts, the provision
|
|
1766
|
+
* rejects with the signal's own abort reason without starting the
|
|
1767
|
+
* runner. Cancellation is never flattened into an outcome, so callers
|
|
1768
|
+
* can tell it apart from an ambiguous infrastructure rejection.
|
|
1769
|
+
*
|
|
1770
|
+
* The return type is narrower than {@link IWorkerNodeProvider.provision}:
|
|
1771
|
+
* this provider allocates a local worker thread or rejects, and it has no
|
|
1772
|
+
* way to positively prove that nothing was created. The narrow type states
|
|
1773
|
+
* what it can prove today. Gaining the ability to confirm absence means
|
|
1774
|
+
* deliberately widening this signature back to the contract union.
|
|
1303
1775
|
* @param request - Full provision request containing worker config and manifest.
|
|
1304
|
-
* @
|
|
1305
|
-
|
|
1306
|
-
|
|
1776
|
+
* @param signal - AbortSignal for cooperative cancellation of the provision operation.
|
|
1777
|
+
* @returns Allocated outcome with a validated allocation reference and infrastructure handle.
|
|
1778
|
+
*/
|
|
1779
|
+
provision(request: WorkerNodeProvisionRequest, signal: AbortSignal): Promise<WorkerNodeAllocatedOutcome>;
|
|
1780
|
+
/**
|
|
1781
|
+
* Submit a workflow outcome through the Authority bus protocol after
|
|
1782
|
+
* the runner promise settles.
|
|
1783
|
+
*
|
|
1784
|
+
* On success, submits the runner's result directly. On failure, builds
|
|
1785
|
+
* a `failed` {@link WorkflowRunResult} from the error message.
|
|
1786
|
+
*
|
|
1787
|
+
* Uses the shared {@link submitOutcomeWithAck} helper for decision-aware
|
|
1788
|
+
* retry with bounded exponential back-off. Since the Piscina provider
|
|
1789
|
+
* runs in-process, a persistently failing local submit means the outcome
|
|
1790
|
+
* handler is unregistered — an infrastructure failure that the host recovery
|
|
1791
|
+
* coordinator reconciles via recovery operations.
|
|
1792
|
+
* @param resultPromise - Promise resolving to the workflow run result.
|
|
1793
|
+
* @param executionId - Workflow execution identifier.
|
|
1794
|
+
* @param executionAttemptId - Authority-created attempt identifier.
|
|
1795
|
+
* @param workflowId - Workflow definition identifier.
|
|
1796
|
+
* @param onInfrastructureConclusion - Reports failed durable outcome delivery as terminal infrastructure evidence.
|
|
1797
|
+
*/
|
|
1798
|
+
private submitOutcomeOnSettlement;
|
|
1799
|
+
/**
|
|
1800
|
+
* Build a process-local allocation reference validated by this
|
|
1801
|
+
* provider's codec.
|
|
1802
|
+
*
|
|
1803
|
+
* The `providerData` carries the execution attempt ID and a monotonic
|
|
1804
|
+
* timestamp for correlation/diagnostics. The reference is validated
|
|
1805
|
+
* against {@link ProviderAllocationRefSchema} before return.
|
|
1806
|
+
*
|
|
1807
|
+
* The reference names this provider *instance*, not the built-in identifier
|
|
1808
|
+
* this class is usually registered under. A reference identifies who created
|
|
1809
|
+
* the allocation, and an attempt is bound to the instance that provisioned
|
|
1810
|
+
* it, so a second instance stamping the built-in identifier would describe
|
|
1811
|
+
* its allocations as another provider's.
|
|
1812
|
+
* @param executionAttemptId - Authority-created attempt identifier.
|
|
1813
|
+
* @returns Validated, versioned allocation reference.
|
|
1814
|
+
*/
|
|
1815
|
+
private buildAllocationRef;
|
|
1307
1816
|
}
|
|
1308
1817
|
//#endregion
|
|
1309
1818
|
//#region runtimes/node/src/workflow-worker/in-process-workflow-runner.d.ts
|
|
@@ -1353,9 +1862,9 @@ declare class InProcessWorkflowRunner implements IWorkflowRunner {
|
|
|
1353
1862
|
* @param config - Workflow worker configuration to validate before execution.
|
|
1354
1863
|
* @param signal - AbortSignal for cooperative cancellation.
|
|
1355
1864
|
* @param _manifest - Ignored; in-process runners share the host contribution set.
|
|
1356
|
-
* @returns
|
|
1865
|
+
* @returns Uncommitted completion; the host executor owns finalization.
|
|
1357
1866
|
*/
|
|
1358
|
-
run(config: WorkflowWorkerConfig, signal: AbortSignal, _manifest?: WorkerContributionManifest): Promise<
|
|
1867
|
+
run(config: WorkflowWorkerConfig, signal: AbortSignal, _manifest?: WorkerContributionManifest): Promise<WorkflowRunnerCompletion>;
|
|
1359
1868
|
}
|
|
1360
1869
|
//#endregion
|
|
1361
1870
|
//#region runtimes/node/src/workflow-worker/isolated-workflow-runtime.d.ts
|
|
@@ -1416,6 +1925,159 @@ interface IsolatedWorkflowRuntime {
|
|
|
1416
1925
|
*/
|
|
1417
1926
|
declare function createIsolatedWorkflowRuntime(options: CreateIsolatedWorkflowRuntimeOptions): Promise<IsolatedWorkflowRuntime>;
|
|
1418
1927
|
//#endregion
|
|
1928
|
+
//#region runtimes/node/src/workflow-worker/headless-workflow-worker.d.ts
|
|
1929
|
+
/**
|
|
1930
|
+
* Bootstrap credentials returned by a provider-specific claim exchange.
|
|
1931
|
+
*
|
|
1932
|
+
* The harness receives these credentials after a successful bootstrap claim
|
|
1933
|
+
* and uses them to establish the authenticated bus connection.
|
|
1934
|
+
*/
|
|
1935
|
+
type HeadlessWorkerBootstrapCredentials = WorkerBootstrapClaimResponse;
|
|
1936
|
+
/**
|
|
1937
|
+
* Bootstrap the worker by claiming execution-scoped bus credentials.
|
|
1938
|
+
*
|
|
1939
|
+
* Implementations issue `WorkerNodeSubjects.control['bootstrap.claim']`
|
|
1940
|
+
* against an unauthenticated or bootstrap-authenticated bus and return the
|
|
1941
|
+
* execution-scoped credentials for the authenticated connection.
|
|
1942
|
+
* @param signal - Cancellation signal. Abort rejects the bootstrap.
|
|
1943
|
+
* @returns Claimed credentials for the authenticated bus connection.
|
|
1944
|
+
*/
|
|
1945
|
+
type HeadlessWorkerBootstrap = (signal: AbortSignal) => Promise<HeadlessWorkerBootstrapCredentials>;
|
|
1946
|
+
/**
|
|
1947
|
+
* Establish the authenticated bus connection for the worker.
|
|
1948
|
+
*
|
|
1949
|
+
* Called after bootstrap with the claimed credentials. The implementation
|
|
1950
|
+
* registers a transport on the supplied bus and connects it.
|
|
1951
|
+
* @param bus - Worker-local bus instance to connect.
|
|
1952
|
+
* @param credentials - Credentials from the bootstrap claim.
|
|
1953
|
+
* @param signal - Cancellation signal.
|
|
1954
|
+
*/
|
|
1955
|
+
type HeadlessWorkerBusConnector = (bus: IMakaioBus, credentials: HeadlessWorkerBootstrapCredentials, signal: AbortSignal) => Promise<void>;
|
|
1956
|
+
/**
|
|
1957
|
+
* Result of materializing a portable run context into worker-local paths.
|
|
1958
|
+
*
|
|
1959
|
+
* The optional {@link cleanup} callback is invoked by the harness in its
|
|
1960
|
+
* finally teardown (best-effort, idempotent-safe) after runtime shutdown.
|
|
1961
|
+
* Implementations that acquire temporary resources (snapshot dirs, file
|
|
1962
|
+
* handles) should provide a cleanup callback to release them.
|
|
1963
|
+
*/
|
|
1964
|
+
interface MaterializedWorkspace {
|
|
1965
|
+
/** Materialized worker-local runtime context with absolute paths. */
|
|
1966
|
+
readonly context: WorkerRuntimeContext;
|
|
1967
|
+
/**
|
|
1968
|
+
* Optional cleanup callback invoked during harness teardown.
|
|
1969
|
+
*
|
|
1970
|
+
* Must be idempotent — the harness may call it multiple times or
|
|
1971
|
+
* after partial initialization. Rejections are swallowed.
|
|
1972
|
+
*/
|
|
1973
|
+
readonly cleanup?: () => Promise<void>;
|
|
1974
|
+
}
|
|
1975
|
+
/**
|
|
1976
|
+
* Materialize a portable run context into worker-local runtime context.
|
|
1977
|
+
*
|
|
1978
|
+
* The implementation resolves workspace snapshots or local directories,
|
|
1979
|
+
* verifies contribution integrity, and returns a {@link MaterializedWorkspace}
|
|
1980
|
+
* with absolute worker-local paths and an optional cleanup callback.
|
|
1981
|
+
* @param runContext - Persisted portable run context from the Authority.
|
|
1982
|
+
* @param signal - Cancellation signal.
|
|
1983
|
+
* @returns Materialized workspace with runtime context and optional cleanup.
|
|
1984
|
+
*/
|
|
1985
|
+
type HeadlessWorkerMaterializer = (runContext: WorkflowRunContext, signal: AbortSignal) => Promise<MaterializedWorkspace>;
|
|
1986
|
+
/**
|
|
1987
|
+
* Load kernel extension packages from resolved contribution entrypoints.
|
|
1988
|
+
*
|
|
1989
|
+
* Called with the materialized runtime context after workspace resolution.
|
|
1990
|
+
* @param runtimeContext - Materialized worker-local runtime context.
|
|
1991
|
+
* @param signal - Cancellation signal.
|
|
1992
|
+
* @returns Extension packages to activate in the isolated runtime.
|
|
1993
|
+
*/
|
|
1994
|
+
type HeadlessWorkerContributionLoader = (runtimeContext: WorkerRuntimeContext, signal: AbortSignal) => Promise<readonly KernelMakaioExtension[]>;
|
|
1995
|
+
/**
|
|
1996
|
+
* Execute the workflow after runtime composition and readiness.
|
|
1997
|
+
*
|
|
1998
|
+
* The implementation loads the workflow from the run context and drives it
|
|
1999
|
+
* through the orchestrator. The returned result is immutable.
|
|
2000
|
+
* @param bus - Connected worker-local bus.
|
|
2001
|
+
* @param runContext - Persisted portable run context.
|
|
2002
|
+
* @param runtimeContext - Materialized worker-local runtime context.
|
|
2003
|
+
* @param signal - Effective cancellation signal (combines caller + bus cancel).
|
|
2004
|
+
* @returns Immutable terminal workflow run result.
|
|
2005
|
+
*/
|
|
2006
|
+
type HeadlessWorkerExecutor = (bus: IMakaioBus, runContext: WorkflowRunContext, runtimeContext: WorkerRuntimeContext, signal: AbortSignal) => Promise<WorkflowRunResult>;
|
|
2007
|
+
/**
|
|
2008
|
+
* Optional post-commit observation callback.
|
|
2009
|
+
*
|
|
2010
|
+
* Invoked after the Authority durably acknowledges the outcome. Useful for
|
|
2011
|
+
* writing local artifact files or emitting provider-specific completion signals.
|
|
2012
|
+
* Failures are best-effort and must not replace the committed result.
|
|
2013
|
+
* @param result - Immutable workflow result.
|
|
2014
|
+
* @param decision - Durable ACK decision from the Authority.
|
|
2015
|
+
*/
|
|
2016
|
+
type HeadlessWorkerPostCommitObserver = (result: WorkflowRunResult, decision: OutcomeAckDecision) => Promise<void>;
|
|
2017
|
+
/**
|
|
2018
|
+
* Injected dependencies for the headless workflow worker harness.
|
|
2019
|
+
*
|
|
2020
|
+
* Product code and provider wrappers supply implementations of these seams.
|
|
2021
|
+
* The harness orchestrates their lifecycle without knowing about Git, GitHub,
|
|
2022
|
+
* snapshot stores, or any product-specific concepts.
|
|
2023
|
+
*/
|
|
2024
|
+
interface HeadlessWorkflowWorkerDeps {
|
|
2025
|
+
/** Unique workflow execution identifier. */
|
|
2026
|
+
readonly executionId: string;
|
|
2027
|
+
/** Authority-created attempt identifier. */
|
|
2028
|
+
readonly executionAttemptId: string;
|
|
2029
|
+
/** Claim execution-scoped bus credentials. */
|
|
2030
|
+
readonly bootstrap: HeadlessWorkerBootstrap;
|
|
2031
|
+
/** Establish the authenticated bus connection. */
|
|
2032
|
+
readonly connectBus: HeadlessWorkerBusConnector;
|
|
2033
|
+
/** Materialize the portable spec into worker-local context. */
|
|
2034
|
+
readonly materialize: HeadlessWorkerMaterializer;
|
|
2035
|
+
/** Load contribution packages from materialized entrypoints. */
|
|
2036
|
+
readonly loadContributions: HeadlessWorkerContributionLoader;
|
|
2037
|
+
/** Execute the workflow on the composed runtime. */
|
|
2038
|
+
readonly execute: HeadlessWorkerExecutor;
|
|
2039
|
+
/** Adapter configuration repository for the isolated runtime. */
|
|
2040
|
+
readonly configRepository: PrepareAdapterRuntimeInput['configRepository'];
|
|
2041
|
+
/** Toolsets explicitly authorized for this runtime. */
|
|
2042
|
+
readonly toolsets: readonly Toolset[];
|
|
2043
|
+
/** Optional adapter auth preparation. */
|
|
2044
|
+
readonly prepareAuthRuntime?: PrepareAdapterRuntimeInput['prepareAuthRuntime'];
|
|
2045
|
+
/** Optional post-commit observation (e.g. artifact persistence). */
|
|
2046
|
+
readonly onPostCommit?: HeadlessWorkerPostCommitObserver;
|
|
2047
|
+
/**
|
|
2048
|
+
* Optional retry configuration for outcome submission.
|
|
2049
|
+
*
|
|
2050
|
+
* Controls exponential back-off parameters, overall deadline, and
|
|
2051
|
+
* maximum retry count. When omitted, sane defaults apply (7 retries,
|
|
2052
|
+
* 1 s base delay, 30 s cap, 2 min deadline).
|
|
2053
|
+
*/
|
|
2054
|
+
readonly outcomeRetry?: OutcomeSubmitRetryConfig;
|
|
2055
|
+
}
|
|
2056
|
+
/**
|
|
2057
|
+
* Terminal result of a headless worker execution.
|
|
2058
|
+
*
|
|
2059
|
+
* Contains the immutable workflow result and the Authority's durable ACK
|
|
2060
|
+
* decision so callers can distinguish first-time acceptance from replay.
|
|
2061
|
+
*/
|
|
2062
|
+
interface HeadlessWorkflowWorkerResult {
|
|
2063
|
+
/** Immutable terminal workflow run result. */
|
|
2064
|
+
readonly result: WorkflowRunResult;
|
|
2065
|
+
/** Durable ACK decision from the Authority. */
|
|
2066
|
+
readonly decision: OutcomeAckDecision;
|
|
2067
|
+
}
|
|
2068
|
+
/**
|
|
2069
|
+
* Run a single workflow execution through the portable headless worker harness.
|
|
2070
|
+
*
|
|
2071
|
+
* Kernel readiness is emitted by `createIsolatedWorkflowRuntime` internally;
|
|
2072
|
+
* attempt-ready follows after the runtime cancellation handoff completes.
|
|
2073
|
+
* @param deps - Injected provider and product dependencies.
|
|
2074
|
+
* @param signal - Cancellation signal from the process/caller.
|
|
2075
|
+
* @returns Terminal result and durable ACK decision.
|
|
2076
|
+
* @throws {@link OutcomeDeliveryError} When the Authority rejects the outcome.
|
|
2077
|
+
* @throws When bootstrap, connection, materialization, or runtime composition fails.
|
|
2078
|
+
*/
|
|
2079
|
+
declare function runHeadlessWorkflowWorker(deps: HeadlessWorkflowWorkerDeps, signal: AbortSignal): Promise<HeadlessWorkflowWorkerResult>;
|
|
2080
|
+
//#endregion
|
|
1419
2081
|
//#region runtimes/node/src/workflow-worker/workflow-loader.d.ts
|
|
1420
2082
|
/**
|
|
1421
2083
|
* Resolve a {@link RuntimeLoadedWorkflow} from the parsed worker config.
|
|
@@ -1478,4 +2140,4 @@ declare function loadWorkflowModules(source: Exclude<WorkflowWorkerSource, {
|
|
|
1478
2140
|
*/
|
|
1479
2141
|
declare function loadWorkflowModule(source: WorkflowWorkerSource): Promise<RuntimeLoadedWorkflow>;
|
|
1480
2142
|
//#endregion
|
|
1481
|
-
export {
|
|
2143
|
+
export { WorkspaceRootResolver as $, submitOutcomeWithAck as A, createHonoRouteGraph as At, ThinWorkflowPiscinaRunnerOptions as B, PiscinaThinWorkflowProvider as C, resolveFrameworkSpecifier as Ct, OutcomeReconnect as D, HttpRouteContribution as Dt, OutcomeDeliveryError as E, HttpContributionPhase as Et, createNodeWorkflowRunner as F, activateAdapterRuntimeIdentity as Ft, MakaioRuntime as G, BootCoordinatorSetupContext as H, createNodeWorkflowRunnerPackageOptions as I, prepareAdapterRuntime as It, UpstreamTelemetryBootOptions as J, ServerTransportProvider as K, ThinWorkflowPiscinaRunner as L, WorkerNodeRunnerOptions as M, ActivatedAdapterRuntimeIdentity as Mt, CreateNodeWorkflowRunnerPackageOptionsParams as N, PrepareAdapterRuntimeInput as Nt, OutcomeSubmitPayload as O, HonoRouteGraph as Ot, NodeWorkflowRunnerPackageOptions as P, PreparedAdapterRuntime as Pt, ParsedSriIntegrity as Q, IWorkflowRunner$1 as R, InProcessWorkflowRunnerOptions as S, NoopFrameworkModuleResolver as St, DELIVERED_DECISIONS as T, createHttpRouteGraphBuilder as Tt, BootMakaioRuntimeOptions as U, WorkflowRunResult$1 as V, CoreBootOptions as W, LocalDirectoryMaterializerOptions as X, WorkflowRunnerBootOptions as Y, MaterializationError as Z, IsolatedWorkflowRuntimeContext as _, selectFrameworkCorePackages as _t, HeadlessWorkerBootstrapCredentials as a, materializeLocalDirectory as at, createIsolatedWorkflowRuntime as b, FrameworkModuleResolver as bt, HeadlessWorkerExecutor as c, WorkflowWorkerEntryMode as ct, HeadlessWorkflowWorkerDeps as d, DatabaseBootOptions as dt, assertContainedIn as et, HeadlessWorkflowWorkerResult as f, InitializeNodeDatabaseOptions as ft, IsolatedWorkflowRuntime as g, normalizeNodeHostCapabilities as gt, CreateIsolatedWorkflowRuntimeOptions as h, HostCapabilityDeclaration as ht, HeadlessWorkerBootstrap as i, computeFileDigest as it, WorkerNodeRunner as j, ActivateAdapterRuntimeIdentityInput as jt, OutcomeSubmitRetryConfig as k, HonoRouteGraphOptions as kt, HeadlessWorkerMaterializer as l, WorkflowWorkerEntryResolverOptions as lt, runHeadlessWorkflowWorker as m, initializeNodeDatabase as mt, loadWorkflowModules as n, computeContributionPackageDigest as nt, HeadlessWorkerBusConnector as o, parseSriIntegrity as ot, MaterializedWorkspace as p, InitializeNodeDatabaseResult as pt, TransportReadyInfo as q, loadWorkflowFromConfig as r, computeDirectoryDigest as rt, HeadlessWorkerContributionLoader as s, verifyContribution as st, loadWorkflowModule as t, assertNoSymlinkEscape as tt, HeadlessWorkerPostCommitObserver as u, resolveWorkflowWorkerEntry as ut, WorkflowRuntimeAuthorityConnector as v, ShutdownStep as vt, PiscinaThinWorkflowProviderOptions as w, HttpRouteGraphBuilder as wt, InProcessWorkflowRunner as x, NodeFrameworkModuleResolver as xt, WorkflowRuntimeContributionLoader as y, BridgeBrowserOptions as yt, RuntimeLoadedWorkflow as z };
|