@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
|
@@ -783,6 +783,63 @@ declare const SessionStorageNamespace$1: {
|
|
|
783
783
|
}, {}, {
|
|
784
784
|
length: number | undefined;
|
|
785
785
|
}>;
|
|
786
|
+
ownerMachineId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
787
|
+
name: "owner_machine_id";
|
|
788
|
+
tableName: "agents";
|
|
789
|
+
dataType: "string";
|
|
790
|
+
columnType: "SQLiteText";
|
|
791
|
+
data: string;
|
|
792
|
+
driverParam: string;
|
|
793
|
+
notNull: false;
|
|
794
|
+
hasDefault: false;
|
|
795
|
+
isPrimaryKey: false;
|
|
796
|
+
isAutoincrement: false;
|
|
797
|
+
hasRuntimeDefault: false;
|
|
798
|
+
enumValues: [string, ...string[]];
|
|
799
|
+
baseColumn: never;
|
|
800
|
+
identity: undefined;
|
|
801
|
+
generated: undefined;
|
|
802
|
+
}, {}, {
|
|
803
|
+
length: number | undefined;
|
|
804
|
+
}>;
|
|
805
|
+
ownerInstanceId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
806
|
+
name: "owner_instance_id";
|
|
807
|
+
tableName: "agents";
|
|
808
|
+
dataType: "string";
|
|
809
|
+
columnType: "SQLiteText";
|
|
810
|
+
data: string;
|
|
811
|
+
driverParam: string;
|
|
812
|
+
notNull: false;
|
|
813
|
+
hasDefault: false;
|
|
814
|
+
isPrimaryKey: false;
|
|
815
|
+
isAutoincrement: false;
|
|
816
|
+
hasRuntimeDefault: false;
|
|
817
|
+
enumValues: [string, ...string[]];
|
|
818
|
+
baseColumn: never;
|
|
819
|
+
identity: undefined;
|
|
820
|
+
generated: undefined;
|
|
821
|
+
}, {}, {
|
|
822
|
+
length: number | undefined;
|
|
823
|
+
}>;
|
|
824
|
+
recoveryAttemptId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
825
|
+
name: "recovery_attempt_id";
|
|
826
|
+
tableName: "agents";
|
|
827
|
+
dataType: "string";
|
|
828
|
+
columnType: "SQLiteText";
|
|
829
|
+
data: string;
|
|
830
|
+
driverParam: string;
|
|
831
|
+
notNull: false;
|
|
832
|
+
hasDefault: false;
|
|
833
|
+
isPrimaryKey: false;
|
|
834
|
+
isAutoincrement: false;
|
|
835
|
+
hasRuntimeDefault: false;
|
|
836
|
+
enumValues: [string, ...string[]];
|
|
837
|
+
baseColumn: never;
|
|
838
|
+
identity: undefined;
|
|
839
|
+
generated: undefined;
|
|
840
|
+
}, {}, {
|
|
841
|
+
length: number | undefined;
|
|
842
|
+
}>;
|
|
786
843
|
adapterSessionId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
787
844
|
name: "adapter_session_id";
|
|
788
845
|
tableName: "agents";
|
|
@@ -1139,6 +1196,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
1139
1196
|
adapterId: _$zod.ZodString;
|
|
1140
1197
|
adapterName: _$zod.ZodString;
|
|
1141
1198
|
sessionId: _$zod.ZodString;
|
|
1199
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1200
|
+
machineId: _$zod.ZodString;
|
|
1201
|
+
instanceId: _$zod.ZodString;
|
|
1202
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1203
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1142
1204
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1143
1205
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1144
1206
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -1276,6 +1338,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
1276
1338
|
adapterId: _$zod.ZodString;
|
|
1277
1339
|
adapterName: _$zod.ZodString;
|
|
1278
1340
|
sessionId: _$zod.ZodString;
|
|
1341
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1342
|
+
machineId: _$zod.ZodString;
|
|
1343
|
+
instanceId: _$zod.ZodString;
|
|
1344
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1345
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1279
1346
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1280
1347
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1281
1348
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -1438,6 +1505,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
1438
1505
|
adapterId: _$zod.ZodString;
|
|
1439
1506
|
adapterName: _$zod.ZodString;
|
|
1440
1507
|
sessionId: _$zod.ZodString;
|
|
1508
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1509
|
+
machineId: _$zod.ZodString;
|
|
1510
|
+
instanceId: _$zod.ZodString;
|
|
1511
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1512
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1441
1513
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1442
1514
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1443
1515
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -1615,6 +1687,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
1615
1687
|
adapterId: _$zod.ZodString;
|
|
1616
1688
|
adapterName: _$zod.ZodString;
|
|
1617
1689
|
sessionId: _$zod.ZodString;
|
|
1690
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1691
|
+
machineId: _$zod.ZodString;
|
|
1692
|
+
instanceId: _$zod.ZodString;
|
|
1693
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1694
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1618
1695
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1619
1696
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1620
1697
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -1760,7 +1837,7 @@ declare const SessionStorageNamespace$1: {
|
|
|
1760
1837
|
active: "active";
|
|
1761
1838
|
archived: "archived";
|
|
1762
1839
|
}>>>;
|
|
1763
|
-
parentSessionId: _$zod.ZodOptional<_$zod.ZodString
|
|
1840
|
+
parentSessionId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
|
|
1764
1841
|
contextInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
1765
1842
|
none: "none";
|
|
1766
1843
|
"parent-history": "parent-history";
|
|
@@ -1805,6 +1882,13 @@ declare const SessionStorageNamespace$1: {
|
|
|
1805
1882
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1806
1883
|
}, _$zod_v4_core0.$strip>>;
|
|
1807
1884
|
expectIdentityOpenForLead: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
|
|
1885
|
+
reconcileAdapterSession: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1886
|
+
agentId: _$zod.ZodString;
|
|
1887
|
+
adapterName: _$zod.ZodString;
|
|
1888
|
+
adapterId: _$zod.ZodString;
|
|
1889
|
+
adapterSessionId: _$zod.ZodString;
|
|
1890
|
+
lastActivityAt: _$zod.ZodNumber;
|
|
1891
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1808
1892
|
}, _$zod_v4_core0.$strip>;
|
|
1809
1893
|
response: _$zod.ZodObject<{
|
|
1810
1894
|
success: _$zod.ZodBoolean;
|
|
@@ -1827,6 +1911,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
1827
1911
|
adapterId: _$zod.ZodString;
|
|
1828
1912
|
adapterName: _$zod.ZodString;
|
|
1829
1913
|
sessionId: _$zod.ZodString;
|
|
1914
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
1915
|
+
machineId: _$zod.ZodString;
|
|
1916
|
+
instanceId: _$zod.ZodString;
|
|
1917
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1918
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1830
1919
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1831
1920
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1832
1921
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2114,6 +2203,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2114
2203
|
adapterId: _$zod.ZodString;
|
|
2115
2204
|
adapterName: _$zod.ZodString;
|
|
2116
2205
|
sessionId: _$zod.ZodString;
|
|
2206
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2207
|
+
machineId: _$zod.ZodString;
|
|
2208
|
+
instanceId: _$zod.ZodString;
|
|
2209
|
+
}, _$zod_v4_core0.$strip>>;
|
|
2210
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2117
2211
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2118
2212
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2119
2213
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2258,6 +2352,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2258
2352
|
adapterId: _$zod.ZodString;
|
|
2259
2353
|
adapterName: _$zod.ZodString;
|
|
2260
2354
|
sessionId: _$zod.ZodString;
|
|
2355
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2356
|
+
machineId: _$zod.ZodString;
|
|
2357
|
+
instanceId: _$zod.ZodString;
|
|
2358
|
+
}, _$zod_v4_core0.$strip>>;
|
|
2359
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2261
2360
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2262
2361
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2263
2362
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2423,6 +2522,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2423
2522
|
adapterId: _$zod.ZodString;
|
|
2424
2523
|
adapterName: _$zod.ZodString;
|
|
2425
2524
|
sessionId: _$zod.ZodString;
|
|
2525
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2526
|
+
machineId: _$zod.ZodString;
|
|
2527
|
+
instanceId: _$zod.ZodString;
|
|
2528
|
+
}, _$zod_v4_core0.$strip>>;
|
|
2529
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2426
2530
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2427
2531
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2428
2532
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2560,6 +2664,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2560
2664
|
adapterId: _$zod.ZodString;
|
|
2561
2665
|
adapterName: _$zod.ZodString;
|
|
2562
2666
|
sessionId: _$zod.ZodString;
|
|
2667
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2668
|
+
machineId: _$zod.ZodString;
|
|
2669
|
+
instanceId: _$zod.ZodString;
|
|
2670
|
+
}, _$zod_v4_core0.$strip>>;
|
|
2671
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2563
2672
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2564
2673
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2565
2674
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2722,6 +2831,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2722
2831
|
adapterId: _$zod.ZodString;
|
|
2723
2832
|
adapterName: _$zod.ZodString;
|
|
2724
2833
|
sessionId: _$zod.ZodString;
|
|
2834
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
2835
|
+
machineId: _$zod.ZodString;
|
|
2836
|
+
instanceId: _$zod.ZodString;
|
|
2837
|
+
}, _$zod_v4_core0.$strip>>;
|
|
2838
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2725
2839
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2726
2840
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2727
2841
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -2899,6 +3013,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
2899
3013
|
adapterId: _$zod.ZodString;
|
|
2900
3014
|
adapterName: _$zod.ZodString;
|
|
2901
3015
|
sessionId: _$zod.ZodString;
|
|
3016
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3017
|
+
machineId: _$zod.ZodString;
|
|
3018
|
+
instanceId: _$zod.ZodString;
|
|
3019
|
+
}, _$zod_v4_core0.$strip>>;
|
|
3020
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2902
3021
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2903
3022
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
2904
3023
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -3044,7 +3163,7 @@ declare const SessionStorageNamespace$1: {
|
|
|
3044
3163
|
active: "active";
|
|
3045
3164
|
archived: "archived";
|
|
3046
3165
|
}>>>;
|
|
3047
|
-
parentSessionId: _$zod.ZodOptional<_$zod.ZodString
|
|
3166
|
+
parentSessionId: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
|
|
3048
3167
|
contextInheritance: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
3049
3168
|
none: "none";
|
|
3050
3169
|
"parent-history": "parent-history";
|
|
@@ -3089,6 +3208,13 @@ declare const SessionStorageNamespace$1: {
|
|
|
3089
3208
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3090
3209
|
}, _$zod_v4_core0.$strip>>;
|
|
3091
3210
|
expectIdentityOpenForLead: _$zod.ZodOptional<_$zod.ZodNullable<_$zod.ZodString>>;
|
|
3211
|
+
reconcileAdapterSession: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3212
|
+
agentId: _$zod.ZodString;
|
|
3213
|
+
adapterName: _$zod.ZodString;
|
|
3214
|
+
adapterId: _$zod.ZodString;
|
|
3215
|
+
adapterSessionId: _$zod.ZodString;
|
|
3216
|
+
lastActivityAt: _$zod.ZodNumber;
|
|
3217
|
+
}, _$zod_v4_core0.$strip>>;
|
|
3092
3218
|
}, _$zod_v4_core0.$strip>;
|
|
3093
3219
|
response: _$zod.ZodObject<{
|
|
3094
3220
|
success: _$zod.ZodBoolean;
|
|
@@ -3111,6 +3237,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
3111
3237
|
adapterId: _$zod.ZodString;
|
|
3112
3238
|
adapterName: _$zod.ZodString;
|
|
3113
3239
|
sessionId: _$zod.ZodString;
|
|
3240
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3241
|
+
machineId: _$zod.ZodString;
|
|
3242
|
+
instanceId: _$zod.ZodString;
|
|
3243
|
+
}, _$zod_v4_core0.$strip>>;
|
|
3244
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3114
3245
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3115
3246
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3116
3247
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -3398,6 +3529,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
3398
3529
|
adapterId: _$zod.ZodString;
|
|
3399
3530
|
adapterName: _$zod.ZodString;
|
|
3400
3531
|
sessionId: _$zod.ZodString;
|
|
3532
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3533
|
+
machineId: _$zod.ZodString;
|
|
3534
|
+
instanceId: _$zod.ZodString;
|
|
3535
|
+
}, _$zod_v4_core0.$strip>>;
|
|
3536
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3401
3537
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3402
3538
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3403
3539
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -3542,6 +3678,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
3542
3678
|
adapterId: _$zod.ZodString;
|
|
3543
3679
|
adapterName: _$zod.ZodString;
|
|
3544
3680
|
sessionId: _$zod.ZodString;
|
|
3681
|
+
runtimeOwner: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
3682
|
+
machineId: _$zod.ZodString;
|
|
3683
|
+
instanceId: _$zod.ZodString;
|
|
3684
|
+
}, _$zod_v4_core0.$strip>>;
|
|
3685
|
+
recoveryAttemptId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3545
3686
|
adapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3546
3687
|
currentAdapterSessionId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3547
3688
|
currentAdapterSessionIdState: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
@@ -3714,6 +3855,11 @@ declare const SessionStorageNamespace$1: {
|
|
|
3714
3855
|
status: "idle" | "active" | "starting" | "dead" | "disposed";
|
|
3715
3856
|
createdAt: number;
|
|
3716
3857
|
lastActivityAt: number;
|
|
3858
|
+
runtimeOwner?: {
|
|
3859
|
+
machineId: string;
|
|
3860
|
+
instanceId: string;
|
|
3861
|
+
} | undefined;
|
|
3862
|
+
recoveryAttemptId?: string | undefined;
|
|
3717
3863
|
adapterSessionId?: string | undefined;
|
|
3718
3864
|
currentAdapterSessionId?: string | undefined;
|
|
3719
3865
|
currentAdapterSessionIdState?: "confirmed" | "moved" | "inherited" | undefined;
|
|
@@ -3787,6 +3933,12 @@ declare const SessionStorageNamespace$1: {
|
|
|
3787
3933
|
adapterName: string;
|
|
3788
3934
|
adapterId: string;
|
|
3789
3935
|
adapterSessionId?: string | undefined;
|
|
3936
|
+
} | {
|
|
3937
|
+
agentId: string;
|
|
3938
|
+
adapterName: string;
|
|
3939
|
+
adapterId: string;
|
|
3940
|
+
adapterSessionId: string;
|
|
3941
|
+
lastActivityAt: number;
|
|
3790
3942
|
} | null;
|
|
3791
3943
|
} | undefined;
|
|
3792
3944
|
};
|
|
@@ -15,8 +15,8 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
15
15
|
config: _$zod.ZodNullable<_$zod.ZodObject<{
|
|
16
16
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
17
17
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
18
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
19
18
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
19
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
20
20
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
21
21
|
label: _$zod.ZodString;
|
|
22
22
|
url: _$zod.ZodString;
|
|
@@ -40,8 +40,8 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
40
40
|
configs: _$zod.ZodArray<_$zod.ZodObject<{
|
|
41
41
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
42
42
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
43
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
44
43
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
44
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
45
45
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
46
46
|
label: _$zod.ZodString;
|
|
47
47
|
url: _$zod.ZodString;
|
|
@@ -1651,8 +1651,8 @@ declare const AdapterSubsystemNamespace: _$_makaio_core0.BusNamespaceDefinition<
|
|
|
1651
1651
|
config: _$zod.ZodObject<{
|
|
1652
1652
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1653
1653
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1654
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1655
1654
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1655
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1656
1656
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1657
1657
|
label: _$zod.ZodString;
|
|
1658
1658
|
url: _$zod.ZodString;
|
|
@@ -1876,8 +1876,8 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
1876
1876
|
config: _$zod.ZodNullable<_$zod.ZodObject<{
|
|
1877
1877
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1878
1878
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1879
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1880
1879
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1880
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1881
1881
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1882
1882
|
label: _$zod.ZodString;
|
|
1883
1883
|
url: _$zod.ZodString;
|
|
@@ -1901,8 +1901,8 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
1901
1901
|
configs: _$zod.ZodArray<_$zod.ZodObject<{
|
|
1902
1902
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1903
1903
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1904
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1905
1904
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1905
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
1906
1906
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
1907
1907
|
label: _$zod.ZodString;
|
|
1908
1908
|
url: _$zod.ZodString;
|
|
@@ -3512,8 +3512,8 @@ declare const AdapterSubsystemSubjects: _$_makaio_core0.BusSubjects<_$_makaio_co
|
|
|
3512
3512
|
config: _$zod.ZodObject<{
|
|
3513
3513
|
description: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3514
3514
|
displayName: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3515
|
-
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3516
3515
|
clientId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3516
|
+
protocol: _$zod.ZodOptional<_$zod.ZodString>;
|
|
3517
3517
|
helpLinks: _$zod.ZodOptional<_$zod.ZodArray<_$zod.ZodObject<{
|
|
3518
3518
|
label: _$zod.ZodString;
|
|
3519
3519
|
url: _$zod.ZodString;
|
|
@@ -24,12 +24,37 @@ declare const AdapterRuntimeNamespace: _$_makaio_core0.BusNamespaceDefinition<"a
|
|
|
24
24
|
adapterName: _$zod.ZodString;
|
|
25
25
|
}, _$zod_v4_core0.$strict>;
|
|
26
26
|
};
|
|
27
|
+
resolveLiveIdentity: {
|
|
28
|
+
request: _$zod.ZodObject<{
|
|
29
|
+
adapterId: _$zod.ZodString;
|
|
30
|
+
adapterName: _$zod.ZodString;
|
|
31
|
+
machineId: _$zod.ZodString;
|
|
32
|
+
ownerInstanceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
33
|
+
}, _$zod_v4_core0.$strict>;
|
|
34
|
+
response: _$zod.ZodObject<{
|
|
35
|
+
adapterId: _$zod.ZodString;
|
|
36
|
+
adapterName: _$zod.ZodString;
|
|
37
|
+
machineId: _$zod.ZodString;
|
|
38
|
+
ownerInstanceId: _$zod.ZodString;
|
|
39
|
+
}, _$zod_v4_core0.$strict>;
|
|
40
|
+
};
|
|
27
41
|
getMachineId: {
|
|
28
42
|
request: _$zod.ZodObject<{}, _$zod_v4_core0.$strict>;
|
|
29
43
|
response: _$zod.ZodObject<{
|
|
30
44
|
machineId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
31
45
|
}, _$zod_v4_core0.$strict>;
|
|
32
46
|
};
|
|
47
|
+
teardownCompleted: _$zod.ZodObject<{
|
|
48
|
+
evidence: _$zod.ZodEnum<{
|
|
49
|
+
unknown: "unknown";
|
|
50
|
+
exited: "exited";
|
|
51
|
+
closed: "closed";
|
|
52
|
+
released: "released";
|
|
53
|
+
detached: "detached";
|
|
54
|
+
}>;
|
|
55
|
+
detail: _$zod.ZodOptional<_$zod.ZodString>;
|
|
56
|
+
ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
|
|
57
|
+
}, _$zod_v4_core0.$strip>;
|
|
33
58
|
}>;
|
|
34
59
|
/**
|
|
35
60
|
* Pre-resolved adapter runtime subjects for direct import.
|
|
@@ -52,12 +77,37 @@ declare const AdapterRuntimeSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core
|
|
|
52
77
|
adapterName: _$zod.ZodString;
|
|
53
78
|
}, _$zod_v4_core0.$strict>;
|
|
54
79
|
};
|
|
80
|
+
resolveLiveIdentity: {
|
|
81
|
+
request: _$zod.ZodObject<{
|
|
82
|
+
adapterId: _$zod.ZodString;
|
|
83
|
+
adapterName: _$zod.ZodString;
|
|
84
|
+
machineId: _$zod.ZodString;
|
|
85
|
+
ownerInstanceId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
86
|
+
}, _$zod_v4_core0.$strict>;
|
|
87
|
+
response: _$zod.ZodObject<{
|
|
88
|
+
adapterId: _$zod.ZodString;
|
|
89
|
+
adapterName: _$zod.ZodString;
|
|
90
|
+
machineId: _$zod.ZodString;
|
|
91
|
+
ownerInstanceId: _$zod.ZodString;
|
|
92
|
+
}, _$zod_v4_core0.$strict>;
|
|
93
|
+
};
|
|
55
94
|
getMachineId: {
|
|
56
95
|
request: _$zod.ZodObject<{}, _$zod_v4_core0.$strict>;
|
|
57
96
|
response: _$zod.ZodObject<{
|
|
58
97
|
machineId: _$zod.ZodOptional<_$zod.ZodString>;
|
|
59
98
|
}, _$zod_v4_core0.$strict>;
|
|
60
99
|
};
|
|
100
|
+
teardownCompleted: _$zod.ZodObject<{
|
|
101
|
+
evidence: _$zod.ZodEnum<{
|
|
102
|
+
unknown: "unknown";
|
|
103
|
+
exited: "exited";
|
|
104
|
+
closed: "closed";
|
|
105
|
+
released: "released";
|
|
106
|
+
detached: "detached";
|
|
107
|
+
}>;
|
|
108
|
+
detail: _$zod.ZodOptional<_$zod.ZodString>;
|
|
109
|
+
ownerInstanceId: _$zod.ZodNullable<_$zod.ZodString>;
|
|
110
|
+
}, _$zod_v4_core0.$strip>;
|
|
61
111
|
}>, "adapterRuntime">;
|
|
62
112
|
//#endregion
|
|
63
113
|
export { AdapterRuntimeSubjects as n, AdapterRuntimeNamespace as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./schemas-BivbWRkG.mjs";import{createBusNamespace as t}from"@makaio/framework/core";const n=t(`kernel:cli`,e),r=n.subjects;export{r as n,n as t};
|
package/dist/{native-session-supervisor-fZYPUk0-.mjs → native-session-supervisor-LKio8XZn.mjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./profile-
|
|
1
|
+
import{r as e}from"./profile-N5qGUpF0.mjs";import{z as t}from"zod";import{createBusNamespace as n}from"@makaio/framework/core";const r=t.enum([`running`,`stopped`,`exited`,`unknown`]),i={request:t.object({clientId:t.string(),cwd:t.string(),command:t.string(),args:t.array(t.string()),env:t.record(t.string(),t.string()).optional(),sessionId:t.string().optional(),clientProfileName:e.optional(),adapterSessionId:t.string().optional(),metadata:t.record(t.string(),t.unknown()).optional()}),response:t.object({supervisorSessionId:t.string(),pid:t.number().int().positive()})},a={request:t.union([t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({success:t.boolean(),supervisorSessionId:t.string().optional(),pid:t.number().int().positive().optional(),terminalAttachment:t.object({canAttach:t.boolean()}).optional()})},o={request:t.object({supervisorSessionId:t.string(),signal:t.string().optional()}),response:t.object({success:t.boolean()})},s=t.object({supervisorSessionId:t.string(),clientId:t.string(),pid:t.number().int().positive().nullable(),status:r,cwd:t.string(),sessionId:t.string().optional(),adapterSessionId:t.string().optional(),startedAt:t.number().int().nonnegative(),stoppedAt:t.number().int().nonnegative().optional()}),c={request:t.union([t.object({}).strict(),t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({runtimes:t.array(s)})},l={launch:i,attach:a,stop:o,status:c},u=n(`native-session-supervisor`,l),d=u.subjects;export{i as a,s as c,a as i,r as l,d as n,c as o,l as r,o as s,u as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as BusServerConfig, n as startBusServer, r as BusServer, t as StartBusServerOptions } from "../../server-lifecycle-
|
|
1
|
+
import { i as BusServerConfig, n as startBusServer, r as BusServer, t as StartBusServerOptions } from "../../server-lifecycle-L8zja8t8.mjs";
|
|
2
2
|
import { BusBroadcastMessage, BusMessage, BusRequestMessage, BusTransport, BusTransportError } from "@makaio/framework/bus";
|
|
3
3
|
import { TransportAuth, WebSocketLike, WebSocketServerLike, WebSocketServerLike as WebSocketServerLike$1 } from "@makaio/framework/node/transports";
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../../server-lifecycle-
|
|
1
|
+
import{n as e,r as t,t as n}from"../../server-lifecycle-B_OZnoe-.mjs";var r=class{connectionListeners=new Set;on(e,t){e===`connection`&&this.connectionListeners.add(t)}off(e,t){e===`connection`&&this.connectionListeners.delete(t)}close(e){this.connectionListeners.clear(),e?.()}accept(e){for(let t of this.connectionListeners)t(e)}};export{r as HonoWebSocketBridge,t as LoopbackTransport,e as createBusServer,n as startBusServer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as startBusServer, t as StartBusServerOptions } from "../../server-lifecycle-
|
|
1
|
+
import { n as startBusServer, t as StartBusServerOptions } from "../../server-lifecycle-L8zja8t8.mjs";
|
|
2
2
|
export { StartBusServerOptions, startBusServer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"../../server-lifecycle-
|
|
1
|
+
import{t as e}from"../../server-lifecycle-B_OZnoe-.mjs";export{e as startBusServer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=214,t=/^(?:@[a-z0-9][a-z0-9._-]*\/)?[a-z0-9][a-z0-9._-]*$/u,n=/^(?:con|prn|aux|nul|(?:com|lpt)[0-9])(?:\.|$)/u;function r(e){if(!t.test(e))return!1;let r=e.slice(e.lastIndexOf(`/`)+1);return!r.endsWith(`.`)&&!n.test(r)}export{r as n,e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./namespace-BL7lHlmg.mjs";import"./ownership-memory-handler-BpGdR_uG.mjs";import{t}from"./caller-owned-adapter-stub-C1M7FKrv.mjs";import{MakaioBus as n}from"@makaio/framework/bus";import{AdapterSubjects as r,AgentSubjects as i,SessionSubjects as a}from"@makaio/framework/contracts";function o(){n.__resetHandlers?.()}function s(e=10){return new Promise(t=>setTimeout(t,e))}function c(e,t){let n=Date.now();return{agentId:e,adapterId:`adapter-${e}`,adapterName:`test-adapter`,sessionId:t?.sessionId??`test-session`,role:`member`,status:`idle`,createdAt:n,lastActivityAt:n,...t}}async function l(e,t=e,i=`test-machine`){await n.emit(r.initialized,{adapterName:e,adapterId:t,machineId:i,ownerInstanceId:`owner-${t}`,capabilities:[]})}async function u(t){return(await n.request(e.getEvents,{sessionId:t})).events}function d(e,t,r){let i=[];return r.push(n.on(e,(e=>{let n=e.payload;i.push(t(n))}))),{received:i,clear:()=>{i.length=0}}}function f(e){return d(a.turn.started,e=>({sessionId:e.sessionId,turnId:e.turnId,turnNumber:e.turnNumber,messageId:e.messageId,agentIds:[...e.agentIds],initiator:e.initiator,ingestionMarker:e.ingestionMarker}),e)}function p(e){return d(a.turn.completed,e=>({sessionId:e.sessionId,turnId:e.turnId,turnNumber:e.turnNumber,success:e.success,error:e.error,initiator:e.initiator,ingestionMarker:e.ingestionMarker}),e)}function m(e){return d(a.user_message.sent,e=>({sessionId:e.sessionId,turnId:e.turnId,messageId:e.messageId,content:e.content,agentIds:[...e.agentIds],origin:e.origin}),e)}function h(e){return d(a.user_message.acknowledged,e=>({sessionId:e.sessionId,turnId:e.turnId,messageId:e.messageId,agentId:e.agentId}),e)}function g(e){return d(a.user_message.completed,e=>({sessionId:e.sessionId,turnId:e.turnId,messageId:e.messageId,agentId:e.agentId,outcome:e.outcome,error:e.error}),e)}function _(e,t){return c(e,{runtimeOwner:{machineId:`test-machine`,instanceId:`test-runtime-owner`},...t})}function v(e){let t=Date.now();return{sessionId:e.sessionId,createdAt:t,lastActivityAt:t,status:e.status??`active`,agents:e.agents??[],leadAgentId:e.leadAgentId,targetWorkingDirectory:e.targetWorkingDirectory}}function y(e){return n.on(a.create,t=>{let n=t.payload.sessionId??`session-${crypto.randomUUID().slice(0,8)}`;e.set(n,v({sessionId:n,agents:[]})),t.setResult({sessionId:n})})}function b(e){return n.on(a.agent.added,t=>{let n=e.get(t.payload.sessionId);if(!n)return;let r=n.agents.length===0,i=t.payload.role??(r?`lead`:`member`);r&&(n.adapterSessionId=t.payload.adapterSessionId,n.adapterName=t.payload.adapterName,n.adapterId=t.payload.adapterId);let a=Date.now();n.agents.push({agentId:t.payload.agentId,adapterId:t.payload.adapterId,adapterName:t.payload.adapterName,sessionId:t.payload.sessionId,role:i,status:`idle`,createdAt:a,lastActivityAt:a}),i===`lead`&&(n.leadAgentId=t.payload.agentId),n.lastActivityAt=Date.now()})}function x(e){return n.on(a.get,t=>{t.setResult({session:e.get(t.payload.sessionId)??null})})}function S(e){return n.on(r.getAgent,t=>{for(let n of e.values()){let e=n.agents.find(e=>e.agentId===t.payload.agentId);if(e){t.setResult({agent:{agentId:e.agentId,sessionId:n.sessionId,adapterSessionId:``}});return}}t.setResult({agent:null})})}function C(){return n.on(r.rehydrateAgent,e=>{e.setResult({success:!0,...t(e.payload)})})}function w(e=`/previous/cwd`){return n.on(i.cwd.change,t=>{t.setResult({success:!0,previousCwd:e})})}function T(){return n.on(i.model.change,e=>{e.setResult({success:!0,swapped:!1})})}function E(e){return n.on(r.startAgent,n=>{let{adapterId:r,initialMessage:i}=n.payload,a=n.payload.sessionId??`session-${crypto.randomUUID().slice(0,8)}`,o=n.payload.agentId??`agent-${crypto.randomUUID().slice(0,8)}`,s=i?`msg-${crypto.randomUUID().slice(0,8)}`:void 0,c=`adapter-session-${a}`;e?.({adapterId:r,sessionId:a,initialMessage:i}),n.setResult({success:!0,agentId:o,adapterId:r,adapterSessionId:c,sessionId:a,...t(n.payload),...s&&{messageId:s}}),M({sessionId:a,agentId:o,adapterId:r,adapterSessionId:c})})}function D(e){return n.on(r.startAgent,t=>{t.setResult({success:!1,dispatch:`not-dispatched`,message:e})})}function O(e){return n.on(i.sendMessage,t=>{let{agentId:n,adapterId:r,message:i,messageId:a,sessionContext:o,responseSchema:s}=t.payload,c=a??`msg-${crypto.randomUUID().slice(0,8)}`;e?.({agentId:n,adapterId:r,message:i,messageId:c,sessionContext:o,responseSchema:s}),t.setResult({messageId:c})})}function k(e,t){return n.on(i.sendMessage,n=>{if(e.has(n.payload.agentId))throw Error(t);n.setResult({messageId:n.payload.messageId??`generated-id`})})}async function A(e){await n.emit(i.complete,{agentId:e.agentId,adapterId:`adapter-${e.agentId}`,adapterName:`test-adapter`,adapterSessionId:`adapter-session-${e.agentId}`,messageId:e.messageId,turnId:e.turnId})}async function j(e){await n.emit(i.complete,{agentId:e.agentId,adapterId:`adapter-${e.agentId}`,adapterName:`test-adapter`,adapterSessionId:`adapter-session-${e.agentId}`,messageId:e.messageId,turnId:e.turnId,outcome:`error`,error:e.error})}function M(e){setImmediate(()=>{n.emit(a.agent.added,{sessionId:e.sessionId,agentId:e.agentId,adapterId:e.adapterId,adapterName:e.adapterId,adapterSessionId:e.adapterSessionId,role:e.role})})}function N(e,i){let a=new Map,o=n.on(r.startAgent,n=>{i.payload=n.payload;let r=n.payload.agentId??`agent-${crypto.randomUUID().slice(0,8)}`,o=n.payload.initialMessage?`msg-${crypto.randomUUID().slice(0,8)}`:void 0,s=`adapter-session-${e}`;a.set(r,{agentId:r,sessionId:e,adapterSessionId:s,adapterId:n.payload.adapterId}),n.setResult({success:!0,agentId:r,adapterId:n.payload.adapterId,adapterSessionId:s,sessionId:e,...t(n.payload),...o&&{messageId:o}}),M({sessionId:e,agentId:r,adapterId:n.payload.adapterId,adapterSessionId:s})}),s=n.on(r.getAgent,e=>{let t=a.get(e.payload.agentId);e.setResult({agent:t?{agentId:t.agentId,sessionId:t.sessionId,adapterSessionId:t.adapterSessionId}:null})});return()=>{o(),s()}}export{l as C,s as E,m as S,o as T,E as _,j as a,h as b,y as c,D as d,S as f,O as g,C as h,A as i,w as l,T as m,v as n,b as o,x as p,M as r,N as s,_ as t,k as u,p as v,u as w,g as x,f as y};
|
|
@@ -13,13 +13,6 @@ declare function resetBusHandlers(): void;
|
|
|
13
13
|
* @param ms - Milliseconds to wait (default 10ms)
|
|
14
14
|
*/
|
|
15
15
|
declare function waitForAsync(ms?: number): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Creates a test agent with sensible defaults.
|
|
18
|
-
* @param agentId - The agent identifier
|
|
19
|
-
* @param overrides - Optional overrides for agent properties
|
|
20
|
-
* @returns A MakaioSessionAgent for testing
|
|
21
|
-
*/
|
|
22
|
-
declare function createTestAgent(agentId: string, overrides?: Partial<MakaioSessionAgent>): MakaioSessionAgent;
|
|
23
16
|
/**
|
|
24
17
|
* Emit `adapter.initialized` for tests that intentionally exercise the
|
|
25
18
|
* AdapterRegistry event cache or reverse adapter-name lookup.
|
|
@@ -29,8 +22,9 @@ declare function createTestAgent(agentId: string, overrides?: Partial<MakaioSess
|
|
|
29
22
|
* runtime identity handlers unless they specifically need the event cache.
|
|
30
23
|
* @param adapterName - Adapter type name (e.g., `'test-adapter'`)
|
|
31
24
|
* @param adapterId - Adapter instance ID. Defaults to `adapterName` for test simplicity.
|
|
25
|
+
* @param machineId - Machine that announced the adapter instance.
|
|
32
26
|
*/
|
|
33
|
-
declare function emitAdapterInitialized(adapterName: string, adapterId?: string): Promise<void>;
|
|
27
|
+
declare function emitAdapterInitialized(adapterName: string, adapterId?: string, machineId?: string): Promise<void>;
|
|
34
28
|
/**
|
|
35
29
|
* Query stored session events.
|
|
36
30
|
* @param sessionId - Session ID to query
|
|
@@ -121,8 +115,13 @@ declare function collectUserMessageAcknowledgedEvents(unsubs: UnsubscribeFunctio
|
|
|
121
115
|
declare function collectUserMessageCompletedEvents(unsubs: UnsubscribeFunction[]): EventCollector<UserMessageCompletedPayload>;
|
|
122
116
|
//#endregion
|
|
123
117
|
//#region services/core/src/session/testing/orchestrator-shared.d.ts
|
|
124
|
-
/**
|
|
125
|
-
|
|
118
|
+
/**
|
|
119
|
+
* Create an agent row owned by the mock runtime unless a test explicitly models a legacy row.
|
|
120
|
+
* @param agentId - The agent identifier.
|
|
121
|
+
* @param overrides - Optional persisted-agent fields to override.
|
|
122
|
+
* @returns A test agent with the mock runtime owner.
|
|
123
|
+
*/
|
|
124
|
+
declare function createMockAgent(agentId: string, overrides?: Partial<MakaioSessionAgent>): MakaioSessionAgent;
|
|
126
125
|
/** Configuration for creating mock sessions. */
|
|
127
126
|
interface MockSessionConfig {
|
|
128
127
|
sessionId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,t}from"./ownership-recovery-guard-DyW5vGBr.mjs";import{SessionStorageSubjects as n}from"./services/session/storage/namespace.mjs";import{SessionOwnershipSettleMovementRequestSchema as r,SessionOwnershipStorageSubjects as i,SessionStorageSetRequestSchema as a,SessionStorageUpdateSchema as o,SessionSubjects as s,resolveResumableAdapterSessionId as c}from"@makaio/framework/contracts";import{isInactiveSafeLeadDesignationMutation as l,normalizeSessionOwnershipClaimRequest as u}from"@makaio/framework/contracts/session";function d(){return{sessions:new Map,agents:new Map,claims:new Map,runtimeInstances:new Map}}function f(e,t){for(let[n,r]of e.claims)t(r)&&e.claims.delete(n)}function ee(e,t){let n=e?.clientAccountId??null,r=t.clientAccountId??null;return!r||n===r?null:{previousClientAccountId:n,clientAccountId:r}}function p(e,t){let n=t.lastClientIdentityObservation;if(t.clientAccountId!==void 0&&!n)throw Error(`Session "${t.sessionId}" cannot persist clientAccountId without lastClientIdentityObservation`);if(t.clientAccountId!==void 0&&t.clientId===void 0)throw Error(`Session "${t.sessionId}" cannot persist clientAccountId without clientId`);if(n&&t.clientId!==void 0&&t.clientId!==n.clientId)throw Error(`Session "${t.sessionId}" cannot persist clientId "${t.clientId}" because lastClientIdentityObservation belongs to "${n.clientId}"`)}function m(e,t,n){let r=ee(t,n);if(!r)return;let i=n.lastClientIdentityObservation;if(!i)return;let a={sessionId:n.sessionId,clientId:i.clientId,previousClientAccountId:r.previousClientAccountId,clientAccountId:r.clientAccountId,source:i.source,observedAt:i.observedAt,lastClientIdentityObservation:structuredClone(i)};queueMicrotask(()=>{Promise.resolve().then(()=>e.emit(s.clientAccount.changed,a)).catch(e=>{console.error(`[SessionStorage] Failed to emit session.clientAccount.changed:`,e)})})}function h(e){switch(e){case`fork`:return`fork`;case`subagent`:return`subagent`;case`compress`:return`compress`;case`root`:return;default:return}}function te(e){switch(e.kind){case`root`:return{kind:`root`,parentAdapterSessionId:null,forkPointMessageId:null};case`fork`:return{kind:`fork`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:e.forkPointMessageId};case`subagent`:return{kind:`subagent`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null};case`compress`:return{kind:`compress`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null};default:return e.kind}}function g(){let e=0;return()=>{let t=Date.now();return e=t>e?t:e+1,e}}function _(e){return e.activation===`live`?`active`:`discovered`}const ne=g();function re(e,t){return e===`imported`||t===`imported`?`imported`:e===`tracking`||t===`tracking`?`tracking`:e??t??`discovered`}function v(e,t,n){n!==void 0&&(e[t]=n)}function ie(e){return e.status===`closed`||e.status===`archived`||e.status===`active`&&e.isImported===!0}function ae(e,t,n){if(!ie(e)){if(n===`live`){e.status===`discovered`&&(e.status=`active`);return}t===`discovered`&&(e.status=`discovered`)}}function oe(e,t,n){let r=e.startedAt??n,i=h(e.kind);return{sessionId:t,createdAt:r,lastActivityAt:r,agents:[],status:_(e),branchKind:i,adapterName:e.source,adapterSessionId:e.externalSessionId,adapterId:e.adapterId,clientId:e.clientId,isOrchestrated:!1,isImported:!0,title:e.title??void 0,targetWorkingDirectory:e.cwd??void 0,source:e.source,parentExternalSessionId:e.parentAdapterSessionId??void 0,logFilePath:e.logFilePath??void 0,discoveredAt:n,importStatus:e.importStatus??`discovered`,forkPointMessageId:e.forkPointMessageId??void 0,metadata:e.metadata,lastClientIdentityObservation:e.lastClientIdentityObservation,isSidechain:e.isSidechain,machineId:e.machineId??void 0}}function se(e,t,n){let r=re(e.importStatus,t.importStatus);ae(e,r,t.activation),e.isImported=!0,e.importStatus=r,e.adapterName??=t.source,e.adapterSessionId??=t.externalSessionId,e.source??=t.source,e.discoveredAt??=n}function y(e,t){t.logFilePath!==void 0&&t.logFilePath!==null&&(e.logFilePath??=t.logFilePath),t.cwd!==null&&(e.targetWorkingDirectory=t.cwd),t.title!==void 0&&t.title!==null&&(e.title=t.title),e.forkPointMessageId===void 0&&t.forkPointMessageId!==null&&(e.forkPointMessageId=t.forkPointMessageId),e.parentExternalSessionId===void 0&&t.parentAdapterSessionId!==null&&(e.parentExternalSessionId=t.parentAdapterSessionId);let n=h(t.kind);n!==void 0&&e.branchKind===void 0&&(e.branchKind=n),v(e,`adapterId`,t.adapterId),v(e,`clientId`,t.clientId),t.metadata!==void 0&&(e.metadata={...t.metadata,...e.metadata??{}}),v(e,`isSidechain`,t.isSidechain),v(e,`lastClientIdentityObservation`,t.lastClientIdentityObservation),t.machineId===null?e.machineId=void 0:t.machineId!==void 0&&(e.machineId??=t.machineId)}function ce(e,t,n){t.startedAt!==void 0&&((n===void 0||e.createdAt===n)&&(e.createdAt=t.startedAt),(n===void 0||e.lastActivityAt===n)&&(e.lastActivityAt=t.startedAt))}function le(e,t,n){let r=e.discoveredAt;se(e,t,n),y(e,t),ce(e,t,r)}function b(e,t){if(t.parentExternalSessionId===void 0)return;let n=t.source??t.adapterName,r=Array.from(e.values()).find(e=>e.adapterSessionId===t.parentExternalSessionId&&(e.source??e.adapterName)===n);r&&(t.parentSessionId=r.sessionId,t.rootSessionId=r.rootSessionId??r.sessionId)}function ue(e,t,n){if(n){e.emit(s.created,{sessionId:t.sessionId,parentSessionId:t.parentSessionId??null,branchKind:t.branchKind??null,createdAt:t.createdAt}).catch(e=>console.error(`[SessionStorage] Failed to emit session.created:`,e));return}e.emit(s.updated,{sessionId:t.sessionId,changedProperties:[`source`,`targetWorkingDirectory`,`title`]}).catch(e=>console.error(`[SessionStorage] Failed to emit session.updated:`,e))}function de(e){let t=0,n=0,r=0;for(let i of e)i.importStatus===`imported`&&(t+=1),i.importStatus===`tracking`&&(n+=1),i.importStatus===`discovered`&&(r+=1);return{total:e.length,imported:t,tracking:n,discovered:r}}function x(e,t,n){return Array.from(e.values()).find(e=>e.adapterSessionId===n&&e.source===t)}function fe(e,t){let n=[];return t.cwd!==void 0&&(e.targetWorkingDirectory=t.cwd,n.push(`targetWorkingDirectory`)),t.logFilePath!==void 0&&(e.logFilePath=t.logFilePath,n.push(`logFilePath`)),t.machineId!==void 0&&(e.machineId=t.machineId??void 0,n.push(`machineId`)),n}function pe(e,t,n){e.emit(s.importStatusChanged,{sessionId:t.sessionId,importStatus:n}).catch(e=>console.error(`[SessionStorage] Failed to emit session.importStatusChanged:`,e));let r=t.source??t.adapterName;n!==`imported`||t.adapterSessionId===void 0||r===void 0||e.emit(s.import.completed,{sessionId:t.sessionId,adapterSessionId:t.adapterSessionId,source:r}).catch(e=>console.error(`[SessionStorage] Failed to emit session.import.completed:`,e))}function me(e,t){return e.on(n.rebindObserved,n=>{let r=n.payload,i=x(t,r.source,r.externalSessionId);if(!i){n.setResult({outcome:`not-found`});return}let a=fe(i,r);n.setResult({outcome:`rebound`,sessionId:i.sessionId}),a.length>0&&e.emit(s.updated,{sessionId:i.sessionId,changedProperties:a}).catch(e=>console.error(`[SessionStorage] Failed to emit session.updated:`,e))})}function he(e){let{bus:t,store:r,cloneSession:i,populateAgents:a}=e;return[t.on(n.importUpsert,e=>{let n=structuredClone(e.payload),i=x(r,n.source,n.externalSessionId),a=ne(),o=i===void 0,s=i??oe(n,crypto.randomUUID(),a);i?(le(i,n,a),i.parentExternalSessionId!==void 0&&i.parentSessionId===void 0&&b(r,i)):(r.set(s.sessionId,s),b(r,s)),ue(t,s,o),e.setResult({sessionId:s.sessionId,created:o})}),me(t,r),t.on(n.getByLogFilePath,async e=>{let n=Array.from(r.values()).find(t=>t.logFilePath===e.payload.logFilePath);if(!n){e.setResult({session:null});return}let o=await a(t,n.sessionId);e.setResult({session:{...i(n),agents:o}})}),t.on(n.listImported,async e=>{let{source:n,importStatus:o}=e.payload,s=Array.from(r.values()).filter(e=>e.isImported===!0).filter(e=>n===void 0||e.source===n).filter(e=>o===void 0||e.importStatus===o).sort((e,t)=>t.createdAt-e.createdAt),c=await Promise.all(s.map(async e=>({...i(e),agents:await a(t,e.sessionId)})));e.setResult({sessions:c})}),t.on(n.countBySource,e=>{let t=Array.from(r.values()).filter(t=>t.isImported===!0&&t.source===e.payload.source);e.setResult(de(t))}),t.on(n.updateImportStatus,e=>{let n=r.get(e.payload.sessionId),i=e.payload.importStatus;if(!n||n.importStatus===i){e.setResult({success:!1});return}n.importStatus=i,i===`imported`&&n.status===`discovered`&&(n.status=`active`),e.setResult({success:!0}),pe(t,n,i)})]}function S(e,t){let n=t.expectIdentityOpenForLead;return n===void 0?!1:e.adapterName!==void 0||e.adapterId!==void 0?!0:(e.leadAgentId??null)!==n}function C(e,t){let n=t.reconcileAdapterSession;if(n===void 0)return!1;if(e.adapterSessionId!==void 0||e.leadAgentId!==n.agentId)return!0;let r=e.adapterName===void 0&&e.adapterId===void 0,i=e.adapterName===n.adapterName&&e.adapterId===n.adapterId;return!r&&!i}async function w(t,n){let r=await t.requestOptional(e.listBySession,{sessionId:n});return r.handled?r.data.agents:[]}function T(e){return structuredClone(e)}function E(e,t,n){n!==void 0&&(e[t]=n)}function D(e,t,n){n!==void 0&&(e[t]=n??void 0)}function O(e,t){let n=e;return t.status!==`all`&&(n=n.filter(e=>e.status===t.status)),t.executionTargetId!==void 0&&(n=n.filter(e=>e.executionTargetId===t.executionTargetId)),n}function k(e,t){e.currentAdapterSessionId=t?.currentAdapterSessionId,e.currentAdapterSessionIdState=t?.currentAdapterSessionIdState??`inherited`,t!==null&&(e.leadAgentId=t.leadAgentId)}function A(e,t){E(e,`status`,t.status),t.parentSessionId!==void 0&&(e.parentSessionId=t.parentSessionId??void 0),E(e,`contextInheritance`,t.contextInheritance),E(e,`rootSessionId`,t.rootSessionId),E(e,`forkPointMessageId`,t.forkPointMessageId),E(e,`branchKind`,t.branchKind),E(e,`isOrchestrated`,t.isOrchestrated),E(e,`clientId`,t.clientId),E(e,`clientAccountId`,t.clientAccountId),E(e,`lastClientIdentityObservation`,t.lastClientIdentityObservation),E(e,`title`,t.title),E(e,`targetWorkingDirectory`,t.targetWorkingDirectory),E(e,`createdAt`,t.createdAt),E(e,`lastActivityAt`,t.lastActivityAt),E(e,`machineId`,t.machineId),t.identity!==void 0&&(e.adapterName=t.identity.adapterName,e.adapterId=t.identity.adapterId,E(e,`adapterSessionId`,t.identity.adapterSessionId)),t.reconcileAdapterSession!==void 0&&(e.adapterName=t.reconcileAdapterSession.adapterName,e.adapterId=t.reconcileAdapterSession.adapterId,e.adapterSessionId=t.reconcileAdapterSession.adapterSessionId,e.lastActivityAt=t.reconcileAdapterSession.lastActivityAt),D(e,`executionTargetId`,t.executionTargetId),D(e,`approvalPolicyOverride`,t.approvalPolicyOverride),D(e,`metadata`,t.metadata),t.spawningToolCallId===null?e.spawningToolCallId=void 0:t.spawningToolCallId!==void 0&&e.spawningToolCallId===void 0&&(e.spawningToolCallId=t.spawningToolCallId)}function j(e,t){return e.on(n.list,async n=>{let{status:r=`all`,limit:i,offset:a=0,includePreview:o=!1,executionTargetId:s}=n.payload,c=O(Array.from(t.values()),{status:r,executionTargetId:s});c.sort((e,t)=>t.lastActivityAt-e.lastActivityAt);let l=c.length;i!==void 0&&(c=c.slice(a,a+i));let u=await Promise.all(c.map(async t=>({...T(t),agents:await w(e,t.sessionId)}))),d=o?u.map(e=>({...e,preview:{messageCount:0,firstUserMessage:null}})):u;n.setResult({sessions:d,total:l})})}function M(e,t){return e.on(n.update,async n=>{let r=structuredClone(o.request.parse(n.payload)),i=t.get(r.sessionId);if(!i){n.setResult({success:!1,clientAccountChanged:!1});return}if(r.expectedStatus!==void 0&&!r.expectedStatus.includes(i.status)){n.setResult({success:!1,clientAccountChanged:!1});return}if(S(i,r)){n.setResult({success:!1,clientAccountChanged:!1});return}if(C(i,r)){n.setResult({success:!1,clientAccountChanged:!1});return}let a=T(i);p(a,{sessionId:i.sessionId,clientId:r.clientId??i.clientId,clientAccountId:r.clientAccountId??i.clientAccountId,lastClientIdentityObservation:r.lastClientIdentityObservation??i.lastClientIdentityObservation}),A(i,r),n.setResult({success:!0,clientAccountChanged:(a.clientAccountId??null)!==(i.clientAccountId??null)}),m(e,a,T(i))})}function N(e,t=d()){let r=t.sessions,i=[];return i.push(e.on(n.get,async t=>{let n=r.get(t.payload.sessionId);if(!n){t.setResult({session:null});return}let i=await w(e,t.payload.sessionId);t.setResult({session:{...T(n),agents:i}})})),i.push(e.on(n.set,async t=>{let{sessionId:n,session:i,ifAbsent:o}=a.parse(t.payload);if(o&&r.has(n)){t.setResult({success:!1,clientAccountChanged:!1});return}let s=structuredClone(i),c=r.get(n)??null,l=c?T(c):null;k(s,l),p(c,s),r.set(n,s),t.setResult({success:!0,clientAccountChanged:(l?.clientAccountId??null)!==(s.clientAccountId??null)}),m(e,l,T(s))})),i.push(e.on(n.delete,async e=>{let n=new Set;for(let[r,i]of t.agents)i.sessionId===e.payload.sessionId&&(n.add(r),t.agents.delete(r));f(t,t=>t.sessionId===e.payload.sessionId||n.has(t.agentId)),r.delete(e.payload.sessionId),e.setResult({success:!0}),await e.next()})),i.push(j(e,r)),i.push(e.on(n.getChildren,e=>{let{sessionId:t}=e.payload,n=Array.from(r.values()),i=n.filter(e=>e.parentSessionId===t),a=new Set(n.map(e=>e.parentSessionId).filter(e=>!!e)),o=i.map(e=>({sessionId:e.sessionId,title:e.title??null,forkPointMessageId:e.forkPointMessageId??null,branchKind:e.branchKind??null,messageCount:0,hasChildren:a.has(e.sessionId),spawningToolCallId:e.spawningToolCallId}));e.setResult({children:o})})),i.push(e.on(n.getStatusCounts,e=>{e.payload;let t=Array.from(r.values()),n=t.filter(e=>e.status===`active`).length,i=t.filter(e=>e.status===`closed`).length,a=t.filter(e=>e.status===`archived`).length,o=t.filter(e=>e.status===`discovered`).length;e.setResult({all:n+i+a+o,active:n,closed:i,archived:a,discovered:o})})),i.push(M(e,r)),i.push(P(e,r)),i.push(...he({bus:e,store:r,populateAgents:w,cloneSession:T})),()=>i.forEach(e=>e())}function P(t,r){return t.on(n.getByAdapterSessionId,async n=>{let{adapterSessionId:i,source:a,adapterName:o}=n.payload,s=Array.from(r.values()).filter(e=>e.adapterSessionId!==void 0&&e.adapterSessionId===i&&(a===void 0||e.source===a)&&(o===void 0||e.adapterName===o)),c=s[0];if(s.length!==1||c===void 0){n.setResult({session:null});return}let l=await t.requestOptional(e.listBySession,{sessionId:c.sessionId}),u=l.handled?l.data.agents:[];n.setResult({session:{...T(c),agents:u}})})}function F(e){return structuredClone(e)}function I(e,t){let{adapterId:n,runtimeOwner:r,adapterSessionId:i,cwd:a,model:o,allowedDirectories:s,providerConfigId:c}=t;return n===void 0&&r===void 0&&i===void 0&&a===void 0&&o===void 0&&s===void 0&&c===void 0?!1:(n!==void 0&&(e.adapterId=n),r!==void 0&&(e.runtimeOwner=structuredClone(r)),i!==void 0&&(e.adapterSessionId=i),a!==void 0&&(e.cwd=a),o!==void 0&&(e.model=o),s!==void 0&&(e.allowedDirectories=s),c===null?delete e.providerConfigId:c!==void 0&&(e.providerConfigId=c),!0)}function L(e){return{status:e.status,recoveryAttemptId:e.recoveryAttemptId,adapterSessionId:e.adapterSessionId,runtimeOwner:structuredClone(e.runtimeOwner),currentAdapterSessionId:e.currentAdapterSessionId,currentAdapterSessionIdState:e.currentAdapterSessionIdState,revision:e.revision,currencyFence:e.currencyFence}}function R(e,t,n){let r=e.get(t),i=r===void 0?void 0:L(r);e.set(t,{...structuredClone(n),status:i?.status===`disposed`?`disposed`:n.status,recoveryAttemptId:i===void 0?n.recoveryAttemptId:i.recoveryAttemptId,adapterSessionId:i===void 0?n.adapterSessionId:i.adapterSessionId,runtimeOwner:i===void 0?structuredClone(n.runtimeOwner):i.runtimeOwner,currentAdapterSessionId:i?.currentAdapterSessionId,currentAdapterSessionIdState:i?.currentAdapterSessionIdState??`inherited`,revision:i?.revision??0,currencyFence:i?.currencyFence??0})}function z(e,t,n){let r=e.get(t);return r===void 0?!1:n(r)}function ge(e,t,n,r){let i=e.get(t);return i===void 0?{success:!1,transitioned:!1}:i.status===`disposed`||r!==void 0&&!r.includes(i.status)?{success:!0,transitioned:!1}:(i.status=n,i.lastActivityAt=Date.now(),{success:!0,transitioned:!0})}function _e(e,t){return f(e,e=>e.agentId===t),e.agents.delete(t)}function ve(t,n=d()){let r=n.agents,i=[];return i.push(t.on(e.get,e=>{let t=r.get(e.payload.agentId);e.setResult({agent:t===void 0?null:F(t)})})),i.push(t.on(e.set,e=>{R(r,e.payload.agentId,e.payload.agent),e.setResult({success:!0})})),i.push(t.on(e.delete,e=>{e.setResult({success:_e(n,e.payload.agentId)})})),i.push(t.on(e.listByAdapter,e=>{let{adapterName:t,status:n}=e.payload,i=Array.from(r.values()).filter(e=>e.adapterName===t);n&&n!==`all`&&(i=i.filter(e=>e.status===n)),e.setResult({agents:i.map(F)})})),i.push(t.on(e.listBySession,e=>{let t=Array.from(r.values()).filter(t=>t.sessionId===e.payload.sessionId);e.setResult({agents:t.map(F)})})),i.push(t.on(e.updateStatus,e=>{let{agentId:t,status:n,expectedStatus:i}=e.payload;e.setResult(ge(r,t,n,i))})),i.push(t.on(e.updateActivity,e=>{let t=z(r,e.payload.agentId,t=>(t.lastActivityAt=e.payload.lastActivityAt,!0));e.setResult({success:t})})),i.push(t.on(e.updateRuntime,e=>{let{agentId:t,adapterId:n,runtimeOwner:i,adapterSessionId:a,cwd:o,model:s,allowedDirectories:c,providerConfigId:l}=structuredClone(e.payload),u=z(r,t,e=>I(e,{adapterId:n,runtimeOwner:i,adapterSessionId:a,cwd:o,model:s,allowedDirectories:c,providerConfigId:l})?(e.lastActivityAt=Date.now(),!0):!1);e.setResult({success:u})})),()=>i.forEach(e=>e())}function B(e,t,n,r){for(let i of e.values())if(i.machineId===t&&i.adapterId===n&&i.providerSessionId===r)return i}function V(e,t){for(let n of e.values())if(n.claimToken===t)return n}function ye(e,t){let n=0;for(let r of e.values())r.agentId===t&&r.fence>n&&(n=r.fence);return n}function H(e,t,n){let r=e.agents.get(t)?.currencyFence??0;return 1+Math.max(n,r,ye(e.claims,t))}function U(e,t){return`${e.length}:${e}${t}`}function W(e,t,n,r){let i=U(t,n),a=e.runtimeInstances.get(i);if(a!==void 0)return a;let o=1;for(let t of e.runtimeInstances.values())t.machineId===n&&t.incarnation>=o&&(o=t.incarnation+1);let s={instanceId:t,machineId:n,incarnation:o,startedAt:r,retiredAt:null};return e.runtimeInstances.set(i,structuredClone(s)),s}function G(e,t,n){if(n.ownerInstanceId===null)return!1;if(t.supersededClaimToken===n.claimToken||n.status===`held`&&n.agentId===t.agentId&&n.ownerInstanceId===t.ownerInstanceId)return!0;let r=e.runtimeInstances.get(U(n.ownerInstanceId,n.machineId));if(r?.retiredAt!==null&&r?.retiredAt!==void 0)return!0;if(t.topology===`machine-exclusive`){let n=e.runtimeInstances.get(U(t.ownerInstanceId,t.machineId));if(n!==void 0&&r!==void 0&&n.incarnation>r.incarnation)return!0}return!1}function K(e,t){let n=e.currentAdapterSessionIdState??`inherited`;if(n!==`inherited`)return{currentAdapterSessionId:e.currentAdapterSessionId,currentAdapterSessionIdState:n};let r=e.adapterSessionId??null;return r===t?{currentAdapterSessionId:void 0,currentAdapterSessionIdState:`inherited`}:r===null?{currentAdapterSessionId:void 0,currentAdapterSessionIdState:`moved`}:{currentAdapterSessionId:r,currentAdapterSessionIdState:`confirmed`}}function be(e,t){if(t===`confirmed`!=(e!==null))throw Error(`Currency pairing invariant violated: confirmed ↔ id !== null (state="${t}", id=${e===null?`null`:`present`})`)}function q(e){return{adapterSessionId:e.adapterSessionId??null,currentAdapterSessionId:e.currentAdapterSessionId??null,currentAdapterSessionIdState:e.currentAdapterSessionIdState??`inherited`}}function J(e,t,n){if(t.recoveryGuard!==void 0&&e!==void 0&&(n.outcome===`claimed`||n.outcome===`idempotent`)){let r=t.recoveryAttemptId;if(r===void 0)throw Error(`guarded recovery claim requires recoveryAttemptId`);let i={status:e.status,adapterId:e.adapterId,...e.runtimeOwner===void 0?{}:{binding:{adapterId:e.adapterId,ownerMachineId:e.runtimeOwner.machineId,ownerInstanceId:e.runtimeOwner.instanceId}},...e.recoveryAttemptId===void 0?{}:{recoveryAttemptId:e.recoveryAttemptId}};if(e.status=`starting`,e.adapterId=t.adapterId,t.ownerInstance===void 0)throw Error(`guarded recovery claim requires ownerInstance`);return e.runtimeOwner={machineId:t.machineId,instanceId:t.ownerInstance.instanceId},e.recoveryAttemptId=r,e.lastActivityAt=Date.now(),{...n,recovery:{attemptId:r,preimage:i}}}return n}function Y(e,t,n){let r=e.sessions.get(t.sessionId);if(r===void 0)return{kind:`refused`,result:{outcome:`not-found`,missing:`session`}};if(r.status!==`active`&&(r.status!==`closed`||!l(t)))return{kind:`refused`,result:{outcome:`session-not-active`,status:r.status}};let i=r.leadAgentId??null,a=t.designateLead;if(a===void 0)return{kind:`ok`,leadDesignated:!1,previousLeadAgentId:i};let o=a.clear===!0,s=o?null:n.agentId;if(!o&&n.status===`disposed`)return{kind:`refused`,result:{outcome:`agent-disposed`}};if(!o&&i===n.agentId)return{kind:`ok`,leadDesignated:!1,previousLeadAgentId:i};if(i!==a.expectedLeadAgentId)return{kind:`conflict`,currentLeadAgentId:i};if(r.leadAgentId=s??void 0,!o){let e=K(n,r.adapterSessionId??null);r.currentAdapterSessionId=e.currentAdapterSessionId,r.currentAdapterSessionIdState=e.currentAdapterSessionIdState}return{kind:`ok`,leadDesignated:!0,previousLeadAgentId:i}}function X(e,t,n){if(!e.sessions.has(t.sessionId))return{kind:`refused`,result:{outcome:`not-found`,missing:`session`}};let r=e.agents.get(t.agentId);if(r===void 0||r.sessionId!==t.sessionId)return{kind:`refused`,result:{outcome:`not-found`,missing:`agent`}};if(r.status===`disposed`)return{kind:`refused`,result:{outcome:`agent-disposed`}};let i=V(e.claims,t.claimToken);if(i!==void 0&&i.claimId!==n?.claimId)throw Error(`UNIQUE constraint failed: adapter_session_claims.claim_token (uniq_adapter_session_claims_token): "${t.claimToken}" is already in use`);return{kind:`ok`,agent:r}}function Z(e,t,n){return{outcome:e,claim:t===null?null:structuredClone(t),leadDesignated:n.leadDesignated,previousLeadAgentId:n.previousLeadAgentId}}function xe(e,t){let n=X(e,t);if(n.kind===`refused`)return n.result;let r=Date.now(),i=crypto.randomUUID(),a={claimId:i,machineId:t.machineId,adapterId:t.adapterId,adapterName:t.adapterName,providerSessionId:t.providerSessionId,sessionId:t.sessionId,agentId:t.agentId,ownerInstanceId:t.ownerInstance.instanceId,claimToken:t.claimToken,fence:H(e,t.agentId,0),status:`held`,claimedAt:r,updatedAt:r};e.claims.set(i,structuredClone(a));let o=Y(e,t,n.agent);return o.kind===`ok`?Z(`claimed`,a,o):(e.claims.delete(i),o.kind===`conflict`?{outcome:`lead-conflict`,currentLeadAgentId:o.currentLeadAgentId}:o.result)}function Se(e,t,n){let r=X(e,t,n);if(r.kind===`refused`)return r.result;let i=Date.now(),a={...n,claimToken:t.claimToken,fence:H(e,t.agentId,n.fence),agentId:t.agentId,sessionId:t.sessionId,adapterName:t.adapterName,ownerInstanceId:t.ownerInstance.instanceId,status:`held`,claimedAt:i,updatedAt:i};e.claims.set(n.claimId,structuredClone(a));let o=Y(e,t,r.agent);return o.kind===`ok`?Z(`claimed`,a,o):(e.claims.set(n.claimId,structuredClone(n)),o.kind===`conflict`?{outcome:`lead-conflict`,currentLeadAgentId:o.currentLeadAgentId}:o.result)}function Ce(e,t,n){if(n.status!==`held`)return{outcome:`already-claimed`,holder:structuredClone(n)};let r=X(e,t,n);if(r.kind===`refused`)return r.result;let i=Y(e,t,r.agent);return i.kind===`conflict`?{outcome:`lead-conflict`,currentLeadAgentId:i.currentLeadAgentId}:i.kind===`refused`?i.result:Z(`idempotent`,n,i)}function we(e,t){let n=e.agents.get(t.agentId);if(n===void 0||n.sessionId!==t.sessionId)return{outcome:`not-found`,missing:`agent`};if(n.status===`disposed`&&t.designateLead?.clear!==!0)return{outcome:`agent-disposed`};let r=Y(e,t,n);return r.kind===`conflict`?{outcome:`lead-conflict`,currentLeadAgentId:r.currentLeadAgentId}:r.kind===`refused`?r.result:Z(`claimed`,null,r)}function Te(e,t,n,r,i){let a=t.ownerInstance;if(a===void 0)throw Error(`keyed session ownership claim requires ownerInstance`);let o=U(a.instanceId,t.machineId),s=e.runtimeInstances.has(o);W(e,a.instanceId,t.machineId,Date.now());let c={...t,providerSessionId:n,ownerInstance:a};if(i===void 0){let n=xe(e,c);return!s&&n.outcome!==`claimed`&&e.runtimeInstances.delete(o),J(r,t,n)}if(i.claimToken===c.claimToken){if(i.agentId===c.agentId&&i.sessionId===c.sessionId){let n=Ce(e,c,i);return s||e.runtimeInstances.delete(o),J(r,t,n)}return s||e.runtimeInstances.delete(o),{outcome:`already-claimed`,holder:structuredClone(i)}}if(G(e,{machineId:c.machineId,agentId:c.agentId,ownerInstanceId:c.ownerInstance.instanceId,topology:c.topology,supersededClaimToken:c.supersedes?.claimToken},i)){let n=Se(e,c,i);return!s&&n.outcome!==`claimed`&&e.runtimeInstances.delete(o),J(r,t,n)}return s||e.runtimeInstances.delete(o),{outcome:`already-claimed`,holder:structuredClone(i)}}function Ee(e,t,n){let r=t.ownerInstance,i=t.recoveryGuard===void 0||r===void 0?void 0:U(r.instanceId,t.machineId),a=i===void 0||e.runtimeInstances.has(i);i!==void 0&&r!==void 0&&W(e,r.instanceId,t.machineId,Date.now());let o=we(e,t);return i!==void 0&&!a&&o.outcome!==`claimed`&&e.runtimeInstances.delete(i),J(n,t,o)}function De(e,n){let r=u(n),{providerSessionId:i}=r,a=e.agents.get(r.agentId),o=i===null?void 0:B(e.claims,r.machineId,r.adapterId,i);if(r.recoveryGuard!==void 0&&a!==void 0){let e=t(r,{status:a.status,adapterId:a.adapterId,runtimeOwner:a.runtimeOwner,recoveryAttemptId:a.recoveryAttemptId,revision:a.revision??0,currencyFence:a.currencyFence??0,currency:q(a)},o??null);if(e!==void 0)return e}return i===null?Ee(e,r,a):Te(e,r,i,a,o)}function Oe(e,t,n){let{agentId:r,claimToken:i,fence:a,expectedRevision:o,target:s}=n,c=t.revision??0,l=t.currencyFence??0;if(t.status===`disposed`)return{outcome:`agent-disposed`};let u=V(e.claims,i);if(u===void 0||u.agentId!==r||u.sessionId!==t.sessionId||u.status!==`held`||u.fence!==a)return{outcome:`not-owner`};if(a<l)return{outcome:`superseded`,currentFence:l};let d=q(t);if(d.currentAdapterSessionId===s.currentAdapterSessionId&&d.currentAdapterSessionIdState===s.currentAdapterSessionIdState&&l===a)return{outcome:`idempotent`,revision:c,currency:d,sessionSnapshotUpdated:!1};if(c!==o)return{outcome:`currency-changed`,revision:c,currency:d}}function Q(e,t,n){let r=Oe(e,t,n);if(r!==void 0)return r;let{agentId:i,fence:a,expectedRevision:o,target:s}=n;be(s.currentAdapterSessionId,s.currentAdapterSessionIdState);let c=t.adapterSessionId??null;t.currentAdapterSessionId=s.currentAdapterSessionId??void 0,t.currentAdapterSessionIdState=s.currentAdapterSessionIdState,t.currencyFence=a,t.revision=o+1,t.lastActivityAt=Date.now();let l=e.sessions.get(t.sessionId),u=!1;if(l!==void 0&&l.leadAgentId===i){let e=K(t,l.adapterSessionId??null);l.currentAdapterSessionId=e.currentAdapterSessionId,l.currentAdapterSessionIdState=e.currentAdapterSessionIdState,u=!0}return{outcome:`settled`,revision:o+1,currency:{adapterSessionId:c,...s},sessionSnapshotUpdated:u}}function ke(e,t,n){let r=V(e.claims,t);if(!(r===void 0||r.claimId===n))throw Error(`UNIQUE constraint failed: adapter_session_claims.claim_token (uniq_adapter_session_claims_token): "${t}" is already in use`)}function Ae(e,t){if(!(t===void 0||t.agentId!==e.agentId||t.status!==`held`||t.ownerInstanceId!==null&&t.ownerInstanceId!==e.ownerInstance.instanceId))return{generation:t,rollback:()=>{}}}function je(e,t,n){if(t.ownerInstanceId!==null)return t;let r={...t,ownerInstanceId:n};return e.claims.set(r.claimId,structuredClone(r)),r}function Me(e,t,n){let{machineId:r,adapterId:i,agentId:a}=t,o=B(e.claims,r,i,n),s,c,l=Ae(t,o);if(l!==void 0)s=l.generation,c=l.rollback;else if(o!==void 0&&!G(e,{machineId:r,agentId:a,ownerInstanceId:t.ownerInstance.instanceId,topology:t.topology},o))return{outcome:`already-claimed`,holder:structuredClone(o)};else{let l=Date.now(),u=o?.claimId??crypto.randomUUID();ke(e,t.movement.claimToken,u),s={claimId:u,machineId:r,adapterId:i,adapterName:t.adapterName,providerSessionId:n,sessionId:t.sessionId,agentId:a,ownerInstanceId:t.ownerInstance.instanceId,claimToken:t.movement.claimToken,fence:H(e,a,o?.fence??0),status:`held`,claimedAt:l,updatedAt:l},e.claims.set(u,structuredClone(s)),c=o===void 0?()=>{e.claims.delete(u)}:()=>{e.claims.set(u,structuredClone(o))}}let u=t.movement.kind===`confirmed`?Array.from(e.claims.values()).filter(e=>e.agentId===a&&e.status===`held`&&e.claimId!==s.claimId):[];for(let t of u)e.claims.delete(t.claimId);return{generation:s,releasedProviderSessionIds:u.map(e=>e.providerSessionId),rollback:()=>{for(let t of u)e.claims.set(t.claimId,structuredClone(t));c()}}}function Ne(e,t){if(e.kind===`confirmed`)return{providerSessionId:e.providerSessionId,currency:{currentAdapterSessionId:e.providerSessionId,currentAdapterSessionIdState:`confirmed`}};let n=c(q(t));return n===null?null:{providerSessionId:n,currency:{currentAdapterSessionId:null,currentAdapterSessionIdState:`moved`}}}function Pe(e,t){return e.on(i.read,e=>{let{agentId:n}=e.payload,r=t.agents.get(n);if(r===void 0){e.setResult({ownership:null});return}let i=Array.from(t.claims.values()).filter(e=>e.agentId===n).sort((e,t)=>e.fence-t.fence||e.claimId.localeCompare(t.claimId));e.setResult({ownership:{agentId:n,sessionId:r.sessionId,currency:q(r),revision:r.revision??0,currencyFence:r.currencyFence??0,claims:i.map(e=>structuredClone(e))}})})}function $(e,t){return e.on(i.settleCurrency,e=>{let n=t.agents.get(e.payload.agentId);if(n===void 0){e.setResult({outcome:`not-found`});return}e.setResult(Q(t,n,e.payload))})}function Fe(e,t){return e.on(i.finalizeRecovery,e=>{let{agentId:n,attemptId:r,binding:i,action:a}=e.payload,o=t.agents.get(n);if(o===void 0||o.status!==`starting`||o.recoveryAttemptId!==r||o.adapterId!==i.adapterId||o.runtimeOwner?.machineId!==i.ownerMachineId||o.runtimeOwner?.instanceId!==i.ownerInstanceId){e.setResult({applied:!1});return}a.kind===`rollback`?(o.status=a.preimage.status,o.adapterId=a.preimage.adapterId,o.runtimeOwner=a.preimage.binding===void 0?void 0:{machineId:a.preimage.binding.ownerMachineId,instanceId:a.preimage.binding.ownerInstanceId},o.recoveryAttemptId=a.preimage.recoveryAttemptId):(o.status=a.kind===`succeeded`?`idle`:`dead`,o.recoveryAttemptId=void 0),o.lastActivityAt=Date.now(),e.setResult({applied:!0})})}function Ie(e,t){return e.on(i.settleMovement,e=>{let n=r.parse(e.payload),i=n.ownerInstance;if(i===void 0)throw Error(`session ownership movement requires ownerInstance`);let a=U(i.instanceId,n.machineId),o=t.runtimeInstances.has(a);W(t,i.instanceId,n.machineId,Date.now());let s={...n,ownerInstance:i},c=t.agents.get(n.agentId);if(c===void 0||c.sessionId!==n.sessionId){o||t.runtimeInstances.delete(a),e.setResult({outcome:`not-found`});return}if(c.status===`disposed`){o||t.runtimeInstances.delete(a),e.setResult({outcome:`agent-disposed`});return}let l=Ne(s.movement,c);if(l===null){o||t.runtimeInstances.delete(a),e.setResult({outcome:`idempotent`,revision:c.revision??0,currency:q(c),sessionSnapshotUpdated:!1,claim:null});return}let u=Me(t,s,l.providerSessionId);if(!(`generation`in u)){o||t.runtimeInstances.delete(a),e.setResult(u);return}let d=Q(t,c,{agentId:n.agentId,claimToken:u.generation.claimToken,fence:u.generation.fence,expectedRevision:n.expectedRevision,target:l.currency});if(d.outcome!==`settled`){u.rollback(),o||t.runtimeInstances.delete(a),e.setResult(d.outcome===`idempotent`?{...d,claim:structuredClone(u.generation)}:d);return}let f=je(t,u.generation,i.instanceId);e.setResult({outcome:`settled`,revision:d.revision,currency:d.currency,sessionSnapshotUpdated:d.sessionSnapshotUpdated,releasedProviderSessionIds:u.releasedProviderSessionIds,claim:structuredClone(f)})})}function Le(e,t){return e.on(i.releaseAgentClaims,e=>{let{agentId:n,claimToken:r,disposition:i}=e.payload,a=Array.from(t.claims.values()).filter(e=>e.agentId===n&&(r===void 0||e.claimToken===r));if(i===`released`){for(let e of a)t.claims.delete(e.claimId);e.setResult({releasedProviderSessionIds:a.map(e=>e.providerSessionId),markedClaims:[],claimTokenNotFound:r!==void 0&&a.length===0});return}let o=Date.now(),s=a.map(e=>{let n={...e,status:i,updatedAt:o};return t.claims.set(e.claimId,structuredClone(n)),n});e.setResult({releasedProviderSessionIds:[],markedClaims:s,claimTokenNotFound:r!==void 0&&a.length===0})})}function Re(e,t){return e.on(i.release,e=>{let{agentId:n,claimToken:r,disposition:i}=e.payload,a=V(t.claims,r);if(a===void 0){e.setResult({outcome:`not-found`});return}if(a.agentId!==n){e.setResult({outcome:`not-owner`,holder:structuredClone(a)});return}if(i===`released`){t.claims.delete(a.claimId),e.setResult({outcome:`released`});return}let o={...a,status:i,updatedAt:Date.now()};t.claims.set(a.claimId,structuredClone(o)),e.setResult({outcome:`marked`,claim:structuredClone(o)})})}function ze(e,t){return e.on(i.listClaims,e=>{let{machineId:n,adapterId:r,providerSessionId:i,statuses:a}=e.payload,o=Array.from(t.claims.values()).filter(e=>e.machineId===n&&(r===void 0||e.adapterId===r)&&(i===void 0||e.providerSessionId===i)&&(a===void 0||a.includes(e.status)));o.sort((e,t)=>e.claimedAt-t.claimedAt||e.claimId.localeCompare(t.claimId)),e.setResult({claims:o.map(e=>structuredClone(e))})})}function Be(e,t){return e.on(i.retireInstance,e=>{let n=Date.now(),r=0;for(let[i,a]of t.runtimeInstances)a.instanceId!==e.payload.instanceId||a.retiredAt!==null||(t.runtimeInstances.set(i,{...a,retiredAt:n}),r+=1);e.setResult({retiredMachines:r})})}function Ve(e,t){return e.on(i.getRuntimeInstance,e=>{let n=t.runtimeInstances.get(U(e.payload.instanceId,e.payload.machineId));e.setResult({instance:n===void 0?null:structuredClone(n)})})}function He(e,t=d()){let n=[Pe(e,t),Fe(e,t),e.on(i.claim,e=>{e.setResult(De(t,e.payload))}),$(e,t),Ie(e,t),Re(e,t),Le(e,t),ze(e,t),Be(e,t),Ve(e,t)];return()=>{for(let e=n.length-1;e>=0;--e)n[e]?.()}}export{S as a,h as c,m as d,d as f,C as i,te as l,ve as n,_ as o,N as r,g as s,He as t,p as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{agents as e}from"./services/session/storage/schema.mjs";import{z as t}from"zod";import{AgentStatusSchema as n,MakaioSessionAgentSchema as r}from"@makaio/framework/contracts";import{createStorageNamespaceDefinition as i}from"@makaio/framework/storage";const a=i(`agent`,{schemas:{get:{request:t.object({agentId:t.string()}),response:t.object({agent:r.nullable()})},set:{request:t.object({agentId:t.string(),agent:r}),response:t.object({success:t.boolean()})},delete:{request:t.object({agentId:t.string()}),response:t.object({success:t.boolean()})},listByAdapter:{request:t.object({adapterName:t.string(),status:t.enum([...n.options,`all`]).optional()}),response:t.object({agents:t.array(r)})},listBySession:{request:t.object({sessionId:t.string()}),response:t.object({agents:t.array(r)})},updateStatus:{request:t.object({agentId:t.string(),status:n,expectedStatus:t.array(n).nonempty().optional()}),response:t.object({success:t.boolean(),transitioned:t.boolean()})},updateActivity:{request:t.object({agentId:t.string(),lastActivityAt:t.number()}),response:t.object({success:t.boolean()})},updateRuntime:{request:t.object({agentId:t.string(),adapterId:t.string().optional(),runtimeOwner:t.object({machineId:t.string(),instanceId:t.string()}).optional(),adapterSessionId:t.string().optional(),cwd:t.string().optional(),model:t.string().optional(),allowedDirectories:t.array(t.string()).optional(),providerConfigId:t.string().nullable().optional()}).refine(e=>e.adapterId!==void 0||e.runtimeOwner!==void 0||e.adapterSessionId!==void 0||e.cwd!==void 0||e.model!==void 0||e.allowedDirectories!==void 0||e.providerConfigId!==void 0,{message:`At least one runtime field (adapterId, runtimeOwner, adapterSessionId, cwd, model, allowedDirectories, or providerConfigId) must be provided`}),response:t.object({success:t.boolean()})}},extensions:{drizzle:{agents:e}}}),o=a.subjects;function s(e){return e===null?null:{claimId:e.claimId,claimToken:e.claimToken,fence:e.fence,ownerInstanceId:e.ownerInstanceId,status:e.status}}function c(e,t){return e?.claimId===t?.claimId&&e?.claimToken===t?.claimToken&&e?.fence===t?.fence&&e?.ownerInstanceId===t?.ownerInstanceId&&e?.status===t?.status}function l(e,t,n){let r=e.recoveryGuard;if(r===void 0)return;if(t.revision!==r.expectedRevision||t.currencyFence!==r.expectedCurrencyFence||t.currency.adapterSessionId!==r.expectedCurrency.adapterSessionId||t.currency.currentAdapterSessionId!==r.expectedCurrency.currentAdapterSessionId||t.currency.currentAdapterSessionIdState!==r.expectedCurrency.currentAdapterSessionIdState)return{outcome:`currency-changed`,revision:t.revision,currencyFence:t.currencyFence,currency:t.currency};let i=r.expectedPreimage;if(t.status!==i.status||t.adapterId!==i.adapterId||t.runtimeOwner?.machineId!==i.binding?.ownerMachineId||t.runtimeOwner?.instanceId!==i.binding?.ownerInstanceId||t.recoveryAttemptId!==i.recoveryAttemptId)return{outcome:`recovery-conflict`,status:t.status,ownerGeneration:s(n)};let a=s(n),o=r.ownerGeneration;if(t.status!==r.expectedStatus||!c(a,o))return{outcome:`recovery-conflict`,status:t.status,ownerGeneration:a}}export{o as a,a as i,s as n,c as r,l as t};
|