@makaio/framework 1.0.0-dev-1779051654000 → 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/LICENSE +1 -1
- 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 +6013 -14
- package/dist/adapters/acp-client/index.mjs +3 -1
- package/dist/adapters/config/index.d.mts +1 -1
- package/dist/adapters/config/index.mjs +1 -1
- package/dist/adapters/index.d.mts +47 -20
- package/dist/adapters/index.mjs +13 -6
- package/dist/adapters/node.d.mts +4 -4
- package/dist/adapters/node.mjs +4 -4
- package/dist/adapters/stream-session/index.d.mts +30 -0
- package/dist/adapters/stream-session/index.mjs +1 -1
- package/dist/artifact-B3npq1cy.mjs +1 -0
- package/dist/bus/index.d.mts +866 -203
- package/dist/bus/index.mjs +1 -1
- package/dist/bus-Caz3Jpbc.mjs +1 -0
- package/dist/bus-Hb-LGzgb.mjs +2 -0
- package/dist/chunk-DTipWd-i.mjs +1 -0
- package/dist/client-bx74gm4R.mjs +1 -0
- package/dist/clients/index.d.mts +113 -35
- package/dist/clients/index.mjs +2 -2
- package/dist/{clients-namespace-UHj5wt-l.d.mts → clients-namespace-GmSJpBUV.d.mts} +8 -8
- package/dist/{config-namespace-ChZOpi1W.d.mts → config-namespace-CPY9YsR8.d.mts} +4 -4
- package/dist/contracts/adapter/index.d.mts +3 -3
- package/dist/contracts/adapter/index.mjs +1 -1
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
- package/dist/contracts/artifact/index.d.mts +2 -0
- package/dist/contracts/artifact/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 +8 -8
- package/dist/contracts/config/index.mjs +1 -1
- package/dist/contracts/extension/index.d.mts +4 -3
- package/dist/contracts/extension/index.mjs +1 -1
- package/dist/contracts/facet/index.d.mts +2 -0
- package/dist/contracts/facet/index.mjs +1 -0
- 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 +12370 -1990
- package/dist/contracts/index.mjs +1 -1
- 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 +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 +3 -3
- package/dist/contracts/session/index.mjs +1 -1
- package/dist/contracts/shared/index.d.mts +2 -2
- package/dist/contracts/shared/index.mjs +1 -1
- package/dist/contracts/skill/index.d.mts +1 -1
- package/dist/contracts/skill/index.mjs +1 -1
- package/dist/contracts/telemetry/index.d.mts +2 -0
- package/dist/contracts/telemetry/index.mjs +1 -0
- package/dist/contracts/timeout/index.d.mts +1 -1
- package/dist/contracts/timeout/index.mjs +1 -1
- package/dist/contracts/toast/index.d.mts +2 -2
- 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/core/index.d.mts +296 -34
- package/dist/core/index.mjs +1 -1
- package/dist/{credential-ref-DLCsoKVZ.mjs → credential-ref-YWQQENEo.mjs} +1 -1
- package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
- package/dist/{definition-DB7bbFSa.d.mts → definition-BLCdXGzh.d.mts} +17 -3
- package/dist/definition-CrgHIpTK.d.mts +60 -0
- package/dist/{definition-DkYy1PZz.mjs → definition-DZMXOnjX.mjs} +1 -1
- package/dist/{definition-DtUNiGom.d.mts → definition-pkJ6szUl.d.mts} +1 -1
- 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/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-DR_4_rAT.mjs → handlers-CkTsQLra.mjs} +3 -3
- package/dist/{harness-B6lGP9rm.mjs → harness-BRCMcvQN.mjs} +1 -1
- package/dist/{host-CvEht5RT.mjs → host-Br9VuOyr.mjs} +1 -1
- package/dist/{index-WKjrpcA_.d.mts → index-472sOmsW.d.mts} +6 -6
- package/dist/index-8SZkg7s6.d.mts +353 -0
- package/dist/index-B3PK4FIn.d.mts +5116 -0
- package/dist/{index-D2jejYlV.d.mts → index-B80L4YqA.d.mts} +3 -3
- package/dist/index-BFg9BUpx.d.mts +355 -0
- package/dist/index-BGfWS6GE.d.mts +483 -0
- package/dist/{index-DQRsGXb5.d.mts → index-BVgfS-AJ.d.mts} +2 -2
- package/dist/{index-CnmPtjnA.d.mts → index-B_zQC98V.d.mts} +16 -16
- package/dist/{index-DaEp4UWW.d.mts → index-Bh_Ne7LF.d.mts} +54 -42
- package/dist/{index-yvN8UcEH.d.mts → index-Bvb2mMH6.d.mts} +109 -109
- package/dist/{index-tKvu34DJ2.d.mts → index-CCGVh9BF2.d.mts} +242 -28
- package/dist/{index-C-myW_aK.d.mts → index-CGmcS0Ma.d.mts} +2 -2
- package/dist/{index-DEw90pa2.d.mts → index-CLpjm52M.d.mts} +3 -3
- package/dist/{index-DQWMu5fS.d.mts → index-Caig6TeF.d.mts} +85 -99
- package/dist/{index-DwCA1HWa.d.mts → index-CelJCBjk.d.mts} +15 -15
- package/dist/{index-ESSDWIB7.d.mts → index-ChunCFu4.d.mts} +1 -1
- package/dist/{index-e5C62_M3.d.mts → index-Cm0dUkWL.d.mts} +819 -85
- package/dist/{index-N5K1NOYs.d.mts → index-CokQYGVP.d.mts} +4 -4
- package/dist/{index-Bigx81Kr.d.mts → index-Cs0kZXIz2.d.mts} +1 -1
- package/dist/{index-6lyShOoU.d.mts → index-D5d5HeWI2.d.mts} +34 -0
- package/dist/{index-sBob9D25.d.mts → index-D90OmGmV.d.mts} +3 -3
- package/dist/{index-D1T-PPqF.d.mts → index-D9MwJ2Q8.d.mts} +3 -3
- package/dist/{index-BePI0ckL.d.mts → index-DANINzMu.d.mts} +1 -1
- package/dist/{index-BnSQE7z7.d.mts → index-DBw-89vC2.d.mts} +129 -1332
- package/dist/{index-C_kS2aqV2.d.mts → index-DGBu6bHi2.d.mts} +14 -14
- package/dist/index-DKC62dY5.d.mts +146 -0
- package/dist/{index-7sXlairn2.d.mts → index-DKia0MX1.d.mts} +1 -1
- package/dist/{index-E8d_RwaF.d.mts → index-DMKnON5s.d.mts} +1 -1
- package/dist/{index-Cq8B7cwK.d.mts → index-DUaw0Dw8.d.mts} +1524 -369
- package/dist/{index-Dd5s4MSm.d.mts → index-De3kPhlN.d.mts} +2 -2
- package/dist/{index-DGTFJB_8.d.mts → index-L4GjJDKb.d.mts} +116 -23
- package/dist/{index-iID2R9G1.d.mts → index-U-A8eyGT.d.mts} +7 -7
- package/dist/{index-D7T8XCku.d.mts → index-eemAKwsB.d.mts} +23 -2
- package/dist/{index-BXP9GK5q.d.mts → index-mNec7V-9.d.mts} +27 -27
- package/dist/{index-CnZOKNjU.d.mts → index-soFznFCy2.d.mts} +2 -2
- package/dist/{index-Ch3ph52M2.d.mts → index-vtXJuwrz.d.mts} +2 -2
- package/dist/{index-BnNqbx2I.d.mts → index-x_lVDp_J.d.mts} +2 -2
- package/dist/json-value-CmhSGMLv.mjs +1 -0
- package/dist/kernel/cli/index.d.mts +4 -2
- package/dist/kernel/cli/index.mjs +1 -1
- package/dist/kernel/cli/schemas.d.mts +1 -0
- package/dist/kernel/cli/schemas.mjs +1 -1
- package/dist/kernel/extension/index.d.mts +1 -1
- package/dist/kernel/extension/index.mjs +1 -1
- package/dist/kernel/index.d.mts +5 -5
- package/dist/kernel/index.mjs +1 -1
- package/dist/kernel/namespace/index.d.mts +1 -1
- package/dist/kernel/namespace/index.mjs +1 -1
- package/dist/kernel/observability/index.d.mts +1 -1
- package/dist/kernel/observability/index.mjs +1 -1
- package/dist/kernel/providers/index.d.mts +1 -1
- package/dist/kernel/providers/index.mjs +1 -1
- package/dist/kernel/window/index.d.mts +1 -1
- package/dist/kernel/window/index.mjs +1 -1
- package/dist/materialization-CuUBu4XI.mjs +1 -0
- package/dist/{namespace-BpIE-jQW.d.mts → namespace-5QQqbF-B.d.mts} +1018 -111
- package/dist/{namespace-DwCyOaZn2.d.mts → namespace-BM7Djng9.d.mts} +3 -3
- package/dist/namespace-BwzZJqTV.mjs +1 -0
- package/dist/{namespace-DZcuLwEA.d.mts → namespace-CTm3nEvh.d.mts} +1 -1
- package/dist/{namespace-BK2erxpV.d.mts → namespace-CaaNnKcR.d.mts} +3 -3
- package/dist/{namespace-GLGGcWPH.d.mts → namespace-CaoZ3S78.d.mts} +1 -1
- package/dist/{namespace-DXnMk3U8.d.mts → namespace-CxhsoFUP.d.mts} +27 -31
- package/dist/{namespace-B1E57soL.d.mts → namespace-DD8Oiqo7.d.mts} +23 -23
- package/dist/{namespace-BCRNwPnw.d.mts → namespace-DLovh2Ws.d.mts} +21 -21
- package/dist/{namespace-Ysg1N6rR.d.mts → namespace-DgqkaOVu.d.mts} +26 -25
- package/dist/{namespace-B5ZCshBw.d.mts → namespace-Dr8K0MCp.d.mts} +82 -81
- package/dist/{namespace-DGMO2E8f.mjs → namespace-DuXK5AYN.mjs} +1 -1
- package/dist/{namespace-ZbthBQVt.d.mts → namespace-EQniz-Aw.d.mts} +14 -14
- package/dist/{namespace-C54Oj025.d.mts → namespace-IV1QK__V.d.mts} +1 -1
- package/dist/{namespace-BKrV_2gZ.d.mts → namespace-TyiTsLFv.d.mts} +46 -45
- package/dist/{namespace-OwAf1Brw.mjs → namespace-xcmbQlxh.mjs} +1 -1
- package/dist/{native-session-supervisor-zPt624Tp.mjs → native-session-supervisor-B1TnaPUF.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/machine-identity/index.mjs +2 -2
- package/dist/node/transports/index.d.mts +200 -7
- package/dist/node/transports/index.mjs +2 -2
- package/dist/{orchestrator-shared-D2txLAUs.mjs → orchestrator-shared-CIDiFJMD.mjs} +1 -1
- package/dist/{orchestrator-shared-DrjtTXYh.d.mts → orchestrator-shared-Dfa7FMyw.d.mts} +5 -5
- package/dist/package-DKVlsMP3.mjs +1 -0
- package/dist/{profile-Cq4A7kQa.mjs → profile-6ynCD5k3.mjs} +1 -1
- package/dist/{provider-context-BB4eD8ON.mjs → provider-context-CK6B4X_8.mjs} +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/{providers-namespace-CDwxY_DV.d.mts → providers-namespace-DSEpli4A.d.mts} +1 -1
- package/dist/{schema-B295yplx.d.mts → schema-M5YTvSAG.d.mts} +114 -2
- package/dist/{schema-C4iznV0q.mjs → schema-e0wU_lcV.mjs} +1 -1
- package/dist/{schema-introspection-DCYC47_d.mjs → schema-introspection-Dn1jWQs1.mjs} +1 -1
- package/dist/{schemas-C5xtVqdb.d.mts → schemas-Bd0OjRQf.d.mts} +1 -1
- package/dist/{schemas-Ra8pz5M-.d.mts → schemas-C46QfKzv.d.mts} +24 -28
- package/dist/{schemas-sshQEF3l.d.mts → schemas-CDBSjg7o.d.mts} +1 -1
- package/dist/schemas-CR1Rripy.mjs +1 -0
- package/dist/schemas-CVvwIfG4.mjs +1 -0
- package/dist/schemas-CaLhkkLn.mjs +1 -0
- package/dist/{schemas-DYqKRNju.d.mts → schemas-ClOOT1W6.d.mts} +4 -4
- package/dist/{schemas-BfMZAwff.d.mts → schemas-DATniTHb.d.mts} +8 -8
- package/dist/{schemas-BWvuaL0w.d.mts → schemas-DVF1A4DF.d.mts} +4 -4
- package/dist/{schemas-Di0XnnMX.d.mts → schemas-DaRSfYLf.d.mts} +1 -1
- package/dist/{schemas-C31qbb0s.d.mts → schemas-DiYVzG6e.d.mts} +51 -48
- package/dist/{schemas-KMA1efQg.d.mts → schemas-j7ivZ2HI.d.mts} +3 -3
- package/dist/schemas-wg_6PAdV.d.mts +153 -0
- package/dist/scoped-bus-04pwo1uM.mjs +1 -0
- package/dist/service-base/index.d.mts +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 +2 -2
- 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/cli-detection/namespace.d.mts +1 -1
- package/dist/services/codebase/index.d.mts +2 -2
- package/dist/services/codebase/namespace.d.mts +1 -1
- package/dist/services/codebase/schemas.d.mts +1 -1
- package/dist/services/compression/index.d.mts +2 -2
- package/dist/services/compression/namespace.d.mts +1 -1
- package/dist/services/compression/schemas.d.mts +1 -1
- package/dist/services/context-rules/index.d.mts +4 -4
- package/dist/services/context-rules/index.mjs +1 -1
- package/dist/services/credential-change/index.d.mts +1 -1
- package/dist/services/definition/namespace.d.mts +1 -1
- package/dist/services/definition/schemas.d.mts +1 -1
- package/dist/services/dialog/namespace.d.mts +1 -1
- package/dist/services/dialog/schemas.d.mts +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/schemas.d.mts +1 -1
- package/dist/services/execution-target/schemas.mjs +1 -1
- package/dist/services/filesystem/index.d.mts +3 -0
- package/dist/services/filesystem/index.mjs +1 -0
- package/dist/services/filesystem/namespace.d.mts +7 -7
- package/dist/services/filesystem/schemas.d.mts +4 -4
- 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 +35 -35
- package/dist/services/harness/index.mjs +1 -1
- package/dist/services/harness/storage/schema.d.mts +5 -5
- package/dist/services/index.d.mts +1411 -928
- package/dist/services/index.mjs +1 -1
- package/dist/services/local-notification/index.d.mts +1 -1
- package/dist/services/local-notification/namespace.d.mts +1 -1
- package/dist/services/local-notification/schemas.d.mts +1 -1
- package/dist/services/log-import/browser.d.mts +2 -2
- package/dist/services/log-import/index.d.mts +23 -24
- package/dist/services/log-import/index.mjs +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 +1 -1
- 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/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.d.mts +1 -1
- package/dist/services/provider-runtime/index.mjs +1 -1
- package/dist/services/session/handlers/index.d.mts +1 -1
- package/dist/services/session/handlers/index.mjs +1 -1
- package/dist/services/session/index.d.mts +10 -10
- package/dist/services/session/index.mjs +1 -1
- package/dist/services/session/messages/namespace.d.mts +1 -1
- package/dist/services/session/messages/namespace.mjs +1 -1
- package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
- package/dist/services/session/orchestrator-testing/index.mjs +1 -1
- package/dist/services/session/session-events/namespace.d.mts +1 -1
- package/dist/services/session/session-events/namespace.mjs +1 -1
- package/dist/services/session/storage/namespace.d.mts +1 -1
- package/dist/services/session/storage/schema.d.mts +1 -1
- package/dist/services/session/storage/schema.mjs +1 -1
- package/dist/services/session/testing/index.d.mts +2 -2
- package/dist/services/session/testing/index.mjs +16 -3
- 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 +3 -3
- package/dist/services/session-editor/index.mjs +1 -1
- package/dist/services/settings/index.d.mts +4 -4
- package/dist/services/settings/index.mjs +1 -1
- package/dist/services/settings/namespace.d.mts +19 -18
- 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 +4 -4
- package/dist/services/settings/storage/index.d.mts +3 -3
- package/dist/services/settings/storage/index.mjs +1 -1
- package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
- package/dist/services/settings/storage/providers-namespace.mjs +1 -1
- package/dist/services/subagent/index.d.mts +2 -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 +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/turn/schemas.d.mts +12 -12
- package/dist/session-BoldSdNZ2.mjs +134 -0
- package/dist/session-DuVOYctZ.mjs +1 -0
- package/dist/{session-lineage-B0cpHfuc.d.mts → session-lineage-CRsc9g1x.d.mts} +1 -1
- package/dist/shared-DpOEfD8F.mjs +1 -0
- package/dist/{skill-20_SBXaI.mjs → skill-CQO4mDqK.mjs} +1 -1
- package/dist/storage/drizzle/client.d.mts +2 -2
- package/dist/storage/drizzle/client.mjs +1 -1
- package/dist/storage/drizzle/index.d.mts +49 -10
- 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 +2 -2
- package/dist/storage/handlers/index.mjs +1 -1
- package/dist/storage/index.d.mts +4 -4
- package/dist/{storage-namespace-DoH-Wkjp.d.mts → storage-namespace-BXkoh5Sy.d.mts} +11 -11
- package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
- package/dist/{storage-namespace-definition-CJgqyXH1.d.mts → storage-namespace-definition-Bkx5rSto.d.mts} +1 -1
- package/dist/style.css +540 -540
- package/dist/telemetry-CvdLBWuk.mjs +1 -0
- package/dist/testing/drizzle-harness.mjs +1 -1
- package/dist/testing/index.mjs +1 -1
- package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
- package/dist/tools/index.d.mts +20 -10
- package/dist/tools/index.mjs +1 -1
- package/dist/tools/testing/index.d.mts +1 -1
- package/dist/tools-D-luYcDw.mjs +1431 -0
- package/dist/{types-C11LvekX.d.mts → types-BCMUtBj1.d.mts} +117 -20
- package/dist/{types-vNpkAe4Y.d.mts → types-C2Ob9zz_.d.mts} +1 -1
- package/dist/{types-t295YC6T.d.mts → types-CCdqjeuH.d.mts} +2 -2
- package/dist/{types-Cvrj2ogm.d.mts → types-DZHvOc_Q.d.mts} +4 -4
- package/dist/{types--nrtGZ1V.d.mts → types-Dy3YTcTF.d.mts} +255 -97
- package/dist/{types-DYF5LxZY.d.mts → types-MfJZ67e9.d.mts} +91 -9
- package/dist/{types-6WxLfoM3.d.mts → types-dyP-bXXE.d.mts} +1 -1
- package/dist/ui-components/index.mjs +2 -2
- package/dist/ui-hooks/index.d.mts +111 -1
- package/dist/ui-hooks/index.mjs +1 -1
- package/dist/ui-kernel/index.d.mts +4 -4
- package/dist/ui-kernel/pages/namespace.d.mts +4 -4
- package/dist/ui-kernel/pages/schemas.d.mts +1 -1
- package/dist/ui-views/index.mjs +2 -2
- package/dist/utils/index.d.mts +36 -1
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/project-manifest.d.mts +130 -0
- package/dist/utils/project-manifest.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 +6 -9
- package/dist/utils/workspace-root.mjs +1 -1
- package/dist/{version-D8S4O22A.mjs → version-BeT3ASEe.mjs} +1 -1
- package/package.json +55 -2
- package/dist/account-identity-Bg_vKkcs.mjs +0 -1
- package/dist/adapter-CpF2aK_-.mjs +0 -1
- package/dist/bus-B1seC4M_.mjs +0 -2
- package/dist/chunk-Dc06z0qk.mjs +0 -1
- package/dist/client-DMWXCWhM.mjs +0 -1
- package/dist/cursor-storage-BoNI7OAR.mjs +0 -1
- package/dist/drizzle-Bn2GtW8c.mjs +0 -1
- package/dist/execution-target-D6MgthYs.mjs +0 -1
- package/dist/extension-53GerdGg.mjs +0 -1
- package/dist/extension-fJmv8Yri.mjs +0 -1
- package/dist/namespace-C_h7scWx2.mjs +0 -1
- package/dist/schemas-Bn8aqDIE.mjs +0 -1
- package/dist/services/worker/index.d.mts +0 -3
- package/dist/services/worker/index.mjs +0 -1
- package/dist/services/worker/namespace.d.mts +0 -2
- package/dist/services/worker/namespace.mjs +0 -1
- package/dist/services/worker/schemas.d.mts +0 -2
- package/dist/services/worker/schemas.mjs +0 -1
- package/dist/session-BCSf-Fgj.mjs +0 -1
- package/dist/session-BNo_cIiz.mjs +0 -123
- package/dist/shared-BhuSHZXH.mjs +0 -1
- package/dist/storage-namespace-BIDs9LPb.mjs +0 -1
- package/dist/tool-approval-service-CZCPfvVy.mjs +0 -1
- package/dist/tools-Cid9D99F.mjs +0 -1
- /package/dist/{base-orchestrator-BOAPgqF7.d.mts → base-orchestrator-wyumsn3b.d.mts} +0 -0
- /package/dist/{capability-service-DV32ecwR.mjs → capability-service-CJbmhfv9.mjs} +0 -0
- /package/dist/{cleanEnvForAdapter-hTPNvPU5.mjs → cleanEnvForAdapter-KkYzQa1f.mjs} +0 -0
- /package/dist/{config-namespace-wJ2CakDB.mjs → config-namespace-ncYg2ct_.mjs} +0 -0
- /package/dist/{extension-namespace-CTd9kOtt.mjs → extension-namespace-cMh_mMiL.mjs} +0 -0
- /package/dist/{identity-DBST3-XO.mjs → identity-Cz2IeEtm.mjs} +0 -0
- /package/dist/{index-SzSiyG61.d.mts → index-CHQ1SqT0.d.mts} +0 -0
- /package/dist/{model-registry-xINyxQUT.mjs → model-registry-CfXytvzx.mjs} +0 -0
- /package/dist/{model-registry-Dzpssh9j.mjs → model-registry-Scn_MC2d.mjs} +0 -0
- /package/dist/{namespace-DBw9BYr8.mjs → namespace-BoD94mrN.mjs} +0 -0
- /package/dist/{namespace-DUVgMfTR.mjs → namespace-CFLAmQfh.mjs} +0 -0
- /package/dist/{namespace-aALq9tnE.mjs → namespace-DkRgbZYn.mjs} +0 -0
- /package/dist/{namespace-yxIxUsjo.mjs → namespace-LViZ-EQk.mjs} +0 -0
- /package/dist/{namespace-Zb8HAbyF.mjs → namespace-Yna5-Pws.mjs} +0 -0
- /package/dist/{platform-BMFUpmTA.mjs → platform-DZ7z-wXD.mjs} +0 -0
- /package/dist/{providers-DhiW_fx4.mjs → providers-u8i15co9.mjs} +0 -0
- /package/dist/{schema-D3ZG13h9.mjs → schema-CoyE6mPt.mjs} +0 -0
- /package/dist/{schemas-CEBe89yE.mjs → schemas-DE-GNmSD.mjs} +0 -0
- /package/dist/{schemas-COnLJnt_.mjs → schemas-hSrzflwZ.mjs} +0 -0
- /package/dist/{schemas-CrnlCRep.mjs → schemas-jFe1AuI-.mjs} +0 -0
- /package/dist/{server-lifecycle-Dx5WgfoS.mjs → server-lifecycle-FXTPW39-.mjs} +0 -0
- /package/dist/{server-lifecycle-BC6FRn86.d.mts → server-lifecycle-YoSGFGnU.d.mts} +0 -0
- /package/dist/{shared-schemas-Byah36lG.mjs → shared-schemas-CPShiLNp.mjs} +0 -0
- /package/dist/{storage-namespace-definition-BjK9nZAN.mjs → storage-namespace-definition-CqSdsuCC.mjs} +0 -0
- /package/dist/{timeout-D33CUZ0M.mjs → timeout-XsYIOKrc.mjs} +0 -0
- /package/dist/{tray-menu-service-BAYtLdAg.mjs → tray-menu-service-DuXq5k22.mjs} +0 -0
- /package/dist/{ui-config-zawaoEfB.mjs → ui-config-9bDRwFZr.mjs} +0 -0
- /package/dist/{variant-BZWfmS0q.mjs → variant-CT6XBP6T.mjs} +0 -0
- /package/dist/{visibility-CZu8ooOA.mjs → visibility-Cb62p9bv.mjs} +0 -0
- /package/dist/{window-registry-C_IJmY8_.d.mts → window-registry-CBcrGTv4.d.mts} +0 -0
- /package/dist/{window-registry-B_-hBEcV.mjs → window-registry-DW-dKRjQ.mjs} +0 -0
|
@@ -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 };
|
|
@@ -3,7 +3,7 @@ import { HarnessDefinition, MakaioSessionAgent } from "@makaio/framework/contrac
|
|
|
3
3
|
import { BaseService } from "@makaio/framework/service-base";
|
|
4
4
|
import { FileAccessRuleProvider } from "@makaio/framework/tools";
|
|
5
5
|
|
|
6
|
-
//#region
|
|
6
|
+
//#region services/core/src/tool-approval/tool-approval-types.d.ts
|
|
7
7
|
/** Configuration options for {@link ToolApprovalService}. */
|
|
8
8
|
interface ToolApprovalServiceOptions {
|
|
9
9
|
/**
|
|
@@ -14,7 +14,7 @@ interface ToolApprovalServiceOptions {
|
|
|
14
14
|
fileAccessRuleProvider?: FileAccessRuleProvider;
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
-
//#region
|
|
17
|
+
//#region services/core/src/tool-approval/tool-approval-service.d.ts
|
|
18
18
|
/**
|
|
19
19
|
* Resolves and applies tool approval policies based on the
|
|
20
20
|
* persona → profile → harness → system default cascade.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { AdapterFile, ProviderConfigFile } from "@makaio/framework/contracts/config";
|
|
3
3
|
|
|
4
|
-
//#region
|
|
4
|
+
//#region services/core/src/adapter-subsystem/schemas.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Bus-safe provider config read model.
|
|
7
7
|
*
|
|
@@ -48,17 +48,17 @@ type BindingRecord = z.infer<typeof BindingRecordSchema>;
|
|
|
48
48
|
* Normalized adapter file-backed read model.
|
|
49
49
|
*/
|
|
50
50
|
declare const AdapterFileConfigSchema: z.ZodObject<{
|
|
51
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
52
51
|
description: z.ZodOptional<z.ZodString>;
|
|
52
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
53
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
53
54
|
protocol: z.ZodOptional<z.ZodString>;
|
|
54
55
|
helpLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
55
56
|
label: z.ZodString;
|
|
56
57
|
url: z.ZodString;
|
|
57
58
|
}, z.core.$strict>>>;
|
|
58
59
|
instructions: z.ZodOptional<z.ZodString>;
|
|
59
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
60
60
|
providerDefinitionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
-
settings: z.ZodOptional<z.
|
|
61
|
+
settings: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
62
62
|
name: z.ZodString;
|
|
63
63
|
enabled: z.ZodBoolean;
|
|
64
64
|
bindings: z.ZodArray<z.ZodObject<{
|
|
@@ -124,17 +124,17 @@ declare const AdapterSubsystemSchemas: {
|
|
|
124
124
|
}, z.core.$strict>;
|
|
125
125
|
response: z.ZodObject<{
|
|
126
126
|
config: z.ZodNullable<z.ZodObject<{
|
|
127
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
128
127
|
description: z.ZodOptional<z.ZodString>;
|
|
128
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
129
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
129
130
|
protocol: z.ZodOptional<z.ZodString>;
|
|
130
131
|
helpLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
132
|
label: z.ZodString;
|
|
132
133
|
url: z.ZodString;
|
|
133
134
|
}, z.core.$strict>>>;
|
|
134
135
|
instructions: z.ZodOptional<z.ZodString>;
|
|
135
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
136
136
|
providerDefinitionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
|
-
settings: z.ZodOptional<z.
|
|
137
|
+
settings: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
138
138
|
name: z.ZodString;
|
|
139
139
|
enabled: z.ZodBoolean;
|
|
140
140
|
bindings: z.ZodArray<z.ZodObject<{
|
|
@@ -152,17 +152,17 @@ declare const AdapterSubsystemSchemas: {
|
|
|
152
152
|
request: z.ZodObject<{}, z.core.$strict>;
|
|
153
153
|
response: z.ZodObject<{
|
|
154
154
|
configs: z.ZodArray<z.ZodObject<{
|
|
155
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
156
155
|
description: z.ZodOptional<z.ZodString>;
|
|
156
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
157
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
157
158
|
protocol: z.ZodOptional<z.ZodString>;
|
|
158
159
|
helpLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
159
160
|
label: z.ZodString;
|
|
160
161
|
url: z.ZodString;
|
|
161
162
|
}, z.core.$strict>>>;
|
|
162
163
|
instructions: z.ZodOptional<z.ZodString>;
|
|
163
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
164
164
|
providerDefinitionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
165
|
-
settings: z.ZodOptional<z.
|
|
165
|
+
settings: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
166
166
|
name: z.ZodString;
|
|
167
167
|
enabled: z.ZodBoolean;
|
|
168
168
|
bindings: z.ZodArray<z.ZodObject<{
|
|
@@ -685,23 +685,23 @@ declare const AdapterSubsystemSchemas: {
|
|
|
685
685
|
clientId: z.ZodOptional<z.ZodString>;
|
|
686
686
|
protocol: z.ZodOptional<z.ZodString>;
|
|
687
687
|
providerDefinitionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
688
|
-
settings: z.ZodOptional<z.
|
|
688
|
+
settings: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
689
689
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
690
690
|
}, z.core.$strict>;
|
|
691
691
|
}, z.core.$strict>;
|
|
692
692
|
response: z.ZodObject<{
|
|
693
693
|
config: z.ZodObject<{
|
|
694
|
-
displayName: z.ZodOptional<z.ZodString>;
|
|
695
694
|
description: z.ZodOptional<z.ZodString>;
|
|
695
|
+
clientId: z.ZodOptional<z.ZodString>;
|
|
696
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
696
697
|
protocol: z.ZodOptional<z.ZodString>;
|
|
697
698
|
helpLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
698
699
|
label: z.ZodString;
|
|
699
700
|
url: z.ZodString;
|
|
700
701
|
}, z.core.$strict>>>;
|
|
701
702
|
instructions: z.ZodOptional<z.ZodString>;
|
|
702
|
-
clientId: z.ZodOptional<z.ZodString>;
|
|
703
703
|
providerDefinitionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
704
|
-
settings: z.ZodOptional<z.
|
|
704
|
+
settings: z.ZodOptional<z.ZodType<Record<string, unknown>, Record<string, unknown>, z.core.$ZodTypeInternals<Record<string, unknown>, Record<string, unknown>>>>;
|
|
705
705
|
name: z.ZodString;
|
|
706
706
|
enabled: z.ZodBoolean;
|
|
707
707
|
bindings: z.ZodArray<z.ZodObject<{
|
|
@@ -861,7 +861,7 @@ declare const AdapterSubsystemSchemas: {
|
|
|
861
861
|
}, z.core.$strict>;
|
|
862
862
|
};
|
|
863
863
|
//#endregion
|
|
864
|
-
//#region
|
|
864
|
+
//#region services/core/src/adapter-subsystem/types.d.ts
|
|
865
865
|
/**
|
|
866
866
|
* Loaded adapter file set keyed by adapter name.
|
|
867
867
|
*/
|
|
@@ -914,7 +914,7 @@ interface IAdapterConfigRepository {
|
|
|
914
914
|
deleteAdapterFile(name: string): Promise<boolean>;
|
|
915
915
|
}
|
|
916
916
|
//#endregion
|
|
917
|
-
//#region
|
|
917
|
+
//#region services/core/src/adapter-subsystem/write-types.d.ts
|
|
918
918
|
/**
|
|
919
919
|
* Canonical credential-ref map stored in provider-config files.
|
|
920
920
|
*/
|