@makaio/framework 1.0.0-dev-1781022866275 → 1.0.0-dev-1781023871421
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 +5 -0
- package/dist/account-identity-DT5NOtFi.mjs +1 -0
- package/dist/adapter-C1eI-fGV.mjs +1 -0
- package/dist/adapters/acp-client/index.d.mts +6208 -0
- package/dist/adapters/acp-client/index.mjs +3 -0
- package/dist/adapters/config/index.d.mts +429 -0
- package/dist/adapters/config/index.mjs +1 -0
- package/dist/adapters/index.d.mts +4202 -0
- package/dist/adapters/index.mjs +18 -0
- package/dist/adapters/node.d.mts +263 -0
- package/dist/adapters/node.mjs +4 -0
- package/dist/adapters/stream-session/index.d.mts +1414 -0
- package/dist/adapters/stream-session/index.mjs +1 -0
- package/dist/adapters/stream-session/testing/index.d.mts +29 -0
- package/dist/adapters/stream-session/testing/index.mjs +1 -0
- package/dist/artifact-B3npq1cy.mjs +1 -0
- package/dist/base-orchestrator-wyumsn3b.d.mts +772 -0
- package/dist/bus/index.d.mts +3994 -0
- package/dist/bus/index.mjs +1 -0
- package/dist/bus-Caz3Jpbc.mjs +1 -0
- package/dist/bus-Hb-LGzgb.mjs +2 -0
- package/dist/capability-service-CJbmhfv9.mjs +1 -0
- package/dist/chunk-DTipWd-i.mjs +1 -0
- package/dist/chunk-cpUYaJdV.mjs +1 -0
- package/dist/cleanEnvForAdapter-KkYzQa1f.mjs +1 -0
- package/dist/client-bx74gm4R.mjs +1 -0
- package/dist/clients/index.d.mts +2639 -0
- package/dist/clients/index.mjs +2 -0
- package/dist/clients-namespace-GmSJpBUV.d.mts +332 -0
- package/dist/config-namespace-CPY9YsR8.d.mts +638 -0
- package/dist/config-namespace-ncYg2ct_.mjs +1 -0
- package/dist/contracts/adapter/index.d.mts +3 -0
- package/dist/contracts/adapter/index.mjs +1 -0
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +2 -0
- package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -0
- package/dist/contracts/artifact/index.d.mts +2 -0
- package/dist/contracts/artifact/index.mjs +1 -0
- package/dist/contracts/client/index.d.mts +3 -0
- package/dist/contracts/client/index.mjs +1 -0
- package/dist/contracts/common/index.d.mts +2 -0
- package/dist/contracts/common/index.mjs +1 -0
- package/dist/contracts/config/index.d.mts +455 -0
- package/dist/contracts/config/index.mjs +1 -0
- package/dist/contracts/extension/index.d.mts +4 -0
- package/dist/contracts/extension/index.mjs +1 -0
- package/dist/contracts/facet/index.d.mts +2 -0
- package/dist/contracts/facet/index.mjs +1 -0
- package/dist/contracts/harness/index.d.mts +2 -0
- package/dist/contracts/harness/index.mjs +1 -0
- package/dist/contracts/host/index.d.mts +2 -0
- package/dist/contracts/host/index.mjs +1 -0
- package/dist/contracts/index.d.mts +23046 -0
- package/dist/contracts/index.mjs +1 -0
- package/dist/contracts/materialization/index.d.mts +4 -0
- package/dist/contracts/materialization/index.mjs +1 -0
- package/dist/contracts/model-registry/index.d.mts +2 -0
- package/dist/contracts/model-registry/index.mjs +1 -0
- package/dist/contracts/native-session-supervisor/index.d.mts +2 -0
- package/dist/contracts/native-session-supervisor/index.mjs +1 -0
- package/dist/contracts/platform/index.d.mts +2 -0
- package/dist/contracts/platform/index.mjs +1 -0
- package/dist/contracts/provider/index.d.mts +3 -0
- package/dist/contracts/provider/index.mjs +1 -0
- package/dist/contracts/session/index.d.mts +3 -0
- package/dist/contracts/session/index.mjs +1 -0
- package/dist/contracts/shared/index.d.mts +2 -0
- package/dist/contracts/shared/index.mjs +1 -0
- package/dist/contracts/skill/index.d.mts +2 -0
- package/dist/contracts/skill/index.mjs +1 -0
- package/dist/contracts/telemetry/index.d.mts +2 -0
- package/dist/contracts/telemetry/index.mjs +1 -0
- package/dist/contracts/timeout/index.d.mts +2 -0
- package/dist/contracts/timeout/index.mjs +1 -0
- package/dist/contracts/toast/index.d.mts +198 -0
- package/dist/contracts/toast/index.mjs +1 -0
- package/dist/contracts/variant/index.d.mts +2 -0
- package/dist/contracts/variant/index.mjs +1 -0
- package/dist/core/index.d.mts +1263 -0
- package/dist/core/index.mjs +1 -0
- package/dist/credential-ref-YWQQENEo.mjs +1 -0
- package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
- package/dist/definition-BLCdXGzh.d.mts +383 -0
- package/dist/definition-CrgHIpTK.d.mts +60 -0
- package/dist/definition-DZMXOnjX.mjs +1 -0
- package/dist/definition-pkJ6szUl.d.mts +158 -0
- package/dist/drizzle-Eq8W1EbD.mjs +1 -0
- package/dist/event-Ca2yUf5i.mjs +1 -0
- package/dist/execution-target-CRPTfZlc.mjs +1 -0
- package/dist/extension-C-4BHMRI.mjs +1 -0
- package/dist/extension-CpIUgBKI.mjs +1 -0
- package/dist/extension-namespace-cMh_mMiL.mjs +1 -0
- package/dist/facet-BuwhrThl.mjs +1 -0
- package/dist/filesystem-service-B8rhBRgB.mjs +1 -0
- package/dist/filesystem-service-p_iJVHd4.d.mts +66 -0
- package/dist/git/index.d.mts +210 -0
- package/dist/git/index.mjs +18 -0
- package/dist/globby-rtWVaFHv.mjs +41 -0
- package/dist/handlers-CkTsQLra.mjs +41 -0
- package/dist/harness-BRCMcvQN.mjs +1 -0
- package/dist/hooks/index.d.mts +423 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/host-Br9VuOyr.mjs +1 -0
- package/dist/identity-Cz2IeEtm.mjs +1 -0
- package/dist/index-472sOmsW.d.mts +218 -0
- package/dist/index-8SZkg7s6.d.mts +353 -0
- package/dist/index-B3PK4FIn.d.mts +5116 -0
- package/dist/index-B80L4YqA.d.mts +180 -0
- package/dist/index-BFg9BUpx.d.mts +355 -0
- package/dist/index-BGfWS6GE.d.mts +483 -0
- package/dist/index-BVgfS-AJ.d.mts +109 -0
- package/dist/index-B_zQC98V.d.mts +995 -0
- package/dist/index-Bh_Ne7LF.d.mts +1008 -0
- package/dist/index-Bvb2mMH6.d.mts +1730 -0
- package/dist/index-CCGVh9BF2.d.mts +749 -0
- package/dist/index-CGmcS0Ma.d.mts +412 -0
- package/dist/index-CHQ1SqT0.d.mts +117 -0
- package/dist/index-CLpjm52M.d.mts +183 -0
- package/dist/index-Caig6TeF.d.mts +6746 -0
- package/dist/index-CelJCBjk.d.mts +2992 -0
- package/dist/index-ChunCFu4.d.mts +11 -0
- package/dist/index-Cm0dUkWL.d.mts +4651 -0
- package/dist/index-CokQYGVP.d.mts +184 -0
- package/dist/index-Cs0kZXIz2.d.mts +37 -0
- package/dist/index-D5d5HeWI2.d.mts +259 -0
- package/dist/index-D90OmGmV.d.mts +389 -0
- package/dist/index-D9MwJ2Q8.d.mts +67 -0
- package/dist/index-DANINzMu.d.mts +40 -0
- package/dist/index-DBw-89vC2.d.mts +3640 -0
- package/dist/index-DGBu6bHi2.d.mts +438 -0
- package/dist/index-DKC62dY5.d.mts +146 -0
- package/dist/index-DKia0MX1.d.mts +43 -0
- package/dist/index-DMKnON5s.d.mts +28 -0
- package/dist/index-DUaw0Dw8.d.mts +14747 -0
- package/dist/index-De3kPhlN.d.mts +72 -0
- package/dist/index-L4GjJDKb.d.mts +822 -0
- package/dist/index-U-A8eyGT.d.mts +1490 -0
- package/dist/index-eemAKwsB.d.mts +362 -0
- package/dist/index-mNec7V-9.d.mts +1075 -0
- package/dist/index-soFznFCy2.d.mts +89 -0
- package/dist/index-vtXJuwrz.d.mts +40 -0
- package/dist/index-x_lVDp_J.d.mts +134 -0
- package/dist/json-value-CmhSGMLv.mjs +1 -0
- package/dist/kernel/cli/index.d.mts +143 -0
- package/dist/kernel/cli/index.mjs +1 -0
- package/dist/kernel/cli/schemas.d.mts +64 -0
- package/dist/kernel/cli/schemas.mjs +1 -0
- package/dist/kernel/extension/index.d.mts +2 -0
- package/dist/kernel/extension/index.mjs +1 -0
- package/dist/kernel/index.d.mts +296 -0
- package/dist/kernel/index.mjs +1 -0
- package/dist/kernel/namespace/index.d.mts +2 -0
- package/dist/kernel/namespace/index.mjs +1 -0
- package/dist/kernel/observability/index.d.mts +2 -0
- package/dist/kernel/observability/index.mjs +1 -0
- package/dist/kernel/providers/index.d.mts +2 -0
- package/dist/kernel/providers/index.mjs +1 -0
- package/dist/kernel/window/index.d.mts +2 -0
- package/dist/kernel/window/index.mjs +1 -0
- package/dist/materialization-CuUBu4XI.mjs +1 -0
- package/dist/model-registry-CfXytvzx.mjs +1 -0
- package/dist/model-registry-Scn_MC2d.mjs +1 -0
- package/dist/namespace-5QQqbF-B.d.mts +3133 -0
- package/dist/namespace-BM7Djng9.d.mts +189 -0
- package/dist/namespace-BoD94mrN.mjs +1 -0
- package/dist/namespace-BwzZJqTV.mjs +1 -0
- package/dist/namespace-CFLAmQfh.mjs +1 -0
- package/dist/namespace-CTm3nEvh.d.mts +51 -0
- package/dist/namespace-CaaNnKcR.d.mts +921 -0
- package/dist/namespace-CaoZ3S78.d.mts +43 -0
- package/dist/namespace-CxhsoFUP.d.mts +607 -0
- package/dist/namespace-DD8Oiqo7.d.mts +580 -0
- package/dist/namespace-DLovh2Ws.d.mts +1313 -0
- package/dist/namespace-DgqkaOVu.d.mts +768 -0
- package/dist/namespace-DkRgbZYn.mjs +1 -0
- package/dist/namespace-Dr8K0MCp.d.mts +2047 -0
- package/dist/namespace-DuXK5AYN.mjs +1 -0
- package/dist/namespace-EQniz-Aw.d.mts +142 -0
- package/dist/namespace-IV1QK__V.d.mts +159 -0
- package/dist/namespace-LViZ-EQk.mjs +1 -0
- package/dist/namespace-TyiTsLFv.d.mts +3020 -0
- package/dist/namespace-Yna5-Pws.mjs +1 -0
- package/dist/namespace-xcmbQlxh.mjs +1 -0
- package/dist/native-session-supervisor-B1TnaPUF.mjs +1 -0
- package/dist/node/bus-server/index.d.mts +178 -0
- package/dist/node/bus-server/index.mjs +1 -0
- package/dist/node/bus-server/server-lifecycle.d.mts +2 -0
- package/dist/node/bus-server/server-lifecycle.mjs +1 -0
- package/dist/node/machine-identity/index.d.mts +85 -0
- package/dist/node/machine-identity/index.mjs +3 -0
- package/dist/node/transports/index.d.mts +1945 -0
- package/dist/node/transports/index.mjs +2 -0
- package/dist/orchestrator-shared-CIDiFJMD.mjs +1 -0
- package/dist/orchestrator-shared-Dfa7FMyw.d.mts +249 -0
- package/dist/package-DKVlsMP3.mjs +1 -0
- package/dist/platform-DZ7z-wXD.mjs +1 -0
- package/dist/profile-6ynCD5k3.mjs +1 -0
- package/dist/provider-context-CK6B4X_8.mjs +1 -0
- package/dist/providers/index.d.mts +135 -0
- package/dist/providers/index.mjs +1 -0
- package/dist/providers-namespace-DSEpli4A.d.mts +583 -0
- package/dist/providers-u8i15co9.mjs +1 -0
- package/dist/schema-CoyE6mPt.mjs +1 -0
- package/dist/schema-M5YTvSAG.d.mts +949 -0
- package/dist/schema-e0wU_lcV.mjs +1 -0
- package/dist/schema-introspection-Dn1jWQs1.mjs +1 -0
- package/dist/schemas-Bd0OjRQf.d.mts +46 -0
- package/dist/schemas-C46QfKzv.d.mts +459 -0
- package/dist/schemas-CDBSjg7o.d.mts +237 -0
- package/dist/schemas-CR1Rripy.mjs +1 -0
- package/dist/schemas-CVvwIfG4.mjs +1 -0
- package/dist/schemas-CaLhkkLn.mjs +1 -0
- package/dist/schemas-ClOOT1W6.d.mts +174 -0
- package/dist/schemas-DATniTHb.d.mts +182 -0
- package/dist/schemas-DE-GNmSD.mjs +1 -0
- package/dist/schemas-DVF1A4DF.d.mts +160 -0
- package/dist/schemas-DaRSfYLf.d.mts +73 -0
- package/dist/schemas-DiYVzG6e.d.mts +315 -0
- package/dist/schemas-hSrzflwZ.mjs +1 -0
- package/dist/schemas-j7ivZ2HI.d.mts +944 -0
- package/dist/schemas-jFe1AuI-.mjs +1 -0
- package/dist/schemas-wg_6PAdV.d.mts +153 -0
- package/dist/scoped-bus-04pwo1uM.mjs +1 -0
- package/dist/server-lifecycle-FXTPW39-.mjs +1 -0
- package/dist/server-lifecycle-YoSGFGnU.d.mts +160 -0
- package/dist/service-base/index.d.mts +98 -0
- package/dist/service-base/index.mjs +1 -0
- package/dist/services/adapter-runtime/index.d.mts +4 -0
- package/dist/services/adapter-runtime/index.mjs +1 -0
- package/dist/services/adapter-runtime/namespace.d.mts +2 -0
- package/dist/services/adapter-runtime/namespace.mjs +1 -0
- package/dist/services/adapter-runtime/schemas.d.mts +2 -0
- package/dist/services/adapter-runtime/schemas.mjs +1 -0
- package/dist/services/adapter-subsystem/index.d.mts +3 -0
- package/dist/services/adapter-subsystem/index.mjs +1 -0
- package/dist/services/adapter-subsystem/namespace.d.mts +2 -0
- package/dist/services/adapter-subsystem/namespace.mjs +1 -0
- package/dist/services/agent-runtime/index.d.mts +3 -0
- package/dist/services/agent-runtime/index.mjs +1 -0
- package/dist/services/agent-runtime/namespace.d.mts +2 -0
- package/dist/services/agent-runtime/namespace.mjs +1 -0
- package/dist/services/agent-runtime/schemas.d.mts +2 -0
- package/dist/services/agent-runtime/schemas.mjs +1 -0
- package/dist/services/capability/index.d.mts +2 -0
- package/dist/services/capability/index.mjs +1 -0
- package/dist/services/cli-detection/namespace.d.mts +56 -0
- package/dist/services/cli-detection/namespace.mjs +1 -0
- package/dist/services/codebase/index.d.mts +3 -0
- package/dist/services/codebase/index.mjs +1 -0
- package/dist/services/codebase/namespace.d.mts +2 -0
- package/dist/services/codebase/namespace.mjs +1 -0
- package/dist/services/codebase/schemas.d.mts +2 -0
- package/dist/services/codebase/schemas.mjs +1 -0
- package/dist/services/compression/index.d.mts +3 -0
- package/dist/services/compression/index.mjs +1 -0
- package/dist/services/compression/namespace.d.mts +2 -0
- package/dist/services/compression/namespace.mjs +1 -0
- package/dist/services/compression/schemas.d.mts +2 -0
- package/dist/services/compression/schemas.mjs +1 -0
- package/dist/services/context-rules/index.d.mts +412 -0
- package/dist/services/context-rules/index.mjs +1 -0
- package/dist/services/credential-change/index.d.mts +17 -0
- package/dist/services/credential-change/index.mjs +1 -0
- package/dist/services/definition/index.d.mts +2 -0
- package/dist/services/definition/index.mjs +1 -0
- package/dist/services/definition/namespace.d.mts +71 -0
- package/dist/services/definition/namespace.mjs +1 -0
- package/dist/services/definition/schemas.d.mts +38 -0
- package/dist/services/definition/schemas.mjs +1 -0
- package/dist/services/dialog/namespace.d.mts +105 -0
- package/dist/services/dialog/namespace.mjs +1 -0
- package/dist/services/dialog/schemas.d.mts +109 -0
- package/dist/services/dialog/schemas.mjs +1 -0
- package/dist/services/execution-target/index.d.mts +4 -0
- package/dist/services/execution-target/index.mjs +1 -0
- package/dist/services/execution-target/namespace.d.mts +2 -0
- package/dist/services/execution-target/namespace.mjs +1 -0
- package/dist/services/execution-target/schemas.d.mts +2 -0
- package/dist/services/execution-target/schemas.mjs +1 -0
- package/dist/services/filesystem/index.d.mts +3 -0
- package/dist/services/filesystem/index.mjs +1 -0
- package/dist/services/filesystem/namespace.d.mts +432 -0
- package/dist/services/filesystem/namespace.mjs +1 -0
- package/dist/services/filesystem/schemas.d.mts +240 -0
- package/dist/services/filesystem/schemas.mjs +1 -0
- package/dist/services/git/namespace.d.mts +1163 -0
- package/dist/services/git/namespace.mjs +1 -0
- package/dist/services/git/schemas.d.mts +932 -0
- package/dist/services/git/schemas.mjs +1 -0
- package/dist/services/harness/index.d.mts +861 -0
- package/dist/services/harness/index.mjs +1 -0
- package/dist/services/harness/storage/schema.d.mts +424 -0
- package/dist/services/harness/storage/schema.mjs +1 -0
- package/dist/services/index.d.mts +6185 -0
- package/dist/services/index.mjs +1 -0
- package/dist/services/local-notification/index.d.mts +25 -0
- package/dist/services/local-notification/index.mjs +1 -0
- package/dist/services/local-notification/namespace.d.mts +73 -0
- package/dist/services/local-notification/namespace.mjs +1 -0
- package/dist/services/local-notification/schemas.d.mts +88 -0
- package/dist/services/local-notification/schemas.mjs +1 -0
- package/dist/services/log-import/browser.d.mts +3 -0
- package/dist/services/log-import/browser.mjs +1 -0
- package/dist/services/log-import/index.d.mts +274 -0
- package/dist/services/log-import/index.mjs +2 -0
- package/dist/services/log-import/log-import.d.mts +3 -0
- package/dist/services/log-import/log-import.mjs +1 -0
- package/dist/services/log-import/namespace.d.mts +327 -0
- package/dist/services/log-import/namespace.mjs +1 -0
- package/dist/services/log-import/schemas.d.mts +217 -0
- package/dist/services/log-import/schemas.mjs +1 -0
- package/dist/services/model-registry/index.d.mts +2 -0
- package/dist/services/model-registry/index.mjs +1 -0
- package/dist/services/preferences/index.d.mts +3 -0
- package/dist/services/preferences/index.mjs +1 -0
- package/dist/services/preferences/schemas.d.mts +2 -0
- package/dist/services/preferences/schemas.mjs +1 -0
- package/dist/services/preferences/storage-namespace.d.mts +3 -0
- package/dist/services/preferences/storage-namespace.mjs +1 -0
- package/dist/services/provider-context/index.d.mts +2 -0
- package/dist/services/provider-context/index.mjs +1 -0
- package/dist/services/provider-runtime/index.d.mts +136 -0
- package/dist/services/provider-runtime/index.mjs +1 -0
- package/dist/services/session/handlers/index.d.mts +2 -0
- package/dist/services/session/handlers/index.mjs +1 -0
- package/dist/services/session/index.d.mts +10 -0
- package/dist/services/session/index.mjs +1 -0
- package/dist/services/session/messages/namespace.d.mts +2 -0
- package/dist/services/session/messages/namespace.mjs +1 -0
- package/dist/services/session/orchestrator-testing/index.d.mts +2 -0
- package/dist/services/session/orchestrator-testing/index.mjs +1 -0
- package/dist/services/session/session-events/namespace.d.mts +2 -0
- package/dist/services/session/session-events/namespace.mjs +1 -0
- package/dist/services/session/storage/namespace.d.mts +2 -0
- package/dist/services/session/storage/namespace.mjs +1 -0
- package/dist/services/session/storage/schema.d.mts +2 -0
- package/dist/services/session/storage/schema.mjs +1 -0
- package/dist/services/session/testing/index.d.mts +35 -0
- package/dist/services/session/testing/index.mjs +65 -0
- package/dist/services/session/testing/orchestrator-shared.d.mts +2 -0
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -0
- package/dist/services/session/turns/namespace.d.mts +2 -0
- package/dist/services/session/turns/namespace.mjs +1 -0
- package/dist/services/session-editor/index.d.mts +119 -0
- package/dist/services/session-editor/index.mjs +1 -0
- package/dist/services/settings/index.d.mts +47 -0
- package/dist/services/settings/index.mjs +1 -0
- package/dist/services/settings/namespace.d.mts +663 -0
- package/dist/services/settings/namespace.mjs +1 -0
- package/dist/services/settings/storage/clients-namespace.d.mts +2 -0
- package/dist/services/settings/storage/clients-namespace.mjs +1 -0
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +184 -0
- package/dist/services/settings/storage/extension-configs/namespace.mjs +1 -0
- package/dist/services/settings/storage/index.d.mts +4 -0
- package/dist/services/settings/storage/index.mjs +1 -0
- package/dist/services/settings/storage/providers-namespace.d.mts +2 -0
- package/dist/services/settings/storage/providers-namespace.mjs +1 -0
- package/dist/services/subagent/index.d.mts +2 -0
- package/dist/services/subagent/index.mjs +1 -0
- package/dist/services/subagent-template/index.d.mts +3 -0
- package/dist/services/subagent-template/index.mjs +1 -0
- package/dist/services/subagent-template/namespace.d.mts +2 -0
- package/dist/services/subagent-template/namespace.mjs +1 -0
- package/dist/services/subagent-template/schemas.d.mts +2 -0
- package/dist/services/subagent-template/schemas.mjs +1 -0
- package/dist/services/tool-approval/index.d.mts +2 -0
- package/dist/services/tool-approval/index.mjs +1 -0
- package/dist/services/tools/index.d.mts +2 -0
- package/dist/services/tools/index.mjs +1 -0
- package/dist/services/tray-menu/index.d.mts +4 -0
- package/dist/services/tray-menu/index.mjs +1 -0
- package/dist/services/tray-menu/namespace.d.mts +2 -0
- package/dist/services/tray-menu/namespace.mjs +1 -0
- package/dist/services/tray-menu/schemas.d.mts +2 -0
- package/dist/services/tray-menu/schemas.mjs +1 -0
- package/dist/services/turn/index.d.mts +2 -0
- package/dist/services/turn/index.mjs +1 -0
- package/dist/services/turn/namespace.d.mts +2 -0
- package/dist/services/turn/namespace.mjs +1 -0
- package/dist/services/turn/schemas.d.mts +335 -0
- package/dist/services/turn/schemas.mjs +1 -0
- package/dist/session-BoldSdNZ2.mjs +134 -0
- package/dist/session-DuVOYctZ.mjs +1 -0
- package/dist/session-lineage-CRsc9g1x.d.mts +65 -0
- package/dist/shared-DpOEfD8F.mjs +1 -0
- package/dist/shared-schemas-CPShiLNp.mjs +1 -0
- package/dist/skill-CQO4mDqK.mjs +1 -0
- package/dist/storage/drizzle/client.d.mts +78 -0
- package/dist/storage/drizzle/client.mjs +1 -0
- package/dist/storage/drizzle/index.d.mts +137 -0
- package/dist/storage/drizzle/index.mjs +1 -0
- package/dist/storage/handlers/drizzle/index.d.mts +2 -0
- package/dist/storage/handlers/drizzle/index.mjs +1 -0
- package/dist/storage/handlers/index.d.mts +33 -0
- package/dist/storage/handlers/index.mjs +1 -0
- package/dist/storage/index.d.mts +192 -0
- package/dist/storage/index.mjs +1 -0
- package/dist/storage-namespace-BXkoh5Sy.d.mts +221 -0
- package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
- package/dist/storage-namespace-definition-Bkx5rSto.d.mts +17 -0
- package/dist/storage-namespace-definition-CqSdsuCC.mjs +1 -0
- package/dist/style.css +3782 -0
- package/dist/telemetry-CvdLBWuk.mjs +1 -0
- package/dist/testing/drizzle-harness.d.mts +130 -0
- package/dist/testing/drizzle-harness.mjs +1 -0
- package/dist/testing/index.d.mts +106 -0
- package/dist/testing/index.mjs +1 -0
- package/dist/timeout-XsYIOKrc.mjs +1 -0
- package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
- package/dist/tools/index.d.mts +835 -0
- package/dist/tools/index.mjs +1 -0
- package/dist/tools/testing/index.d.mts +53 -0
- package/dist/tools/testing/index.mjs +1 -0
- package/dist/tools-D-luYcDw.mjs +1431 -0
- package/dist/tray-menu-service-DuXq5k22.mjs +1 -0
- package/dist/types-BCMUtBj1.d.mts +1106 -0
- package/dist/types-C2Ob9zz_.d.mts +128 -0
- package/dist/types-CCdqjeuH.d.mts +262 -0
- package/dist/types-DZHvOc_Q.d.mts +305 -0
- package/dist/types-Dy3YTcTF.d.mts +6777 -0
- package/dist/types-MfJZ67e9.d.mts +315 -0
- package/dist/types-dyP-bXXE.d.mts +31 -0
- package/dist/ui-components/index.d.mts +2342 -0
- package/dist/ui-components/index.mjs +8 -0
- package/dist/ui-config-9bDRwFZr.mjs +1 -0
- package/dist/ui-hooks/index.d.mts +1915 -0
- package/dist/ui-hooks/index.mjs +1 -0
- package/dist/ui-kernel/index.d.mts +2793 -0
- package/dist/ui-kernel/index.mjs +1 -0
- package/dist/ui-kernel/pages/namespace.d.mts +88 -0
- package/dist/ui-kernel/pages/namespace.mjs +1 -0
- package/dist/ui-kernel/pages/schemas.d.mts +2 -0
- package/dist/ui-kernel/pages/schemas.mjs +1 -0
- package/dist/ui-views/index.d.mts +487 -0
- package/dist/ui-views/index.mjs +30 -0
- package/dist/utils/health-probe.d.mts +26 -0
- package/dist/utils/health-probe.mjs +1 -0
- package/dist/utils/index.d.mts +262 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/keychain.d.mts +31 -0
- package/dist/utils/keychain.mjs +1 -0
- package/dist/utils/project-manifest.d.mts +130 -0
- package/dist/utils/project-manifest.mjs +1 -0
- package/dist/utils/resolve-package-root.d.mts +12 -0
- package/dist/utils/resolve-package-root.mjs +1 -0
- package/dist/utils/scope-paths.d.mts +33 -0
- package/dist/utils/scope-paths.mjs +1 -0
- package/dist/utils/workspace-packages.d.mts +59 -0
- package/dist/utils/workspace-packages.mjs +1 -0
- package/dist/utils/workspace-root.d.mts +24 -0
- package/dist/utils/workspace-root.mjs +2 -0
- package/dist/variant-CT6XBP6T.mjs +1 -0
- package/dist/version-BeT3ASEe.mjs +1 -0
- package/dist/visibility-Cb62p9bv.mjs +1 -0
- package/dist/window-registry-CBcrGTv4.d.mts +130 -0
- package/dist/window-registry-DW-dKRjQ.mjs +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,483 @@
|
|
|
1
|
+
import { TransportPeerContext } from "@makaio/framework/core";
|
|
2
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
3
|
+
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
4
|
+
import { MakaioNodeExtension, PendingRequest, SubagentConfig, SubagentConstraints, SubagentStatus } from "@makaio/framework/contracts";
|
|
5
|
+
import { BaseService } from "@makaio/framework/service-base";
|
|
6
|
+
|
|
7
|
+
//#region services/core/src/subagent/spawn-delegation.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Set of authenticated peer identities that are authorised to request
|
|
10
|
+
* subagent spawning or execution on behalf of a remote caller.
|
|
11
|
+
*
|
|
12
|
+
* Entries are keyed on the `kind:id` pair of the peer (for example
|
|
13
|
+
* `workflow-execution:exec-abc-123`). The empty set denies all remote callers.
|
|
14
|
+
*/
|
|
15
|
+
type SpawnDelegationAllowSet = Set<string>;
|
|
16
|
+
/**
|
|
17
|
+
* Determine whether a remote peer is authorised to request subagent
|
|
18
|
+
* spawning / execution on this node.
|
|
19
|
+
*
|
|
20
|
+
* Workflow execution peers are authorised by identity because they represent
|
|
21
|
+
* the runner that owns the workflow agent step. Other peer kinds are
|
|
22
|
+
* authorised only when their `kind:id` pair matches the explicit allow-set.
|
|
23
|
+
* @param peer - Authenticated peer context from the incoming transport message.
|
|
24
|
+
* @param allowSet - Allow-set configured for this SubagentService instance.
|
|
25
|
+
* @returns `true` when the peer may delegate spawn/execute requests.
|
|
26
|
+
*/
|
|
27
|
+
declare function isPeerAuthorizedToDelegate(peer: TransportPeerContext | undefined, allowSet: SpawnDelegationAllowSet): boolean;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region services/core/src/subagent/subagent-service.d.ts
|
|
30
|
+
/**
|
|
31
|
+
* Orchestrates subagent execution lifecycle.
|
|
32
|
+
*
|
|
33
|
+
* Owns SubagentManager and handles:
|
|
34
|
+
* - Session creation on spawn
|
|
35
|
+
* - Adapter startup on spawn
|
|
36
|
+
* - Message routing (toChild \> child session)
|
|
37
|
+
* - Cleanup on completion/cancellation
|
|
38
|
+
*/
|
|
39
|
+
declare class SubagentService extends BaseService {
|
|
40
|
+
private readonly machineId?;
|
|
41
|
+
private readonly delegationAllowSet;
|
|
42
|
+
/** Manager is now private - tools use RPCs to interact with state */
|
|
43
|
+
private readonly manager;
|
|
44
|
+
private readonly pendingChildSessionClose;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new SubagentService instance.
|
|
47
|
+
* @param bus - The event bus for inter-service communication
|
|
48
|
+
* @param constraints - Subagent execution constraints
|
|
49
|
+
* @param machineId - Optional machine ID for adapter resolution
|
|
50
|
+
* @param delegationAllowSet - Set of peer identities permitted to request
|
|
51
|
+
* spawn or execute on this node from a remote origin. Authenticated
|
|
52
|
+
* `workflow-execution` peers are allowed by identity; this set is for
|
|
53
|
+
* additional delegated peer kinds.
|
|
54
|
+
*/
|
|
55
|
+
constructor(bus?: IMakaioBus, constraints?: SubagentConstraints, machineId?: string | undefined, delegationAllowSet?: SpawnDelegationAllowSet);
|
|
56
|
+
/**
|
|
57
|
+
* Grant an authenticated peer permission to delegate spawn/execute requests.
|
|
58
|
+
*
|
|
59
|
+
* Adds the canonical `kind:id` key to the allow-set so subsequent remote
|
|
60
|
+
* calls from this peer pass the delegation guard.
|
|
61
|
+
* @param kind - Peer kind (e.g. `'workflow-execution'`)
|
|
62
|
+
* @param id - Peer identifier
|
|
63
|
+
*/
|
|
64
|
+
grantDelegation(kind: string, id: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Revoke delegation permission for an authenticated peer.
|
|
67
|
+
*
|
|
68
|
+
* Removes the canonical `kind:id` key from the allow-set. Subsequent
|
|
69
|
+
* remote calls from this peer will be denied by the delegation guard.
|
|
70
|
+
* @param kind - Peer kind (e.g. `'workflow-execution'`)
|
|
71
|
+
* @param id - Peer identifier
|
|
72
|
+
*/
|
|
73
|
+
revokeDelegation(kind: string, id: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Register bus handlers for subagent lifecycle management.
|
|
76
|
+
*/
|
|
77
|
+
protected onInit(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Wire periodic sweep and cleanup interval.
|
|
80
|
+
* Uses addCleanup so interval is cleared on destroy().
|
|
81
|
+
*/
|
|
82
|
+
private wirePeriodicSweep;
|
|
83
|
+
/**
|
|
84
|
+
* Register RPC handlers for state operations.
|
|
85
|
+
* Tools interact with subagent state through these RPCs.
|
|
86
|
+
*/
|
|
87
|
+
private registerRpcHandlers;
|
|
88
|
+
/** Clear deferred close state when the service lifecycle shuts down. */
|
|
89
|
+
protected onDestroy(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Handle spawned event - create session and start agent.
|
|
92
|
+
* @param payload - Spawned event payload
|
|
93
|
+
* @returns Error message on failure, undefined on success
|
|
94
|
+
*/
|
|
95
|
+
private handleSpawned;
|
|
96
|
+
/**
|
|
97
|
+
* Creates the child session and updates tracked subagent state.
|
|
98
|
+
* @param subagentId - Subagent identifier
|
|
99
|
+
* @param parentSessionId - Parent session identifier
|
|
100
|
+
* @param config - Parsed subagent config
|
|
101
|
+
* @param executionTargetId - Resolved execution target ID
|
|
102
|
+
* @param resolutionParams - Framework execution-target fallback fields
|
|
103
|
+
* @param spawningToolCallId - Tool call ID that triggered the spawn, if available
|
|
104
|
+
* @returns Created child session ID
|
|
105
|
+
*/
|
|
106
|
+
private createChildSessionForSpawn;
|
|
107
|
+
/**
|
|
108
|
+
* Starts the adapter agent in the newly created child session.
|
|
109
|
+
* @param adapterName - Adapter type name
|
|
110
|
+
* @param config - Parsed subagent config
|
|
111
|
+
* @param sessionId - Child session ID
|
|
112
|
+
* @param task - Initial task message
|
|
113
|
+
* @returns Resolves when adapter start succeeds
|
|
114
|
+
* @throws Error when adapter startup fails
|
|
115
|
+
*/
|
|
116
|
+
private startAdapterForSubagent;
|
|
117
|
+
/**
|
|
118
|
+
* Marks subagent spawn as failed and emits the lifecycle failure event.
|
|
119
|
+
* @param subagentId - Subagent identifier
|
|
120
|
+
* @param parentSessionId - Parent session identifier
|
|
121
|
+
* @param phase - Spawn phase where failure occurred
|
|
122
|
+
* @param reason - Error object or message
|
|
123
|
+
* @returns Normalized error message
|
|
124
|
+
*/
|
|
125
|
+
private failSpawn;
|
|
126
|
+
/**
|
|
127
|
+
* Build execution-target resolution parameters for subagent spawn.
|
|
128
|
+
*
|
|
129
|
+
* Priority:
|
|
130
|
+
* 1. Explicit subagent `executionTargetId`
|
|
131
|
+
* 2. Parent session stamped target + context
|
|
132
|
+
* @param parentSessionId - Parent session used as fallback context.
|
|
133
|
+
* @param executionTargetId - Optional explicit target override from subagent config.
|
|
134
|
+
* @returns Resolution parameters for `ExecutionTargetSubjects.resolve`.
|
|
135
|
+
*/
|
|
136
|
+
private buildExecutionTargetResolutionParams;
|
|
137
|
+
/**
|
|
138
|
+
* Build child session creation payload from subagent config.
|
|
139
|
+
*
|
|
140
|
+
* `parentSessionId` always records the session graph relation. The separate
|
|
141
|
+
* contextInheritance field controls whether parent conversation history is
|
|
142
|
+
* assembled for the child's first turn.
|
|
143
|
+
* @param parentSessionId - Parent session identifier from the spawn request
|
|
144
|
+
* @param config - Parsed subagent config
|
|
145
|
+
* @param executionTargetId - Resolved execution target to stamp on child session
|
|
146
|
+
* @param spawningToolCallId - Tool call ID that triggered the spawn, if available
|
|
147
|
+
* @returns Session.create payload for the child session
|
|
148
|
+
*/
|
|
149
|
+
private buildChildSessionCreatePayload;
|
|
150
|
+
private handleExecute;
|
|
151
|
+
/**
|
|
152
|
+
* Route a message from parent to child subagent session.
|
|
153
|
+
* @param payload - Message routing payload
|
|
154
|
+
*/
|
|
155
|
+
private handleToChild;
|
|
156
|
+
/**
|
|
157
|
+
* Handle terminal successful subagent completion.
|
|
158
|
+
* @param subagentId - Completed subagent identifier.
|
|
159
|
+
*/
|
|
160
|
+
private handleCompleted;
|
|
161
|
+
/**
|
|
162
|
+
* Handle terminal subagent cancellation.
|
|
163
|
+
* @param subagentId - Cancelled subagent identifier.
|
|
164
|
+
*/
|
|
165
|
+
private handleCancelled;
|
|
166
|
+
/**
|
|
167
|
+
* Close a subagent child session once the subagent reaches a terminal state.
|
|
168
|
+
*
|
|
169
|
+
* The close operation is best-effort because subagent state has already
|
|
170
|
+
* transitioned terminal; a session-close failure should not undo completion
|
|
171
|
+
* or cancellation.
|
|
172
|
+
* @param subagentId - Subagent whose child session should be closed.
|
|
173
|
+
*/
|
|
174
|
+
private closeChildSession;
|
|
175
|
+
/**
|
|
176
|
+
* Check whether a subagent has reached a terminal status.
|
|
177
|
+
* @param status - Subagent status to inspect.
|
|
178
|
+
* @returns True when the subagent should no longer start or route child work.
|
|
179
|
+
*/
|
|
180
|
+
private isTerminalSubagentStatus;
|
|
181
|
+
/**
|
|
182
|
+
* Handle adapter session close events to detect dead child processes.
|
|
183
|
+
*
|
|
184
|
+
* When an adapter session closes, find any tracked subagent whose
|
|
185
|
+
* childSessionId matches and transition it to failed if still active.
|
|
186
|
+
* @param sessionId - The session ID reported by the adapter as closed
|
|
187
|
+
*/
|
|
188
|
+
private handleAdapterSessionClosed;
|
|
189
|
+
/**
|
|
190
|
+
* Return true when a handler may proceed.
|
|
191
|
+
*
|
|
192
|
+
* Local callers always proceed. Remote callers proceed only when they are an
|
|
193
|
+
* authenticated workflow execution peer or their authenticated peer appears
|
|
194
|
+
* in the delegation allow-set.
|
|
195
|
+
* @param ctx - Incoming message context
|
|
196
|
+
* @returns True when the handler should process the request
|
|
197
|
+
*/
|
|
198
|
+
private isRemoteDelegationAllowed;
|
|
199
|
+
private emitExecutionFailed;
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region services/core/src/subagent/package.d.ts
|
|
203
|
+
/** Token for the framework subagent orchestration service. */
|
|
204
|
+
declare const SubagentServiceToken: _$_makaio_contracts0.ExtensionToken<SubagentService>;
|
|
205
|
+
/**
|
|
206
|
+
* MakaioNodeExtension<IMakaioBus> manifest for {@link SubagentService}.
|
|
207
|
+
*
|
|
208
|
+
* Subagent orchestration runs in headless mode — it does not require a UI
|
|
209
|
+
* shell but does require the node runtime for process management.
|
|
210
|
+
* The services-core manifest intentionally uses a service-specific export
|
|
211
|
+
* name; `@makaio/extension-subagent` continues to own the tool-extension
|
|
212
|
+
* `subagentPackage` export.
|
|
213
|
+
*/
|
|
214
|
+
declare const subagentServicePackage: MakaioNodeExtension<IMakaioBus>;
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region services/core/src/subagent/utils/ring-buffer.d.ts
|
|
217
|
+
/**
|
|
218
|
+
* Simple ring buffer with fixed maximum size.
|
|
219
|
+
* When full, oldest items are dropped to make room for new ones.
|
|
220
|
+
* @typeParam T - Type of items stored in the buffer
|
|
221
|
+
*/
|
|
222
|
+
declare class RingBuffer<T> {
|
|
223
|
+
private readonly maxSize;
|
|
224
|
+
private items;
|
|
225
|
+
/**
|
|
226
|
+
* Creates a new RingBuffer.
|
|
227
|
+
* @param maxSize - Maximum number of items to store (default: 50)
|
|
228
|
+
*/
|
|
229
|
+
constructor(maxSize?: number);
|
|
230
|
+
/**
|
|
231
|
+
* Add an item to the buffer.
|
|
232
|
+
* If at capacity, the oldest item is dropped.
|
|
233
|
+
* @param item - Item to add
|
|
234
|
+
*/
|
|
235
|
+
push(item: T): void;
|
|
236
|
+
/**
|
|
237
|
+
* Get all items as an array (oldest first).
|
|
238
|
+
* @returns Copy of the internal array
|
|
239
|
+
*/
|
|
240
|
+
toArray(): T[];
|
|
241
|
+
/**
|
|
242
|
+
* Current number of items in the buffer.
|
|
243
|
+
* @returns Number of items currently stored
|
|
244
|
+
*/
|
|
245
|
+
get length(): number;
|
|
246
|
+
/**
|
|
247
|
+
* Remove all items from the buffer.
|
|
248
|
+
*/
|
|
249
|
+
clear(): void;
|
|
250
|
+
}
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region services/core/src/subagent/manager/types.d.ts
|
|
253
|
+
/**
|
|
254
|
+
* Internal resolver type for pending request_input.
|
|
255
|
+
* Called with the response string, or null if timed out or cancelled.
|
|
256
|
+
*/
|
|
257
|
+
type InputResolver = (response: string | null) => void;
|
|
258
|
+
/**
|
|
259
|
+
* Internal pending request with resolver callback.
|
|
260
|
+
*/
|
|
261
|
+
interface InternalPendingRequest extends PendingRequest {
|
|
262
|
+
/** Callback to resolve the pending request_input promise. */
|
|
263
|
+
resolver: InputResolver;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Tracked runtime state for a spawned subagent.
|
|
267
|
+
*/
|
|
268
|
+
interface TrackedSubagent {
|
|
269
|
+
/** Unique identifier for this subagent. */
|
|
270
|
+
subagentId: string;
|
|
271
|
+
/** Parent session that spawned this subagent. */
|
|
272
|
+
parentSessionId: string;
|
|
273
|
+
/** Child session running this subagent. */
|
|
274
|
+
childSessionId?: string;
|
|
275
|
+
/** Current status of the subagent. */
|
|
276
|
+
status: SubagentStatus;
|
|
277
|
+
/** Configuration used to spawn this subagent. */
|
|
278
|
+
config: SubagentConfig;
|
|
279
|
+
/** Nesting depth in the subagent hierarchy. */
|
|
280
|
+
depth: number;
|
|
281
|
+
/** Active request_input state, if the child is waiting for parent input. */
|
|
282
|
+
pendingRequest?: InternalPendingRequest;
|
|
283
|
+
/** Recent progress updates. */
|
|
284
|
+
progressUpdates: RingBuffer<string>;
|
|
285
|
+
/** Final result if completed successfully. */
|
|
286
|
+
result?: string;
|
|
287
|
+
/** Optional completion summary. */
|
|
288
|
+
summary?: string;
|
|
289
|
+
/** Error message if failed. */
|
|
290
|
+
error?: string;
|
|
291
|
+
/** Timestamp when the subagent was spawned. */
|
|
292
|
+
startTime: number;
|
|
293
|
+
/** Timestamp when the subagent reached a terminal state. */
|
|
294
|
+
endTime?: number;
|
|
295
|
+
/** Timestamp of the last state mutation. */
|
|
296
|
+
lastActivityAt: number;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Options for spawning a subagent.
|
|
300
|
+
*/
|
|
301
|
+
interface SpawnOptions extends SubagentConfig {
|
|
302
|
+
/** Parent session spawning this subagent. */
|
|
303
|
+
parentSessionId: string;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Result from awaiting subagent completion.
|
|
307
|
+
*/
|
|
308
|
+
interface AwaitResult {
|
|
309
|
+
/** Final status when await returned. */
|
|
310
|
+
status: 'completed' | 'failed' | 'waiting_input' | 'timeout' | 'cancelled';
|
|
311
|
+
/** Result if completed successfully. */
|
|
312
|
+
result?: string;
|
|
313
|
+
/** Pending request if status is waiting_input. */
|
|
314
|
+
pendingRequest?: PendingRequest;
|
|
315
|
+
/** Error message if failed. */
|
|
316
|
+
error?: string;
|
|
317
|
+
}
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region services/core/src/subagent/manager/subagent-manager.d.ts
|
|
320
|
+
/**
|
|
321
|
+
* Options for tracking a new subagent.
|
|
322
|
+
*/
|
|
323
|
+
interface TrackOptions {
|
|
324
|
+
/** Unique identifier for the subagent */
|
|
325
|
+
subagentId: string;
|
|
326
|
+
/** Parent session that spawned this subagent */
|
|
327
|
+
parentSessionId: string;
|
|
328
|
+
/** Configuration used to spawn this subagent */
|
|
329
|
+
config: SubagentConfig;
|
|
330
|
+
/** Nesting depth in subagent hierarchy */
|
|
331
|
+
depth: number;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Manages tracked subagent state.
|
|
335
|
+
*
|
|
336
|
+
* Similar pattern to ShellManager - tracks active subagents, handles lifecycle.
|
|
337
|
+
* Responsible for:
|
|
338
|
+
* - Tracking subagent state
|
|
339
|
+
* - Managing pending request_input
|
|
340
|
+
* - Coordinating awaiters for completion
|
|
341
|
+
* - Cleanup of stale completed subagents
|
|
342
|
+
*/
|
|
343
|
+
declare class SubagentManager {
|
|
344
|
+
readonly constraints: SubagentConstraints;
|
|
345
|
+
private subagents;
|
|
346
|
+
private awaiters;
|
|
347
|
+
constructor(constraints: SubagentConstraints);
|
|
348
|
+
/**
|
|
349
|
+
* Track a new subagent.
|
|
350
|
+
* childSessionId is set later by SubagentService after session creation.
|
|
351
|
+
* @param options - Tracking options
|
|
352
|
+
* @returns The tracked subagent state
|
|
353
|
+
*/
|
|
354
|
+
track(options: TrackOptions): TrackedSubagent;
|
|
355
|
+
/**
|
|
356
|
+
* Set the child session ID after session creation.
|
|
357
|
+
* Called by SubagentService after creating the session.
|
|
358
|
+
* @param subagentId - ID of the subagent
|
|
359
|
+
* @param childSessionId - Session ID created by session service
|
|
360
|
+
*/
|
|
361
|
+
setChildSessionId(subagentId: string, childSessionId: string): void;
|
|
362
|
+
/**
|
|
363
|
+
* Get tracked subagent by ID.
|
|
364
|
+
* @param subagentId - ID of the subagent
|
|
365
|
+
* @returns The tracked subagent, or undefined if not found
|
|
366
|
+
*/
|
|
367
|
+
get(subagentId: string): TrackedSubagent | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Return all non-terminal subagents as an array.
|
|
370
|
+
*
|
|
371
|
+
* Non-terminal means any status not in `TERMINAL_STATES` (`completed`, `failed`, `cancelled`).
|
|
372
|
+
* This includes `'hung'`, so results (and derived counts from `countActiveBySession`
|
|
373
|
+
* and `countTotalActive`) represent "not terminal" rather than "currently doing useful work".
|
|
374
|
+
*
|
|
375
|
+
* Used for lookups that need to scan active state (e.g. session close detection).
|
|
376
|
+
* @returns Array of tracked subagents not yet in a terminal state
|
|
377
|
+
*/
|
|
378
|
+
getAllNonTerminal(): TrackedSubagent[];
|
|
379
|
+
/**
|
|
380
|
+
* Count non-terminal subagents for a parent session.
|
|
381
|
+
*
|
|
382
|
+
* Includes `'hung'` because `'hung'` is not part of `TERMINAL_STATES`.
|
|
383
|
+
* @param parentSessionId - Parent session ID
|
|
384
|
+
* @returns Count of non-terminal subagents
|
|
385
|
+
*/
|
|
386
|
+
countActiveBySession(parentSessionId: string): number;
|
|
387
|
+
/**
|
|
388
|
+
* Count total non-terminal subagents across all sessions.
|
|
389
|
+
*
|
|
390
|
+
* Includes `'hung'` because `'hung'` is not part of `TERMINAL_STATES`.
|
|
391
|
+
* @returns Total count of non-terminal subagents
|
|
392
|
+
*/
|
|
393
|
+
countTotalActive(): number;
|
|
394
|
+
/**
|
|
395
|
+
* Update subagent status.
|
|
396
|
+
* Sets endTime if transitioning to a terminal state.
|
|
397
|
+
* @param subagentId - ID of the subagent
|
|
398
|
+
* @param status - New status
|
|
399
|
+
*/
|
|
400
|
+
updateStatus(subagentId: string, status: SubagentStatus): void;
|
|
401
|
+
/**
|
|
402
|
+
* Add a progress update to the subagent's ring buffer.
|
|
403
|
+
* @param subagentId - ID of the subagent
|
|
404
|
+
* @param update - Progress update message
|
|
405
|
+
*/
|
|
406
|
+
addProgress(subagentId: string, update: string): void;
|
|
407
|
+
/**
|
|
408
|
+
* Set pending request (enforces single-request invariant).
|
|
409
|
+
* @param subagentId - ID of the subagent
|
|
410
|
+
* @param request - The pending request with resolver
|
|
411
|
+
* @throws SubagentError if subagent not found or request already pending
|
|
412
|
+
*/
|
|
413
|
+
setPendingRequest(subagentId: string, request: InternalPendingRequest): void;
|
|
414
|
+
/**
|
|
415
|
+
* Resolve pending request with response.
|
|
416
|
+
* @param subagentId - ID of the subagent
|
|
417
|
+
* @param response - Response string, or null if timed out/cancelled
|
|
418
|
+
*/
|
|
419
|
+
resolvePendingRequest(subagentId: string, response: string | null): void;
|
|
420
|
+
/**
|
|
421
|
+
* Mark subagent as completed.
|
|
422
|
+
* @param subagentId - ID of the subagent
|
|
423
|
+
* @param result - Result string
|
|
424
|
+
* @param summary - Optional summary of the result
|
|
425
|
+
* @throws SubagentError if subagent not found or already in terminal state
|
|
426
|
+
*/
|
|
427
|
+
markCompleted(subagentId: string, result: string, summary?: string): void;
|
|
428
|
+
/**
|
|
429
|
+
* Mark subagent as failed.
|
|
430
|
+
* Does nothing if subagent not found or already in a terminal state.
|
|
431
|
+
* @param subagentId - ID of the subagent
|
|
432
|
+
* @param error - Error message
|
|
433
|
+
*/
|
|
434
|
+
markFailed(subagentId: string, error: string): void;
|
|
435
|
+
/**
|
|
436
|
+
* Mark subagent as cancelled.
|
|
437
|
+
* Resolves any pending request with null.
|
|
438
|
+
* @param subagentId - ID of the subagent
|
|
439
|
+
* @returns true if cancelled, false if not found or already terminal
|
|
440
|
+
*/
|
|
441
|
+
markCancelled(subagentId: string): boolean;
|
|
442
|
+
/**
|
|
443
|
+
* Register an awaiter callback for subagent completion.
|
|
444
|
+
* @param subagentId - ID of the subagent
|
|
445
|
+
* @param callback - Callback to invoke when subagent reaches terminal state
|
|
446
|
+
*/
|
|
447
|
+
addAwaiter(subagentId: string, callback: (result: AwaitResult) => void): void;
|
|
448
|
+
/**
|
|
449
|
+
* Remove an awaiter callback for a subagent.
|
|
450
|
+
* Used for cleanup when await times out before subagent reaches terminal state.
|
|
451
|
+
* @param subagentId - ID of the subagent
|
|
452
|
+
* @param callback - The callback to remove
|
|
453
|
+
* @returns true if the callback was found and removed
|
|
454
|
+
*/
|
|
455
|
+
removeAwaiter(subagentId: string, callback: (result: AwaitResult) => void): boolean;
|
|
456
|
+
/**
|
|
457
|
+
* Resolve all awaiters for a subagent.
|
|
458
|
+
* @param subagentId - ID of the subagent
|
|
459
|
+
*/
|
|
460
|
+
private resolveAwaiters;
|
|
461
|
+
/**
|
|
462
|
+
* Cleanup old completed subagents based on retention TTL.
|
|
463
|
+
* @returns Number of subagents cleaned up
|
|
464
|
+
*/
|
|
465
|
+
cleanup(): number;
|
|
466
|
+
/**
|
|
467
|
+
* Sweep for hung subagents that have had no state activity within the timeout window.
|
|
468
|
+
*
|
|
469
|
+
* Transitions `spawning` and `running` subagents to `'hung'` (non-terminal).
|
|
470
|
+
* `waiting_input` subagents are skipped — `request_input` owns their timeout.
|
|
471
|
+
* Already-hung subagents are also skipped to avoid redundant transitions.
|
|
472
|
+
*
|
|
473
|
+
* The coordinator observes `'hung'` via `getStatus` and decides whether to kill
|
|
474
|
+
* and retry or abort. Awaiters are NOT resolved — `'hung'` is non-terminal.
|
|
475
|
+
*
|
|
476
|
+
* When `inactivityTimeoutMs` is less than or equal to 0 this is a no-op (sweep is opt-in).
|
|
477
|
+
* @param inactivityTimeoutMs - Inactivity threshold in milliseconds. Values less than or equal to 0 disable sweep.
|
|
478
|
+
* @returns Number of subagents transitioned to `'hung'`
|
|
479
|
+
*/
|
|
480
|
+
sweepHung(inactivityTimeoutMs: number): number;
|
|
481
|
+
}
|
|
482
|
+
//#endregion
|
|
483
|
+
export { InternalPendingRequest as a, SubagentServiceToken as c, SpawnDelegationAllowSet as d, isPeerAuthorizedToDelegate as f, InputResolver as i, subagentServicePackage as l, TrackOptions as n, SpawnOptions as o, AwaitResult as r, TrackedSubagent as s, SubagentManager as t, SubagentService as u };
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
+
import { HarnessDefinition, MakaioSessionAgent } from "@makaio/framework/contracts";
|
|
3
|
+
import { BaseService } from "@makaio/framework/service-base";
|
|
4
|
+
import { FileAccessRuleProvider } from "@makaio/framework/tools";
|
|
5
|
+
|
|
6
|
+
//#region services/core/src/tool-approval/tool-approval-types.d.ts
|
|
7
|
+
/** Configuration options for {@link ToolApprovalService}. */
|
|
8
|
+
interface ToolApprovalServiceOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Provider for file access rules derived from `.makaioignore` files.
|
|
11
|
+
* When supplied, enforces file-access restrictions as an absolute pre-check
|
|
12
|
+
* that runs before any policy cascade — including `full-access` policies.
|
|
13
|
+
*/
|
|
14
|
+
fileAccessRuleProvider?: FileAccessRuleProvider;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region services/core/src/tool-approval/tool-approval-service.d.ts
|
|
18
|
+
/**
|
|
19
|
+
* Resolves and applies tool approval policies based on the
|
|
20
|
+
* persona → profile → harness → system default cascade.
|
|
21
|
+
*
|
|
22
|
+
* Replaces the blanket auto-approve handler that was previously
|
|
23
|
+
* in bus-server. Registered in the core runtime lifecycle.
|
|
24
|
+
*
|
|
25
|
+
* When a file access rule provider is configured,
|
|
26
|
+
* `.makaioignore` rules are evaluated before the policy cascade as an absolute
|
|
27
|
+
* deny layer — no policy (not even `full-access`) can bypass them.
|
|
28
|
+
*/
|
|
29
|
+
declare class ToolApprovalService extends BaseService {
|
|
30
|
+
/** Minimal logger seam so policy-resolution failures are observable in tests and production. */
|
|
31
|
+
private readonly logger;
|
|
32
|
+
private readonly options;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new ToolApprovalService instance.
|
|
35
|
+
* @param bus - Bus instance used to resolve policy data and register approval handlers
|
|
36
|
+
* @param options - Optional configuration including a file access rule provider
|
|
37
|
+
*/
|
|
38
|
+
constructor(bus: IMakaioBus, options?: ToolApprovalServiceOptions);
|
|
39
|
+
/**
|
|
40
|
+
* Register the tool approval handler.
|
|
41
|
+
*/
|
|
42
|
+
protected onInit(): Promise<void>;
|
|
43
|
+
/**
|
|
44
|
+
* Dispatch an `always-ask` approval request to the approval queue.
|
|
45
|
+
* Subscribes to the agent session-closed event so that a pending approval
|
|
46
|
+
* is automatically cancelled when the agent disconnects. The subscription is
|
|
47
|
+
* cleaned up in the `finally` block regardless of outcome.
|
|
48
|
+
* @param payload - Tool approval request payload
|
|
49
|
+
* @param setResult - Callback to set the handler result on the request context
|
|
50
|
+
* @param resolved - Pre-resolved policy context used to enrich the request
|
|
51
|
+
*/
|
|
52
|
+
private dispatchAlwaysAskApproval;
|
|
53
|
+
/**
|
|
54
|
+
* Evaluate `.makaioignore` file access rules before policy cascade handling.
|
|
55
|
+
* @param payload - Incoming tool approval payload
|
|
56
|
+
* @param context - CWD and directory constraints for rule evaluation
|
|
57
|
+
* @returns Deny message when access should be blocked, otherwise undefined
|
|
58
|
+
*/
|
|
59
|
+
private checkFileAccessDenyReason;
|
|
60
|
+
/**
|
|
61
|
+
* Execute the `approval.resolveEnrichedPolicy` RPC exactly once and return the
|
|
62
|
+
* raw discriminated result. Callers apply their own fail-closed semantics.
|
|
63
|
+
* Errors are logged here since this is the single call site for the RPC.
|
|
64
|
+
* @param personaId - Optional persona ID from agent metadata
|
|
65
|
+
* @param profileId - Optional profile ID from agent metadata
|
|
66
|
+
* @param toolName - Tool name forwarded to the RPC
|
|
67
|
+
* @returns Handled result with response data, or unhandled sentinel on failure
|
|
68
|
+
*/
|
|
69
|
+
private fetchRawEnrichedPolicy;
|
|
70
|
+
/**
|
|
71
|
+
* Resolves the effective approval policy for a tool approval request,
|
|
72
|
+
* returning the policy alongside cached harness context.
|
|
73
|
+
*
|
|
74
|
+
* Policy cascade: persona/profile (via host-tier RPC) → harness → system default.
|
|
75
|
+
* After resolving the base policy, applies capability-based overrides from
|
|
76
|
+
* the harness using most-restrictive-wins semantics.
|
|
77
|
+
* @param request - Adapter name and tool name from the approval payload
|
|
78
|
+
* @param agent - Pre-fetched agent metadata, or null if unavailable
|
|
79
|
+
* @param rawEnrichedPolicy - Pre-fetched enriched-policy RPC result shared with the file-access check
|
|
80
|
+
* @returns Resolved policy and associated context
|
|
81
|
+
*/
|
|
82
|
+
private resolvePolicyWithContext;
|
|
83
|
+
/**
|
|
84
|
+
* Look up agent metadata from storage by agentId.
|
|
85
|
+
* @param agentId - The agent identifier
|
|
86
|
+
* @param sessionId - Optional session ID for scoped lookup
|
|
87
|
+
* @returns Agent metadata, or null if not found
|
|
88
|
+
*/
|
|
89
|
+
private getAgentMetadata;
|
|
90
|
+
/**
|
|
91
|
+
* Check for a session-level approval policy override.
|
|
92
|
+
* Uses `requestOptional` so that when no session storage handler is registered
|
|
93
|
+
* (e.g., in tests or lightweight runtimes) the method gracefully returns
|
|
94
|
+
* `undefined` and the existing policy cascade runs unchanged.
|
|
95
|
+
* @param sessionId - Session to check
|
|
96
|
+
* @returns Override policy or undefined when not set or unavailable
|
|
97
|
+
*/
|
|
98
|
+
private resolveSessionOverride;
|
|
99
|
+
/**
|
|
100
|
+
* Resolve harness policy for the given adapter; returns undefined on failure.
|
|
101
|
+
* @param adapterName - Adapter type name
|
|
102
|
+
* @param harnessId - Explicit harness ID; overrides the default harness lookup
|
|
103
|
+
* @param clientId - Client ID for client-scoped harness resolution
|
|
104
|
+
* @returns Harness resolution carrying base policy and capability override data, or undefined when resolution fails
|
|
105
|
+
*/
|
|
106
|
+
private resolveHarnessPolicy;
|
|
107
|
+
}
|
|
108
|
+
//#endregion
|
|
109
|
+
export { ToolApprovalService as t };
|