@makaio/framework 1.0.0-dev-1787670559522 → 1.0.0-dev-1787949057928
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 +2 -2
- package/dist/{account-identity-DGpXd8h_.mjs → account-identity-B3vLwm9O.mjs} +1 -1
- package/dist/adapter-Dz1fX5Wa.mjs +1 -0
- package/dist/adapter-subsystem/index.d.mts +118 -76
- package/dist/adapter-subsystem/index.mjs +1 -1
- 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 +73 -53
- 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.mjs +1 -1
- package/dist/{artifact-k3veR4Yx.mjs → artifact-Btbuib48.mjs} +1 -1
- package/dist/attach-error-Cb3GbeKe.mjs +1 -0
- package/dist/{auth-A1K_7q-8.mjs → auth-C6tVtaOX.mjs} +1 -1
- package/dist/{authority-state-bootstrap-YwtEImIB.mjs → authority-state-bootstrap-CLYus369.mjs} +1 -1
- package/dist/{automation-trigger-CuSdQwir.mjs → automation-trigger-ByjNlClm.mjs} +1 -1
- package/dist/bus/index.d.mts +22 -4
- package/dist/bus/index.mjs +1 -1
- package/dist/{bus-CqgrphNE.mjs → bus-D6NoBhIV.mjs} +1 -1
- package/dist/bus-UgFdHybD.mjs +1 -0
- package/dist/caller-owned-adapter-stub-C1M7FKrv.mjs +1 -0
- package/dist/{canonical-model-DJASlL4m.mjs → canonical-model-DXOvCaVg.mjs} +1 -1
- package/dist/capabilities-BUwuA7XX.mjs +1 -0
- package/dist/capability-j3NekkIu.mjs +1 -0
- package/dist/{client-BL5__WT0.mjs → client-BkznbdsO.mjs} +1 -1
- package/dist/clients/index.d.mts +1 -1
- package/dist/clients/index.mjs +1 -1
- package/dist/clients/managed-install.d.mts +1 -1
- package/dist/clients/managed-install.mjs +1 -1
- package/dist/code-execution/worker-entry.d.mts +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-BbttSqm8.mjs → compression-CtgeVLpP.mjs} +1 -1
- package/dist/{config-namespace-CyzeLWSg.mjs → config-namespace-CjWvw8ij.mjs} +1 -1
- package/dist/{context-resolution-ya9TXKg-.d.mts → context-resolution-841T7jBI.d.mts} +1 -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 +2 -2
- package/dist/contracts/artifact/index.mjs +1 -1
- package/dist/contracts/auth/index.d.mts +2 -2
- package/dist/contracts/auth/index.mjs +1 -1
- package/dist/contracts/automation-trigger/index.d.mts +3 -3
- package/dist/contracts/automation-trigger/index.mjs +1 -1
- package/dist/contracts/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/capabilities/index.d.mts +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 +5 -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 +62 -52
- 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 +1 -1
- package/dist/contracts/reaction/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 +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 +2 -2
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{contribution-BB5bjx3f.d.mts → contribution-CUHLVLsT.d.mts} +2 -2
- package/dist/core/index.d.mts +25 -2
- package/dist/{definition-CDg-Jq1T.mjs → definition-BH4QLGLI.mjs} +1 -1
- package/dist/{definition-BYgHlmMw.d.mts → definition-DyGImhyi.d.mts} +1 -1
- package/dist/{detached-extension-handle-DKd17UB6.mjs → detached-extension-handle-D0aI0pJA.mjs} +1 -1
- 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 +28 -0
- package/dist/event-B8ELuk6k.mjs +1 -0
- package/dist/{execution-attempt-repository-DFyAnchJ.d.mts → execution-attempt-repository-BJ2W6wwx.d.mts} +1 -1
- package/dist/{execution-target-ByNwZh5-.mjs → execution-target-H0RWV7Py.mjs} +1 -1
- package/dist/{extension-DUmibvMk.mjs → extension-Bfkr2DBs.mjs} +1 -1
- package/dist/{extension-DMdmj9gi.mjs → extension-Cz39YNXy.mjs} +1 -1
- package/dist/{extension-discovery-Fhps4icD.d.mts → extension-discovery-Dhu3WplO.d.mts} +9 -1
- package/dist/{filesystem-service-FAtd9gWH.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-BBLuT_vy.mjs → globby-QBDqstzq.mjs} +1 -1
- package/dist/handlers-BsHAFtye.mjs +57 -0
- package/dist/{harness-KxbWGL4I.mjs → harness-YQ2ewID9.mjs} +1 -1
- package/dist/{hook-responses-uCXAICTU.d.mts → hook-responses-9Ywsqzzq.d.mts} +1 -1
- package/dist/identity-OjRlG6dZ.mjs +1 -0
- package/dist/{index-CfiCJPP6.d.mts → index-B0VO0rAl.d.mts} +1 -1
- package/dist/{index-DI7-tIL3.d.mts → index-B0yMCJW8.d.mts} +39 -14
- package/dist/{index-CER64zYO.d.mts → index-B9io6JAL.d.mts} +15 -15
- package/dist/{index-CqQYgsbB.d.mts → index-BNzUyVwV.d.mts} +513 -170
- package/dist/{index-1UcQWrZy.d.mts → index-BUwDmh1I.d.mts} +142 -142
- package/dist/{index-CM75k-Ff.d.mts → index-BkbnC65b.d.mts} +189 -17
- package/dist/index-Bqk0pJBQ2.d.mts +138 -0
- package/dist/{index-C-JzEkqs.d.mts → index-C146Eq_J.d.mts} +535 -1801
- package/dist/{index-C__EQfKa.d.mts → index-CIEycZrt.d.mts} +1 -1
- package/dist/{index-DxYDRoDE2.d.mts → index-CMekqu_D.d.mts} +28 -8
- package/dist/{index-nydhGvXa.d.mts → index-CPRQ4dWX.d.mts} +0 -23
- package/dist/{index-BSQ30wYP.d.mts → index-CPi0UpRh.d.mts} +1 -1
- package/dist/{index-BtdK8HeH.d.mts → index-CVNbBtA-.d.mts} +72 -197
- package/dist/{index-BMVZs6pm.d.mts → index-CYjgoYeX.d.mts} +3 -3
- package/dist/{index-CSN_0sCo.d.mts → index-CmwAJ8-5.d.mts} +1 -1
- package/dist/index-Cny5RvjO.d.mts +800 -0
- package/dist/{index-B0xJgTi-.d.mts → index-D8D-yibS2.d.mts} +4 -4
- package/dist/index-DHnSLGP4.d.mts +268 -0
- package/dist/index-DQ8o3JGi.d.mts +132 -0
- package/dist/index-DWBkiiXH.d.mts +18 -0
- package/dist/{index-cPqSpWQC.d.mts → index-DfUpqwBa2.d.mts} +16 -16
- package/dist/index-Dg11JxKZ.d.mts +496 -0
- package/dist/{index-Bl7KWFod.d.mts → index-NUByQvlg.d.mts} +15 -15
- package/dist/{index-e4Txan9i.d.mts → index-cLB38AWX.d.mts} +64 -64
- 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 +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-CnOAtohU.mjs → lib-BpGvHZye.mjs} +2 -2
- package/dist/{lib-B_rJ6r0T.mjs → lib-Cm-uEoC1.mjs} +1 -1
- package/dist/{load-extensions-DUpaMQ7G.d.mts → load-extensions-BQoXaHhR.d.mts} +1 -1
- package/dist/{load-extensions-CW9uzNR5.mjs → load-extensions-DG5LvPyM.mjs} +1 -1
- package/dist/{materialization-CcpCDhXh.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-B7bntOB8.mjs → namespace-BL7lHlmg.mjs} +1 -1
- package/dist/{namespace-BgEiY7r1.d.mts → namespace-BNp7n_gu.d.mts} +3 -3
- package/dist/{namespace-DSlfFhB1.d.mts → namespace-BRuHzhPo.d.mts} +154 -2
- package/dist/{namespace-ChnRTUG4.d.mts → namespace-C06lJSuj.d.mts} +6 -6
- package/dist/{namespace-C6CVEGH8.d.mts → namespace-DknCutQZ.d.mts} +50 -0
- package/dist/namespace-sCPb79-7.mjs +1 -0
- package/dist/{native-session-supervisor-fZYPUk0-.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-B-KRW1Z0.d.mts → orchestrator-shared-CNHSImNY.d.mts} +9 -10
- package/dist/ownership-memory-handler-BpGdR_uG.mjs +1 -0
- package/dist/ownership-recovery-guard-DyW5vGBr.mjs +1 -0
- package/dist/{package-ypz4rKvn.mjs → package-B01gmu75.mjs} +1 -1
- package/dist/{package-Bf3hyuzs.d.mts → package-BNFTUFLB.d.mts} +2 -2
- package/dist/package-DttKA9wN.mjs +1 -0
- package/dist/{package-CddkNbZI.mjs → package-JtjbO-Oi.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/{profile-BtznZlq3.mjs → profile-N5qGUpF0.mjs} +1 -1
- package/dist/{provider-context-Dh-VOOYF.mjs → provider-context-CG42JlP9.mjs} +1 -1
- package/dist/{provider-context-BrLZYnDW.mjs → provider-context-zTDSH2x9.mjs} +1 -1
- package/dist/{reaction-BS0k4eNN.mjs → reaction-D3TNwPK8.mjs} +1 -1
- package/dist/{registry-BO_bOoky.mjs → registry-Dk12tAfv.mjs} +1 -1
- package/dist/{resolved-DMByz1_2.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 +6 -4
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-DKTzriEY.d.mts → schema-B3Pf7JP7.d.mts} +250 -3
- package/dist/{schema-DBG7Jq5_.mjs → schema-Dq-7si8u.mjs} +1 -1
- package/dist/{schemas-DvMbcABQ.d.mts → schemas-BAv9RB9M.d.mts} +4 -4
- package/dist/{schemas-DSkBOdx_.mjs → schemas-BfO5jkrL.mjs} +1 -1
- package/dist/{schemas-B7zo7Zcx.d.mts → schemas-C1mxTfd7.d.mts} +60 -4
- package/dist/schemas-C3kyQWGf.mjs +1 -0
- package/dist/{schemas-B3bfVYcL.d.mts → schemas-CF8QwRqt.d.mts} +2 -0
- package/dist/{schemas-DZH9lpxs.d.mts → schemas-OWvBn7AH.d.mts} +4 -4
- package/dist/{schemas-CsjN7cmM.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-7Ku8DBnh.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 +3 -3
- package/dist/services/adapter-subsystem/index.mjs +1 -1
- package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
- package/dist/services/adapter-subsystem/namespace.mjs +1 -1
- package/dist/services/agent-runtime/index.d.mts +2 -2
- package/dist/services/agent-runtime/namespace.d.mts +1 -1
- package/dist/services/agent-runtime/schemas.d.mts +1 -1
- package/dist/services/automation-trigger/index.mjs +1 -1
- 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 +160 -60
- package/dist/services/index.mjs +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +2 -2
- package/dist/services/log-import/log-import.d.mts +1 -1
- package/dist/services/log-import/log-import.mjs +1 -1
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.mjs +1 -1
- package/dist/services/materialization/index.d.mts +1 -1
- package/dist/services/materialization/index.mjs +1 -1
- package/dist/services/model-registry/index.d.mts +1 -1
- package/dist/services/model-registry/index.mjs +1 -1
- package/dist/services/preferences/index.d.mts +2 -2
- package/dist/services/preferences/schemas.d.mts +1 -1
- package/dist/services/preferences/storage-namespace.d.mts +2 -2
- package/dist/services/provider-context/index.d.mts +1 -1
- package/dist/services/provider-context/index.mjs +1 -1
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +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 +22 -1
- package/dist/services/session/testing/index.mjs +38 -14
- 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 +4 -4
- 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-BFVuCDPx.mjs → shared-B9AWRm9A.mjs} +1 -1
- package/dist/{skill-C1D51nhh.mjs → skill-DGNtc_ww.mjs} +1 -1
- package/dist/{src-xbmzokNe.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 +41 -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-DxwHox1a.mjs → tools-DWKWX3eV.mjs} +1 -1
- package/dist/{transition-C_Ka6b0-.d.mts → transition-D3zUBTPc.d.mts} +6 -6
- package/dist/{types-BNjPhj_a.d.mts → types-CtDGkyLx2.d.mts} +1 -1
- package/dist/types-Cwza95hS.mjs +1 -0
- package/dist/{types-CwvN4uN2.d.mts → types-DcxBYlPA.d.mts} +3018 -38
- package/dist/types-DnK6Wa_Y.d.mts +260 -0
- package/dist/{types-ClpEaoAm.d.mts → types-OKJCOjme.d.mts} +24 -4
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/utils/index.d.mts +22 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/project-manifest.mjs +1 -1
- package/dist/{version-BfNnVAGr.mjs → version-BYeVh1pI.mjs} +1 -1
- package/dist/{view-builder-KYsPqV-5.d.mts → view-builder-B0j9p5C0.d.mts} +4 -4
- package/dist/{visibility-Dl1o2I01.mjs → visibility-DtDLRBdr.mjs} +1 -1
- package/dist/worker-node-CjuQb9hl.mjs +1 -0
- package/dist/{worker-node-DJ41Tr-F.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 +88 -88
- 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 +1 -1
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/{workflow-transitions-DM0fN_eP.mjs → workflow-transitions-c_VQbyV0.mjs} +1 -1
- package/dist/workflow-worker-aNbdgqml.mjs +1 -0
- package/package.json +18 -1
- package/dist/adapter-BkdJaOOG.mjs +0 -1
- package/dist/agent-namespace-D51PODFf.mjs +0 -1
- package/dist/attach-error-BSlc7JfL.mjs +0 -1
- package/dist/bus-BIj0_aG6.mjs +0 -1
- package/dist/capabilities-Bqckjh7G.mjs +0 -1
- package/dist/capability-service-CJHNkjvm.mjs +0 -1
- package/dist/event-DR8U9Efx.mjs +0 -1
- package/dist/framework-packages-D_2hBZ-p.mjs +0 -1
- package/dist/handlers-2yd00VEq.mjs +0 -57
- package/dist/identity-DC3Pk0ps.mjs +0 -1
- package/dist/index-OsbtyMgx2.d.mts +0 -98
- package/dist/json-value-C1RGgS0a.d.mts +0 -72
- package/dist/json-value-D57aJhVn.mjs +0 -1
- package/dist/model-ZH3L1dPW.mjs +0 -1
- package/dist/namespace-CxrOLeeP.mjs +0 -1
- package/dist/orchestrator-shared-CTCZc6Vl.mjs +0 -1
- package/dist/ownership-memory-handler-Bblp93YC.mjs +0 -1
- package/dist/schemas-BqD8LlQw.mjs +0 -1
- package/dist/schemas-CvHFbzdy.mjs +0 -1
- package/dist/schemas-DplrlAyR.mjs +0 -1
- package/dist/scoped-bus-ClwTWqX8.mjs +0 -1
- package/dist/session-BMy2kRpX.mjs +0 -90
- package/dist/session-Cipx34j6.mjs +0 -1
- package/dist/tool-approval-service-BVgN9Q1r.mjs +0 -1
- package/dist/worker-node-BDOYPEpi.mjs +0 -1
- package/dist/workflow-Hzc5jlnV.mjs +0 -1
- package/dist/workflow-worker-DARC7UZl.mjs +0 -1
- /package/dist/{adapter-auth-runtime-D9Lnl7cc.mjs → adapter-auth-runtime-DHHppU4f.mjs} +0 -0
- /package/dist/{adapter-binding-B-FBoCys.d.mts → adapter-binding-CATvmGuz.d.mts} +0 -0
- /package/dist/{ajv-L5fKxaia.mjs → ajv-krzJXh1X.mjs} +0 -0
- /package/dist/{attempt-record-codec-DaFLKR5C.mjs → attempt-record-codec-BYfYkj4M.mjs} +0 -0
- /package/dist/{await-trigger-ph1S0zVI.mjs → await-trigger-Bkg2BQfg.mjs} +0 -0
- /package/dist/{base-orchestrator-D9u4NyiM.d.mts → base-orchestrator-B4YW6z_Q.d.mts} +0 -0
- /package/dist/{index-Ol9RBB0W2.d.mts → capability-service-BW1-teFU.d.mts} +0 -0
- /package/dist/{client-4ihewPUm.d.mts → client-BG0WX5Vz.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-DJajc_Ff.mjs → client-binary-version-verifier-0lCKZOTg.mjs} +0 -0
- /package/dist/{client-binary-version-verifier-jDDZ64Ah.d.mts → client-binary-version-verifier-lcv83Hq3.d.mts} +0 -0
- /package/dist/{clients-namespace-DFWuUawf.d.mts → clients-namespace-DLAjOTTb.d.mts} +0 -0
- /package/dist/{config-namespace-D1kyZj0B.d.mts → config-namespace-CH7sJZ4f.d.mts} +0 -0
- /package/dist/{create-static-mount-9tnGpIeK.mjs → create-static-mount-DxuixuLZ.mjs} +0 -0
- /package/dist/{cross-spawn-BIgueAqr.mjs → cross-spawn-CZygZJMH.mjs} +0 -0
- /package/dist/{cursor-storage-ROWfiTh1.mjs → cursor-storage-bsc9lZKk.mjs} +0 -0
- /package/dist/{definition-DB-kKc0d.d.mts → definition-BrgzUuFk.d.mts} +0 -0
- /package/dist/{definitions-CF6YmEhL.mjs → definitions-CRpdnHYM.mjs} +0 -0
- /package/dist/{descriptor-to-package-BecVCopf.mjs → descriptor-to-package-CcjdoWP4.mjs} +0 -0
- /package/dist/{drizzle-CPv3vdTE.mjs → drizzle-Bzc-OGVI.mjs} +0 -0
- /package/dist/{esm-CBFWM8u_.mjs → esm-i-S5TW72.mjs} +0 -0
- /package/dist/{extension-context-DzB7ydM3.d.mts → extension-context-QmFuHdq5.d.mts} +0 -0
- /package/dist/{extension-namespace-B554RmCp.mjs → extension-namespace-QoTTwKPt.mjs} +0 -0
- /package/dist/{extension-package-provenance-Dh_-Z-tE.mjs → extension-package-provenance-aYrZuS4W.mjs} +0 -0
- /package/dist/{facet-DVsW12iF.mjs → facet-BnMh7Jyc.mjs} +0 -0
- /package/dist/{filesystem-service-Cm2RHKBa.d.mts → filesystem-service-ZJ43SbBi.d.mts} +0 -0
- /package/dist/{handler-Bqlk-6BY.mjs → handler-DF1fVDpf.mjs} +0 -0
- /package/dist/{host-k5yoyKHg.mjs → host-B-_ntOMH.mjs} +0 -0
- /package/dist/{index--atUpi5l2.d.mts → index-8NdPPzUh2.d.mts} +0 -0
- /package/dist/{index-DwLRZscE.d.mts → index-8y4hT9WL.d.mts} +0 -0
- /package/dist/{index-C7HcDpHE.d.mts → index-B-3I98nw.d.mts} +0 -0
- /package/dist/{index-BcvqDfcN.d.mts → index-B2Y1Wvbh.d.mts} +0 -0
- /package/dist/{index-BRCrFirq.d.mts → index-B4svZC6L.d.mts} +0 -0
- /package/dist/{index-CQuRTeRa.d.mts → index-B5dP8rj6.d.mts} +0 -0
- /package/dist/{index-CRmE88hi.d.mts → index-BC-6qNeo.d.mts} +0 -0
- /package/dist/{index-CxSSdIZz.d.mts → index-BFWvT0NG.d.mts} +0 -0
- /package/dist/{index-DP3o_13U.d.mts → index-BM56936c.d.mts} +0 -0
- /package/dist/{index-BVcQcphK.d.mts → index-BMRB9yhF.d.mts} +0 -0
- /package/dist/{index-bIe_57cL.d.mts → index-BTEJfzjE.d.mts} +0 -0
- /package/dist/{index-DgOfgjx3.d.mts → index-BfV8U4XX.d.mts} +0 -0
- /package/dist/{index-DBadVauL.d.mts → index-BmevAPME2.d.mts} +0 -0
- /package/dist/{index-OADt3xlS.d.mts → index-BuMsrli0.d.mts} +0 -0
- /package/dist/{index-BJAB-BW_.d.mts → index-C4V8Pmi4.d.mts} +0 -0
- /package/dist/{index-aoxdnhJ42.d.mts → index-CL0Jo1b92.d.mts} +0 -0
- /package/dist/{index-CvW9_SzR.d.mts → index-CVpaGijY.d.mts} +0 -0
- /package/dist/{index-E4SET1AA.d.mts → index-CmbkCxj-.d.mts} +0 -0
- /package/dist/{index-BgGe9WZz.d.mts → index-CqdMbYmR.d.mts} +0 -0
- /package/dist/{index-BQprJNA_.d.mts → index-D037TVsm.d.mts} +0 -0
- /package/dist/{index-BeENojSx2.d.mts → index-DgspOUa72.d.mts} +0 -0
- /package/dist/{index-42UdYStR.d.mts → index-Ek4y8M9J2.d.mts} +0 -0
- /package/dist/{index-Beo_Ik8-.d.mts → index-VzLAV0Yt.d.mts} +0 -0
- /package/dist/{index-BSbGB23v.d.mts → index-jxPncqWZ2.d.mts} +0 -0
- /package/dist/{index-Bqm0ahTQ.d.mts → index-kzIjbrS02.d.mts} +0 -0
- /package/dist/{index-BJMezANn.d.mts → index-l01zsChf.d.mts} +0 -0
- /package/dist/{index-CK3f0bAL.d.mts → index-pvX-BIpr2.d.mts} +0 -0
- /package/dist/{jsonl-transport-Bp_6pB2a.mjs → jsonl-transport-Cyyh5Wje.mjs} +0 -0
- /package/dist/{lib-Bwdd2m81.mjs → lib-BqV8hYtk.mjs} +0 -0
- /package/dist/{model-registry-yURX738J.mjs → model-registry-C9rFu3kV.mjs} +0 -0
- /package/dist/{model-registry-Y854mUml.mjs → model-registry-Cixxx2jv.mjs} +0 -0
- /package/dist/{modes-DmUsjHdV.mjs → modes-DwsJ3yVl.mjs} +0 -0
- /package/dist/{namespace-ByP1Iipi.d.mts → namespace-B0ftHlK3.d.mts} +0 -0
- /package/dist/{namespace-C1D77w7U.d.mts → namespace-BGRHcrmp.d.mts} +0 -0
- /package/dist/{namespace-Bi3CmYQy.d.mts → namespace-BUYDmd0r.d.mts} +0 -0
- /package/dist/{namespace-CkBbNFSU.mjs → namespace-BW3Bfu9h.mjs} +0 -0
- /package/dist/{namespace-DX1Ec15L.d.mts → namespace-BdAK0lD8.d.mts} +0 -0
- /package/dist/{namespace-Dgg0uoe6.d.mts → namespace-CPG6u60N.d.mts} +0 -0
- /package/dist/{namespace-BusZERU8.d.mts → namespace-CVFaZv8x.d.mts} +0 -0
- /package/dist/{namespace-yREpGJgG.d.mts → namespace-DBO1OzYB.d.mts} +0 -0
- /package/dist/{namespace-CrDlawqu.d.mts → namespace-DOezqDti.d.mts} +0 -0
- /package/dist/{namespace-CfIW0hpQ.mjs → namespace-DiwqpB-c.mjs} +0 -0
- /package/dist/{namespace-s2y_NFKf.d.mts → namespace-DqZweTbX.d.mts} +0 -0
- /package/dist/{namespace-CFjdyNXG.mjs → namespace-Du0accdE.mjs} +0 -0
- /package/dist/{namespace-BFqkUTJp.mjs → namespace-NXm_zvL1.mjs} +0 -0
- /package/dist/{namespace-B9FEGuEu.mjs → namespace-jVTsuZHX.mjs} +0 -0
- /package/dist/{namespace-DwZwGXgF.d.mts → namespace-l-HG1rLF.d.mts} +0 -0
- /package/dist/{namespace-DbNWsPFY.mjs → namespace-tjoxekmf.mjs} +0 -0
- /package/dist/{out-DrhwCgqM.mjs → out-8bOYN6EF.mjs} +0 -0
- /package/dist/{package-CBdvjyyZ.mjs → package-EGTn-Ng1.mjs} +0 -0
- /package/dist/{packages-FBv3fAOR.mjs → packages-Bp124-gx.mjs} +0 -0
- /package/dist/{packages-N3-2Kl-Y.d.mts → packages-CxPMEg8D.d.mts} +0 -0
- /package/dist/{platform-BrsMv_S3.mjs → platform-CxyYPrkf.mjs} +0 -0
- /package/dist/{provider-operation-DJ_TLZFf.d.mts → provider-operation-DbdyFwNm.d.mts} +0 -0
- /package/dist/{providers-CCcn4Ndp.mjs → providers-C-eekMxD.mjs} +0 -0
- /package/dist/{providers-namespace-DeJBh6MP.d.mts → providers-namespace-CfZKp-C0.d.mts} +0 -0
- /package/dist/{quick-lru-uwB0hP-y.mjs → quick-lru-CCEnf7y6.mjs} +0 -0
- /package/dist/{schema-jIapW8Kb.mjs → schema-C0opCPww.mjs} +0 -0
- /package/dist/{schema-introspection-C1wvklj9.mjs → schema-introspection-6-r_KEJQ.mjs} +0 -0
- /package/dist/{schemas-CeUI2i5j.d.mts → schemas-B50oWBuj.d.mts} +0 -0
- /package/dist/{schemas-CD0wOQxx.d.mts → schemas-B6Q-qdmn.d.mts} +0 -0
- /package/dist/{schemas-DgwEVUt-.mjs → schemas-B8hKbBwI.mjs} +0 -0
- /package/dist/{schemas-sMoRnBdZ.d.mts → schemas-BGvkTiCx.d.mts} +0 -0
- /package/dist/{schemas-BNdiVBWh.mjs → schemas-BivbWRkG.mjs} +0 -0
- /package/dist/{schemas-Cg-Kwp8c.d.mts → schemas-ChmQldVH.d.mts} +0 -0
- /package/dist/{schemas-VbB1FTxx.d.mts → schemas-D7ScxLrf.d.mts} +0 -0
- /package/dist/{schemas-Cv3rR9Sz.d.mts → schemas-Pe892GgN.d.mts} +0 -0
- /package/dist/{schemas-qA279_j_.d.mts → schemas-bfZNpl0B.d.mts} +0 -0
- /package/dist/{schemas-mLpOfMoN.mjs → schemas-scyC2tFF.mjs} +0 -0
- /package/dist/{semver-DTXuyLcK.mjs → semver-BI7kTNsY.mjs} +0 -0
- /package/dist/{server-lifecycle-DKx_fWlq.mjs → server-lifecycle-B_OZnoe-.mjs} +0 -0
- /package/dist/{server-lifecycle-C_8iKgat.d.mts → server-lifecycle-L8zja8t8.d.mts} +0 -0
- /package/dist/{session-lineage-D5E142LU.d.mts → session-lineage-bUkd3fqx.d.mts} +0 -0
- /package/dist/{shared-schemas-aahW97QW.mjs → shared-schemas-CQ6blrEW.mjs} +0 -0
- /package/dist/{src-DHqsl5Pg.mjs → src-BacfeiI4.mjs} +0 -0
- /package/dist/{storage-namespace-Dz2jsssp.mjs → storage-namespace-BZce8kkW.mjs} +0 -0
- /package/dist/{storage-namespace-Tf3P5yJ5.d.mts → storage-namespace-YmE8XCCL.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-CDef0E20.mjs → storage-namespace-definition-Cca-zwXU.mjs} +0 -0
- /package/dist/{supports-color-i7OTnKcZ.mjs → supports-color-SV_FgSN2.mjs} +0 -0
- /package/dist/{telemetry-BvCBUjFg.mjs → telemetry-BqoC87F-.mjs} +0 -0
- /package/dist/{timeout-B0nYjLc8.mjs → timeout-DVlN2Zhy.mjs} +0 -0
- /package/dist/{tray-menu-service-Deo6yyP8.mjs → tray-menu-service-eVVxgPLc.mjs} +0 -0
- /package/dist/{types-xCdGghb2.d.mts → types-BlB23n4f.d.mts} +0 -0
- /package/dist/{types-CNS55jvt.d.mts → types-DdpSEmTO.d.mts} +0 -0
- /package/dist/{types-Ce6LL25v.d.mts → types-tyv0B605.d.mts} +0 -0
- /package/dist/{ui-config-BIyGzMNL.mjs → ui-config-B35GloSX.mjs} +0 -0
- /package/dist/{variant-B4uWdxW7.mjs → variant-Dwnge3J_.mjs} +0 -0
- /package/dist/{window-registry-CoBJq3u4.mjs → window-registry-CKiMJjId.mjs} +0 -0
- /package/dist/{window-registry-BLtVx3Iw.d.mts → window-registry-Pcf35cac.d.mts} +0 -0
- /package/dist/{zod-json-schema-BAGAFfCN.mjs → zod-json-schema-Dixc-B1T.mjs} +0 -0
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as PipelineStep, o as SessionEditorAction, t as ActionCategory } from "./types-
|
|
1
|
+
import { g as OwnedAdapterInstance, h as MachineScopedAdapterInstance, w as Turn$1 } from "./index-B0yMCJW8.mjs";
|
|
2
|
+
import { a as PipelineStep, o as SessionEditorAction, t as ActionCategory } from "./types-BlB23n4f.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
5
5
|
import { ExtractSubjectPayload, SubjectDefinition } from "@makaio/framework/core";
|
|
6
6
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
7
7
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
8
|
-
import { AIReasoningLevel, AdapterRuntimeOptions, AdapterSelection, AdapterSessionClaimRecord, AgentRole, BranchKind, ContextWindowState, ForkOptions, ForkTransforms, ICapabilityProvider, IMakaioSession, JsonValue, MakaioSessionAgent, MakaioSessionEvent, Message, MessageBlock, MessageInput, NativeLocalityVerdict, OwnershipTopology, ResolvedProviderContext, SessionContext, SessionEventType, SessionExtensionContext, SessionLineage, SessionLineageKind, SessionMessage, SessionMessageBlock, SessionMessageOrigin, SessionOwnershipReclaimReason, SessionOwnershipReserveStartServiceResult, SessionSubjects, TurnIngestionMarker, TurnInitiator, TurnUsage } from "@makaio/framework/contracts";
|
|
8
|
+
import { AIReasoningLevel, AdapterRuntimeOptions, AdapterSelection, AdapterSessionClaimRecord, AgentRole, BranchKind, ContextWindowState, ForkOptions, ForkTransforms, ICapabilityProvider, IMakaioSession, JsonValue, MakaioSessionAgent, MakaioSessionEvent, Message, MessageBlock, MessageInput, NativeLocalityVerdict, OwnershipTopology, ResolvedProviderContext, RuntimeInstanceRecord, SessionContext, SessionEventType, SessionExtensionContext, SessionLineage, SessionLineageKind, SessionMessage, SessionMessageBlock, SessionMessageOrigin, SessionOwnershipReclaimReason, SessionOwnershipRecoveryGuard, SessionOwnershipReserveStartServiceResult, SessionSubjects, StartAgentRequest, StartAgentResponse, TurnIngestionMarker, TurnInitiator, TurnUsage } from "@makaio/framework/contracts";
|
|
9
9
|
import { BaseService } from "@makaio/framework/service-base";
|
|
10
10
|
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
11
11
|
import * as _$drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
12
12
|
import * as _$_makaio_storage_drizzle0 from "@makaio/framework/storage/drizzle";
|
|
13
|
-
import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
|
|
13
|
+
import { MakaioDatabase, TransactionLock } from "@makaio/framework/storage/drizzle";
|
|
14
14
|
import * as _$drizzle_orm0 from "drizzle-orm";
|
|
15
|
+
import { SQL } from "drizzle-orm";
|
|
15
16
|
import * as _$_makaio_storage_core0 from "@makaio/framework/storage";
|
|
16
17
|
|
|
17
18
|
//#region services/core/src/session/session-service.d.ts
|
|
@@ -93,6 +94,17 @@ interface MakaioSessionServiceOptions {
|
|
|
93
94
|
*/
|
|
94
95
|
declare class MakaioSessionService extends BaseService {
|
|
95
96
|
private readonly options;
|
|
97
|
+
private ownership;
|
|
98
|
+
/**
|
|
99
|
+
* Return the currently active ownership-authority incarnation.
|
|
100
|
+
*
|
|
101
|
+
* Read at adapter construction time rather than cached by the adapter
|
|
102
|
+
* subsystem, so reinitializing this service gives every subsequently created
|
|
103
|
+
* adapter the newly minted incarnation.
|
|
104
|
+
* @returns Active runtime-incarnation identity.
|
|
105
|
+
* @throws When the service has not initialized its authority.
|
|
106
|
+
*/
|
|
107
|
+
requireOwnershipInstanceId(): string;
|
|
96
108
|
/**
|
|
97
109
|
* Creates a new MakaioSessionService instance.
|
|
98
110
|
* @param bus - The event bus for inter-service communication
|
|
@@ -115,6 +127,16 @@ declare class MakaioSessionService extends BaseService {
|
|
|
115
127
|
* that do not register turn storage).
|
|
116
128
|
*/
|
|
117
129
|
protected onInit(): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Retire this process only after the adapter subsystem's earlier teardown has
|
|
132
|
+
* published its aggregate evidence.
|
|
133
|
+
*
|
|
134
|
+
* Reverse dependency ordering destroys the adapter subsystem first. The
|
|
135
|
+
* authority then closes admission, drains operations already admitted, and
|
|
136
|
+
* stamps retirement only when that published aggregate proves teardown was
|
|
137
|
+
* observed.
|
|
138
|
+
*/
|
|
139
|
+
protected onDestroy(): Promise<void>;
|
|
118
140
|
/**
|
|
119
141
|
* Arm the ownership reconcile behind the post-coordinator barrier.
|
|
120
142
|
*
|
|
@@ -163,6 +185,8 @@ interface OwnershipAuthorityContext {
|
|
|
163
185
|
readonly bus: IMakaioBus;
|
|
164
186
|
/** Machine identity the authority owns claims under, or `undefined` when it has none. */
|
|
165
187
|
readonly machineId: string | undefined;
|
|
188
|
+
/** Runtime-incarnation identity stamped onto every generation this authority allocates. */
|
|
189
|
+
readonly instanceId: string;
|
|
166
190
|
/** {@inheritDoc OwnershipTopologySchema} */
|
|
167
191
|
readonly topology: OwnershipTopology;
|
|
168
192
|
}
|
|
@@ -175,7 +199,24 @@ interface OwnershipAuthorityContext {
|
|
|
175
199
|
* the authority with *is* what every operation decides under, so there is no
|
|
176
200
|
* second declaration for the two to drift apart in.
|
|
177
201
|
*/
|
|
178
|
-
|
|
202
|
+
interface SessionOwnershipAuthorityDeps extends Omit<OwnershipAuthorityContext, 'instanceId'> {
|
|
203
|
+
/** Runtime-incarnation identity, or a freshly minted identity in isolated compositions. */
|
|
204
|
+
readonly instanceId?: string;
|
|
205
|
+
}
|
|
206
|
+
/** Private lifecycle control for the locally composed ownership authority. */
|
|
207
|
+
interface OwnershipAuthorityHandle {
|
|
208
|
+
/** Identity stamped onto generations allocated by this authority. */
|
|
209
|
+
readonly instanceId: string;
|
|
210
|
+
/** Close admission, drain admitted operations, and retire on observed teardown. */
|
|
211
|
+
close(): Promise<void>;
|
|
212
|
+
}
|
|
213
|
+
/** Authority handlers and the private lifecycle control that owns them. */
|
|
214
|
+
interface RegisteredSessionOwnershipAuthority {
|
|
215
|
+
/** Idempotent handler cleanups for the containing service. */
|
|
216
|
+
readonly cleanups: readonly (() => void)[];
|
|
217
|
+
/** Private shutdown capability; deliberately not exposed as a bus subject. */
|
|
218
|
+
readonly ownership: OwnershipAuthorityHandle;
|
|
219
|
+
}
|
|
179
220
|
/**
|
|
180
221
|
* Register the session-ownership authority.
|
|
181
222
|
*
|
|
@@ -184,10 +225,10 @@ type SessionOwnershipAuthorityDeps = OwnershipAuthorityContext;
|
|
|
184
225
|
* a caller out of storage RPCs, a reservation or a movement is three
|
|
185
226
|
* transactions with windows in which a crash strands an ownership key or
|
|
186
227
|
* publishes a currency no generation owns.
|
|
187
|
-
* @param
|
|
188
|
-
* @returns
|
|
228
|
+
* @param deps - Bus, machine identity, topology and optional test identity.
|
|
229
|
+
* @returns Registered cleanups and the private retirement handle.
|
|
189
230
|
*/
|
|
190
|
-
declare function registerSessionOwnershipAuthority(
|
|
231
|
+
declare function registerSessionOwnershipAuthority(deps: SessionOwnershipAuthorityDeps): RegisteredSessionOwnershipAuthority;
|
|
191
232
|
//#endregion
|
|
192
233
|
//#region services/core/src/session/ownership/movement-observer.d.ts
|
|
193
234
|
/**
|
|
@@ -393,6 +434,8 @@ declare function mintClaimToken(): string;
|
|
|
393
434
|
* diagnostic must report what it observes, and a probe can straddle a delete.
|
|
394
435
|
* - `agent-disposed` — the agent was removed. A disposed agent can never
|
|
395
436
|
* legitimately hold a key.
|
|
437
|
+
* - `owner-instance-retired` — storage proves the exact process that took this
|
|
438
|
+
* generation retired itself.
|
|
396
439
|
* - `adapter-instance-gone` — no adapter answers for the claim's instance.
|
|
397
440
|
* Admitted **only** under `machine-exclusive`: where peers may host adapters
|
|
398
441
|
* on the same machine, an unanswered probe means "not this runtime's", never
|
|
@@ -430,6 +473,15 @@ interface CoreSessionServiceHandlerDeps {
|
|
|
430
473
|
* `'shared-machine'` — the reading no host can be wrong about.
|
|
431
474
|
*/
|
|
432
475
|
topology?: OwnershipTopology;
|
|
476
|
+
/** Runtime-incarnation identity stamped onto ownership generations. */
|
|
477
|
+
instanceId?: string;
|
|
478
|
+
}
|
|
479
|
+
/** Core handler cleanups plus the private ownership lifecycle handle. */
|
|
480
|
+
interface RegisteredCoreSessionServiceHandlers {
|
|
481
|
+
/** Cleanup callbacks for the containing service. */
|
|
482
|
+
readonly cleanups: readonly (() => void)[];
|
|
483
|
+
/** Private authority shutdown capability. */
|
|
484
|
+
readonly ownership: OwnershipAuthorityHandle;
|
|
433
485
|
}
|
|
434
486
|
/**
|
|
435
487
|
* Registers the framework-core session service handlers:
|
|
@@ -447,9 +499,9 @@ interface CoreSessionServiceHandlerDeps {
|
|
|
447
499
|
* `session.get` / `session.list` / `session.close` all delegate to
|
|
448
500
|
* `SessionStorageSubjects.*` which may be unhandled in ephemeral mode.
|
|
449
501
|
* @param deps - Bus, plus the identity the ownership authority is composed with
|
|
450
|
-
* @returns
|
|
502
|
+
* @returns Cleanup callbacks plus the private ownership lifecycle handle.
|
|
451
503
|
*/
|
|
452
|
-
declare function registerCoreSessionServiceHandlers(deps: CoreSessionServiceHandlerDeps):
|
|
504
|
+
declare function registerCoreSessionServiceHandlers(deps: CoreSessionServiceHandlerDeps): RegisteredCoreSessionServiceHandlers;
|
|
453
505
|
//#endregion
|
|
454
506
|
//#region services/core/src/session/session-orchestrator.d.ts
|
|
455
507
|
/**
|
|
@@ -464,52 +516,7 @@ interface ISessionOrchestrator {
|
|
|
464
516
|
/** Stop the orchestrator and clean up all subscriptions. */
|
|
465
517
|
destroy(): void;
|
|
466
518
|
}
|
|
467
|
-
/**
|
|
468
|
-
* Slim framework session orchestrator.
|
|
469
|
-
*
|
|
470
|
-
* Composes with `SessionTurnManager` (turn lifecycle, usage accumulation,
|
|
471
|
-
* completion), `AdapterRegistry` (adapterName to adapterId mapping), and the
|
|
472
|
-
* adapter-subsystem reverse lookup for canonical `adapterId` to `adapterName`
|
|
473
|
-
* validation when callers select a direct adapter instance.
|
|
474
|
-
*
|
|
475
|
-
* Registers the core session orchestration handlers:
|
|
476
|
-
* 1. Get or create session (via `getOrCreateSession`)
|
|
477
|
-
* 2. Resolve any start the session has in flight (via `resolveInFlightStarts`),
|
|
478
|
-
* before anything probes an agent or concludes the session has none
|
|
479
|
-
* 2b. Refuse a send that stated targets (named ids or `'all'`) against a session
|
|
480
|
-
* that has none — before the start below, so a refused send leaves no agent
|
|
481
|
-
* and no reservation; only the default send may bootstrap a session
|
|
482
|
-
* 3. Start the lead agent if the session has no agents — resolves the canonical
|
|
483
|
-
* `adapterName` from direct selections, uses `adapterId` directly when
|
|
484
|
-
* provided, otherwise resolves it via `AdapterRegistry`, resolves provider
|
|
485
|
-
* credentials when selected, then runs the reserved start (via
|
|
486
|
-
* `startLeadAgent`)
|
|
487
|
-
* 4. Resolve target agents (via `resolveTargetAgents`)
|
|
488
|
-
* 5. Verify agent liveness and recover dead agents under one recovery plan
|
|
489
|
-
* (requestOptional `AdapterSubjects.getAgent` + `buildPlannedRecoveryContext`)
|
|
490
|
-
* 6. Get or create turn (via `SessionTurnManager`), generate the message ID and
|
|
491
|
-
* store the user message (awaited, persist-before-route) + routing records
|
|
492
|
-
* (fire-and-forget)
|
|
493
|
-
* 7. Emit `session.turn.started` + `session.user_message.sent`
|
|
494
|
-
* 8. Route to agents (via `routeToAgentsCore`, single shared context)
|
|
495
|
-
* 9. Return result with `messageId`, `turnId`, `sessionId`
|
|
496
|
-
*
|
|
497
|
-
* Explicit `session.agent.attach` handlers share the same turn manager so
|
|
498
|
-
* attach-time initial messages participate in the same completion lifecycle.
|
|
499
|
-
*
|
|
500
|
-
* Host-specific features (personas, MCP, execution targets, container spawn,
|
|
501
|
-
* connector swap, CWD/model enforcement, fork context, TurnContextEnricher) are
|
|
502
|
-
* handled by a host-provided orchestrator.
|
|
503
|
-
* @example
|
|
504
|
-
* ```typescript
|
|
505
|
-
* const orchestrator = new SessionOrchestrator(MakaioBus, 'machine-id');
|
|
506
|
-
*
|
|
507
|
-
* const { messageId, turnId, sessionId } = await MakaioBus.request(
|
|
508
|
-
* SessionSubjects.sendMessage,
|
|
509
|
-
* { sessionId: crypto.randomUUID(), adapterName: 'openai-node', message: 'Hello!' },
|
|
510
|
-
* );
|
|
511
|
-
* ```
|
|
512
|
-
*/
|
|
519
|
+
/** Coordinates session sends, recovery and turn completion. */
|
|
513
520
|
declare class SessionOrchestrator implements ISessionOrchestrator {
|
|
514
521
|
private readonly bus;
|
|
515
522
|
private readonly turnManager;
|
|
@@ -524,84 +531,8 @@ declare class SessionOrchestrator implements ISessionOrchestrator {
|
|
|
524
531
|
* instance resolution).
|
|
525
532
|
*/
|
|
526
533
|
constructor(bus: IMakaioBus | undefined, machineId: string);
|
|
527
|
-
/**
|
|
528
|
-
* Register the `session.sendMessage` RPC handler.
|
|
529
|
-
*
|
|
530
|
-
* Core flow:
|
|
531
|
-
* 1. Get or create session
|
|
532
|
-
* 2. Join or arbitrate every start the session has in flight
|
|
533
|
-
* 2b. Refuse a target-stating send (named ids or `'all'`) against a session
|
|
534
|
-
* with no agents, before the bootstrap can leave state behind a send that
|
|
535
|
-
* cannot deliver
|
|
536
|
-
* 3. Start the lead agent if the session has no agents (canonicalize direct
|
|
537
|
-
* selections, resolve adapterId, resolve provider credentials, reserved start)
|
|
538
|
-
* 4. Resolve target agents
|
|
539
|
-
* 5. Verify agent liveness and recover dead agents under one recovery plan
|
|
540
|
-
* 6. Get or create turn (via SessionTurnManager), generate the message ID and
|
|
541
|
-
* store the user message (awaited) + routing records (fire-and-forget)
|
|
542
|
-
* 7. Emit turn.started + user_message.sent
|
|
543
|
-
* 8. Route to agents (routeToAgentsCore, single shared context)
|
|
544
|
-
* 9. Return result with messageId, turnId, sessionId
|
|
545
|
-
*/
|
|
534
|
+
/** Register the `session.sendMessage` RPC handler. */
|
|
546
535
|
private registerSendMessageHandler;
|
|
547
|
-
/**
|
|
548
|
-
* Probe this send's targets and recover the ones that are gone.
|
|
549
|
-
*
|
|
550
|
-
* **An agent whose in-flight start this send consumed *locally* needs no
|
|
551
|
-
* probe; one it merely out-raced does.** The distinction is the evidence
|
|
552
|
-
* behind the verdict. A locally joined attempt reported what it built, and
|
|
553
|
-
* this process ran it. A won compare-and-swap reports only that this caller
|
|
554
|
-
* wrote a status first: the attempt it outran belongs to a process this
|
|
555
|
-
* runtime cannot see, and writing `dead` does not make the agent dead. Wave 3
|
|
556
|
-
* cannot ask whether that process is alive (OQ-B, Wave 4) — but it can ask
|
|
557
|
-
* whether a *connector* answers, which is what the probe already does for
|
|
558
|
-
* every other target and the only instrument here that carries evidence
|
|
559
|
-
* across processes. Skipping it there was the send believing its own status
|
|
560
|
-
* write, and it is what let a second lifecycle open beside a live one.
|
|
561
|
-
*
|
|
562
|
-
* The framework orchestrator evaluates no locality, so it can make only one
|
|
563
|
-
* honest recovery decision: the replacement connector starts fresh and the
|
|
564
|
-
* stored conversation is injected. Holding it as a plan keeps the history
|
|
565
|
-
* assembly and the rehydrate reading one decision — a host that later resumes
|
|
566
|
-
* natively here changes that value alone and both sides follow.
|
|
567
|
-
*
|
|
568
|
-
* Each recovery is reserved and runs inside the in-flight-start seam, which
|
|
569
|
-
* the entry-point inventory requires of every service-owned path that can
|
|
570
|
-
* reach a lifecycle call for an *existing* agent identity: two concurrent
|
|
571
|
-
* sends onto one dead agent would otherwise dispatch two rehydrates, and the
|
|
572
|
-
* second would race the first's connector.
|
|
573
|
-
* @param session - Session being sent to.
|
|
574
|
-
* @param targetAgents - Targets this send materialised.
|
|
575
|
-
* @param recovering - Agents whose in-flight start this send already claimed.
|
|
576
|
-
* @param arbitrated - Of those, the ones claimed by compare-and-swap against another process.
|
|
577
|
-
* @returns The injected history, when any agent needed it, and the agents this runtime may not drive.
|
|
578
|
-
*/
|
|
579
|
-
private recoverDeadTargets;
|
|
580
|
-
/**
|
|
581
|
-
* Re-resolve a send's targets around agents this runtime may not drive.
|
|
582
|
-
*
|
|
583
|
-
* The three send forms degrade differently, and the difference is deliberate:
|
|
584
|
-
*
|
|
585
|
-
* - **lead-default** — a deferred lead is always *total*, because target
|
|
586
|
-
* resolution raises for a session whose named lead it cannot resolve, so
|
|
587
|
-
* there is no state in which the default send proceeds with "the other
|
|
588
|
-
* usable agents". The session re-enters the fresh-start branch and gains a
|
|
589
|
-
* **new** lead agent, which the stored conversation is injected into. That
|
|
590
|
-
* is what fresh-with-history means once the old agent is owned elsewhere: a
|
|
591
|
-
* fresh *agent*, not a second connector bolted onto one this runtime does
|
|
592
|
-
* not own.
|
|
593
|
-
* - **`'all'`** — deliver to the usable ones; a broadcast with no recipient
|
|
594
|
-
* is not a delivery and fails.
|
|
595
|
-
* - **an explicit array** — deliver to the usable ones; a caller that named
|
|
596
|
-
* its agents gets a failure rather than a substitute, because substituting
|
|
597
|
-
* would answer a question nobody asked.
|
|
598
|
-
* @param context - The send's identity, target spec and start inputs.
|
|
599
|
-
* @param targetAgents - Targets as this send materialised them.
|
|
600
|
-
* @param deferredAgentIds - Agents held by a generation this runtime does not own.
|
|
601
|
-
* @returns The surviving targets, and what a replacement start left for the caller to finish.
|
|
602
|
-
* @throws A {@link SessionStartError} when every target deferred and no fresh start applies.
|
|
603
|
-
*/
|
|
604
|
-
private retargetAfterDeferral;
|
|
605
536
|
/**
|
|
606
537
|
* Start the session's lead agent, reserved and in the order §7.1 prescribes.
|
|
607
538
|
*
|
|
@@ -618,6 +549,7 @@ declare class SessionOrchestrator implements ISessionOrchestrator {
|
|
|
618
549
|
* @param agentSelection - Public agent selection from the request.
|
|
619
550
|
* @param message - User message, used as canonical-model prompt context.
|
|
620
551
|
* @param sessionContext - Session context passed through to the adapter.
|
|
552
|
+
* @param leadTransition - Whether this start creates or replaces the durable lead.
|
|
621
553
|
* @returns What the adopted agents need, empty unless a race was lost.
|
|
622
554
|
*/
|
|
623
555
|
private startLeadAgent;
|
|
@@ -659,12 +591,10 @@ declare class AdapterRegistry {
|
|
|
659
591
|
* adapters that restart emit a fresh initialized event and the registry should
|
|
660
592
|
* reflect the latest instance.
|
|
661
593
|
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
665
|
-
*
|
|
666
|
-
* machine is never served from it — answering one would be a guess about the
|
|
667
|
-
* very identity the caller was careful enough to name.
|
|
594
|
+
* Every initialization announcement carries the machine that hosts the exact
|
|
595
|
+
* adapter ID, so event fallback may serve only that same scope. The unscoped
|
|
596
|
+
* entry remains for legacy observers that intentionally make no ownership
|
|
597
|
+
* assertion.
|
|
668
598
|
* @param bus - The event bus to listen on
|
|
669
599
|
*/
|
|
670
600
|
constructor(bus: IMakaioBus);
|
|
@@ -780,6 +710,10 @@ declare function resolveTargetAgents(session: IMakaioSession, targetSpec: string
|
|
|
780
710
|
declare function findTurnByAgent(activeTurns: Map<string, Turn$1>, agentId: string): Turn$1 | undefined;
|
|
781
711
|
//#endregion
|
|
782
712
|
//#region services/core/src/session/utils/start-reservation.d.ts
|
|
713
|
+
/** Adapter identity sufficient to route every reservation to one authority. */
|
|
714
|
+
type ReservationAdapterInstance = OwnedAdapterInstance & {
|
|
715
|
+
readonly ownerInstanceId: string;
|
|
716
|
+
};
|
|
783
717
|
/** What every start reservation names, whatever role it takes. */
|
|
784
718
|
interface StartReservationIdentity {
|
|
785
719
|
/** Session the agent belongs to; verified against the agent row by the authority. */
|
|
@@ -789,9 +723,11 @@ interface StartReservationIdentity {
|
|
|
789
723
|
/** Adapter type name carried onto any claim for diagnostics. */
|
|
790
724
|
readonly adapterName: string;
|
|
791
725
|
/** Instance the dispatch addresses, and the machine its ownership acts are filed under. */
|
|
792
|
-
readonly instance:
|
|
726
|
+
readonly instance: ReservationAdapterInstance;
|
|
793
727
|
/** Provider session to reserve, or `null` for a start with no key yet. */
|
|
794
728
|
readonly resumeProviderSessionId: string | null;
|
|
729
|
+
/** Caller-minted identity for the reservation generation. */
|
|
730
|
+
readonly claimToken: string;
|
|
795
731
|
}
|
|
796
732
|
/**
|
|
797
733
|
* The designation half, as a union rather than an optional field.
|
|
@@ -810,7 +746,10 @@ type StartReservationDesignation = {
|
|
|
810
746
|
/** This start leaves the designation untouched. */readonly role: Exclude<AgentRole, 'lead'>;
|
|
811
747
|
};
|
|
812
748
|
/** Everything a start reservation names beyond the instance it runs against. */
|
|
813
|
-
type StartReservationRequest = StartReservationIdentity & StartReservationDesignation
|
|
749
|
+
type StartReservationRequest = StartReservationIdentity & StartReservationDesignation & {
|
|
750
|
+
/** Atomic snapshot for a member recovery; absent for ordinary starts. */readonly recoveryGuard?: SessionOwnershipRecoveryGuard; /** Opaque fence for this guarded recovery attempt. */
|
|
751
|
+
readonly recoveryAttemptId?: string;
|
|
752
|
+
};
|
|
814
753
|
/**
|
|
815
754
|
* Take one start reservation.
|
|
816
755
|
*
|
|
@@ -973,9 +912,8 @@ interface RecoveryConfig {
|
|
|
973
912
|
* while the authority files the acts under its default, which is the mixed key
|
|
974
913
|
* the aggregate exists to prevent.
|
|
975
914
|
*
|
|
976
|
-
* Omitted
|
|
977
|
-
*
|
|
978
|
-
* that reason.
|
|
915
|
+
* Omitted when the caller cannot target a real machine. Such a recovery is
|
|
916
|
+
* deferred before it can dispatch a connector.
|
|
979
917
|
*/
|
|
980
918
|
machineId?: string;
|
|
981
919
|
}
|
|
@@ -1051,11 +989,12 @@ interface VerifiedAgents {
|
|
|
1051
989
|
* The caller's `recoveryConfig.plan` applies to every agent recovered in this
|
|
1052
990
|
* batch and must be the same plan the caller feeds to its history assembly.
|
|
1053
991
|
*
|
|
1054
|
-
* The **adapter instance is resolved per agent**, inside the
|
|
1055
|
-
* for the batch: a batch may span adapters, and a
|
|
1056
|
-
* stale across a runtime restart or failover.
|
|
1057
|
-
* each rehydrate addressed to the live
|
|
1058
|
-
*
|
|
992
|
+
* The **adapter instance is resolved per agent**, inside the exclusive recovery
|
|
993
|
+
* attempt, and not once for the batch: a batch may span adapters, and a
|
|
994
|
+
* persisted `adapterId` goes stale across a runtime restart or failover.
|
|
995
|
+
* Resolving per agent is what keeps each rehydrate addressed to the live
|
|
996
|
+
* instance that actually owns that agent's adapter, and keeps a single
|
|
997
|
+
* unresolvable adapter from deciding the batch.
|
|
1059
998
|
* @param bus - Bus instance
|
|
1060
999
|
* @param agents - Agents to verify
|
|
1061
1000
|
* @param recoveryConfig - Configuration for recovering dead agents, including the shared recovery plan
|
|
@@ -1092,15 +1031,11 @@ type AgentRecoveryOutcome = /** A connector is live again; the agent carries the
|
|
|
1092
1031
|
* Context delivery happens via the normal sendMessage path that follows
|
|
1093
1032
|
* recovery (same handler invocation). No staging needed.
|
|
1094
1033
|
*
|
|
1095
|
-
*
|
|
1096
|
-
*
|
|
1097
|
-
*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
* different namespaces whenever the persisted ID went stale; taking the machine
|
|
1101
|
-
* as a *second*, independent input would let a caller supply two halves that
|
|
1102
|
-
* were never one key. The resolver hands out both together or neither, and this
|
|
1103
|
-
* signature only accepts it that way.
|
|
1034
|
+
* Every invocation that wins the exclusive seam reads the canonical recovery
|
|
1035
|
+
* snapshot and resolves its live adapter instance itself. A join can leave a
|
|
1036
|
+
* different status, binding, or holder generation behind, so carrying any of
|
|
1037
|
+
* those planning facts into a self-reentry would make its guarded reservation
|
|
1038
|
+
* describe the attempt it joined rather than the row it is about to claim.
|
|
1104
1039
|
*
|
|
1105
1040
|
* The reserved rehydrate runs inside the in-flight-start seam, so a concurrent
|
|
1106
1041
|
* consumer that finds this agent mid-recovery joins the attempt instead of
|
|
@@ -1111,12 +1046,10 @@ type AgentRecoveryOutcome = /** A connector is live again; the agent carries the
|
|
|
1111
1046
|
* @param deadAgent - The dead agent to recover; its `adapterId` is re-stamped to the instance the
|
|
1112
1047
|
* attempt actually used
|
|
1113
1048
|
* @param recoveryConfig - Configuration for the recovered connector
|
|
1114
|
-
* @param instance - Live instance to rehydrate into and the machine its ownership acts name, resolved
|
|
1115
|
-
* by the caller for THIS agent
|
|
1116
1049
|
* @returns The recovered agent, or the statement that this runtime may not drive it
|
|
1117
1050
|
* @throws Whatever {@link failedRehydrateError} raises when the recovery failed rather than deferred
|
|
1118
1051
|
*/
|
|
1119
|
-
declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, recoveryConfig: RecoveryConfig
|
|
1052
|
+
declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, recoveryConfig: RecoveryConfig): Promise<AgentRecoveryOutcome>;
|
|
1120
1053
|
//#endregion
|
|
1121
1054
|
//#region services/core/src/session/utils/turn-initiator.d.ts
|
|
1122
1055
|
/**
|
|
@@ -1131,6 +1064,72 @@ declare function recoverAgent(bus: IMakaioBus, deadAgent: MakaioSessionAgent, re
|
|
|
1131
1064
|
*/
|
|
1132
1065
|
declare function buildTurnInitiator(source: 'extension' | 'user' | 'system' | undefined, extensionId: string | undefined): TurnInitiator;
|
|
1133
1066
|
//#endregion
|
|
1067
|
+
//#region services/core/src/session/handlers/lead-start-request.d.ts
|
|
1068
|
+
/** Fully-owned payload supplied to a host-specific lead-start dispatcher. */
|
|
1069
|
+
type LeadStartDispatchRequest = StartAgentRequest & {
|
|
1070
|
+
/** Framework-minted identity of this exact attempt. */readonly agentId: string; /** Runtime incarnation selected by the ownership reservation. */
|
|
1071
|
+
readonly ownerInstanceId: string;
|
|
1072
|
+
};
|
|
1073
|
+
/**
|
|
1074
|
+
* Host-specific transport policy for one already-reserved lead start.
|
|
1075
|
+
*
|
|
1076
|
+
* The callback may choose how the request reaches the selected adapter, but it
|
|
1077
|
+
* does not own identity, persistence, reservation, settlement, or cleanup.
|
|
1078
|
+
*/
|
|
1079
|
+
type LeadStartDispatch = (request: LeadStartDispatchRequest) => Promise<StartAgentResponse>;
|
|
1080
|
+
/** Whether this start creates the first lead or replaces an existing one. */
|
|
1081
|
+
type LeadTransition = {
|
|
1082
|
+
readonly kind: 'fresh';
|
|
1083
|
+
} | {
|
|
1084
|
+
readonly kind: 'replace';
|
|
1085
|
+
};
|
|
1086
|
+
/** Everything a lead transition needs beyond the payload it dispatches. */
|
|
1087
|
+
interface LeadStartRequest {
|
|
1088
|
+
/** Session the agent is started into. */
|
|
1089
|
+
readonly sessionId: string;
|
|
1090
|
+
/** Machine-scoped adapter runtime selected for dispatch and ownership. */
|
|
1091
|
+
readonly instance: MachineScopedAdapterInstance;
|
|
1092
|
+
/** Adapter type name, carried onto the agent row and any claim. */
|
|
1093
|
+
readonly adapterName: string;
|
|
1094
|
+
/** Provider config to stamp on the agent's runtime row once the start lands. */
|
|
1095
|
+
readonly providerConfigId?: string;
|
|
1096
|
+
/** Persona identity persisted before the adapter can create a connector. */
|
|
1097
|
+
readonly personaId?: string;
|
|
1098
|
+
/** Profile identity persisted before the adapter can create a connector. */
|
|
1099
|
+
readonly profileId?: string;
|
|
1100
|
+
/** Explicit lifecycle transition; never inferred from designation identity. */
|
|
1101
|
+
readonly leadTransition: LeadTransition;
|
|
1102
|
+
/** Lead designation the caller observed before entering the reservation. */
|
|
1103
|
+
readonly expectedLeadAgentId: string | null;
|
|
1104
|
+
/** Adapter payload, complete except for the attempt identity minted by this service. */
|
|
1105
|
+
readonly startRequest: StartAgentRequest;
|
|
1106
|
+
/** Optional host transport policy; the bus request remains the default. */
|
|
1107
|
+
readonly dispatch?: LeadStartDispatch;
|
|
1108
|
+
}
|
|
1109
|
+
/** How a lead transition ended, for the caller that has a send to continue. */
|
|
1110
|
+
type LeadStartResult = {
|
|
1111
|
+
/** The agent is live, owns its provider session and is `idle` in storage. */outcome: 'started'; /** The agent row as it now stands, for the caller's in-memory session. */
|
|
1112
|
+
agent: MakaioSessionAgent;
|
|
1113
|
+
} | {
|
|
1114
|
+
/** Another start won the designation race and this attempt left nothing behind. */outcome: 'lead-conflict'; /** Lead the session actually names, or `null` when it has none. */
|
|
1115
|
+
currentLeadAgentId: string | null;
|
|
1116
|
+
};
|
|
1117
|
+
//#endregion
|
|
1118
|
+
//#region services/core/src/session/handlers/lead-start.d.ts
|
|
1119
|
+
/**
|
|
1120
|
+
* Start or replace a session lead under the ownership reservation.
|
|
1121
|
+
*
|
|
1122
|
+
* The whole attempt runs inside the in-flight-start seam, registered *before*
|
|
1123
|
+
* the agent row is written. There is therefore no instant at which a `starting`
|
|
1124
|
+
* row is visible without an entry a concurrent consumer can join, which is what
|
|
1125
|
+
* lets that consumer wait for this attempt instead of opening a second
|
|
1126
|
+
* lifecycle for the same identity.
|
|
1127
|
+
* @param bus - Bus every step is issued on.
|
|
1128
|
+
* @param request - The start to run.
|
|
1129
|
+
* @returns The started agent, or the designation race this start lost.
|
|
1130
|
+
*/
|
|
1131
|
+
declare function startLeadAgent(bus: IMakaioBus, request: LeadStartRequest): Promise<LeadStartResult>;
|
|
1132
|
+
//#endregion
|
|
1134
1133
|
//#region services/core/src/session/session-orchestrator-selection.d.ts
|
|
1135
1134
|
/** What resolving a fresh start's instance needs beyond the selection itself. */
|
|
1136
1135
|
interface SelectionInstanceContext {
|
|
@@ -1173,8 +1172,8 @@ interface SelectionInstanceContext {
|
|
|
1173
1172
|
* @param selection - Direct adapter selection this start runs from.
|
|
1174
1173
|
* @param context - Adapter name, session identity, this runtime's machine and its instance registry.
|
|
1175
1174
|
* @returns The instance and the machine, as one key.
|
|
1176
|
-
* @throws A {@link SessionStartError} when
|
|
1177
|
-
*
|
|
1175
|
+
* @throws A {@link SessionStartError} when an identity is incomplete or its
|
|
1176
|
+
* complete explicit triple has no matching live announcement.
|
|
1178
1177
|
*/
|
|
1179
1178
|
declare function resolveSelectionOwnedInstance(bus: IMakaioBus, selection: AdapterSelection, context: SelectionInstanceContext): Promise<MachineScopedAdapterInstance>;
|
|
1180
1179
|
//#endregion
|
|
@@ -1669,6 +1668,11 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1669
1668
|
adapterId: z.ZodString;
|
|
1670
1669
|
adapterName: z.ZodString;
|
|
1671
1670
|
sessionId: z.ZodString;
|
|
1671
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
1672
|
+
machineId: z.ZodString;
|
|
1673
|
+
instanceId: z.ZodString;
|
|
1674
|
+
}, z.core.$strip>>;
|
|
1675
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
1672
1676
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1673
1677
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1674
1678
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1729,6 +1733,11 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1729
1733
|
adapterId: z.ZodString;
|
|
1730
1734
|
adapterName: z.ZodString;
|
|
1731
1735
|
sessionId: z.ZodString;
|
|
1736
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
1737
|
+
machineId: z.ZodString;
|
|
1738
|
+
instanceId: z.ZodString;
|
|
1739
|
+
}, z.core.$strip>>;
|
|
1740
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
1732
1741
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1733
1742
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1734
1743
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1808,6 +1817,11 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1808
1817
|
adapterId: z.ZodString;
|
|
1809
1818
|
adapterName: z.ZodString;
|
|
1810
1819
|
sessionId: z.ZodString;
|
|
1820
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
1821
|
+
machineId: z.ZodString;
|
|
1822
|
+
instanceId: z.ZodString;
|
|
1823
|
+
}, z.core.$strip>>;
|
|
1824
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
1811
1825
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1812
1826
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1813
1827
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1862,6 +1876,11 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1862
1876
|
adapterId: z.ZodString;
|
|
1863
1877
|
adapterName: z.ZodString;
|
|
1864
1878
|
sessionId: z.ZodString;
|
|
1879
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
1880
|
+
machineId: z.ZodString;
|
|
1881
|
+
instanceId: z.ZodString;
|
|
1882
|
+
}, z.core.$strip>>;
|
|
1883
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
1865
1884
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1866
1885
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1867
1886
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1967,6 +1986,10 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
1967
1986
|
request: z.ZodObject<{
|
|
1968
1987
|
agentId: z.ZodString;
|
|
1969
1988
|
adapterId: z.ZodOptional<z.ZodString>;
|
|
1989
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
1990
|
+
machineId: z.ZodString;
|
|
1991
|
+
instanceId: z.ZodString;
|
|
1992
|
+
}, z.core.$strip>>;
|
|
1970
1993
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
1971
1994
|
cwd: z.ZodOptional<z.ZodString>;
|
|
1972
1995
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -2059,6 +2082,63 @@ declare const AgentStorageNamespace: _$_makaio_storage_core0.StorageNamespaceDef
|
|
|
2059
2082
|
}, {}, {
|
|
2060
2083
|
length: number | undefined;
|
|
2061
2084
|
}>;
|
|
2085
|
+
ownerMachineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2086
|
+
name: "owner_machine_id";
|
|
2087
|
+
tableName: "agents";
|
|
2088
|
+
dataType: "string";
|
|
2089
|
+
columnType: "SQLiteText";
|
|
2090
|
+
data: string;
|
|
2091
|
+
driverParam: string;
|
|
2092
|
+
notNull: false;
|
|
2093
|
+
hasDefault: false;
|
|
2094
|
+
isPrimaryKey: false;
|
|
2095
|
+
isAutoincrement: false;
|
|
2096
|
+
hasRuntimeDefault: false;
|
|
2097
|
+
enumValues: [string, ...string[]];
|
|
2098
|
+
baseColumn: never;
|
|
2099
|
+
identity: undefined;
|
|
2100
|
+
generated: undefined;
|
|
2101
|
+
}, {}, {
|
|
2102
|
+
length: number | undefined;
|
|
2103
|
+
}>;
|
|
2104
|
+
ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2105
|
+
name: "owner_instance_id";
|
|
2106
|
+
tableName: "agents";
|
|
2107
|
+
dataType: "string";
|
|
2108
|
+
columnType: "SQLiteText";
|
|
2109
|
+
data: string;
|
|
2110
|
+
driverParam: string;
|
|
2111
|
+
notNull: false;
|
|
2112
|
+
hasDefault: false;
|
|
2113
|
+
isPrimaryKey: false;
|
|
2114
|
+
isAutoincrement: false;
|
|
2115
|
+
hasRuntimeDefault: false;
|
|
2116
|
+
enumValues: [string, ...string[]];
|
|
2117
|
+
baseColumn: never;
|
|
2118
|
+
identity: undefined;
|
|
2119
|
+
generated: undefined;
|
|
2120
|
+
}, {}, {
|
|
2121
|
+
length: number | undefined;
|
|
2122
|
+
}>;
|
|
2123
|
+
recoveryAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2124
|
+
name: "recovery_attempt_id";
|
|
2125
|
+
tableName: "agents";
|
|
2126
|
+
dataType: "string";
|
|
2127
|
+
columnType: "SQLiteText";
|
|
2128
|
+
data: string;
|
|
2129
|
+
driverParam: string;
|
|
2130
|
+
notNull: false;
|
|
2131
|
+
hasDefault: false;
|
|
2132
|
+
isPrimaryKey: false;
|
|
2133
|
+
isAutoincrement: false;
|
|
2134
|
+
hasRuntimeDefault: false;
|
|
2135
|
+
enumValues: [string, ...string[]];
|
|
2136
|
+
baseColumn: never;
|
|
2137
|
+
identity: undefined;
|
|
2138
|
+
generated: undefined;
|
|
2139
|
+
}, {}, {
|
|
2140
|
+
length: number | undefined;
|
|
2141
|
+
}>;
|
|
2062
2142
|
adapterSessionId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
2063
2143
|
name: "adapter_session_id";
|
|
2064
2144
|
tableName: "agents";
|
|
@@ -2418,6 +2498,11 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
2418
2498
|
adapterId: z.ZodString;
|
|
2419
2499
|
adapterName: z.ZodString;
|
|
2420
2500
|
sessionId: z.ZodString;
|
|
2501
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
2502
|
+
machineId: z.ZodString;
|
|
2503
|
+
instanceId: z.ZodString;
|
|
2504
|
+
}, z.core.$strip>>;
|
|
2505
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
2421
2506
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2422
2507
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2423
2508
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2478,6 +2563,11 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
2478
2563
|
adapterId: z.ZodString;
|
|
2479
2564
|
adapterName: z.ZodString;
|
|
2480
2565
|
sessionId: z.ZodString;
|
|
2566
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
2567
|
+
machineId: z.ZodString;
|
|
2568
|
+
instanceId: z.ZodString;
|
|
2569
|
+
}, z.core.$strip>>;
|
|
2570
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
2481
2571
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2482
2572
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2483
2573
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2557,6 +2647,11 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
2557
2647
|
adapterId: z.ZodString;
|
|
2558
2648
|
adapterName: z.ZodString;
|
|
2559
2649
|
sessionId: z.ZodString;
|
|
2650
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
2651
|
+
machineId: z.ZodString;
|
|
2652
|
+
instanceId: z.ZodString;
|
|
2653
|
+
}, z.core.$strip>>;
|
|
2654
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
2560
2655
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2561
2656
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2562
2657
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2611,6 +2706,11 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
2611
2706
|
adapterId: z.ZodString;
|
|
2612
2707
|
adapterName: z.ZodString;
|
|
2613
2708
|
sessionId: z.ZodString;
|
|
2709
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
2710
|
+
machineId: z.ZodString;
|
|
2711
|
+
instanceId: z.ZodString;
|
|
2712
|
+
}, z.core.$strip>>;
|
|
2713
|
+
recoveryAttemptId: z.ZodOptional<z.ZodString>;
|
|
2614
2714
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2615
2715
|
currentAdapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2616
2716
|
currentAdapterSessionIdState: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2716,6 +2816,10 @@ declare const AgentStorageSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.
|
|
|
2716
2816
|
request: z.ZodObject<{
|
|
2717
2817
|
agentId: z.ZodString;
|
|
2718
2818
|
adapterId: z.ZodOptional<z.ZodString>;
|
|
2819
|
+
runtimeOwner: z.ZodOptional<z.ZodObject<{
|
|
2820
|
+
machineId: z.ZodString;
|
|
2821
|
+
instanceId: z.ZodString;
|
|
2822
|
+
}, z.core.$strip>>;
|
|
2719
2823
|
adapterSessionId: z.ZodOptional<z.ZodString>;
|
|
2720
2824
|
cwd: z.ZodOptional<z.ZodString>;
|
|
2721
2825
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -2745,6 +2849,8 @@ interface SessionStorageMemoryState {
|
|
|
2745
2849
|
readonly agents: Map<string, MakaioSessionAgent>;
|
|
2746
2850
|
/** Claim rows keyed by `claimId`. */
|
|
2747
2851
|
readonly claims: Map<string, AdapterSessionClaimRecord>;
|
|
2852
|
+
/** Runtime-instance rows keyed by the process/machine pair. */
|
|
2853
|
+
readonly runtimeInstances: Map<string, RuntimeInstanceRecord>;
|
|
2748
2854
|
}
|
|
2749
2855
|
/**
|
|
2750
2856
|
* Allocate a fresh, empty in-memory state instance.
|
|
@@ -3592,6 +3698,63 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
3592
3698
|
}, {}, {
|
|
3593
3699
|
length: number | undefined;
|
|
3594
3700
|
}>;
|
|
3701
|
+
ownerMachineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3702
|
+
name: "owner_machine_id";
|
|
3703
|
+
tableName: "agents";
|
|
3704
|
+
dataType: "string";
|
|
3705
|
+
columnType: "SQLiteText";
|
|
3706
|
+
data: string;
|
|
3707
|
+
driverParam: string;
|
|
3708
|
+
notNull: false;
|
|
3709
|
+
hasDefault: false;
|
|
3710
|
+
isPrimaryKey: false;
|
|
3711
|
+
isAutoincrement: false;
|
|
3712
|
+
hasRuntimeDefault: false;
|
|
3713
|
+
enumValues: [string, ...string[]];
|
|
3714
|
+
baseColumn: never;
|
|
3715
|
+
identity: undefined;
|
|
3716
|
+
generated: undefined;
|
|
3717
|
+
}, {}, {
|
|
3718
|
+
length: number | undefined;
|
|
3719
|
+
}>;
|
|
3720
|
+
ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3721
|
+
name: "owner_instance_id";
|
|
3722
|
+
tableName: "agents";
|
|
3723
|
+
dataType: "string";
|
|
3724
|
+
columnType: "SQLiteText";
|
|
3725
|
+
data: string;
|
|
3726
|
+
driverParam: string;
|
|
3727
|
+
notNull: false;
|
|
3728
|
+
hasDefault: false;
|
|
3729
|
+
isPrimaryKey: false;
|
|
3730
|
+
isAutoincrement: false;
|
|
3731
|
+
hasRuntimeDefault: false;
|
|
3732
|
+
enumValues: [string, ...string[]];
|
|
3733
|
+
baseColumn: never;
|
|
3734
|
+
identity: undefined;
|
|
3735
|
+
generated: undefined;
|
|
3736
|
+
}, {}, {
|
|
3737
|
+
length: number | undefined;
|
|
3738
|
+
}>;
|
|
3739
|
+
recoveryAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3740
|
+
name: "recovery_attempt_id";
|
|
3741
|
+
tableName: "agents";
|
|
3742
|
+
dataType: "string";
|
|
3743
|
+
columnType: "SQLiteText";
|
|
3744
|
+
data: string;
|
|
3745
|
+
driverParam: string;
|
|
3746
|
+
notNull: false;
|
|
3747
|
+
hasDefault: false;
|
|
3748
|
+
isPrimaryKey: false;
|
|
3749
|
+
isAutoincrement: false;
|
|
3750
|
+
hasRuntimeDefault: false;
|
|
3751
|
+
enumValues: [string, ...string[]];
|
|
3752
|
+
baseColumn: never;
|
|
3753
|
+
identity: undefined;
|
|
3754
|
+
generated: undefined;
|
|
3755
|
+
}, {}, {
|
|
3756
|
+
length: number | undefined;
|
|
3757
|
+
}>;
|
|
3595
3758
|
adapterSessionId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
3596
3759
|
name: "adapter_session_id";
|
|
3597
3760
|
tableName: "agents";
|
|
@@ -3929,6 +4092,145 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
3929
4092
|
};
|
|
3930
4093
|
dialect: "sqlite";
|
|
3931
4094
|
}>;
|
|
4095
|
+
runtimeInstanceIncarnationCounters: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
4096
|
+
name: "runtime_instance_incarnation_counters";
|
|
4097
|
+
schema: undefined;
|
|
4098
|
+
columns: {
|
|
4099
|
+
machineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4100
|
+
name: "machine_id";
|
|
4101
|
+
tableName: "runtime_instance_incarnation_counters";
|
|
4102
|
+
dataType: "string";
|
|
4103
|
+
columnType: "SQLiteText";
|
|
4104
|
+
data: string;
|
|
4105
|
+
driverParam: string;
|
|
4106
|
+
notNull: true;
|
|
4107
|
+
hasDefault: false;
|
|
4108
|
+
isPrimaryKey: true;
|
|
4109
|
+
isAutoincrement: false;
|
|
4110
|
+
hasRuntimeDefault: false;
|
|
4111
|
+
enumValues: [string, ...string[]];
|
|
4112
|
+
baseColumn: never;
|
|
4113
|
+
identity: undefined;
|
|
4114
|
+
generated: undefined;
|
|
4115
|
+
}, {}, {
|
|
4116
|
+
length: number | undefined;
|
|
4117
|
+
}>;
|
|
4118
|
+
lastAllocatedIncarnation: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4119
|
+
name: string;
|
|
4120
|
+
tableName: "runtime_instance_incarnation_counters";
|
|
4121
|
+
dataType: "number";
|
|
4122
|
+
columnType: "SQLiteInteger";
|
|
4123
|
+
data: number;
|
|
4124
|
+
driverParam: number;
|
|
4125
|
+
notNull: true;
|
|
4126
|
+
hasDefault: false;
|
|
4127
|
+
isPrimaryKey: false;
|
|
4128
|
+
isAutoincrement: false;
|
|
4129
|
+
hasRuntimeDefault: false;
|
|
4130
|
+
enumValues: undefined;
|
|
4131
|
+
baseColumn: never;
|
|
4132
|
+
identity: undefined;
|
|
4133
|
+
generated: undefined;
|
|
4134
|
+
}, {}, {}>;
|
|
4135
|
+
};
|
|
4136
|
+
dialect: "sqlite";
|
|
4137
|
+
}>;
|
|
4138
|
+
runtimeInstances: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
4139
|
+
name: "runtime_instances";
|
|
4140
|
+
schema: undefined;
|
|
4141
|
+
columns: {
|
|
4142
|
+
instanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4143
|
+
name: "instance_id";
|
|
4144
|
+
tableName: "runtime_instances";
|
|
4145
|
+
dataType: "string";
|
|
4146
|
+
columnType: "SQLiteText";
|
|
4147
|
+
data: string;
|
|
4148
|
+
driverParam: string;
|
|
4149
|
+
notNull: true;
|
|
4150
|
+
hasDefault: false;
|
|
4151
|
+
isPrimaryKey: false;
|
|
4152
|
+
isAutoincrement: false;
|
|
4153
|
+
hasRuntimeDefault: false;
|
|
4154
|
+
enumValues: [string, ...string[]];
|
|
4155
|
+
baseColumn: never;
|
|
4156
|
+
identity: undefined;
|
|
4157
|
+
generated: undefined;
|
|
4158
|
+
}, {}, {
|
|
4159
|
+
length: number | undefined;
|
|
4160
|
+
}>;
|
|
4161
|
+
machineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4162
|
+
name: "machine_id";
|
|
4163
|
+
tableName: "runtime_instances";
|
|
4164
|
+
dataType: "string";
|
|
4165
|
+
columnType: "SQLiteText";
|
|
4166
|
+
data: string;
|
|
4167
|
+
driverParam: string;
|
|
4168
|
+
notNull: true;
|
|
4169
|
+
hasDefault: false;
|
|
4170
|
+
isPrimaryKey: false;
|
|
4171
|
+
isAutoincrement: false;
|
|
4172
|
+
hasRuntimeDefault: false;
|
|
4173
|
+
enumValues: [string, ...string[]];
|
|
4174
|
+
baseColumn: never;
|
|
4175
|
+
identity: undefined;
|
|
4176
|
+
generated: undefined;
|
|
4177
|
+
}, {}, {
|
|
4178
|
+
length: number | undefined;
|
|
4179
|
+
}>;
|
|
4180
|
+
incarnation: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4181
|
+
name: string;
|
|
4182
|
+
tableName: "runtime_instances";
|
|
4183
|
+
dataType: "number";
|
|
4184
|
+
columnType: "SQLiteInteger";
|
|
4185
|
+
data: number;
|
|
4186
|
+
driverParam: number;
|
|
4187
|
+
notNull: true;
|
|
4188
|
+
hasDefault: false;
|
|
4189
|
+
isPrimaryKey: false;
|
|
4190
|
+
isAutoincrement: false;
|
|
4191
|
+
hasRuntimeDefault: false;
|
|
4192
|
+
enumValues: undefined;
|
|
4193
|
+
baseColumn: never;
|
|
4194
|
+
identity: undefined;
|
|
4195
|
+
generated: undefined;
|
|
4196
|
+
}, {}, {}>;
|
|
4197
|
+
startedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4198
|
+
name: string;
|
|
4199
|
+
tableName: "runtime_instances";
|
|
4200
|
+
dataType: "number";
|
|
4201
|
+
columnType: "SQLiteInteger";
|
|
4202
|
+
data: number;
|
|
4203
|
+
driverParam: number;
|
|
4204
|
+
notNull: true;
|
|
4205
|
+
hasDefault: false;
|
|
4206
|
+
isPrimaryKey: false;
|
|
4207
|
+
isAutoincrement: false;
|
|
4208
|
+
hasRuntimeDefault: false;
|
|
4209
|
+
enumValues: undefined;
|
|
4210
|
+
baseColumn: never;
|
|
4211
|
+
identity: undefined;
|
|
4212
|
+
generated: undefined;
|
|
4213
|
+
}, {}, {}>;
|
|
4214
|
+
retiredAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4215
|
+
name: string;
|
|
4216
|
+
tableName: "runtime_instances";
|
|
4217
|
+
dataType: "number";
|
|
4218
|
+
columnType: "SQLiteInteger";
|
|
4219
|
+
data: number;
|
|
4220
|
+
driverParam: number;
|
|
4221
|
+
notNull: false;
|
|
4222
|
+
hasDefault: false;
|
|
4223
|
+
isPrimaryKey: false;
|
|
4224
|
+
isAutoincrement: false;
|
|
4225
|
+
hasRuntimeDefault: false;
|
|
4226
|
+
enumValues: undefined;
|
|
4227
|
+
baseColumn: never;
|
|
4228
|
+
identity: undefined;
|
|
4229
|
+
generated: undefined;
|
|
4230
|
+
}, {}, {}>;
|
|
4231
|
+
};
|
|
4232
|
+
dialect: "sqlite";
|
|
4233
|
+
}>;
|
|
3932
4234
|
adapterSessionClaims: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
3933
4235
|
name: "adapter_session_claims";
|
|
3934
4236
|
schema: undefined;
|
|
@@ -4066,6 +4368,25 @@ declare const sessionStorageSchema: _$_makaio_storage_drizzle0.DialectSchema<{
|
|
|
4066
4368
|
}, {}, {
|
|
4067
4369
|
length: number | undefined;
|
|
4068
4370
|
}>;
|
|
4371
|
+
ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4372
|
+
name: "owner_instance_id";
|
|
4373
|
+
tableName: "adapter_session_claims";
|
|
4374
|
+
dataType: "string";
|
|
4375
|
+
columnType: "SQLiteText";
|
|
4376
|
+
data: string;
|
|
4377
|
+
driverParam: string;
|
|
4378
|
+
notNull: false;
|
|
4379
|
+
hasDefault: false;
|
|
4380
|
+
isPrimaryKey: false;
|
|
4381
|
+
isAutoincrement: false;
|
|
4382
|
+
hasRuntimeDefault: false;
|
|
4383
|
+
enumValues: [string, ...string[]];
|
|
4384
|
+
baseColumn: never;
|
|
4385
|
+
identity: undefined;
|
|
4386
|
+
generated: undefined;
|
|
4387
|
+
}, {}, {
|
|
4388
|
+
length: number | undefined;
|
|
4389
|
+
}>;
|
|
4069
4390
|
claimToken: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
4070
4391
|
name: "claim_token";
|
|
4071
4392
|
tableName: "adapter_session_claims";
|
|
@@ -4221,6 +4542,28 @@ declare function registerMemorySessionOwnershipStorage(bus: IMakaioBus, state?:
|
|
|
4221
4542
|
*/
|
|
4222
4543
|
declare function registerDrizzleSessionOwnershipStorage(bus: IMakaioBus, db: MakaioDatabase): () => void;
|
|
4223
4544
|
//#endregion
|
|
4545
|
+
//#region services/core/src/session/storage/ownership-drizzle-claim-keys.d.ts
|
|
4546
|
+
/** Versioned namespace for ownership-key lock identities. */
|
|
4547
|
+
declare const SESSION_OWNERSHIP_CLAIM_LOCK_NAMESPACE = "makaio:session-ownership:claim:v1";
|
|
4548
|
+
/** Claim-key fields that identify one provider-session ownership row. */
|
|
4549
|
+
interface OwnershipClaimKey {
|
|
4550
|
+
/** Runtime machine owning the provider session store. */
|
|
4551
|
+
readonly machineId: string;
|
|
4552
|
+
/** Adapter runtime owning the provider session. */
|
|
4553
|
+
readonly adapterId: string;
|
|
4554
|
+
/** Provider-native session identifier. */
|
|
4555
|
+
readonly providerSessionId: string;
|
|
4556
|
+
}
|
|
4557
|
+
/**
|
|
4558
|
+
* Build the stable transaction lock for one ownership key.
|
|
4559
|
+
*
|
|
4560
|
+
* JSON arrays preserve field boundaries while keeping the identity independent
|
|
4561
|
+
* of the storage row that currently represents this key.
|
|
4562
|
+
* @param key - Provider-session ownership key.
|
|
4563
|
+
* @returns Stable transaction lock used before claim-row mutation.
|
|
4564
|
+
*/
|
|
4565
|
+
declare function ownershipClaimTransactionLock(key: OwnershipClaimKey): TransactionLock;
|
|
4566
|
+
//#endregion
|
|
4224
4567
|
//#region services/core/src/session/storage/fts-search-handler.d.ts
|
|
4225
4568
|
/**
|
|
4226
4569
|
* Registers FTS-backed `storage:session.search` handler.
|
|
@@ -6253,8 +6596,8 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
|
|
|
6253
6596
|
agentId: z.ZodString;
|
|
6254
6597
|
status: z.ZodEnum<{
|
|
6255
6598
|
completed: "completed";
|
|
6256
|
-
sent: "sent";
|
|
6257
6599
|
acknowledged: "acknowledged";
|
|
6600
|
+
sent: "sent";
|
|
6258
6601
|
}>;
|
|
6259
6602
|
timestamp: z.ZodNumber;
|
|
6260
6603
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -6279,8 +6622,8 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
|
|
|
6279
6622
|
agentId: z.ZodString;
|
|
6280
6623
|
status: z.ZodEnum<{
|
|
6281
6624
|
completed: "completed";
|
|
6282
|
-
sent: "sent";
|
|
6283
6625
|
acknowledged: "acknowledged";
|
|
6626
|
+
sent: "sent";
|
|
6284
6627
|
}>;
|
|
6285
6628
|
timestamp: z.ZodNumber;
|
|
6286
6629
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -6367,7 +6710,7 @@ declare const MessageRoutingNamespace: _$_makaio_storage_core0.StorageNamespaceD
|
|
|
6367
6710
|
tableName: "message_routing";
|
|
6368
6711
|
dataType: "string";
|
|
6369
6712
|
columnType: "SQLiteText";
|
|
6370
|
-
data: "completed" | "
|
|
6713
|
+
data: "completed" | "acknowledged" | "sent";
|
|
6371
6714
|
driverParam: string;
|
|
6372
6715
|
notNull: true;
|
|
6373
6716
|
hasDefault: false;
|
|
@@ -6438,8 +6781,8 @@ declare const MessageRoutingSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
|
|
|
6438
6781
|
agentId: z.ZodString;
|
|
6439
6782
|
status: z.ZodEnum<{
|
|
6440
6783
|
completed: "completed";
|
|
6441
|
-
sent: "sent";
|
|
6442
6784
|
acknowledged: "acknowledged";
|
|
6785
|
+
sent: "sent";
|
|
6443
6786
|
}>;
|
|
6444
6787
|
timestamp: z.ZodNumber;
|
|
6445
6788
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -6464,8 +6807,8 @@ declare const MessageRoutingSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
|
|
|
6464
6807
|
agentId: z.ZodString;
|
|
6465
6808
|
status: z.ZodEnum<{
|
|
6466
6809
|
completed: "completed";
|
|
6467
|
-
sent: "sent";
|
|
6468
6810
|
acknowledged: "acknowledged";
|
|
6811
|
+
sent: "sent";
|
|
6469
6812
|
}>;
|
|
6470
6813
|
timestamp: z.ZodNumber;
|
|
6471
6814
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -6609,7 +6952,7 @@ declare const messageRouting: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<
|
|
|
6609
6952
|
tableName: "message_routing";
|
|
6610
6953
|
dataType: "string";
|
|
6611
6954
|
columnType: "SQLiteText";
|
|
6612
|
-
data: "completed" | "
|
|
6955
|
+
data: "completed" | "acknowledged" | "sent";
|
|
6613
6956
|
driverParam: string;
|
|
6614
6957
|
notNull: true;
|
|
6615
6958
|
hasDefault: false;
|
|
@@ -7069,4 +7412,4 @@ interface NativeLocalityInput {
|
|
|
7069
7412
|
*/
|
|
7070
7413
|
declare function evaluateNativeLocality(input: NativeLocalityInput): NativeLocalityVerdict;
|
|
7071
7414
|
//#endregion
|
|
7072
|
-
export { IngestCompletedTurnResult as $,
|
|
7415
|
+
export { IngestCompletedTurnResult as $, runExclusiveStart as $n, resolveAdapterNameById as $t, registerDrizzleMessageStorage as A, FreshWithHistoryRecoveryPlan as An, SESSION_OWNERSHIP_CLAIM_LOCK_NAMESPACE as At, importCursorsDual as B, resolveTargetAgents as Bn, AgentStorageNamespace as Bt, registerDrizzleMessageRoutingStorage as C, ensureAgentCwd as Cn, fetchAgentsBySession as Ct, SelectMessage as D, buildPlannedRecoveryContext as Dn, parseForkTransforms as Dt, InsertMessage as E, verifyAndRecoverAgents as En, mapRowToSession as Et, registerMemoryTurnStorage as F, recoveryPlanResumeTarget as Fn, registerMemoryAgentStorage as Ft, ObservedSessionIngestionPolicyInput as G, ISessionOrchestrator as Gn, assembleForkContext as Gt, OBSERVED_SESSION_INGESTION_POLICY_CAPABILITY_ID as H, normalizeToBlocks as Hn, SessionExtensionContextImpl as Ht, registerDrizzleTurnStorage as I, StartReservationRequest as In, registerDrizzleSessionStorage as It, ObservedSessionIngestionService as J, assessClaimOwner as Jn, CONNECTOR_SWAP_DEFAULT_PIPELINE as Jt, registerObservedSessionIngestionPolicyProvider as K, SessionOrchestrator as Kn, FallbackRuntimeOptions as Kt, EmbeddingIndexManager as L, reserveStartFor as Ln, registerMemorySessionStorage as Lt, SelectTurn as M, RecoveryPlan as Mn, registerDrizzleSessionOwnershipStorage as Mt, turns as N, planAgentRecovery as Nn, registerMemorySessionOwnershipStorage as Nt, messages as O, buildRecoveryContext as On, registerFtsSearchHandler as Ot, turnsDual as P, recoveryPlanRequiresHistory as Pn, registerDrizzleAgentStorage as Pt, IngestCompletedTurnParams as Q, peekInFlightStart as Qn, normalizeSelectionString as Qt, registerDrizzleImportCursorStorage as R, findTurnByAgent as Rn, SessionStorageMemoryState as Rt, messageRoutingDual as S, buildRecoveryContextWithPipeline as Sn, SearchSessionRow as St, MessageRoutingSubjects as T, recoverAgent as Tn, fetchPreviewBySession as Tt, ObservedSessionIngestionPolicyDecision as U, TurnContextEnricher as Un, createSessionExtensionContext as Ut, IObservedSessionIngestionPolicyProvider as V, extractTextContent as Vn, AgentStorageSubjects as Vt, ObservedSessionIngestionPolicyImportStatus as W, AdapterRegistry as Wn, SessionBridge as Wt, isTrackingStub as X, enqueueAgentSettle as Xn, SelectionRefusalContext as Xt, isPolicyDiscoveredObservedSession as Y, mintClaimToken as Yn, NamedSelectionInstance as Yt, LogImportTriggerSubjects as Z, InFlightStart as Zn, describeHalfNamedInstanceRefusal as Zt, MakaioSessionConfig as _, LeadTransition as _n, SessionPreviewMaps as _t, resolveSessionResumeIdentity as a, registerResumeHandler as an, SessionUserMessageSentPayload as at, SelectMessageRouting as b, RecoveryConfig as bn, mapToSession as bt, BuildContextOptions as c, ContextWindowTrackerConfig as cn, emitSessionUserMessageSent as ct, toSessionLineage as d, resolveSelectionOwnedInstance as dn, registerMemorySessionEventStorage as dt, registerListActionsHandler as en, registerAdapterSessionMovementObserver as er, IngestTurnMessage as et, registerSessionDiscoveredHandler as f, startLeadAgent as fn, InsertSessionEvent as ft, MakaioSession as g, LeadStartResult as gn, getSessionAncestorChain as gt, registerParentResolver as h, LeadStartRequest as hn, sessionEventsDual as ht, SessionResumeIdentity as i, registerGetStatusCountsHandler as in, MakaioSessionServiceOptions as ir, SessionTurnStartedPayload as it, InsertTurn as j, NativeResumeRecoveryPlan as jn, ownershipClaimTransactionLock as jt, registerMemoryMessageStorage as k, FRESH_WITH_HISTORY_RECOVERY_PLAN as kn, OwnershipClaimKey as kt, ContextAssemblyResult as l, SessionContextWindowState as ln, registerSessionLifecycleEventWriters as lt, registerCompressLineageResolver as m, LeadStartDispatchRequest as mn, sessionEvents as mt, NativeLocalityIntent as n, resetBuiltInActionsRegistration as nn, registerSessionOwnershipAuthority as nr, EventTransform as nt, getFullConversation as o, ContextWindowTracker as on, appendSessionLifecycleEvent as ot, registerSpawningToolCallResolver as p, LeadStartDispatch as pn, SelectSessionEvent as pt, unregisterObservedSessionIngestionPolicyProvider as q, registerCoreSessionServiceHandlers as qn, pickFallbackRuntimeOptions as qt, evaluateNativeLocality as r, actionRegistry as rn, MakaioSessionService as rr, SessionLifecycleEventArgs as rt, buildSessionContext as s, AgentContextState as sn, emitSessionTurnStarted as st, NativeLocalityInput as t, registerBuiltInActions as tn, SessionOwnershipAuthorityDeps as tr, ingestCompletedTurn as tt, kindToBranchKind as u, SelectionInstanceContext as un, registerDrizzleSessionEventStorage as ut, StartTurnOptions as v, buildTurnInitiator as vn, fetchSessionPreviewMaps as vt, MessageRoutingNamespace as w, ensureAgentModel as wn, fetchMessageCountsBySession as wt, messageRouting as x, VerifiedAgents as xn, SearchFilters as xt, InsertMessageRouting as y, AgentRecoveryOutcome as yn, mapAgentsBySession as yt, importCursors as z, getOrCreateSession as zn, createSessionStorageMemoryState as zt };
|