@makaio/framework 1.0.0-dev-1785409369816 → 1.0.0-dev-1787670071418
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/README.md +2 -0
- package/dist/.makaio-build.json +4 -3
- package/dist/{account-identity-DFx8pwKL.mjs → account-identity-B3vLwm9O.mjs} +1 -1
- package/dist/adapter-Dz1fX5Wa.mjs +1 -0
- package/dist/adapter-subsystem/index.d.mts +194 -20
- 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/claude/index.d.mts +5 -5
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +405 -824
- 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/{ajv-DD3SIL2i.mjs → ajv-krzJXh1X.mjs} +2 -2
- package/dist/artifact-Btbuib48.mjs +1 -0
- package/dist/attach-error-Cb3GbeKe.mjs +1 -0
- package/dist/{auth-DGEdiHF6.mjs → auth-C6tVtaOX.mjs} +1 -1
- package/dist/authority-state-bootstrap-CLYus369.mjs +1 -0
- package/dist/automation-trigger-ByjNlClm.mjs +1 -0
- package/dist/await-trigger-Bkg2BQfg.mjs +1 -0
- package/dist/bus/index.d.mts +41 -9
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-D6NoBhIV.mjs +2 -0
- package/dist/bus-UgFdHybD.mjs +1 -0
- package/dist/caller-owned-adapter-stub-C1M7FKrv.mjs +1 -0
- package/dist/{canonical-model-BAytQ4NV.mjs → canonical-model-DXOvCaVg.mjs} +1 -1
- package/dist/capabilities-BUwuA7XX.mjs +1 -0
- package/dist/capability-j3NekkIu.mjs +1 -0
- package/dist/{client-DbS847wW.mjs → client-BkznbdsO.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/code-execution/worker-entry.d.mts +21 -0
- package/dist/code-execution/worker-entry.mjs +1 -0
- package/dist/code-execution-Ckmn8OZu.mjs +1 -0
- package/dist/code-execution-CweDSWco.mjs +1 -0
- package/dist/code-execution-DqkQjKa1.mjs +1 -0
- package/dist/{compression-74fFeBha.mjs → compression-CtgeVLpP.mjs} +1 -1
- package/dist/{config-namespace-TVX-hG4I.mjs → config-namespace-CjWvw8ij.mjs} +1 -1
- package/dist/{context-resolution-DdyhpH4L.d.mts → context-resolution-841T7jBI.d.mts} +11 -11
- 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/code-execution/index.d.mts +2 -0
- package/dist/contracts/code-execution/index.mjs +1 -0
- 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 +171 -100
- 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-CUHLVLsT.d.mts +35 -0
- package/dist/core/index.d.mts +84 -2
- package/dist/core/index.mjs +1 -1
- package/dist/{definition-CJfiv8xm.mjs → definition-BH4QLGLI.mjs} +1 -1
- package/dist/definition-DyGImhyi.d.mts +375 -0
- package/dist/{detached-extension-handle-Ddfquy5_.mjs → detached-extension-handle-D0aI0pJA.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/0034_m_msha1388.sql +41 -0
- package/dist/drizzle/0035_m_mshgj6x7.sql +40 -0
- package/dist/drizzle/0036_m_msivwbgm.sql +1 -0
- package/dist/drizzle/0037_runtime_instance_incarnation_counter.sql +6 -0
- package/dist/drizzle/meta/_journal.json +49 -0
- package/dist/event-B8ELuk6k.mjs +1 -0
- package/dist/{execution-attempt-repository-DWXKY41_.d.mts → execution-attempt-repository-BJ2W6wwx.d.mts} +1 -1
- package/dist/{execution-target-Cf645pDj.mjs → execution-target-H0RWV7Py.mjs} +1 -1
- package/dist/extension-Bfkr2DBs.mjs +1 -0
- package/dist/extension-Cz39YNXy.mjs +1 -0
- package/dist/extension-context-QmFuHdq5.d.mts +295 -0
- package/dist/{extension-discovery-CQRdbVQ6.d.mts → extension-discovery-Dhu3WplO.d.mts} +11 -1
- package/dist/{extension-namespace-Yu41YepM.mjs → extension-namespace-QoTTwKPt.mjs} +1 -1
- package/dist/extension-package-provenance-aYrZuS4W.mjs +1 -0
- package/dist/{filesystem-service-DlP2HfDg.mjs → filesystem-service-CiUw0YN5.mjs} +1 -1
- package/dist/framework-packages-BHgul8Kl.mjs +1 -0
- package/dist/git/index.mjs +2 -2
- package/dist/{globby-1yCVCk8s.mjs → globby-QBDqstzq.mjs} +1 -1
- package/dist/handlers-BsHAFtye.mjs +57 -0
- package/dist/{harness-DpwsFsE7.mjs → harness-YQ2ewID9.mjs} +1 -1
- package/dist/{hook-responses-Dh1PWXqJ.d.mts → hook-responses-9Ywsqzzq.d.mts} +2 -293
- package/dist/identity-OjRlG6dZ.mjs +1 -0
- package/dist/{index-CMgLxw14.d.mts → index-8NdPPzUh2.d.mts} +2 -2
- package/dist/{index-Ds5_rDEJ.d.mts → index-8y4hT9WL.d.mts} +1 -12
- package/dist/{index-BVlXneHH.d.mts → index-B-3I98nw.d.mts} +14 -10
- package/dist/index-B0VO0rAl.d.mts +302 -0
- package/dist/{index-gUhidukN.d.mts → index-B0yMCJW8.d.mts} +324 -2
- package/dist/index-BM56936c.d.mts +165 -0
- package/dist/{index-CLvQsL6s2.d.mts → index-BNzUyVwV.d.mts} +2105 -320
- package/dist/{index-BaZeoZoS.d.mts → index-BTEJfzjE.d.mts} +1 -1
- package/dist/{index-B0Kf_OWi.d.mts → index-BfV8U4XX.d.mts} +1 -1
- package/dist/{index-DCZ8BX9S.d.mts → index-BkbnC65b.d.mts} +487 -85
- package/dist/{index-GHASUiem.d.mts → index-BmevAPME2.d.mts} +1 -1
- package/dist/index-Bqk0pJBQ2.d.mts +138 -0
- package/dist/{index-B9UW_vPM.d.mts → index-C146Eq_J.d.mts} +2465 -273
- package/dist/{index-BAXkicoQ.d.mts → index-CIEycZrt.d.mts} +1 -1
- package/dist/{index-DkiTJM5p.d.mts → index-CMekqu_D.d.mts} +44 -10
- package/dist/{index-SsBHjUqA.d.mts → index-CPRQ4dWX.d.mts} +0 -23
- package/dist/{index-EjsSBQXy2.d.mts → index-CPi0UpRh.d.mts} +1 -1
- package/dist/{index-DSBT83c0.d.mts → index-CYjgoYeX.d.mts} +24 -3
- package/dist/{index-DnG-QFpG.d.mts → index-CmwAJ8-5.d.mts} +18 -1
- package/dist/index-Cny5RvjO.d.mts +800 -0
- package/dist/{index-BNMnIe-j.d.mts → index-D-4jv_66.d.mts} +434 -863
- package/dist/{index-brqfk9JQ.d.mts → index-D8D-yibS2.d.mts} +4 -4
- package/dist/index-DHnSLGP4.d.mts +268 -0
- package/dist/{index-D5Nb7IEP.d.mts → index-DI2lS7VT.d.mts} +79 -41
- package/dist/{index-D_ODXsBv.d.mts → index-DJ2KgJDJ2.d.mts} +51 -95
- package/dist/{index-cqLS1eFV.d.mts → index-DNI6UF9h.d.mts} +133 -134
- package/dist/index-DQ8o3JGi.d.mts +132 -0
- package/dist/index-DWBkiiXH.d.mts +18 -0
- package/dist/{index-DlsHL9Jg.d.mts → index-DXtQRehh.d.mts} +12 -12
- package/dist/{index-4VfqCjl2.d.mts → index-D_4K3Tf_.d.mts} +79 -194
- package/dist/index-Dg11JxKZ.d.mts +496 -0
- package/dist/json-value-BBZ6uGwc.mjs +1 -0
- package/dist/json-value-DPqb-SJ8.d.mts +177 -0
- package/dist/kernel/cli/index.d.mts +2 -2
- package/dist/kernel/cli/index.mjs +1 -1
- package/dist/kernel/cli/register.d.mts +1 -1
- package/dist/kernel/cli/register.mjs +1 -1
- package/dist/kernel/cli/schemas.mjs +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/extension/index.mjs +1 -1
- package/dist/kernel/index.d.mts +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-DErgth_E.mjs → lib-BpGvHZye.mjs} +2 -2
- package/dist/{lib-C7-s68uf.mjs → lib-Cm-uEoC1.mjs} +1 -1
- package/dist/{load-extensions-BxsDB87B.d.mts → load-extensions-BQoXaHhR.d.mts} +17 -13
- package/dist/load-extensions-DG5LvPyM.mjs +1 -0
- package/dist/{materialization-Jd198K3y.mjs → materialization-lVd9_-jr.mjs} +1 -1
- package/dist/mcp-http-server/index.mjs +1 -1
- package/dist/model-DrzPt3ou.mjs +1 -0
- package/dist/{namespace-BqxtpNAn.mjs → namespace-BL7lHlmg.mjs} +1 -1
- package/dist/{namespace-CjjFvrIA2.d.mts → namespace-BNp7n_gu.d.mts} +25 -25
- package/dist/{namespace-g_mbIZq_.d.mts → namespace-BRuHzhPo.d.mts} +564 -28
- package/dist/{namespace-DV-Hr9sZ.d.mts → namespace-C06lJSuj.d.mts} +17 -7
- package/dist/{namespace-TseEI3Pu.d.mts → namespace-DOezqDti.d.mts} +18 -10
- package/dist/{namespace-CErHuXtb.d.mts → namespace-DknCutQZ.d.mts} +50 -0
- package/dist/{namespace-B8uKAzWJ.mjs → namespace-Du0accdE.mjs} +1 -1
- package/dist/{namespace-CWUDFGOy.mjs → namespace-NXm_zvL1.mjs} +1 -1
- package/dist/{namespace-CupOzbRv.d.mts → namespace-l-HG1rLF.d.mts} +24 -20
- package/dist/namespace-sCPb79-7.mjs +1 -0
- package/dist/{native-session-supervisor-DRx0MX-d.mjs → native-session-supervisor-LKio8XZn.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/npm-package-name-DuTYVICk.mjs +1 -0
- package/dist/orchestrator-shared-BGlN-m-V.mjs +1 -0
- package/dist/{orchestrator-shared-BHCv-l2O.d.mts → orchestrator-shared-CNHSImNY.d.mts} +10 -10
- package/dist/ownership-memory-handler-BpGdR_uG.mjs +1 -0
- package/dist/ownership-recovery-guard-DyW5vGBr.mjs +1 -0
- package/dist/package-B01gmu75.mjs +7 -0
- package/dist/{package-DWMxGfzK.d.mts → package-BNFTUFLB.d.mts} +234 -84
- package/dist/package-DttKA9wN.mjs +1 -0
- package/dist/package-EGTn-Ng1.mjs +1 -0
- package/dist/package-JtjbO-Oi.mjs +1 -0
- package/dist/package.json +1 -1
- package/dist/{profile-BTAI31Nt.mjs → profile-N5qGUpF0.mjs} +1 -1
- package/dist/{provider-context-PZIQWcqQ.mjs → provider-context-CG42JlP9.mjs} +1 -1
- package/dist/{provider-context-Dq53Cgzz.mjs → provider-context-zTDSH2x9.mjs} +1 -1
- package/dist/reaction-D3TNwPK8.mjs +1 -0
- package/dist/{registry-wfF2uTty.mjs → registry-Dk12tAfv.mjs} +2 -2
- package/dist/{resolved-DZgqql2Z.mjs → resolved-sq8RXNDf.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/rules/schemas.mjs +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/code-execution/index.d.mts +3 -0
- package/dist/runtime-node/code-execution/index.mjs +1 -0
- package/dist/runtime-node/extension-discovery.d.mts +2 -2
- package/dist/runtime-node/extension-discovery.mjs +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 -5
- 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-DKUb4rkr.d.mts → schema-B3Pf7JP7.d.mts} +778 -21
- package/dist/{schema-Dd-e89MO.mjs → schema-Dq-7si8u.mjs} +1 -1
- package/dist/{schemas-B1NWNASS.d.mts → schemas-BXc9qOpl.d.mts} +2 -0
- package/dist/schemas-BfO5jkrL.mjs +1 -0
- package/dist/{schemas-CR8hSqTy.d.mts → schemas-C1mxTfd7.d.mts} +60 -4
- package/dist/schemas-C3kyQWGf.mjs +1 -0
- package/dist/{schemas-DnYiAvfz.d.mts → schemas-D7ScxLrf.d.mts} +24 -20
- package/dist/{schemas-BsVYZviy.d.mts → schemas-OWvBn7AH.d.mts} +4 -4
- package/dist/{schemas-DaHQzpgm.mjs → schemas-QWDnauKX.mjs} +1 -1
- package/dist/schemas-TK29KWx-.mjs +1 -0
- package/dist/schemas-_2Syo_01.mjs +1 -0
- package/dist/scoped-bus-DoPmCJeM.mjs +1 -0
- package/dist/{selection-BNwTKEVT.mjs → selection-DL3ric7K.mjs} +1 -1
- package/dist/services/adapter-runtime/index.d.mts +4 -4
- 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 +2 -2
- package/dist/services/adapter-runtime/schemas.mjs +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 +3 -2
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/code-execution/index.d.mts +2 -0
- package/dist/services/code-execution/index.mjs +1 -0
- 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/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.d.mts +18 -0
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.d.mts +10 -1
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +567 -101
- 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 +33 -4
- package/dist/services/session/testing/index.mjs +68 -12
- package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
- package/dist/services/session/turns/namespace.d.mts +1 -1
- package/dist/services/session/turns/namespace.mjs +1 -1
- package/dist/services/session-editor/index.d.mts +1 -1
- package/dist/services/session-editor/index.mjs +1 -1
- package/dist/services/settings/index.d.mts +3 -3
- package/dist/services/settings/index.mjs +1 -1
- package/dist/services/settings/namespace.mjs +1 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/clients-namespace.mjs +1 -1
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- package/dist/services/tray-menu/index.mjs +1 -1
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/services/workflow-transitions/index.d.mts +1 -1
- package/dist/services/workflow-transitions/index.mjs +1 -1
- package/dist/session-BOpTI79g.mjs +1 -0
- package/dist/session-CXOPk3yg.mjs +95 -0
- package/dist/shared-B9AWRm9A.mjs +1 -0
- package/dist/{skill-BR6rkfLe.mjs → skill-DGNtc_ww.mjs} +1 -1
- package/dist/{src-DD0v-nIj.mjs → src-BmSQ3rlz.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 +81 -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-BFDOFUGC.mjs +1 -0
- package/dist/{tools-PdG9fO1M.mjs → tools-DWKWX3eV.mjs} +1 -1
- package/dist/{transition-Du3MQzJV.d.mts → transition-D3zUBTPc.d.mts} +11 -38
- package/dist/{types-D7_kevBK.d.mts → types-BlB23n4f.d.mts} +1 -1
- package/dist/{types-DMLDHFR9.d.mts → types-CtDGkyLx2.d.mts} +1 -1
- package/dist/types-Cwza95hS.mjs +1 -0
- package/dist/{types-Dzrwa1GY.d.mts → types-DcxBYlPA.d.mts} +5834 -1436
- package/dist/types-DnK6Wa_Y.d.mts +260 -0
- package/dist/types-OKJCOjme.d.mts +2937 -0
- 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 +98 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/project-manifest.mjs +1 -1
- package/dist/{version-CoCeMxDT.mjs → version-BYeVh1pI.mjs} +1 -1
- package/dist/{view-builder-DeFd-k7C.d.mts → view-builder-B0j9p5C0.d.mts} +4 -4
- package/dist/{visibility-qhGWmpSJ.mjs → visibility-DtDLRBdr.mjs} +1 -1
- package/dist/worker-node-CjuQb9hl.mjs +1 -0
- package/dist/{worker-node-DZTuT1DS.mjs → worker-node-Dtf9ilsR.mjs} +1 -1
- package/dist/workflow-C4mck_NW.mjs +1 -0
- package/dist/workflow-engine/execution-attempt-repository.d.mts +1 -1
- package/dist/workflow-engine/index.d.mts +237 -518
- 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-c_VQbyV0.mjs} +1 -1
- package/dist/workflow-worker-aNbdgqml.mjs +1 -0
- package/dist/zod-json-schema-Dixc-B1T.mjs +1 -0
- package/package.json +46 -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/capabilities-BQEp34ir.mjs +0 -1
- package/dist/capability-service-BqiLlRGA.mjs +0 -1
- package/dist/event-CmVjR6Ib.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/identity-D6guMtmi.mjs +0 -1
- package/dist/index-CRvpVIqA.d.mts +0 -89
- package/dist/json-value-Brslhqbm.d.mts +0 -57
- package/dist/json-value-DmU8ibo_.mjs +0 -1
- 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-CRB2O5zo.mjs +0 -1
- package/dist/schemas-Cm09dXL4.mjs +0 -1
- package/dist/schemas-tDf_WiC8.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/worker-node-Bl9_vqYi.mjs +0 -1
- 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-DHHppU4f.mjs} +0 -0
- package/dist/{adapter-binding-DQchUtrK.d.mts → adapter-binding-CATvmGuz.d.mts} +0 -0
- package/dist/{attempt-record-codec-CqO1_XnE.mjs → attempt-record-codec-BYfYkj4M.mjs} +0 -0
- package/dist/{base-orchestrator-BilsQNW1.d.mts → base-orchestrator-B4YW6z_Q.d.mts} +0 -0
- package/dist/{index-DN4NOCqN2.d.mts → capability-service-BW1-teFU.d.mts} +0 -0
- package/dist/{client-B--e2qcU.d.mts → client-BG0WX5Vz.d.mts} +0 -0
- package/dist/{client-binary-version-verifier-taewmKTY.mjs → client-binary-version-verifier-0lCKZOTg.mjs} +0 -0
- package/dist/{client-binary-version-verifier-CgjM_vGF.d.mts → client-binary-version-verifier-lcv83Hq3.d.mts} +0 -0
- package/dist/{clients-namespace-DfxjG2ZP.d.mts → clients-namespace-DLAjOTTb.d.mts} +0 -0
- package/dist/{config-namespace-BCqvufbD.d.mts → config-namespace-CH7sJZ4f.d.mts} +0 -0
- package/dist/{create-static-mount-bbQhTt6W.mjs → create-static-mount-DxuixuLZ.mjs} +0 -0
- package/dist/{cross-spawn-B57KZuns.mjs → cross-spawn-CZygZJMH.mjs} +0 -0
- package/dist/{cursor-storage-DIFK_9hg.mjs → cursor-storage-bsc9lZKk.mjs} +0 -0
- package/dist/{definition-gnKgXU91.d.mts → definition-BrgzUuFk.d.mts} +0 -0
- package/dist/{definitions-xrrY0wgz.mjs → definitions-CRpdnHYM.mjs} +0 -0
- package/dist/{descriptor-to-package-DvF08krT.mjs → descriptor-to-package-CcjdoWP4.mjs} +0 -0
- package/dist/{drizzle-z_0SiGY8.mjs → drizzle-Bzc-OGVI.mjs} +0 -0
- package/dist/{esm-CltRnX8_.mjs → esm-i-S5TW72.mjs} +0 -0
- package/dist/{facet-BCI00njh.mjs → facet-BnMh7Jyc.mjs} +0 -0
- package/dist/{filesystem-service-CQ9yVkSz.d.mts → filesystem-service-ZJ43SbBi.d.mts} +0 -0
- package/dist/{handler-Cbv9FqDO.mjs → handler-DF1fVDpf.mjs} +0 -0
- package/dist/{host-Caq6ZfSJ.mjs → host-B-_ntOMH.mjs} +0 -0
- package/dist/{index-ye0oklfU.d.mts → index-B2Y1Wvbh.d.mts} +0 -0
- package/dist/{index-Cv-o5Krs.d.mts → index-B4svZC6L.d.mts} +0 -0
- package/dist/{index-DZunhZec.d.mts → index-B5dP8rj6.d.mts} +0 -0
- package/dist/{index-jTaAHsul.d.mts → index-BC-6qNeo.d.mts} +0 -0
- package/dist/{index-ByKi34v5.d.mts → index-BFWvT0NG.d.mts} +0 -0
- package/dist/{index-vA--0lOM.d.mts → index-BMRB9yhF.d.mts} +0 -0
- package/dist/{index-BskPjMet.d.mts → index-BuMsrli0.d.mts} +0 -0
- package/dist/{index-DR40QWlw.d.mts → index-C4V8Pmi4.d.mts} +0 -0
- package/dist/{index-BIdsFcQs2.d.mts → index-CL0Jo1b92.d.mts} +0 -0
- package/dist/{index-CjdRdsd0.d.mts → index-CVpaGijY.d.mts} +0 -0
- package/dist/{index-vcSj12YQ.d.mts → index-CmbkCxj-.d.mts} +0 -0
- package/dist/{index-sS6KUlrx.d.mts → index-CqdMbYmR.d.mts} +0 -0
- package/dist/{index-CnMu8BQl.d.mts → index-D037TVsm.d.mts} +0 -0
- package/dist/{index-CGZQVTid.d.mts → index-DgspOUa72.d.mts} +0 -0
- package/dist/{index-dtsLKOID.d.mts → index-Ek4y8M9J2.d.mts} +0 -0
- package/dist/{index-DjgLchuQ.d.mts → index-VzLAV0Yt.d.mts} +0 -0
- package/dist/{index-DXN_L5D6.d.mts → index-jxPncqWZ2.d.mts} +0 -0
- package/dist/{index-BVRQEpAg.d.mts → index-kzIjbrS02.d.mts} +6 -6
- /package/dist/{index-Dm1nUxCF.d.mts → index-l01zsChf.d.mts} +0 -0
- /package/dist/{index-CWHfOz6d.d.mts → index-pvX-BIpr2.d.mts} +0 -0
- /package/dist/{jsonl-transport-bQl3JwIu.mjs → jsonl-transport-Cyyh5Wje.mjs} +0 -0
- /package/dist/{lib-DOBXZmYX.mjs → lib-BqV8hYtk.mjs} +0 -0
- /package/dist/{model-registry-xyBKSye-.mjs → model-registry-C9rFu3kV.mjs} +0 -0
- /package/dist/{model-registry-CmgcPDH3.mjs → model-registry-Cixxx2jv.mjs} +0 -0
- /package/dist/{modes-BheyN7SS.mjs → modes-DwsJ3yVl.mjs} +0 -0
- /package/dist/{namespace-BOkKoq34.d.mts → namespace-B0ftHlK3.d.mts} +0 -0
- /package/dist/{namespace-YytVKIgI.d.mts → namespace-BGRHcrmp.d.mts} +0 -0
- /package/dist/{namespace-jDhZjw-i.d.mts → namespace-BUYDmd0r.d.mts} +0 -0
- /package/dist/{namespace-YxU1xf-K.mjs → namespace-BW3Bfu9h.mjs} +0 -0
- /package/dist/{namespace-DWCEo-9M.d.mts → namespace-BdAK0lD8.d.mts} +0 -0
- /package/dist/{namespace-Cv1RFP7n.d.mts → namespace-CPG6u60N.d.mts} +0 -0
- /package/dist/{namespace-GPA7zots.d.mts → namespace-CVFaZv8x.d.mts} +0 -0
- /package/dist/{namespace-Blp4c8GK.d.mts → namespace-DBO1OzYB.d.mts} +0 -0
- /package/dist/{namespace-C-9si-fV.mjs → namespace-DiwqpB-c.mjs} +0 -0
- /package/dist/{namespace-tGRAod3o.d.mts → namespace-DqZweTbX.d.mts} +0 -0
- /package/dist/{namespace-HO2J9sO8.mjs → namespace-jVTsuZHX.mjs} +0 -0
- /package/dist/{namespace-CWGKCNZm.mjs → namespace-tjoxekmf.mjs} +0 -0
- /package/dist/{out-CvjtANXN.mjs → out-8bOYN6EF.mjs} +0 -0
- /package/dist/{packages-DtEEP0Vt.mjs → packages-Bp124-gx.mjs} +0 -0
- /package/dist/{packages-BZ6pzFIq.d.mts → packages-CxPMEg8D.d.mts} +0 -0
- /package/dist/{platform-Bv8llU9c.mjs → platform-CxyYPrkf.mjs} +0 -0
- /package/dist/{provider-operation-Cxoe2SUr.d.mts → provider-operation-DbdyFwNm.d.mts} +0 -0
- /package/dist/{providers-Co5UszRH.mjs → providers-C-eekMxD.mjs} +0 -0
- /package/dist/{providers-namespace-DjFkmvBR.d.mts → providers-namespace-CfZKp-C0.d.mts} +0 -0
- /package/dist/{quick-lru-CrOpWwrf.mjs → quick-lru-CCEnf7y6.mjs} +0 -0
- /package/dist/{schema-Db-y-09L.mjs → schema-C0opCPww.mjs} +0 -0
- /package/dist/{schema-introspection-DgWQCpwx.mjs → schema-introspection-6-r_KEJQ.mjs} +0 -0
- /package/dist/{schemas-N6x2z7Lf.d.mts → schemas-B50oWBuj.d.mts} +0 -0
- /package/dist/{schemas-BO7uOum6.d.mts → schemas-B6Q-qdmn.d.mts} +0 -0
- /package/dist/{schemas-BGExwp3j.mjs → schemas-B8hKbBwI.mjs} +0 -0
- /package/dist/{schemas-miYxK_Z1.d.mts → schemas-BGvkTiCx.d.mts} +0 -0
- /package/dist/{schemas-CqRm0i9a.mjs → schemas-BivbWRkG.mjs} +0 -0
- /package/dist/{schemas-CwbYk_kZ.d.mts → schemas-ChmQldVH.d.mts} +0 -0
- /package/dist/{schemas-DrVg4aQQ.d.mts → schemas-Dd13TMgU.d.mts} +0 -0
- /package/dist/{schemas-BtZqovRH.d.mts → schemas-Pe892GgN.d.mts} +0 -0
- /package/dist/{schemas-CQyRBqD6.d.mts → schemas-bfZNpl0B.d.mts} +0 -0
- /package/dist/{schemas-Bfxskx_2.mjs → schemas-scyC2tFF.mjs} +0 -0
- /package/dist/{semver-DlM8znk4.mjs → semver-BI7kTNsY.mjs} +0 -0
- /package/dist/{server-lifecycle-kmQ5PUDv.mjs → server-lifecycle-B_OZnoe-.mjs} +0 -0
- /package/dist/{server-lifecycle-Dsq56aqC.d.mts → server-lifecycle-L8zja8t8.d.mts} +0 -0
- /package/dist/{session-lineage-B_JW5LpF.d.mts → session-lineage-bUkd3fqx.d.mts} +0 -0
- /package/dist/{shared-schemas-DXwyMCwZ.mjs → shared-schemas-CQ6blrEW.mjs} +0 -0
- /package/dist/{src-CCu8TwL6.mjs → src-BacfeiI4.mjs} +0 -0
- /package/dist/{storage-namespace-BSrv0vXR.mjs → storage-namespace-BZce8kkW.mjs} +0 -0
- /package/dist/{storage-namespace-dfywhXR3.d.mts → storage-namespace-YmE8XCCL.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-Cca-zwXU.mjs} +0 -0
- /package/dist/{supports-color-DUugCQsK.mjs → supports-color-SV_FgSN2.mjs} +0 -0
- /package/dist/{telemetry-Pr3oP2rk.mjs → telemetry-BqoC87F-.mjs} +0 -0
- /package/dist/{timeout-DWDhddRJ.mjs → timeout-DVlN2Zhy.mjs} +0 -0
- /package/dist/{tray-menu-service-BBLa-Rcv.mjs → tray-menu-service-eVVxgPLc.mjs} +0 -0
- /package/dist/{types-BrcjaNPZ.d.mts → types-DdpSEmTO.d.mts} +0 -0
- /package/dist/{types-b54n1o57.d.mts → types-tyv0B605.d.mts} +0 -0
- /package/dist/{ui-config-CyCdlns_.mjs → ui-config-B35GloSX.mjs} +0 -0
- /package/dist/{variant-krjlTdJt.mjs → variant-Dwnge3J_.mjs} +0 -0
- /package/dist/{window-registry-I-imZHV_.mjs → window-registry-CKiMJjId.mjs} +0 -0
- /package/dist/{window-registry-BDnZLPVx.d.mts → window-registry-Pcf35cac.d.mts} +0 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { n as NodeExtensionContext$1, t as ExtensionContext$1 } from "./extension-context-QmFuHdq5.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
4
|
+
|
|
5
|
+
//#region core/contracts/src/reaction/schemas.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Serializable descriptor advertising a contributed Reaction.
|
|
8
|
+
*
|
|
9
|
+
* A descriptor is discovery metadata only: it carries the Reaction identity,
|
|
10
|
+
* a human-readable description, and a derived JSON Schema representation of
|
|
11
|
+
* the parameter shape. It can never synthesize or transport the Reaction's
|
|
12
|
+
* executable handler — runtime truth is always the live
|
|
13
|
+
* {@link ReactionDefinition} contributed by the owning extension.
|
|
14
|
+
*
|
|
15
|
+
* The `kind` field is the canonical Reaction identity in the form
|
|
16
|
+
* `<extension-name>.<reaction-name>`. Namespace ownership is enforced by the
|
|
17
|
+
* Reaction registry at contribution time, not by this schema.
|
|
18
|
+
*/
|
|
19
|
+
declare const ReactionDescriptorSchema$1: z.ZodObject<{
|
|
20
|
+
kind: z.ZodString;
|
|
21
|
+
description: 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
|
+
}, z.core.$strip>;
|
|
24
|
+
/** Serializable descriptor advertising a contributed Reaction. */
|
|
25
|
+
type ReactionDescriptor$1 = z.infer<typeof ReactionDescriptorSchema$1>;
|
|
26
|
+
/**
|
|
27
|
+
* Serializable normalized outcome of a single Reaction invocation.
|
|
28
|
+
*
|
|
29
|
+
* A handler that resolves normally maps to `{ success: true }`; a handler
|
|
30
|
+
* that throws maps to `{ success: false }` with a plain error message.
|
|
31
|
+
* Cancellation is cooperative: a handler that resolves despite an abort
|
|
32
|
+
* still yields `{ success: true }` — only dispatches that are already
|
|
33
|
+
* aborted or already past their deadline before handler entry are
|
|
34
|
+
* guaranteed failure outcomes. The outcome intentionally carries no retry,
|
|
35
|
+
* ordering, or durability semantics — every host dispatch is an independent
|
|
36
|
+
* invocation.
|
|
37
|
+
*/
|
|
38
|
+
declare const ReactionOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
success: z.ZodLiteral<true>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
success: z.ZodLiteral<false>;
|
|
42
|
+
error: z.ZodObject<{
|
|
43
|
+
message: z.ZodString;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>], "success">;
|
|
46
|
+
/** Serializable normalized outcome of a single Reaction invocation. */
|
|
47
|
+
type ReactionOutcome$1 = z.infer<typeof ReactionOutcomeSchema>;
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region core/contracts/src/reaction/execution.d.ts
|
|
50
|
+
declare const reactionRuleRefBrand: unique symbol;
|
|
51
|
+
/**
|
|
52
|
+
* Identifier for a single Reaction invocation.
|
|
53
|
+
*
|
|
54
|
+
* Minted by the dispatching runtime for every host dispatch. Invocations are
|
|
55
|
+
* independent: there is no ordering, deduplication, or exactly-once promise
|
|
56
|
+
* attached to this identifier — it exists for logging, outcome correlation,
|
|
57
|
+
* and cancellation bookkeeping only.
|
|
58
|
+
*/
|
|
59
|
+
type ReactionInvocationId = string;
|
|
60
|
+
/**
|
|
61
|
+
* Opaque host-supplied reference to whatever caused a Reaction dispatch.
|
|
62
|
+
*
|
|
63
|
+
* Rule systems are consumer-owned: a host that evaluates rules attaches its
|
|
64
|
+
* own rule reference here so it can recognize the invocation in logs and
|
|
65
|
+
* outcomes. The framework never interprets this value — it is a branded
|
|
66
|
+
* marker type that deliberately imports no domain definition or persistence
|
|
67
|
+
* model. Hosts mint refs via {@link createReactionRuleRef}.
|
|
68
|
+
*/
|
|
69
|
+
interface ReactionRuleRef$1 {
|
|
70
|
+
/** Opaque brand preventing accidental structural construction. */
|
|
71
|
+
readonly [reactionRuleRefBrand]: true;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Brands a host-owned reference as a {@link ReactionRuleRef}.
|
|
75
|
+
*
|
|
76
|
+
* The host keeps full access to its own reference value via the intersection
|
|
77
|
+
* return type; framework code only ever sees the opaque brand and passes the
|
|
78
|
+
* value through untouched. References may be primitives or objects.
|
|
79
|
+
* @typeParam TRef - Host-owned reference value being branded.
|
|
80
|
+
* @param ref - Host-owned reference value to brand.
|
|
81
|
+
* @returns The same value typed as `TRef & ReactionRuleRef`.
|
|
82
|
+
*/
|
|
83
|
+
declare function createReactionRuleRef<TRef>(ref: TRef): TRef & ReactionRuleRef$1;
|
|
84
|
+
/**
|
|
85
|
+
* Frozen execution envelope supplied to a Reaction handler.
|
|
86
|
+
*
|
|
87
|
+
* The runtime captures and freezes the envelope's top-level fields at dispatch
|
|
88
|
+
* time. The handler therefore observes the same `eventKind`, event payload,
|
|
89
|
+
* and host-composed context that the host used to evaluate its rule and
|
|
90
|
+
* resolve parameters. The framework does not compose or detach domain values:
|
|
91
|
+
* `eventPayload`, `hostContext`, and `ruleRef` are opaque host-owned
|
|
92
|
+
* references passed through unchanged. They may be shared and mutable. A host
|
|
93
|
+
* that requires deeper isolation must detach those values before invocation.
|
|
94
|
+
*
|
|
95
|
+
* Every host dispatch has a separate envelope and independent cancellation
|
|
96
|
+
* and deadline controls. Host-owned values are not thereby isolated or
|
|
97
|
+
* ordered across invocations.
|
|
98
|
+
*/
|
|
99
|
+
interface ReactionExecutionContext {
|
|
100
|
+
/** Runtime-minted identifier for this invocation. */
|
|
101
|
+
readonly invocationId: ReactionInvocationId;
|
|
102
|
+
/**
|
|
103
|
+
* Opaque host-supplied reference to the rule that caused this dispatch.
|
|
104
|
+
*
|
|
105
|
+
* `undefined` when the host dispatched without a rule system — rule systems
|
|
106
|
+
* are consumer-owned and not required for dispatch.
|
|
107
|
+
*/
|
|
108
|
+
readonly ruleRef: ReactionRuleRef$1 | undefined;
|
|
109
|
+
/** Event kind string the host evaluated when deciding to dispatch. */
|
|
110
|
+
readonly eventKind: string;
|
|
111
|
+
/**
|
|
112
|
+
* Event payload the host evaluated, supplied verbatim.
|
|
113
|
+
*
|
|
114
|
+
* Opaque to the framework; it remains a host-owned reference and handlers
|
|
115
|
+
* narrow it with host-specific knowledge.
|
|
116
|
+
*/
|
|
117
|
+
readonly eventPayload: unknown;
|
|
118
|
+
/**
|
|
119
|
+
* Host-composed context available during rule evaluation and parameter
|
|
120
|
+
* resolution, supplied verbatim.
|
|
121
|
+
*
|
|
122
|
+
* Opaque to the framework; it remains a host-owned reference and handlers
|
|
123
|
+
* narrow it with host-specific knowledge.
|
|
124
|
+
*/
|
|
125
|
+
readonly hostContext: unknown;
|
|
126
|
+
/**
|
|
127
|
+
* Bus correlation identifier propagated from the triggering message, when
|
|
128
|
+
* one exists.
|
|
129
|
+
*/
|
|
130
|
+
readonly correlationId: string | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* Runtime-controlled cancellation signal for this invocation.
|
|
133
|
+
*
|
|
134
|
+
* Handlers should pass this to long-running operations so they cancel
|
|
135
|
+
* promptly when the runtime aborts the invocation. Cancellation is
|
|
136
|
+
* cooperative: a handler that ignores the signal and resolves still
|
|
137
|
+
* yields a success outcome.
|
|
138
|
+
*/
|
|
139
|
+
readonly signal: AbortSignal;
|
|
140
|
+
/**
|
|
141
|
+
* Absolute deadline hint for this invocation as epoch milliseconds, or
|
|
142
|
+
* `undefined` when the host imposed no deadline.
|
|
143
|
+
*
|
|
144
|
+
* The dispatcher guarantees only that an invocation which is already
|
|
145
|
+
* aborted or already past this deadline never enters handler code; it does
|
|
146
|
+
* not promise an exact-instant abort. Handlers may consult the deadline
|
|
147
|
+
* proactively to budget their own work, but must treat {@link signal} as
|
|
148
|
+
* the sole source of truth for cancellation.
|
|
149
|
+
*/
|
|
150
|
+
readonly deadlineEpochMs: number | undefined;
|
|
151
|
+
}
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region core/contracts/src/reaction/definition.d.ts
|
|
154
|
+
/**
|
|
155
|
+
* Trusted asynchronous Reaction handler.
|
|
156
|
+
*
|
|
157
|
+
* Receives parameters that were already validated against the Reaction's live
|
|
158
|
+
* `parameterSchema` by the dispatching runtime, together with the frozen
|
|
159
|
+
* {@link ReactionExecutionContext} envelope for this invocation.
|
|
160
|
+
* @typeParam TParams - Validated parameter shape for this Reaction.
|
|
161
|
+
* @param parameters - Schema-validated, read-only invocation parameters.
|
|
162
|
+
* @param context - Frozen execution envelope for this invocation.
|
|
163
|
+
* @returns Resolves when the Reaction's side-effects are complete.
|
|
164
|
+
*/
|
|
165
|
+
type ReactionHandler<TParams extends Record<string, unknown> = Record<string, unknown>> = (parameters: Readonly<TParams>, context: ReactionExecutionContext) => Promise<void>;
|
|
166
|
+
/**
|
|
167
|
+
* Executable Reaction contributed by an extension.
|
|
168
|
+
*
|
|
169
|
+
* This is the type-erased shape stored on contribution surfaces and consumed
|
|
170
|
+
* by the Reaction registry; typed authoring happens through
|
|
171
|
+
* {@link defineReaction}, which erases the parameter type after wiring the
|
|
172
|
+
* live schema and handler together. The live `parameterSchema` and `handler`
|
|
173
|
+
* are function-carrying runtime values and must never be treated as
|
|
174
|
+
* serializable descriptor data — `toDescriptor()` produces the only
|
|
175
|
+
* serializable representation.
|
|
176
|
+
*/
|
|
177
|
+
interface ReactionDefinition$1 {
|
|
178
|
+
/**
|
|
179
|
+
* Canonical Reaction kind: `<extension-name>.<reaction-name>`.
|
|
180
|
+
*
|
|
181
|
+
* Namespace ownership (the `<extension-name>.` prefix matching the
|
|
182
|
+
* contributing extension) is enforced by the Reaction registry at
|
|
183
|
+
* contribution time.
|
|
184
|
+
*/
|
|
185
|
+
readonly kind: string;
|
|
186
|
+
/** Human-readable description of what this Reaction does when invoked. */
|
|
187
|
+
readonly description: string;
|
|
188
|
+
/**
|
|
189
|
+
* Live Zod schema for the Reaction's invocation parameters.
|
|
190
|
+
*
|
|
191
|
+
* The dispatching runtime validates raw parameters against this schema
|
|
192
|
+
* before invoking {@link handler}.
|
|
193
|
+
*/
|
|
194
|
+
readonly parameterSchema: z.ZodType<Record<string, unknown>>;
|
|
195
|
+
/**
|
|
196
|
+
* Trusted executable handler for this Reaction.
|
|
197
|
+
*
|
|
198
|
+
* Invariant: callers MUST pass parameters that were validated with
|
|
199
|
+
* {@link parameterSchema} — the typed inner handler installed by
|
|
200
|
+
* {@link defineReaction} narrows them under that contract.
|
|
201
|
+
*/
|
|
202
|
+
readonly handler: ReactionHandler;
|
|
203
|
+
/**
|
|
204
|
+
* Produces the serializable {@link ReactionDescriptor} for this Reaction.
|
|
205
|
+
* @returns Discovery metadata with a derived JSON Schema parameter shape;
|
|
206
|
+
* never includes the live schema or handler. Each call returns a detached
|
|
207
|
+
* snapshot owned by the caller; mutating it cannot affect later discovery.
|
|
208
|
+
*/
|
|
209
|
+
readonly toDescriptor: () => ReactionDescriptor$1;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Options for {@link defineReaction}.
|
|
213
|
+
* @typeParam TParams - Parameter shape validated by `parameterSchema`.
|
|
214
|
+
*/
|
|
215
|
+
interface DefineReactionOptions<TParams extends Record<string, unknown>> {
|
|
216
|
+
/**
|
|
217
|
+
* Canonical Reaction kind: `<extension-name>.<reaction-name>`.
|
|
218
|
+
* The Reaction registry enforces the extension-name prefix at contribution time.
|
|
219
|
+
*/
|
|
220
|
+
readonly kind: string;
|
|
221
|
+
/** Human-readable description of what this Reaction does when invoked. */
|
|
222
|
+
readonly description: string;
|
|
223
|
+
/** Live Zod schema for the Reaction's invocation parameters. */
|
|
224
|
+
readonly parameterSchema: z.ZodType<TParams>;
|
|
225
|
+
/** Typed handler receiving already-validated read-only parameters. */
|
|
226
|
+
readonly handler: ReactionHandler<TParams>;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Creates an executable Reaction definition with a live parameter schema, a
|
|
230
|
+
* typed handler, and a serializable descriptor.
|
|
231
|
+
*
|
|
232
|
+
* The returned definition is type-erased for storage on contribution
|
|
233
|
+
* surfaces; the typed `handler` from the options keeps its parameter type
|
|
234
|
+
* internally and is invoked under the invariant that the dispatching runtime
|
|
235
|
+
* validated the parameters with `parameterSchema` first. Definition creation
|
|
236
|
+
* derives serializable discovery metadata — the live schema and handler are
|
|
237
|
+
* never serialized.
|
|
238
|
+
* @typeParam TParams - Parameter shape validated by `parameterSchema`.
|
|
239
|
+
* @param options - Reaction identity, description, live parameter schema, and
|
|
240
|
+
* typed handler.
|
|
241
|
+
* @returns A type-erased {@link ReactionDefinition} ready for contribution.
|
|
242
|
+
* @throws Error when the Reaction identity or input parameter schema cannot
|
|
243
|
+
* form a serializable {@link ReactionDescriptorSchema}, enforced fail-fast
|
|
244
|
+
* at definition time so `toDescriptor()` can never fail discovery.
|
|
245
|
+
* @example
|
|
246
|
+
* ```ts
|
|
247
|
+
* export const notifyReaction = defineReaction({
|
|
248
|
+
* kind: 'my-extension.notify-owner',
|
|
249
|
+
* description: 'Notifies the owning user about a host-selected event.',
|
|
250
|
+
* parameterSchema: z.object({ channel: z.string(), message: z.string() }),
|
|
251
|
+
* handler: async (parameters, context) => {
|
|
252
|
+
* await sendNotification(parameters.channel, parameters.message, {
|
|
253
|
+
* signal: context.signal,
|
|
254
|
+
* });
|
|
255
|
+
* },
|
|
256
|
+
* });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
declare function defineReaction<TParams extends Record<string, unknown>>(options: DefineReactionOptions<TParams>): ReactionDefinition$1;
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region core/contracts/src/reaction/contribution.d.ts
|
|
262
|
+
/**
|
|
263
|
+
* Context supplied to the `createReactions` factory of an
|
|
264
|
+
* {@link ExtensionReactionsContribution}.
|
|
265
|
+
*
|
|
266
|
+
* This is a semantically named alias over the applicable host
|
|
267
|
+
* {@link ExtensionContext} — an API-evolution seam, not a second dependency
|
|
268
|
+
* container. Reaction factories receive the same per-extension runtime
|
|
269
|
+
* context as other executable contribution factories; the alias exists so
|
|
270
|
+
* the Reaction surface can grow reaction-specific context fields later
|
|
271
|
+
* without changing every factory signature.
|
|
272
|
+
* @typeParam THostContext - Concrete context shape supplied by the host
|
|
273
|
+
* runtime. Defaults to {@link NodeExtensionContext} because the current
|
|
274
|
+
* framework hosts are Node-based.
|
|
275
|
+
*/
|
|
276
|
+
type ReactionContributionContext<THostContext extends ExtensionContext$1 = NodeExtensionContext$1> = THostContext;
|
|
277
|
+
/**
|
|
278
|
+
* Executable Reactions contribution surface declared by an extension.
|
|
279
|
+
*
|
|
280
|
+
* The runtime calls `createReactions(ctx)` during extension activation and
|
|
281
|
+
* atomically registers the returned definitions as that extension's complete
|
|
282
|
+
* Reaction batch.
|
|
283
|
+
* Definitions carry live Zod parameter schemas and trusted handlers — they
|
|
284
|
+
* are runtime values, never serializable descriptor data.
|
|
285
|
+
* @typeParam THostContext - Concrete context shape supplied by the host
|
|
286
|
+
* runtime. Defaults to {@link NodeExtensionContext} because the current
|
|
287
|
+
* framework hosts are Node-based.
|
|
288
|
+
*/
|
|
289
|
+
interface ExtensionReactionsContribution<THostContext extends ExtensionContext$1 = NodeExtensionContext$1> {
|
|
290
|
+
/**
|
|
291
|
+
* Factory that produces the Reaction definitions for this extension.
|
|
292
|
+
*
|
|
293
|
+
* Called during extension activation. Each result is the extension's
|
|
294
|
+
* complete Reaction batch and atomically replaces its prior batch. Returning
|
|
295
|
+
* a `Promise` allows async resource acquisition (e.g. lazy loading).
|
|
296
|
+
* @param ctx - Per-extension runtime context supplied by the host.
|
|
297
|
+
* @returns Reaction definitions or a promise that resolves to them.
|
|
298
|
+
*/
|
|
299
|
+
readonly createReactions: (ctx: ReactionContributionContext<THostContext>) => readonly ReactionDefinition$1[] | Promise<readonly ReactionDefinition$1[]>;
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
export { ReactionHandler as a, ReactionInvocationId as c, ReactionDescriptor$1 as d, ReactionDescriptorSchema$1 as f, ReactionDefinition$1 as i, ReactionRuleRef$1 as l, ReactionOutcomeSchema as m, ReactionContributionContext as n, defineReaction as o, ReactionOutcome$1 as p, DefineReactionOptions as r, ReactionExecutionContext as s, ExtensionReactionsContribution as t, createReactionRuleRef as u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { r as ExecutionTarget } from "./schemas-B50oWBuj.mjs";
|
|
1
2
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
-
import { IMakaioSession, MakaioSessionAgent, Message, MessageInput, MessageOutcome, ResponseSchemaDescriptor, SessionContext, TurnInitiator } from "@makaio/framework/contracts";
|
|
3
|
+
import { IMakaioSession, MakaioSessionAgent, Message, MessageInput, MessageOutcome, ReasoningLevelMap, ResponseSchemaDescriptor, SessionContext, SessionOwnershipRecoveryGuard, TurnInitiator } from "@makaio/framework/contracts";
|
|
3
4
|
|
|
4
5
|
//#region services/core/src/session/entities/turn.d.ts
|
|
5
6
|
/**
|
|
@@ -541,6 +542,217 @@ declare class SessionTurnManager {
|
|
|
541
542
|
private findTurnForCompletion;
|
|
542
543
|
}
|
|
543
544
|
//#endregion
|
|
545
|
+
//#region services/core/src/session/utils/resolution.d.ts
|
|
546
|
+
/**
|
|
547
|
+
* Resolve adapterName → adapterId for bus routing.
|
|
548
|
+
* Queries the adapters table for a local enabled instance.
|
|
549
|
+
* @param bus - Bus instance
|
|
550
|
+
* @param adapterName - Adapter type name
|
|
551
|
+
* @param machineId - Optional machine ID for deterministic local resolution
|
|
552
|
+
* @returns Canonical adapter ID for bus routing
|
|
553
|
+
* @throws if no enabled instance found for this adapterName
|
|
554
|
+
*/
|
|
555
|
+
declare function resolveAdapterId(bus: IMakaioBus, adapterName: string, machineId?: string): Promise<string>;
|
|
556
|
+
/**
|
|
557
|
+
* The adapter instance an ownership act runs against, together with the machine
|
|
558
|
+
* whose namespace it acts in.
|
|
559
|
+
*
|
|
560
|
+
* **One value, because it is one key.** The ownership key is
|
|
561
|
+
* `(machine, adapter instance, provider session)` and an instance ID is derived
|
|
562
|
+
* from `(machineId, adapterName)`, so an act that took its instance from one
|
|
563
|
+
* source and its machine from another files itself under a pair nobody else
|
|
564
|
+
* computes. Carrying both halves in one object is what makes "instance and
|
|
565
|
+
* namespace come from one identity" structural rather than a rule every call
|
|
566
|
+
* site has to remember.
|
|
567
|
+
*
|
|
568
|
+
* `machineId` is absent for exactly one caller shape — one that named no machine
|
|
569
|
+
* and is therefore not acting for any: it gets the unscoped answer, the
|
|
570
|
+
* authority acts under its own composed identity, and there are no two
|
|
571
|
+
* identities to mix.
|
|
572
|
+
*/
|
|
573
|
+
interface OwnedAdapterInstance {
|
|
574
|
+
/** Live adapter instance every act of the attempt addresses. */
|
|
575
|
+
readonly adapterId: string;
|
|
576
|
+
/** Machine whose namespace those acts are filed under, or `undefined` when the caller named none. */
|
|
577
|
+
readonly machineId?: string;
|
|
578
|
+
/** Exact runtime owner, absent only before a connector-dispatchable target is proved. */
|
|
579
|
+
readonly ownerInstanceId?: string;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* An owned instance whose machine is named.
|
|
583
|
+
*
|
|
584
|
+
* The shape a path that performs a **keyed** ownership act needs, stated as a
|
|
585
|
+
* type so the requirement is checked rather than remembered: a keyed act files
|
|
586
|
+
* itself under `(machine, instance, provider session)`, so a path that can reach
|
|
587
|
+
* one may not hold an instance whose machine is unnamed. Wave 3 left exactly
|
|
588
|
+
* that hole — a fresh lead start reserves keyless, which hides the machine's
|
|
589
|
+
* absence, and then settles on the provider session the connector confirms,
|
|
590
|
+
* which does not.
|
|
591
|
+
*/
|
|
592
|
+
type MachineScopedAdapterInstance = OwnedAdapterInstance & {
|
|
593
|
+
readonly machineId: string;
|
|
594
|
+
readonly ownerInstanceId: string;
|
|
595
|
+
};
|
|
596
|
+
/** What a caller knows about the instance it wants, before it is resolved. */
|
|
597
|
+
interface OwnedAdapterInstanceTarget {
|
|
598
|
+
/** Adapter type name the instance belongs to. */
|
|
599
|
+
readonly adapterName: string;
|
|
600
|
+
/**
|
|
601
|
+
* Instance the caller named itself, when it named one.
|
|
602
|
+
*
|
|
603
|
+
* Only usable together with {@link OwnedAdapterInstanceTarget.machineId}: the
|
|
604
|
+
* derivation is one-way, so a named instance whose machine is unnamed is half
|
|
605
|
+
* an identity, and half an identity is worse than none.
|
|
606
|
+
*/
|
|
607
|
+
readonly adapterId?: string;
|
|
608
|
+
/**
|
|
609
|
+
* Machine every act of this attempt names, or `undefined` when the caller
|
|
610
|
+
* names none.
|
|
611
|
+
*/
|
|
612
|
+
readonly machineId?: string;
|
|
613
|
+
/**
|
|
614
|
+
* Instance this agent was last known to live on, offered as a fallback for the
|
|
615
|
+
* unscoped form only.
|
|
616
|
+
*
|
|
617
|
+
* A persisted instance goes stale across a runtime restart or a failover, so
|
|
618
|
+
* it is never preferred — but for a caller that names no machine it beats
|
|
619
|
+
* failing a whole recovery because a registry lookup was momentarily
|
|
620
|
+
* unavailable, and it cannot mix two identities because there is only one.
|
|
621
|
+
*/
|
|
622
|
+
readonly storedAdapterId?: string;
|
|
623
|
+
}
|
|
624
|
+
/**
|
|
625
|
+
* Prove that an explicitly selected adapter instance is currently live on the
|
|
626
|
+
* exact machine the selection names.
|
|
627
|
+
*
|
|
628
|
+
* The proof is announcement-backed rather than hash-backed: hosts may provide
|
|
629
|
+
* opaque adapter IDs, and a deterministic-looking value is not evidence that a
|
|
630
|
+
* runtime has initialized it.
|
|
631
|
+
* @param bus - Bus the live-identity request is issued on.
|
|
632
|
+
* @param target - Complete identity the caller intends to dispatch to.
|
|
633
|
+
* @returns The dispatchable instance, or `undefined` when it has no matching live announcement.
|
|
634
|
+
*/
|
|
635
|
+
declare function resolveAnnouncedAdapterInstance(bus: IMakaioBus, target: Required<Pick<OwnedAdapterInstanceTarget, 'adapterId' | 'adapterName' | 'machineId'>>): Promise<MachineScopedAdapterInstance | undefined>;
|
|
636
|
+
/**
|
|
637
|
+
* Resolve the instance an attempt addresses **and** the machine it acts for, or
|
|
638
|
+
* answer that this runtime may not act at all.
|
|
639
|
+
*
|
|
640
|
+
* One seam for a rule that was split in three: a fresh resolution for every act
|
|
641
|
+
* (a persisted instance goes stale across a restart or a failover), the machine
|
|
642
|
+
* carried alongside it, and the refusal when the two cannot be produced
|
|
643
|
+
* together. Reserving against one instance and dispatching to another reserves
|
|
644
|
+
* in a namespace the dispatch never uses, and reserving under machine X while
|
|
645
|
+
* dispatching to machine R's instance builds a key no other actor computes — it
|
|
646
|
+
* collides with nothing, so it protects nothing, and the runtime that really
|
|
647
|
+
* owns that instance claims the same provider session beside it.
|
|
648
|
+
*
|
|
649
|
+
* **The three answers, and why each is the honest one:**
|
|
650
|
+
*
|
|
651
|
+
* - **A named instance with its machine** is returned only after the live
|
|
652
|
+
* identity registry confirms the exact triple it announced. The selection
|
|
653
|
+
* schema proves the request is complete; the announcement proves the target
|
|
654
|
+
* currently exists, including when its host supplied an opaque ID.
|
|
655
|
+
* - **A named instance without a machine** is `undefined`. This is the handler-side
|
|
656
|
+
* half of the schema's refinement, and it is needed as well as the schema:
|
|
657
|
+
* the test bus does not validate, and defaulting to this runtime's own identity
|
|
658
|
+
* here is precisely the silent mis-key the refinement exists to prevent.
|
|
659
|
+
* - **No named instance** derives one. With a machine named, a derivation that
|
|
660
|
+
* cannot answer is `undefined` — the stored instance may not stand in, because
|
|
661
|
+
* the machine it belongs to cannot be recovered from it. With no machine named,
|
|
662
|
+
* the attempt is unscoped in every act, so the stored instance is an honest
|
|
663
|
+
* fallback.
|
|
664
|
+
*
|
|
665
|
+
* `undefined` means *this runtime may not act for that machine*, never *this
|
|
666
|
+
* failed*. Translating it is the caller's job, because only the caller knows
|
|
667
|
+
* what its own refusal looks like: a send defers the agent, a restart reports a
|
|
668
|
+
* non-native recovery, a start refuses to dispatch.
|
|
669
|
+
* @param bus - Bus the lookup is issued on.
|
|
670
|
+
* @param target - What the caller knows about the instance and the machine it acts for.
|
|
671
|
+
* @returns Both halves of the key, or `undefined` when this runtime may not act for that machine.
|
|
672
|
+
*/
|
|
673
|
+
declare function resolveOwnedAdapterInstance(bus: IMakaioBus, target: OwnedAdapterInstanceTarget): Promise<OwnedAdapterInstance | undefined>;
|
|
674
|
+
/**
|
|
675
|
+
* Resolve supported reasoning levels for a model from provider definitions.
|
|
676
|
+
*
|
|
677
|
+
* Looks up the provider config by ID, finds the provider definition it belongs to,
|
|
678
|
+
* then finds the model's `supportedReasoningLevels` in the provider's `availableModels`
|
|
679
|
+
* catalog.
|
|
680
|
+
* @param bus - Bus instance for RPC calls
|
|
681
|
+
* @param providerConfigId - Canonical provider config ID (ProviderConfigRecord.id)
|
|
682
|
+
* @param model - Model identifier to look up in the provider's catalog
|
|
683
|
+
* @returns Object with `supportedReasoningLevels` when found, or `undefined` when not resolvable
|
|
684
|
+
*/
|
|
685
|
+
declare function resolveModelCapabilities(bus: IMakaioBus, providerConfigId: string | undefined, model: string | undefined): Promise<{
|
|
686
|
+
supportedReasoningLevels?: ReasoningLevelMap;
|
|
687
|
+
} | undefined>;
|
|
688
|
+
/**
|
|
689
|
+
* Resolves the effective execution target for a session.
|
|
690
|
+
* Priority: explicit executionTargetId → system default (local).
|
|
691
|
+
* @param bus - Makaio bus instance
|
|
692
|
+
* @param params - Resolution parameters from session context
|
|
693
|
+
* @returns Resolved execution target
|
|
694
|
+
*/
|
|
695
|
+
declare function resolveExecutionTarget(bus: IMakaioBus, params: {
|
|
696
|
+
executionTargetId?: string;
|
|
697
|
+
}): Promise<ExecutionTarget>;
|
|
698
|
+
//#endregion
|
|
699
|
+
//#region services/core/src/session/handlers/session-start-error.d.ts
|
|
700
|
+
/**
|
|
701
|
+
* Why a reserved start could not be completed, as a value the caller can branch
|
|
702
|
+
* on.
|
|
703
|
+
*
|
|
704
|
+
* Every member names a *modeled* outcome of the ownership seam, not a bug: a
|
|
705
|
+
* start that reaches a live connector can still be refused ownership of what
|
|
706
|
+
* that connector is talking to, and the caller has to be told which of those
|
|
707
|
+
* happened rather than being handed a message to match on.
|
|
708
|
+
*/
|
|
709
|
+
type SessionStartFailureCode = /** The adapter refused or threw; the reservation was rolled back or retired. */'start-failed'
|
|
710
|
+
/**
|
|
711
|
+
* The connector is live but another generation owns the provider session it
|
|
712
|
+
* speaks to. The connector was stopped and the claims retired.
|
|
713
|
+
*/
|
|
714
|
+
| 'ownership-refused' /** The agent row is `disposed` or gone; the connector was stopped. */ | 'agent-unavailable'
|
|
715
|
+
/**
|
|
716
|
+
* The settlement neither landed nor was refused on ownership grounds — a raw
|
|
717
|
+
* throw from one of its guarded acts, not a modeled answer. The attempt is
|
|
718
|
+
* torn down on the caller-owned paths: the connector is stopped best-effort,
|
|
719
|
+
* the attempt's tokens are retired as `abandoned`, and the row is committed
|
|
720
|
+
* `dead` — the durable state must not advertise a start whose settlement
|
|
721
|
+
* this process can no longer vouch for.
|
|
722
|
+
*/
|
|
723
|
+
| 'settlement-unresolved' /** A joined start left the row `starting` more often than the bounded re-read allows. */ | 'start-unresolved' /** Another start won the lead designation and the session still has no agents. */ | 'lead-conflict' /** The session lifecycle gate rejected the reservation before adapter dispatch. */ | 'session-not-active';
|
|
724
|
+
/** A reserved start that did not end with a usable agent. */
|
|
725
|
+
declare class SessionStartError extends Error {
|
|
726
|
+
readonly code: SessionStartFailureCode;
|
|
727
|
+
/**
|
|
728
|
+
* The named targets this call could not act for — exactly the set the
|
|
729
|
+
* `agent-unavailable` code refuses. Two producers fill it: a total deferral
|
|
730
|
+
* (every named agent's provider session is held by a generation this runtime
|
|
731
|
+
* does not own) and a stated-target send against a session with no agents
|
|
732
|
+
* (the named agents do not exist). The field deliberately does not separate
|
|
733
|
+
* the two, because the code does not either: which one it was is a statement
|
|
734
|
+
* about the session, carried by the message, not a distinct caller branch —
|
|
735
|
+
* in particular, no entry is guaranteed to be foreign-held-and-retryable.
|
|
736
|
+
*
|
|
737
|
+
* A response field is unreachable on a path that throws, and a send that
|
|
738
|
+
* silently reaches fewer agents than it was asked to is exactly the failure
|
|
739
|
+
* this contract refuses everywhere else. The field carries the set for
|
|
740
|
+
* in-process callers; the message names the agents as well, for anything
|
|
741
|
+
* crossing a transport that may not preserve custom error properties.
|
|
742
|
+
*/
|
|
743
|
+
readonly deferredAgentIds?: readonly string[];
|
|
744
|
+
/** Stored lifecycle status when the admission gate rejected a reservation. */
|
|
745
|
+
readonly sessionStatus?: 'closed' | 'archived' | 'discovered';
|
|
746
|
+
/**
|
|
747
|
+
* @param code - Which modeled outcome this is; the value callers branch on.
|
|
748
|
+
* @param message - Human-readable detail, including the identifiers involved.
|
|
749
|
+
* @param cause - Underlying failure, when one exists.
|
|
750
|
+
* @param deferredAgentIds - The named targets this call could not act for, when the send named any.
|
|
751
|
+
* @param sessionStatus - Non-active session status observed by a refused reservation.
|
|
752
|
+
*/
|
|
753
|
+
constructor(code: SessionStartFailureCode, message: string, cause?: unknown, deferredAgentIds?: readonly string[], sessionStatus?: 'closed' | 'archived' | 'discovered');
|
|
754
|
+
}
|
|
755
|
+
//#endregion
|
|
544
756
|
//#region services/core/src/session/handlers/abandon-handler.d.ts
|
|
545
757
|
/**
|
|
546
758
|
* Registers the session.abandon RPC handler.
|
|
@@ -602,6 +814,116 @@ declare function registerForkHandler(bus: IMakaioBus, machineId?: string): () =>
|
|
|
602
814
|
*/
|
|
603
815
|
declare function registerMergeHandler(bus: IMakaioBus): () => void;
|
|
604
816
|
//#endregion
|
|
817
|
+
//#region services/core/src/session/handlers/in-flight-start-join.d.ts
|
|
818
|
+
/** What a consumer does with an agent whose start it joined or arbitrated. */
|
|
819
|
+
type StartResolution = /** The agent is usable as it stands. */'use' /** The agent is not part of this send: the row is gone, or terminal. */ | 'drop' /** The agent belongs to a guarded recovery this runtime cannot prove retired. */ | 'defer' /** The agent needs the ordinary fresh-with-history recovery. */ | 'recover';
|
|
820
|
+
/** How a send's target set changed once every in-flight start was resolved. */
|
|
821
|
+
interface InFlightStartResolution {
|
|
822
|
+
/** Agents that left the session's target set — deleted or `disposed` rows. */
|
|
823
|
+
readonly droppedAgentIds: ReadonlySet<string>;
|
|
824
|
+
/** Agents this send must recover before using. */
|
|
825
|
+
readonly recoveringAgentIds: ReadonlySet<string>;
|
|
826
|
+
/** Agents whose guarded recovery is owned by an unretired or unknown runtime. */
|
|
827
|
+
readonly deferredAgentIds: ReadonlySet<string>;
|
|
828
|
+
/**
|
|
829
|
+
* The subset whose recovery this send claimed by **compare-and-swap**, not by
|
|
830
|
+
* consuming a local attempt.
|
|
831
|
+
*
|
|
832
|
+
* The two provenances carry different evidence and must not be treated alike.
|
|
833
|
+
* A locally joined attempt reported its own verdict: this process ran it, and
|
|
834
|
+
* it said whether a connector exists. A won compare-and-swap says only that
|
|
835
|
+
* this caller wrote a status first — the attempt it outran belongs to a
|
|
836
|
+
* process this runtime cannot see, and Wave 3 has no way to ask whether that
|
|
837
|
+
* process is alive (OQ-B, deferred to Wave 4). Writing `dead` does not make
|
|
838
|
+
* the agent dead, so a consumer must still find out for itself before opening
|
|
839
|
+
* a second lifecycle.
|
|
840
|
+
*/
|
|
841
|
+
readonly arbitratedAgentIds: ReadonlySet<string>;
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Apply the in-flight-start consumer rule to a session's agents.
|
|
845
|
+
*
|
|
846
|
+
* Runs *before* the liveness probe and before the fresh-start branch, and only
|
|
847
|
+
* for agents whose stored status is `starting`. When this process waits for one
|
|
848
|
+
* of those starts, every materialized row is re-read to a stable pass;
|
|
849
|
+
* otherwise they cost nothing.
|
|
850
|
+
* The ordering matters at both ends: probing a `starting` agent would find no
|
|
851
|
+
* registered connector and walk into a second lifecycle for an identity that
|
|
852
|
+
* already has one in flight, and an agent dropped here may be the session's last,
|
|
853
|
+
* which must then start fresh rather than fail for having no targets.
|
|
854
|
+
*
|
|
855
|
+
* Dropped agents are removed from `session.agents` in place, and every agent that
|
|
856
|
+
* survives is **replaced by the row this resolution read**, so every later step
|
|
857
|
+
* of the send sees both the target set and the identities this resolution
|
|
858
|
+
* produced. A local join also refreshes every materialized row: every one was
|
|
859
|
+
* read before the wait, and the send probes and routes at all of their
|
|
860
|
+
* identities afterwards. The second half matters as much as the first: a joined
|
|
861
|
+
* attempt can bind an agent to a different adapter instance, and a send that
|
|
862
|
+
* kept the pre-join snapshot would probe liveness and route at the instance the
|
|
863
|
+
* lifecycle moved off.
|
|
864
|
+
* @param bus - Bus the joins, reads and compare-and-swaps are issued on.
|
|
865
|
+
* @param session - Session whose agents are resolved; its `agents` are filtered and refreshed in place.
|
|
866
|
+
* @returns Which agents left the set, and which the send must recover.
|
|
867
|
+
*/
|
|
868
|
+
declare function resolveInFlightStarts(bus: IMakaioBus, session: IMakaioSession): Promise<InFlightStartResolution>;
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region services/core/src/session/handlers/deferred-agents.d.ts
|
|
871
|
+
/**
|
|
872
|
+
* Admit a send to the fresh-start branch, or refuse the targets it stated.
|
|
873
|
+
*
|
|
874
|
+
* **Decided before that branch runs, and the ordering is the whole point.**
|
|
875
|
+
* `lead-default` is the only form that asks for *an* agent rather than asserting
|
|
876
|
+
* something about the ones the session has; every other form states a target,
|
|
877
|
+
* and a session with no agents answers every such statement the same way. So
|
|
878
|
+
* only `lead-default` may bring a session its first agent:
|
|
879
|
+
*
|
|
880
|
+
* - **`explicit`** — the session cannot contain the ids the caller named, and
|
|
881
|
+
* substituting a freshly started agent would answer a question nobody asked.
|
|
882
|
+
* - **`'all'`** — "all of them" of nothing is not a delivery, exactly as it is
|
|
883
|
+
* not one when every target defers ({@link refuseTotalDeferral}).
|
|
884
|
+
*
|
|
885
|
+
* Either send was already decided at this moment, so starting a lead first only
|
|
886
|
+
* changes *what the failure leaves behind* — an agent row, a lead designation
|
|
887
|
+
* and a reserved provider session created by a send that never delivered.
|
|
888
|
+
*
|
|
889
|
+
* This admits, it does not clear: a named agent the session *has* may still turn
|
|
890
|
+
* out to be undrivable, which is what the post-recovery validation decides.
|
|
891
|
+
*
|
|
892
|
+
* `agent-unavailable` is reused rather than invented, exactly as
|
|
893
|
+
* {@link refuseTotalDeferral} reuses it: the code means "this runtime may not act
|
|
894
|
+
* for these agents", and an agent that does not exist is the strongest form of
|
|
895
|
+
* that, not a different fact. Only the named form carries `deferredAgentIds` — a
|
|
896
|
+
* throw makes the response field unreachable, so the ids travel on the error
|
|
897
|
+
* where there are ids to travel; a broadcast named none, and inventing a payload
|
|
898
|
+
* for it would say the session held agents it never held.
|
|
899
|
+
* @param caller - Log prefix of the send path raising this, e.g. `[session.sendMessage]`.
|
|
900
|
+
* @param sessionId - Session the send was for.
|
|
901
|
+
* @param session - Session as this send resolved it, after any in-flight start.
|
|
902
|
+
* @param targetSpec - The request's `agentIds`, as the schema models it.
|
|
903
|
+
* @throws A {@link SessionStartError} naming the agents, when the send named any.
|
|
904
|
+
*/
|
|
905
|
+
declare function admitFreshStartTargets(caller: string, sessionId: string, session: IMakaioSession, targetSpec: readonly string[] | 'all' | undefined): void;
|
|
906
|
+
/**
|
|
907
|
+
* Refuse a send whose every target is held elsewhere.
|
|
908
|
+
*
|
|
909
|
+
* `agent-unavailable` is reused rather than invented: it already means "this
|
|
910
|
+
* runtime may not act for this agent". A broadcast with no recipient is not a
|
|
911
|
+
* delivery, and a caller that named its agents is owed the failure rather than
|
|
912
|
+
* a substitute.
|
|
913
|
+
*
|
|
914
|
+
* **Exported for the send pipelines a product composes itself.** *Whether* a
|
|
915
|
+
* total deferral is a refusal is a product decision — this framework's
|
|
916
|
+
* orchestrator and a product's may guard it differently — but the refusal it
|
|
917
|
+
* raises is one fact with one wording and one code, and a second copy of it is a
|
|
918
|
+
* second answer to "what did the caller just fail with". The caller names itself
|
|
919
|
+
* so the message still says where the send stopped.
|
|
920
|
+
* @param caller - Log prefix of the send path raising this, e.g. `[session.sendMessage]`.
|
|
921
|
+
* @param sessionId - Session the send was for.
|
|
922
|
+
* @param deferredAgentIds - Agents held by a generation this runtime does not own.
|
|
923
|
+
* @throws A {@link SessionStartError} naming the agents in both the field and the message.
|
|
924
|
+
*/
|
|
925
|
+
declare function refuseTotalDeferral(caller: string, sessionId: string, deferredAgentIds: ReadonlySet<string>): never;
|
|
926
|
+
//#endregion
|
|
605
927
|
//#region services/core/src/session/handlers/routing-lifecycle.d.ts
|
|
606
928
|
/** Narrow ledger transition owned by SessionTurnManager and injected into routing. */
|
|
607
929
|
interface TurnCompletionRecorder {
|
|
@@ -722,4 +1044,4 @@ declare function routeToAgentsCore(bus: IMakaioBus, session: IMakaioSession, age
|
|
|
722
1044
|
adapterId: string;
|
|
723
1045
|
}>, message: MessageInput, messageId: string, turn: Turn$1, deliveryMode: 'enqueue' | 'immediate' | undefined, onTurnComplete: TurnCompleteCallback, turnManager: TurnCompletionRecorder, sessionContext?: SessionContext, responseSchema?: ResponseSchemaDescriptor, assertDispatch?: () => void): Promise<readonly AgentDispatchOutcome[]>;
|
|
724
1046
|
//#endregion
|
|
725
|
-
export {
|
|
1047
|
+
export { SessionTurnManager as C, TurnPairStateChange as D, TurnContext as E, TurnPairTerminalOutcome as O, resolveOwnedAdapterInstance as S, TurnConfig as T, OwnedAdapterInstanceTarget as _, InFlightStartResolution as a, resolveExecutionTarget as b, registerMergeHandler as c, registerAttachHandler as d, registerAbandonHandler as f, OwnedAdapterInstance as g, MachineScopedAdapterInstance as h, refuseTotalDeferral as i, TurnResult as k, registerForkHandler as l, SessionStartFailureCode as m, routeToAgents as n, StartResolution as o, SessionStartError as p, admitFreshStartTargets as r, resolveInFlightStarts as s, routeToAgentsCore as t, registerCompressHandler as u, resolveAdapterId as v, Turn$1 as w, resolveModelCapabilities as x, resolveAnnouncedAdapterInstance as y };
|