@makaio/framework 1.0.0-dev-1784889676396 → 1.0.0-dev-1785344643235
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +3 -2
- package/dist/{account-identity-CP4DC0DL.mjs → account-identity-DFx8pwKL.mjs} +1 -1
- package/dist/{adapter-CYobxqN_.mjs → adapter-D5c5LrPN.mjs} +1 -1
- package/dist/adapters/claude/index.d.mts +204 -27
- package/dist/adapters/claude/index.mjs +3 -3
- package/dist/adapters/config/index.d.mts +2 -2
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +49 -4
- package/dist/adapters/index.mjs +3 -3
- package/dist/adapters/node.d.mts +1 -1
- package/dist/adapters/node.mjs +1 -1
- package/dist/{artifact-DCkizHkS.mjs → artifact-DGiXqb11.mjs} +1 -1
- package/dist/attempt-record-codec-CqO1_XnE.mjs +1 -0
- package/dist/{auth-C3NOWqTU.mjs → auth-DGEdiHF6.mjs} +1 -1
- package/dist/authority-state-bootstrap-GPL_tqaT.mjs +1 -0
- package/dist/bus/index.mjs +1 -1
- package/dist/{canonical-model-EMRYCVjX.mjs → canonical-model-BAytQ4NV.mjs} +1 -1
- package/dist/capabilities-BQEp34ir.mjs +1 -0
- package/dist/{client-OYk0Ttck.mjs → client-DbS847wW.mjs} +1 -1
- package/dist/clients/index.d.mts +5 -3
- package/dist/clients/index.mjs +1 -1
- package/dist/clients/managed-install.d.mts +1 -1
- package/dist/clients/managed-install.mjs +1 -1
- package/dist/{compression-CZ_6fYq8.mjs → compression-74fFeBha.mjs} +1 -1
- package/dist/{config-namespace-DTA6EQL8.mjs → config-namespace-TVX-hG4I.mjs} +1 -1
- package/dist/{context-resolution-B9ANWbG0.d.mts → context-resolution-BQBk4Ish.d.mts} +6 -4
- package/dist/contracts/adapter/index.d.mts +2 -2
- 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/canonical-model/index.d.mts +1 -1
- package/dist/contracts/canonical-model/index.mjs +1 -1
- package/dist/contracts/capabilities/index.d.mts +2 -0
- package/dist/contracts/capabilities/index.mjs +1 -0
- package/dist/contracts/client/index.d.mts +2 -2
- package/dist/contracts/client/index.mjs +1 -1
- package/dist/contracts/common/index.d.mts +1 -1
- package/dist/contracts/config/index.d.mts +24 -2
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +4 -4
- 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 +1682 -9431
- 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/session/index.d.mts +2 -2
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +2 -2
- package/dist/contracts/shared/index.mjs +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/skill/index.mjs +1 -1
- package/dist/contracts/telemetry/index.d.mts +1 -1
- package/dist/contracts/telemetry/index.mjs +1 -1
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/timeout/index.mjs +1 -1
- package/dist/contracts/toast/index.mjs +1 -1
- package/dist/contracts/variant/index.d.mts +1 -1
- package/dist/contracts/variant/index.mjs +1 -1
- package/dist/contracts/worker-node/index.d.mts +2 -0
- package/dist/contracts/worker-node/index.mjs +1 -0
- package/dist/contracts/workflow/index.d.mts +3 -3
- package/dist/contracts/workflow/index.mjs +1 -1
- package/dist/{definition-K3m51lgO.mjs → definition-CJfiv8xm.mjs} +1 -1
- package/dist/{detached-extension-handle-BsywhHfk.mjs → detached-extension-handle-Ddfquy5_.mjs} +1 -1
- package/dist/drizzle/0030_remote-worker-execution.sql +6 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/execution-attempt-repository-DWXKY41_.d.mts +1056 -0
- package/dist/execution-target-Cf645pDj.mjs +1 -0
- package/dist/{extension-Cgg45Xk1.mjs → extension-DCA4pYrY.mjs} +1 -1
- package/dist/extension-hjOPs10e.mjs +1 -0
- package/dist/{filesystem-service-Cupz_Z7S.mjs → filesystem-service-DlP2HfDg.mjs} +1 -1
- package/dist/framework-packages-C3RWfJDk.mjs +1 -0
- package/dist/git/index.mjs +1 -1
- package/dist/{globby-DWp7V-P2.mjs → globby-1yCVCk8s.mjs} +1 -1
- package/dist/{handlers-cMBmexF4.mjs → handlers-CfnLyLfE.mjs} +1 -1
- package/dist/{harness-DflvHAGV.mjs → harness-DpwsFsE7.mjs} +1 -1
- package/dist/{index-BhXCCgJV2.d.mts → index-4fE_hUP02.d.mts} +1 -1
- package/dist/{index-BMx59xb7.d.mts → index-8gKx-OVP.d.mts} +13 -7
- package/dist/index-B0Kf_OWi.d.mts +267 -0
- package/dist/{index-DRiTICBU.d.mts → index-BAXkicoQ.d.mts} +1 -1
- package/dist/{index-CnXXq6sW.d.mts → index-BC79QrGC.d.mts} +10 -10
- package/dist/{index-CvmWRumB.d.mts → index-BQLUVXIB.d.mts} +1024 -888
- package/dist/{index-CKO9S6oo.d.mts → index-BXD3kEs_.d.mts} +28 -10
- package/dist/{index-DUf47Jn_.d.mts → index-BskPjMet.d.mts} +8 -8
- package/dist/{index-CjyfQ_vQ.d.mts → index-CL-0NeQW.d.mts} +8 -5
- package/dist/{index-Cw7_69gV.d.mts → index-CRvpVIqA.d.mts} +1 -1
- package/dist/{index-7FjcxGlK.d.mts → index-CUvNKYkV.d.mts} +1 -1
- package/dist/{index-CtUTCAJ6.d.mts → index-CVaRZoiu.d.mts} +4 -4
- package/dist/{index-Cw84_Dqi.d.mts → index-CnMu8BQl.d.mts} +4 -4
- package/dist/{index-DaMfTvfz.d.mts → index-DA9g2A5P.d.mts} +1 -1
- package/dist/{index-Bi5jFT9S.d.mts → index-DJAmSnuh.d.mts} +12 -12
- package/dist/{index-pjATMrvJ.d.mts → index-DkiTJM5p.d.mts} +693 -31
- package/dist/{index-jbgHR5J2.d.mts → index-GHASUiem.d.mts} +1 -1
- package/dist/{index-BDDbcWNI.d.mts → index-HsTxm-R3.d.mts} +3 -3
- package/dist/{index-Bs3CXR232.d.mts → index-I5YG-qrb2.d.mts} +6 -6
- package/dist/{index-0Ju2i8gV.d.mts → index-SsBHjUqA.d.mts} +204 -165
- package/dist/index-XZyMxxnU.d.mts +1602 -0
- package/dist/{index-dkvGHN10.d.mts → index-brqfk9JQ.d.mts} +6 -6
- package/dist/{index-D43lQCHs.d.mts → index-q0Tiqems.d.mts} +131 -131
- package/dist/index-w_FmghjT.d.mts +7295 -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 +14 -8
- 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-BeMM738r.mjs → lib-C7-s68uf.mjs} +1 -1
- package/dist/{lib-B7TpTzkG.mjs → lib-DErgth_E.mjs} +2 -2
- package/dist/{load-extensions-BLdG90Zi.d.mts → load-extensions-BxsDB87B.d.mts} +1 -1
- package/dist/{load-extensions-CUmFCcYi.mjs → load-extensions-D0DfjYLC.mjs} +1 -1
- package/dist/{materialization-s8eR1eQ4.mjs → materialization-Jd198K3y.mjs} +1 -1
- package/dist/mcp-http-server/index.d.mts +305 -79
- package/dist/mcp-http-server/index.mjs +4 -4
- package/dist/model-BGgVmRnN.mjs +1 -0
- package/dist/modes-BheyN7SS.mjs +1 -0
- package/dist/{namespace-DwQtzlY-.mjs → namespace-BqxtpNAn.mjs} +1 -1
- package/dist/{namespace-BHliaabz.d.mts → namespace-DBm9K23m.d.mts} +6 -6
- package/dist/{namespace-zOfq1Uhn.d.mts → namespace-DI4Yx_xu.d.mts} +27 -27
- package/dist/namespace-DJfUADSV.mjs +1 -0
- package/dist/{namespace-BphMM6S82.d.mts → namespace-DPgxPa8m2.d.mts} +1 -1
- package/dist/{namespace-Bd49QmzS.d.mts → namespace-DWCEo-9M.d.mts} +0 -60
- package/dist/{namespace-CriPb5wY.d.mts → namespace-jPUGV-b2.d.mts} +42 -42
- package/dist/{native-session-supervisor-Bgz-Q1WH.mjs → native-session-supervisor-DRx0MX-d.mjs} +1 -1
- package/dist/node/bus-server/index.d.mts +1 -1
- package/dist/node/bus-server/index.mjs +1 -1
- package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
- package/dist/node/bus-server/server-lifecycle.mjs +1 -1
- package/dist/node/transports/index.d.mts +81 -9
- package/dist/node/transports/index.mjs +2 -2
- package/dist/{orchestrator-shared-CY7Tu7kZ.mjs → orchestrator-shared-BxmHCPvx.mjs} +1 -1
- package/dist/package-CNUPPcU1.mjs +7 -0
- package/dist/package-DWMxGfzK.d.mts +827 -0
- package/dist/{package-DKnzOvoR.mjs → package-Dft_RItb.mjs} +1 -1
- package/dist/package.json +1 -1
- package/dist/{packages-zDnokBpl.mjs → packages-DtEEP0Vt.mjs} +1 -1
- package/dist/{profile-BRi6K6am.mjs → profile-BTAI31Nt.mjs} +1 -1
- package/dist/{provider-context-DOsjOjiR.mjs → provider-context-Dq53Cgzz.mjs} +1 -1
- package/dist/{provider-context-BYkMl--1.mjs → provider-context-PZIQWcqQ.mjs} +1 -1
- package/dist/provider-operation-Cxoe2SUr.d.mts +207 -0
- package/dist/providers/index.mjs +1 -1
- package/dist/{registry-Dw6l7k3e.mjs → registry-wfF2uTty.mjs} +29 -29
- package/dist/{resolved-O2XXjTeu.mjs → resolved-DZgqql2Z.mjs} +1 -1
- package/dist/rules/index.d.mts +1 -1
- package/dist/rules/index.mjs +1 -1
- package/dist/rules/schemas.d.mts +1 -1
- package/dist/runtime-bun/index.mjs +1 -1
- package/dist/runtime-node/extension-discovery.d.mts +1 -1
- package/dist/runtime-node/extension-validation.d.mts +1 -1
- package/dist/runtime-node/extension-validation.mjs +1 -1
- package/dist/runtime-node/index.d.mts +4 -4
- package/dist/runtime-node/index.mjs +24 -24
- package/dist/runtime-node/makaio-config.d.mts +1 -1
- package/dist/runtime-node/makaio-config.mjs +1 -1
- package/dist/runtime-node/static/model-registry.yaml +348 -0
- package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
- package/dist/runtime-node/workflow-worker/index.mjs +1 -1
- package/dist/runtime-node/workflow-worker/worker-entry.d.mts +7 -4
- package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
- package/dist/{schema-BO9TgmOs.d.mts → schema-Bwr_NrOS.d.mts} +2 -2
- package/dist/{schema-BI0aCHvV.mjs → schema-Dd-e89MO.mjs} +1 -1
- package/dist/{schemas-B5tMYfhC.d.mts → schemas-C4yUXs4G.d.mts} +4 -4
- package/dist/schemas-CRB2O5zo.mjs +1 -0
- package/dist/{schemas-Dgj3WaOI.mjs → schemas-Cm09dXL4.mjs} +1 -1
- package/dist/{schemas-BJ8VMXhO.mjs → schemas-DaHQzpgm.mjs} +1 -1
- package/dist/{schemas-BDC2Nqj1.d.mts → schemas-ENwK6jmV.d.mts} +14 -14
- package/dist/{schemas-ChF2z4RB.d.mts → schemas-N6x2z7Lf.d.mts} +0 -45
- package/dist/schemas-tDf_WiC8.mjs +1 -0
- package/dist/selection-BNwTKEVT.mjs +1 -0
- package/dist/service-base/index.d.mts +47 -2
- package/dist/service-base/index.mjs +1 -1
- package/dist/services/adapter-runtime/index.d.mts +3 -3
- package/dist/services/adapter-runtime/index.mjs +1 -1
- package/dist/services/adapter-runtime/namespace.d.mts +1 -1
- package/dist/services/adapter-runtime/schemas.d.mts +1 -1
- package/dist/services/adapter-subsystem/index.d.mts +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/capability/index.d.mts +1 -1
- package/dist/services/capability/index.mjs +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +7 -7
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/execution-target/index.d.mts +4 -4
- package/dist/services/execution-target/index.mjs +1 -1
- package/dist/services/execution-target/namespace.d.mts +1 -1
- package/dist/services/execution-target/namespace.mjs +1 -1
- package/dist/services/execution-target/schemas.d.mts +1 -1
- package/dist/services/execution-target/schemas.mjs +1 -1
- package/dist/services/filesystem/index.d.mts +1 -1
- package/dist/services/filesystem/index.mjs +1 -1
- package/dist/services/git/namespace.d.mts +2 -2
- package/dist/services/git/namespace.mjs +1 -1
- package/dist/services/git/schemas.d.mts +2 -2
- package/dist/services/git/schemas.mjs +1 -1
- package/dist/services/harness/index.d.mts +3 -3
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/index.d.mts +86 -371
- 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.d.mts +2 -2
- package/dist/services/log-import/namespace.mjs +1 -1
- package/dist/services/log-import/schemas.d.mts +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 +9 -9
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/testing/index.mjs +1 -1
- 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 +14 -14
- package/dist/services/settings/namespace.mjs +1 -1
- package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
- package/dist/services/settings/storage/clients-namespace.mjs +1 -1
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +1 -1
- package/dist/services/subagent/index.mjs +1 -1
- package/dist/services/subagent-template/index.d.mts +2 -2
- package/dist/services/subagent-template/namespace.d.mts +1 -1
- package/dist/services/subagent-template/schemas.d.mts +1 -1
- package/dist/services/tool-approval/index.d.mts +1 -1
- package/dist/services/tool-approval/index.mjs +1 -1
- package/dist/services/tools/index.d.mts +1 -1
- package/dist/services/tools/index.mjs +1 -1
- package/dist/services/tray-menu/index.d.mts +3 -3
- package/dist/services/tray-menu/index.mjs +1 -1
- package/dist/services/tray-menu/namespace.d.mts +1 -1
- package/dist/services/tray-menu/schemas.d.mts +1 -1
- package/dist/services/turn/index.d.mts +1 -1
- package/dist/services/turn/namespace.d.mts +1 -1
- package/dist/services/workflow-transitions/index.d.mts +2 -0
- package/dist/services/workflow-transitions/index.mjs +1 -0
- package/dist/{session-Carng3Yk.mjs → session-BOGCd18q.mjs} +1 -1
- package/dist/{session-idI1jk5X.mjs → session-BTFiDoGz.mjs} +1 -1
- package/dist/{session-lineage-Cte63dGx.d.mts → session-lineage-B_JW5LpF.d.mts} +1 -1
- package/dist/{shared-RP_KARKF.mjs → shared-BQ0CHIVy.mjs} +1 -1
- package/dist/{skill-CpNjWFuE.mjs → skill-BR6rkfLe.mjs} +1 -1
- package/dist/{src-XihJcAQS.mjs → src-DD0v-nIj.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 +50 -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/testing/drizzle-harness.d.mts +44 -3
- package/dist/testing/drizzle-harness.mjs +1 -1
- package/dist/{tool-approval-service-fIZ9x0kL.mjs → tool-approval-service-kBA0fRzm.mjs} +1 -1
- package/dist/tools-PdG9fO1M.mjs +1 -0
- package/dist/{transition-BodgGLZx.d.mts → transition-DuVzKt8-.d.mts} +3 -42
- package/dist/{types-LspCUW09.d.mts → types-B1MNcwgH.d.mts} +1 -1
- package/dist/{types-Bzxo7ATi.d.mts → types-BqVAOzJP.d.mts} +48 -48
- package/dist/{types-DBb5jY4Z.d.mts → types-CJ_QZ1yW.d.mts} +47 -3
- package/dist/ui-kernel/index.d.mts +1 -1
- package/dist/ui-kernel/index.mjs +1 -1
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/utils/index.d.mts +18 -4
- package/dist/utils/index.mjs +1 -1
- package/dist/{version-BbWrAPld.mjs → version-CoCeMxDT.mjs} +1 -1
- package/dist/{view-builder-tU7iaxrk.d.mts → view-builder-CvoSL2oL.d.mts} +2 -1
- package/dist/visibility-qhGWmpSJ.mjs +1 -0
- package/dist/worker-node-Bl9_vqYi.mjs +1 -0
- package/dist/worker-node-DZTuT1DS.mjs +1 -0
- package/dist/workflow-BfDbgtIQ.mjs +1 -0
- package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -0
- package/dist/workflow-engine/execution-attempt-repository.mjs +1 -0
- package/dist/workflow-engine/index.d.mts +619 -685
- 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 +2 -0
- package/dist/workflow-engine/provider-operation.mjs +1 -0
- package/dist/workflow-engine/testing/index.d.mts +146 -0
- package/dist/workflow-engine/testing/index.mjs +1 -0
- package/dist/workflow-engine/testing/sqlite.d.mts +22 -0
- package/dist/workflow-engine/testing/sqlite.mjs +130 -0
- package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
- package/dist/workflow-transitions-DSc45ixc.mjs +1 -0
- package/dist/workflow-worker-BN9XPxQO.mjs +1 -0
- package/package.json +20 -3
- package/dist/authority-state-bootstrap-C_-F_dtq.mjs +0 -1
- package/dist/execution-target-CsZXIvli.mjs +0 -1
- package/dist/extension-CjTu6mzW.mjs +0 -1
- package/dist/model-uE5IyUFJ.mjs +0 -1
- package/dist/namespace-C05pkLbN.mjs +0 -1
- package/dist/package-BSG1681x.d.mts +0 -427
- package/dist/package-DW1Upu8E.mjs +0 -7
- package/dist/schemas-BRxU_oqL.mjs +0 -1
- package/dist/schemas-C-J4W1ID.mjs +0 -1
- package/dist/selection-YRuVSdck.mjs +0 -1
- package/dist/tools-Cs2DwjCC.mjs +0 -1
- package/dist/visibility-Cb62p9bv.mjs +0 -1
- package/dist/workflow-BX-FxDb0.mjs +0 -1
- package/dist/workflow-worker-DR9qYOFc.mjs +0 -1
- /package/dist/{adapter-auth-runtime-DFBLXD5K.mjs → adapter-auth-runtime-DO-FVTXg.mjs} +0 -0
- /package/dist/{adapter-binding-Dfk_g-lP.d.mts → adapter-binding-DQchUtrK.d.mts} +0 -0
- /package/dist/{ajv-C8r45sFs.mjs → ajv-DD3SIL2i.mjs} +0 -0
- /package/dist/{attach-error-DCnzW-Yz.mjs → attach-error-C3tngg6J.mjs} +0 -0
- /package/dist/{await-trigger-UceeyCyi.mjs → await-trigger-I3lrepb8.mjs} +0 -0
- /package/dist/{base-orchestrator-5yH3l39s.d.mts → base-orchestrator-BilsQNW1.d.mts} +0 -0
- /package/dist/{capability-service-BzKBK0n2.mjs → capability-service-BqiLlRGA.mjs} +0 -0
- /package/dist/{client-DYEHDiJN.d.mts → client-B--e2qcU.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-C12PvQmz.d.mts → client-binary-version-verifier-CgjM_vGF.d.mts} +0 -0
- /package/dist/{client-binary-version-verifier-Dv7TGFxh.mjs → client-binary-version-verifier-taewmKTY.mjs} +0 -0
- /package/dist/{clients-namespace-DcFmhtLv.d.mts → clients-namespace-DfxjG2ZP.d.mts} +0 -0
- /package/dist/{config-namespace-DmP7NVju.d.mts → config-namespace-BCqvufbD.d.mts} +0 -0
- /package/dist/{create-static-mount-BLbqGmva.mjs → create-static-mount-bbQhTt6W.mjs} +0 -0
- /package/dist/{cross-spawn-BXxQUsPS.mjs → cross-spawn-B57KZuns.mjs} +0 -0
- /package/dist/{cursor-storage-DCj4uUxr.mjs → cursor-storage-DIFK_9hg.mjs} +0 -0
- /package/dist/{definition-BEvV7tbD.d.mts → definition-gnKgXU91.d.mts} +0 -0
- /package/dist/{definitions-C1pgx0Nq.mjs → definitions-xrrY0wgz.mjs} +0 -0
- /package/dist/{descriptor-to-package-VfB8lK5w.mjs → descriptor-to-package-DvF08krT.mjs} +0 -0
- /package/dist/{drizzle-oCH9H53q.mjs → drizzle-z_0SiGY8.mjs} +0 -0
- /package/dist/{esm-ClQELElL.mjs → esm-CltRnX8_.mjs} +0 -0
- /package/dist/{event-BOLVCfhH.mjs → event-CmVjR6Ib.mjs} +0 -0
- /package/dist/{extension-discovery-B6p3iZaV.d.mts → extension-discovery-CQRdbVQ6.d.mts} +0 -0
- /package/dist/{extension-namespace-vrh4ERXR.mjs → extension-namespace-Yu41YepM.mjs} +0 -0
- /package/dist/{facet-DqPBpqkl.mjs → facet-BCI00njh.mjs} +0 -0
- /package/dist/{filesystem-service-CGdboor3.d.mts → filesystem-service-CQ9yVkSz.d.mts} +0 -0
- /package/dist/{handler-GGOD_ofd.mjs → handler-Cbv9FqDO.mjs} +0 -0
- /package/dist/{hook-responses-Dg8wDvRo.d.mts → hook-responses-Dh1PWXqJ.d.mts} +0 -0
- /package/dist/{host-BfgdjlII.mjs → host-Caq6ZfSJ.mjs} +0 -0
- /package/dist/{identity-BmEHHoBw.mjs → identity-D6guMtmi.mjs} +0 -0
- /package/dist/{index-DEchpaya.d.mts → index-BIdsFcQs2.d.mts} +0 -0
- /package/dist/{index-DquI_1X5.d.mts → index-BVRQEpAg.d.mts} +0 -0
- /package/dist/{index-Brdc35b-.d.mts → index-BaZeoZoS.d.mts} +0 -0
- /package/dist/{index-BSmwpgkR.d.mts → index-ByKi34v5.d.mts} +0 -0
- /package/dist/{index-oYGf2zIe.d.mts → index-CGZQVTid.d.mts} +0 -0
- /package/dist/{index-Chy9aknK.d.mts → index-CMJZ2Z8m.d.mts} +0 -0
- /package/dist/{index-Bd1GC1kU2.d.mts → index-CjdRdsd0.d.mts} +0 -0
- /package/dist/{index-DYUxNOIX.d.mts → index-Cv-o5Krs.d.mts} +0 -0
- /package/dist/{index-DC0yVsYL.d.mts → index-DN4NOCqN2.d.mts} +0 -0
- /package/dist/{index-CcsJnJOD.d.mts → index-DR40QWlw.d.mts} +0 -0
- /package/dist/{index-BG9-vQHD.d.mts → index-DZunhZec.d.mts} +0 -0
- /package/dist/{index-BsBvs0aK.d.mts → index-DjgLchuQ.d.mts} +0 -0
- /package/dist/{index-pgYFJ5h6.d.mts → index-Dm1nUxCF.d.mts} +0 -0
- /package/dist/{index-C96LlS5m.d.mts → index-Ds5_rDEJ.d.mts} +0 -0
- /package/dist/{index-GYZs75UP.d.mts → index-dtsLKOID.d.mts} +0 -0
- /package/dist/{index-8fJ6dkzR.d.mts → index-gUhidukN.d.mts} +0 -0
- /package/dist/{index-BgpYhR2z.d.mts → index-jTaAHsul.d.mts} +0 -0
- /package/dist/{index-Ci3_i-WC2.d.mts → index-sS6KUlrx.d.mts} +0 -0
- /package/dist/{index-CFeY8lfU.d.mts → index-vA--0lOM.d.mts} +0 -0
- /package/dist/{index-BUYyZm5I.d.mts → index-vcSj12YQ.d.mts} +0 -0
- /package/dist/{index-CdEhEXlY.d.mts → index-ye0oklfU.d.mts} +0 -0
- /package/dist/{json-value-BwVdTylT.d.mts → json-value-Brslhqbm.d.mts} +0 -0
- /package/dist/{jsonl-transport-D8RBF0dK.mjs → jsonl-transport-bQl3JwIu.mjs} +0 -0
- /package/dist/{lib-3_xcE8J-.mjs → lib-DOBXZmYX.mjs} +0 -0
- /package/dist/{model-registry-CoegIvks.mjs → model-registry-CmgcPDH3.mjs} +0 -0
- /package/dist/{model-registry-BneK5SGo.mjs → model-registry-xyBKSye-.mjs} +0 -0
- /package/dist/{namespace-CDO4rY11.mjs → namespace-B8uKAzWJ.mjs} +0 -0
- /package/dist/{namespace-BsF9IxJ9.d.mts → namespace-BOkKoq34.d.mts} +0 -0
- /package/dist/{namespace-SQAGytmu.d.mts → namespace-Blp4c8GK.d.mts} +0 -0
- /package/dist/{namespace-BeED_Ojz.mjs → namespace-C-9si-fV.mjs} +0 -0
- /package/dist/{namespace-De9Mg3zv.d.mts → namespace-CErHuXtb.d.mts} +0 -0
- /package/dist/{namespace-BHj13hbA.mjs → namespace-CWGKCNZm.mjs} +0 -0
- /package/dist/{namespace-D7pE2QWv.mjs → namespace-CWUDFGOy.mjs} +0 -0
- /package/dist/{namespace-D9HNjIdc.d.mts → namespace-Cv1RFP7n.d.mts} +0 -0
- /package/dist/{namespace-CI313bRv.d.mts → namespace-Dkod-w11.d.mts} +0 -0
- /package/dist/{namespace-lWlqWTKu.d.mts → namespace-GPA7zots.d.mts} +0 -0
- /package/dist/{namespace-DWwWnLBu.mjs → namespace-HO2J9sO8.mjs} +0 -0
- /package/dist/{namespace-C238RqwB.mjs → namespace-YxU1xf-K.mjs} +0 -0
- /package/dist/{namespace-BetqZA7Z.d.mts → namespace-YytVKIgI.d.mts} +0 -0
- /package/dist/{namespace-B9CYb9Gh.d.mts → namespace-jDhZjw-i.d.mts} +0 -0
- /package/dist/{namespace-BSXHdCVh2.d.mts → namespace-tGRAod3o.d.mts} +0 -0
- /package/dist/{orchestrator-shared-BB6j8ezL.d.mts → orchestrator-shared-BHCv-l2O.d.mts} +0 -0
- /package/dist/{out-CFkI17mk.mjs → out-CvjtANXN.mjs} +0 -0
- /package/dist/{packages-DeIgn0Hn.d.mts → packages-BZ6pzFIq.d.mts} +0 -0
- /package/dist/{platform-CWhGFQFX.mjs → platform-Bv8llU9c.mjs} +0 -0
- /package/dist/{providers-CUnrif24.mjs → providers-Co5UszRH.mjs} +0 -0
- /package/dist/{providers-namespace-sPbGcZ6I.d.mts → providers-namespace-DjFkmvBR.d.mts} +0 -0
- /package/dist/{quick-lru-CTBjxfgD.mjs → quick-lru-CrOpWwrf.mjs} +0 -0
- /package/dist/{schema-cus0dJ81.mjs → schema-Db-y-09L.mjs} +0 -0
- /package/dist/{schema-introspection-BsWLmoFp.mjs → schema-introspection-DgWQCpwx.mjs} +0 -0
- /package/dist/{schemas-DYvvMd3c.d.mts → schemas-B1NWNASS.d.mts} +0 -0
- /package/dist/{schemas-CMyv7l7-.mjs → schemas-BGExwp3j.mjs} +0 -0
- /package/dist/{schemas-Dmij0PIc.d.mts → schemas-BO7uOum6.d.mts} +0 -0
- /package/dist/{schemas-BGS9RfqV.mjs → schemas-Bfxskx_2.mjs} +0 -0
- /package/dist/{schemas-BKKpQC4X2.d.mts → schemas-BtZqovRH.d.mts} +0 -0
- /package/dist/{schemas-BAvt2HDy.d.mts → schemas-CQyRBqD6.d.mts} +0 -0
- /package/dist/{schemas-D55eXBgl.d.mts → schemas-CR8hSqTy.d.mts} +0 -0
- /package/dist/{schemas-CWxf_Yut.mjs → schemas-CqRm0i9a.mjs} +0 -0
- /package/dist/{schemas-CiWCNQ9a2.d.mts → schemas-CwbYk_kZ.d.mts} +0 -0
- /package/dist/{schemas-CbMWN9-z.d.mts → schemas-DuIlOWR3.d.mts} +0 -0
- /package/dist/{schemas-B4FyOOJj.d.mts → schemas-miYxK_Z1.d.mts} +0 -0
- /package/dist/{semver-D3Y7uMEb.mjs → semver-DlM8znk4.mjs} +0 -0
- /package/dist/{server-lifecycle-C-3OgoKi.d.mts → server-lifecycle-Dsq56aqC.d.mts} +0 -0
- /package/dist/{server-lifecycle-DV6NMsgH.mjs → server-lifecycle-kmQ5PUDv.mjs} +0 -0
- /package/dist/{shared-schemas-BNCPgGYP.mjs → shared-schemas-DXwyMCwZ.mjs} +0 -0
- /package/dist/{src-ftBp6GpR.mjs → src-CCu8TwL6.mjs} +0 -0
- /package/dist/{storage-namespace-B1GI4elv.mjs → storage-namespace-BSrv0vXR.mjs} +0 -0
- /package/dist/{storage-namespace-definition-V8sc3drq.d.mts → storage-namespace-definition-BvlX0QV_.d.mts} +0 -0
- /package/dist/{storage-namespace-definition-4UYuij1r.mjs → storage-namespace-definition-CkMKt7-I.mjs} +0 -0
- /package/dist/{storage-namespace-9N9R61pI.d.mts → storage-namespace-dfywhXR3.d.mts} +0 -0
- /package/dist/{supports-color-DwW9N6YC.mjs → supports-color-DUugCQsK.mjs} +0 -0
- /package/dist/{telemetry-B42EMbZt.mjs → telemetry-Pr3oP2rk.mjs} +0 -0
- /package/dist/{timeout-CvONPl0l.mjs → timeout-DWDhddRJ.mjs} +0 -0
- /package/dist/{tray-menu-service-Dgedanv-.mjs → tray-menu-service-BBLa-Rcv.mjs} +0 -0
- /package/dist/{types-DkFvBdIY.d.mts → types-BrcjaNPZ.d.mts} +0 -0
- /package/dist/{types-DVLq657Y.d.mts → types-DHmPneIO.d.mts} +0 -0
- /package/dist/{types-Bju4dmAg.d.mts → types-b54n1o57.d.mts} +0 -0
- /package/dist/{ui-config-B2L3Xgqo.mjs → ui-config-CyCdlns_.mjs} +0 -0
- /package/dist/{variant-ByI-RZua.mjs → variant-krjlTdJt.mjs} +0 -0
- /package/dist/{window-registry-Qcnvlhp7.d.mts → window-registry-BDnZLPVx.d.mts} +0 -0
- /package/dist/{window-registry-DsWnCc8z.mjs → window-registry-I-imZHV_.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsonl-transport-
|
|
1
|
+
import{t as e}from"./jsonl-transport-bQl3JwIu.mjs";import{CorrelationTracker as t,DEFAULT_REQUEST_TIMEOUT_MS as n,handleCorrelationResponse as r,trackMessageCorrelation as i}from"@makaio/framework/bus";var a=class{name;spawnOptions;jsonl=null;handlers=new Set;correlations=new t;handshakeComplete=!1;terminalError=null;localSubscriptions=new Map;readyResolve=null;readyReject=null;onNewReadySession=void 0;onConnected=void 0;onDisconnected=void 0;ready;constructor(e){this.name=e.name??`stdio-server`,this.spawnOptions=e.spawn,this.ready=this.createReadyPromise()}async connect(){if(this.jsonl!==null)throw Error(`StdioServerTransport: already connected`);this.readyResolve===null&&this.readyReject===null&&(this.ready=this.createReadyPromise()),this.handshakeComplete=!1,this.terminalError=null;let t=e(this.spawnOptions);this.jsonl=t,t.onMessage(e=>{this.jsonl===t&&this.handleInbound(e)}),t.onError(e=>{this.jsonl===t&&this.terminateSession(e,!0)}),t.process.once(`exit`,e=>{this.jsonl===t&&this.terminateSession(Error(`Child process exited (code ${e??`signal`}) before subscribe-sync handshake completed`),!1)}),this.localSubscriptions.size>0&&this.sendSubscribeMessage()}async send(e,t){if(this.jsonl===null)throw Error(`StdioServerTransport: not connected`);return this.jsonl.send(e),i(e,this.correlations,t??n)}onReceive(e){return this.handlers.add(e),()=>{this.handlers.delete(e)}}async disconnect(){let e=this.jsonl;this.jsonl=null,this.handshakeComplete=!1,this.terminalError=null,this.readyResolve?.(),this.readyResolve=null,this.readyReject=null,this.correlations.cleanup(),e?.close()}async subscribe(e,t,n=[],r){let i=r??this.localSubscriptions.get(e)?.deliveryClass??`relayable`;this.localSubscriptions.set(e,{priorities:n,filter:t,deliveryClass:i}),this.jsonl!==null&&this.sendSubscribeMessage(e,t,n,i)}async unsubscribe(e){let t=this.localSubscriptions.delete(e);this.jsonl!==null&&t&&this.jsonl.send({type:`unsubscribe`,subjects:{[e]:[]}})}isReady(){return this.jsonl!==null&&this.terminalError===null&&this.handshakeComplete&&this.jsonl.process.exitCode===null}cancelRequest(e,t){this.correlations.cancel(e,t)}createReadyPromise(){let e=new Promise((e,t)=>{this.readyResolve=e,this.readyReject=t});return this.onNewReadySession?.(e),e}terminateSession(e,t){let n=this.jsonl;this.jsonl=null,this.handshakeComplete=!1,this.terminalError=e,this.readyReject?.(e),this.readyResolve=null,this.readyReject=null,this.correlations.cleanup(),t&&n?.close(),this.onDisconnected?.()}async handleInbound(e){if(typeof e!=`object`||!e||typeof e.type!=`string`)return;let t=e;if(t.type!==`heartbeat`){if(t.type===`subscribe-sync-complete`){this.handshakeComplete=!0,this.readyResolve?.(),this.readyResolve=null,this.readyReject=null,this.jsonl?.send({type:`subscribe-sync-complete`}),this.onConnected?.();return}if(!r(t,this.correlations))for(let e of this.handlers)try{await e(t,{transportName:this.name})}catch{}}}sendSubscribeMessage(e,t,n=[],r=`relayable`){if(this.jsonl===null)return;if(e!==void 0){this.jsonl.send({type:`subscribe`,subjects:{[e]:n},deliveryClasses:{[e]:r},...t===void 0?{}:{filters:{[e]:t}}});return}let i={},a={},o={},s=!1;for(let[e,t]of this.localSubscriptions)i[e]=t.priorities,a[e]=t.deliveryClass,t.filter!==void 0&&(o[e]=t.filter,s=!0);this.jsonl.send({type:`subscribe`,subjects:i,deliveryClasses:a,...s?{filters:o}:{}})}};export{a as StdioServerTransport};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createDatabaseClient, n as DatabaseClientConfig, r as PostgresClientOptions, t as DatabaseClient } from "../../client-
|
|
1
|
+
import { i as createDatabaseClient, n as DatabaseClientConfig, r as PostgresClientOptions, t as DatabaseClient } from "../../client-B--e2qcU.mjs";
|
|
2
2
|
export { DatabaseClient, DatabaseClientConfig, PostgresClientOptions, createDatabaseClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,h as t,n}from"../../registry-
|
|
1
|
+
import{a as e,h as t,n}from"../../registry-wfF2uTty.mjs";async function r(r={}){if(r.url!==void 0){let n=e(r.url);if(n.kind===`missing-engine`)throw Error(t(n.dialect,n.packageName));if(n.kind===`engine`)return n.engine.createClient(r)}return n(`sqlite`).createClient(r)}export{r as createDatabaseClient};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DATABASE_DIALECT, c as getDatabaseDialect, n as DatabaseClientConfig, o as MakaioDatabase, s as StorageDialect, t as DatabaseClient } from "../../client-
|
|
1
|
+
import { a as DATABASE_DIALECT, c as getDatabaseDialect, n as DatabaseClientConfig, o as MakaioDatabase, s as StorageDialect, t as DatabaseClient } from "../../client-B--e2qcU.mjs";
|
|
2
2
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
3
3
|
import { ExtensionContext } from "@makaio/framework/contracts";
|
|
4
4
|
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
@@ -675,6 +675,54 @@ type LibSQLTransactionExecutor = MakaioDatabase['transaction'];
|
|
|
675
675
|
* @typeParam T - Callback result type
|
|
676
676
|
*/
|
|
677
677
|
type TransactionCallback<T> = Parameters<LibSQLTransactionExecutor>[0] extends ((tx: infer TTx) => Promise<unknown>) ? (tx: TTx) => Promise<T> : never;
|
|
678
|
+
/**
|
|
679
|
+
* Keyed store of in-flight operation tails.
|
|
680
|
+
*
|
|
681
|
+
* Declared structurally so a caller may choose the keyspace its identity
|
|
682
|
+
* actually lives in: both `Map` and `WeakMap` satisfy it, so a caller keyed on
|
|
683
|
+
* an object holds no strong reference to it, while a caller keyed on a derived
|
|
684
|
+
* value (a file path, a connection identity) still gets a queue.
|
|
685
|
+
* @typeParam TKey - Identity operations are serialized against.
|
|
686
|
+
*/
|
|
687
|
+
interface OperationTailStore<TKey> {
|
|
688
|
+
/**
|
|
689
|
+
* Read the tail currently queued for a key.
|
|
690
|
+
* @param key - Identity to read.
|
|
691
|
+
* @returns The queued tail, or `undefined` when nothing is in flight.
|
|
692
|
+
*/
|
|
693
|
+
get(key: TKey): Promise<void> | undefined;
|
|
694
|
+
/**
|
|
695
|
+
* Publish the new tail for a key.
|
|
696
|
+
* @param key - Identity to write.
|
|
697
|
+
* @param tail - Tail that resolves once the newly queued work has finished.
|
|
698
|
+
*/
|
|
699
|
+
set(key: TKey, tail: Promise<void>): unknown;
|
|
700
|
+
/**
|
|
701
|
+
* Drop a key whose queue has drained.
|
|
702
|
+
* @param key - Identity to forget.
|
|
703
|
+
*/
|
|
704
|
+
delete(key: TKey): unknown;
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Run work as the only in-flight operation for a key.
|
|
708
|
+
*
|
|
709
|
+
* The queue is a chain of tails: each caller reads the tail currently
|
|
710
|
+
* published for its key, publishes its own, and waits for the one it read.
|
|
711
|
+
* A rejected predecessor is absorbed rather than propagated, because a failed
|
|
712
|
+
* operation still releases the queue for the next one. The key is dropped only
|
|
713
|
+
* when the tail still published is the one this call wrote, so a successor
|
|
714
|
+
* that already queued behind it is never orphaned.
|
|
715
|
+
*
|
|
716
|
+
* The guarantee is process-local: two processes over one database do not share
|
|
717
|
+
* a store and must coordinate through the database itself.
|
|
718
|
+
* @param tails - Store holding the in-flight tail per key.
|
|
719
|
+
* @param key - Identity this work must not overlap other work on.
|
|
720
|
+
* @param work - Async work to run once the queue reaches it.
|
|
721
|
+
* @returns Whatever `work` resolves to.
|
|
722
|
+
* @typeParam TKey - Identity operations are serialized against.
|
|
723
|
+
* @typeParam TResult - Result type produced by the work.
|
|
724
|
+
*/
|
|
725
|
+
declare function serializeByKey<TKey, TResult>(tails: OperationTailStore<TKey>, key: TKey, work: () => Promise<TResult>): Promise<TResult>;
|
|
678
726
|
/**
|
|
679
727
|
* Serialize one database operation with transactions using the same handle.
|
|
680
728
|
* @param db - Makaio database instance.
|
|
@@ -1094,4 +1142,4 @@ declare module '@makaio/framework/storage' {
|
|
|
1094
1142
|
}
|
|
1095
1143
|
}
|
|
1096
1144
|
//#endregion
|
|
1097
|
-
export { DATABASE_DIALECT, type DialectSchema, type DrizzleHandlerRegistration, DrizzleSchemaRecord, type DrizzleWriteResult, type DualBuilder, type DualColumnBuilderBase, type DualColumnBundle, type DualColumnRef, type DualReferenceActions, type DualTable, type DualTableExtras, type Equal, type FtsMessageExcerptHit, type FtsMessageSearchInput, type FtsSearchStrategy, type FtsSessionCountInput, type FtsSessionSearchInput, type MakaioDatabase, NON_BASELINE_GENERATION_LEGS, type PostgresTwinSchema, type RawSqlExecutor, type RawSqlSession, STORAGE_ENGINE_URL_HINTS, type StorageDialect, type StorageEngine, type StorageEngineCapabilities, type StorageEngineErrorClassifiers, type StorageEngineGenerationLeg, type StorageEngineMigrationBehavior, type StorageEngineUrlHint, type StorageEngineUrlResolution, type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceExtensions, type TransactionCallback, affectedRowCount, brandDatabase, buildFirstUserMessagePreviewQuery, createStorageNamespace, defineDialectSchema, defineDualTable, describeMissingStorageEngine, didAffectRows, executeTransaction, findGenerationLegForDialect, findStorageEngine, getDatabaseDialect, getRawSqlExecutor, getStorageEngine, importRuntimeModule, isSqliteDuplicateObjectError, isSqliteUniqueViolationError, quoteSqlIdentifier, readErrorCode, registerDrizzleHandlers, registerStorageEngine, resolveSchema, resolveStorageEngine, resolveStorageEngineForUrl, sanitizeFtsQuery, serializeDatabaseOperation, someInCauseChain, sqliteFtsSearchStrategy, sqliteStorageEngine };
|
|
1145
|
+
export { DATABASE_DIALECT, type DialectSchema, type DrizzleHandlerRegistration, DrizzleSchemaRecord, type DrizzleWriteResult, type DualBuilder, type DualColumnBuilderBase, type DualColumnBundle, type DualColumnRef, type DualReferenceActions, type DualTable, type DualTableExtras, type Equal, type FtsMessageExcerptHit, type FtsMessageSearchInput, type FtsSearchStrategy, type FtsSessionCountInput, type FtsSessionSearchInput, type MakaioDatabase, NON_BASELINE_GENERATION_LEGS, type OperationTailStore, type PostgresTwinSchema, type RawSqlExecutor, type RawSqlSession, STORAGE_ENGINE_URL_HINTS, type StorageDialect, type StorageEngine, type StorageEngineCapabilities, type StorageEngineErrorClassifiers, type StorageEngineGenerationLeg, type StorageEngineMigrationBehavior, type StorageEngineUrlHint, type StorageEngineUrlResolution, type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceExtensions, type TransactionCallback, affectedRowCount, brandDatabase, buildFirstUserMessagePreviewQuery, createStorageNamespace, defineDialectSchema, defineDualTable, describeMissingStorageEngine, didAffectRows, executeTransaction, findGenerationLegForDialect, findStorageEngine, getDatabaseDialect, getRawSqlExecutor, getStorageEngine, importRuntimeModule, isSqliteDuplicateObjectError, isSqliteUniqueViolationError, quoteSqlIdentifier, readErrorCode, registerDrizzleHandlers, registerStorageEngine, resolveSchema, resolveStorageEngine, resolveStorageEngineForUrl, sanitizeFtsQuery, serializeByKey, serializeDatabaseOperation, someInCauseChain, sqliteFtsSearchStrategy, sqliteStorageEngine };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../registry-
|
|
1
|
+
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"../../registry-wfF2uTty.mjs";import{autoPk as C,bool as w,epochMs as T,float8 as E,jsonCol as D}from"./columns/sqlite.mjs";import{autoPk as O,bool as k,epochMs as A,float8 as j,jsonCol as M}from"./columns/postgres.mjs";import{integer as N,sqliteTable as P,text as F}from"drizzle-orm/sqlite-core";import{bigint as I,integer as L,pgTable as R,text as z}from"drizzle-orm/pg-core";import{getTableColumns as B}from"drizzle-orm";import{createStorageNamespace as V}from"@makaio/framework/storage";const H=[{dialect:`postgres`,enginePackageName:`@makaio/storage-pg`,chainDirName:`drizzle-postgres`,drizzleConfigSpecifier:`drizzle.config.ts`,normalizeScriptSpecifier:`scripts/normalize-migrations.ts`}];function U(e){return H.find(t=>t.dialect===e)}async function W(e,t,n){let r=e.get(t)??Promise.resolve(),i=Promise.withResolvers(),a=r.catch(()=>void 0).then(()=>i.promise);e.set(t,a),await r.catch(()=>void 0);try{return await n()}finally{i.resolve(),e.get(t)===a&&e.delete(t)}}async function G(e,t){return W(q,e,t)}async function K(e,t){return G(e,()=>e.transaction(t))}const q=new WeakMap;function J(e){return(t,n,r)=>e(t,n,r)}function Y(e,t){return{sqlite:e,postgres:t}}function X(t,n){return n[e(t)]}function Z(e,t){let n=(e,t)=>({sqlite:e,postgres:t,notNull:()=>n(e.notNull(),t.notNull()),default:r=>n(e.default(r),t.default(r)),primaryKey:()=>n(e.primaryKey(),t.primaryKey()),unique:r=>n(e.unique(r),t.unique(r)),$type:()=>n(e,t),references:(r,i)=>n(e.references(()=>r().sqlite,i),t.references(()=>r().postgres,i))});return n(e,t)}const Q={text:e=>Z(F(e),z(e)),textEnum:(e,t)=>Z(F(e,t),z(e,t)),epochMs:e=>Z(T(e),A(e)),bool:e=>Z(w(e),k(e)),jsonCol:e=>Z(D(e),M(e)),autoPk:e=>Z(C(e),O(e)),float8:e=>Z(E(e),j(e)),int4:e=>Z(N(e),L(e)),int8:e=>Z(N(e),I(e,{mode:`number`}))};function $(e,t,n){let r=t(Q),i={},a={};for(let[e,t]of Object.entries(r))i[e]=t.sqlite,a[e]=t.postgres;let o=P(e,i,n?.sqlite),s=R(e,a,n?.postgres),c=B(o),l=B(s);return{sqlite:o,postgres:s,columnPair(e){return{sqlite:c[e],postgres:l[e]}}}}export{t as DATABASE_DIALECT,H as NON_BASELINE_GENERATION_LEGS,f as STORAGE_ENGINE_URL_HINTS,i as affectedRowCount,b as brandDatabase,d as buildFirstUserMessagePreviewQuery,V as createStorageNamespace,Y as defineDialectSchema,$ as defineDualTable,l as describeMissingStorageEngine,x as didAffectRows,K as executeTransaction,U as findGenerationLegForDialect,v as findStorageEngine,e as getDatabaseDialect,S as getRawSqlExecutor,p as getStorageEngine,n as importRuntimeModule,y as isSqliteDuplicateObjectError,o as isSqliteUniqueViolationError,c as quoteSqlIdentifier,s as readErrorCode,J as registerDrizzleHandlers,g as registerStorageEngine,X as resolveSchema,u as resolveStorageEngine,r as resolveStorageEngineForUrl,a as sanitizeFtsQuery,W as serializeByKey,G as serializeDatabaseOperation,h as someInCauseChain,_ as sqliteFtsSearchStrategy,m as sqliteStorageEngine};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../../index-
|
|
1
|
+
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../../index-DZunhZec.mjs";
|
|
2
2
|
export { CrudLifecycleConfig, DrizzleCrudConfig, DrizzleListConfig, buildScopePredicates, createDrizzleCrudHandlers, createDrizzleListHandler };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../../../drizzle-
|
|
1
|
+
import{n as e,r as t,t as n}from"../../../drizzle-z_0SiGY8.mjs";export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../index-
|
|
1
|
+
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../index-DZunhZec.mjs";
|
|
2
2
|
|
|
3
3
|
//#region storage/handlers/src/utils.d.ts
|
|
4
4
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"../../drizzle-
|
|
1
|
+
import{n as e,r as t,t as n}from"../../drizzle-z_0SiGY8.mjs";function r(e,t){let n={...e};for(let e of t)n[e]===null&&(n[e]=void 0);return n}function i(e,t){let n={...e};for(let e of t)n[e]===void 0&&(n[e]=null);return n}export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler,r as nullToUndefined,i as undefinedToNull};
|
|
@@ -97,6 +97,47 @@ interface PluginTestDbConfig {
|
|
|
97
97
|
* @returns Object with db, dbPath, close, and cleanup
|
|
98
98
|
*/
|
|
99
99
|
declare function createTempDb(name: string): Promise<TestDbContext>;
|
|
100
|
+
/**
|
|
101
|
+
* One temporary database file that independent connections can be opened on.
|
|
102
|
+
*
|
|
103
|
+
* It exists for suites about restart: a component that is torn down and rebuilt
|
|
104
|
+
* against the same durable state must be rebuilt against a *new connection*, or
|
|
105
|
+
* the suite proves only that one JavaScript object still agrees with itself.
|
|
106
|
+
* Handing out connections rather than a single handle is what makes that the
|
|
107
|
+
* default rather than something each suite has to remember.
|
|
108
|
+
*/
|
|
109
|
+
interface RestartableTestDb {
|
|
110
|
+
/** Absolute path of the single file every connection is opened on. */
|
|
111
|
+
readonly dbPath: string;
|
|
112
|
+
/**
|
|
113
|
+
* Open one more independent connection to that file.
|
|
114
|
+
*
|
|
115
|
+
* Each call returns a separate connection with its own transaction state, so
|
|
116
|
+
* two handles see each other's writes only once they are committed.
|
|
117
|
+
* @returns A newly opened handle to the shared database file.
|
|
118
|
+
*/
|
|
119
|
+
connect(): Promise<MakaioDatabase>;
|
|
120
|
+
/**
|
|
121
|
+
* Close every connection handed out and remove the database files.
|
|
122
|
+
* @returns Promise that settles once all connections are closed.
|
|
123
|
+
*/
|
|
124
|
+
close(): Promise<void>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Create a temporary SQLite database that survives its connections.
|
|
128
|
+
*
|
|
129
|
+
* Unlike {@link createTempDb} this hands out no initial handle: a caller states
|
|
130
|
+
* how many independent connections it wants by calling
|
|
131
|
+
* {@link RestartableTestDb.connect}, which is the whole point when the suite is
|
|
132
|
+
* about what survives a restart.
|
|
133
|
+
*
|
|
134
|
+
* Nothing is opened here: the file is created by the first
|
|
135
|
+
* {@link RestartableTestDb.connect}, which is also where a driver problem
|
|
136
|
+
* surfaces.
|
|
137
|
+
* @param name - Service name used in the temporary file name.
|
|
138
|
+
* @returns The shared store, its path, and its teardown.
|
|
139
|
+
*/
|
|
140
|
+
declare function createRestartableTempDb(name: string): RestartableTestDb;
|
|
100
141
|
/**
|
|
101
142
|
* Creates a suite-level test database for plugin storage tests.
|
|
102
143
|
*
|
|
@@ -136,11 +177,11 @@ declare function createPgBrandedTestDb(): Promise<PgBrandedTestDbContext>;
|
|
|
136
177
|
* Creates cleanup function for test database.
|
|
137
178
|
* @param handlerCleanup - Storage handler cleanup function
|
|
138
179
|
* @param close - Function to close the database connection. Must close synchronously
|
|
139
|
-
* (true for all SQLite drivers) — the temp
|
|
180
|
+
* (true for all SQLite drivers) — the temp files are unlinked immediately after the
|
|
140
181
|
* call, so clients whose close resolves asynchronously must use an awaited teardown
|
|
141
182
|
* such as {@link PluginTestDbContext.close} instead.
|
|
142
183
|
* @param dbPath - Path to temp database file
|
|
143
|
-
* @returns Cleanup function that closes connection and deletes temp
|
|
184
|
+
* @returns Cleanup function that closes the connection and deletes the temp files
|
|
144
185
|
*/
|
|
145
186
|
declare function createDbCleanup(handlerCleanup: () => void, close: () => void, dbPath: string): () => void;
|
|
146
187
|
/**
|
|
@@ -173,4 +214,4 @@ interface PluginStorageTestContext {
|
|
|
173
214
|
*/
|
|
174
215
|
declare function usePluginStorageTestLifecycle(createTestDbFn: () => Promise<PluginTestDbContext>): PluginStorageTestContext;
|
|
175
216
|
//#endregion
|
|
176
|
-
export { PgBrandedTestDbContext, PluginStorageTestContext, PluginTestDbConfig, PluginTestDbContext, TestDbContext, TestDbContextWithCleanup, createDbCleanup, createPgBrandedTestDb, createPluginTestDb, createTempDb, usePluginStorageTestLifecycle };
|
|
217
|
+
export { PgBrandedTestDbContext, PluginStorageTestContext, PluginTestDbConfig, PluginTestDbContext, RestartableTestDb, TestDbContext, TestDbContextWithCleanup, createDbCleanup, createPgBrandedTestDb, createPluginTestDb, createRestartableTempDb, createTempDb, usePluginStorageTestLifecycle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as e}from"node:module";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{brandDatabase as i,findStorageEngine as a,getRawSqlExecutor as o,registerStorageEngine as s}from"@makaio/framework/storage/drizzle";import{sql as c}from"drizzle-orm";import*as l from"node:os";import{afterAll as u,afterEach as d,beforeAll as f,beforeEach as p}from"vitest";import{drizzle as m}from"drizzle-orm/libsql";import{createDatabaseClient as h}from"@makaio/framework/storage/drizzle/client";const g=e(import.meta.url);async function _(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),{db:
|
|
1
|
+
import{createRequire as e}from"node:module";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{brandDatabase as i,findStorageEngine as a,getRawSqlExecutor as o,registerStorageEngine as s}from"@makaio/framework/storage/drizzle";import{sql as c}from"drizzle-orm";import*as l from"node:os";import{afterAll as u,afterEach as d,beforeAll as f,beforeEach as p}from"vitest";import{drizzle as m}from"drizzle-orm/libsql";import{createDatabaseClient as h}from"@makaio/framework/storage/drizzle/client";const g=e(import.meta.url);async function _(e,t,n){let r=[e];try{await t()}catch(e){r.push(e)}finally{n?.()}throw r.length===1?e:AggregateError(r,`Database setup and cleanup both failed`)}async function v(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),{db:r,close:i}=await h({url:`file:${t}`}),a=o(r);try{await a.run(c`SELECT 1`)}catch(e){await _(e,i,()=>C(t))}return{db:r,dbPath:t,exec:e=>a.run(e),close:i,cleanup:w(()=>{},i,t)}}function y(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),r=[],i;return{dbPath:t,connect:async()=>{let e=await h({url:`file:${t}`});try{await o(e.db).run(c`SELECT 1`)}catch(t){await _(t,e.close)}return r.push(e.close),e.db},close:()=>i??=(async()=>{let e=await Promise.allSettled(r.splice(0).map(e=>e()));C(t);let n=e.filter(e=>e.status===`rejected`);if(n.length>0)throw AggregateError(n.map(e=>e.reason),`Failed to close ${n.length} restartable test database connections`)})()}}async function b(e){let t=n.join(l.tmpdir(),`makaio-${e.name}-test-${crypto.randomUUID()}.db`),{db:r,close:i}=await h({url:`file:${t}`}),a=o(r);try{for(let t of e.schemas)await a.run(t)}catch(e){await _(e,i,()=>C(t))}return{db:r,dbPath:t,exec:e=>a.run(e),clearData:async()=>{for(let t of e.tables)await a.run(c.raw(`DELETE FROM ${t}`))},registerHandlers:()=>e.registerHandlers(r),close:async()=>{try{await i()}finally{C(t)}}}}async function x(){let{storageEngine:e}=await import(t(g.resolve(`@makaio/storage-pg`)).href);return e}async function S(){if(!a(`postgres`)){let e;try{e=await x()}catch(e){throw Error(`createPgBrandedTestDb requires @makaio/storage-pg to be resolvable from @makaio/test-utils.`,{cause:e})}s(e)}let e=[],t={async run(t){return e.push(JSON.stringify(t.queryChunks)),{rowsAffected:0}},async all(){return[]}},n={dialect:`postgres`,run:t.run,all:t.all,withSession:e=>e(t)};return{db:i(m({connection:{url:`:memory:`}}),`postgres`,n),statements:e}}function C(e){for(let t of[``,`-wal`,`-shm`])try{r.unlinkSync(`${e}${t}`)}catch{}}function w(e,t,n){return()=>{let r=[];try{e()}catch(e){r.push(e)}try{t()}catch(e){r.push(e)}finally{C(n)}if(r.length>0)throw AggregateError(r,`Test database cleanup failed with ${r.length} error(s)`)}}function T(e){let t,n;return f(async()=>{t=await e()}),p(async()=>{if(!t)throw Error(`usePluginStorageTestLifecycle: createTestDbFn did not initialize db context`);await t.clearData(),n=t.registerHandlers()}),d(()=>{try{n?.()}finally{n=void 0}}),u(async()=>{t&&await t.close()}),{get dbContext(){return t}}}export{w as createDbCleanup,S as createPgBrandedTestDb,b as createPluginTestDb,y as createRestartableTempDb,v as createTempDb,T as usePluginStorageTestLifecycle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e}from"./handlers-
|
|
1
|
+
import{F as e}from"./handlers-CfnLyLfE.mjs";import{SessionStorageSubjects as t}from"./services/session/storage/namespace.mjs";import"./session-BTFiDoGz.mjs";import{AgentSubjects as n,ApprovalSubjects as r,HarnessSubjects as i,computeMetaTags as a}from"@makaio/framework/contracts";import{BaseService as o}from"@makaio/framework/service-base";import{extractToolFilePath as s}from"@makaio/framework/tools";const c={"full-access":0,"always-ask":1,reject:2};function l(){return`apr_${crypto.randomUUID()}`}function u(e){switch(e){case`allow`:return`full-access`;case`deny`:return`reject`;case`ask`:return`always-ask`}}function d(e){if(!e?.length)return`neutral`;let t=a(e);return t.includes(`destructive`)?`destructive`:t.includes(`read-only`)?`safe`:`neutral`}function f(e,t){if(e)return t&&e.toolApprovalOverrides?.[t]!==void 0?e.toolApprovalOverrides[t]:e.approvalPolicy}function p(e,t,n,r){let i=r[t];if(!i?.length)return e;let a=e;for(let e of i){let t=n[e];t&&c[t]>c[a]&&(a=t)}return a}function m(e,t,n){return n.handled?n.data.allowedDirectories??void 0:t?[]:void 0}function h(e,t,n){if(!n||!e?.cwd)return{};let r;return(e.personaId||e.profileId)&&t&&(r=m(e.personaId,e.profileId,t)),{cwd:e.cwd,...r&&{allowedDirectories:r}}}function g(e,t,n){if(!(!e&&!t))return!n||!n.handled?{policy:`always-ask`}:{policy:u(n.data.action),...n.data.personaName&&{personaName:n.data.personaName},...n.data.profileName&&{profileName:n.data.profileName}}}function _(e,t){let n=t.harness?.toolCapabilityMap&&e.toolName?t.harness.toolCapabilityMap[e.toolName]:void 0;return{requestId:l(),toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,agentId:e.agentId,sessionId:e.sessionId,adapterName:t.resolvedAdapterName,...t.personaName&&{personaName:t.personaName},...t.profileName&&{profileName:t.profileName},capabilities:n,riskLevel:d(n),reasoning:e.reasoning,createdAt:Date.now()}}var v=class extends o{logger=console;options;constructor(e,t={}){super(e),this.options=t}async onInit(){this.registerHandler(n.toolApprove,async e=>{let t=await this.getAgentMetadata(e.payload.agentId,e.payload.sessionId),n=(t?.personaId||t?.profileId)&&e.payload.toolName?await this.fetchRawEnrichedPolicy(t?.personaId,t?.profileId,e.payload.toolName):void 0,r=h(t,n,this.options.fileAccessRuleProvider),i=await this.checkFileAccessDenyReason(e.payload,r);if(i){e.setResult({action:`deny`,message:i,shouldAbort:!1});return}let a=await this.resolveSessionOverride(e.payload.sessionId);if(a===`full-access`){e.setResult({action:`allow`});return}if(a===`reject`){e.setResult({action:`deny`,message:`Tool use rejected by session approval policy override`,shouldAbort:!1});return}let o=await this.resolvePolicyWithContext({adapterName:e.payload.adapterName,toolName:e.payload.toolName},t,n);switch(a===`always-ask`?`always-ask`:o.policy){case`full-access`:e.setResult({action:`allow`});return;case`reject`:e.setResult({action:`deny`,message:`Tool use rejected by approval policy`,shouldAbort:!1});return;case`always-ask`:await this.dispatchAlwaysAskApproval(e.payload,e.setResult.bind(e),o);return}})}async dispatchAlwaysAskApproval(e,t,i){let a=_(e,i),o=new AbortController,s=this.bus.on(n.session.closed,()=>{o.abort()},{filter:{agentId:a.agentId,...e.adapterSessionId!==void 0&&{adapterSessionId:e.adapterSessionId}}});try{let e=await this.bus.requestOptional(r.request,a,{timeout:0,signal:o.signal});e.handled&&e.data.action===`allow`?t({action:`allow`,...e.data.updatedInput&&{updatedInput:e.data.updatedInput}}):t({action:`deny`,message:e.handled&&e.data.action===`deny`?e.data.message??`User denied tool execution`:`No approval handler available`,shouldAbort:!1})}catch{t({action:`deny`,message:o.signal.aborted?`Approval cancelled — agent session closed`:`Tool approval request failed`,shouldAbort:!1})}finally{s()}}async checkFileAccessDenyReason(e,t){if(!this.options.fileAccessRuleProvider||!t.cwd)return;let n=s(e.toolName,e.args,t.cwd);if(n)try{return(await this.options.fileAccessRuleProvider(t.cwd,t.allowedDirectories)).isDenied(n)?`Access denied: '${n}' is restricted by .makaioignore rules`:void 0}catch{return`Access denied: file access rules could not be evaluated`}}async fetchRawEnrichedPolicy(e,t,n){try{return await this.bus.requestOptional(r.resolveEnrichedPolicy,{toolName:n,personaId:e,profileId:t})}catch(r){return this.logger.error(`[ToolApprovalService] approval.resolveEnrichedPolicy failed; falling back to fail-closed`,{toolName:n,personaId:e,profileId:t,error:r}),{handled:!1}}}async resolvePolicyWithContext(e,t,n){let r=t?.adapterName??e.adapterName,i=g(t?.personaId,t?.profileId,n),a=await this.resolveHarnessPolicy(r,t?.harnessId,t?.clientId),o=f(a,e.toolName),s=i?.policy??o??`always-ask`,c=s;return a?.capabilityOverrides&&a.toolCapabilityMap&&e.toolName&&(c=p(s,e.toolName,a.capabilityOverrides,a.toolCapabilityMap)),{policy:c,harness:a,agent:t,resolvedAdapterName:r,...i?.personaName&&{personaName:i.personaName},...i?.profileName&&{profileName:i.profileName}}}async getAgentMetadata(t,n){try{if(n){let{agents:r}=await this.bus.request(e.listBySession,{sessionId:n});return r.find(e=>e.agentId===t)??null}let r=await this.bus.requestOptional(e.get,{agentId:t});return r.handled?r.data.agent:null}catch{return null}}async resolveSessionOverride(e){if(e)try{let n=await this.bus.requestOptional(t.get,{sessionId:e});return n.handled?n.data.session?.approvalPolicyOverride??void 0:void 0}catch{return}}async resolveHarnessPolicy(e,t,n){try{let r=await this.bus.request(i.resolve,{adapterName:e,...t&&{profileHarnessId:t},...n&&{clientId:n}});return{approvalPolicy:r.approvalPolicy,capabilityOverrides:r.capabilityOverrides,toolCapabilityMap:r.toolCapabilityMap,toolApprovalOverrides:r.toolApprovalOverrides}}catch{return}}};export{v as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as e}from"./framework-packages-C3RWfJDk.mjs";import{FILE_ACCESS_RULES_KEY as t,extractToolFilePath as n}from"@makaio/framework/tools";function r(){let t=new Map;return{filter:e=>!!e.tools?.createToolsets,async processActivated(n,r,i){let a=i.getService(e);if(!a)throw Error(`ToolRegistry is not available. Ensure toolRegistryPackage is included in the composition root.`);let o=r.tools.createToolsets(i),s=[];try{for(let e of o)await a.register(e),s.push(()=>a.deregister(e.metadata.name))}catch(e){for(let e=s.length-1;e>=0;--e)try{await s[e]()}catch(e){console.error(`[ToolContributionProcessor] Rollback error for "${n}":`,e)}throw e}t.set(n,s)},async processStopped(e){let n=t.get(e);if(n){for(let t=n.length-1;t>=0;--t)try{await n[t]()}catch(t){console.error(`[ToolContributionProcessor] Deregister error for "${e}":`,t)}t.delete(e)}}}}export{n,r,t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { q as ArtifactRevision$1 } from "./context-resolution-
|
|
2
|
-
import { i as JsonValue$1 } from "./json-value-
|
|
1
|
+
import { q as ArtifactRevision$1 } from "./context-resolution-BQBk4Ish.mjs";
|
|
2
|
+
import { i as JsonValue$1 } from "./json-value-Brslhqbm.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
5
5
|
|
|
@@ -258,8 +258,7 @@ type TransitionCondition = z.infer<typeof TransitionConditionSchema>;
|
|
|
258
258
|
* Invocation descriptor for the action to execute when a transition rule fires.
|
|
259
259
|
*
|
|
260
260
|
* `type` selects the registered action handler; `input` supplies the
|
|
261
|
-
* action-specific payload
|
|
262
|
-
* hints to the execution host.
|
|
261
|
+
* action-specific payload.
|
|
263
262
|
*
|
|
264
263
|
* Built-in action type:
|
|
265
264
|
* - `'workflow.start'` — start a workflow execution via the bus
|
|
@@ -267,25 +266,6 @@ type TransitionCondition = z.infer<typeof TransitionConditionSchema>;
|
|
|
267
266
|
declare const TransitionActionInvocationSchema: z.ZodObject<{
|
|
268
267
|
type: z.ZodString;
|
|
269
268
|
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
|
|
270
|
-
executionHints: z.ZodOptional<z.ZodObject<{
|
|
271
|
-
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
272
|
-
kind: z.ZodLiteral<"path">;
|
|
273
|
-
path: z.ZodString;
|
|
274
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
275
|
-
kind: z.ZodLiteral<"source">;
|
|
276
|
-
filename: z.ZodString;
|
|
277
|
-
source: z.ZodString;
|
|
278
|
-
}, z.core.$strict>], "kind">>;
|
|
279
|
-
requirements: z.ZodOptional<z.ZodObject<{
|
|
280
|
-
isolation: z.ZodOptional<z.ZodEnum<{
|
|
281
|
-
local: "local";
|
|
282
|
-
remote: "remote";
|
|
283
|
-
container: "container";
|
|
284
|
-
}>>;
|
|
285
|
-
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
|
-
}, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
|
|
287
|
-
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
|
|
288
|
-
}, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
|
|
289
269
|
}, z.core.$strip>;
|
|
290
270
|
type TransitionActionInvocation$1 = z.infer<typeof TransitionActionInvocationSchema>;
|
|
291
271
|
/**
|
|
@@ -314,25 +294,6 @@ declare const TransitionRuleDefinitionSchema$1: z.ZodObject<{
|
|
|
314
294
|
action: z.ZodObject<{
|
|
315
295
|
type: z.ZodString;
|
|
316
296
|
input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
|
|
317
|
-
executionHints: z.ZodOptional<z.ZodObject<{
|
|
318
|
-
source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
319
|
-
kind: z.ZodLiteral<"path">;
|
|
320
|
-
path: z.ZodString;
|
|
321
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
322
|
-
kind: z.ZodLiteral<"source">;
|
|
323
|
-
filename: z.ZodString;
|
|
324
|
-
source: z.ZodString;
|
|
325
|
-
}, z.core.$strict>], "kind">>;
|
|
326
|
-
requirements: z.ZodOptional<z.ZodObject<{
|
|
327
|
-
isolation: z.ZodOptional<z.ZodEnum<{
|
|
328
|
-
local: "local";
|
|
329
|
-
remote: "remote";
|
|
330
|
-
container: "container";
|
|
331
|
-
}>>;
|
|
332
|
-
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
333
|
-
}, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
|
|
334
|
-
providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
|
|
335
|
-
}, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
|
|
336
297
|
}, z.core.$strip>;
|
|
337
298
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
338
299
|
}, z.core.$strip>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as LogImportMode, t as LogImporterInfo } from "./index-
|
|
1
|
+
import { r as LogImportMode, t as LogImporterInfo } from "./index-DA9g2A5P.mjs";
|
|
2
2
|
import * as _$_makaio_bus_core0 from "@makaio/framework/bus";
|
|
3
3
|
import { IMakaioBus } from "@makaio/framework/bus";
|
|
4
4
|
import { LogImportOrchestrator, LogImporter } from "@makaio/framework/adapters";
|