@makaio/framework 1.0.0-dev-1785409369816 → 1.0.0-dev-1786014320559
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 +4 -3
- package/dist/{account-identity-DFx8pwKL.mjs → account-identity-DGpXd8h_.mjs} +1 -1
- package/dist/adapter-BkdJaOOG.mjs +1 -0
- package/dist/adapter-subsystem/index.d.mts +138 -6
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/adapters/acp-client/index.d.mts +105 -7
- package/dist/adapters/acp-client/index.mjs +2 -2
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +362 -801
- package/dist/adapters/index.mjs +6 -6
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/adapters/stream-session/index.d.mts +28 -7
- package/dist/adapters/stream-session/index.mjs +1 -1
- package/dist/agent-namespace-D51PODFf.mjs +1 -0
- package/dist/{ajv-DD3SIL2i.mjs → ajv-L5fKxaia.mjs} +2 -2
- package/dist/artifact-k3veR4Yx.mjs +1 -0
- package/dist/attach-error-BSlc7JfL.mjs +1 -0
- package/dist/{auth-DGEdiHF6.mjs → auth-A1K_7q-8.mjs} +1 -1
- package/dist/authority-state-bootstrap-YwtEImIB.mjs +1 -0
- package/dist/automation-trigger-CuSdQwir.mjs +1 -0
- package/dist/await-trigger-ph1S0zVI.mjs +1 -0
- package/dist/bus/index.d.mts +19 -5
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-BIj0_aG6.mjs +1 -0
- package/dist/bus-CqgrphNE.mjs +2 -0
- package/dist/{canonical-model-BAytQ4NV.mjs → canonical-model-DJASlL4m.mjs} +1 -1
- package/dist/{capabilities-BQEp34ir.mjs → capabilities-Bqckjh7G.mjs} +1 -1
- package/dist/{client-DbS847wW.mjs → client-BL5__WT0.mjs} +1 -1
- package/dist/clients/index.d.mts +2 -2
- 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-74fFeBha.mjs → compression-BbttSqm8.mjs} +1 -1
- package/dist/{config-namespace-TVX-hG4I.mjs → config-namespace-CyzeLWSg.mjs} +1 -1
- package/dist/{context-resolution-DdyhpH4L.d.mts → context-resolution-CW0ya4QO.d.mts} +13 -13
- package/dist/contracts/adapter/index.d.mts +3 -3
- 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 +3 -3
- 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/automation-trigger/index.d.mts +4 -0
- package/dist/contracts/automation-trigger/index.mjs +1 -0
- 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 +1 -1
- package/dist/contracts/capabilities/index.mjs +1 -1
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +1 -1
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +6 -5
- 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 +181 -120
- 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/reaction/index.d.mts +2 -0
- package/dist/contracts/reaction/index.mjs +1 -0
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +3 -3
- 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 +1 -1
- package/dist/contracts/worker-node/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/contribution-BH-wKsWI.d.mts +35 -0
- package/dist/core/index.d.mts +60 -1
- package/dist/core/index.mjs +1 -1
- package/dist/definition-BYgHlmMw.d.mts +375 -0
- package/dist/{definition-CJfiv8xm.mjs → definition-CDg-Jq1T.mjs} +1 -1
- package/dist/{detached-extension-handle-Ddfquy5_.mjs → detached-extension-handle-DKd17UB6.mjs} +1 -1
- package/dist/drizzle/0031_adapter_session_currency.sql +66 -0
- package/dist/drizzle/0032_native_session_ownership.sql +77 -0
- package/dist/drizzle/0033_m_msf3hu2s.sql +1 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/{execution-attempt-repository-DWXKY41_.d.mts → execution-attempt-repository-DFyAnchJ.d.mts} +1 -1
- package/dist/{execution-target-Cf645pDj.mjs → execution-target-ByNwZh5-.mjs} +1 -1
- package/dist/extension-DMdmj9gi.mjs +1 -0
- package/dist/extension-DUmibvMk.mjs +1 -0
- package/dist/extension-context-CqfddWXs.d.mts +295 -0
- package/dist/{extension-discovery-CQRdbVQ6.d.mts → extension-discovery-Fhps4icD.d.mts} +2 -0
- package/dist/{extension-namespace-Yu41YepM.mjs → extension-namespace-B554RmCp.mjs} +1 -1
- package/dist/extension-package-provenance-Dh_-Z-tE.mjs +1 -0
- package/dist/{filesystem-service-DlP2HfDg.mjs → filesystem-service-FAtd9gWH.mjs} +1 -1
- package/dist/framework-packages-D_2hBZ-p.mjs +1 -0
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-1yCVCk8s.mjs → globby-BBLuT_vy.mjs} +1 -1
- package/dist/handlers-2yd00VEq.mjs +57 -0
- package/dist/{harness-DpwsFsE7.mjs → harness-KxbWGL4I.mjs} +1 -1
- package/dist/{hook-responses-Dh1PWXqJ.d.mts → hook-responses-CQZIv3L3.d.mts} +2 -293
- package/dist/{index-DCZ8BX9S.d.mts → index-3eUIRy7T.d.mts} +304 -74
- package/dist/{index-brqfk9JQ.d.mts → index-B4xdTT3c.d.mts} +6 -6
- package/dist/{index-4VfqCjl2.d.mts → index-B5op6AsV.d.mts} +49 -39
- package/dist/{index-CMgLxw14.d.mts → index-B6GOuxVy2.d.mts} +18 -18
- package/dist/index-BFhJe-Sb.d.mts +302 -0
- package/dist/{index-EjsSBQXy2.d.mts → index-BSQ30wYP.d.mts} +1 -1
- package/dist/{index-DlsHL9Jg.d.mts → index-BiAYXjgM.d.mts} +25 -25
- package/dist/{index-B9UW_vPM.d.mts → index-ByZi9bml.d.mts} +4967 -1509
- package/dist/{index-BVlXneHH.d.mts → index-C7HcDpHE.d.mts} +14 -10
- package/dist/{index-BskPjMet.d.mts → index-CB4aIUoF.d.mts} +16 -16
- package/dist/{index-cqLS1eFV.d.mts → index-CDusRXio.d.mts} +70 -71
- package/dist/{index-DnG-QFpG.d.mts → index-CSN_0sCo.d.mts} +18 -1
- package/dist/{index-BAXkicoQ.d.mts → index-C__EQfKa.d.mts} +1 -1
- package/dist/{index-CLvQsL6s2.d.mts → index-CqQYgsbB.d.mts} +1660 -218
- package/dist/{index-BNMnIe-j.d.mts → index-CwDiyJkJ.d.mts} +276 -705
- package/dist/{index-GHASUiem.d.mts → index-DBadVauL.d.mts} +1 -1
- package/dist/{index-gUhidukN.d.mts → index-DI7-tIL3.d.mts} +299 -2
- package/dist/index-DP3o_13U.d.mts +165 -0
- package/dist/{index-DSBT83c0.d.mts → index-DcYAAJ0V.d.mts} +24 -3
- package/dist/{index-D5Nb7IEP.d.mts → index-Dch_AxUg.d.mts} +77 -39
- package/dist/{index-D_ODXsBv.d.mts → index-DcqSUsX6.d.mts} +35 -79
- package/dist/{index-B0Kf_OWi.d.mts → index-DgOfgjx3.d.mts} +1 -1
- package/dist/{index-Ds5_rDEJ.d.mts → index-DwLRZscE.d.mts} +1 -12
- package/dist/{index-DkiTJM5p.d.mts → index-DxYDRoDE2.d.mts} +17 -3
- package/dist/{index-CRvpVIqA.d.mts → index-OsbtyMgx2.d.mts} +10 -1
- package/dist/{index-BaZeoZoS.d.mts → index-bIe_57cL.d.mts} +1 -1
- package/dist/{json-value-Brslhqbm.d.mts → json-value-C1RGgS0a.d.mts} +16 -1
- package/dist/{json-value-DmU8ibo_.mjs → json-value-D57aJhVn.mjs} +1 -1
- 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 +9 -9
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/namespace/index.d.mts +2 -2
- 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-C7-s68uf.mjs → lib-B_rJ6r0T.mjs} +1 -1
- package/dist/{lib-DErgth_E.mjs → lib-CnOAtohU.mjs} +1 -1
- package/dist/load-extensions-CW9uzNR5.mjs +1 -0
- package/dist/{load-extensions-BxsDB87B.d.mts → load-extensions-DUpaMQ7G.d.mts} +17 -13
- package/dist/{materialization-Jd198K3y.mjs → materialization-CcpCDhXh.mjs} +1 -1
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/model-ZH3L1dPW.mjs +1 -0
- package/dist/{namespace-BqxtpNAn.mjs → namespace-B7bntOB8.mjs} +1 -1
- package/dist/{namespace-CWUDFGOy.mjs → namespace-BFqkUTJp.mjs} +1 -1
- package/dist/{namespace-CjjFvrIA2.d.mts → namespace-CAy4P5mW.d.mts} +29 -29
- package/dist/{namespace-B8uKAzWJ.mjs → namespace-CFjdyNXG.mjs} +1 -1
- package/dist/{namespace-DV-Hr9sZ.d.mts → namespace-ChnRTUG4.d.mts} +11 -1
- package/dist/namespace-CxrOLeeP.mjs +1 -0
- package/dist/{namespace-g_mbIZq_.d.mts → namespace-DSlfFhB1.d.mts} +410 -26
- package/dist/{namespace-CupOzbRv.d.mts → namespace-DwZwGXgF.d.mts} +24 -20
- package/dist/{namespace-TseEI3Pu.d.mts → namespace-Rge9mMI-.d.mts} +36 -28
- package/dist/{native-session-supervisor-DRx0MX-d.mjs → native-session-supervisor-fZYPUk0-.mjs} +1 -1
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/{orchestrator-shared-BHCv-l2O.d.mts → orchestrator-shared-B-KRW1Z0.d.mts} +1 -0
- package/dist/orchestrator-shared-CTCZc6Vl.mjs +1 -0
- package/dist/ownership-memory-handler-Bblp93YC.mjs +1 -0
- package/dist/{package-DWMxGfzK.d.mts → package-Bf3hyuzs.d.mts} +234 -84
- package/dist/package-CBdvjyyZ.mjs +1 -0
- package/dist/package-CddkNbZI.mjs +1 -0
- package/dist/package-ypz4rKvn.mjs +7 -0
- package/dist/package.json +1 -1
- package/dist/{profile-BTAI31Nt.mjs → profile-BtznZlq3.mjs} +1 -1
- package/dist/{provider-context-Dq53Cgzz.mjs → provider-context-BrLZYnDW.mjs} +1 -1
- package/dist/{provider-context-PZIQWcqQ.mjs → provider-context-Dh-VOOYF.mjs} +1 -1
- package/dist/reaction-BS0k4eNN.mjs +1 -0
- package/dist/{registry-wfF2uTty.mjs → registry-BO_bOoky.mjs} +2 -2
- package/dist/{resolved-DZgqql2Z.mjs → resolved-DMByz1_2.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/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-Dd-e89MO.mjs → schema-DBG7Jq5_.mjs} +1 -1
- package/dist/{schema-DKUb4rkr.d.mts → schema-DKTzriEY.d.mts} +519 -9
- package/dist/{schemas-DrVg4aQQ.d.mts → schemas-9qeeHGBf.d.mts} +8 -8
- package/dist/{schemas-CRB2O5zo.mjs → schemas-BqD8LlQw.mjs} +1 -1
- package/dist/{schemas-DaHQzpgm.mjs → schemas-CsjN7cmM.mjs} +1 -1
- package/dist/schemas-DSkBOdx_.mjs +1 -0
- package/dist/schemas-DplrlAyR.mjs +1 -0
- package/dist/{schemas-DnYiAvfz.d.mts → schemas-VbB1FTxx.d.mts} +24 -20
- package/dist/scoped-bus-ClwTWqX8.mjs +1 -0
- package/dist/{selection-BNwTKEVT.mjs → selection-7Ku8DBnh.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 +4 -4
- package/dist/services/adapter-subsystem/index.mjs +1 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +2 -2
- 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/automation-trigger/index.d.mts +943 -0
- package/dist/services/automation-trigger/index.mjs +1 -0
- 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 +4 -4
- 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/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/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 +459 -93
- 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 +3 -3
- 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-context/index.mjs +1 -1
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +2 -2
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +10 -10
- 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 +2 -2
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.d.mts +12 -4
- package/dist/services/session/testing/index.mjs +36 -4
- 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 +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/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 +1 -1
- package/dist/services/workflow-transitions/index.mjs +1 -1
- package/dist/session-BMy2kRpX.mjs +90 -0
- package/dist/session-Cipx34j6.mjs +1 -0
- package/dist/{session-lineage-B_JW5LpF.d.mts → session-lineage-B_PVa1XN.d.mts} +1 -1
- package/dist/shared-BFVuCDPx.mjs +1 -0
- package/dist/{skill-BR6rkfLe.mjs → skill-C1D51nhh.mjs} +1 -1
- package/dist/{src-DD0v-nIj.mjs → src-xbmzokNe.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 +42 -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/tool-approval-service-BVgN9Q1r.mjs +1 -0
- package/dist/{tools-PdG9fO1M.mjs → tools-DxwHox1a.mjs} +1 -1
- package/dist/{transition-Du3MQzJV.d.mts → transition-BF1nevaC.d.mts} +7 -34
- package/dist/{types-DMLDHFR9.d.mts → types-BNjPhj_a.d.mts} +1 -1
- package/dist/{types-Dzrwa1GY.d.mts → types-CijlWGwb.d.mts} +2036 -618
- package/dist/types-ClpEaoAm.d.mts +2917 -0
- package/dist/{types-D7_kevBK.d.mts → types-xCdGghb2.d.mts} +1 -1
- package/dist/ui-hooks/index.d.mts +29 -2
- package/dist/ui-hooks/index.mjs +1 -1
- package/dist/ui-kernel/index.d.mts +2 -2
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/ui-views/index.d.mts +1 -1
- package/dist/utils/index.d.mts +77 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/{version-CoCeMxDT.mjs → version-BfNnVAGr.mjs} +1 -1
- package/dist/{view-builder-DeFd-k7C.d.mts → view-builder-Bc9dx6jF.d.mts} +1 -1
- package/dist/{visibility-qhGWmpSJ.mjs → visibility-Dl1o2I01.mjs} +1 -1
- package/dist/{worker-node-Bl9_vqYi.mjs → worker-node-BDOYPEpi.mjs} +1 -1
- package/dist/{worker-node-DZTuT1DS.mjs → worker-node-DJ41Tr-F.mjs} +1 -1
- package/dist/workflow-Hzc5jlnV.mjs +1 -0
- package/dist/workflow-engine/execution-attempt-repository.d.mts +1 -1
- package/dist/workflow-engine/index.d.mts +114 -395
- package/dist/workflow-engine/index.mjs +1 -1
- package/dist/workflow-engine/package.d.mts +1 -1
- package/dist/workflow-engine/package.mjs +1 -1
- package/dist/workflow-engine/provider-operation.d.mts +1 -1
- package/dist/workflow-engine/testing/index.d.mts +2 -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 +27 -27
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-engine/workflow-trigger-binding-consumer.d.mts +46 -0
- package/dist/workflow-engine/workflow-trigger-binding-consumer.mjs +1 -0
- package/dist/{workflow-transitions-DSc45ixc.mjs → workflow-transitions-DM0fN_eP.mjs} +1 -1
- package/dist/workflow-worker-DARC7UZl.mjs +1 -0
- package/dist/zod-json-schema-BAGAFfCN.mjs +1 -0
- package/package.json +29 -1
- package/dist/adapter-D5c5LrPN.mjs +0 -1
- package/dist/artifact-DGiXqb11.mjs +0 -1
- package/dist/attach-error-C3tngg6J.mjs +0 -1
- package/dist/authority-state-bootstrap-GPL_tqaT.mjs +0 -1
- package/dist/await-trigger-I3lrepb8.mjs +0 -1
- package/dist/bus-B6SAjgOC.mjs +0 -2
- package/dist/bus-C2l3K74u.mjs +0 -1
- package/dist/extension-DCA4pYrY.mjs +0 -1
- package/dist/extension-hjOPs10e.mjs +0 -1
- package/dist/framework-packages-C3RWfJDk.mjs +0 -1
- package/dist/handlers-CfnLyLfE.mjs +0 -57
- package/dist/load-extensions-D0DfjYLC.mjs +0 -1
- package/dist/model-BGgVmRnN.mjs +0 -1
- package/dist/namespace-DJfUADSV.mjs +0 -1
- package/dist/orchestrator-shared-BxmHCPvx.mjs +0 -1
- package/dist/package-CNUPPcU1.mjs +0 -7
- package/dist/package-Dft_RItb.mjs +0 -1
- package/dist/schemas-Cm09dXL4.mjs +0 -1
- package/dist/scoped-bus-C9BdNwfM.mjs +0 -1
- package/dist/session-BOGCd18q.mjs +0 -1
- package/dist/session-BTFiDoGz.mjs +0 -76
- package/dist/shared-BQ0CHIVy.mjs +0 -1
- package/dist/tool-approval-service-kBA0fRzm.mjs +0 -1
- package/dist/types-CJ_QZ1yW.d.mts +0 -1487
- package/dist/workflow-BfDbgtIQ.mjs +0 -1
- package/dist/workflow-worker-BN9XPxQO.mjs +0 -1
- package/dist/{adapter-auth-runtime-DO-FVTXg.mjs → adapter-auth-runtime-D9Lnl7cc.mjs} +0 -0
- package/dist/{adapter-binding-DQchUtrK.d.mts → adapter-binding-B-FBoCys.d.mts} +0 -0
- package/dist/{attempt-record-codec-CqO1_XnE.mjs → attempt-record-codec-DaFLKR5C.mjs} +0 -0
- package/dist/{base-orchestrator-BilsQNW1.d.mts → base-orchestrator-D9u4NyiM.d.mts} +0 -0
- package/dist/{capability-service-BqiLlRGA.mjs → capability-service-CJHNkjvm.mjs} +0 -0
- package/dist/{client-B--e2qcU.d.mts → client-4ihewPUm.d.mts} +0 -0
- package/dist/{client-binary-version-verifier-taewmKTY.mjs → client-binary-version-verifier-DJajc_Ff.mjs} +0 -0
- package/dist/{client-binary-version-verifier-CgjM_vGF.d.mts → client-binary-version-verifier-jDDZ64Ah.d.mts} +0 -0
- package/dist/{clients-namespace-DfxjG2ZP.d.mts → clients-namespace-DFWuUawf.d.mts} +0 -0
- package/dist/{config-namespace-BCqvufbD.d.mts → config-namespace-D1kyZj0B.d.mts} +0 -0
- package/dist/{create-static-mount-bbQhTt6W.mjs → create-static-mount-9tnGpIeK.mjs} +0 -0
- package/dist/{cross-spawn-B57KZuns.mjs → cross-spawn-BIgueAqr.mjs} +0 -0
- package/dist/{cursor-storage-DIFK_9hg.mjs → cursor-storage-ROWfiTh1.mjs} +0 -0
- package/dist/{definition-gnKgXU91.d.mts → definition-DB-kKc0d.d.mts} +0 -0
- package/dist/{definitions-xrrY0wgz.mjs → definitions-CF6YmEhL.mjs} +0 -0
- package/dist/{descriptor-to-package-DvF08krT.mjs → descriptor-to-package-BecVCopf.mjs} +0 -0
- package/dist/{drizzle-z_0SiGY8.mjs → drizzle-CPv3vdTE.mjs} +0 -0
- package/dist/{esm-CltRnX8_.mjs → esm-CBFWM8u_.mjs} +0 -0
- package/dist/{event-CmVjR6Ib.mjs → event-DR8U9Efx.mjs} +0 -0
- package/dist/{facet-BCI00njh.mjs → facet-DVsW12iF.mjs} +0 -0
- package/dist/{filesystem-service-CQ9yVkSz.d.mts → filesystem-service-Cm2RHKBa.d.mts} +0 -0
- package/dist/{handler-Cbv9FqDO.mjs → handler-Bqlk-6BY.mjs} +0 -0
- package/dist/{host-Caq6ZfSJ.mjs → host-k5yoyKHg.mjs} +0 -0
- package/dist/{identity-D6guMtmi.mjs → identity-DC3Pk0ps.mjs} +0 -0
- package/dist/{index-dtsLKOID.d.mts → index-42UdYStR.d.mts} +0 -0
- package/dist/{index-DR40QWlw.d.mts → index-BJAB-BW_.d.mts} +0 -0
- package/dist/{index-Dm1nUxCF.d.mts → index-BJMezANn.d.mts} +0 -0
- package/dist/{index-CnMu8BQl.d.mts → index-BQprJNA_.d.mts} +0 -0
- package/dist/{index-Cv-o5Krs.d.mts → index-BRCrFirq.d.mts} +0 -0
- package/dist/{index-BVRQEpAg.d.mts → index-BRzHs7Bx.d.mts} +6 -6
- /package/dist/{index-DXN_L5D6.d.mts → index-BSbGB23v.d.mts} +0 -0
- /package/dist/{index-vA--0lOM.d.mts → index-BVcQcphK.d.mts} +0 -0
- /package/dist/{index-ye0oklfU.d.mts → index-BcvqDfcN.d.mts} +0 -0
- /package/dist/{index-CGZQVTid.d.mts → index-BeENojSx2.d.mts} +0 -0
- /package/dist/{index-DjgLchuQ.d.mts → index-Beo_Ik8-.d.mts} +0 -0
- /package/dist/{index-sS6KUlrx.d.mts → index-BgGe9WZz.d.mts} +0 -0
- /package/dist/{index-CWHfOz6d.d.mts → index-CK3f0bAL.d.mts} +0 -0
- /package/dist/{index-DZunhZec.d.mts → index-CQuRTeRa.d.mts} +0 -0
- /package/dist/{index-jTaAHsul.d.mts → index-CRmE88hi.d.mts} +0 -0
- /package/dist/{index-CjdRdsd0.d.mts → index-CvW9_SzR.d.mts} +0 -0
- /package/dist/{index-ByKi34v5.d.mts → index-CxSSdIZz.d.mts} +0 -0
- /package/dist/{index-vcSj12YQ.d.mts → index-E4SET1AA.d.mts} +0 -0
- /package/dist/{index-DN4NOCqN2.d.mts → index-Ol9RBB0W2.d.mts} +0 -0
- /package/dist/{index-BIdsFcQs2.d.mts → index-aoxdnhJ42.d.mts} +0 -0
- /package/dist/{index-SsBHjUqA.d.mts → index-nydhGvXa.d.mts} +0 -0
- /package/dist/{jsonl-transport-bQl3JwIu.mjs → jsonl-transport-Bp_6pB2a.mjs} +0 -0
- /package/dist/{lib-DOBXZmYX.mjs → lib-Bwdd2m81.mjs} +0 -0
- /package/dist/{model-registry-CmgcPDH3.mjs → model-registry-Y854mUml.mjs} +0 -0
- /package/dist/{model-registry-xyBKSye-.mjs → model-registry-yURX738J.mjs} +0 -0
- /package/dist/{modes-BheyN7SS.mjs → modes-DmUsjHdV.mjs} +0 -0
- /package/dist/{namespace-HO2J9sO8.mjs → namespace-B9FEGuEu.mjs} +0 -0
- /package/dist/{namespace-jDhZjw-i.d.mts → namespace-Bi3CmYQy.d.mts} +0 -0
- /package/dist/{namespace-GPA7zots.d.mts → namespace-BusZERU8.d.mts} +0 -0
- /package/dist/{namespace-BOkKoq34.d.mts → namespace-ByP1Iipi.d.mts} +0 -0
- /package/dist/{namespace-YytVKIgI.d.mts → namespace-C1D77w7U.d.mts} +0 -0
- /package/dist/{namespace-CErHuXtb.d.mts → namespace-C6CVEGH8.d.mts} +0 -0
- /package/dist/{namespace-C-9si-fV.mjs → namespace-CfIW0hpQ.mjs} +0 -0
- /package/dist/{namespace-YxU1xf-K.mjs → namespace-CkBbNFSU.mjs} +0 -0
- /package/dist/{namespace-DWCEo-9M.d.mts → namespace-DX1Ec15L.d.mts} +0 -0
- /package/dist/{namespace-CWGKCNZm.mjs → namespace-DbNWsPFY.mjs} +0 -0
- /package/dist/{namespace-Cv1RFP7n.d.mts → namespace-Dgg0uoe6.d.mts} +0 -0
- /package/dist/{namespace-tGRAod3o.d.mts → namespace-s2y_NFKf.d.mts} +0 -0
- /package/dist/{namespace-Blp4c8GK.d.mts → namespace-yREpGJgG.d.mts} +0 -0
- /package/dist/{out-CvjtANXN.mjs → out-DrhwCgqM.mjs} +0 -0
- /package/dist/{packages-DtEEP0Vt.mjs → packages-FBv3fAOR.mjs} +0 -0
- /package/dist/{packages-BZ6pzFIq.d.mts → packages-N3-2Kl-Y.d.mts} +0 -0
- /package/dist/{platform-Bv8llU9c.mjs → platform-BrsMv_S3.mjs} +0 -0
- /package/dist/{provider-operation-Cxoe2SUr.d.mts → provider-operation-DJ_TLZFf.d.mts} +0 -0
- /package/dist/{providers-Co5UszRH.mjs → providers-CCcn4Ndp.mjs} +0 -0
- /package/dist/{providers-namespace-DjFkmvBR.d.mts → providers-namespace-DeJBh6MP.d.mts} +0 -0
- /package/dist/{quick-lru-CrOpWwrf.mjs → quick-lru-uwB0hP-y.mjs} +0 -0
- /package/dist/{schema-introspection-DgWQCpwx.mjs → schema-introspection-C1wvklj9.mjs} +0 -0
- /package/dist/{schema-Db-y-09L.mjs → schema-jIapW8Kb.mjs} +0 -0
- /package/dist/{schemas-CR8hSqTy.d.mts → schemas-B7zo7Zcx.d.mts} +0 -0
- /package/dist/{schemas-CqRm0i9a.mjs → schemas-BNdiVBWh.mjs} +0 -0
- /package/dist/{schemas-B1NWNASS.d.mts → schemas-C-Bm6Oac.d.mts} +0 -0
- /package/dist/{schemas-BO7uOum6.d.mts → schemas-CD0wOQxx.d.mts} +0 -0
- /package/dist/{schemas-N6x2z7Lf.d.mts → schemas-CeUI2i5j.d.mts} +0 -0
- /package/dist/{schemas-CwbYk_kZ.d.mts → schemas-Cg-Kwp8c.d.mts} +0 -0
- /package/dist/{schemas-BtZqovRH.d.mts → schemas-Cv3rR9Sz.d.mts} +0 -0
- /package/dist/{schemas-tDf_WiC8.mjs → schemas-CvHFbzdy.mjs} +0 -0
- /package/dist/{schemas-BsVYZviy.d.mts → schemas-DZH9lpxs.d.mts} +0 -0
- /package/dist/{schemas-BGExwp3j.mjs → schemas-DgwEVUt-.mjs} +0 -0
- /package/dist/{schemas-Bfxskx_2.mjs → schemas-mLpOfMoN.mjs} +0 -0
- /package/dist/{schemas-CQyRBqD6.d.mts → schemas-qA279_j_.d.mts} +0 -0
- /package/dist/{schemas-miYxK_Z1.d.mts → schemas-sMoRnBdZ.d.mts} +0 -0
- /package/dist/{semver-DlM8znk4.mjs → semver-DTXuyLcK.mjs} +0 -0
- /package/dist/{server-lifecycle-Dsq56aqC.d.mts → server-lifecycle-C_8iKgat.d.mts} +0 -0
- /package/dist/{server-lifecycle-kmQ5PUDv.mjs → server-lifecycle-DKx_fWlq.mjs} +0 -0
- /package/dist/{shared-schemas-DXwyMCwZ.mjs → shared-schemas-aahW97QW.mjs} +0 -0
- /package/dist/{src-CCu8TwL6.mjs → src-DHqsl5Pg.mjs} +0 -0
- /package/dist/{storage-namespace-BSrv0vXR.mjs → storage-namespace-Dz2jsssp.mjs} +0 -0
- /package/dist/{storage-namespace-dfywhXR3.d.mts → storage-namespace-Tf3P5yJ5.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-BvlX0QV_.d.mts → storage-namespace-definition-BsnYAPot.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-CkMKt7-I.mjs → storage-namespace-definition-CDef0E20.mjs} +0 -0
- /package/dist/{supports-color-DUugCQsK.mjs → supports-color-i7OTnKcZ.mjs} +0 -0
- /package/dist/{telemetry-Pr3oP2rk.mjs → telemetry-BvCBUjFg.mjs} +0 -0
- /package/dist/{timeout-DWDhddRJ.mjs → timeout-B0nYjLc8.mjs} +0 -0
- /package/dist/{tray-menu-service-BBLa-Rcv.mjs → tray-menu-service-Deo6yyP8.mjs} +0 -0
- /package/dist/{types-BrcjaNPZ.d.mts → types-CNS55jvt.d.mts} +0 -0
- /package/dist/{types-b54n1o57.d.mts → types-Ce6LL25v.d.mts} +0 -0
- /package/dist/{ui-config-CyCdlns_.mjs → ui-config-BIyGzMNL.mjs} +0 -0
- /package/dist/{variant-krjlTdJt.mjs → variant-B4uWdxW7.mjs} +0 -0
- /package/dist/{window-registry-BDnZLPVx.d.mts → window-registry-BLtVx3Iw.d.mts} +0 -0
- /package/dist/{window-registry-I-imZHV_.mjs → window-registry-CoBJq3u4.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,C as o,Cn as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,Gt as g,H as _,Ht as v,I as y,It as b,J as x,Jt as S,K as C,Kt as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as N,Pt as P,Q as F,Qt as I,R as L,Rt as R,S as z,Sn as B,St as V,T as H,Tn as U,Tt as W,U as G,Ut as K,V as q,Vt as J,W as Y,Wt as X,X as Z,Xt as Q,Y as $,Yt as ee,Z as te,Zt as ne,_ as re,_n as ie,_t as ae,a as oe,an as se,at as ce,b as le,bn as ue,bt as de,c as fe,cn as pe,ct as me,d as he,dn as ge,dt as _e,en as ve,et as ye,f as be,fn as xe,ft as Se,g as Ce,gn as we,gt as Te,h as Ee,hn as De,ht as Oe,i as ke,in as Ae,it as je,j as Me,jt as Ne,k as Pe,kt as Fe,l as Ie,ln as Le,lt as Re,m as ze,mn as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,on as Ke,ot as qe,p as Je,pn as Ye,pt as Xe,q as Ze,qt as Qe,r as $e,rn as et,rt as tt,s as nt,sn as rt,st as it,t as at,tn as ot,tt as st,u as ct,un as lt,ut,v as dt,vn as ft,vt as pt,w as mt,wn as ht,wt as gt,x as _t,xn as vt,xt as yt,y as bt,yn as xt,yt as St,z as Ct,zt as wt}from"../../workflow-
|
|
1
|
+
import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,C as o,Cn as s,Ct as c,D as l,Dt as u,E as d,Et as f,F as p,Ft as m,G as h,Gt as g,H as _,Ht as v,I as y,It as b,J as x,Jt as S,K as C,Kt as w,L as T,Lt as E,M as D,Mt as O,N as k,Nt as A,O as j,Ot as M,P as N,Pt as P,Q as F,Qt as I,R as L,Rt as R,S as z,Sn as B,St as V,T as H,Tn as U,Tt as W,U as G,Ut as K,V as q,Vt as J,W as Y,Wt as X,X as Z,Xt as Q,Y as $,Yt as ee,Z as te,Zt as ne,_ as re,_n as ie,_t as ae,a as oe,an as se,at as ce,b as le,bn as ue,bt as de,c as fe,cn as pe,ct as me,d as he,dn as ge,dt as _e,en as ve,et as ye,f as be,fn as xe,ft as Se,g as Ce,gn as we,gt as Te,h as Ee,hn as De,ht as Oe,i as ke,in as Ae,it as je,j as Me,jt as Ne,k as Pe,kt as Fe,l as Ie,ln as Le,lt as Re,m as ze,mn as Be,mt as Ve,n as He,nn as Ue,nt as We,o as Ge,on as Ke,ot as qe,p as Je,pn as Ye,pt as Xe,q as Ze,qt as Qe,r as $e,rn as et,rt as tt,s as nt,sn as rt,st as it,t as at,tn as ot,tt as st,u as ct,un as lt,ut,v as dt,vn as ft,vt as pt,w as mt,wn as ht,wt as gt,x as _t,xn as vt,xt as yt,y as bt,yn as xt,yt as St,z as Ct,zt as wt}from"../../workflow-Hzc5jlnV.mjs";export{Ze as ArtifactPublishTargetSchema,x as ArtifactQuerySourceSchema,Ee as AutomationWorkflowTrigger,Ce as BUS_EVENT_AUTOMATION_TRIGGER_KIND,$ as BusEventPublishTargetSchema,re as BusEventWorkflowTrigger,Z as BusRequestSourceSchema,dt as CRON_AUTOMATION_TRIGGER_KIND,j as CompleteExternalExecutionRequestSchema,te as ContextBundleSchema,F as ContextPublishTargetSchema,e as ContextSourceSchema,bt as CronAutomationTriggerParamsSchema,le as CronWorkflowTrigger,_t as DEFAULT_CRON_TIMEZONE,V as EXECUTIONS_BY_ARTIFACT_REFS_DEFAULT_LIMIT_PER_REF,c as EXECUTIONS_BY_ARTIFACT_REFS_MAX_LIMIT_PER_REF,gt as EXECUTIONS_BY_ARTIFACT_REFS_MAX_REFS,W as EXECUTION_LIST_DEFAULT_LIMIT,f as EXECUTION_LIST_MAX_LIMIT,u as EXECUTION_LIST_MIN_LIMIT,Pe as EXTERNAL_EXECUTION_ID_PREFIX,je as ExecutionLinkListQuerySchema,ce as ExecutionLinkSchema,qe as ExecutionLinkTypeSchema,M as ExecutionListCursorSchema,Fe as ExecutionListQuerySchema,r as ExecutionStatusSchema,Ne as ExecutionsByArtifactRefsQuerySchema,n as ExternalExecutionFrameCompletionSchema,Me as ExternalExecutionFrameStartSchema,O as GateInstanceListQuerySchema,st as JsonPatchOperationSchema,A as LoopGateOutcomeSchema,D as RegisterExternalExecutionRequestSchema,ye as ResolvedContextEntrySchema,it as SpanRecordSchema,me as SpanStatusSchema,Re as StepCancelPayloadSchema,ut as StepRunConfigSchema,_e as StepRunResultSchema,Se as StepRunnerBusAuthSchema,Xe as StepRunnerPlatformDefaultsSchema,Ve as StepTelemetrySchema,Oe as TokenUsageSchema,at as TransitionActionInvocationSchema,He as TransitionConditionSchema,$e as TransitionEventTypeSchema,ke as TransitionRuleDefinitionSchema,Te as WORKFLOW_CANCELLED_REASON,k as WorkLogArtifactWriteSchema,N as WorkLogDynamicNodeMaterializationSchema,p as WorkLogExecutionSummarySchema,y as WorkLogFrameEntrySchema,T as WorkLogGateEventSchema,L as WorkLogStatsSchema,Ct as WorkLogUsageSummarySchema,q as WorkerContributionManifestSchema,P as WorkflowArtifactBindingSchema,s as WorkflowArtifactRefSchema,m as WorkflowArtifactWriteDeclarationSchema,b as WorkflowAutomationTriggerBindingSchema,ae as WorkflowCancelPayloadSchema,E as WorkflowConditionSchema,R as WorkflowDefinitionProvenanceSchema,wt as WorkflowDefinitionSchema,a as WorkflowDelegateAgentNodeSchema,lt as WorkflowDelegateEconomicsSchema,ge as WorkflowDelegateResultFinalizationGatewayRequestSchema,xe as WorkflowDelegateResultFinalizationRequestSchema,Ye as WorkflowDelegateResultFinalizationResponseSchema,Be as WorkflowDelegateResultFinalizerIdSchema,J as WorkflowDelegateRoleNodeSchema,De as WorkflowDelegateToolObservationSchema,v as WorkflowDynamicRegionSchema,We as WorkflowError,tt as WorkflowErrorCode,K as WorkflowExecutionSchema,X as WorkflowExecutionScopeSchema,we as WorkflowFinalizationClaimSchema,ie as WorkflowFinalizationDeliveryResultSchema,ft as WorkflowFinalizationIntentSchema,xt as WorkflowFinalizerIdSchema,g as WorkflowFrameStateSchema,w as WorkflowGateInstanceSchema,Qe as WorkflowGateNodeSchema,S as WorkflowGateStatusSchema,ee as WorkflowIterateChainNodeSchema,Q as WorkflowIterateNodeSchema,ne as WorkflowListQuerySchema,I as WorkflowLoopNodeSchema,mt as WorkflowNamespace,t as WorkflowNodeBaseSchema,ve as WorkflowNodeSchema,ot as WorkflowNodeTypeSchema,Ue as WorkflowParallelModeSchema,et as WorkflowParallelNodeSchema,H as WorkflowProgressUpdateSchema,Ae as WorkflowResolvedAgentSchema,se as WorkflowResolvedRoleSchema,i as WorkflowRunContextSchema,_ as WorkflowRunResultSchema,pt as WorkflowRunnerStepTypeSchema,d as WorkflowSchemas,Ke as WorkflowSequenceNodeSchema,rt as WorkflowSourceLocationSchema,pe as WorkflowStateDefinitionSchema,Le as WorkflowStationNodeSchema,St as WorkflowStepTypeSchema,l as WorkflowSubjects,ue as WorkflowTerminalStatusSchema,G as WorkflowTriggerModeSchema,Y as WorkflowWorkerBusAuthSchema,h as WorkflowWorkerConfigSchema,C as WorkflowWorkerSourceSchema,de as createStepCancelSubject,yt as createWorkflowCancelSubject,vt as createWorkflowDelegateResultFinalizerNamespace,B as createWorkflowFinalizerNamespace,Ge as defineWorkflow,oe as defineWorkflowBundle,nt as delegateToAgent,fe as delegateToRole,Ie as gate,ct as iterate,he as iterateChain,be as loop,ht as parseArtifactRef,z as projectWorkflowGraph,U as serializeArtifactRef,Je as station,ze as validateNoNestedLoops,o as walkWorkflowDefinition};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { l as AutomationTriggerType } from "./definition-BYgHlmMw.mjs";
|
|
2
|
+
import { n as NodeExtensionContext, t as ExtensionContext } from "./extension-context-CqfddWXs.mjs";
|
|
3
|
+
|
|
4
|
+
//#region core/contracts/src/automation-trigger/contribution.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Executable automation trigger contribution surface declared by an extension.
|
|
7
|
+
*
|
|
8
|
+
* The runtime calls `createAutomationTriggers(ctx)` during extension activation
|
|
9
|
+
* and registers the returned {@link AutomationTriggerType}s with the trigger
|
|
10
|
+
* registry. The registry enforces that each trigger's `kind` is prefixed with
|
|
11
|
+
* the contributing extension's name.
|
|
12
|
+
*
|
|
13
|
+
* Trigger definitions carry live Zod parameter and event schemas and a trusted
|
|
14
|
+
* `activate` factory — they are runtime values and must never be included in
|
|
15
|
+
* serializable descriptor metadata. Use {@link createAutomationTriggerDescriptor}
|
|
16
|
+
* to produce the serializable representation for Builder discovery.
|
|
17
|
+
* @typeParam THostContext - Concrete context shape supplied by the host runtime.
|
|
18
|
+
* Defaults to {@link NodeExtensionContext} because the current framework hosts
|
|
19
|
+
* are Node-based.
|
|
20
|
+
*/
|
|
21
|
+
interface ExtensionAutomationTriggersContribution<THostContext extends ExtensionContext = NodeExtensionContext> {
|
|
22
|
+
/**
|
|
23
|
+
* Factory that produces the automation trigger definitions for this extension.
|
|
24
|
+
*
|
|
25
|
+
* Called during extension activation. The returned list is the extension's
|
|
26
|
+
* complete trigger batch and atomically replaces any prior batch registered
|
|
27
|
+
* under this extension's name. Returning a `Promise` allows async resource
|
|
28
|
+
* acquisition (e.g. lazy loading or config resolution).
|
|
29
|
+
* @param context - Per-extension runtime context supplied by the host.
|
|
30
|
+
* @returns Trigger definitions or a promise that resolves to them.
|
|
31
|
+
*/
|
|
32
|
+
readonly createAutomationTriggers: (context: THostContext) => readonly AutomationTriggerType[] | Promise<readonly AutomationTriggerType[]>;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { ExtensionAutomationTriggersContribution as t };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -831,6 +831,65 @@ declare function nestSubjectDefinitions<Domain extends string, T extends Record<
|
|
|
831
831
|
*/
|
|
832
832
|
declare function getFullSubjectForSubjectDefinition(subject: SubjectDefinition): string;
|
|
833
833
|
//#endregion
|
|
834
|
+
//#region core/makaio-core/src/subject-helpers/namespace-wildcard-subject.d.ts
|
|
835
|
+
/**
|
|
836
|
+
* Builds the namespace-level wildcard subject definition for one namespace.
|
|
837
|
+
*
|
|
838
|
+
* This is the canonical construction of the `$all` wildcard: a namespace exposes
|
|
839
|
+
* exactly one, and every consumer that needs to observe a whole namespace —
|
|
840
|
+
* including code that derives a wildcard from a concrete subject key — must build
|
|
841
|
+
* it through this helper rather than re-stating the literal. The wildcard is
|
|
842
|
+
* always an event subject and never local or channel-bound, because it stands for
|
|
843
|
+
* "every event in this namespace" rather than for any one subject's routing.
|
|
844
|
+
*
|
|
845
|
+
* A wildcard subject resolves to the full subject key `<namespace>.*`, which the
|
|
846
|
+
* bus's subscription matching reads as "every subject directly in this
|
|
847
|
+
* namespace". It deliberately does not cross a `:` namespace-hierarchy boundary.
|
|
848
|
+
* @typeParam Namespace - Namespace the wildcard belongs to.
|
|
849
|
+
* @param namespace - Namespace to build the wildcard for, e.g. `git` or
|
|
850
|
+
* `storage:workflow`.
|
|
851
|
+
* @returns The wildcard subject definition of that namespace.
|
|
852
|
+
*/
|
|
853
|
+
declare function createNamespaceWildcardSubject<Namespace extends string>(namespace: Namespace): WildcardSubjectDefinition<Namespace>;
|
|
854
|
+
//#endregion
|
|
855
|
+
//#region core/makaio-core/src/subject-helpers/split-subject-key.d.ts
|
|
856
|
+
/** The two segments a full bus subject key decomposes into. */
|
|
857
|
+
interface SubjectKeySegments {
|
|
858
|
+
/**
|
|
859
|
+
* Namespace part of the key.
|
|
860
|
+
*
|
|
861
|
+
* Everything before the **first** dot, colons included: `:` is a namespace
|
|
862
|
+
* *hierarchy* boundary, not a namespace/subject separator, so
|
|
863
|
+
* `storage:workflow.list` has namespace `storage:workflow`.
|
|
864
|
+
*/
|
|
865
|
+
readonly namespace: string;
|
|
866
|
+
/** Subject part of the key: everything after the first dot. */
|
|
867
|
+
readonly subject: string;
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* Splits a full bus subject key into its namespace and subject segments.
|
|
871
|
+
*
|
|
872
|
+
* A full subject key is always `<namespace>.<subject>` with both segments
|
|
873
|
+
* non-empty. `.event`, `event.`, and a key with no dot at all are all equally
|
|
874
|
+
* unaddressable — none of them names a namespace-and-subject pair any emitter can
|
|
875
|
+
* produce — so all three are rejected rather than reported as a partial split.
|
|
876
|
+
*
|
|
877
|
+
* Returning `undefined` instead of throwing keeps the decision at the call site:
|
|
878
|
+
* a subject *pattern* being validated wants a domain error naming the pattern,
|
|
879
|
+
* while a subject the framework itself constructed wants an assertion. Neither
|
|
880
|
+
* wants this helper's phrasing.
|
|
881
|
+
* @param key - Full bus subject key or namespace-level wildcard pattern.
|
|
882
|
+
* @returns The two segments, or `undefined` when `key` is not a full subject key.
|
|
883
|
+
* @example
|
|
884
|
+
* ```typescript
|
|
885
|
+
* splitSubjectKey('git.worktree'); // { namespace: 'git', subject: 'worktree' }
|
|
886
|
+
* splitSubjectKey('storage:workflow.list'); // { namespace: 'storage:workflow', subject: 'list' }
|
|
887
|
+
* splitSubjectKey('github.*'); // { namespace: 'github', subject: '*' }
|
|
888
|
+
* splitSubjectKey('nodot'); // undefined
|
|
889
|
+
* ```
|
|
890
|
+
*/
|
|
891
|
+
declare function splitSubjectKey(key: string): SubjectKeySegments | undefined;
|
|
892
|
+
//#endregion
|
|
834
893
|
//#region core/makaio-core/src/subject-helpers/is-request-schema.d.ts
|
|
835
894
|
/**
|
|
836
895
|
* Type guard to check if a schema is a request schema.
|
|
@@ -1335,4 +1394,4 @@ declare const observability: {
|
|
|
1335
1394
|
attribute<TSchema extends z.ZodType>(schema: TSchema, attributeName?: string): TSchema;
|
|
1336
1395
|
};
|
|
1337
1396
|
//#endregion
|
|
1338
|
-
export { type AnyHandler, type AnyMessageContext, AuthenticationError, type BaseMessageContext, type BaseSubjectSchema, type BusNamespaceDefinition, type BusSubjects, type ChannelSubjectSchema, type CollectorOnlySubjectSchema, ConfigError, type ContextForSubjectDefinition, type CreateBusNamespaceOptions, type DefaultTransportsSubjectSchema, DirectoryNotFoundError, type EventContext, type EventHandler, type EventMessagePayload, type EventSchema, type ExtractSubjectPayload, type ExtractSubjectResponse, type FilterOperator, type FilterPayloadFromSchemas, type FilterablePayloadIntersection, type FlatSubjectDefinitions, type HandlerForSubjectDefinition, type HostLocalRequestSubjectSchema, type IConfigStorage, type InferSchemaPayload, type InferSubjectMeta, InvalidModelError, type LocalSubjectSchema, type MakaioBusLike, type MakaioContext, MakaioError, type MessageOrigin, type MessagePayload, ModelUnavailableError, type NamespaceRegistrationOptions, type NestedSubjectDefinitions, OBSERVABILITY_META_KEY, type ObservabilityFieldPolicy, type ObservabilityFieldVisibility, type ObservabilitySchemaPolicy, type OptionalResult, type PayloadFilter, type PrincipalContext, QuotaExceededError, RateLimitError, type RegistrableBusNamespaceDefinition, type RequestContext, type RequestHandler, type RequestMessagePayload, type RequestSchema, type SchemaRecord, type SchemaViolationReport, type ScopedSubjectDefinition, type SubjectDefinition, type SubjectRecord, type SubjectRecordFromSchemaRecord, type SubjectSchema, type TransportPeerContext, type TransportReceiveContext, type TransportRoutingDefault, type TypedPayloadFilter, type WildcardContext, type WildcardSubject, type WildcardSubjectDefinition, WildcardSubjectKey, type WildcardUnifiedHandler, channelSubject, collectorOnlySubject, createBusNamespace, createMakaioContext, defaultTransports, getFullSubjectForSubjectDefinition, getObservabilityFieldPolicy, getObservabilitySchemaPolicy, hostLocalRequest, isChannelSchema, isCollectorOnlySchema, isDefaultTransportsSchema, isHostLocalRequestSchema, isLocalSchema, isOperatorObject, isRequestSchema, localSubject, nestSubjectDefinitions, observability, unwrapSchema };
|
|
1397
|
+
export { type AnyHandler, type AnyMessageContext, AuthenticationError, type BaseMessageContext, type BaseSubjectSchema, type BusNamespaceDefinition, type BusSubjects, type ChannelSubjectSchema, type CollectorOnlySubjectSchema, ConfigError, type ContextForSubjectDefinition, type CreateBusNamespaceOptions, type DefaultTransportsSubjectSchema, DirectoryNotFoundError, type EventContext, type EventHandler, type EventMessagePayload, type EventSchema, type ExtractSubjectPayload, type ExtractSubjectResponse, type FilterOperator, type FilterPayloadFromSchemas, type FilterablePayloadIntersection, type FlatSubjectDefinitions, type HandlerForSubjectDefinition, type HostLocalRequestSubjectSchema, type IConfigStorage, type InferSchemaPayload, type InferSubjectMeta, InvalidModelError, type LocalSubjectSchema, type MakaioBusLike, type MakaioContext, MakaioError, type MessageOrigin, type MessagePayload, ModelUnavailableError, type NamespaceRegistrationOptions, type NestedSubjectDefinitions, OBSERVABILITY_META_KEY, type ObservabilityFieldPolicy, type ObservabilityFieldVisibility, type ObservabilitySchemaPolicy, type OptionalResult, type PayloadFilter, type PrincipalContext, QuotaExceededError, RateLimitError, type RegistrableBusNamespaceDefinition, type RequestContext, type RequestHandler, type RequestMessagePayload, type RequestSchema, type SchemaRecord, type SchemaViolationReport, type ScopedSubjectDefinition, type SubjectDefinition, type SubjectKeySegments, type SubjectRecord, type SubjectRecordFromSchemaRecord, type SubjectSchema, type TransportPeerContext, type TransportReceiveContext, type TransportRoutingDefault, type TypedPayloadFilter, type WildcardContext, type WildcardSubject, type WildcardSubjectDefinition, WildcardSubjectKey, type WildcardUnifiedHandler, channelSubject, collectorOnlySubject, createBusNamespace, createMakaioContext, createNamespaceWildcardSubject, defaultTransports, getFullSubjectForSubjectDefinition, getObservabilityFieldPolicy, getObservabilitySchemaPolicy, hostLocalRequest, isChannelSchema, isCollectorOnlySchema, isDefaultTransportsSchema, isHostLocalRequestSchema, isLocalSchema, isOperatorObject, isRequestSchema, localSubject, nestSubjectDefinitions, observability, splitSubjectKey, unwrapSchema };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as e}from"zod";function t(e){if(typeof e!=`object`||!e)return!1;let t=e;return`$in`in t||`$ne`in t||`$exists`in t||`$startsWith`in t||`$endsWith`in t}const n=`*`;function r(t){return typeof t==`object`&&!!t&&`request`in t&&`response`in t&&t.request instanceof e.ZodType&&t.response instanceof e.ZodType}function
|
|
1
|
+
import{z as e}from"zod";function t(e){if(typeof e!=`object`||!e)return!1;let t=e;return`$in`in t||`$ne`in t||`$exists`in t||`$startsWith`in t||`$endsWith`in t}const n=`*`;function r(e){return{subject:`*`,$meta:{namespace:e,isRequest:!1,payload:{},local:!1,channel:!1}}}function i(t){return typeof t==`object`&&!!t&&`request`in t&&`response`in t&&t.request instanceof e.ZodType&&t.response instanceof e.ZodType}function a(e){return typeof e==`object`&&!!e&&`__channel`in e&&e.__channel===!0&&`schema`in e}function o(e){return{__channel:!0,schema:e}}function s(e){return typeof e==`object`&&!!e&&`__local`in e&&e.__local===!0&&`schema`in e}function c(e){return{__local:!0,schema:e}}function l(e){return typeof e==`object`&&!!e&&`__hostLocalRequest`in e&&e.__hostLocalRequest===!0&&`schema`in e}function u(e){return{__hostLocalRequest:!0,schema:e}}function d(e){return typeof e==`object`&&!!e&&`__defaultTransports`in e&&(e.__defaultTransports===`all`||e.__defaultTransports===`local-only`)&&`schema`in e}function f(e,t){return{__defaultTransports:t,schema:e}}function p(e){return typeof e==`object`&&!!e&&`__collectorOnly`in e&&e.__collectorOnly===!0&&`schema`in e}function m(e){return{__collectorOnly:!0,schema:e}}function h(e){return s(e)||p(e)||a(e)||l(e)||d(e)?e.schema:e}function g(e,t,n){let o={};for(let[r,c]of Object.entries(t)){let t=r.split(`.`),u=o;for(let e=0;e<t.length-1;e++)u[t[e]]??={},u=u[t[e]];let f=s(c),p=a(c),m=l(c),g=d(c)?c.__defaultTransports:n,_={subject:r,$meta:{namespace:e,isRequest:i(h(c)),local:f,channel:p,...m&&{hostLocalRequest:m},...g!==void 0&&{defaultTransports:g}}};u[t[t.length-1]]=_}return o.$all=r(e),o}function _(e){return`${e.$meta.namespace}.${e.subject}`}function v(e){let t=e.indexOf(`.`);if(!(t<=0||t===e.length-1))return{namespace:e.slice(0,t),subject:e.slice(t+1)}}function y(e,t,n){let r=n?.defaultTransports,i;if(n!==void 0){let{defaultTransports:e,...t}=n;i=Object.keys(t).length>0?t:void 0}return{name:e,subjects:g(e,t,r),schemas:t,...i===void 0?{}:{options:i},...r===void 0?{}:{defaultTransports:r}}}e.object({cwd:e.string(),env:e.record(e.string(),e.string()),platform:e.enum([`posix`,`windows`]),signal:e.custom().optional(),constraints:e.record(e.string(),e.unknown()).optional(),sessionId:e.string().optional(),subagentId:e.string().optional(),subagentDepth:e.number().optional()});function b(){return typeof process>`u`?`posix`:process.platform===`win32`?`windows`:`posix`}const x=[`API_KEY`,`APIKEY`,`SECRET`,`TOKEN`,`PASSWORD`,`CREDENTIAL`,`PRIVATE_KEY`,`PRIVATEKEY`,`AUTH`,`BEARER`,`ACCESS_KEY`,`ACCESSKEY`];function S(e){let t=e.toUpperCase();return x.some(e=>t.includes(e))}function C(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&!S(n)&&(t[n]=r);return t}function w(e){let t=typeof process<`u`?process.cwd():`/`,n=typeof process<`u`?C(process.env):{};return{cwd:e?.cwd??t,env:e?.env??n,platform:e?.platform??b(),signal:e?.signal,constraints:e?.constraints,sessionId:e?.sessionId,subagentId:e?.subagentId,subagentDepth:e?.subagentDepth}}var T=class extends Error{subject;constructor(e,t){super(e),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},E=class extends T{subject;constructor(e,t){super(`Invalid model specified: ${e}`),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},D=class extends T{subject;constructor(e,t){super(`Directory does not exist: ${e}`),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},O=class extends T{subject;constructor(e,t){super(e),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},k=class extends T{code=`rate_limit`},A=class extends T{code=`auth`},j=class extends T{code=`model_unavailable`},M=class extends T{code=`quota_exceeded`};const N=`makaio.observability`;function P(e){let t=e.meta()?.[N];if(typeof t!=`object`||!t)return;let n=t;return n.kind===`schema`||n.kind===`field`?n:void 0}function F(e,t){return e.meta({...e.meta(),[N]:t})}function I(t){if(t instanceof e.ZodOptional||t instanceof e.ZodNullable||t instanceof e.ZodDefault||t instanceof e.ZodCatch||t instanceof e.ZodReadonly)return t.unwrap()}function L(e){let t=e;for(;t;){let e=P(t);if(e?.kind===`field`)return e;t=I(t)}}function R(e){let t=P(e);if(t?.kind===`schema`)return{traceAll:t.traceAll}}function z(e){let t=L(e);if(t)return{visibility:t.visibility,attributeName:t.attributeName}}const B={schema(e,t){return F(e,{kind:`schema`,traceAll:t.traceAll})},field(e,t){return F(e,{kind:`field`,visibility:t.visibility,attributeName:t.attributeName})},hidden(e){return F(e,{kind:`field`,visibility:`hidden`})},count(e,t){return F(e,{kind:`field`,visibility:`count`,attributeName:t})},attribute(e,t){return F(e,{kind:`field`,visibility:`attribute`,attributeName:t})}};export{A as AuthenticationError,O as ConfigError,D as DirectoryNotFoundError,E as InvalidModelError,T as MakaioError,j as ModelUnavailableError,N as OBSERVABILITY_META_KEY,M as QuotaExceededError,k as RateLimitError,n as WildcardSubjectKey,o as channelSubject,m as collectorOnlySubject,y as createBusNamespace,w as createMakaioContext,r as createNamespaceWildcardSubject,f as defaultTransports,_ as getFullSubjectForSubjectDefinition,z as getObservabilityFieldPolicy,R as getObservabilitySchemaPolicy,u as hostLocalRequest,a as isChannelSchema,p as isCollectorOnlySchema,d as isDefaultTransportsSchema,l as isHostLocalRequestSchema,s as isLocalSchema,t as isOperatorObject,i as isRequestSchema,c as localSubject,g as nestSubjectDefinitions,B as observability,v as splitSubjectKey,h as unwrapSchema};
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { a as JsonValue$1 } from "./json-value-C1RGgS0a.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
4
|
+
|
|
5
|
+
//#region core/contracts/src/automation-trigger/schemas.d.ts
|
|
6
|
+
/** Dot-separated local portion of an automation trigger kind. */
|
|
7
|
+
declare const AutomationTriggerLocalNameSchema$1: z.ZodString;
|
|
8
|
+
declare const AutomationTriggerKindSchema: z.ZodString;
|
|
9
|
+
/**
|
|
10
|
+
* Serializable descriptor advertising a contributed automation trigger.
|
|
11
|
+
*
|
|
12
|
+
* Carries only discoverable metadata and derived JSON Schema representations of
|
|
13
|
+
* the parameter and event shapes. The live Zod schemas and activate function are
|
|
14
|
+
* never serialized — runtime truth is always the live {@link AutomationTriggerType}
|
|
15
|
+
* contributed by the owning extension.
|
|
16
|
+
*/
|
|
17
|
+
declare const AutomationTriggerDescriptorSchema: z.ZodObject<{
|
|
18
|
+
kind: z.ZodString;
|
|
19
|
+
label: z.ZodString;
|
|
20
|
+
description: z.ZodString;
|
|
21
|
+
categories: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
22
|
+
parameterSchema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
23
|
+
eventSchema: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
24
|
+
workflowCompatible: z.ZodBoolean;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
/** Serializable descriptor advertising a contributed automation trigger. */
|
|
27
|
+
type AutomationTriggerDescriptor$1 = z.infer<typeof AutomationTriggerDescriptorSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Serializable binding reference linking an active automation trigger to its
|
|
30
|
+
* configuration parameters.
|
|
31
|
+
*
|
|
32
|
+
* Validated as a JSON-safe record so bindings stay serializable and can be
|
|
33
|
+
* persisted in workflow definitions.
|
|
34
|
+
*/
|
|
35
|
+
declare const AutomationTriggerBindingSchema: z.ZodObject<{
|
|
36
|
+
kind: z.ZodString;
|
|
37
|
+
params: z.ZodType<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>, z.core.$ZodTypeInternals<Record<string, _$_makaio_contracts0.JsonValue>, Record<string, _$_makaio_contracts0.JsonValue>>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region core/contracts/src/automation-trigger/definition.d.ts
|
|
41
|
+
/**
|
|
42
|
+
* JSON-compatible parameter map passed to a trigger's {@link AutomationTriggerType.activate}
|
|
43
|
+
* function.
|
|
44
|
+
*/
|
|
45
|
+
type AutomationTriggerParams = Readonly<Record<string, JsonValue$1>>;
|
|
46
|
+
/**
|
|
47
|
+
* JSON-compatible payload produced by a trigger's live event schema and
|
|
48
|
+
* delivered to listeners after an {@link AutomationTriggerActivationContext.emit}
|
|
49
|
+
* call.
|
|
50
|
+
*/
|
|
51
|
+
type AutomationTriggerPayload = JsonValue$1;
|
|
52
|
+
/**
|
|
53
|
+
* Cleanup function returned by {@link AutomationTriggerType.activate}.
|
|
54
|
+
*
|
|
55
|
+
* Called by the runtime when the trigger binding is detached or the runtime
|
|
56
|
+
* shuts down. May be synchronous or asynchronous.
|
|
57
|
+
*
|
|
58
|
+
* **Lifecycle ordering invariant:** the runtime aborts the activation
|
|
59
|
+
* {@link AutomationTriggerActivationContext.signal} and then awaits this
|
|
60
|
+
* cleanup. Implementations must be idempotent — the runtime calls this at most
|
|
61
|
+
* once, but implementations should tolerate a double-disposal without error to
|
|
62
|
+
* allow defensive guard callers. Use the returned cleanup as the primary
|
|
63
|
+
* teardown mechanism; use `signal` only for cancelling in-flight async work.
|
|
64
|
+
*/
|
|
65
|
+
type AutomationTriggerCleanup$1 = () => void | Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Listener registered for automation trigger events.
|
|
68
|
+
*
|
|
69
|
+
* Called each time the active trigger emits via its activation context.
|
|
70
|
+
* @param event - Fully typed trigger event envelope.
|
|
71
|
+
* @returns `void` or a `Promise<void>` to allow async side-effects.
|
|
72
|
+
*/
|
|
73
|
+
type AutomationTriggerListener$1 = (event: AutomationTriggerEvent) => void | Promise<void>;
|
|
74
|
+
/**
|
|
75
|
+
* Serializable reference to an active trigger binding.
|
|
76
|
+
*
|
|
77
|
+
* Stores the canonical trigger {@link kind} and the JSON-safe parameter input
|
|
78
|
+
* that the runtime parses before calling {@link AutomationTriggerType.activate}.
|
|
79
|
+
* Bindings are persisted in workflow definitions; runtime truth is always the
|
|
80
|
+
* live trigger.
|
|
81
|
+
*/
|
|
82
|
+
interface AutomationTriggerBinding$1 {
|
|
83
|
+
/** Canonical trigger kind, optionally owned by an npm-scoped extension. */
|
|
84
|
+
readonly kind: string;
|
|
85
|
+
/** JSON-safe parameter schema input for this binding. */
|
|
86
|
+
readonly params: Readonly<Record<string, JsonValue$1>>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Event envelope emitted by an active automation trigger.
|
|
90
|
+
*
|
|
91
|
+
* Produced by the trigger's activation context {@link AutomationTriggerActivationContext.emit}
|
|
92
|
+
* and delivered to registered {@link AutomationTriggerListener}s.
|
|
93
|
+
* @typeParam TPayload - JSON-compatible event payload shape.
|
|
94
|
+
*/
|
|
95
|
+
interface AutomationTriggerEvent<TPayload extends JsonValue$1 = JsonValue$1> {
|
|
96
|
+
/** Canonical trigger kind that emitted this event. */
|
|
97
|
+
readonly kind: string;
|
|
98
|
+
/** Event payload validated by the trigger's live `eventSchema`. */
|
|
99
|
+
readonly payload: Readonly<TPayload>;
|
|
100
|
+
/**
|
|
101
|
+
* UNIX epoch milliseconds when the trigger observed the underlying event.
|
|
102
|
+
*
|
|
103
|
+
* Stamped by the binding runtime when it accepts the emitted value; used for
|
|
104
|
+
* ordering and diagnostics.
|
|
105
|
+
*/
|
|
106
|
+
readonly observedAt: number;
|
|
107
|
+
/**
|
|
108
|
+
* Optional propagated correlation identifier.
|
|
109
|
+
*
|
|
110
|
+
* Present when the triggering source carries correlation context
|
|
111
|
+
* (e.g. a webhook request with a trace header).
|
|
112
|
+
*/
|
|
113
|
+
readonly correlationId?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Context supplied to a trigger's {@link AutomationTriggerType.activate} function.
|
|
117
|
+
*
|
|
118
|
+
* Provides the activation's identity, lifecycle management (via `signal`), and
|
|
119
|
+
* the typed emit channel for delivering events to the runtime's event bus.
|
|
120
|
+
* @typeParam TPayloadInput - Input accepted by the trigger's live `eventSchema`.
|
|
121
|
+
* The runtime parses this value before listeners receive its JSON-safe output.
|
|
122
|
+
*/
|
|
123
|
+
interface AutomationTriggerActivationContext<TPayloadInput = JsonValue$1> {
|
|
124
|
+
/**
|
|
125
|
+
* Canonical sharing key of the activation this context belongs to.
|
|
126
|
+
*
|
|
127
|
+
* Supplied by the runtime, which derived it from `<kind>` and the parsed,
|
|
128
|
+
* canonicalized parameters — the same key that decides which bindings share this
|
|
129
|
+
* activation. A trigger that has to name its activation to a collaborator (a
|
|
130
|
+
* scheduler being handed a job, a log line attributing a failure) reports this
|
|
131
|
+
* value instead of re-deriving one, which is what keeps a trigger's notion of
|
|
132
|
+
* its own identity from drifting from the runtime's.
|
|
133
|
+
*
|
|
134
|
+
* **Not a unique index over time:** the runtime may briefly hold a retiring and
|
|
135
|
+
* a fresh activation of the same key, so a collaborator must key its own state
|
|
136
|
+
* on the activation it was handed, not on this string.
|
|
137
|
+
*/
|
|
138
|
+
readonly bindingKey: string;
|
|
139
|
+
/**
|
|
140
|
+
* Abort signal that is aborted when the trigger binding is detached or the
|
|
141
|
+
* runtime shuts down.
|
|
142
|
+
*
|
|
143
|
+
* **Lifecycle ordering invariant:** the runtime aborts this signal first,
|
|
144
|
+
* then awaits the {@link AutomationTriggerCleanup} returned by
|
|
145
|
+
* {@link AutomationTriggerType.activate}. Implementations should use
|
|
146
|
+
* `signal` only for cancelling in-flight async work (e.g. passing it to
|
|
147
|
+
* `fetch`). Use the returned cleanup as the primary teardown mechanism for
|
|
148
|
+
* releasing subscriptions or handles.
|
|
149
|
+
*/
|
|
150
|
+
readonly signal: AbortSignal;
|
|
151
|
+
/**
|
|
152
|
+
* Emits a trigger event to the runtime's event bus.
|
|
153
|
+
* @param payload - Event payload input validated and transformed by the
|
|
154
|
+
* trigger's live `eventSchema`.
|
|
155
|
+
* @param metadata - Optional envelope metadata to attach to the emitted event.
|
|
156
|
+
* @returns Resolves when the event has been accepted by the bus.
|
|
157
|
+
*/
|
|
158
|
+
readonly emit: (payload: TPayloadInput, metadata?: {
|
|
159
|
+
readonly correlationId?: string;
|
|
160
|
+
}) => Promise<void>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Handle representing a currently active trigger subscription.
|
|
164
|
+
*
|
|
165
|
+
* Returned by the trigger registry's `subscribe` method. Callers retain this
|
|
166
|
+
* to detach the subscription cleanly.
|
|
167
|
+
*/
|
|
168
|
+
interface AutomationTriggerSubscription$1 {
|
|
169
|
+
/** Stable key identifying this binding instance. */
|
|
170
|
+
readonly bindingKey: string;
|
|
171
|
+
/**
|
|
172
|
+
* Detaches the subscription, stopping the trigger and releasing resources.
|
|
173
|
+
* @returns Resolves when the trigger cleanup is complete.
|
|
174
|
+
*/
|
|
175
|
+
readonly detach: () => Promise<void>;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Type-erased automation trigger stored in the registry.
|
|
179
|
+
*
|
|
180
|
+
* This is the shape that contribution processors and the trigger registry
|
|
181
|
+
* consume after generic types are erased. Typed authoring happens through
|
|
182
|
+
* {@link DefinedAutomationTrigger} and {@link defineAutomationTrigger}.
|
|
183
|
+
*
|
|
184
|
+
* The live `paramsSchema`, `eventSchema`, and `activate` are function-carrying
|
|
185
|
+
* runtime values and must never be included in serializable descriptor
|
|
186
|
+
* metadata — {@link createAutomationTriggerDescriptor} produces the only
|
|
187
|
+
* serializable representation.
|
|
188
|
+
*/
|
|
189
|
+
interface AutomationTriggerType$1 {
|
|
190
|
+
/** Canonical trigger kind, optionally owned by an npm-scoped extension. */
|
|
191
|
+
readonly kind: string;
|
|
192
|
+
/** Human-readable label shown in the Builder UI. */
|
|
193
|
+
readonly label: string;
|
|
194
|
+
/** Human-readable description of what this trigger emits and when. */
|
|
195
|
+
readonly description: string;
|
|
196
|
+
/** Categorization tags for grouping triggers in the Builder UI. */
|
|
197
|
+
readonly categories: readonly string[];
|
|
198
|
+
/**
|
|
199
|
+
* Live Zod schema for the trigger's activation parameters.
|
|
200
|
+
*
|
|
201
|
+
* The runtime validates binding params against this schema before calling
|
|
202
|
+
* {@link activate}.
|
|
203
|
+
*/
|
|
204
|
+
readonly paramsSchema: z.ZodType<Record<string, JsonValue$1>>;
|
|
205
|
+
/**
|
|
206
|
+
* Live Zod schema for the trigger's emitted event payload.
|
|
207
|
+
*
|
|
208
|
+
* The activation context validates emitted payloads against this schema
|
|
209
|
+
* before delivering them to listeners.
|
|
210
|
+
*
|
|
211
|
+
* The activation context accepts the schema's input type. The runtime parses
|
|
212
|
+
* each emitted value exactly once and delivers the schema's JSON-compatible
|
|
213
|
+
* output to listeners, so transforms may change the payload shape.
|
|
214
|
+
*/
|
|
215
|
+
readonly eventSchema: z.ZodType<JsonValue$1>;
|
|
216
|
+
/**
|
|
217
|
+
* Activates the trigger with the supplied binding parameters.
|
|
218
|
+
*
|
|
219
|
+
* Called by the runtime after validating `params` through {@link paramsSchema}.
|
|
220
|
+
* The implementation must return a cleanup function that stops the trigger
|
|
221
|
+
* when called.
|
|
222
|
+
* Declared as a readonly **property** rather than a method so that
|
|
223
|
+
* `strictFunctionTypes` checks its parameters contravariantly: a trigger that
|
|
224
|
+
* declares narrower `params` than the registry-boundary contract (for example
|
|
225
|
+
* `params: { repo: string }` alongside `paramsSchema: z.object({})`) must not
|
|
226
|
+
* type-check as an `AutomationTriggerType`. Method shorthand would make the
|
|
227
|
+
* parameters bivariant and silently admit that mismatch.
|
|
228
|
+
* @param context - Activation context with lifecycle signal and emit channel.
|
|
229
|
+
* @param params - Schema-validated binding parameters.
|
|
230
|
+
* @returns Cleanup function called on trigger deactivation.
|
|
231
|
+
*/
|
|
232
|
+
readonly activate: (context: AutomationTriggerActivationContext<unknown>, params: AutomationTriggerParams) => Promise<AutomationTriggerCleanup$1>;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Typed automation trigger definition authored by an extension.
|
|
236
|
+
*
|
|
237
|
+
* Preserves typed `paramsSchema`, `eventSchema`, and `activate` through the
|
|
238
|
+
* authoring surface before generics are erased to {@link AutomationTriggerType}
|
|
239
|
+
* at the registry boundary. Extensions declare triggers using
|
|
240
|
+
* {@link defineAutomationTrigger}, which validates and caches the descriptor
|
|
241
|
+
* at definition time.
|
|
242
|
+
* @typeParam TParamsSchema - Live Zod schema for the parameter shape.
|
|
243
|
+
* @typeParam TEventSchema - Live Zod schema for the emitted event payload.
|
|
244
|
+
*/
|
|
245
|
+
interface DefinedAutomationTrigger<TParamsSchema extends z.ZodType<AutomationTriggerParams>, TEventSchema extends z.ZodType<AutomationTriggerPayload>> extends Omit<AutomationTriggerType$1, 'paramsSchema' | 'eventSchema' | 'activate'> {
|
|
246
|
+
/** Live Zod schema for the trigger's activation parameters. */
|
|
247
|
+
readonly paramsSchema: TParamsSchema;
|
|
248
|
+
/**
|
|
249
|
+
* Live Zod schema for the trigger's emitted event payload.
|
|
250
|
+
*
|
|
251
|
+
* Schema input is accepted by the typed emit channel; schema output must be
|
|
252
|
+
* JSON-compatible for listener delivery.
|
|
253
|
+
*/
|
|
254
|
+
readonly eventSchema: TEventSchema;
|
|
255
|
+
/**
|
|
256
|
+
* Activates the trigger with the supplied typed binding parameters.
|
|
257
|
+
* @param context - Activation context with typed emit channel.
|
|
258
|
+
* @param params - Schema-validated binding parameters matching `TParamsSchema`.
|
|
259
|
+
* @returns Cleanup function called on trigger deactivation.
|
|
260
|
+
*/
|
|
261
|
+
readonly activate: (context: AutomationTriggerActivationContext<z.input<TEventSchema>>, params: z.output<TParamsSchema>) => Promise<AutomationTriggerCleanup$1>;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Minimal trigger-like shape required to produce an
|
|
265
|
+
* {@link AutomationTriggerDescriptor}.
|
|
266
|
+
*
|
|
267
|
+
* Both {@link AutomationTriggerType} and
|
|
268
|
+
* {@link DefinedAutomationTrigger} satisfy this interface because descriptor
|
|
269
|
+
* production only requires the presentation fields and the two live schemas —
|
|
270
|
+
* not the `activate` function.
|
|
271
|
+
*/
|
|
272
|
+
interface AutomationTriggerDescriptorSource {
|
|
273
|
+
readonly kind: string;
|
|
274
|
+
readonly label: string;
|
|
275
|
+
readonly description: string;
|
|
276
|
+
readonly categories: readonly string[];
|
|
277
|
+
readonly paramsSchema: z.ZodType<AutomationTriggerParams>;
|
|
278
|
+
readonly eventSchema: z.ZodType<AutomationTriggerPayload>;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Creates a validated, serializable {@link AutomationTriggerDescriptor} from a
|
|
282
|
+
* trigger definition.
|
|
283
|
+
*
|
|
284
|
+
* This is the only supported path for producing serializable trigger
|
|
285
|
+
* metadata. Extensions do NOT implement a `toDescriptor()` method — the
|
|
286
|
+
* framework derives the descriptor from the live schemas to guarantee that
|
|
287
|
+
* Builder metadata cannot drift from runtime truth.
|
|
288
|
+
*
|
|
289
|
+
* Results are cached on the trigger object and returned as detached clones so
|
|
290
|
+
* mutations by callers never affect subsequent discovery.
|
|
291
|
+
* @param trigger - Trigger definition or type-erased registry entry.
|
|
292
|
+
* @returns A detached {@link AutomationTriggerDescriptor} snapshot.
|
|
293
|
+
* @throws When the trigger's `kind` fails {@link AutomationTriggerKindSchema}
|
|
294
|
+
* or either schema cannot be projected to JSON Schema.
|
|
295
|
+
*/
|
|
296
|
+
declare function createAutomationTriggerDescriptor$1(trigger: AutomationTriggerDescriptorSource): AutomationTriggerDescriptor$1;
|
|
297
|
+
/**
|
|
298
|
+
* Defines a typed automation trigger and validates it at definition time.
|
|
299
|
+
*
|
|
300
|
+
* The returned definition is the typed authoring representation; it preserves
|
|
301
|
+
* typed `paramsSchema`, `eventSchema`, and `activate` until the caller erases
|
|
302
|
+
* generics to {@link AutomationTriggerType} at the registry boundary.
|
|
303
|
+
*
|
|
304
|
+
* Validation steps performed eagerly:
|
|
305
|
+
* 1. {@link AutomationTriggerKindSchema} rejects invalid kind formats.
|
|
306
|
+
* 2. {@link createAutomationTriggerDescriptor} validates that both schemas can
|
|
307
|
+
* be projected to JSON Schema and caches the result, so discovery never fails.
|
|
308
|
+
* @typeParam TParamsSchema - Live Zod schema for the parameter shape.
|
|
309
|
+
* @typeParam TEventSchema - Live Zod schema for the emitted event payload.
|
|
310
|
+
* @param definition - Full typed trigger definition authored by the extension.
|
|
311
|
+
* @returns The same `definition` object, frozen and type-preserved for the
|
|
312
|
+
* contribution surface. The returned object is shallowly frozen so that
|
|
313
|
+
* mutations to `label`, schemas, or other fields after definition time cannot
|
|
314
|
+
* silently diverge from the eagerly cached descriptor.
|
|
315
|
+
* @throws When `kind` is not a valid canonical trigger kind string, or when either
|
|
316
|
+
* schema cannot be projected to a JSON-safe JSON Schema record.
|
|
317
|
+
* @example
|
|
318
|
+
* ```ts
|
|
319
|
+
* export const profileChangedTrigger = defineAutomationTrigger({
|
|
320
|
+
* kind: 'makaio.profile-changed',
|
|
321
|
+
* label: 'Profile Changed',
|
|
322
|
+
* description: 'Fires when the authenticated user profile changes.',
|
|
323
|
+
* categories: ['Identity'],
|
|
324
|
+
* paramsSchema: z.object({}),
|
|
325
|
+
* eventSchema: z.object({ userId: z.string() }),
|
|
326
|
+
* activate: async (ctx) => {
|
|
327
|
+
* // Prefer returning a cleanup function as the primary teardown mechanism.
|
|
328
|
+
* // Use ctx.signal only for cancelling in-flight async work.
|
|
329
|
+
* const off = bus.on('profile.changed', (e) => {
|
|
330
|
+
* void ctx.emit({ userId: e.userId });
|
|
331
|
+
* });
|
|
332
|
+
* // Return the cleanup — the runtime awaits it after aborting ctx.signal.
|
|
333
|
+
* return off;
|
|
334
|
+
* },
|
|
335
|
+
* });
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
declare function defineAutomationTrigger$1<TParamsSchema extends z.ZodType<AutomationTriggerParams>, TEventSchema extends z.ZodType<AutomationTriggerPayload>>(definition: DefinedAutomationTrigger<TParamsSchema, TEventSchema>): DefinedAutomationTrigger<TParamsSchema, TEventSchema>;
|
|
339
|
+
/**
|
|
340
|
+
* Erases the typed generics on a {@link DefinedAutomationTrigger} to the
|
|
341
|
+
* registry-boundary {@link AutomationTriggerType}.
|
|
342
|
+
*
|
|
343
|
+
* **How the erasure compiles.** `DefinedAutomationTrigger.activate` accepts the
|
|
344
|
+
* narrow `z.output<TParamsSchema>` while `AutomationTriggerType.activate`
|
|
345
|
+
* accepts the wide `AutomationTriggerParams`. Both are readonly properties, so
|
|
346
|
+
* `strictFunctionTypes` compares them contravariantly and correctly rejects the
|
|
347
|
+
* narrow signature as a direct assignment — that strictness is deliberate: it
|
|
348
|
+
* is what stops a hand-written trigger from declaring narrower `params` than its
|
|
349
|
+
* own `paramsSchema` produces. The erasure is therefore expressed as an
|
|
350
|
+
* overload: this public signature accepts the typed definition, while the
|
|
351
|
+
* implementation signature below is the wide {@link AutomationTriggerType}, so
|
|
352
|
+
* the widening happens in the signature relation rather than through a type
|
|
353
|
+
* assertion. Keeping the erasure here means no extension author casts — or even
|
|
354
|
+
* mentions the erased type — at their own call site.
|
|
355
|
+
*
|
|
356
|
+
* **Why the erasure is safe at runtime.** The binding runtime parses binding
|
|
357
|
+
* parameters through `paramsSchema` (and projects them through the shared JSON
|
|
358
|
+
* schemas) before calling `activate`, and parses every emitted payload through
|
|
359
|
+
* `eventSchema` before fanning it out to listeners. The narrow typed signature
|
|
360
|
+
* is therefore only ever invoked with values its own schema produced.
|
|
361
|
+
*
|
|
362
|
+
* **Object identity is preserved:** the returned value IS the same object
|
|
363
|
+
* reference. The {@link descriptorCache} WeakMap in
|
|
364
|
+
* {@link createAutomationTriggerDescriptor} is keyed on object identity; a
|
|
365
|
+
* spread copy would defeat the definition-time descriptor caching and break the
|
|
366
|
+
* fail-fast guarantee that discovery can never throw.
|
|
367
|
+
* @typeParam TParamsSchema - Live Zod schema for the parameter shape.
|
|
368
|
+
* @typeParam TEventSchema - Live Zod schema for the emitted event payload.
|
|
369
|
+
* @param definition - A typed trigger definition produced by
|
|
370
|
+
* {@link defineAutomationTrigger}.
|
|
371
|
+
* @returns The same object reference, widened to {@link AutomationTriggerType}.
|
|
372
|
+
*/
|
|
373
|
+
declare function toAutomationTriggerType$1<TParamsSchema extends z.ZodType<AutomationTriggerParams>, TEventSchema extends z.ZodType<AutomationTriggerPayload>>(definition: DefinedAutomationTrigger<TParamsSchema, TEventSchema>): AutomationTriggerType$1;
|
|
374
|
+
//#endregion
|
|
375
|
+
export { AutomationTriggerKindSchema as _, AutomationTriggerListener$1 as a, AutomationTriggerSubscription$1 as c, createAutomationTriggerDescriptor$1 as d, defineAutomationTrigger$1 as f, AutomationTriggerDescriptorSchema as g, AutomationTriggerDescriptor$1 as h, AutomationTriggerEvent as i, AutomationTriggerType$1 as l, AutomationTriggerBindingSchema as m, AutomationTriggerBinding$1 as n, AutomationTriggerParams as o, toAutomationTriggerType$1 as p, AutomationTriggerCleanup$1 as r, AutomationTriggerPayload as s, AutomationTriggerActivationContext as t, DefinedAutomationTrigger as u, AutomationTriggerLocalNameSchema$1 as v };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./json-value-
|
|
1
|
+
import{t as e}from"./json-value-D57aJhVn.mjs";import{i as t,t as n}from"./visibility-Dl1o2I01.mjs";import{f as r}from"./definitions-CF6YmEhL.mjs";import{z as i}from"zod";const a=i.enum([`anthropic`,`openai`]),o=i.object({anthropic:i.string().url(),openai:i.string().url()}).partial().refine(e=>Object.keys(e).length>0,{message:`At least one protocol endpoint must be specified`}),s=e,c=i.object({id:i.string().min(1),name:i.string().min(1),description:i.string().optional(),endpoints:o.optional(),defaultModel:i.string().optional(),fastModel:i.string().optional(),primaryTestModel:i.string().optional(),secondaryTestModel:i.string().optional(),availableModels:i.array(t).default([]),defaultModelFilterMode:n.optional(),authMethods:r,capabilities:s.optional()}).strict();export{c as i,a as n,s as r,o as t};
|
package/dist/{detached-extension-handle-Ddfquy5_.mjs → detached-extension-handle-DKd17UB6.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./descriptor-to-package-
|
|
1
|
+
import{t as e}from"./descriptor-to-package-BecVCopf.mjs";import{t}from"./jsonl-transport-Bp_6pB2a.mjs";import{z as n}from"zod";import{createBusNamespace as r}from"@makaio/framework/core";const i={idle:[`starting`],starting:[`running`,`crashed`,`stopping`],running:[`stopping`,`crashed`],stopping:[`stopped`],stopped:[`starting`],crashed:[`starting`,`stopped`]};function a(e,t){if(!i[e].includes(t))throw Error(`Invalid state transition: ${e} → ${t}`)}function o(e){return new Promise(t=>{if(e.exitCode!==null||e.signalCode!==null){t(!0);return}e.once(`exit`,()=>t(!0))})}function s(e){let{spawn:n,healthTimeoutMs:r=3e4,shutdownTimeoutMs:i=5e3,restartPolicy:s=`none`,onReady:c,onExit:l,onStateChange:u}=e,d=`idle`,f;function p(e){a(d,e),d=e,u?.(d)}function m(e){let t=f;if(f=void 0,t?.close(),d===`stopping`){p(`stopped`),l?.(e);return}if(d===`running`){if(e!==0){p(`crashed`),l?.(e),(s===`on-crash`||s===`always`)&&h().catch(e=>{console.error(`[ProcessLifecycle:${n.processName??n.command}] Restart failed:`,e instanceof Error?e.message:e)});return}p(`stopping`),p(`stopped`),l?.(e),s===`always`&&h().catch(e=>{console.error(`[ProcessLifecycle:${n.processName??n.command}] Restart failed:`,e instanceof Error?e.message:e)})}}async function h(){p(`starting`);let e=t(n);f=e;let i=e.process;await new Promise((t,a)=>{let o=!1;function s(e){o||(o=!0,clearTimeout(u),d(),i.off(`exit`,h),e())}let u=setTimeout(()=>{s(()=>{e.close(),f=void 0;try{p(`crashed`)}catch{}a(Error(`Process health timeout after ${r}ms: ${n.processName??n.command}`))})},r),d=e.onMessage(()=>{s(()=>{try{p(`running`)}catch(e){a(e);return}c?.(),i.once(`exit`,m),t()})});function h(e){s(()=>{f=void 0;try{p(`crashed`)}catch{}l?.(e),a(Error(`Process exited with code ${String(e)} before signaling readiness`))})}i.once(`exit`,h)})}async function g(){if(d===`stopped`||d===`idle`)return;if(d===`crashed`){f?.close(),f=void 0,p(`stopped`);return}if(d!==`stopping`&&p(`stopping`),!f){d===`stopping`&&p(`stopped`);return}let e=f,t=e.process;if(t.exitCode!==null){e.close(),f===e&&(f=void 0),d===`stopping`&&p(`stopped`);return}t.kill(`SIGTERM`);let n;await Promise.race([o(t).then(()=>(clearTimeout(n),!0)),new Promise(e=>{n=setTimeout(()=>e(!1),i)})])||(t.kill(`SIGKILL`),await o(t)),d===`stopping`&&p(`stopped`),e.close(),f===e&&(f=void 0)}return{get transport(){return f},get state(){return d},start:h,stop:g}}const c=n.object({dataDir:n.string().optional(),machineId:n.string().optional(),makaioHome:n.string().optional(),platform:n.string().optional(),username:n.string().optional()}),l={init:{request:n.object({config:n.unknown().optional(),context:c.optional()}),response:n.object({ready:n.boolean()})},ready:n.object({ready:n.boolean(),config:n.unknown().optional(),context:c.optional()}).passthrough(),destroy:{request:n.object({reason:n.string().optional()}),response:n.object({stopped:n.boolean()})},stopped:n.object({stopped:n.boolean()}).passthrough()};function u(e,t){return e.bus.registerNamespace(r(`extension.${t}`,l)).subjects}function d(e,t){let n;return()=>(n??=u(e,t),n)}function f(e){return{dataDir:e.dataDir,machineId:e.machineId,makaioHome:e.makaioHome,platform:e.platform,username:e.username}}var p=class{descriptor;ctx;extensionPath;getLifecycleSubjects;transport=null;unregister=null;constructor(e,t,n){this.descriptor=e,this.ctx=t,this.extensionPath=n,this.getLifecycleSubjects=d(t,e.name)}async init(){let{StdioServerTransport:e}=await import(`./src-xbmzokNe.mjs`),{transport:t}=this.descriptor,n=this.getLifecycleSubjects(),r=new e({name:this.descriptor.name,spawn:{command:t.command,args:t.args,cwd:this.extensionPath,env:t.env,processName:this.descriptor.name}}),i=null;try{let e=this.ctx.bus.registerTransport(r);i=e.unregister,await r.connect(),await r.ready,await e.ready,this.transport=r,this.unregister=i,await this.ctx.bus.request(n.init,{config:this.ctx.config??this.descriptor.config?.defaults,context:f(this.ctx)},{timeout:t.healthTimeoutMs})}catch(e){throw i?.(),await r.disconnect(),this.transport=null,this.unregister=null,e}}async destroy(){if(this.transport!==null){let e=this.getLifecycleSubjects();try{await this.ctx.bus.request(e.destroy,{reason:`runtime-shutdown`},{timeout:this.descriptor.transport.shutdownTimeoutMs})}catch(e){console.warn(`[extensions] ${this.descriptor.name}: detached destroy lifecycle request did not complete before disconnect:`,e instanceof Error?e.message:e)}}this.unregister?.(),this.unregister=null,await this.transport?.disconnect(),this.transport=null}},m=class{descriptor;ctx;extensionPath;getLifecycleSubjects;lifecycle=null;constructor(e,t,n){this.descriptor=e,this.ctx=t,this.extensionPath=n,this.getLifecycleSubjects=d(t,e.name)}async init(){let{transport:e}=this.descriptor;if(!this.ctx.busUrl)throw Error(`[extensions] ${this.descriptor.name}: bus-websocket transport requires NodeExtensionContext.busUrl`);let t=this.getLifecycleSubjects();this.lifecycle=s({spawn:{command:e.command,args:e.args,cwd:this.extensionPath,env:{...e.env,MAKAIO_BUS_TRANSPORT:`websocket`,MAKAIO_BUS_URL:this.ctx.busUrl,MAKAIO_EXTENSION_NAME:this.descriptor.name},processName:this.descriptor.name},healthTimeoutMs:e.healthTimeoutMs,shutdownTimeoutMs:e.shutdownTimeoutMs,restartPolicy:`restartPolicy`in e?e.restartPolicy:void 0});try{await this.lifecycle.start(),await this.ctx.bus.request(t.init,{config:this.ctx.config??this.descriptor.config?.defaults,context:f(this.ctx)},{timeout:e.healthTimeoutMs})}catch(e){throw await this.lifecycle.stop(),this.lifecycle=null,e}}async destroy(){if(this.lifecycle!==null){let e=this.getLifecycleSubjects();try{await this.ctx.bus.request(e.destroy,{reason:`runtime-shutdown`},{timeout:this.descriptor.transport.shutdownTimeoutMs})}catch(e){console.warn(`[extensions] ${this.descriptor.name}: detached destroy lifecycle request did not complete before process stop:`,e instanceof Error?e.message:e)}await this.lifecycle.stop(),this.lifecycle=null}}},h=class{descriptor;ctx;extensionPath;bridge=null;constructor(e,t,n){this.descriptor=e,this.ctx=t,this.extensionPath=n}async init(){let{startMcpClientBridge:e}=await import(`@makaio/framework/mcp-http-server`),{transport:t}=this.descriptor;this.bridge=await e({command:t.command,args:t.args,env:t.env,cwd:this.extensionPath,extensionName:this.descriptor.name,bus:this.ctx.bus})}async destroy(){this.bridge!==null&&(await this.bridge.close(),this.bridge=null)}};function g(t,n){return{...e(t),create(e){return t.transport.type===`bus-stdio`?new p(t,e,n):t.transport.type===`mcp-stdio`?new h(t,e,n):new m(t,e,n)}}}export{g as createDetachedExtensionPackage};
|