@makaio/framework 1.0.0-dev-1783705652236 → 1.0.0-dev-1783973359164
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +2 -2
- package/dist/account-identity-BYfeWLe-.mjs +1 -0
- package/dist/adapter-auth-runtime-a4O7cSNP.mjs +1 -0
- package/dist/adapter-binding-DDUyv1JK.d.mts +254 -0
- package/dist/{adapter-CA8rPIUz.mjs → adapter-nl_xz9dz.mjs} +1 -1
- package/dist/adapter-subsystem/index.d.mts +120 -5
- package/dist/adapter-subsystem/index.mjs +1 -1
- package/dist/adapters/acp-client/index.d.mts +10 -0
- package/dist/adapters/acp-client/index.mjs +2 -2
- package/dist/adapters/config/index.d.mts +176 -153
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +1021 -1005
- 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 +7 -5
- package/dist/adapters/stream-session/index.mjs +1 -1
- package/dist/auth-C3NOWqTU.mjs +1 -0
- package/dist/authority-state-bootstrap-CEuKScnL.mjs +1 -0
- package/dist/{base-orchestrator-J1WKAUkF.d.mts → base-orchestrator-BiShpVKL.d.mts} +6 -0
- package/dist/bus/index.d.mts +10 -10
- package/dist/bus/index.mjs +1 -1
- package/dist/{canonical-model-DV-Z8gsb.mjs → canonical-model-C31NaBJs.mjs} +1 -1
- package/dist/client-BkpLM8Fx.mjs +1 -0
- package/dist/client-binary-version-verifier-BK_vIjIo.mjs +2 -0
- package/dist/client-binary-version-verifier-BwrMTAh2.d.mts +179 -0
- package/dist/clients/index.d.mts +69 -85
- package/dist/clients/index.mjs +1 -2
- package/dist/clients/managed-install.d.mts +2 -0
- package/dist/clients/managed-install.mjs +1 -0
- package/dist/{clients-namespace-Bt_VTkEU.d.mts → clients-namespace-B96QIJOs.d.mts} +224 -21
- package/dist/compression-CZ_6fYq8.mjs +1 -0
- package/dist/config-namespace-DTA6EQL8.mjs +1 -0
- package/dist/{config-namespace-DqdFE6zk.d.mts → config-namespace-x0fuhEXe.d.mts} +73 -1
- 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 +1 -1
- package/dist/contracts/auth/index.d.mts +3 -0
- package/dist/contracts/auth/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/client/index.d.mts +3 -3
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +20 -93
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +3 -3
- 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 +1161 -140
- 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 +2 -2
- package/dist/contracts/native-session-supervisor/index.mjs +1 -1
- package/dist/contracts/platform/index.d.mts +1 -1
- package/dist/contracts/platform/index.mjs +1 -1
- package/dist/contracts/provider/index.d.mts +2 -2
- package/dist/contracts/provider/index.mjs +1 -1
- package/dist/contracts/session/index.d.mts +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +2 -2
- package/dist/contracts/shared/index.mjs +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/skill/index.mjs +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.mjs +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/timeout/index.mjs +1 -1
- package/dist/contracts/toast/index.mjs +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/variant/index.mjs +1 -1
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{definition-s9PIua2B.d.mts → definition-Bj9Vr16H.d.mts} +1 -1
- package/dist/{definition-Cllhr9mi.d.mts → definition-BsTlOz99.d.mts} +36 -4
- package/dist/{definition-CuJvtYeG.d.mts → definition-Cbl0k6Fc.d.mts} +31 -1
- package/dist/definition-K3m51lgO.mjs +1 -0
- package/dist/definitions-C1pgx0Nq.mjs +1 -0
- package/dist/{detached-extension-handle-Cx6-0eqg.mjs → detached-extension-handle-vDK194QV.mjs} +1 -1
- package/dist/drizzle/0026_m_mrgvi7fq.sql +16 -0
- package/dist/drizzle/0027_m_mrgw0uzg.sql +1 -0
- package/dist/drizzle/0028_m_mrgx04i1.sql +1 -0
- package/dist/drizzle/0029_terminal-authority.sql +1 -0
- package/dist/drizzle/meta/_journal.json +28 -0
- package/dist/execution-target-Bg2wpfML.mjs +1 -0
- package/dist/{extension-CJClssfp.mjs → extension-CjTu6mzW.mjs} +1 -1
- package/dist/extension-D4iKUUMG.mjs +1 -0
- package/dist/{filesystem-service-Bmyqo6po.mjs → filesystem-service-maY_P3yA.mjs} +1 -1
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-D4SANVoq.mjs → globby-CisClzat.mjs} +1 -1
- package/dist/handlers-RGs3eC9X.mjs +57 -0
- package/dist/{harness-DkUpbsuY.mjs → harness-DflvHAGV.mjs} +1 -1
- package/dist/index-9dISOTLT.d.mts +174 -0
- package/dist/{index-B9d_8_V2.d.mts → index-9g0agW_p.d.mts} +55 -55
- package/dist/{index-DScUb-hF.d.mts → index-BDr2Ba122.d.mts} +34 -11
- package/dist/{index-BcvG3wPv.d.mts → index-BKZAAWo2.d.mts} +185 -45
- package/dist/{index-CaerrEDH.d.mts → index-Bbr5LEUc.d.mts} +2 -2
- package/dist/{index-C23g_M_J2.d.mts → index-BmsPH78f2.d.mts} +50 -5
- package/dist/index-ButbwvVY.d.mts +1175 -0
- package/dist/index-BxuiHVFi.d.mts +284 -0
- package/dist/{index-DnnKUwHm.d.mts → index-C2C1qH1Y.d.mts} +38 -32
- package/dist/{index-ntS1EXlf.d.mts → index-C6LZOiDv.d.mts} +150 -2
- package/dist/{index-C9FCWOhp.d.mts → index-COC9jCdc.d.mts} +124 -22
- package/dist/{index-Cx1Bm6WD.d.mts → index-CVs0Qxks.d.mts} +8 -8
- package/dist/index-CagRgpXI2.d.mts +84 -0
- package/dist/{index-DoEF9LAc.d.mts → index-CtjLeK1F.d.mts} +3 -3
- package/dist/{index-DZPNuWMc.d.mts → index-Cx8jGKOs.d.mts} +4 -4
- package/dist/{index-h5go5Dtd.d.mts → index-D75FnT0B.d.mts} +1 -1
- package/dist/{index-FFVwQMad.d.mts → index-DNkR5yTY.d.mts} +3401 -594
- package/dist/{index-wq7XeqyG.d.mts → index-DXBiCH2y.d.mts} +27 -1
- package/dist/{index-B2DjrVb8.d.mts → index-DpZbaS7y.d.mts} +1194 -87
- package/dist/{index-BvTd61i5.d.mts → index-T96ydgVk.d.mts} +260 -160
- package/dist/{index-DLNRgZPo2.d.mts → index-j2YlW_Fc.d.mts} +1 -1
- package/dist/{index-PIlYSC73.d.mts → index-x2gFj3BK.d.mts} +41 -28
- 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 +5 -5
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/namespace/index.mjs +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/observability/index.mjs +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/providers/index.mjs +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/kernel/window/index.mjs +1 -1
- package/dist/{lib-BOmKyjWD.mjs → lib-DIVnpS8e.mjs} +1 -1
- package/dist/{lib-DLZYp5z3.mjs → lib-DymjnkAP.mjs} +1 -1
- package/dist/{load-extensions-DNRIy4zC.d.mts → load-extensions-_EnedkUp.d.mts} +1 -1
- package/dist/{load-extensions-Cze1RHcG.mjs → load-extensions-nqL5WAKj.mjs} +1 -1
- package/dist/mcp-http-server/index.d.mts +27 -90
- package/dist/mcp-http-server/index.mjs +2 -2
- package/dist/model-uE5IyUFJ.mjs +1 -0
- package/dist/namespace-C05pkLbN.mjs +1 -0
- package/dist/{namespace-D9PLFmPQ.d.mts → namespace-CCZXyxSe.d.mts} +18 -18
- package/dist/namespace-D7pE2QWv.mjs +1 -0
- package/dist/{namespace-dFBD2ZmS.mjs → namespace-DwQtzlY-.mjs} +1 -1
- package/dist/namespace-HsI0Jbbr.mjs +1 -0
- package/dist/namespace-VmsT_tLJ.d.mts +3729 -0
- package/dist/namespace-Xp9-g_r-.mjs +1 -0
- package/dist/{native-session-supervisor-7ElwM6Is.mjs → native-session-supervisor-CdtVGWA9.mjs} +1 -1
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/node/transports/index.d.mts +36 -1
- package/dist/node/transports/index.mjs +2 -2
- package/dist/{orchestrator-shared-ChygCvR1.mjs → orchestrator-shared-DAkGOu9H.mjs} +1 -1
- package/dist/{orchestrator-shared-DFLb1otg.d.mts → orchestrator-shared-pxtyNu3W.d.mts} +13 -6
- package/dist/package-BYpWkSuQ.mjs +1 -0
- package/dist/package-CsFFT9iR.mjs +7 -0
- package/dist/{package-DmVZxufT.d.mts → package-DG9GSY8M.d.mts} +52 -1
- package/dist/package.json +1 -1
- package/dist/{profile-BMBXUqqh.mjs → profile-D2m94ZYD.mjs} +1 -1
- package/dist/provider-context-BYkMl--1.mjs +1 -0
- package/dist/provider-context-DOsjOjiR.mjs +1 -0
- package/dist/{providers-namespace-5GoTlHXz.d.mts → providers-namespace-O4de1tgO.d.mts} +161 -14
- package/dist/resolved-O2XXjTeu.mjs +1 -0
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/client-binary-strategy-dependencies.d.mts +34 -0
- package/dist/runtime-node/client-binary-strategy-dependencies.mjs +1 -0
- 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 +25 -84
- 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 +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-7aKBGB7S.mjs → schema-BI0aCHvV.mjs} +1 -1
- package/dist/schemas-C-J4W1ID.mjs +1 -0
- package/dist/{schemas-Br-rSxPE2.d.mts → schemas-CoJCTFod2.d.mts} +8 -8
- package/dist/schemas-K3Td_WdR.d.mts +3175 -0
- package/dist/schemas-n9Ff6_RX.mjs +1 -0
- package/dist/schemas-th_nuC5t.mjs +1 -0
- package/dist/selection-YRuVSdck.mjs +1 -0
- package/dist/service-base/index.d.mts +4 -3
- package/dist/service-base/index.mjs +1 -1
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/index.mjs +1 -1
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +4 -3
- package/dist/services/adapter-subsystem/index.mjs +1 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/adapter-subsystem/namespace.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/capability/index.d.mts +1 -1
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +4 -4
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/definition/namespace.d.mts +1 -19
- package/dist/services/definition/schemas.d.mts +0 -9
- package/dist/services/definition/schemas.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +4 -4
- package/dist/services/execution-target/index.mjs +1 -1
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/namespace.mjs +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/execution-target/schemas.mjs +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.d.mts +6 -6
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +1591 -173
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/log-import.mjs +1 -1
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/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 +2 -2
- package/dist/services/provider-context/index.mjs +1 -1
- package/dist/services/provider-runtime/index.d.mts +18 -0
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +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 +1 -1
- package/dist/services/session/testing/index.d.mts +2 -2
- package/dist/services/session/testing/index.mjs +10 -10
- 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 +18 -25
- 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 +2 -2
- 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/session-CAjudDuJ.mjs +76 -0
- package/dist/{session-DBfQkgdy.mjs → session-lRd8HZNZ.mjs} +1 -1
- package/dist/{shared-BVW-3Dhy.mjs → shared-RP_KARKF.mjs} +1 -1
- package/dist/{skill-N-ttlp1i.mjs → skill-CpNjWFuE.mjs} +1 -1
- package/dist/{src-Ck2sbaDa.mjs → src-Bo2eA51B.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 +9 -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-DEiMKTv9.mjs → tool-approval-service-Dh0XI21f.mjs} +1 -1
- package/dist/tools/index.d.mts +1 -1
- package/dist/tools-PC_L6g2m.mjs +1 -0
- package/dist/{transition-OzGXyy3p.d.mts → transition-CwUIm1hJ.d.mts} +10 -2
- package/dist/{types-BWduCvRU.d.mts → types-B-xY9WW2.d.mts} +1 -1
- package/dist/{types-CBLPaQXe.d.mts → types-BaDYigzD.d.mts} +486 -25
- package/dist/{types-BrUOVfwe.d.mts → types-DvKaEOOn.d.mts} +252 -19
- package/dist/ui-hooks/index.d.mts +103 -14
- package/dist/ui-hooks/index.mjs +1 -1
- package/dist/ui-kernel/index.d.mts +3 -3
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/utils/keychain.mjs +1 -1
- package/dist/{version-DoV_pSzT.mjs → version-C1-VD-XL.mjs} +1 -1
- package/dist/workflow-DFJYGjq_.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +663 -60
- 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/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-worker-BEFjCccX.mjs +1 -0
- package/package.json +13 -8
- package/dist/account-identity-C7Kx_ieU.mjs +0 -1
- package/dist/cleanEnvForAdapter-BooAgM2R.mjs +0 -1
- package/dist/client-DaR4mzqn.mjs +0 -1
- package/dist/compression-C5JAWdgZ.mjs +0 -1
- package/dist/config-namespace-CY9leBnE.mjs +0 -1
- package/dist/credential-ref-YWQQENEo.mjs +0 -1
- package/dist/definition-C-GVz7uw.mjs +0 -1
- package/dist/execution-target-BR8bLkCR.mjs +0 -1
- package/dist/extension-BS_4BOeO.mjs +0 -1
- package/dist/handlers-B74FvKlA.mjs +0 -57
- package/dist/index-BcwOnvUh.d.mts +0 -749
- package/dist/index-D6aAzr32.d.mts +0 -997
- package/dist/index-DtwGhFFQ.d.mts +0 -40
- package/dist/loop-gate-handlers-o2B5FPdF.mjs +0 -1
- package/dist/namespace-B4cV_pk3.d.mts +0 -1317
- package/dist/namespace-BO3tODGC.mjs +0 -1
- package/dist/namespace-CVMZVqB5.mjs +0 -1
- package/dist/namespace-DBHwyhME.mjs +0 -1
- package/dist/namespace-DibbhCPP.mjs +0 -1
- package/dist/package-CF_Zm2v4.mjs +0 -1
- package/dist/package-Co_GO3UD.mjs +0 -7
- package/dist/provider-context-CqMgPOWF.mjs +0 -1
- package/dist/provider-context-DC_eq7es.mjs +0 -1
- package/dist/schemas-CVo8qAK-.mjs +0 -1
- package/dist/schemas-CuG17U3L.mjs +0 -1
- package/dist/session-CX6QDhi2.mjs +0 -76
- package/dist/tools-CGFZkB7F.mjs +0 -1
- package/dist/workflow-C3dgVwTY.mjs +0 -1
- package/dist/workflow-worker-dH70EbjE.mjs +0 -1
- /package/dist/{ajv-B5dPIck0.mjs → ajv-DfHhgdS5.mjs} +0 -0
- /package/dist/{await-trigger-DwVldnMt.mjs → await-trigger-DP-fTQc4.mjs} +0 -0
- /package/dist/{capability-service-XlymTzz1.mjs → capability-service-Dg2bU8qc.mjs} +0 -0
- /package/dist/{client-CebV_fZc.d.mts → client-DmJwprw1.d.mts} +0 -0
- /package/dist/{create-static-mount-DkK28kKW.mjs → create-static-mount-CBTXRtbN.mjs} +0 -0
- /package/dist/{cross-spawn-CDXy3BjE.mjs → cross-spawn-D9WWFl2a.mjs} +0 -0
- /package/dist/{cursor-storage-luQAg7E_.mjs → cursor-storage-Bw-7ROzx.mjs} +0 -0
- /package/dist/{descriptor-to-package-DdpjpT7n.mjs → descriptor-to-package-Rs-OjOQU.mjs} +0 -0
- /package/dist/{drizzle-DVTAl7Us.mjs → drizzle-DYfaDzlO.mjs} +0 -0
- /package/dist/{esm-CQG9Pc7n.mjs → esm-C_WW4-pP.mjs} +0 -0
- /package/dist/{event-DguYjV6D.mjs → event-DTM0-qWP.mjs} +0 -0
- /package/dist/{extension-discovery-CIZn5bkq.d.mts → extension-discovery-APMf1Tes.d.mts} +0 -0
- /package/dist/{extension-namespace-v3K0qVry.mjs → extension-namespace-vrh4ERXR.mjs} +0 -0
- /package/dist/{facet-BM4y4aQP.mjs → facet-DqPBpqkl.mjs} +0 -0
- /package/dist/{filesystem-service-Cwp0sWNc.d.mts → filesystem-service-Bx0bR2Lb.d.mts} +0 -0
- /package/dist/{handler-BFNvtv5t.mjs → handler-4pKQi3eo.mjs} +0 -0
- /package/dist/{host-vY07gek-.mjs → host-BfgdjlII.mjs} +0 -0
- /package/dist/{identity-DC3Pk0ps.mjs → identity-2qUT1NME.mjs} +0 -0
- /package/dist/{index-COI1tjAf.d.mts → index-BZ_DSGnE.d.mts} +0 -0
- /package/dist/{index-D7rWAEY0.d.mts → index-Bd52mmj9.d.mts} +0 -0
- /package/dist/{index-Dfi8Rorw.d.mts → index-BkAKfh4d.d.mts} +0 -0
- /package/dist/{index-CuHqL95P.d.mts → index-Bv9lm0Kf.d.mts} +0 -0
- /package/dist/{index-C4nStEdA.d.mts → index-C18Pn3zP.d.mts} +0 -0
- /package/dist/{index-Cr9lh21j.d.mts → index-CarbJsC92.d.mts} +0 -0
- /package/dist/{index-BjoOSg95.d.mts → index-Ctw617Tj.d.mts} +0 -0
- /package/dist/{index-DUD7wikz2.d.mts → index-D0eUQjTU2.d.mts} +0 -0
- /package/dist/{index-O08Q2ikz.d.mts → index-DHGW7dFf.d.mts} +0 -0
- /package/dist/{index-DEzdNQum.d.mts → index-DfVSWBBp.d.mts} +0 -0
- /package/dist/{index-WHUV7neB.d.mts → index-DlAfs3RD.d.mts} +0 -0
- /package/dist/{index-D3ahzHwb.d.mts → index-DnWZdG6C.d.mts} +0 -0
- /package/dist/{index-CpKikwK4.d.mts → index-DoLdETfR.d.mts} +0 -0
- /package/dist/{index-B92mToDo2.d.mts → index-DvaPrL6C.d.mts} +0 -0
- /package/dist/{index-D7Hkmrr3.d.mts → index-DwDBa2mb.d.mts} +0 -0
- /package/dist/{index-Y8rMeYYX.d.mts → index-FDyqQIt5.d.mts} +0 -0
- /package/dist/{index-BWIkf5oJ.d.mts → index-Lp0T_V1W.d.mts} +0 -0
- /package/dist/{index-OGIC4puQ.d.mts → index-Rhcr4YNA.d.mts} +0 -0
- /package/dist/{index-BvLXySoB2.d.mts → index-S-mAqWwq.d.mts} +0 -0
- /package/dist/{index-DOOrKin9.d.mts → index-_zsihEmk.d.mts} +0 -0
- /package/dist/{json-value-DtIkQN7g.d.mts → json-value-C8duSh9X.d.mts} +0 -0
- /package/dist/{jsonl-transport-CGPgD8iU.mjs → jsonl-transport-l5NPcQ_2.mjs} +0 -0
- /package/dist/{lib-ZKtnbCqH.mjs → lib-ClRTNIuz.mjs} +0 -0
- /package/dist/{materialization-CUYxZCfk.mjs → materialization-BwTORtBr.mjs} +0 -0
- /package/dist/{model-registry-C2VXobZj.mjs → model-registry-BneK5SGo.mjs} +0 -0
- /package/dist/{model-registry-rYICIwyR.mjs → model-registry-C8MInDtX.mjs} +0 -0
- /package/dist/{namespace-65uwTpbg.d.mts → namespace-3YVLQ_bM.d.mts} +0 -0
- /package/dist/{namespace-BGIeqwfU.d.mts → namespace-B0uZIZYT.d.mts} +0 -0
- /package/dist/{namespace-CQ8uza7o.d.mts → namespace-BcDHt-ww.d.mts} +0 -0
- /package/dist/{namespace-BigVYQyx.d.mts → namespace-BhVlHfoO.d.mts} +0 -0
- /package/dist/{namespace-j7vFsmYL.d.mts → namespace-Bl1UhLnK.d.mts} +0 -0
- /package/dist/{namespace-CfvtDD_U.d.mts → namespace-BoA6u44C.d.mts} +0 -0
- /package/dist/{namespace-Dk4OslmY.d.mts → namespace-BsEoWXV_.d.mts} +0 -0
- /package/dist/{namespace-DYSFDC2G.mjs → namespace-C238RqwB.mjs} +0 -0
- /package/dist/{namespace-BdO4e1Fm.mjs → namespace-CDO4rY11.mjs} +0 -0
- /package/dist/{namespace-CZK2ff3B.d.mts → namespace-CukqFYHf2.d.mts} +0 -0
- /package/dist/{namespace-wke7juzy.mjs → namespace-DDx4NVJm.mjs} +0 -0
- /package/dist/{namespace-D1_9WVCo.d.mts → namespace-Dar3O6iT.d.mts} +0 -0
- /package/dist/{namespace-DAj_riOn.d.mts → namespace-DoNigVgx.d.mts} +0 -0
- /package/dist/{namespace-D2s-4pyg.d.mts → namespace-Dvi66QS6.d.mts} +0 -0
- /package/dist/{namespace-D8P8Sxce2.d.mts → namespace-rO-C2Dgu2.d.mts} +0 -0
- /package/dist/{out-BoEZjBNz.mjs → out-BB6Kb4Xu.mjs} +0 -0
- /package/dist/{platform-DnbSvm2u.mjs → platform-CWhGFQFX.mjs} +0 -0
- /package/dist/{providers-Bd7BOZs0.mjs → providers-CUnrif24.mjs} +0 -0
- /package/dist/{quick-lru-6e7I1Bgf.mjs → quick-lru-BLaSzINB.mjs} +0 -0
- /package/dist/{registry-U_3aYSin.mjs → registry-TJjQgTgp.mjs} +0 -0
- /package/dist/{schema-B5vHi7Uu.d.mts → schema-aOwmHxaF.d.mts} +0 -0
- /package/dist/{schema-CHp6I33k.mjs → schema-cus0dJ81.mjs} +0 -0
- /package/dist/{schema-introspection-B7xODt4I.mjs → schema-introspection-BsWLmoFp.mjs} +0 -0
- /package/dist/{schemas-KlH1hB7u.d.mts → schemas-9QJf1FtS.d.mts} +0 -0
- /package/dist/{schemas-CJ2JvA7d.d.mts → schemas-BolSW7pQ.d.mts} +0 -0
- /package/dist/{schemas-D4zaFE2p.d.mts → schemas-CLsbsX1W.d.mts} +0 -0
- /package/dist/{schemas-XeIBqwvE.mjs → schemas-CMyv7l7-.mjs} +0 -0
- /package/dist/{schemas-CPI00yvh.mjs → schemas-CWxf_Yut.mjs} +0 -0
- /package/dist/{schemas-BemsLc_V.d.mts → schemas-D_9X_CRo.d.mts} +0 -0
- /package/dist/{schemas-DZGnr9Tl.mjs → schemas-DwfTUQIa.mjs} +0 -0
- /package/dist/{schemas-CoFCV42v.d.mts → schemas-OaBqeEUT.d.mts} +0 -0
- /package/dist/{schemas-B6tEKf9T.d.mts → schemas-XRhqOgVE.d.mts} +0 -0
- /package/dist/{schemas-DKncXGnb.d.mts → schemas-fRLDhefF.d.mts} +0 -0
- /package/dist/{schemas-DWfo0wp4.d.mts → schemas-jDRSOXJL.d.mts} +0 -0
- /package/dist/{schemas-lnE9YoG7.d.mts → schemas-qpo1Goit.d.mts} +0 -0
- /package/dist/{schemas-t6h9oSct.d.mts → schemas-qt5QTjVc.d.mts} +0 -0
- /package/dist/{semver-CIhHqMkw.mjs → semver-BccS1s9R.mjs} +0 -0
- /package/dist/{server-lifecycle-C5Z5PSMD.mjs → server-lifecycle-D-jxVr_0.mjs} +0 -0
- /package/dist/{server-lifecycle-_AA6EfzL.d.mts → server-lifecycle-r5Tkk8bU.d.mts} +0 -0
- /package/dist/{session-lineage-C1M7-O3C.d.mts → session-lineage-YShrn77v.d.mts} +0 -0
- /package/dist/{shared-schemas-BEVG96xW.mjs → shared-schemas-BNCPgGYP.mjs} +0 -0
- /package/dist/{src-_VODAJnf.mjs → src-Ci_WY9uw.mjs} +0 -0
- /package/dist/{storage-namespace-D5q9CrBp.mjs → storage-namespace-BzE2M4Hq.mjs} +0 -0
- /package/dist/{storage-namespace-Di1A3DMm.d.mts → storage-namespace-DWKFqEW-.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-CzXPW45M.mjs → storage-namespace-definition-4UYuij1r.mjs} +0 -0
- /package/dist/{storage-namespace-definition-BffdI5Bz.d.mts → storage-namespace-definition-BZJGSaX3.d.mts} +0 -0
- /package/dist/{supports-color-DcXkvGDF.mjs → supports-color-Dzp6WuF5.mjs} +0 -0
- /package/dist/{telemetry-Cvi4rxiE.mjs → telemetry-B42EMbZt.mjs} +0 -0
- /package/dist/{timeout-XsYIOKrc.mjs → timeout-CvONPl0l.mjs} +0 -0
- /package/dist/{tray-menu-service-B2AxiQqL.mjs → tray-menu-service-Bonl2KXf.mjs} +0 -0
- /package/dist/{types-Bo78h9e3.d.mts → types-BCW9kr4L.d.mts} +0 -0
- /package/dist/{types-DCvp_swt.d.mts → types-CrJ7KEZ0.d.mts} +0 -0
- /package/dist/{types-BNW5n6qm.d.mts → types-DWNoZ3Sd.d.mts} +0 -0
- /package/dist/{ui-config-9bDRwFZr.mjs → ui-config-B2L3Xgqo.mjs} +0 -0
- /package/dist/{variant-5huHjUTm.mjs → variant-ByI-RZua.mjs} +0 -0
- /package/dist/{window-registry-PkrFIwX2.mjs → window-registry-DsWnCc8z.mjs} +0 -0
- /package/dist/{window-registry-ofIUQnfo.d.mts → window-registry-WsWu-rcK.d.mts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
-
import { IMakaioSession, MakaioSessionAgent, Message, MessageInput, ResponseSchemaDescriptor, SessionContext, TurnInitiator } from "@makaio/framework/contracts";
|
|
2
|
+
import { IMakaioSession, MakaioSessionAgent, Message, MessageInput, MessageOutcome, ResponseSchemaDescriptor, SessionContext, TurnInitiator } from "@makaio/framework/contracts";
|
|
3
3
|
|
|
4
4
|
//#region services/core/src/session/entities/turn.d.ts
|
|
5
5
|
/**
|
|
@@ -11,13 +11,17 @@ interface TurnResult {
|
|
|
11
11
|
/** Error messages from agents that failed */
|
|
12
12
|
errors: string[];
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/** Terminal outcome stored for one admitted message/agent delivery. */
|
|
15
|
+
type TurnPairTerminalOutcome = MessageOutcome;
|
|
16
|
+
/** Result of atomically recording one message/agent terminal transition. */
|
|
17
|
+
type TurnPairStateChange = {
|
|
18
|
+
accepted: false;
|
|
19
|
+
turnComplete: false;
|
|
20
|
+
} | {
|
|
21
|
+
accepted: true;
|
|
19
22
|
turnComplete: false;
|
|
20
23
|
} | {
|
|
24
|
+
accepted: true;
|
|
21
25
|
turnComplete: true;
|
|
22
26
|
result: TurnResult;
|
|
23
27
|
};
|
|
@@ -62,13 +66,13 @@ interface TurnConfig {
|
|
|
62
66
|
* - No bus dependency (testable in isolation)
|
|
63
67
|
* @example
|
|
64
68
|
* ```typescript
|
|
65
|
-
* const turn = new Turn({ sessionId: 'sess1', agentIds: ['agent1', 'agent2'] });
|
|
69
|
+
* const turn = new Turn({ sessionId: 'sess1', agentIds: ['agent1', 'agent2'], turnNumber: 1 });
|
|
66
70
|
* turn.addMessage('msg1');
|
|
67
71
|
*
|
|
68
|
-
* const change = turn.
|
|
72
|
+
* const change = turn.recordPairTerminal('msg1', 'agent1', 'completed');
|
|
69
73
|
* // change.turnComplete === false (agent2 still pending)
|
|
70
74
|
*
|
|
71
|
-
* const change2 = turn.
|
|
75
|
+
* const change2 = turn.recordPairTerminal('msg1', 'agent2', 'completed');
|
|
72
76
|
* // change2.turnComplete === true, change2.result.success === true
|
|
73
77
|
* ```
|
|
74
78
|
*/
|
|
@@ -85,14 +89,14 @@ declare class Turn$1 {
|
|
|
85
89
|
private readonly _initiator;
|
|
86
90
|
/** Agents participating in this turn (immutable after creation) */
|
|
87
91
|
private readonly _agentIds;
|
|
88
|
-
/** Messages
|
|
92
|
+
/** Messages durably admitted during this turn. */
|
|
89
93
|
private readonly _messageIds;
|
|
90
|
-
/**
|
|
91
|
-
private readonly
|
|
92
|
-
/**
|
|
93
|
-
private readonly
|
|
94
|
-
/**
|
|
95
|
-
private readonly
|
|
94
|
+
/** Targeted agents for each admitted message. This is the authoritative turn ledger. */
|
|
95
|
+
private readonly admittedTargetsByMessageId;
|
|
96
|
+
/** Terminal outcome for each admitted `{messageId, agentId}` pair. */
|
|
97
|
+
private readonly terminalPairs;
|
|
98
|
+
/** Message admissions whose append/lifecycle setup has not committed yet. */
|
|
99
|
+
private readonly pendingMessageAdmissions;
|
|
96
100
|
constructor(config: TurnConfig);
|
|
97
101
|
/**
|
|
98
102
|
* Agents participating in this turn.
|
|
@@ -115,16 +119,6 @@ declare class Turn$1 {
|
|
|
115
119
|
* @returns True when at least one message append is in-flight
|
|
116
120
|
*/
|
|
117
121
|
get hasPendingMessageAppends(): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Agents that have completed successfully.
|
|
120
|
-
* @returns Read-only set of completed agent IDs
|
|
121
|
-
*/
|
|
122
|
-
get completedAgents(): ReadonlySet<string>;
|
|
123
|
-
/**
|
|
124
|
-
* Agents that errored.
|
|
125
|
-
* @returns Read-only map of agent ID to error message
|
|
126
|
-
*/
|
|
127
|
-
get erroredAgents(): ReadonlyMap<string, string>;
|
|
128
122
|
/**
|
|
129
123
|
* Add a message to this turn.
|
|
130
124
|
* @param messageId - The message ID to add
|
|
@@ -141,18 +135,43 @@ declare class Turn$1 {
|
|
|
141
135
|
*/
|
|
142
136
|
releaseMessageAppend(messageId: string): void;
|
|
143
137
|
/**
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @
|
|
138
|
+
* Admit a message and its complete fanout into this turn's immutable ledger.
|
|
139
|
+
* Completion may only terminalize pairs admitted through this method.
|
|
140
|
+
* @param messageId - Stable user-message identity.
|
|
141
|
+
* @param agentIds - Immutable participant subset targeted by this delivery.
|
|
142
|
+
*/
|
|
143
|
+
admitMessage(messageId: string, agentIds: readonly string[]): void;
|
|
144
|
+
/**
|
|
145
|
+
* Commit a durable pre-dispatch message admission.
|
|
146
|
+
* @param messageId - Admitted message whose setup became durable.
|
|
147
147
|
*/
|
|
148
|
-
|
|
148
|
+
commitMessageAdmission(messageId: string): void;
|
|
149
149
|
/**
|
|
150
|
-
*
|
|
151
|
-
* @param
|
|
152
|
-
* @param error - Error message
|
|
153
|
-
* @returns State change indicating if turn is now complete
|
|
150
|
+
* Roll back an admission whose append or lifecycle setup failed before dispatch.
|
|
151
|
+
* @param messageId - Unrouted message admission to remove.
|
|
154
152
|
*/
|
|
155
|
-
|
|
153
|
+
rollbackMessageAdmission(messageId: string): void;
|
|
154
|
+
/**
|
|
155
|
+
* Record one terminal outcome for an admitted delivery pair.
|
|
156
|
+
* @param messageId - Exact admitted message identity.
|
|
157
|
+
* @param agentId - Exact targeted agent identity.
|
|
158
|
+
* @param outcome - Canonical terminal delivery outcome.
|
|
159
|
+
* @param error - Optional provider or routing error.
|
|
160
|
+
* @returns Whether the pair was accepted and completed the turn.
|
|
161
|
+
*/
|
|
162
|
+
recordPairTerminal(messageId: string, agentId: string, outcome: TurnPairTerminalOutcome, error?: string): TurnPairStateChange;
|
|
163
|
+
/**
|
|
164
|
+
* Whether a concrete admitted delivery pair exists.
|
|
165
|
+
* @param messageId - Message identity to inspect.
|
|
166
|
+
* @param agentId - Agent identity to inspect.
|
|
167
|
+
* @returns Whether the exact delivery pair was admitted.
|
|
168
|
+
*/
|
|
169
|
+
hasAdmittedPair(messageId: string, agentId: string): boolean;
|
|
170
|
+
/** @returns Snapshot of every admitted delivery pair for barriers and diagnostics. */
|
|
171
|
+
get admittedPairs(): readonly {
|
|
172
|
+
messageId: string;
|
|
173
|
+
agentId: string;
|
|
174
|
+
}[];
|
|
156
175
|
/**
|
|
157
176
|
* Check if an agent is part of this turn.
|
|
158
177
|
* @param agentId - The agent ID to check
|
|
@@ -160,8 +179,8 @@ declare class Turn$1 {
|
|
|
160
179
|
*/
|
|
161
180
|
hasAgent(agentId: string): boolean;
|
|
162
181
|
/**
|
|
163
|
-
* Check
|
|
164
|
-
* @returns True
|
|
182
|
+
* Check whether every admitted delivery pair reached a terminal outcome.
|
|
183
|
+
* @returns True when the turn has at least one committed admission and all of its pairs are terminal
|
|
165
184
|
*/
|
|
166
185
|
isComplete(): boolean;
|
|
167
186
|
/**
|
|
@@ -183,22 +202,48 @@ declare class Turn$1 {
|
|
|
183
202
|
*/
|
|
184
203
|
getContextForMessage(messageId: string): TurnContext;
|
|
185
204
|
/**
|
|
186
|
-
* Return
|
|
187
|
-
* @param
|
|
188
|
-
* @
|
|
189
|
-
|
|
190
|
-
private getAgentTerminalOutcome;
|
|
191
|
-
/**
|
|
192
|
-
* Check if turn should complete and return appropriate state change.
|
|
193
|
-
* @returns State change indicating completion status and result if complete
|
|
205
|
+
* Return a collision-free in-memory key for a ledger pair.
|
|
206
|
+
* @param messageId - Message component of the pair.
|
|
207
|
+
* @param agentId - Agent component of the pair.
|
|
208
|
+
* @returns Collision-free composite key.
|
|
194
209
|
*/
|
|
195
|
-
private
|
|
210
|
+
private pairKey;
|
|
196
211
|
}
|
|
197
212
|
//#endregion
|
|
198
|
-
//#region services/core/src/session/
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
213
|
+
//#region services/core/src/session/turn-slot-registry.d.ts
|
|
214
|
+
declare const turnReservationBrand: unique symbol;
|
|
215
|
+
/** Opaque exclusive claim on a session's next routable turn slot. */
|
|
216
|
+
interface TurnReservation {
|
|
217
|
+
/** Session whose turn slot is exclusively reserved. */
|
|
218
|
+
readonly sessionId: string;
|
|
219
|
+
/** Prevents callers from fabricating reservations outside this module. */
|
|
220
|
+
readonly [turnReservationBrand]: true;
|
|
221
|
+
}
|
|
222
|
+
/** Result of atomically acquiring a session turn for normal message delivery. */
|
|
223
|
+
interface TurnAcquisition {
|
|
224
|
+
/** Routable turn acquired for the caller. */
|
|
225
|
+
readonly turn: Turn$1;
|
|
226
|
+
/** Whether this caller created the turn rather than joining an existing one. */
|
|
227
|
+
readonly isNew: boolean;
|
|
228
|
+
}
|
|
229
|
+
/** Atomic pre-dispatch ownership of one admitted message fanout. */
|
|
230
|
+
interface TurnMessageAdmissionLease {
|
|
231
|
+
readonly turn: Turn$1;
|
|
232
|
+
readonly messageId: string;
|
|
233
|
+
readonly agentIds: readonly string[];
|
|
234
|
+
/** Finalize the durable append/lifecycle setup and permit terminal outcomes. */
|
|
235
|
+
commit(): void;
|
|
236
|
+
/** Remove an un-routed admission after pre-dispatch setup failed. */
|
|
237
|
+
rollback(): Promise<void>;
|
|
238
|
+
}
|
|
239
|
+
/** Admission lease composed with the turn's one-time durable preparation gate. */
|
|
240
|
+
interface PreparedTurnMessageAdmissionLease extends TurnMessageAdmissionLease {
|
|
241
|
+
readonly isPreparationOwner: boolean;
|
|
242
|
+
rollback(errorCode?: string): Promise<void>;
|
|
243
|
+
}
|
|
244
|
+
//#endregion
|
|
245
|
+
//#region services/core/src/session/turn-completion.d.ts
|
|
246
|
+
/** Result of a completed turn. */
|
|
202
247
|
interface TurnCompletionResult {
|
|
203
248
|
/** Whether all agents completed successfully. */
|
|
204
249
|
success: boolean;
|
|
@@ -206,11 +251,13 @@ interface TurnCompletionResult {
|
|
|
206
251
|
errors: string[];
|
|
207
252
|
}
|
|
208
253
|
/**
|
|
209
|
-
* Callback invoked when a turn
|
|
210
|
-
* @param turn -
|
|
211
|
-
* @param result -
|
|
254
|
+
* Callback invoked when every agent participating in a turn has finished.
|
|
255
|
+
* @param turn - Completed turn.
|
|
256
|
+
* @param result - Canonical success and error result.
|
|
212
257
|
*/
|
|
213
258
|
type TurnCompleteCallback = (turn: Turn$1, result: TurnCompletionResult) => Promise<void>;
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region services/core/src/session/session-turn-manager.d.ts
|
|
214
261
|
/**
|
|
215
262
|
* Composable turn lifecycle manager.
|
|
216
263
|
*
|
|
@@ -225,28 +272,39 @@ type TurnCompleteCallback = (turn: Turn$1, result: TurnCompletionResult) => Prom
|
|
|
225
272
|
* locally. When `TurnStorageSubjects.complete` is unhandled, the turn is
|
|
226
273
|
* still cleared from memory and `session.turn.completed` is emitted.
|
|
227
274
|
*
|
|
228
|
-
* **Persist-before-emit barrier:**
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* entirely in ephemeral mode.
|
|
275
|
+
* **Persist-before-emit barrier:** successful assistant-message writes finish
|
|
276
|
+
* before consumers observe `session.turn.completed`. Message persistence
|
|
277
|
+
* (SessionBridge) and turn completion both react to `agent.complete`, and the
|
|
278
|
+
* bus runs event handlers in parallel — so before emitting, `completeTurn` awaits
|
|
279
|
+
* `session.turn.assistantPersistenceSettled` confirmations for every agent in
|
|
280
|
+
* the turn (bus-mediated: the manager holds no reference to SessionBridge).
|
|
281
|
+
* The wait is bounded by {@link TURN_COMPLETION_PERSISTENCE_TIMEOUT_MS} as a
|
|
282
|
+
* missing-bridge fallback and skipped entirely in ephemeral mode.
|
|
237
283
|
*/
|
|
238
284
|
declare class SessionTurnManager {
|
|
239
285
|
private readonly bus;
|
|
240
|
-
/**
|
|
241
|
-
private readonly
|
|
286
|
+
/** Owns routable turn slots and reservations across asynchronous setup. */
|
|
287
|
+
private readonly turnSlots;
|
|
242
288
|
/** Per-turn usage accumulators, keyed by turnId. */
|
|
243
289
|
private readonly usageAccumulators;
|
|
244
290
|
/** Turns currently persisting completion (prevents concurrent writes). */
|
|
245
291
|
private readonly completingTurnIds;
|
|
292
|
+
/** Shared completion work so slot gates can await an already-finalizing turn. */
|
|
293
|
+
private readonly completionPromises;
|
|
246
294
|
/** Completing turns retained for usage correlation after active routing is cleared. */
|
|
247
295
|
private readonly completingTurns;
|
|
296
|
+
/**
|
|
297
|
+
* Turns whose terminal usage snapshot is closed. Completion correlation may
|
|
298
|
+
* remain retryable after this point, but a retry must never reopen usage
|
|
299
|
+
* admission and mutate the snapshot already selected for lifecycle output.
|
|
300
|
+
*/
|
|
301
|
+
private readonly closedUsageAdmissions;
|
|
248
302
|
/** Pending terminal completions keyed by turnId; value records whether turn storage handled the transition. */
|
|
249
303
|
private readonly pendingTerminalCompletions;
|
|
304
|
+
/** Canonical terminal result retained while a finalizing turn needs an explicit retry. */
|
|
305
|
+
private readonly pendingTerminalResults;
|
|
306
|
+
/** Setup-failed turns block new admission until their terminal write reconciles. */
|
|
307
|
+
private readonly setupFinalizingTurnIds;
|
|
250
308
|
/** Usage events received while completion persistence is in-flight. */
|
|
251
309
|
private readonly bufferedUsageDuringCompletion;
|
|
252
310
|
/**
|
|
@@ -258,18 +316,8 @@ declare class SessionTurnManager {
|
|
|
258
316
|
* the counter and cause duplicate turn numbers if the session continues.
|
|
259
317
|
*/
|
|
260
318
|
private readonly syntheticTurnCounters;
|
|
261
|
-
/**
|
|
262
|
-
|
|
263
|
-
*
|
|
264
|
-
* Populated continuously (from construction) so messages persisted before
|
|
265
|
-
* `completeTurn` runs are counted. FIFO-capped at
|
|
266
|
-
* {@link ASSISTANT_PERSISTENCE_COUNTER_CAP}; a turn's entry is deleted when
|
|
267
|
-
* its completion emits, so late `stored` events for an already-emitted turn
|
|
268
|
-
* merely recreate a short-lived entry that the cap eventually evicts.
|
|
269
|
-
*/
|
|
270
|
-
private readonly assistantStoredCounts;
|
|
271
|
-
/** Pending persist-before-emit barrier waiters, keyed by turnId. */
|
|
272
|
-
private readonly assistantPersistenceWaiters;
|
|
319
|
+
/** Bus-mediated assistant-message persistence barrier. */
|
|
320
|
+
private readonly assistantPersistenceBarrier;
|
|
273
321
|
/** Bus subscription cleanup functions. */
|
|
274
322
|
private readonly cleanups;
|
|
275
323
|
/**
|
|
@@ -277,7 +325,68 @@ declare class SessionTurnManager {
|
|
|
277
325
|
*/
|
|
278
326
|
constructor(bus: IMakaioBus);
|
|
279
327
|
/**
|
|
280
|
-
*
|
|
328
|
+
* Acquire the routable turn for an ordinary message send.
|
|
329
|
+
*
|
|
330
|
+
* Concurrent sends either join the existing turn or await the same reserved
|
|
331
|
+
* creation. They can never each create and overwrite a turn after storage
|
|
332
|
+
* assignment has awaited.
|
|
333
|
+
* @param sessionId - Session receiving the message.
|
|
334
|
+
* @param agentIds - Agents participating when a new turn is needed.
|
|
335
|
+
* @param initiator - Turn origin metadata for a new turn.
|
|
336
|
+
* @param turnId - Optional pre-assigned identifier for a new turn.
|
|
337
|
+
* @returns Existing or newly created routable turn plus its acquisition mode.
|
|
338
|
+
*/
|
|
339
|
+
acquireTurn(sessionId: string, agentIds: string[], initiator?: TurnInitiator, turnId?: string): Promise<TurnAcquisition>;
|
|
340
|
+
/**
|
|
341
|
+
* Reserve an otherwise idle session turn slot for an exclusive setup flow.
|
|
342
|
+
*
|
|
343
|
+
* Attach uses this before starting its idle agent, so an initial-message
|
|
344
|
+
* attach is rejected before it can create a second provider lifecycle for a
|
|
345
|
+
* session already routing work.
|
|
346
|
+
* @param sessionId - Session whose next turn slot is reserved.
|
|
347
|
+
* @returns Opaque reservation consumed by {@link createReservedTurn}.
|
|
348
|
+
*/
|
|
349
|
+
reserveTurn(sessionId: string): Promise<TurnReservation>;
|
|
350
|
+
/**
|
|
351
|
+
* Release an unused exclusive turn reservation.
|
|
352
|
+
* @param reservation - Reservation previously returned by {@link reserveTurn}.
|
|
353
|
+
*/
|
|
354
|
+
releaseTurnReservation(reservation: TurnReservation): void;
|
|
355
|
+
/**
|
|
356
|
+
* Atomically acquire a routable turn and admit the complete message fanout.
|
|
357
|
+
* When a concurrent terminal transition wins, acquisition retries rather than
|
|
358
|
+
* returning a turn whose completion can no longer see this message.
|
|
359
|
+
* @param sessionId - Session receiving the message.
|
|
360
|
+
* @param agentIds - Immutable participant subset targeted by the message.
|
|
361
|
+
* @param messageId - Stable message identity.
|
|
362
|
+
* @param initiator - Optional turn origin metadata.
|
|
363
|
+
* @param turnId - Optional preassigned turn identity.
|
|
364
|
+
* @returns Prepared admission lease after first-message ordering is satisfied.
|
|
365
|
+
*/
|
|
366
|
+
acquireMessageAdmission(sessionId: string, agentIds: string[], messageId: string, initiator?: TurnInitiator, turnId?: string): Promise<PreparedTurnMessageAdmissionLease>;
|
|
367
|
+
/**
|
|
368
|
+
* Admit a message to an exclusively reserved attach turn.
|
|
369
|
+
* @param turn - Exclusively reserved attach turn.
|
|
370
|
+
* @param messageId - Stable initial-message identity.
|
|
371
|
+
* @param agentIds - Attach target participant set.
|
|
372
|
+
* @returns Prepared admission lease for the attach message.
|
|
373
|
+
*/
|
|
374
|
+
admitReservedMessage(turn: Turn$1, messageId: string, agentIds: string[]): PreparedTurnMessageAdmissionLease;
|
|
375
|
+
/**
|
|
376
|
+
* Create a reserved turn once an exclusive setup flow knows its participants.
|
|
377
|
+
*
|
|
378
|
+
* Calls `TurnStorageSubjects.create` via `requestOptional`. If no storage
|
|
379
|
+
* handler is registered (ephemeral mode), generates a synthetic UUID turn ID
|
|
380
|
+
* and a per-session incrementing turn number.
|
|
381
|
+
* @param reservation - Exclusive slot claim returned by {@link reserveTurn}.
|
|
382
|
+
* @param agentIds - Agents participating in the new turn.
|
|
383
|
+
* @param initiator - Turn origin metadata (user, plugin, system).
|
|
384
|
+
* @param turnId - Optional pre-assigned turn ID passed to storage.
|
|
385
|
+
* @returns Newly created and activated turn.
|
|
386
|
+
*/
|
|
387
|
+
createReservedTurn(reservation: TurnReservation, agentIds: string[], initiator?: TurnInitiator, turnId?: string): Promise<Turn$1>;
|
|
388
|
+
/**
|
|
389
|
+
* Create a new exclusive turn, tracking it as active.
|
|
281
390
|
*
|
|
282
391
|
* Calls `TurnStorageSubjects.create` via `requestOptional`. If no storage
|
|
283
392
|
* handler is registered (ephemeral mode), generates a synthetic UUID turn ID
|
|
@@ -296,11 +405,23 @@ declare class SessionTurnManager {
|
|
|
296
405
|
* @param turn - Newly created active turn to discard
|
|
297
406
|
*/
|
|
298
407
|
discardActiveTurn(turn: Turn$1): void;
|
|
408
|
+
/**
|
|
409
|
+
* Mark a newly created turn as failed before provider dispatch and discard its active state.
|
|
410
|
+
*
|
|
411
|
+
* A user message may already be durable when a later pre-dispatch lifecycle
|
|
412
|
+
* step fails. No provider turn has been accepted in either case, so the
|
|
413
|
+
* manager can terminalize the turn directly without waiting for assistant
|
|
414
|
+
* persistence.
|
|
415
|
+
* @param turn - Active turn whose setup failed before provider dispatch
|
|
416
|
+
* @param error - Durable error code to store on the terminal turn
|
|
417
|
+
*/
|
|
418
|
+
failActiveTurnBeforeDispatch(turn: Turn$1, error: string): Promise<void>;
|
|
299
419
|
/**
|
|
300
420
|
* Mark an unclaimed newly created turn as failed and discard its active in-memory state.
|
|
301
421
|
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
422
|
+
* Concurrent sends may have claimed the turn by the time their sibling's
|
|
423
|
+
* append fails. Those turns remain routable; callers that own the entire
|
|
424
|
+
* pre-dispatch sequence should use {@link failActiveTurnBeforeDispatch}.
|
|
304
425
|
* @param turn - Newly created active turn whose setup failed before any message claimed it
|
|
305
426
|
* @param error - Durable error code to store on the terminal turn
|
|
306
427
|
*/
|
|
@@ -311,6 +432,7 @@ declare class SessionTurnManager {
|
|
|
311
432
|
* @returns Whether the turn owned and cleared the active routing slot
|
|
312
433
|
*/
|
|
313
434
|
private clearActiveRoutingTurn;
|
|
435
|
+
private composeAdmissionWithPreparation;
|
|
314
436
|
/**
|
|
315
437
|
* Register bus listeners for `agent.usage` and `agent.complete` events.
|
|
316
438
|
*
|
|
@@ -329,18 +451,33 @@ declare class SessionTurnManager {
|
|
|
329
451
|
* Usage is snapshotted before the storage call. Any usage events that arrive
|
|
330
452
|
* while persistence is in-flight are buffered and merged into a second
|
|
331
453
|
* `TurnStorageSubjects.complete` call. State is cleared only after durable
|
|
332
|
-
* persistence succeeds; if persistence fails,
|
|
333
|
-
*
|
|
454
|
+
* persistence succeeds; if persistence fails, non-routable finalization
|
|
455
|
+
* state remains available to {@link retryTurnCompletion}.
|
|
334
456
|
*
|
|
335
|
-
* Before the event fires, the persist-before-emit barrier waits for
|
|
336
|
-
*
|
|
337
|
-
* `turn.completed` lifecycle row is appended to `session_events
|
|
338
|
-
* message
|
|
339
|
-
* `session.turn.completed`.
|
|
457
|
+
* Before the event fires, the persist-before-emit barrier waits for every
|
|
458
|
+
* agent's assistant-persistence decision to settle (see class docs), then a
|
|
459
|
+
* `turn.completed` lifecycle row is appended to `session_events`. Successful
|
|
460
|
+
* message writes and the lifecycle row are therefore durable before consumers
|
|
461
|
+
* observe `session.turn.completed`.
|
|
340
462
|
* @param turn - The turn to complete
|
|
341
463
|
* @param result - Turn result (success status and error messages)
|
|
464
|
+
* @returns Promise resolved after durable finalization and emission.
|
|
342
465
|
*/
|
|
343
466
|
completeTurn(turn: Turn$1, result: TurnCompletionResult): Promise<void>;
|
|
467
|
+
private completeTurnInternal;
|
|
468
|
+
/**
|
|
469
|
+
* Retry a retained non-routable completion after durable storage failed.
|
|
470
|
+
* @param turnId - Identifier of the finalizing turn to retry.
|
|
471
|
+
*/
|
|
472
|
+
retryTurnCompletion(turnId: string): Promise<void>;
|
|
473
|
+
/**
|
|
474
|
+
* Retry retained durable finalization before a session accepts new work.
|
|
475
|
+
*
|
|
476
|
+
* A provider normally emits one terminal event, so an ordinary later send is
|
|
477
|
+
* the reachable owner trigger for a completion whose storage response failed.
|
|
478
|
+
* @param sessionId - Session about to acquire a new routable turn.
|
|
479
|
+
*/
|
|
480
|
+
retryRetainedCompletionsForSession(sessionId: string): Promise<void>;
|
|
344
481
|
/**
|
|
345
482
|
* Clear in-memory state retained only while a turn completion is in progress.
|
|
346
483
|
* @param turn - Turn whose completion state should be removed
|
|
@@ -353,15 +490,6 @@ declare class SessionTurnManager {
|
|
|
353
490
|
* @returns Active turn, or `undefined` if no turn is in progress
|
|
354
491
|
*/
|
|
355
492
|
getActiveTurn(sessionId: string): Turn$1 | undefined;
|
|
356
|
-
/**
|
|
357
|
-
* Expose the active turns map for handlers that need direct access.
|
|
358
|
-
*
|
|
359
|
-
* Used by `registerAttachHandler` which tracks turns started via
|
|
360
|
-
* `session.agent.attach` (with an `initialMessage`) in the shared map so
|
|
361
|
-
* that the completion handler can detect when the attached turn finishes.
|
|
362
|
-
* @returns Reference to the internal active turns map
|
|
363
|
-
*/
|
|
364
|
-
getActiveTurnsMap(): Map<string, Turn$1>;
|
|
365
493
|
/**
|
|
366
494
|
* Find an active turn by turn ID (scans all sessions).
|
|
367
495
|
*
|
|
@@ -383,12 +511,16 @@ declare class SessionTurnManager {
|
|
|
383
511
|
* Marks the agent on the turn, emits `user_message.completed` for each
|
|
384
512
|
* message in the turn, then calls `onTurnComplete` when all agents are done.
|
|
385
513
|
* @param agentId - The agent that completed
|
|
386
|
-
* @param
|
|
514
|
+
* @param messageId - Exact admitted message identity.
|
|
515
|
+
* @param outcome - Canonical provider or routing outcome.
|
|
387
516
|
* @param error - Error message if the agent failed
|
|
388
517
|
* @param onTurnComplete - Callback to invoke when the turn is complete
|
|
389
|
-
* @param completionTurnId -
|
|
518
|
+
* @param completionTurnId - Explicit turn identifier supplied by the adapter completion event
|
|
519
|
+
* @returns Promise resolved after pair observation and any terminal finalization.
|
|
390
520
|
*/
|
|
391
|
-
|
|
521
|
+
recordAgentCompletion(agentId: string, messageId: string, outcome: MessageOutcome, error: string | undefined, onTurnComplete: TurnCompleteCallback, completionTurnId: string): Promise<void>;
|
|
522
|
+
private completionEventHooks;
|
|
523
|
+
private beginFinalization;
|
|
392
524
|
/**
|
|
393
525
|
* Buffer a usage event that arrived while turn completion persistence is in-flight.
|
|
394
526
|
* @param turnId - Turn whose completion is currently being persisted
|
|
@@ -407,64 +539,6 @@ declare class SessionTurnManager {
|
|
|
407
539
|
* @returns Active or completing turn, if completion can still be correlated
|
|
408
540
|
*/
|
|
409
541
|
private findTurnForCompletion;
|
|
410
|
-
/**
|
|
411
|
-
* Find the active turn for a legacy completion event without turnId.
|
|
412
|
-
* @param agentId - Agent ID from the completion event.
|
|
413
|
-
* @returns Active turn to mutate, or undefined when the event is ambiguous.
|
|
414
|
-
*/
|
|
415
|
-
private findTurnForUncorrelatedCompletion;
|
|
416
|
-
/**
|
|
417
|
-
* Check whether a terminal outcome has already been recorded for an agent.
|
|
418
|
-
* @param turn - Turn being completed.
|
|
419
|
-
* @param agentId - Agent ID from the terminal event.
|
|
420
|
-
* @returns Whether the agent already has a terminal outcome on the turn.
|
|
421
|
-
*/
|
|
422
|
-
private hasTerminalOutcome;
|
|
423
|
-
/**
|
|
424
|
-
* Persist a turn's terminal status and optional usage snapshot.
|
|
425
|
-
* @param turn - Turn being completed
|
|
426
|
-
* @param result - Completion result to persist
|
|
427
|
-
* @param usage - Usage snapshot to include, when available
|
|
428
|
-
* @param expectedStatus - Optional status guard for the first terminal transition
|
|
429
|
-
* @returns Whether turn storage handled the request and terminalized the turn
|
|
430
|
-
*/
|
|
431
|
-
private persistTurnCompletion;
|
|
432
|
-
/**
|
|
433
|
-
* Merge buffered usage and persist the updated snapshot.
|
|
434
|
-
* @param turn - Turn whose buffered usage should be merged
|
|
435
|
-
* @param result - Completion result for the turn
|
|
436
|
-
* @param usageAccumulator - Usage accumulator captured by the completing turn
|
|
437
|
-
* @param currentUsage - Current completed usage snapshot
|
|
438
|
-
* @returns Updated usage snapshot
|
|
439
|
-
*/
|
|
440
|
-
private flushBufferedUsageDuringCompletion;
|
|
441
|
-
/**
|
|
442
|
-
* Subscribe to `storage:message.stored` and count stored assistant messages
|
|
443
|
-
* per turnId, resolving any pending barrier waiter on each increment.
|
|
444
|
-
*
|
|
445
|
-
* Registered from the constructor (not `registerCompletionHandlers`) so the
|
|
446
|
-
* barrier also works for callers that drive `completeTurn` directly without
|
|
447
|
-
* wiring the agent-event handlers.
|
|
448
|
-
*/
|
|
449
|
-
private registerAssistantPersistenceCounter;
|
|
450
|
-
/**
|
|
451
|
-
* Persist-before-emit barrier: wait until the turn's assistant messages are
|
|
452
|
-
* durably stored (one per agent) or the bounded timeout elapses.
|
|
453
|
-
*
|
|
454
|
-
* Resolution paths, in order:
|
|
455
|
-
* 1. The continuous `storage:message.stored` counter already reached the
|
|
456
|
-
* expected count (messages stored before `completeTurn` ran).
|
|
457
|
-
* 2. `storage:message.getByTurn` is unhandled — no message storage exists,
|
|
458
|
-
* nothing can be waited for (skip).
|
|
459
|
-
* 3. A queryable-state probe already shows the expected assistant messages
|
|
460
|
-
* (covers messages persisted before this manager was constructed).
|
|
461
|
-
* 4. A waiter resolved by the counter reaching the expected count, bounded
|
|
462
|
-
* by {@link TURN_COMPLETION_PERSISTENCE_TIMEOUT_MS} — the timeout is
|
|
463
|
-
* mandatory because SessionBridge persists nothing for agents with zero
|
|
464
|
-
* blocks and no error, and swallows write errors.
|
|
465
|
-
* @param turn - The completing turn (expected count = its agent count)
|
|
466
|
-
*/
|
|
467
|
-
private awaitAssistantPersistence;
|
|
468
542
|
}
|
|
469
543
|
//#endregion
|
|
470
544
|
//#region services/core/src/session/handlers/abandon-handler.d.ts
|
|
@@ -488,11 +562,11 @@ declare function registerAbandonHandler(bus: IMakaioBus): () => void;
|
|
|
488
562
|
* For branching conversations (fork), use session.fork to create a new session
|
|
489
563
|
* with copied history, then attach agents to the new session.
|
|
490
564
|
* @param bus - Bus instance for communication
|
|
491
|
-
* @param
|
|
565
|
+
* @param turnManager - Shared owner of session turn lifecycle state
|
|
492
566
|
* @param machineId - Optional machine ID for deterministic adapter resolution
|
|
493
567
|
* @returns Cleanup function to unsubscribe
|
|
494
568
|
*/
|
|
495
|
-
declare function registerAttachHandler(bus: IMakaioBus,
|
|
569
|
+
declare function registerAttachHandler(bus: IMakaioBus, turnManager: SessionTurnManager, machineId?: string): () => void;
|
|
496
570
|
//#endregion
|
|
497
571
|
//#region services/core/src/session/handlers/compress-handler.d.ts
|
|
498
572
|
/**
|
|
@@ -528,6 +602,12 @@ declare function registerForkHandler(bus: IMakaioBus, machineId?: string): () =>
|
|
|
528
602
|
*/
|
|
529
603
|
declare function registerMergeHandler(bus: IMakaioBus): () => void;
|
|
530
604
|
//#endregion
|
|
605
|
+
//#region services/core/src/session/handlers/routing-lifecycle.d.ts
|
|
606
|
+
/** Narrow ledger transition owned by SessionTurnManager and injected into routing. */
|
|
607
|
+
interface TurnCompletionRecorder {
|
|
608
|
+
recordAgentCompletion(agentId: string, messageId: string, outcome: MessageOutcome, error: string | undefined, onTurnComplete: TurnCompleteCallback, turnId: string): Promise<void>;
|
|
609
|
+
}
|
|
610
|
+
//#endregion
|
|
531
611
|
//#region services/core/src/session/handlers/route-to-agents.d.ts
|
|
532
612
|
/**
|
|
533
613
|
* Interface for turn context enrichment.
|
|
@@ -563,6 +643,8 @@ interface RouteToAgentsOptions {
|
|
|
563
643
|
success: boolean;
|
|
564
644
|
errors: string[];
|
|
565
645
|
}) => Promise<void>;
|
|
646
|
+
/** Shared turn ledger owner. */
|
|
647
|
+
readonly turnManager: TurnCompletionRecorder;
|
|
566
648
|
/** Session context with curated messageHistory and decision signals. */
|
|
567
649
|
readonly sessionContext?: SessionContext;
|
|
568
650
|
/** Optional enricher for immediate message context. */
|
|
@@ -596,6 +678,19 @@ interface RouteToAgentsOptions {
|
|
|
596
678
|
declare function routeToAgents(options: RouteToAgentsOptions): Promise<void>;
|
|
597
679
|
//#endregion
|
|
598
680
|
//#region services/core/src/session/handlers/route-to-agents-core.d.ts
|
|
681
|
+
/** Durable result of one agent's core-routing dispatch attempt. */
|
|
682
|
+
type AgentDispatchOutcome = {
|
|
683
|
+
readonly agentId: string;
|
|
684
|
+
readonly kind: 'dispatched';
|
|
685
|
+
} | {
|
|
686
|
+
readonly agentId: string;
|
|
687
|
+
readonly kind: 'cancelled';
|
|
688
|
+
readonly error: unknown;
|
|
689
|
+
} | {
|
|
690
|
+
readonly agentId: string;
|
|
691
|
+
readonly kind: 'failed';
|
|
692
|
+
readonly error: unknown;
|
|
693
|
+
};
|
|
599
694
|
/**
|
|
600
695
|
* Route a message to target agents using a single shared session context.
|
|
601
696
|
*
|
|
@@ -616,9 +711,14 @@ declare function routeToAgents(options: RouteToAgentsOptions): Promise<void>;
|
|
|
616
711
|
* @param turn - Turn tracking object
|
|
617
712
|
* @param deliveryMode - How to deliver the message to the agent
|
|
618
713
|
* @param onTurnComplete - Callback invoked when the turn completes (all agents done)
|
|
714
|
+
* @param turnManager - Required ledger owner for direct terminal outcomes
|
|
619
715
|
* @param sessionContext - Optional shared session context forwarded to all agents
|
|
620
716
|
* @param responseSchema - Optional structured output descriptor for the turn
|
|
717
|
+
* @returns Durable dispatch outcomes after direct routing failures terminalize.
|
|
621
718
|
*/
|
|
622
|
-
declare function routeToAgentsCore(bus: IMakaioBus, session: IMakaioSession, agents:
|
|
719
|
+
declare function routeToAgentsCore(bus: IMakaioBus, session: IMakaioSession, agents: ReadonlyArray<{
|
|
720
|
+
agentId: string;
|
|
721
|
+
adapterId: string;
|
|
722
|
+
}>, message: MessageInput, messageId: string, turn: Turn$1, deliveryMode: 'enqueue' | 'immediate' | undefined, onTurnComplete: TurnCompleteCallback, turnManager: TurnCompletionRecorder, sessionContext?: SessionContext, responseSchema?: ResponseSchemaDescriptor): Promise<readonly AgentDispatchOutcome[]>;
|
|
623
723
|
//#endregion
|
|
624
|
-
export { registerCompressHandler as a, SessionTurnManager as c,
|
|
724
|
+
export { registerCompressHandler as a, SessionTurnManager as c, TurnContext as d, TurnPairStateChange as f, registerForkHandler as i, Turn$1 as l, TurnResult as m, routeToAgents as n, registerAttachHandler as o, TurnPairTerminalOutcome as p, registerMergeHandler as r, registerAbandonHandler as s, routeToAgentsCore as t, TurnConfig as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ContractStorageNamespaceDefinition } from "./storage-namespace-definition-
|
|
1
|
+
import { t as ContractStorageNamespaceDefinition } from "./storage-namespace-definition-BZJGSaX3.mjs";
|
|
2
2
|
import * as _$zod from "zod";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|