@makaio/framework 1.0.0-dev-1779046984397
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 +21 -0
- package/README.md +363 -0
- package/dist/account-identity-Ce1Bwrqi.mjs +1 -0
- package/dist/adapter-CbyjCE2d.mjs +1 -0
- package/dist/adapters/acp-client/index.d.mts +209 -0
- package/dist/adapters/acp-client/index.mjs +1 -0
- package/dist/adapters/config/index.d.mts +429 -0
- package/dist/adapters/config/index.mjs +1 -0
- package/dist/adapters/index.d.mts +4175 -0
- package/dist/adapters/index.mjs +11 -0
- package/dist/adapters/node.d.mts +263 -0
- package/dist/adapters/node.mjs +4 -0
- package/dist/adapters/stream-session/index.d.mts +1384 -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/base-orchestrator-9z8TuA5a.d.mts +772 -0
- package/dist/bus/index.d.mts +3331 -0
- package/dist/bus/index.mjs +1 -0
- package/dist/bus-B1seC4M_.mjs +2 -0
- package/dist/capability-service-tnpR_TaB.mjs +1 -0
- package/dist/chunk-Dc06z0qk.mjs +1 -0
- package/dist/chunk-cpUYaJdV.mjs +1 -0
- package/dist/cleanEnvForAdapter-DvcIGXTG.mjs +1 -0
- package/dist/client-Dh4x4GQN.mjs +1 -0
- package/dist/clients/index.d.mts +2786 -0
- package/dist/clients/index.mjs +1 -0
- package/dist/clients-namespace-B0xAPZ6J.d.mts +332 -0
- package/dist/config-namespace-DLSs83zr.d.mts +638 -0
- package/dist/config-namespace-MJT8P0Ud.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/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 +3 -0
- package/dist/contracts/extension/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 +12665 -0
- package/dist/contracts/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/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 +1001 -0
- package/dist/core/index.mjs +1 -0
- package/dist/credential-ref-DLCsoKVZ.mjs +1 -0
- package/dist/cursor-storage-DOQdvo9j.mjs +1 -0
- package/dist/definition-DkYy1PZz.mjs +1 -0
- package/dist/definition-DtUNiGom.d.mts +158 -0
- package/dist/definition-DxvZ9e22.d.mts +376 -0
- package/dist/drizzle-CWVVw7Er.mjs +1 -0
- package/dist/execution-target-BW_uiBVe.mjs +1 -0
- package/dist/extension-COqwS-2Q.mjs +1 -0
- package/dist/extension-Cbrl4YGX.mjs +1 -0
- package/dist/extension-namespace-zaGKi6Qj.mjs +1 -0
- package/dist/handlers-iGKUJ380.mjs +41 -0
- package/dist/harness-CEq1Zkf9.mjs +1 -0
- package/dist/hooks/index.d.mts +423 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/host-CXAUGGN0.mjs +1 -0
- package/dist/identity-B_A0mE63.mjs +1 -0
- package/dist/index-6lyShOoU.d.mts +225 -0
- package/dist/index-7sXlairn2.d.mts +43 -0
- package/dist/index-BAKM2GMH2.d.mts +535 -0
- package/dist/index-BB419vv-.d.mts +3897 -0
- package/dist/index-BJOfdtbw.d.mts +729 -0
- package/dist/index-BXP9GK5q.d.mts +1075 -0
- package/dist/index-BdPwu6c0.d.mts +1730 -0
- package/dist/index-BePI0ckL.d.mts +40 -0
- package/dist/index-Bigx81Kr.d.mts +37 -0
- package/dist/index-BnNqbx2I.d.mts +134 -0
- package/dist/index-Bv15sNLn.d.mts +389 -0
- package/dist/index-C-myW_aK.d.mts +412 -0
- package/dist/index-C9F3Fc1A.d.mts +2938 -0
- package/dist/index-CNxS4Tlu.d.mts +1 -0
- package/dist/index-CVA0m1g9.d.mts +995 -0
- package/dist/index-C_kS2aqV2.d.mts +438 -0
- package/dist/index-Ch3ph52M2.d.mts +40 -0
- package/dist/index-CnZOKNjU.d.mts +89 -0
- package/dist/index-D1T-PPqF.d.mts +67 -0
- package/dist/index-D7T8XCku.d.mts +341 -0
- package/dist/index-DBQtpFLE.d.mts +4843 -0
- package/dist/index-DEw90pa2.d.mts +183 -0
- package/dist/index-DQRsGXb5.d.mts +109 -0
- package/dist/index-Dd5s4MSm.d.mts +72 -0
- package/dist/index-DubqLGH8.d.mts +1002 -0
- package/dist/index-ESSDWIB7.d.mts +11 -0
- package/dist/index-N5K1NOYs.d.mts +184 -0
- package/dist/index-PdUSmPT2.d.mts +180 -0
- package/dist/index-SzSiyG61.d.mts +117 -0
- package/dist/index-T0471kWA.d.mts +6760 -0
- package/dist/index-WKjrpcA_.d.mts +218 -0
- package/dist/index-hapw9_En.d.mts +13592 -0
- package/dist/index-iID2R9G1.d.mts +1490 -0
- package/dist/kernel/cli/index.d.mts +141 -0
- package/dist/kernel/cli/index.mjs +1 -0
- package/dist/kernel/cli/schemas.d.mts +63 -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/model-registry-BNzpR6TU.mjs +1 -0
- package/dist/model-registry-CIscwC52.mjs +1 -0
- package/dist/namespace-0yuzAKlr.mjs +1 -0
- package/dist/namespace-8cNguvIp.mjs +1 -0
- package/dist/namespace-BK2erxpV.d.mts +921 -0
- package/dist/namespace-Bmc7AW4J2.mjs +1 -0
- package/dist/namespace-C2ufjgaQ.d.mts +767 -0
- package/dist/namespace-C54Oj025.d.mts +159 -0
- package/dist/namespace-CCDEOwmW.d.mts +1313 -0
- package/dist/namespace-CfEWMXBx.mjs +1 -0
- package/dist/namespace-CkLUtc0g.d.mts +580 -0
- package/dist/namespace-D5Wrt7YU.mjs +1 -0
- package/dist/namespace-DZcuLwEA.d.mts +51 -0
- package/dist/namespace-Db-p67Rg.mjs +1 -0
- package/dist/namespace-FWx6HxaW.d.mts +611 -0
- package/dist/namespace-GLGGcWPH.d.mts +43 -0
- package/dist/namespace-N0dfwSg6.mjs +1 -0
- package/dist/namespace-O5SNY-LV.d.mts +2226 -0
- package/dist/namespace-ZbthBQVt.d.mts +142 -0
- package/dist/namespace-bq4Prtzn.d.mts +2046 -0
- package/dist/namespace-pNcSglBS.mjs +1 -0
- package/dist/namespace-ptv-pw_g.d.mts +3019 -0
- package/dist/namespace-xkvVw3hf2.d.mts +189 -0
- package/dist/native-session-supervisor-L-UIaEfd.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 +1752 -0
- package/dist/node/transports/index.mjs +2 -0
- package/dist/orchestrator-shared-DrjtTXYh.d.mts +249 -0
- package/dist/orchestrator-shared-Wv1GI2mW.mjs +1 -0
- package/dist/platform-BbSLVg5b.mjs +1 -0
- package/dist/profile-4StaDQW0.mjs +1 -0
- package/dist/provider-context-CNRQ4d5m.mjs +1 -0
- package/dist/providers/index.d.mts +135 -0
- package/dist/providers/index.mjs +1 -0
- package/dist/providers-Cr4Za8a1.mjs +1 -0
- package/dist/providers-namespace-CDwxY_DV.d.mts +583 -0
- package/dist/schema-BwzXEtT2.d.mts +837 -0
- package/dist/schema-CAw_BqaG.mjs +1 -0
- package/dist/schema-introspection-D61TT_7b.mjs +1 -0
- package/dist/schema-uSGW-6oM.mjs +1 -0
- package/dist/schemas-BXstpWVp.mjs +1 -0
- package/dist/schemas-BdMU-gew.d.mts +160 -0
- package/dist/schemas-C40ZAJ33.mjs +1 -0
- package/dist/schemas-C5xtVqdb.d.mts +46 -0
- package/dist/schemas-CGZy_rU6.d.mts +13 -0
- package/dist/schemas-CLxtoKFy.mjs +1 -0
- package/dist/schemas-Co_sVhzz.mjs +1 -0
- package/dist/schemas-D9108Iv1.d.mts +182 -0
- package/dist/schemas-DENVYyds.d.mts +463 -0
- package/dist/schemas-DbWs_hj8.d.mts +174 -0
- package/dist/schemas-Di0XnnMX.d.mts +73 -0
- package/dist/schemas-KMA1efQg.d.mts +944 -0
- package/dist/schemas-qmn5SWPU.d.mts +312 -0
- package/dist/schemas-sshQEF3l.d.mts +237 -0
- package/dist/server-lifecycle-Cf_SZ27k.d.mts +160 -0
- package/dist/server-lifecycle-DbFwlrTW.mjs +1 -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/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/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 +5703 -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 +275 -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 +52 -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 +662 -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/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/services/worker/index.d.mts +3 -0
- package/dist/services/worker/index.mjs +1 -0
- package/dist/services/worker/namespace.d.mts +2 -0
- package/dist/services/worker/namespace.mjs +1 -0
- package/dist/services/worker/schemas.d.mts +2 -0
- package/dist/services/worker/schemas.mjs +1 -0
- package/dist/session-Do6lDZM4.mjs +123 -0
- package/dist/session-lineage-Eev4uo4I.d.mts +65 -0
- package/dist/session-piI1R5rP.mjs +1 -0
- package/dist/shared-DxHLl9UP.mjs +1 -0
- package/dist/shared-schemas-BgQv_tnu.mjs +1 -0
- package/dist/skill-CB5h-ZFQ.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 +98 -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-ADwyijoe.mjs +1 -0
- package/dist/storage-namespace-DAm8iWEj.d.mts +221 -0
- package/dist/storage-namespace-definition-CHu2k14q.mjs +1 -0
- package/dist/storage-namespace-definition-CJgqyXH1.d.mts +17 -0
- package/dist/style.css +3782 -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/tool-approval-service-BcBSUZCO.mjs +1 -0
- package/dist/tools/index.d.mts +825 -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-CDSgj0ee.mjs +1 -0
- package/dist/tray-menu-service-CTXC1Elg.mjs +1 -0
- package/dist/types-6WxLfoM3.d.mts +31 -0
- package/dist/types-BjToUrHp.d.mts +6619 -0
- package/dist/types-CD1LJwPc.d.mts +1009 -0
- package/dist/types-Cvrj2ogm.d.mts +305 -0
- package/dist/types-DYF5LxZY.d.mts +233 -0
- package/dist/types-t295YC6T.d.mts +262 -0
- package/dist/types-vNpkAe4Y.d.mts +128 -0
- package/dist/ui-components/index.d.mts +2342 -0
- package/dist/ui-components/index.mjs +8 -0
- package/dist/ui-config-CXmbsqZV.mjs +1 -0
- package/dist/ui-hooks/index.d.mts +1805 -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 +227 -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/resolve-package-root.d.mts +12 -0
- package/dist/utils/resolve-package-root.mjs +1 -0
- package/dist/utils/workspace-root.d.mts +27 -0
- package/dist/utils/workspace-root.mjs +2 -0
- package/dist/variant-D5kSrL3m.mjs +1 -0
- package/dist/version-CjS20oXi.mjs +1 -0
- package/dist/visibility-CZu8ooOA.mjs +1 -0
- package/dist/window-registry-CUftmDr3.mjs +1 -0
- package/dist/window-registry-C_IJmY8_.d.mts +130 -0
- package/package.json +346 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026-present Makaio GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="../../docs/assets/logo.svg" alt="Makaio Logo" width="120" />
|
|
3
|
+
<h1>Makaio Framework</h1>
|
|
4
|
+
<p><strong>A typed, bus-centric runtime for orchestrating AI agents, tools, and sessions across providers.</strong></p>
|
|
5
|
+
|
|
6
|
+
[](../../LICENSE)
|
|
7
|
+
[](https://github.com/makaio-ai/makaio-framework/actions/workflows/ci.yml)
|
|
8
|
+
|
|
9
|
+
[Website](https://makaio.ai) · [Getting Started](https://makaio.ai/guides/getting-started/) · [Why Makaio](https://makaio.ai/why/)
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
> [!TIP]
|
|
15
|
+
> **Give your AI agent full context.** Point it at [`makaio.ai/llms.txt`](https://makaio.ai/llms.txt) — everything it needs to answer questions, write extensions, or explore the architecture with you.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Most AI tooling today solves one layer: call an LLM, stream a response, maybe loop on tool calls. That works until you need multiple providers in one system, agents that communicate across processes, storage you can swap without rewriting services, or extensions that load at runtime without forking the host.
|
|
21
|
+
|
|
22
|
+
Makaio Framework is a typed runtime for building and hosting AI agent systems. It gives you a bus-centric architecture where agents, services, tools, and storage communicate through typed events and RPC — across threads, processes, or machines.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
### Connect your AI tools
|
|
27
|
+
|
|
28
|
+
> [!NOTE]
|
|
29
|
+
> Makaio normalizes the infrastructure beneath your AI tools — adapters, credentials, streaming, storage. Build a usage tracker, session viewer, or approval workflow once, and it works across Claude Code, Codex, Gemini, and more. Already built something for one provider? Move it to Makaio and it works with all of them.
|
|
30
|
+
>
|
|
31
|
+
> → [Connect your tooling](../../docs/connect.md) · [Shipped extensions](../../extensions/index.md)
|
|
32
|
+
|
|
33
|
+
### Extend the ecosystem
|
|
34
|
+
|
|
35
|
+
> [!NOTE]
|
|
36
|
+
> Scaffold an extension in one command, contribute CLI commands, background services, tools, or UI surfaces. The framework provides adapters for 8 providers, bus-mediated storage, and a full runtime — you focus on what your extension does.
|
|
37
|
+
>
|
|
38
|
+
> → [Create an extension](../../docs/creating-extensions.md) · [Extension model](../../docs/architecture/extensions/index.md)
|
|
39
|
+
|
|
40
|
+
### Compose, intercept, extend
|
|
41
|
+
|
|
42
|
+
> [!NOTE]
|
|
43
|
+
> Everything flows through a typed bus — tool calls, agent events, storage requests. Intercept tool inputs for redaction, route sensitive analysis to local models, chain handlers with priority middleware. Build sophisticated automations without forking the framework.
|
|
44
|
+
>
|
|
45
|
+
> → [Bus architecture](../../docs/architecture/bus/index.md) · [Writing an adapter](../../docs/creating-adapters.md)
|
|
46
|
+
|
|
47
|
+
### Evaluating agent frameworks?
|
|
48
|
+
|
|
49
|
+
> [!NOTE]
|
|
50
|
+
> Makaio is not another LangChain wrapper. It's runtime infrastructure: a typed event bus with cross-process transports, a 3-layer adapter contract with conformance tests, and an extension system where capabilities load at runtime. Compare it to the orchestration layer beneath your agents, not the agents themselves.
|
|
51
|
+
>
|
|
52
|
+
> → [How this differs](#how-this-differs) · [Architecture](#architecture)
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Install
|
|
57
|
+
|
|
58
|
+
Makaio Framework is currently source-first. From a source checkout:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
yarn install
|
|
62
|
+
yarn dev
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The development script starts the framework runtime and web host. Verify the
|
|
66
|
+
CLI directly from source:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
yarn tsx apps/cli/src/cli-entry.ts --help
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
Start the runtime and manage extensions — no code required:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Start the Makaio runtime (bus + services + adapters)
|
|
78
|
+
makaio serve
|
|
79
|
+
|
|
80
|
+
# In another terminal — install extensions
|
|
81
|
+
makaio extension install ./extensions/account-manager # Local source checkout
|
|
82
|
+
makaio extension install ./my-local-extension # Your local extension
|
|
83
|
+
|
|
84
|
+
# See what's installed
|
|
85
|
+
makaio extension list
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Extensions contribute CLI commands, background services, tools, UI surfaces, and more — all discovered at runtime via `descriptor.json`. During the pre-release phase, framework-shipped extensions are installed from local paths; published npm package names will be documented once those packages are public.
|
|
89
|
+
|
|
90
|
+
The [account-manager](../../extensions/account-manager/README.md) extension adds credential management across AI tools. The [prompt](../../extensions/prompt/README.md) extension adds `makaio prompt send` — a provider-agnostic CLI for sending prompts, useful as a drop-in replacement for `claude -p` in scripts and CI pipelines.
|
|
91
|
+
|
|
92
|
+
## Why a Shared Framework
|
|
93
|
+
|
|
94
|
+
Everyone building AI-powered applications ends up writing the same infrastructure: provider adapters that break every SDK update, streaming pipelines, tool execution loops, session management, storage layers. Then the model landscape shifts — a new provider launches, an API version bumps, a protocol like ACP emerges — and every project maintains its own copy of the same adapter fixes.
|
|
95
|
+
|
|
96
|
+
This is that shared copy. One set of adapters with conformance tests, one extension model, one typed bus. You build your application, workflow, or agent system on top. When Anthropic ships a new API version or OpenAI changes their streaming format, the fix lands here once — not in every project independently.
|
|
97
|
+
|
|
98
|
+
## How This Differs
|
|
99
|
+
|
|
100
|
+
Existing solutions occupy specific layers:
|
|
101
|
+
|
|
102
|
+
| Layer | Examples | What they solve |
|
|
103
|
+
|-------|----------|-----------------|
|
|
104
|
+
| Provider abstraction | Vercel AI SDK, LiteLLM | Unified interface to call any LLM |
|
|
105
|
+
| Agent orchestration | LangGraph, AutoGen, CrewAI | Build and run multi-agent workflows |
|
|
106
|
+
| Coding assistants | Claude Code, Cursor, Copilot | AI-powered development in a single tool |
|
|
107
|
+
|
|
108
|
+
Makaio Framework operates below and across these layers. It provides the runtime infrastructure that agent systems need regardless of which provider, orchestration pattern, or host surface they use:
|
|
109
|
+
|
|
110
|
+
- A **typed event bus** with pub/sub, RPC, namespaces, and cross-process transports
|
|
111
|
+
- A **3-layer adapter contract** (Adapter → Agent → Connector) with conformance tests
|
|
112
|
+
- An **extension system** where capabilities load at runtime, not compile time
|
|
113
|
+
- **Bus-mediated storage** so backends are swappable without touching service code
|
|
114
|
+
- **Host composition** — CLI and desktop share the same boot pipeline
|
|
115
|
+
|
|
116
|
+
The bus isn't a notification layer added to a procedural core. It's the architectural backbone: services subscribe, adapters publish, storage handlers respond to requests, and transports bridge it all across process boundaries.
|
|
117
|
+
|
|
118
|
+
## Build on Makaio
|
|
119
|
+
|
|
120
|
+
Start any provider's agent with a bus request. Control tool access. React to events. All typed, all provider-agnostic:
|
|
121
|
+
|
|
122
|
+
> `@makaio/framework` is the intended public aggregate package. Until that package is published, these imports describe the release surface rather than an installable npm package.
|
|
123
|
+
|
|
124
|
+
```ts
|
|
125
|
+
import { MakaioBus } from '@makaio/framework/bus';
|
|
126
|
+
import { AgentSubjects, SessionSubjects } from '@makaio/framework/contracts';
|
|
127
|
+
|
|
128
|
+
const sessionId = crypto.randomUUID();
|
|
129
|
+
|
|
130
|
+
// Start a session-backed turn — same shape regardless of provider
|
|
131
|
+
const { messageId } = await MakaioBus.request(SessionSubjects.sendMessage, {
|
|
132
|
+
sessionId,
|
|
133
|
+
agent: {
|
|
134
|
+
kind: 'adapter',
|
|
135
|
+
adapterName: 'anthropic-sdk', // swap to 'openai-node', 'gemini-sdk', etc.
|
|
136
|
+
systemPrompt: 'You are a security reviewer. Be concise.',
|
|
137
|
+
// Omit model to use the provider default, or pass an adapter-specific ID from the model registry.
|
|
138
|
+
},
|
|
139
|
+
message: 'Review the changes in src/ for security issues',
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// Control what the agent can do — approve, deny, or abort
|
|
143
|
+
const unsub = MakaioBus.on(
|
|
144
|
+
AgentSubjects.toolApprove,
|
|
145
|
+
(ctx) => {
|
|
146
|
+
if (ctx.payload.toolName === 'write_file') {
|
|
147
|
+
ctx.setResult({ action: 'deny', message: 'Read-only review.', shouldAbort: false });
|
|
148
|
+
} else {
|
|
149
|
+
ctx.setResult({ action: 'allow' });
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{ filter: { sessionId } },
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
// Wait for completion — typed result
|
|
156
|
+
const completed = await MakaioBus.once(AgentSubjects.complete, {
|
|
157
|
+
filter: { sessionId, messageId },
|
|
158
|
+
timeoutMs: 120_000,
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
console.info(completed.payload.message);
|
|
162
|
+
unsub();
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Switch `adapterName` and the same session orchestration code runs against Claude, Codex, Gemini, or Qwen. Keep `model` omitted for provider defaults unless you have resolved a concrete adapter-specific model ID from the model registry. The [adapter conformance test suite](../../adapters/implementations/__tests__/) guarantees consistent behavior across all of them.
|
|
166
|
+
|
|
167
|
+
### Architecture
|
|
168
|
+
|
|
169
|
+
```text
|
|
170
|
+
┌─────────────────────────────────────────────────────────┐
|
|
171
|
+
│ Your Application / Host │
|
|
172
|
+
│ CLI, Electron, or custom host │
|
|
173
|
+
└────────────────────────┬────────────────────────────────┘
|
|
174
|
+
│
|
|
175
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
176
|
+
│ Runtime + Extension Coordinator │
|
|
177
|
+
│ Dependency ordering · Lifecycle · Surfaces │
|
|
178
|
+
└────────────────────────┬────────────────────────────────┘
|
|
179
|
+
│
|
|
180
|
+
┌────────────────────────▼────────────────────────────────┐
|
|
181
|
+
│ Makaio Bus │
|
|
182
|
+
│ Typed pub/sub + RPC · Namespaces · Scoped/Filtered │
|
|
183
|
+
│ Transport registry (WebSocket, loopback, custom) │
|
|
184
|
+
└───────┬────────────────┼───────────────────┬────────────┘
|
|
185
|
+
│ │ │
|
|
186
|
+
┌───────▼──────┐ ┌──────▼───────┐ ┌────────▼─────────┐
|
|
187
|
+
│ Services │ │ Storage │ │ Tools │
|
|
188
|
+
│ Session, │ │ Bus-backed │ │ Typed schemas, │
|
|
189
|
+
│ Orchestrator│ │ handlers │ │ registry, │
|
|
190
|
+
│ Registry │ │ (swappable) │ │ approval flow │
|
|
191
|
+
└──────────────┘ └──────────────┘ └──────────────────┘
|
|
192
|
+
│
|
|
193
|
+
┌───────▼─────────────────────────────────────────────────┐
|
|
194
|
+
│ Adapter Layer (3-part) │
|
|
195
|
+
│ AIAdapter → lifecycle, session management │
|
|
196
|
+
│ AIAgent → turn execution, tool orchestration │
|
|
197
|
+
│ AIAgentConnector → provider SDK / CLI / ACP bridge │
|
|
198
|
+
└─────────────────────────────────────────────────────────┘
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Everything communicates through the [bus](../../docs/architecture/bus/index.md). The transport registry means the bus spans process boundaries — a VS Code extension, a mobile app, or a CI pipeline can participate as a bus client over WebSocket without importing the framework.
|
|
202
|
+
|
|
203
|
+
### Adapters
|
|
204
|
+
|
|
205
|
+
Each adapter implements the 3-layer contract (Adapter → Agent → Connector) and passes a shared [conformance test suite](../../adapters/implementations/__tests__/) that verifies lifecycle, streaming, tool approval, and error handling.
|
|
206
|
+
|
|
207
|
+
| Adapter | Provider | Protocol | Status |
|
|
208
|
+
|---------|----------|----------|--------|
|
|
209
|
+
| `anthropic-sdk` | Anthropic (Claude) | API SDK | Stable |
|
|
210
|
+
| `openai-node` | OpenAI (GPT) | API SDK | Stable |
|
|
211
|
+
| `gemini-sdk` | Google (Gemini) | API SDK | Stable |
|
|
212
|
+
| `claude-code-cli` | Anthropic (Claude Code) | CLI subprocess | Stable |
|
|
213
|
+
| `claude-code` | Anthropic (Claude Agent SDK implementation) | API SDK | Stable |
|
|
214
|
+
| `codex-app-server` | OpenAI (Codex) | ACP | Experimental |
|
|
215
|
+
| `qwen-acp` | Alibaba (Qwen) | ACP | Experimental |
|
|
216
|
+
| `github-copilot-sdk` | GitHub (Copilot) | API SDK | [ABANDONED](https://github.blog/news-insights/company-news/github-copilot-is-moving-to-usage-based-billing/) |
|
|
217
|
+
|
|
218
|
+
**Status definitions:**
|
|
219
|
+
|
|
220
|
+
- **Stable** — Actively maintained, conformance tests pass, used in production
|
|
221
|
+
- **Experimental** — Working implementation, API surface may change
|
|
222
|
+
- **Community** — Maintained by contributors, not the core team
|
|
223
|
+
|
|
224
|
+
Writing a new adapter means implementing `AIAgentConnector` (the provider bridge), wrapping it in an `AIAgent` and `AIAdapter`, and running the conformance suite. See [Creating Adapters](../../docs/creating-adapters.md).
|
|
225
|
+
|
|
226
|
+
### SDKs
|
|
227
|
+
|
|
228
|
+
The bus protocol is language-neutral. SDKs let any process participate — subscribe to events, handle requests, emit — without importing the TypeScript framework:
|
|
229
|
+
|
|
230
|
+
| SDK | Language | Transport | Status |
|
|
231
|
+
|-----|----------|-----------|--------|
|
|
232
|
+
| [`@makaio/sdk`](../../sdks/typescript/) | TypeScript | Framework-native facade | Pre-release, unpublished package |
|
|
233
|
+
| [`makaio-sdk`](../../sdks/python/) | Python | WebSocket + stdio (asyncio) | Pre-release, unpublished package |
|
|
234
|
+
| [`makaio-sdk`](../../sdks/rust/) | Rust | WebSocket + stdio (tokio) | Unpublished crate (`publish = false`) |
|
|
235
|
+
|
|
236
|
+
All SDKs expose the same logical surface:
|
|
237
|
+
|
|
238
|
+
```
|
|
239
|
+
connect(url, options?) // WebSocket connection with optional HMAC auth and dispatch mode
|
|
240
|
+
subscribe(subject, handler) // event subscription (local + remote dispatch)
|
|
241
|
+
onRequest/on_request(...) // request handler with middleware chaining (TypeScript uses onRequest; Python/Rust use on_request)
|
|
242
|
+
request(subject, payload) // typed RPC (local-first dispatch by default)
|
|
243
|
+
emit(subject, payload) // fire-and-forget (dispatches to local + remote subscribers)
|
|
244
|
+
close() // clean shutdown
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
All three SDKs support HMAC authentication (auto-probed from `/health`), local-first request dispatch with middleware chaining via `RequestContext.next()`, typed subject descriptors generated from the protocol manifest, and WebSocket transport. Python and Rust additionally support stdio transport for detached extension processes.
|
|
248
|
+
|
|
249
|
+
Subscription cleanup is language-shaped: TypeScript returns unsubscribe functions, Python subscription handles expose `close()`, and Rust uses `unsubscribe()` for event subscriptions and `unregister()` for request handlers.
|
|
250
|
+
|
|
251
|
+
Cross-language SDKs are generated from a [shared protocol manifest](../../sdks/manifest/) derived from `@makaio/contracts`, validated against a [shared conformance suite](../../sdks/conformance/). The TypeScript SDK is a thin facade over the framework's bus packages.
|
|
252
|
+
|
|
253
|
+
## Documentation
|
|
254
|
+
|
|
255
|
+
**Use Makaio:**
|
|
256
|
+
|
|
257
|
+
| Topic | Link |
|
|
258
|
+
|-------|------|
|
|
259
|
+
| Getting started | [docs/getting-started.md](../../docs/getting-started.md) |
|
|
260
|
+
| CLI reference | [apps/cli/README.md](../../apps/cli/README.md) |
|
|
261
|
+
| Configuration | [docs/configuration.md](../../docs/configuration.md) |
|
|
262
|
+
|
|
263
|
+
**Build on Makaio:**
|
|
264
|
+
|
|
265
|
+
| Topic | Link |
|
|
266
|
+
|-------|------|
|
|
267
|
+
| Writing an extension | [docs/creating-extensions.md](../../docs/creating-extensions.md) |
|
|
268
|
+
| Writing an adapter | [docs/creating-adapters.md](../../docs/creating-adapters.md) |
|
|
269
|
+
| Extension model | [docs/architecture/extensions/index.md](../../docs/architecture/extensions/index.md) |
|
|
270
|
+
| Bus architecture | [docs/architecture/bus/](../../docs/architecture/bus/index.md) |
|
|
271
|
+
| Transport (WebSocket, cross-process) | [docs/architecture/transport.md](../../docs/architecture/transport.md) |
|
|
272
|
+
|
|
273
|
+
**Host and deploy:**
|
|
274
|
+
|
|
275
|
+
| Topic | Link |
|
|
276
|
+
|-------|------|
|
|
277
|
+
| Host applications | [docs/architecture/apps.md](../../docs/architecture/apps.md) |
|
|
278
|
+
|
|
279
|
+
## Repository Layout
|
|
280
|
+
|
|
281
|
+
Representative high-level tree for the framework distribution. It lists the main workspace groups and notable packages; individual provider, extension, and test packages may change as the framework evolves.
|
|
282
|
+
|
|
283
|
+
```text
|
|
284
|
+
├── adapters/
|
|
285
|
+
│ ├── core/ Adapter contracts, conformance test suite
|
|
286
|
+
│ ├── shared/ Shared ACP, Claude, and stream-session helpers
|
|
287
|
+
│ └── implementations/ One directory per provider adapter
|
|
288
|
+
├── apps/
|
|
289
|
+
│ ├── cli/ Headless CLI server + bus client
|
|
290
|
+
│ ├── electron/ Electron desktop host
|
|
291
|
+
│ ├── electrobun/ Electrobun desktop host (experimental)
|
|
292
|
+
│ ├── host-shared/ Shared desktop host boot/rendering logic
|
|
293
|
+
│ └── mcp-server/ MCP server bridge
|
|
294
|
+
├── build-tooling/ Shared Vite/tsdown configs for packages and extensions
|
|
295
|
+
├── clients/ External tool client integrations (Claude Code, Codex, Gemini, Copilot, Qwen)
|
|
296
|
+
├── docs/ Framework documentation
|
|
297
|
+
├── extensions/ Framework-shipped extensions
|
|
298
|
+
├── packages/
|
|
299
|
+
│ ├── adapter-subsystem/ Adapter contribution loading, runtime registry, identity
|
|
300
|
+
│ ├── bus-core/ Typed event bus — pub/sub, RPC, namespaces, scoped/filtered buses
|
|
301
|
+
│ ├── bus-server/ HTTP + WebSocket server lifecycle
|
|
302
|
+
│ ├── bus-server-vite/ Vite dev-server bus integration
|
|
303
|
+
│ ├── clients-core/ Managed client/runtime/binary services
|
|
304
|
+
│ ├── contracts/ Zod schemas, subject taxonomy, wire format
|
|
305
|
+
│ ├── expression/ Expression evaluator over contracts
|
|
306
|
+
│ ├── file-watcher/ File watching abstraction
|
|
307
|
+
│ ├── hooks/ Bus-event hook system
|
|
308
|
+
│ ├── machine-identity/ Stable machine ID (keypair)
|
|
309
|
+
│ ├── makaio-core/ Foundational types, errors, OptionalResult
|
|
310
|
+
│ ├── mcp-http-server/ MCP-over-HTTP bridge
|
|
311
|
+
│ ├── native-session-supervisor/ Native client session observation
|
|
312
|
+
│ ├── kernel/ ExtensionCoordinator, service lifecycle, boot observability
|
|
313
|
+
│ ├── services/base/ BaseService lifecycle primitive
|
|
314
|
+
│ ├── services/core/ Core services: session, orchestrator, tool registry, model registry
|
|
315
|
+
│ ├── services/log-import/ Session log import service
|
|
316
|
+
│ ├── services/package-manager/ Package discovery and management service
|
|
317
|
+
│ ├── storage/core/ Storage namespace contracts
|
|
318
|
+
│ ├── storage/drizzle/ Drizzle/SQLite client helpers, FTS, transactions
|
|
319
|
+
│ ├── storage/handlers/ Bus-backed CRUD + list handler factories
|
|
320
|
+
│ ├── storage-migrations/ Migration runner + schema discovery
|
|
321
|
+
│ ├── preferences/ User preferences storage
|
|
322
|
+
│ ├── providers/ Config/provider runtime helpers
|
|
323
|
+
│ ├── rules/ Runtime rule helpers
|
|
324
|
+
│ ├── test-utils/ Test helpers, bus fixtures, SQLite test harness
|
|
325
|
+
│ └── utils/ Shared utilities
|
|
326
|
+
├── providers/ Provider metadata packages (model catalogs, capability tags)
|
|
327
|
+
├── runtimes/
|
|
328
|
+
│ ├── bun/ Bun host assembly helpers
|
|
329
|
+
│ └── node/ Node host assembly: bootMakaioRuntime(), discovery, DB init
|
|
330
|
+
├── sdks/
|
|
331
|
+
│ ├── typescript/ @makaio/sdk — TypeScript facade
|
|
332
|
+
│ ├── python/ Python SDK (asyncio, WebSocket + stdio)
|
|
333
|
+
│ ├── rust/ Rust SDK (tokio, WebSocket + stdio)
|
|
334
|
+
│ ├── manifest/ Language-neutral protocol definition (generated)
|
|
335
|
+
│ └── conformance/ Shared wire-level conformance fixtures
|
|
336
|
+
├── tools/
|
|
337
|
+
│ ├── core/ Tool contract, defineTool(), defineToolset(), executor
|
|
338
|
+
│ ├── filesystem/ File read/write/search tools
|
|
339
|
+
│ ├── shell/ Shell execution tool
|
|
340
|
+
│ └── subagent/ Sub-agent spawning tool
|
|
341
|
+
├── transports/
|
|
342
|
+
│ ├── ws/ WebSocket transport (HMAC auth, E2E encryption, relay)
|
|
343
|
+
│ └── message-channel/ MessageChannel transport (SharedWorker, iframe)
|
|
344
|
+
└── ui/
|
|
345
|
+
├── kernel/ UI contracts, registries (widgets, pages, navigation)
|
|
346
|
+
├── theme/ SCSS design system: tokens, themes, mixins
|
|
347
|
+
├── components/ Pure UI components (no hooks, no bus)
|
|
348
|
+
├── hooks/ React hooks, stores, providers (BusProvider, useBus)
|
|
349
|
+
└── views/ Composed views and shell components
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
## Contributing
|
|
353
|
+
|
|
354
|
+
We welcome contributions — adapters, extensions, tools, bug fixes, and documentation. See [CONTRIBUTING.md](../../CONTRIBUTING.md) for development setup, contribution surfaces, and PR guidelines.
|
|
355
|
+
|
|
356
|
+
## Community
|
|
357
|
+
|
|
358
|
+
- [Code of Conduct](../../CODE_OF_CONDUCT.md)
|
|
359
|
+
- [Security Policy](../../SECURITY.md)
|
|
360
|
+
|
|
361
|
+
## License
|
|
362
|
+
|
|
363
|
+
[MIT](../../LICENSE)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as e}from"./shared-DxHLl9UP.mjs";import{m as t,p as n}from"./profile-4StaDQW0.mjs";import{n as r}from"./version-CjS20oXi.mjs";import{z as i}from"zod";const a=i.enum([`strong`,`alias`]),o=i.object({scheme:t,value:t,strength:a}),s=i.object({key:t,label:i.string(),usedPercentage:i.number().finite().min(0).max(100),resetsAt:n.optional()}),c=i.object({windows:i.array(s)}),l=i.record(i.string(),i.unknown()).optional(),u=i.object({clientId:t,found:i.boolean(),version:i.string().optional(),warningMessage:i.string().optional()}),d=i.object({clientId:t,binaryName:t,supportedVersions:r.optional()}),f=i.object({clientAccountId:t,clientId:t,observedAt:n,source:t,displayLabel:i.string().optional(),usage:c,metadata:l}),p=i.discriminatedUnion(`kind`,[i.object({kind:i.literal(`session`),sessionId:t}),i.object({kind:i.literal(`adapter-session`),adapterSessionId:t}),i.object({kind:i.literal(`both`),sessionId:t,adapterSessionId:t})]),m=i.object({clientId:i.string(),source:i.string(),kind:i.string(),observedAt:n,payload:e}),h={request:i.object({clientId:t,observedAt:n.optional(),displayLabel:i.string().optional(),identifiers:i.array(o).min(1),metadata:l}),response:i.object({clientAccountId:t,displayLabel:i.string().optional()})},g={request:m.extend({locator:p}),response:i.object({handled:i.boolean(),sessionId:t.nullable(),clientAccountId:t.nullable(),changed:i.boolean()})},_={request:i.object({clientId:t,observedAt:n,source:t,account:i.object({displayLabel:i.string().optional(),identifiers:i.array(o).min(1)}),usage:c,metadata:l}),response:i.object({clientAccountId:t,snapshot:f})};export{l as a,g as c,f as d,s as f,m as i,p as l,h as n,u as o,c as p,a as r,d as s,o as t,_ as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,ot as u,p as d,r as f,s as p,t as m,u as h,v as g,x as _,y as v}from"./schemas-BXstpWVp.mjs";import"./contracts/adapter/schemas/session-lineage.mjs";import{createBusNamespace as y}from"@makaio/framework/core";const b={getCapabilities:u,startAgent:_,infer:t,listAgents:v,getAgent:g,stopAgent:e,rehydrateAgent:a,getConfigSchema:o,"agent.created":l,"session.created":d,"session.discovered":s,"session.linked":f,"session.statusChanged":m,"session.usage":i,"session.closed":r,log:h,error:c,initialized:n,quota:p},x=y(`adapter`,b),S=x.subjects;export{S as n,b as r,x as t};
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import * as acp from "@agentclientprotocol/sdk";
|
|
2
|
+
import { Client, CreateTerminalRequest, CreateTerminalResponse, KillTerminalRequest, KillTerminalResponse, ReadTextFileRequest, ReadTextFileResponse, ReleaseTerminalRequest, ReleaseTerminalResponse, RequestPermissionRequest, RequestPermissionResponse, SessionNotification, TerminalOutputRequest, TerminalOutputResponse, WaitForTerminalExitRequest, WaitForTerminalExitResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk";
|
|
3
|
+
|
|
4
|
+
//#region adapters/shared/acp-client/src/terminal-manager.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Manages stateful terminal lifecycles for ACP agents.
|
|
7
|
+
*
|
|
8
|
+
* ACP's terminal protocol is stateful (create → output → wait_for_exit → kill → release),
|
|
9
|
+
* which does not map cleanly to a single request/response. This manager handles direct
|
|
10
|
+
* child_process lifecycle with bounded output buffering.
|
|
11
|
+
*/
|
|
12
|
+
declare class TerminalManager {
|
|
13
|
+
private readonly terminals;
|
|
14
|
+
private nextId;
|
|
15
|
+
/**
|
|
16
|
+
* Creates a new terminal subprocess.
|
|
17
|
+
* @param params - ACP create terminal request
|
|
18
|
+
* @returns Terminal ID for subsequent operations
|
|
19
|
+
*/
|
|
20
|
+
createTerminal(params: acp.CreateTerminalRequest): Promise<acp.CreateTerminalResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Gets the current output of a terminal without waiting for it to exit.
|
|
23
|
+
* @param params - ACP terminal output request
|
|
24
|
+
* @returns Current buffered output and truncation status
|
|
25
|
+
*/
|
|
26
|
+
getOutput(params: acp.TerminalOutputRequest): Promise<acp.TerminalOutputResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Waits for a terminal process to exit.
|
|
29
|
+
* @param params - ACP wait for exit request
|
|
30
|
+
* @returns Exit code and terminating signal
|
|
31
|
+
*/
|
|
32
|
+
waitForExit(params: acp.WaitForTerminalExitRequest): Promise<acp.WaitForTerminalExitResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Kills a terminal process without releasing it.
|
|
35
|
+
*
|
|
36
|
+
* The terminal remains valid after this call, allowing callers to retrieve
|
|
37
|
+
* final output before releasing.
|
|
38
|
+
* @param params - ACP kill terminal request
|
|
39
|
+
* @returns Empty response object
|
|
40
|
+
*/
|
|
41
|
+
killTerminal(params: acp.KillTerminalRequest): Promise<acp.KillTerminalResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Releases a terminal, killing the process and freeing all associated resources.
|
|
44
|
+
*
|
|
45
|
+
* After this call the terminal ID is no longer valid.
|
|
46
|
+
* @param params - ACP release terminal request
|
|
47
|
+
* @returns Empty response object
|
|
48
|
+
*/
|
|
49
|
+
releaseTerminal(params: acp.ReleaseTerminalRequest): Promise<acp.ReleaseTerminalResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Kills and removes all managed terminals.
|
|
52
|
+
*
|
|
53
|
+
* Should be called during connector shutdown to prevent resource leaks.
|
|
54
|
+
*/
|
|
55
|
+
releaseAll(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Returns a managed terminal by ID, throwing if not found.
|
|
58
|
+
* @param terminalId - Terminal identifier assigned at creation time
|
|
59
|
+
* @returns The managed terminal state
|
|
60
|
+
*/
|
|
61
|
+
private requireTerminal;
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region adapters/shared/acp-client/src/types.d.ts
|
|
65
|
+
/**
|
|
66
|
+
* Configuration for spawning an ACP agent subprocess.
|
|
67
|
+
*/
|
|
68
|
+
interface AcpConnectionOptions {
|
|
69
|
+
/** Subprocess command (e.g., 'qwen') */
|
|
70
|
+
command: string;
|
|
71
|
+
/** CLI arguments (e.g., ['--acp', '--model', 'qwen3-coder']) */
|
|
72
|
+
args: string[];
|
|
73
|
+
/** Working directory for the subprocess */
|
|
74
|
+
cwd: string;
|
|
75
|
+
/** Environment variables passed to the subprocess */
|
|
76
|
+
env: Record<string, string>;
|
|
77
|
+
/** Callback for stderr output */
|
|
78
|
+
onStderr?: (data: string) => void;
|
|
79
|
+
/** Callback for subprocess spawn/runtime errors */
|
|
80
|
+
onError?: (error: Error) => void;
|
|
81
|
+
/** Callback for subprocess exit */
|
|
82
|
+
onExit?: (code: number | null) => void;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Handle to a running ACP connection (subprocess + protocol layer).
|
|
86
|
+
*/
|
|
87
|
+
interface AcpConnectionHandle {
|
|
88
|
+
/** The ACP client-side connection for sending requests to the agent */
|
|
89
|
+
connection: acp.ClientSideConnection;
|
|
90
|
+
/** Kill the subprocess with SIGTERM */
|
|
91
|
+
kill(): void;
|
|
92
|
+
/** Promise that resolves with the exit code when the subprocess exits */
|
|
93
|
+
exited: Promise<number | null>;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Callbacks for routing ACP server requests to Makaio infrastructure.
|
|
97
|
+
*/
|
|
98
|
+
interface MakaioAcpClientConfig {
|
|
99
|
+
/**
|
|
100
|
+
* Handle session update notifications (message chunks, tool calls, usage, etc.).
|
|
101
|
+
* @param notification - The session notification from the agent
|
|
102
|
+
*/
|
|
103
|
+
onSessionUpdate: (notification: acp.SessionNotification) => Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Handle permission requests (tool approval).
|
|
106
|
+
* @param params - The permission request from the agent
|
|
107
|
+
*/
|
|
108
|
+
onRequestPermission: (params: acp.RequestPermissionRequest) => Promise<acp.RequestPermissionResponse>;
|
|
109
|
+
/**
|
|
110
|
+
* Handle file read requests. Only required if fs.readTextFile capability is advertised.
|
|
111
|
+
* @param params - The read file request from the agent
|
|
112
|
+
*/
|
|
113
|
+
onReadTextFile?: (params: acp.ReadTextFileRequest) => Promise<acp.ReadTextFileResponse>;
|
|
114
|
+
/**
|
|
115
|
+
* Handle file write requests. Only required if fs.writeTextFile capability is advertised.
|
|
116
|
+
* @param params - The write file request from the agent
|
|
117
|
+
*/
|
|
118
|
+
onWriteTextFile?: (params: acp.WriteTextFileRequest) => Promise<acp.WriteTextFileResponse>;
|
|
119
|
+
/** Terminal lifecycle manager for stateful terminal operations */
|
|
120
|
+
terminalManager?: TerminalManager;
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region adapters/shared/acp-client/src/connection.d.ts
|
|
124
|
+
/**
|
|
125
|
+
* Spawns an ACP agent subprocess and establishes a protocol connection over stdio.
|
|
126
|
+
*
|
|
127
|
+
* The subprocess stdin/stdout are bridged to the ACP SDK via Web Streams using
|
|
128
|
+
* `Readable.toWeb()` / `Writable.toWeb()` (Node.js 16+). The returned handle
|
|
129
|
+
* exposes the {@link acp.ClientSideConnection} for issuing ACP requests along with
|
|
130
|
+
* lifecycle controls.
|
|
131
|
+
* @param clientFactory - Factory called with the negotiated {@link acp.Agent} proxy;
|
|
132
|
+
* must return the {@link acp.Client} implementation that handles incoming agent requests
|
|
133
|
+
* @param options - Subprocess spawn configuration
|
|
134
|
+
* @returns Handle containing the live connection, a kill function, and an exit promise
|
|
135
|
+
*/
|
|
136
|
+
declare function createAcpConnection(clientFactory: (agent: acp.Agent) => acp.Client, options: AcpConnectionOptions): Promise<AcpConnectionHandle>;
|
|
137
|
+
//#endregion
|
|
138
|
+
//#region adapters/shared/acp-client/src/client.d.ts
|
|
139
|
+
/**
|
|
140
|
+
* ACP {@link Client} implementation that bridges agent requests to Makaio infrastructure.
|
|
141
|
+
*
|
|
142
|
+
* Routes session updates, permission requests, filesystem operations, and terminal
|
|
143
|
+
* lifecycle events to the connector-provided callbacks and optional terminal manager.
|
|
144
|
+
* All optional Client methods throw a descriptive error when the corresponding
|
|
145
|
+
* capability has not been configured.
|
|
146
|
+
*/
|
|
147
|
+
declare class MakaioAcpClient implements Client {
|
|
148
|
+
private readonly config;
|
|
149
|
+
/**
|
|
150
|
+
* @param config - Callbacks and optional managers for each ACP client capability
|
|
151
|
+
*/
|
|
152
|
+
constructor(config: MakaioAcpClientConfig);
|
|
153
|
+
/**
|
|
154
|
+
* Forwards session update notifications to the connector.
|
|
155
|
+
* @param params - Session notification from the agent
|
|
156
|
+
* @returns Void promise resolving after the notification is processed
|
|
157
|
+
*/
|
|
158
|
+
sessionUpdate(params: SessionNotification): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Forwards permission requests to the connector approval handler.
|
|
161
|
+
* @param params - Permission request from the agent
|
|
162
|
+
* @returns The user's permission decision
|
|
163
|
+
*/
|
|
164
|
+
requestPermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* Forwards file read requests to the optional handler.
|
|
167
|
+
* @param params - Read file request from the agent
|
|
168
|
+
* @returns File contents
|
|
169
|
+
*/
|
|
170
|
+
readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
|
|
171
|
+
/**
|
|
172
|
+
* Forwards file write requests to the optional handler.
|
|
173
|
+
* @param params - Write file request from the agent
|
|
174
|
+
* @returns Write confirmation
|
|
175
|
+
*/
|
|
176
|
+
writeTextFile(params: WriteTextFileRequest): Promise<WriteTextFileResponse>;
|
|
177
|
+
/**
|
|
178
|
+
* Creates a new terminal process via the terminal manager.
|
|
179
|
+
* @param params - Terminal creation parameters from the agent
|
|
180
|
+
* @returns Terminal ID for subsequent operations
|
|
181
|
+
*/
|
|
182
|
+
createTerminal(params: CreateTerminalRequest): Promise<CreateTerminalResponse>;
|
|
183
|
+
/**
|
|
184
|
+
* Retrieves the current output of a managed terminal.
|
|
185
|
+
* @param params - Terminal output request from the agent
|
|
186
|
+
* @returns Current buffered output and truncation status
|
|
187
|
+
*/
|
|
188
|
+
terminalOutput(params: TerminalOutputRequest): Promise<TerminalOutputResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* Waits for a managed terminal to exit.
|
|
191
|
+
* @param params - Wait for exit request from the agent
|
|
192
|
+
* @returns Exit code and terminating signal
|
|
193
|
+
*/
|
|
194
|
+
waitForTerminalExit(params: WaitForTerminalExitRequest): Promise<WaitForTerminalExitResponse>;
|
|
195
|
+
/**
|
|
196
|
+
* Kills a managed terminal process without releasing it.
|
|
197
|
+
* @param params - Kill terminal request from the agent
|
|
198
|
+
* @returns Empty kill response
|
|
199
|
+
*/
|
|
200
|
+
killTerminal(params: KillTerminalRequest): Promise<KillTerminalResponse>;
|
|
201
|
+
/**
|
|
202
|
+
* Releases a managed terminal and frees all associated resources.
|
|
203
|
+
* @param params - Release terminal request from the agent
|
|
204
|
+
* @returns Empty release response
|
|
205
|
+
*/
|
|
206
|
+
releaseTerminal(params: ReleaseTerminalRequest): Promise<ReleaseTerminalResponse>;
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
export { type AcpConnectionHandle, type AcpConnectionOptions, MakaioAcpClient, type MakaioAcpClientConfig, TerminalManager, createAcpConnection };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{spawn as e}from"node:child_process";import{Readable as t,Writable as n}from"node:stream";import*as r from"@agentclientprotocol/sdk";function i(e){return new Promise((t,n)=>{let r=()=>{e.off(`error`,i),t()},i=t=>{e.off(`spawn`,r),n(t)};e.once(`spawn`,r),e.once(`error`,i)})}async function a(e){e.stdin?.destroy(),e.stdout?.destroy(),e.stderr?.destroy(),e.kill(`SIGTERM`),await new Promise(t=>{e.once(`exit`,()=>t()),e.once(`close`,()=>t()),setTimeout(t,100)})}function o(e){return e}function s(e){return e}async function c(c,l){let u=e(l.command,l.args,{cwd:l.cwd,env:l.env,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(u)}catch(e){throw l.onError?.(e),e}l.onStderr&&u.stderr&&u.stderr.on(`data`,e=>{l.onStderr(e.toString(`utf-8`))});let d=new Promise(e=>{u.once(`exit`,t=>{l.onExit?.(t),e(t)})});u.on(`error`,e=>{l.onError?.(e)});let f;try{let e=t.toWeb(u.stdout),i=n.toWeb(u.stdin),a=r.ndJsonStream(s(i),o(e));f=new r.ClientSideConnection(c,a)}catch(e){throw await a(u),e}return{connection:f,kill:()=>u.kill(`SIGTERM`),exited:d}}var l=class{config;constructor(e){this.config=e}async sessionUpdate(e){await this.config.onSessionUpdate(e)}async requestPermission(e){return this.config.onRequestPermission(e)}async readTextFile(e){if(!this.config.onReadTextFile)throw Error(`readTextFile not supported: no handler configured`);return this.config.onReadTextFile(e)}async writeTextFile(e){if(!this.config.onWriteTextFile)throw Error(`writeTextFile not supported: no handler configured`);return this.config.onWriteTextFile(e)}async createTerminal(e){if(!this.config.terminalManager)throw Error(`createTerminal not supported: no terminal manager configured`);return this.config.terminalManager.createTerminal(e)}async terminalOutput(e){if(!this.config.terminalManager)throw Error(`terminalOutput not supported: no terminal manager configured`);return this.config.terminalManager.getOutput(e)}async waitForTerminalExit(e){if(!this.config.terminalManager)throw Error(`waitForTerminalExit not supported: no terminal manager configured`);return this.config.terminalManager.waitForExit(e)}async killTerminal(e){if(!this.config.terminalManager)throw Error(`killTerminal not supported: no terminal manager configured`);return this.config.terminalManager.killTerminal(e)}async releaseTerminal(e){if(!this.config.terminalManager)throw Error(`releaseTerminal not supported: no terminal manager configured`);return this.config.terminalManager.releaseTerminal(e)}},u=class{terminals=new Map;nextId=0;async createTerminal(t){let n=`terminal-${(++this.nextId).toString()}`,r=t.outputByteLimit??1024*1024,o={...process.env};if(t.env)for(let e of t.env)o[e.name]=e.value;let s=e(t.command,t.args??[],{cwd:t.cwd??void 0,env:o,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(s)}catch(e){throw await a(s),e}let c={process:s,output:``,outputByteLimit:r,truncated:!1,exitCode:void 0,signal:void 0,hasExited:!1,exitPromise:new Promise(e=>{s.on(`exit`,(e,t)=>{c.exitCode=e,c.signal=t??null}),s.on(`close`,()=>{c.hasExited=!0,e({exitCode:c.exitCode??null,signal:c.signal??null})})})},l=e=>{if(c.output+=e.toString(`utf-8`),Buffer.byteLength(c.output,`utf-8`)>c.outputByteLimit){let e=Buffer.from(c.output,`utf-8`),t=e.length-c.outputByteLimit;for(;t<e.length&&(e[t]&192)==128;)t+=1;c.output=e.subarray(t).toString(`utf-8`),c.truncated=!0}};return s.stdout?.on(`data`,l),s.stderr?.on(`data`,l),this.terminals.set(n,c),{terminalId:n}}async getOutput(e){let t=this.requireTerminal(e.terminalId);return{output:t.output,truncated:t.truncated,...t.hasExited&&{exitStatus:{exitCode:t.exitCode??null,signal:t.signal??null}}}}async waitForExit(e){let{exitCode:t,signal:n}=await this.requireTerminal(e.terminalId).exitPromise;return{exitCode:t??void 0,signal:n??void 0}}async killTerminal(e){return this.requireTerminal(e.terminalId).process.kill(`SIGTERM`),{}}async releaseTerminal(e){let t=this.terminals.get(e.terminalId);return t&&(t.process.kill(`SIGKILL`),this.terminals.delete(e.terminalId)),{}}releaseAll(){for(let[e,t]of this.terminals)t.process.kill(`SIGKILL`),this.terminals.delete(e)}requireTerminal(e){let t=this.terminals.get(e);if(!t)throw Error(`Terminal not found: ${e}`);return t}};export{l as MakaioAcpClient,u as TerminalManager,c as createAcpConnection};
|