@makaio/framework 1.0.0-dev-1788897280508 → 1.0.0-dev-1788909333961
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/2020-Bl3Yx3In.mjs +1 -0
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.mjs +6 -6
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/{artifact-OnwP6uaD.mjs → artifact-BjqkK0KX.mjs} +1 -1
- package/dist/{attempt-record-codec-CqKq0NIB.mjs → attempt-record-codec-6jpayBMY.mjs} +1 -1
- package/dist/{authority-state-bootstrap-rnsTk0u7.mjs → authority-state-bootstrap-8VGt4vD2.mjs} +1 -1
- package/dist/bus/index.d.mts +20 -20
- package/dist/bus/index.mjs +1 -1
- package/dist/{capabilities-DGqMG9M3.mjs → capabilities-BhJ3wzI8.mjs} +1 -1
- package/dist/clients/index.d.mts +1 -1
- 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/code-execution/worker-entry.d.mts +1 -1
- package/dist/code-execution/worker-entry.mjs +1 -1
- package/dist/{code-execution-C2PgBdmE.mjs → code-execution-BsiB7ZeZ2.mjs} +1 -1
- package/dist/{code-execution-Mo1jztUH.mjs → code-execution-DRCzkGzO.mjs} +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/contracts/capabilities/index.mjs +1 -1
- 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/extension/index.mjs +1 -1
- 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 +201 -201
- package/dist/contracts/index.mjs +1 -1
- package/dist/contracts/materialization/index.d.mts +2 -2
- 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 +1 -1
- 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-BoTMoHVB.d.mts → contribution-B4t0OXKs.d.mts} +2 -2
- package/dist/{definition-BgY763Q4.d.mts → definition-Bs5hzhsT.d.mts} +1 -1
- package/dist/{detached-extension-handle-B9c_6Pcb.mjs → detached-extension-handle-CgJiXaqv.mjs} +1 -1
- package/dist/dist-CfANkKSb.mjs +1 -0
- package/dist/{execution-attempt-owner-recovery-BNERIDH0.mjs → execution-attempt-owner-recovery-CdH04iwP.mjs} +1 -1
- package/dist/{execution-attempt-repository-CtFZfBfp.d.mts → execution-attempt-repository-CF3cWsPo.d.mts} +495 -151
- package/dist/{extension-C4lFc8-j.mjs → extension-BgUSK5rv.mjs} +1 -1
- package/dist/{filesystem-service-DGqU-6x-.mjs → filesystem-service-yB8KhUGz.mjs} +1 -1
- package/dist/{framework-packages-CZJDukan.mjs → framework-packages-CxWecyPW.mjs} +1 -1
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-BT0rrriG.mjs → globby-z2SR0jRo.mjs} +1 -1
- package/dist/{hook-responses-BSCAdJ3i.d.mts → hook-responses-Cs8A07ZP.d.mts} +1 -1
- package/dist/{index-gK54T8Am.d.mts → index-B4Wg4W7d.d.mts} +100 -100
- package/dist/{index-RpG4EP3u.d.mts → index-B6aoVzdA.d.mts} +1 -1
- package/dist/{index-BZlmWCcW.d.mts → index-B7VO0gQV.d.mts} +3 -3
- package/dist/{index-C_OLvAr_.d.mts → index-BALk4zcu.d.mts} +1 -1
- package/dist/{index-BVRQOZbm.d.mts → index-BHZlMm_I.d.mts} +1 -1
- package/dist/{index-BdbYIlDL.d.mts → index-BO_ikAR-.d.mts} +13 -13
- package/dist/{index-BkY6zO7p.d.mts → index-BQv9mUzn.d.mts} +2 -1
- package/dist/{index-R2BZejEz.d.mts → index-BeplDh91.d.mts} +7 -7
- package/dist/{index-DIYgFhTZ2.d.mts → index-BgY_UzH82.d.mts} +4 -4
- package/dist/{index-BZtasAZP.d.mts → index-BjcJH3I-.d.mts} +1 -1
- package/dist/{index-nPpqnP7P.d.mts → index-BtC1JP5D.d.mts} +1 -1
- package/dist/{index-l5HeyxKn.d.mts → index-ByJ2NESC.d.mts} +6 -6
- package/dist/{index-CYwbfa0_.d.mts → index-CKvOECeR.d.mts} +2 -2
- package/dist/{index-PTp68NH1.d.mts → index-CpdRe5df.d.mts} +14 -14
- package/dist/{index-CQtttPGm.d.mts → index-D7j6v0-L.d.mts} +1 -1
- package/dist/{index-Cau0jTTM.d.mts → index-DFsJTTkS.d.mts} +1 -1
- package/dist/{index-mylsCg6V2.d.mts → index-DI-1HK7v2.d.mts} +1 -1
- package/dist/{index-DJ0Muy2s.d.mts → index-DlKxbLC9.d.mts} +2 -2
- package/dist/{index-D0DfEO45.d.mts → index-OP6Aw5jN.d.mts} +1 -1
- package/dist/{index-CDLHgV7v.d.mts → index-U0Fe0baO.d.mts} +10 -10
- package/dist/{index-F6hV4tWI.d.mts → index-VAJBIJUb.d.mts} +83 -29
- package/dist/{index-CoGo6HFE.d.mts → index-VCtdvtEk.d.mts} +336 -336
- package/dist/{index-dL0Oet1j.d.mts → index-fzrPfhS0.d.mts} +1 -1
- package/dist/{index-CYmQt2lF.d.mts → index-tDCBp28C.d.mts} +379 -379
- 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/kind-registration-T--B1wiI.mjs +1 -0
- package/dist/{lib-B8Yv4IY-.mjs → lib-B8hEa65D.mjs} +1 -1
- package/dist/{lib-hwdGyO-m.mjs → lib-Ql8RWYOd.mjs} +1 -1
- package/dist/{load-extensions-CNT2Nd9h.mjs → load-extensions-BHTj3d_P.mjs} +1 -1
- package/dist/{load-extensions-D0yT_Kta.d.mts → load-extensions-un9Md47Z.d.mts} +1 -1
- package/dist/{materialization-Dx1z_MDj.mjs → materialization-CqOHTt92.mjs} +1 -1
- package/dist/mcp-http-server/index.mjs +4 -4
- package/dist/{namespace-CPC1vbOu.d.mts → namespace-BVQ8Y2Yi.d.mts} +2 -2
- package/dist/{namespace-C7wggVcn.d.mts → namespace-Ciyw6FxO.d.mts} +18 -18
- package/dist/{namespace-By3nEmBH.d.mts → namespace-DELzAyzb.d.mts} +152 -152
- package/dist/{namespace-Dh5fTXYt.d.mts → namespace-thsiHTFH.d.mts} +2 -2
- 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 +12 -1
- package/dist/node/transports/index.mjs +2 -2
- package/dist/{orchestrator-shared-BKMtjTE9.mjs → orchestrator-shared-5vhs4wvU.mjs} +1 -1
- package/dist/{package-D7c2HC-S.mjs → package-BwIbyojG.mjs} +2 -2
- package/dist/{package-C9XYuN9J.d.mts → package-DnlJ4I1i.d.mts} +31 -9
- package/dist/package.json +1 -1
- package/dist/packages-7CsXP86g.mjs +1 -0
- 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/code-execution/index.d.mts +2 -2
- package/dist/runtime-node/code-execution/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 +7 -6
- 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/workflow-execution-bus-access.d.mts +16 -1
- package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schemas-hzbKeyyt.mjs → schemas-0eCrrru1.mjs} +1 -1
- package/dist/{schemas-C5FreSE0.d.mts → schemas-B9yLU2jM.d.mts} +1 -1
- package/dist/{schemas-BSBb1KFq.d.mts → schemas-BBatvMde.d.mts} +8 -8
- package/dist/{schemas-BjNlwTDl.d.mts → schemas-DQ5iRisA.d.mts} +2 -2
- package/dist/{schemas-B2Q284-G.d.mts → schemas-mGJIRIZ5.d.mts} +152 -152
- 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/automation-trigger/index.mjs +1 -1
- package/dist/services/capability/index.d.mts +2 -2
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/code-execution/index.d.mts +1 -1
- package/dist/services/code-execution/index.mjs +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +1 -1
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +3 -3
- package/dist/services/execution-target/index.mjs +1 -1
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/filesystem/namespace.d.mts +6 -6
- package/dist/services/filesystem/schemas.d.mts +3 -3
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +123 -123
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/log-import.mjs +1 -1
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/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-runtime/index.mjs +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/orchestrator-testing/index.mjs +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/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-editor/index.d.mts +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/namespace.d.mts +8 -8
- package/dist/services/settings/namespace.mjs +1 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- 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/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 +1 -1
- package/dist/services/workflow-transitions/index.mjs +1 -1
- package/dist/{session-lineage-CRLvurB-.d.mts → session-lineage-Bwb98OUz.d.mts} +1 -1
- package/dist/{src-D4Gx0QHf.mjs → src-Dlpw-Gh5.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +1 -1
- package/dist/storage/drizzle/client.mjs +1 -1
- package/dist/storage/drizzle/index.d.mts +1 -1
- package/dist/storage/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/drizzle/index.d.mts +1 -1
- package/dist/storage/handlers/drizzle/index.mjs +1 -1
- package/dist/storage/handlers/index.d.mts +1 -1
- package/dist/storage/handlers/index.mjs +1 -1
- package/dist/{tools-Cyo6BuGM.mjs → tools-BkSFBqUz.mjs} +1 -1
- package/dist/{transition-CwMPKBjz.d.mts → transition-BbfxZ4U1.d.mts} +2 -2
- package/dist/{types-BOF825V52.d.mts → types-CR415CdC2.d.mts} +1 -1
- package/dist/{types-Dg_acP9p.d.mts → types-CXwFtEIF.d.mts} +340 -340
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/{view-builder-D76L0Db8.d.mts → view-builder-CJtK5hgs.d.mts} +1 -1
- package/dist/{worker-9X0QNB1k.mjs → worker-VBlgozIo.mjs} +1 -1
- package/dist/worker-qgJToDTN.mjs +1 -0
- 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 +11 -12
- 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 -2
- package/dist/workflow-engine/provider-operation.mjs +1 -1
- package/dist/workflow-engine/testing/conformance.d.mts +1 -1
- package/dist/workflow-engine/testing/conformance.mjs +2 -2
- package/dist/workflow-engine/testing/index.d.mts +1 -2
- 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 +76 -48
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/{workflow-B3MWrYhG.mjs → workflow-svpU9Cig.mjs} +1 -1
- package/dist/{workflow-transitions-B7HtjuAn.mjs → workflow-transitions-Cuo6s9uv.mjs} +1 -1
- package/dist/workflow-worker-7AA-u1uC.mjs +2 -0
- package/package.json +1 -1
- package/dist/kind-registration-BNhVCSaT.mjs +0 -1
- package/dist/packages-BhhBcPgz.mjs +0 -1
- package/dist/provider-operation-BwrIrOeY.d.mts +0 -207
- package/dist/worker-BwUhRg7i.mjs +0 -1
- package/dist/workflow-worker-zYb2UguP.mjs +0 -2
- package/dist/{adapter-auth-runtime-DGY1CDxj.mjs → adapter-auth-runtime-BnPqQChk.mjs} +0 -0
- package/dist/{adapter-binding-fGIz-ss3.d.mts → adapter-binding-BU7STlfd.d.mts} +0 -0
- package/dist/{ajv-DWgn_plp.mjs → ajv-Dtk5hCZS.mjs} +0 -0
- package/dist/{attempt-fixtures-Dpfgqll0.mjs → attempt-fixtures-C-jQE_7B.mjs} +0 -0
- package/dist/{base-orchestrator-BeLqYKJG.d.mts → base-orchestrator-DXiejwQ3.d.mts} +0 -0
- package/dist/{bootstrap-start-client-BYoxrgMk.mjs → bootstrap-start-client-Bdv-_2Q9.mjs} +0 -0
- package/dist/{caller-owned-adapter-stub-egWCuKcE.mjs → caller-owned-adapter-stub-B-Sq7ZvF.mjs} +0 -0
- package/dist/{capability-service-BlYnun2M.d.mts → capability-service-CsWaOwvH.d.mts} +0 -0
- package/dist/{client-CtOWHpFB.d.mts → client-DP4ksY9q.d.mts} +0 -0
- package/dist/{client-binary-version-verifier-BwmToeS1.d.mts → client-binary-version-verifier-BoXRTyae.d.mts} +0 -0
- package/dist/{client-binary-version-verifier-sv-Uv0lB.mjs → client-binary-version-verifier-DHBAzg3-.mjs} +0 -0
- package/dist/{clients-namespace-Bf73bcZh.d.mts → clients-namespace-BVDmj8uV.d.mts} +0 -0
- package/dist/{config-namespace-BbLLd4V0.d.mts → config-namespace-BMOKEuyf.d.mts} +0 -0
- package/dist/{create-static-mount-BQnyEUH1.mjs → create-static-mount-GSdckRQx.mjs} +0 -0
- package/dist/{cross-spawn-DPrJR9Nq.mjs → cross-spawn-Bx_VEdpd.mjs} +0 -0
- package/dist/{cursor-storage-iJ6vBOWd.mjs → cursor-storage-Co4itf44.mjs} +0 -0
- package/dist/{definition-aS9AM2ht.d.mts → definition-ByVJ3n6o.d.mts} +0 -0
- package/dist/{descriptor-to-package-FBkLjHZo.mjs → descriptor-to-package-CZLujoiv.mjs} +0 -0
- package/dist/{drizzle-CIf_jdYI.mjs → drizzle-me-95ICP.mjs} +0 -0
- package/dist/{esm-BH4Kmq3r.mjs → esm-DILYVXmW.mjs} +0 -0
- package/dist/{event-m7_IdhOS.mjs → event-DmQPb5MB.mjs} +0 -0
- package/dist/{execution-attempt-repository-D_qR7NyG.mjs → execution-attempt-repository-DXyh1hgz.mjs} +0 -0
- package/dist/{execution-target-CqaBmnvX.mjs → execution-target-B9jZgDQz.mjs} +0 -0
- package/dist/{extension-context-41A1ZUus.d.mts → extension-context-Cx8CetW3.d.mts} +0 -0
- package/dist/{extension-discovery-DNB1VVsV.d.mts → extension-discovery-C0Nj5EVZ.d.mts} +0 -0
- package/dist/{extension-package-provenance-CTYdo0yF.mjs → extension-package-provenance-BzvG6rDO.mjs} +0 -0
- package/dist/{filesystem-service-DOrm4Llq.d.mts → filesystem-service-C6D7oABi.d.mts} +0 -0
- package/dist/{handler-COkV00I9.mjs → handler-BYQPNm8O.mjs} +0 -0
- package/dist/{index-jW7MJ2_q.d.mts → index-B7g7e7_f.d.mts} +0 -0
- package/dist/{index-BKvzOrbF.d.mts → index-B9-1l1oh.d.mts} +0 -0
- package/dist/{index-ClJjlOox.d.mts → index-BGWkmG9i.d.mts} +0 -0
- package/dist/{index-BbAqoQmv.d.mts → index-BR7IiCib.d.mts} +0 -0
- package/dist/{index-BiXqOfhl.d.mts → index-B_VcKELo.d.mts} +0 -0
- package/dist/{index-BBq5I7SB2.d.mts → index-BbjxBrcp2.d.mts} +0 -0
- package/dist/{index-Bq4PHWe9.d.mts → index-BnLp-7qH.d.mts} +0 -0
- package/dist/{index-Bg5iXHk5.d.mts → index-BpWoCe22.d.mts} +0 -0
- package/dist/{index-BO8n7zAS.d.mts → index-Bpv8EpBa.d.mts} +0 -0
- package/dist/{index-Ce_l029J.d.mts → index-BrRCVo9r.d.mts} +0 -0
- package/dist/{index-z-YJG2cw.d.mts → index-CHuB40EK.d.mts} +0 -0
- package/dist/{index-CavvxFdG2.d.mts → index-CIV2G6uX2.d.mts} +0 -0
- package/dist/{index-CgVdz5IV.d.mts → index-CNOqYviR.d.mts} +0 -0
- package/dist/{index-Bk865qJX.d.mts → index-CSEhxhIc.d.mts} +0 -0
- package/dist/{index-oucWFlFP2.d.mts → index-CZuhTqsX2.d.mts} +0 -0
- package/dist/{index-CUHWylh4.d.mts → index-D3_QOfke.d.mts} +0 -0
- package/dist/{index-BB4EWIf3.d.mts → index-D6qlh6Td.d.mts} +0 -0
- package/dist/{index-BjaQsfAr.d.mts → index-DLlTuugR.d.mts} +0 -0
- package/dist/{index-VVJqONaI.d.mts → index-DOKPbF-y2.d.mts} +0 -0
- package/dist/{index-BJjdUzfw2.d.mts → index-DZv9yNKF2.d.mts} +0 -0
- package/dist/{index-Cb3NfGSV2.d.mts → index-DrwT45ci2.d.mts} +6 -6
- package/dist/{index-DR9-fFwc.d.mts → index-DxaQ-ceV.d.mts} +0 -0
- package/dist/{index-zvgQ8ErF.d.mts → index-HRn0Kun0.d.mts} +0 -0
- package/dist/{index-Ck5amD5_.d.mts → index-IkeLI7uY.d.mts} +0 -0
- package/dist/{index-Q29tcu5N.d.mts → index-_Ngf4KAa.d.mts} +0 -0
- package/dist/{index-BcTwLu9C2.d.mts → index-b_LJnwCU2.d.mts} +0 -0
- package/dist/{index-LwOw7ZLk2.d.mts → index-uv_WSQtw2.d.mts} +8 -8
- /package/dist/{json-value-C57MkQrB.d.mts → json-value-DyMQrwGz.d.mts} +0 -0
- /package/dist/{jsonl-transport-QQuABrN7.mjs → jsonl-transport-Dfv3RLzi.mjs} +0 -0
- /package/dist/{lib-Sx8gBJvV.mjs → lib-BdfAJKDj.mjs} +0 -0
- /package/dist/{model-registry-DNHDnyvs.mjs → model-registry-DlUErRRt.mjs} +0 -0
- /package/dist/{namespace-BGgY903U.mjs → namespace-B8kUQpwo.mjs} +0 -0
- /package/dist/{namespace-D1qK-Ed3.d.mts → namespace-BlH5BeSq.d.mts} +0 -0
- /package/dist/{namespace-BY5-nA4j.d.mts → namespace-BocL2nn7.d.mts} +0 -0
- /package/dist/{namespace-DInMixc8.d.mts → namespace-CQaL10rI.d.mts} +0 -0
- /package/dist/{namespace-DE3oGhaN.d.mts → namespace-CcHA54E1.d.mts} +0 -0
- /package/dist/{namespace-DHrItZyM.mjs → namespace-ChjzkJIl.mjs} +0 -0
- /package/dist/{namespace-DkAlBY9o.d.mts → namespace-Ct2DKREI.d.mts} +0 -0
- /package/dist/{namespace-DENdNdK0.d.mts → namespace-DdcRYk7b.d.mts} +0 -0
- /package/dist/{namespace-Ca4sQ8X-.d.mts → namespace-DtXYm32M.d.mts} +0 -0
- /package/dist/{namespace-WeSQXdAL.d.mts → namespace-DyeMWQKf.d.mts} +0 -0
- /package/dist/{namespace-Bn-ryJn5.d.mts → namespace-nE7vRctI.d.mts} +0 -0
- /package/dist/{namespace-DP0WWpTO.d.mts → namespace-sTMm1voF.d.mts} +0 -0
- /package/dist/{orchestrator-shared-2vuCvljs.d.mts → orchestrator-shared-CYnIz5Zd.d.mts} +0 -0
- /package/dist/{out-Rz-t3WeC.mjs → out-Cn6vBxlH.mjs} +0 -0
- /package/dist/{package-Tt2uoAFf.mjs → package-BUSXHPOT.mjs} +0 -0
- /package/dist/{package-buHQFmTH.mjs → package-BiZ6ehWk.mjs} +0 -0
- /package/dist/{package-DfjGt5oK.mjs → package-D4eLGGv4.mjs} +0 -0
- /package/dist/{packages-DAqep89i.d.mts → packages-DtsjAYuf.d.mts} +0 -0
- /package/dist/{providers-namespace-C56pGeTO.d.mts → providers-namespace-BxknJ03z.d.mts} +0 -0
- /package/dist/{quick-lru-uXa2PNb5.mjs → quick-lru-CVryNCTx.mjs} +0 -0
- /package/dist/{registry-CZf8VGBh.mjs → registry-Q9gCZtxz.mjs} +0 -0
- /package/dist/{schema-wArHaxA9.d.mts → schema-CJfSEZ8X.d.mts} +0 -0
- /package/dist/{schemas-BsZJHdvY.d.mts → schemas-0VbIjfrW.d.mts} +0 -0
- /package/dist/{schemas-DDCAGKRi.mjs → schemas-BFgsIiSb.mjs} +0 -0
- /package/dist/{schemas-DmE-a0kN.d.mts → schemas-BfMFZ6J5.d.mts} +0 -0
- /package/dist/{schemas-CITR9cWN.d.mts → schemas-CmUWeOkr.d.mts} +0 -0
- /package/dist/{schemas-BMGJLkdK2.d.mts → schemas-CsRcSlvA2.d.mts} +0 -0
- /package/dist/{schemas-gfrOgGau.d.mts → schemas-Djt6hIjz.d.mts} +0 -0
- /package/dist/{schemas-wPB7RnHB.d.mts → schemas-DzDVjYjt.d.mts} +0 -0
- /package/dist/{schemas-B0zhTfet.d.mts → schemas-KDl7p-wr.d.mts} +0 -0
- /package/dist/{schemas-BJKx29Sp.d.mts → schemas-Yp3PvwsM.d.mts} +0 -0
- /package/dist/{server-lifecycle-CREtXADx.d.mts → server-lifecycle-Ck6_8o8v.d.mts} +0 -0
- /package/dist/{server-lifecycle-AvBVeCFR.mjs → server-lifecycle-hNz8U-QJ.mjs} +0 -0
- /package/dist/{src-DnLncoLg.mjs → src-Du_285FN.mjs} +0 -0
- /package/dist/{storage-namespace-JBh9nkKw.d.mts → storage-namespace-CRdQoXZ9.d.mts} +0 -0
- /package/dist/{storage-namespace-CH4j0_Zs.mjs → storage-namespace-Dtz2G1if.mjs} +0 -0
- /package/dist/{storage-namespace-definition-C0mnpnC_.d.mts → storage-namespace-definition-NBw1Y8Pa.d.mts} +0 -0
- /package/dist/{supports-color-BBMFnbC4.mjs → supports-color-BNmyqLq0.mjs} +0 -0
- /package/dist/{tool-approval-service-7mzJVMo_.mjs → tool-approval-service-rpV94znP.mjs} +0 -0
- /package/dist/{tray-menu-service-thAhpcPA.mjs → tray-menu-service-TWrmvXSo.mjs} +0 -0
- /package/dist/{types-9ldZyQTb.d.mts → types-BFv-EK2G.d.mts} +0 -0
- /package/dist/{types-DJuxNrac.d.mts → types-BcGXdeva.d.mts} +0 -0
- /package/dist/{types-eCGV_g6P.d.mts → types-CUCFeisO.d.mts} +0 -0
- /package/dist/{types-xXv0lUeU.d.mts → types-CXrp5ldz.d.mts} +0 -0
- /package/dist/{types-BMkn9jOe.d.mts → types-D4N56a4O.d.mts} +0 -0
- /package/dist/{types-CjjNAiHa.mjs → types-D9GJ7FyQ.mjs} +0 -0
- /package/dist/{window-registry-CGaYVD7l.d.mts → window-registry-Chi2qJ5k.d.mts} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{resolveMakaioHome as e}from"./runtime-node/makaio-config.mjs";import{t}from"./extension-package-provenance-CTYdo0yF.mjs";import{b as n,c as r,g as i,l as a,n as o,u as s,v as c}from"./bootstrap-start-client-BYoxrgMk.mjs";import{mintOrRotateWorkflowExecutionBusSecret as l}from"./runtime-node/workflow-execution-bus-access.mjs";import{z as u}from"zod";import{execFile as d,spawn as f}from"node:child_process";import{promisify as p}from"node:util";import*as m from"node:fs/promises";import{access as ee}from"node:fs/promises";import*as h from"node:path";import{basename as te,isAbsolute as ne,join as g,relative as re}from"node:path";import*as _ from"node:crypto";import{randomUUID as v}from"node:crypto";import{constants as ie}from"node:fs";import{BusAbortError as ae,createBusInstance as y,isRequestCancellation as oe,waitForSubscriptionPropagation as se}from"@makaio/framework/bus";import{AdapterSubjects as ce,BoundedRecoveryEvidenceSchema as le,ExecutionAttemptSchemas as b,ExecutionAttemptSubjects as x,FrameworkContractNamespaces as ue,FrameworkStorageNamespaces as de,JsonValueSchema as fe,PROVIDER_ALLOCATION_REF_VERSION as pe,ProviderAllocationRefSchema as me,RECOVERY_EVIDENCE_LIMITS as S,WorkerCapabilitiesSchema as he,WorkerSchemas as ge,WorkerSubjects as C,WorkflowRunContextSchema as _e,WorkflowRunResultSchema as ve,WorkflowWorkerConfigSchema as ye,createWorkflowCancelSubject as be}from"@makaio/framework/contracts";import{ExtensionCoordinator as xe,KernelSubjects as Se,coalesceExtensionOverrides as Ce,filterEligibleExtensions as we}from"@makaio/framework/kernel";import{BaseService as Te}from"@makaio/framework/service-base";import{AdapterRuntimeSubjects as Ee,registerAdapterRuntimeIdentityHandlers as De}from"@makaio/framework/services/adapter-runtime";import{devNull as w}from"node:os";import{CLIDetectionNamespace as Oe,CLIDetectionSubjects as ke}from"@makaio/framework/services/cli-detection/namespace";import{SessionOrchestratorToken as Ae,ToolRegistryToken as je,canonicalModelPackage as Me,createSubagentServicePackage as Ne,createToolContributionProcessor as Pe,frameworkCorePackages as T,sessionBridgePackage as Fe,sessionOrchestratorPackage as Ie,sessionPackage as Le,sessionStoragePackage as Re,toolRegistryPackage as ze}from"@makaio/framework/services";import{AdapterSubsystemSubjects as Be}from"@makaio/framework/services/adapter-subsystem";import{createClientsCorePackage as Ve}from"@makaio/framework/clients";import{AdapterSubsystemToken as E,createAdapterSubsystemContributionProcessor as He,createAdapterSubsystemPackage as Ue,orderAfterAdapterSubsystem as We}from"@makaio/framework/adapter-subsystem";import{execa as Ge}from"execa";import Ke from"piscina";import{ExecutionAttemptAuthority as qe,WORKFLOW_WORKLOAD_KIND as Je,WORKFLOW_WORKLOAD_VERSION as Ye,WorkflowStorageSubjects as Xe,buildWorkflowAttemptInstruction as Ze,parseWorkflowAttemptInstruction as D,runAuthorityDispatchedAttempt as Qe,toCommittedWorkflowRunnerResult as $e}from"@makaio/framework/workflow-engine";import{runWorkflowOrchestrator as et}from"@makaio/framework/workflow-engine/workflow-orchestrator";import{setTimeout as tt}from"node:timers/promises";function O(e){return e.on(ce.getCapabilities,async t=>{let{adapterName:n,adapterId:r}=t.payload;if(r){await t.next();return}if(n){let r=await e.requestOptional(Ee.resolveId,{adapterName:n}),i=r.handled?r.data.adapterId:void 0;i&&(t.payload.adapterId=i)}await t.next()},{priority:20})}function k(e){let{coordinator:t,configRepository:n,platformDefaults:r,prepareAuthRuntime:i,runtimeSnapshotHandlerPriority:a,runtimeDefinitionHandlerPriority:o}=e,s=Ue({configRepository:n,coordinator:t,platformDefaults:r,...i!==void 0&&{prepareAuthRuntime:i},...a!==void 0&&{runtimeSnapshotHandlerPriority:a},...o!==void 0&&{runtimeDefinitionHandlerPriority:o}});return t.registerContributionProcessor(He({getAdapterSubsystemService:()=>t.getExtensionService(E)})),{adapterSubsystemPackage:s}}function A(e){let{bus:t,currentMachineId:n}=e,r=De(t,{currentMachineId:n,listKnownAdapterNames:e.listKnownAdapterNames??(async()=>{let{configs:e}=await t.request(Be.listAdapterConfigs,{});return e.map(e=>e.name)}),...e.resolveLiveAdapterId!==void 0&&{resolveLiveAdapterId:e.resolveLiveAdapterId},...e.resolveLiveAdapterIdentity!==void 0&&{resolveLiveAdapterIdentity:e.resolveLiveAdapterIdentity},...e.listLiveAdapterIdentities!==void 0&&{listLiveAdapterIdentities:e.listLiveAdapterIdentities}}),i=O(t);return{cleanup:()=>{r.cleanup(),i()}}}function j(e,t){if(!(e instanceof Error))return!1;let{rootPackageName:n,subpath:r}=nt(t),i=(r===void 0?[t]:[t,n]).flatMap(e=>[`Cannot find package '${e}'`,`Cannot find module '${e}'`,`Cannot find package "${e}"`,`Cannot find module "${e}"`]),a=e;return(a.code===`ERR_MODULE_NOT_FOUND`||a.code===`MODULE_NOT_FOUND`)&&i.some(t=>e.message.includes(t))||a.code===`ERR_PACKAGE_PATH_NOT_EXPORTED`&&r!==void 0&&e.message.includes(`Package subpath '${r}' is not defined by "exports"`)&&rt(e.message,n)?!0:i.some(t=>e.message.includes(t))}async function M(e){try{return await import(e)}catch(t){if(j(t,e))return null;throw t}}function nt(e){let t=e.split(`/`);return e.startsWith(`@`)?{rootPackageName:t.slice(0,2).join(`/`),subpath:t.length>2?`./${t.slice(2).join(`/`)}`:void 0}:{rootPackageName:t[0]??e,subpath:t.length>1?`./${t.slice(1).join(`/`)}`:void 0}}function rt(e,t){let n=t,r=t.replaceAll(`/`,`\\`);return e.includes(`/${n}/package.json`)||e.includes(`\\${r}\\package.json`)}async function N(e,t=process.env,n=process.platform){let r=t[Object.keys(t).find(e=>e.toUpperCase()===`PATH`)??`PATH`]??``,i=(t.PATHEXT??`.EXE;.CMD;.BAT;.COM`).split(`;`).filter(Boolean),a=n===`win32`?h.extname(e)===``?i:[``,...i]:[``];for(let t of r.split(h.delimiter)){let n=t.replace(/^"|"$/gu,``),r=h.resolve(n||process.cwd());for(let t of a){let n=h.join(r,`${e}${t}`);try{return await ee(n,ie.X_OK),n}catch{}}}}async function P(e,t=5e3,n=1e3){let{stdout:r}=await Ge(e,[`--version`],{forceKillAfterDelay:n,timeout:t});return r}function it(e){return e.match(/(\d+\.\d+\.\d+)/u)?.[1]??`unknown`}async function at(e,t=N,n=P){try{let r=await t(e);if(r===void 0)return{binary:e,found:!1};let i=await n(r);return i.length===0?{binary:e,found:!1}:{binary:e,found:!0,path:r,version:it(i)}}catch{return{binary:e,found:!1}}}async function ot(e,t=N,n=P){return Promise.all(e.map(e=>at(e,t,n)))}var st=class extends Te{constructor(e){super(e)}onInit(){this.registerHandler(ke.scan,async e=>{let t=await ot(e.payload.binaries);e.setResult({results:t})})}};const F={name:`makaio.cli-detection`,displayName:`CLI Detection`,version:`0.1.0`,critical:!0,surface:`any`,namespaces:[Oe],create:e=>new st(e.bus)};function I(e,t){e.push(...ct(t))}function ct(e){return e===void 0?[]:typeof e==`function`?[e]:[...e]}function lt(e,t=[]){let n=new Set([e]),r=new Set,i=new Map;for(let e of t)typeof e==`string`?n.add(e):(r.add(e.id),e.version!==void 0&&i.set(e.id,e.version));return{hosts:n,capabilities:r,...i.size>0?{capabilityVersions:i}:{}}}function ut(e=[]){return e.some(e=>typeof e==`string`&&e===`node`)?e:[`node`,...e]}function L(e){return Ce(we(ft(e.packages,e.configProvider),e.surface,e.runtimeEnvironment))}function dt(e,n){let r=L(n),i=new Set(r.map(t));return e.filter(({ownerPackage:e})=>i.has(e)).map(({package:e})=>e)}function ft(e,t){return t?e.filter(e=>t.loadEnabled(e.name)!==!1):e}function R(e,t){return e.filter(e=>e.runtimeOwnership?.[t]===!0).map(e=>e.name)}function pt(e,t){let n=R(e,t);if(n.length>1)throw Error(`Multiple extensions own runtimeOwnership.${t}: ${n.join(`, `)}`)}function z(e){return pt(e,`sessionOrchestrator`),R(e,`sessionOrchestrator`).length===0}function mt(e){return e===!0||z(e)?T:T.filter(e=>e.name!==Ae.name)}function B(e,t,n){let r=[];try{for(let i of e){let e=i.runtimeBoot;e&&I(r,e.configure({bus:t,registerContributionProcessor:e=>{r.push(n.registerContributionProcessor(e))},forEachActiveExtension:e=>{n.forEachActiveExtension(e)}}))}}catch(e){let t=[];for(let e of[...r].reverse())try{e()}catch(e){t.push(e)}throw t.length>0?AggregateError([e,...t],`Extension boot contribution failed and rollback cleanup reported additional errors`,{cause:e}):e}return r}function ht(){let e=process.env.MAKAIO_SKIP_EXTENSIONS;if(!e)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(t)}var V=class{pool;constructor(e){this.pool=new Ke({filename:e.workerEntry,maxThreads:e.maxConcurrency??4,idleTimeout:e.idleTimeoutMs??3e4})}async run(e,t,n){return this.pool.run(e,{signal:t,transferList:n})}onMessage(e){return this.pool.on(`message`,e),()=>this.pool.off(`message`,e)}async dispose(){await this.pool.destroy()}},H=class extends Error{code;constructor(e,t){super(e),this.code=t,this.name=`MaterializationError`}};function U(e,t,n){let r=h.resolve(t)+h.sep,i=h.resolve(e);if(i!==h.resolve(t)&&!i.startsWith(r))throw new H(`${n} escapes allowed root: ${e} is not within ${t}`,`containment-violation`)}async function W(e,t,n,r){let i=r??await m.realpath(t),a;try{a=await m.realpath(e)}catch{return e}let o=i+h.sep;if(a!==i&&!a.startsWith(o))throw new H(`${n} escapes allowed root via symlink: real path ${a} is not within ${i}`,`symlink-escape`);return a}function gt(e){let t=e.indexOf(`-`);if(t===-1)throw new H(`Invalid SRI integrity format: ${e}`,`contribution-integrity-mismatch`);return{algorithm:e.slice(0,t),digest:e.slice(t+1)}}async function _t(e,t){let n=await m.readFile(e);return _.createHash(t).update(n).digest(`base64`)}const G=new Set([`.git`,`node_modules`]);function vt(e){return G.has(e.toLowerCase())}async function yt(e,t){let n=t.toLowerCase();if(!G.has(n))return!1;if(t===n)return!0;try{let[r,i]=await Promise.all([m.lstat(h.join(e,t)),m.lstat(h.join(e,n))]);return r.dev===i.dev&&r.ino===i.ino}catch(e){if(e.code===`ENOENT`)return!1;throw e}}const bt=G,xt=new Set([`.DS_Store`]);async function St(e,t){let n=_.createHash(t),r=[];async function i(t){let n=await m.readdir(t,{withFileTypes:!0});for(let a of n){let n=h.join(t,a.name);if(a.isSymbolicLink())throw new H(`Contribution package contains a symbolic link: ${h.relative(e,n)}`,`symlink-escape`);if(a.isDirectory()){bt.has(a.name)||await i(n);continue}if(a.isFile()){xt.has(a.name)||r.push(h.relative(e,n));continue}throw new H(`Contribution package contains an unsupported filesystem entry: ${h.relative(e,n)}`,`contribution-integrity-mismatch`)}}await i(e),r.sort();for(let t of r)n.update(t.split(h.sep).join(`/`)),n.update(`\0`),n.update(await m.readFile(h.join(e,t))),n.update(`\0`);return`${t}-${n.digest(`base64`)}`}async function Ct(e,t=`sha256`){let n=_.createHash(t),r=[];async function i(t){let n=await m.readdir(t,{withFileTypes:!0});for(let a of n){let n=h.join(t,a.name);if(!await yt(t,a.name)){if(a.isDirectory()){await i(n);continue}if(a.isFile()){r.push(h.relative(e,n));continue}throw a.isSymbolicLink()?new H(`Workspace root contains a symbolic link: ${h.relative(e,n)}`,`symlink-escape`):new H(`Workspace root contains an unsupported filesystem entry: ${h.relative(e,n)}`,`unsupported-filesystem-entry`)}}}await i(e),r.sort();for(let t of r){n.update(t),n.update(`\0`);let r=await m.readFile(h.join(e,t));n.update(r),n.update(`\0`)}return`${t}-${n.digest(`base64`)}`}async function wt(e,t,n){let r=h.join(t,`node_modules`,e.packageName);U(r,t,`Contribution package directory`),await W(r,t,`Contribution package directory`,n);let i=h.join(r,`package.json`),a;try{a=await m.readFile(i,`utf-8`)}catch{throw new H(`Contribution package not found: ${e.packageName} (expected at ${r})`,`contribution-missing`)}let o=JSON.parse(a);if(o.name!==e.packageName)throw new H(`Contribution identity mismatch: expected ${e.packageName}, found ${o.name??`<none>`}`,`contribution-missing`);if(o.version!==e.version)throw new H(`Contribution version mismatch for ${e.packageName}: expected ${e.version}, found ${o.version??`<none>`}`,`contribution-version-mismatch`);let s=h.join(r,e.entrypoint);U(s,r,`Contribution entrypoint`),await W(s,t,`Contribution entrypoint`,n);try{await m.access(s)}catch{throw new H(`Contribution entrypoint not found for ${e.packageName}: ${e.entrypoint}`,`contribution-entrypoint-mismatch`)}let{algorithm:c}=gt(e.integrity),l;try{l=await St(r,c)}catch(t){if(t instanceof H)throw t;let n=typeof t==`object`&&t&&`code`in t&&typeof t.code==`string`?t.code:void 0;throw n!==void 0&&!n.startsWith(`ERR_`)?new H(`Contribution package cannot be read for ${e.packageName}`,`contribution-entrypoint-mismatch`):t}if(l!==e.integrity)throw new H(`Contribution integrity mismatch for ${e.packageName}: expected ${e.integrity}, computed ${l}`,`contribution-integrity-mismatch`);return s}async function Tt(e,t,n){let r=await n.resolveWorkspaceRoot(e.workspaceId);if(r===void 0)throw new H(`Unknown workspace ID: ${e.workspaceId}`,`unknown-workspace`);try{if(!(await m.stat(r)).isDirectory())throw new H(`Workspace root is not a directory: ${r}`,`containment-violation`)}catch(e){throw e instanceof H?e:new H(`Workspace root does not exist: ${r}`,`containment-violation`)}let i=await m.realpath(r),a=h.resolve(r,e.sourcePath);if(U(a,r,`Source path`),h.relative(r,a).split(h.sep).some(vt))throw new H(`Workflow source path selects excluded workspace content: ${e.sourcePath}`,`source-path-mismatch`);await W(a,r,`Source path`,i);let o=await Ct(r);if(o!==e.rootDigest)throw new H(`Workspace root digest mismatch: expected ${e.rootDigest}, computed ${o}`,`digest-mismatch`);try{await m.access(a)}catch{throw new H(`Workflow source file not found: ${a}`,`source-missing`)}return{workspaceRoot:r,sourcePath:a,contributionEntrypoints:await Promise.all(t.map(e=>wt(e,r,i))),platform:process.platform,arch:process.arch}}var Et=class{options;manifest;pool;constructor(e){this.options=e,this.manifest=e.manifest}async run(e,t,n){this.pool??=new V(this.options);let r=n??this.manifest,i=await this.materializeTask(e,r,t);return{state:`uncommitted`,result:await this.pool.run(i,t)}}runWithReadiness(e,t,r,a){this.pool??=new V(this.options);let o=this.pool,s,c=!1,l,u=new Promise((t,r)=>{l=r,s=o.onMessage(r=>{n(r)&&r.executionAttemptId===a.executionAttemptId&&(r.executionId!==e.executionId||r.cancelSubject!==e.cancelSubject||(c=!0,s?.(),t(r)))})}),d=r??this.manifest,f=i(a.bootstrapDeadlineAt,t,async(t,n)=>{let r=await this.materializeTask(e,d,n);return o.run({...r,kind:`attempt-bound`,executionAttemptId:a.executionAttemptId,bootstrapDeadlineAt:a.bootstrapDeadlineAt,bootstrapPort:t},n,[t])});return f.then(()=>{c||(c=!0,s?.(),l(Error(`Workflow worker completed before ready signal: ${e.executionId}`)))},e=>{c||(c=!0,s?.(),l(e instanceof Error?e:Error(String(e))))}),{result:f,ready:u}}async dispose(){await this.pool?.dispose()}async materializeTask(e,t,n){if(n.throwIfAborted(),!(e.source.kind===`path`||t.contributionRefs.length>0))return{kind:`unbound`,config:e,manifest:t,contributionEntrypoints:[]};let r=e.materializationSpec;if(r?.kind!==`local-directory`)throw Error(`ThinWorkflowPiscinaRunner requires a local-directory materialization spec for path-backed workflows or declared contributions.`);if(this.options.resolveWorkspaceRoot===void 0)throw Error(`ThinWorkflowPiscinaRunner requires a host workspace-root resolver for local-directory materialization.`);let i=await Tt(r,t.contributionRefs,{resolveWorkspaceRoot:this.options.resolveWorkspaceRoot});if(n.throwIfAborted(),e.source.kind!==`path`)throw Error(`local-directory materialization requires a path-backed workflow source.`);return{kind:`unbound`,config:{...e,source:{kind:`path`,path:i.sourcePath}},manifest:t,contributionEntrypoints:i.contributionEntrypoints}}};function Dt(e){return e.mode===`source`?g(e.moduleDir,`workflow-worker`,`worker-entry.ts`):g(e.moduleDir,`workflow-worker`,`worker-entry.mjs`)}var Ot=class{options;terminalAuthority=`authority`;constructor(e){this.options=e}async run(e,t,n,r){let i={...e,terminalAuthority:`authority`},a=n??this.options.manifest,o=this.options.requirements,s=r?.dispatchMetadata;t.throwIfAborted();let c=e.source.kind===`path`?await this.options.readRunContext?.(e.executionId,t):void 0;t.throwIfAborted();let l=Ze({id:v(),revision:`1`,config:e,...c==null?{}:{runContext:c},preservation:{required:[]}});return{state:`authority-committed`,result:$e(await Qe({authority:this.options.authority,executionId:e.executionId,instruction:l,dispatch:e=>this.options.dispatch({executionAttemptId:e,config:i,...a!==void 0&&{manifest:a},...o!==void 0&&{requirements:o},...s!==void 0&&{metadata:s}},t)}),e)}}},kt=class{#e;constructor(e){this.#e=e.bus}async run(e,t,n){let r=ye.parse(e),i=await s(r);return{state:`uncommitted`,result:await et({config:await a(r,i,this.#e,t),loaded:i,bus:this.#e,signal:t})}}};function At(){return{contributionRefs:[]}}function jt(e){if(e.workflowRunner?.mode===`worker`&&!e.executionAttemptRepository)throw Error(`Worker dispatch mode requires an ExecutionAttemptRepository. Pass 'executionAttemptRepository' to createNodeWorkflowRunnerPackageOptions when workflowRunner.mode is 'worker'.`);let t;if(e.executionAttemptRepository){let n=e.executionAttemptBootstrapTimeoutMs;if(n===void 0)throw Error(`An ExecutionAttemptRepository requires executionAttemptBootstrapTimeoutMs`);t=new qe(e.executionAttemptRepository,{bootstrapTimeoutMs:n})}let n=te(e.runtimeModuleDir)===`src`?`source`:`dist`,r=Mt({moduleDir:e.runtimeModuleDir,defaultWorkerEntryMode:n,runner:e.workflowRunner,bus:e.bus,authority:t});return{...r!==void 0&&{workflowRunner:r},executorConfig:{busUrl:e.busUrl,busAuth:{kind:`none`},platformDefaults:e.platformDefaults,makaioHome:e.makaioHome},...e.executionAttemptRepository!==void 0&&{executionAttemptRepository:e.executionAttemptRepository},...t!==void 0&&{executionAttemptAuthority:t},...e.workflowMaterializationSpecResolvers!==void 0&&{workflowMaterializationSpecResolvers:e.workflowMaterializationSpecResolvers}}}function Mt(e){let{runner:t}=e;if(t)switch(t.mode){case void 0:case`in-process`:if(e.bus===void 0)throw Error(`InProcessWorkflowRunner requires a bus instance. Pass 'bus' to createNodeWorkflowRunner when runner.mode is 'in-process'.`);return new kt({bus:e.bus});case`worker`:{if(e.authority===void 0)throw Error(`WorkerRunner requires an ExecutionAttemptAuthority. Pass 'authority' to createNodeWorkflowRunner when runner.mode is 'worker'.`);let n=e.bus,r=t.dispatch??(n===void 0?void 0:(e,t)=>n.request(C.dispatch,{executionAttemptId:e.executionAttemptId,config:e.config,manifest:e.manifest,requirements:e.requirements,metadata:e.metadata},{signal:t}));if(r===void 0)throw Error(`WorkerRunner requires either a dispatch function or a bus instance. Pass 'bus' to createNodeWorkflowRunner when runner.mode is 'worker'.`);return new Ot({dispatch:r,authority:e.authority,...n!==void 0&&{readRunContext:async(e,t)=>(await n.request(Xe.getRunContext,{executionId:e},{signal:t})).runContext},...t.manifest!==void 0&&{manifest:t.manifest},...t.requirements!==void 0&&{requirements:t.requirements}})}case`piscina`:return new Et({workerEntry:t.workerEntry??Dt({moduleDir:e.moduleDir,mode:t.workerEntryMode??e.defaultWorkerEntryMode}),manifest:t.manifest??At(),...t.resolveWorkspaceRoot!==void 0&&{resolveWorkspaceRoot:t.resolveWorkspaceRoot},maxConcurrency:t.maxConcurrency,idleTimeoutMs:t.idleTimeoutMs})}}const Nt=new Set([`accepted`,`duplicate`]);var K=class extends Error{decision;result;reason;constructor(e,t,n=`authority-rejected`){super(`Outcome delivery ${n===`deadline-exceeded`?`deadline exceeded`:`rejected by Authority`} (decision=${e}, executionId=${t.executionId}, status=${t.status})`),this.decision=e,this.result=t,this.reason=n,this.name=`OutcomeDeliveryError`}},q=class extends Error{decision;payload;reason;constructor(e,t,n=`authority-rejected`){super(`Attempt outcome delivery ${n===`deadline-exceeded`?`deadline exceeded`:`rejected by Authority`} (decision=${e}, executionAttemptId=${t.executionAttemptId}, outcome=${t.outcome.kind})`),this.decision=e,this.payload=t,this.reason=n,this.name=`AttemptOutcomeDeliveryError`}},Pt=class extends Error{reason;constructor(e=`deadline-exceeded`){super(`Authority request delivery deadline exceeded`),this.reason=e,this.name=`AuthorityRequestDeliveryError`}};function Ft(e){let t={maxRetries:e?.maxRetries??7,baseDelayMs:e?.baseDelayMs??1e3,maxDelayMs:e?.maxDelayMs??3e4,deadlineMs:e?.deadlineMs??12e4};if(!Number.isSafeInteger(t.maxRetries)||t.maxRetries<0)throw TypeError(`Outcome submission maxRetries must be a non-negative safe integer, got ${t.maxRetries}`);for(let[e,n]of Object.entries({baseDelayMs:t.baseDelayMs,maxDelayMs:t.maxDelayMs,deadlineMs:t.deadlineMs}))if(!Number.isFinite(n)||n<=0)throw TypeError(`Outcome submission ${e} must be a positive finite number, got ${n}`);return t}async function It(e,t,n,r){let i=t.baseDelayMs*2**(e-1),a=n-Date.now(),o=Math.min(i,t.maxDelayMs,a);await new Promise(e=>setTimeout(e,o));let s=n-Date.now();if(s<=0)return!1;if(r!==void 0){let e;try{await Promise.race([r(),new Promise(t=>{e=setTimeout(t,s)})])}catch{}finally{e!==void 0&&clearTimeout(e)}}return Date.now()<n}async function Lt(e,t,n,r){let i=Ft(n?.retry),a=n?.reconnect,o=Date.now()+i.deadlineMs,s;for(let n=0;n<=i.maxRetries;n++){if(o-Date.now()<=0||n>0&&!await It(n,i,o,a))throw t();try{let n=o-Date.now();if(n<=0)throw t();return await e(n)}catch(e){if(r(e))throw e;if(s=e,Date.now()>=o)throw t()}}throw s??t()}async function Rt(e,t){return await Lt(e,()=>new Pt,t,()=>!1)}async function zt(e,t,n){return await Lt(async n=>{let r=await e(n);if(Nt.has(r))return r;throw t(r)},()=>t(`deadline-exceeded`,`deadline-exceeded`),n,e=>e instanceof K||e instanceof q)}async function Bt(e,t,n){return await zt(async n=>(await e.request(C.control.outcome.submit,{executionAttemptId:t.executionAttemptId,executionId:t.executionId,result:t.result},{timeout:n})).decision,(e,n)=>n===void 0?new K(e,t.result):new K(e,t.result,n),n)}async function Vt(e,t,n){return await zt(async n=>(await e.request(x.outcome.submit,t,{timeout:n})).decision,(e,n)=>n===void 0?new q(e,t):new q(e,t,n),n)}const Ht={maxRetries:3,baseDelayMs:200,maxDelayMs:2e3,deadlineMs:1e4},Ut={persistentStorage:!0,customCapabilities:[`workflow.local-runtime`,`workflow.thin-runner`],suspensionStrategy:`wait-in-process`,supportsRecovery:!1,materializationModes:[`local-directory`]};function Wt(e){let t=new Set,n;return{conclude:r=>{if(n!==void 0)return;n={evidence:le.parse({source:e.slice(0,S.source),summary:r.slice(0,S.summary),observedAt:new Date().toISOString()})};let i=[...t];t.clear();for(let e of i)try{e(n)}catch(e){console.error(`[PiscinaThinWorkflowProvider] Infrastructure-conclusion observer failed:`,e)}},observe:e=>n===void 0?(t.add(e),()=>t.delete(e)):(e(n),()=>void 0)}}var Gt=class{executionAttemptId;controller;detachCallerAbort;infrastructure;revokeBusIdentity;constructor(e,t,n,r,i){this.executionAttemptId=e,this.controller=t,this.detachCallerAbort=n,this.infrastructure=r,this.revokeBusIdentity=i}cancel(e){return this.controller.abort(e??`Worker cancelled`),this.detachCallerAbort(),Promise.resolve()}terminate(){return this.controller.abort(`Worker terminated`),this.detachCallerAbort(),this.revokeBusIdentity(),Promise.resolve()}release(){return this.detachCallerAbort(),this.revokeBusIdentity(),Promise.resolve()}observeInfrastructureConclusion(e){return this.infrastructure.observe(e)}},Kt=class{options;environment=`piscina`;allocationLifetime=`provisioner-process-bound`;baseCapabilities;constructor(e){this.options=e,this.baseCapabilities=he.parse({...Ut,...e.baseCapabilities,suspensionStrategy:e.baseCapabilities?.suspensionStrategy??Ut.suspensionStrategy,supportsRecovery:!1})}get id(){return this.options.id}get displayName(){return this.options.displayName}async provision(e,t){t.throwIfAborted();let n=new AbortController,r=Wt(this.id),i=()=>{n.abort(t.reason)};t.addEventListener(`abort`,i,{once:!0});let a=()=>t.removeEventListener(`abort`,i),o;try{let{executionAttemptId:i,executionId:s,workerConfig:c}=e;if(!c.busUrl)throw Error(`PiscinaThinWorkflowProvider requires a bus URL to provision an execution attempt (executionAttemptId=${i}, executionId=${s})`);let u=this.buildAllocationRef(i),d=l({executionAttemptId:i,executionId:s});o=d.cleanup;let f=new Gt(i,n,a,r,d.cleanup);t.throwIfAborted();let p=this.options.runner.runWithReadiness({...c,busAuth:{kind:`hmac`,secret:d.secret}},n.signal,e.workerManifest,{executionAttemptId:i,bootstrapDeadlineAt:e.bootstrapDeadlineAt});return p.ready.then(()=>this.submitOutcomeOnSettlement(p.result,s,i,c.workflowId,r.conclude),e=>{n.abort(e),p.result.catch(()=>void 0),r.conclude(`Piscina worker for attempt '${i}' was refused before its workflow run was admitted: `+(e instanceof Error?e.message:String(e)))}),{kind:`allocated`,allocationRef:u,handle:f}}catch(e){throw n.abort(e),a(),o?.(),e}}async submitOutcomeOnSettlement(e,t,n,r,i){let a;try{a=await e}catch(e){a={executionId:t,workflowId:r,status:`failed`,error:e instanceof Error?e.message:String(e)}}try{let e={...Ht,...this.options.outcomeRetry};await Bt(this.options.bus,{executionAttemptId:n,executionId:t,result:a},{retry:e})}catch(e){e instanceof K?console.error(`[PiscinaThinWorkflowProvider] Outcome rejected for execution '${t}' attempt '${n}' (decision=${e.decision}):`,e):console.error(`[PiscinaThinWorkflowProvider] Failed to submit outcome for execution '${t}' attempt '${n}':`,e),i(`Piscina worker for attempt '${n}' ended without an acknowledged outcome because outcome submission could not be completed`)}}buildAllocationRef(e){let t={version:pe,providerId:this.id,providerData:{executionAttemptId:e,allocatedAt:Date.now()}};return me.parse(t)}};const qt=[Re,Fe,Le];function Jt(e){let t;return()=>(t??=(async()=>{let t=[];for(let n of[...e].reverse())try{await n()}catch(e){t.push(e)}if(t.length===1)throw t[0];if(t.length>1)throw AggregateError(t,`Isolated workflow runtime shutdown reported errors`)})(),t)}function Yt(e,t,n){return A({bus:e,currentMachineId:n,resolveLiveAdapterId:e=>t.getExtensionService(E)?.resolveLiveAdapterId(e),resolveLiveAdapterIdentity:e=>t.getExtensionService(E)?.resolveLiveAdapterIdentity(e),listLiveAdapterIdentities:()=>t.getExtensionService(E)?.getLiveAdapterIdentities()??[]})}async function Xt(e){let t=y();t.registerNamespaces([...ue,...de]);let{context:n}=e,r=new xe(t,{surface:`headless`,extensionContextBase:{cwd:n.cwd,platform:n.platform,homedir:n.homedir,makaioHome:n.makaioHome,username:n.username,machineId:n.machineId,tryImport:M}}),i,a=[()=>t.disconnect()],o=Jt(a);try{await e.connectAuthority(t);let s=[...e.contributedPackages,...await e.loadContributedPackages?.(t)??[]],{adapterSubsystemPackage:c}=k({coordinator:r,configRepository:e.configRepository,platformDefaults:{cwd:n.cwd},runtimeSnapshotHandlerPriority:1,runtimeDefinitionHandlerPriority:1,...e.prepareAuthRuntime!==void 0&&{prepareAuthRuntime:e.prepareAuthRuntime}}),l=Ve({definitions:s.flatMap(e=>e.clients??[]),binaryResolutionPolicy:`global-only`});r.registerContributionProcessor(Pe());let u=[...qt,c,Me,...z(s)?[Ie]:[],Ne(1),ze,F,l,...We(s)];r.load(u),a.push(...B(u,t,r)),a.push(()=>r.shutdown()),await r.startAll(),i=Yt(t,r,n.machineId),a.push(()=>{i?.cleanup(),i=void 0});let d=r.getExtensionService(je);if(d===void 0)throw Error(`Isolated workflow tool registry did not start.`);for(let t of e.toolsets)await d.register(t);return await t.emit(Se.ready,{machineId:n.machineId}),{bus:t,coordinator:r,machineId:n.machineId,shutdown:o}}catch(e){throw await o().catch(()=>void 0),e}}function Zt(e){return Number.isInteger(e)&&e>=1&&e<=2147483647}function J(e,t){try{process.kill(-e,t)}catch(e){if(e.code!==`ESRCH`)throw e}}async function Qt(e,t){try{process.kill(-e,0)}catch(e){if(e.code===`ESRCH`)return!1;if(e.code!==`EPERM`)throw e}let n;try{n=await $t(t)}catch{return!0}let r=!1;for(let t of n.trim().split(`
|
|
2
|
-
`)){let[n,i,a]=t.trim().split(/\s+/);if(n===``||i===void 0||a!==void 0||!/^\d+$/.test(n)||i===``||Number(n)===e&&(r=!0,!i.startsWith(`Z`)))return!0}return!r}function $t(e){return new Promise((t,n)=>{d(`ps`,[`-A`,`-o`,`pgid=,stat=`],{timeout:e,maxBuffer:1024*1024},(e,r)=>{if(e!==null){n(e);return}t(r)})})}async function en(e){if(e===void 0)return!0;try{try{J(e,`SIGKILL`)}catch(e){if(e.code!==`EPERM`)throw e}let t=Date.now()+2e3;for(;Date.now()<t;){let n=t-Date.now();if(n<=0)break;if(!await Qt(e,Math.min(1e3,n)))return!0;await tt(20)}}catch{}return!1}async function tn(e){if(e.signal?.aborted)return{status:`cancelled`,exitCode:null};if(!Zt(e.recipe.timeoutMs))return{status:`spawn-failed`,exitCode:null,message:`Setup timeout must be an integer between 1 and 2147483647 milliseconds`};if(process.platform===`win32`)return{status:`spawn-failed`,exitCode:null,message:`Setup process groups require a POSIX host`};try{return await nn(e)}catch{return{status:`spawn-failed`,exitCode:null,message:`Could not start the setup command`}}}function nn(e){return new Promise(t=>{let n=f(e.recipe.command,e.recipe.args,{cwd:e.workspaceRoot,env:{...process.env,...e.recipe.env,...e.env},shell:!1,detached:!0,stdio:`ignore`}),r,i,a=e=>{if(r===void 0&&(r=e,n.pid!==void 0)){try{J(n.pid,`SIGTERM`)}catch(e){if(e.code!==`EPERM`){r=`stop-failed`;return}}i=setTimeout(()=>{try{n.pid!==void 0&&J(n.pid,`SIGKILL`)}catch(e){e.code!==`EPERM`&&(r=`stop-failed`)}},200)}},o=()=>a(`cancelled`),s=setTimeout(()=>a(`timed-out`),e.recipe.timeoutMs);e.signal?.addEventListener(`abort`,o,{once:!0}),e.signal?.aborted&&o(),n.once(`error`,()=>{r=`spawn-failed`}),n.once(`close`,a=>{clearTimeout(s),clearTimeout(i),e.signal?.removeEventListener(`abort`,o),en(n.pid).then(e=>{t({status:e?r??(a===0?`completed`:`failed`):`stop-failed`,exitCode:a})})})})}async function rn(e,t,n){if(h.isAbsolute(t)||t.includes(`\\`)||t.split(`/`).includes(`..`))throw Error(`Source root must be workspace-relative`);let r=e;for(let i of t.split(`/`).filter(e=>e!==``&&e!==`.`))if(r=h.join(r,i),U(r,e,`Source root`),await W(r,e,`Source root`,e),n&&await m.mkdir(r).catch(e=>{if(e.code!==`EEXIST`)throw e}),!(await m.stat(r)).isDirectory())throw Error(`Source root must be a directory`);return W(r,e,`Source root`,e)}async function Y(e){e.signal?.throwIfAborted();let{requirement:t}=e,n=h.resolve(e.workspaceRoot);if(!h.isAbsolute(e.workspaceRoot)||n===h.parse(n).root)throw Error(`Workspace root must be an absolute, non-filesystem-root directory`);if(t.sourceRoots.length>1)throw Error(`Multiple source roots are not implemented`);if(t.sourceRoots.some(e=>e.source!==void 0)){if(e.realizeSource===void 0)throw Error(`Source acquisition requires an installed strategy`);if(t.provisioning!==`create`||t.custody!==`disposable`)throw Error(`Source acquisition currently requires a created disposable workspace`)}if(t.provisioning===`create`&&await m.mkdir(n),!(await m.lstat(n)).isDirectory())throw Error(`Workspace root must be a directory, not a symlink`);let r=await m.realpath(n),i=[];for(let n of t.sourceRoots){let a=await rn(r,n.path,t.provisioning===`create`);n.source!==void 0&&(await e.realizeSource({source:n.source,destination:a,signal:e.signal}),e.signal?.throwIfAborted()),i.push({id:n.id,path:a})}return an(t,{workspaceRoot:r,sourceRoots:i})}function an(e,t){let n=t.workspaceRoot,r=e.custody,i=!1,a=!0,o;return{binding:t,async runSetup(t={}){if(o!==void 0||i||!a)throw Error(`Workspace setup is unavailable`);if(t.signal?.aborted)return{status:`cancelled`,exitCode:null};i=!0;try{for(let[r,i]of e.setup.entries()){let e=await tn({...t,recipe:i,workspaceRoot:n});if(a=e.status!==`stop-failed`,e.status!==`completed`)return{...e,commandIndex:r}}return{status:`completed`,exitCode:0}}finally{i=!1}},release(){return i||!a?Promise.reject(Error(`Workspace commands have not stopped`)):(o??=r===`external`?Promise.resolve():m.rm(n,{recursive:!0,force:!0}),o)}}}function X(e,t){return e instanceof ae?oe(e,t):t?.aborted===!0?e===t.reason||e instanceof DOMException&&e.name===`AbortError`?!0:e instanceof Error&&e.name===`AbortError`&&`code`in e&&e.code===`ABORT_ERR`&&Object.is(e.cause,t.reason):!1}async function on(e,t,n,r){let i=b[`instruction.get`].response.parse(await e.request(x.instruction.get,{executionAttemptId:t,runtimeGeneration:n},{signal:r}));if(i.decision===`found`)return i.instruction;throw Error(`Attempt instruction read refused: ${i.refusalReason}`)}async function sn(e,t,n,r){let{executionAttemptId:i,runtimeGeneration:a}=t,o=b[`operation.admit`].response.parse(await Rt(async t=>await e.request(x.operation.admit,{executionAttemptId:i,runtimeGeneration:a,operationKind:n,admissionKey:r},{timeout:t}),{retry:t.retry,reconnect:t.reconnect}));if(o.decision===`refused`||o.operationId===void 0)throw Error(`Attempt ${n} admission refused: ${o.refusalReason??`missing-operation-id`}`);return o.operationId}function Z(e){return(e instanceof Error?e.message:String(e)).slice(0,8192)||`Local execution failed without a diagnostic message`}function cn(e,t){return e.find(e=>e.kind===t.workload.kind&&e.version===t.workload.version)}function ln(e){return{signal:e??new AbortController().signal,release:()=>{}}}async function Q(e,t,n,r,i,a){let o=await Vt(e,{executionAttemptId:t.executionAttemptId,runtimeGeneration:t.runtimeGeneration,...i===void 0?{}:{operationId:i},outcome:r},{retry:t.retry,reconnect:t.reconnect});if(a!==void 0&&n!==void 0&&r.kind===`workload-result`&&n.preservation.required.length===0)try{await a.release()}catch{console.warn(`[makaio-worker] Acknowledged workspace cleanup failed.`)}return{outcome:r,decision:o}}async function un(e,t,n,r){let i=b[`operation.report`].response.parse(await Rt(async i=>await e.request(x.operation.report,{executionAttemptId:t.executionAttemptId,runtimeGeneration:t.runtimeGeneration,operationId:n,result:{kind:`workspace-prepared`,binding:r.binding}},{timeout:i}),{retry:t.retry,reconnect:t.reconnect}));return i.decision===`refused`?void 0:i.binding}function dn(e){if(e.status!==`completed`)return e.status===`cancelled`?{kind:`cancelled`}:e.status===`stop-failed`?{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace setup stop-failed`}:{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace setup ${e.status}`}}async function fn(e,t,n,r){if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,void 0);let i=await sn(e,t,`workspace-preparation`,`workspace-preparation:${n.id}:${t.runtimeGeneration}`);if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},i,void 0);let a,o;try{if(t.workspaceRoot===void 0)throw Error(`Workspace preparation requires an explicit local root`);let e=await(t.preparation??{prepare:Y}).prepare({requirement:n.workspace,workspaceRoot:t.workspaceRoot,signal:r});a=e,o=await e.runSetup({signal:r,env:t.setupEnv})}catch(o){return await Q(e,t,n,X(o,r)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`workspace-preparation`,message:Z(o)},i,a)}let s=dn(o);if(s!==void 0)return await Q(e,t,n,s,i,a);if(r.aborted)return await Q(e,t,n,{kind:`cancelled`},i,a);let c=await un(e,t,i,a);return c===void 0?await Q(e,t,n,{kind:`technical-failure`,stage:`workspace-preparation`,message:`Workspace preparation report refused by the Authority`},i,a):r.aborted?await Q(e,t,n,{kind:`cancelled`},void 0,a):{handle:a,binding:c}}async function pn(e,t,n,r,i){if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,void 0);let a,o;if(n.workspace!==void 0){let r=await fn(e,t,n,i.signal);if(`outcome`in r)return r;a=r.handle,o=r.binding}if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},void 0,a);let s=await sn(e,t,`workload-invocation`,`workload-invocation:${n.id}:${t.runtimeGeneration}`);if(i.signal.aborted)return await Q(e,t,n,{kind:`cancelled`},s,a);let c;try{c={kind:`workload-result`,result:fe.parse(await r.invoke({instruction:n,...o===void 0?{}:{workspace:o},signal:i.signal}))}}catch(e){c=X(e,i.signal)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`workload-invocation`,message:Z(e)}}return await Q(e,t,n,c,s,a)}async function mn(e,t){let n;try{n=await on(e,t.executionAttemptId,t.runtimeGeneration,t.signal)}catch(n){if(oe(n,t.signal))return await Q(e,t,void 0,{kind:`cancelled`},void 0,void 0);throw n}let r=cn(t.adapters,n);if(r===void 0)return await Q(e,t,n,{kind:`technical-failure`,stage:`startup`,message:`Required adapter '${n.workload.kind}' version '${n.workload.version}' is unavailable`},void 0,void 0);let i;try{i=await(r.bindControl?.({instruction:n,signal:t.signal})??ln(t.signal))}catch(r){let i=X(r,t.signal)?{kind:`cancelled`}:{kind:`technical-failure`,stage:`startup`,message:Z(r)};return await Q(e,t,n,i,void 0,void 0)}try{return await pn(e,t,n,r,i)}finally{try{i.release()}catch{console.warn(`[makaio-worker] Workload control release failed.`)}}}async function hn(e,t,n,r,i){let a=ge[`runtime.inputs.get`].response.parse(await e.request(C.runtime.inputs.get,{executionAttemptId:t},{signal:i}));if(a.runtimeInputs===null)throw Error(`Selected Worker Runtime inputs are unavailable`);return _e.parse({...n,...a.runtimeInputs,createdAt:0,env:r})}function gn(e,t){let n=(e,t)=>{let n=re(e,t);return n===``||!ne(n)&&n!==`..`&&!n.startsWith(`../`)&&!n.startsWith(`..\\`)};return n(e,t)||n(t,e)}async function _n(t,n,r,i){let a=await t.loadContributions(r,i);i.throwIfAborted();let o=e();return await Xt({connectAuthority:e=>t.connectBus(e,n,i),contributedPackages:[...a],configRepository:t.configRepository,context:{cwd:r.workspaceRoot,platform:r.platform,homedir:o,makaioHome:o,username:`workflow-worker`,machineId:`headless-worker-${t.executionAttemptId}`},toolsets:[...t.toolsets],...t.prepareAuthRuntime!==void 0&&{prepareAuthRuntime:t.prepareAuthRuntime}})}function vn(e,t,n){let r={...e.workflowEnv},i,a=!0;return{adapter:{kind:Je,version:Ye,async bindControl({instruction:t,signal:r}){let i=D(t);if(i.executionId!==e.executionId)throw Error(`Workflow instruction execution identity mismatch`);let a=new AbortController,o=n.on(be(i.cancelSubject),()=>a.abort());try{return await se(o),{signal:AbortSignal.any([...r===void 0?[]:[r],a.signal]),release:o}}catch(e){throw o(),e}},async invoke({instruction:o,workspace:s,signal:c}){let l=D(o);a=o.preservation.required.length!==0;let u=c??new AbortController().signal,d;try{u.throwIfAborted();let a=await hn(n,e.executionAttemptId,l,r,u),o=await e.materialize(a,u);(s===void 0||!gn(o.context.workspaceRoot,s.workspaceRoot))&&(i=o.cleanup);let c=yn(o.context,s);return u.throwIfAborted(),d=await _n(e,t,c,u),u.throwIfAborted(),await e.execute(d.bus,a,c,u)}finally{await d?.shutdown()}}},async releaseExecutable(e){e===void 0||a||e.outcome.kind===`workload-result`&&(e.decision!==`accepted`&&e.decision!==`duplicate`||await i?.().catch(()=>void 0))}}}function yn(e,t){return t===void 0?e:{...e,workspaceRoot:t.workspaceRoot}}async function bn(e,t){if(!(t.outcome.kind!==`workload-result`||e.onPostCommit===void 0))try{let n=ve.parse(t.outcome.result);await e.onPostCommit(n,t.decision)}catch{}}async function xn(e,t){t.throwIfAborted();let n={...e.workflowEnv},i=v(),a=await c(e.bootstrapDeadlineAt,t,t=>e.bootstrap(t)),{connection:s,endpoint:l}=await o({executionAttemptId:e.executionAttemptId,runtimeIncarnationId:i,bootstrapDeadlineAt:e.bootstrapDeadlineAt,signal:t,createConnection:()=>Sn(e,a)}),u=s.bus,d=vn({...e,workflowEnv:n},a,u),f;try{let n=await r(u,{executionAttemptId:e.executionAttemptId,runtimeIncarnationId:i,signal:t});return l.bindGeneration(n),f=await mn(u,{executionAttemptId:e.executionAttemptId,runtimeGeneration:n,workspaceRoot:e.workspaceRoot,setupEnv:e.setupEnv,preparation:e.preparation,adapters:[d.adapter],signal:t,retry:e.outcomeRetry,reconnect:()=>u.reconnect()}),await bn(e,f),f}finally{try{await d.releaseExecutable(f)}finally{l.cleanup(),await s.close()}}}function Sn(e,t){let n=y();return n.registerNamespaces([...ue,...de]),{bus:n,async connect(r){try{await e.connectBus(n,t,r),r.throwIfAborted()}catch(e){throw n.disconnect(),e}},close:()=>n.disconnect()}}const Cn=p(d),$=[`-c`,`core.attributesFile=${w}`],wn=u.object({repositoryId:u.string().min(1),revision:u.string().regex(/^(?:[0-9a-f]{40}|[0-9a-f]{64})$/i,`Git source revision must be a full commit object ID`)}).strict();async function Tn(e,t,n){try{let r=await e.resolveRepository(t,n);if(!h.isAbsolute(r))throw Error(`Repository access did not return an absolute path`);return await m.realpath(r)}catch(e){throw X(e,n)?e:Error(`Git source access failed`)}}async function En(e,t,n,r,i){let a;try{a=(await Cn(`git`,[...$,`cat-file`,`-t`,t],{cwd:e,env:{...process.env,...n},signal:i,timeout:r,maxBuffer:1024,shell:!1,killSignal:`SIGKILL`,encoding:`utf8`})).stdout.trim()}catch(e){throw X(e,i)?e:Error(`Git source object inspection failed`)}if(a!==`commit`)throw Error(`Git source revision must identify a commit object`)}function Dn(e){if(!Zt(e.timeoutMs))throw Error(`Git command timeout must be an integer between 1 and 2147483647 milliseconds`);if(process.platform===`win32`)throw Error(`Local Git source preparation requires a POSIX host`);return async({source:t,destination:n,signal:r})=>{if(r?.throwIfAborted(),t.kind!==`git`)throw Error(`Unsupported local Git source kind`);let i=wn.parse(t.input),a=await Tn(e,i.repositoryId,r);r?.throwIfAborted();let o={...Object.fromEntries(Object.keys(process.env).filter(e=>/^git_/i.test(e)).map(e=>[e,void 0])),GIT_CONFIG_GLOBAL:w,GIT_CONFIG_SYSTEM:w,GIT_ATTR_NOSYSTEM:`1`},s=[[`init`,`--object-format=${i.revision.length===64?`sha256`:`sha1`}`],[`fetch`,`--no-tags`,`--no-write-fetch-head`,`--update-shallow`,`--`,a,i.revision],[`checkout`,`--detach`,i.revision,`--`]];for(let t of s){t[0]===`checkout`&&await En(n,i.revision,o,e.timeoutMs,r);let a=await tn({workspaceRoot:n,signal:r,env:o,recipe:{command:`git`,args:[...$,...t],env:{},timeoutMs:e.timeoutMs}});if(a.status===`cancelled`&&r?.throwIfAborted(),a.status!==`completed`)throw Error(`Git source ${t[0]} ${a.status}`)}}}function On(e){let t=Dn(e);return{prepare:e=>Y({...e,realizeSource:t})}}export{ht as A,O as B,_t as C,lt as D,wt as E,F,j as I,M as L,L as M,dt as N,I as O,mt as P,A as R,Ct as S,gt as T,Et as _,Kt as a,W as b,Nt as c,Bt as d,Mt as f,Dt as g,Ot as h,Xt as i,B as j,ut as k,K as l,kt as m,xn as n,q as o,jt as p,mn as r,Pt as s,On as t,Vt as u,H as v,Tt as w,St as x,U as y,k as z};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{caller-owned-adapter-stub-egWCuKcE.mjs → caller-owned-adapter-stub-B-Sq7ZvF.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{execution-attempt-repository-D_qR7NyG.mjs → execution-attempt-repository-DXyh1hgz.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/{extension-package-provenance-CTYdo0yF.mjs → extension-package-provenance-BzvG6rDO.mjs}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -73,8 +73,8 @@ declare const NativeSessionSupervisorNamespace: _$_makaio_core0.BusNamespaceDefi
|
|
|
73
73
|
pid: _$zod.ZodNullable<_$zod.ZodNumber>;
|
|
74
74
|
status: _$zod.ZodEnum<{
|
|
75
75
|
unknown: "unknown";
|
|
76
|
-
exited: "exited";
|
|
77
76
|
running: "running";
|
|
77
|
+
exited: "exited";
|
|
78
78
|
stopped: "stopped";
|
|
79
79
|
}>;
|
|
80
80
|
cwd: _$zod.ZodString;
|
|
@@ -161,8 +161,8 @@ declare const NativeSessionSupervisorSubjects: _$_makaio_core0.BusSubjects<_$_ma
|
|
|
161
161
|
pid: _$zod.ZodNullable<_$zod.ZodNumber>;
|
|
162
162
|
status: _$zod.ZodEnum<{
|
|
163
163
|
unknown: "unknown";
|
|
164
|
-
exited: "exited";
|
|
165
164
|
running: "running";
|
|
165
|
+
exited: "exited";
|
|
166
166
|
stopped: "stopped";
|
|
167
167
|
}>;
|
|
168
168
|
cwd: _$zod.ZodString;
|
|
@@ -186,8 +186,8 @@ declare const NativeSessionSupervisorSubjects: _$_makaio_core0.BusSubjects<_$_ma
|
|
|
186
186
|
*/
|
|
187
187
|
declare const SupervisorSessionStatusSchema: z.ZodEnum<{
|
|
188
188
|
unknown: "unknown";
|
|
189
|
-
exited: "exited";
|
|
190
189
|
running: "running";
|
|
190
|
+
exited: "exited";
|
|
191
191
|
stopped: "stopped";
|
|
192
192
|
}>;
|
|
193
193
|
type SupervisorSessionStatus = z.infer<typeof SupervisorSessionStatusSchema>;
|
|
@@ -275,8 +275,8 @@ declare const SupervisorRuntimeSnapshotSchema: z.ZodObject<{
|
|
|
275
275
|
pid: z.ZodNullable<z.ZodNumber>;
|
|
276
276
|
status: z.ZodEnum<{
|
|
277
277
|
unknown: "unknown";
|
|
278
|
-
exited: "exited";
|
|
279
278
|
running: "running";
|
|
279
|
+
exited: "exited";
|
|
280
280
|
stopped: "stopped";
|
|
281
281
|
}>;
|
|
282
282
|
cwd: z.ZodString;
|
|
@@ -316,8 +316,8 @@ declare const NativeSupervisorStatusSchema: {
|
|
|
316
316
|
pid: z.ZodNullable<z.ZodNumber>;
|
|
317
317
|
status: z.ZodEnum<{
|
|
318
318
|
unknown: "unknown";
|
|
319
|
-
exited: "exited";
|
|
320
319
|
running: "running";
|
|
320
|
+
exited: "exited";
|
|
321
321
|
stopped: "stopped";
|
|
322
322
|
}>;
|
|
323
323
|
cwd: z.ZodString;
|
|
@@ -395,8 +395,8 @@ declare const NativeSessionSupervisorSchemas: {
|
|
|
395
395
|
pid: z.ZodNullable<z.ZodNumber>;
|
|
396
396
|
status: z.ZodEnum<{
|
|
397
397
|
unknown: "unknown";
|
|
398
|
-
exited: "exited";
|
|
399
398
|
running: "running";
|
|
399
|
+
exited: "exited";
|
|
400
400
|
stopped: "stopped";
|
|
401
401
|
}>;
|
|
402
402
|
cwd: z.ZodString;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -28,8 +28,8 @@ declare const WorkerBootstrapGrantedClaimResponseSchema: z.ZodObject<{
|
|
|
28
28
|
/** Non-secret refusals shared with start authorization plus remote claim eligibility. */
|
|
29
29
|
declare const WorkerBootstrapClaimRefusalReasonSchema: z.ZodEnum<{
|
|
30
30
|
resolved: "resolved";
|
|
31
|
-
fenced: "fenced";
|
|
32
31
|
"not-found": "not-found";
|
|
32
|
+
fenced: "fenced";
|
|
33
33
|
"allocation-terminated": "allocation-terminated";
|
|
34
34
|
"gate-closed": "gate-closed";
|
|
35
35
|
"bootstrap-expired": "bootstrap-expired";
|
|
@@ -51,8 +51,8 @@ declare const WorkerBootstrapClaimResponseSchema: z.ZodDiscriminatedUnion<[z.Zod
|
|
|
51
51
|
status: z.ZodLiteral<"refused">;
|
|
52
52
|
reason: z.ZodEnum<{
|
|
53
53
|
resolved: "resolved";
|
|
54
|
-
fenced: "fenced";
|
|
55
54
|
"not-found": "not-found";
|
|
55
|
+
fenced: "fenced";
|
|
56
56
|
"allocation-terminated": "allocation-terminated";
|
|
57
57
|
"gate-closed": "gate-closed";
|
|
58
58
|
"bootstrap-expired": "bootstrap-expired";
|
|
@@ -678,8 +678,8 @@ declare const WorkerSchemas$1: {
|
|
|
678
678
|
decision: z.ZodEnum<{
|
|
679
679
|
accepted: "accepted";
|
|
680
680
|
duplicate: "duplicate";
|
|
681
|
-
conflict: "conflict";
|
|
682
681
|
fenced: "fenced";
|
|
682
|
+
conflict: "conflict";
|
|
683
683
|
}>;
|
|
684
684
|
}, z.core.$strict>;
|
|
685
685
|
};
|
|
@@ -712,8 +712,8 @@ declare const WorkerSchemas$1: {
|
|
|
712
712
|
status: z.ZodLiteral<"refused">;
|
|
713
713
|
reason: z.ZodEnum<{
|
|
714
714
|
resolved: "resolved";
|
|
715
|
-
fenced: "fenced";
|
|
716
715
|
"not-found": "not-found";
|
|
716
|
+
fenced: "fenced";
|
|
717
717
|
"allocation-terminated": "allocation-terminated";
|
|
718
718
|
"gate-closed": "gate-closed";
|
|
719
719
|
"bootstrap-expired": "bootstrap-expired";
|
|
@@ -1203,8 +1203,8 @@ declare const WorkerNamespace: _$_makaio_core0.BusNamespaceDefinition<"worker",
|
|
|
1203
1203
|
decision: _$zod.ZodEnum<{
|
|
1204
1204
|
accepted: "accepted";
|
|
1205
1205
|
duplicate: "duplicate";
|
|
1206
|
-
conflict: "conflict";
|
|
1207
1206
|
fenced: "fenced";
|
|
1207
|
+
conflict: "conflict";
|
|
1208
1208
|
}>;
|
|
1209
1209
|
}, _$zod_v4_core0.$strict>;
|
|
1210
1210
|
};
|
|
@@ -1226,8 +1226,8 @@ declare const WorkerNamespace: _$_makaio_core0.BusNamespaceDefinition<"worker",
|
|
|
1226
1226
|
status: _$zod.ZodLiteral<"refused">;
|
|
1227
1227
|
reason: _$zod.ZodEnum<{
|
|
1228
1228
|
resolved: "resolved";
|
|
1229
|
-
fenced: "fenced";
|
|
1230
1229
|
"not-found": "not-found";
|
|
1230
|
+
fenced: "fenced";
|
|
1231
1231
|
"allocation-terminated": "allocation-terminated";
|
|
1232
1232
|
"gate-closed": "gate-closed";
|
|
1233
1233
|
"bootstrap-expired": "bootstrap-expired";
|
|
@@ -1651,8 +1651,8 @@ declare const WorkerSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Flat
|
|
|
1651
1651
|
decision: _$zod.ZodEnum<{
|
|
1652
1652
|
accepted: "accepted";
|
|
1653
1653
|
duplicate: "duplicate";
|
|
1654
|
-
conflict: "conflict";
|
|
1655
1654
|
fenced: "fenced";
|
|
1655
|
+
conflict: "conflict";
|
|
1656
1656
|
}>;
|
|
1657
1657
|
}, _$zod_v4_core0.$strict>;
|
|
1658
1658
|
};
|
|
@@ -1674,8 +1674,8 @@ declare const WorkerSubjects$1: _$_makaio_core0.BusSubjects<_$_makaio_core0.Flat
|
|
|
1674
1674
|
status: _$zod.ZodLiteral<"refused">;
|
|
1675
1675
|
reason: _$zod.ZodEnum<{
|
|
1676
1676
|
resolved: "resolved";
|
|
1677
|
-
fenced: "fenced";
|
|
1678
1677
|
"not-found": "not-found";
|
|
1678
|
+
fenced: "fenced";
|
|
1679
1679
|
"allocation-terminated": "allocation-terminated";
|
|
1680
1680
|
"gate-closed": "gate-closed";
|
|
1681
1681
|
"bootstrap-expired": "bootstrap-expired";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|