@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
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
+
import { IMakaioSession, MakaioSessionAgent, Message, MessageInput, SessionContext, TurnInitiator } from "@makaio/framework/contracts";
|
|
3
|
+
|
|
4
|
+
//#region packages/services/core/src/session/entities/turn.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Result of a completed turn.
|
|
7
|
+
*/
|
|
8
|
+
interface TurnResult {
|
|
9
|
+
/** Whether all agents completed successfully */
|
|
10
|
+
success: boolean;
|
|
11
|
+
/** Error messages from agents that failed */
|
|
12
|
+
errors: string[];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* State change returned by Turn mutation methods.
|
|
16
|
+
* Orchestrator uses this to decide whether to emit turn.completed.
|
|
17
|
+
*/
|
|
18
|
+
type TurnStateChange = {
|
|
19
|
+
turnComplete: false;
|
|
20
|
+
} | {
|
|
21
|
+
turnComplete: true;
|
|
22
|
+
result: TurnResult;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Context for dispatching messages to agents.
|
|
26
|
+
* Passed to agent.sendMessage for context propagation.
|
|
27
|
+
*/
|
|
28
|
+
interface TurnContext {
|
|
29
|
+
/** Turn identifier */
|
|
30
|
+
turnId: string;
|
|
31
|
+
/** Current/latest message ID in this turn */
|
|
32
|
+
messageId: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Configuration for creating a Turn.
|
|
36
|
+
*/
|
|
37
|
+
interface TurnConfig {
|
|
38
|
+
/** Session this turn belongs to */
|
|
39
|
+
sessionId: string;
|
|
40
|
+
/** Agents participating in this turn */
|
|
41
|
+
agentIds: string[];
|
|
42
|
+
/** Monotonic per-session ordinal (1-based), assigned by turn storage. */
|
|
43
|
+
turnNumber: number;
|
|
44
|
+
/** Optional turn ID (generated if not provided) */
|
|
45
|
+
turnId?: string;
|
|
46
|
+
/** Optional start timestamp (defaults to Date.now()) */
|
|
47
|
+
startedAt?: number;
|
|
48
|
+
/** Origin of this turn (for loop prevention and audit). Defaults to user-initiated. */
|
|
49
|
+
initiator?: TurnInitiator;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents a single turn in a session.
|
|
53
|
+
*
|
|
54
|
+
* A turn is a semantic bracket: user message(s) → agent response(s).
|
|
55
|
+
* Turn encapsulates state and logic, while SessionOrchestrator handles
|
|
56
|
+
* bus events and emissions.
|
|
57
|
+
*
|
|
58
|
+
* Design:
|
|
59
|
+
* - Immutable identity (turnId, sessionId, agentIds set at creation)
|
|
60
|
+
* - Mutable state (messages, completion tracking)
|
|
61
|
+
* - State changes return results for orchestrator to act on
|
|
62
|
+
* - No bus dependency (testable in isolation)
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const turn = new Turn({ sessionId: 'sess1', agentIds: ['agent1', 'agent2'] });
|
|
66
|
+
* turn.addMessage('msg1');
|
|
67
|
+
*
|
|
68
|
+
* const change = turn.markAgentCompleted('agent1');
|
|
69
|
+
* // change.turnComplete === false (agent2 still pending)
|
|
70
|
+
*
|
|
71
|
+
* const change2 = turn.markAgentCompleted('agent2');
|
|
72
|
+
* // change2.turnComplete === true, change2.result.success === true
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
declare class Turn$1 {
|
|
76
|
+
/** Unique turn identifier */
|
|
77
|
+
readonly turnId: string;
|
|
78
|
+
/** Session this turn belongs to */
|
|
79
|
+
readonly sessionId: string;
|
|
80
|
+
/** Monotonic per-session ordinal (1-based). */
|
|
81
|
+
readonly turnNumber: number;
|
|
82
|
+
/** Timestamp when turn was created */
|
|
83
|
+
readonly startedAt: number;
|
|
84
|
+
/** Origin of this turn, used for loop prevention and audit. */
|
|
85
|
+
private readonly _initiator;
|
|
86
|
+
/** Agents participating in this turn (immutable after creation) */
|
|
87
|
+
private readonly _agentIds;
|
|
88
|
+
/** Messages sent during this turn */
|
|
89
|
+
private readonly _messageIds;
|
|
90
|
+
/** Agents that have completed successfully */
|
|
91
|
+
private readonly _completedAgents;
|
|
92
|
+
/** Agents that errored (agentId → error message) */
|
|
93
|
+
private readonly _erroredAgents;
|
|
94
|
+
constructor(config: TurnConfig);
|
|
95
|
+
/**
|
|
96
|
+
* Agents participating in this turn.
|
|
97
|
+
* @returns Immutable array of agent IDs
|
|
98
|
+
*/
|
|
99
|
+
get agentIds(): readonly string[];
|
|
100
|
+
/**
|
|
101
|
+
* Origin of this turn for loop prevention and audit.
|
|
102
|
+
* Returned as a defensive copy to avoid external mutation of internal state.
|
|
103
|
+
* @returns Defensive copy of turn initiator metadata
|
|
104
|
+
*/
|
|
105
|
+
get initiator(): TurnInitiator;
|
|
106
|
+
/**
|
|
107
|
+
* Messages sent during this turn.
|
|
108
|
+
* @returns Immutable array of message IDs
|
|
109
|
+
*/
|
|
110
|
+
get messageIds(): readonly string[];
|
|
111
|
+
/**
|
|
112
|
+
* Agents that have completed successfully.
|
|
113
|
+
* @returns Read-only set of completed agent IDs
|
|
114
|
+
*/
|
|
115
|
+
get completedAgents(): ReadonlySet<string>;
|
|
116
|
+
/**
|
|
117
|
+
* Agents that errored.
|
|
118
|
+
* @returns Read-only map of agent ID to error message
|
|
119
|
+
*/
|
|
120
|
+
get erroredAgents(): ReadonlyMap<string, string>;
|
|
121
|
+
/**
|
|
122
|
+
* Add a message to this turn.
|
|
123
|
+
* @param messageId - The message ID to add
|
|
124
|
+
*/
|
|
125
|
+
addMessage(messageId: string): void;
|
|
126
|
+
/**
|
|
127
|
+
* Mark an agent as completed successfully.
|
|
128
|
+
* @param agentId - The agent that completed
|
|
129
|
+
* @returns State change indicating if turn is now complete
|
|
130
|
+
*/
|
|
131
|
+
markAgentCompleted(agentId: string): TurnStateChange;
|
|
132
|
+
/**
|
|
133
|
+
* Mark an agent as errored.
|
|
134
|
+
* @param agentId - The agent that errored
|
|
135
|
+
* @param error - Error message
|
|
136
|
+
* @returns State change indicating if turn is now complete
|
|
137
|
+
*/
|
|
138
|
+
markAgentErrored(agentId: string, error: string): TurnStateChange;
|
|
139
|
+
/**
|
|
140
|
+
* Check if an agent is part of this turn.
|
|
141
|
+
* @param agentId - The agent ID to check
|
|
142
|
+
* @returns True if agent is participating in this turn
|
|
143
|
+
*/
|
|
144
|
+
hasAgent(agentId: string): boolean;
|
|
145
|
+
/**
|
|
146
|
+
* Check if the turn is complete (all agents finished).
|
|
147
|
+
* @returns True if all agents have completed or errored
|
|
148
|
+
*/
|
|
149
|
+
isComplete(): boolean;
|
|
150
|
+
/**
|
|
151
|
+
* Get the turn result (only meaningful when turn is complete).
|
|
152
|
+
* @returns Turn result with success status and any errors
|
|
153
|
+
*/
|
|
154
|
+
getResult(): TurnResult;
|
|
155
|
+
/**
|
|
156
|
+
* Get context for agent dispatch.
|
|
157
|
+
* Used when sending messages to agents for context propagation.
|
|
158
|
+
* @returns Turn context with turnId and current messageId
|
|
159
|
+
* @throws Error if no messages have been added yet
|
|
160
|
+
*/
|
|
161
|
+
getContext(): TurnContext;
|
|
162
|
+
/**
|
|
163
|
+
* Get context for a specific message (for events emitted per-message).
|
|
164
|
+
* @param messageId - The message ID to get context for
|
|
165
|
+
* @returns Turn context with turnId and the specified messageId
|
|
166
|
+
*/
|
|
167
|
+
getContextForMessage(messageId: string): TurnContext;
|
|
168
|
+
/**
|
|
169
|
+
* Check if turn should complete and return appropriate state change.
|
|
170
|
+
* @returns State change indicating completion status and result if complete
|
|
171
|
+
*/
|
|
172
|
+
private checkCompletion;
|
|
173
|
+
}
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region packages/services/core/src/session/session-turn-manager.d.ts
|
|
176
|
+
/**
|
|
177
|
+
* Result of a completed turn.
|
|
178
|
+
*/
|
|
179
|
+
interface TurnCompletionResult {
|
|
180
|
+
/** Whether all agents completed successfully. */
|
|
181
|
+
success: boolean;
|
|
182
|
+
/** Error messages from agents that failed. */
|
|
183
|
+
errors: string[];
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Callback invoked when a turn completes (all agents finished).
|
|
187
|
+
* @param turn - The completed turn
|
|
188
|
+
* @param result - Success/error status with error messages
|
|
189
|
+
*/
|
|
190
|
+
type TurnCompleteCallback = (turn: Turn$1, result: TurnCompletionResult) => Promise<void>;
|
|
191
|
+
/**
|
|
192
|
+
* Composable turn lifecycle manager.
|
|
193
|
+
*
|
|
194
|
+
* Owns all stateful turn tracking: active turns, usage accumulation,
|
|
195
|
+
* completion guards, and buffered-usage-during-completion. Both the
|
|
196
|
+
* framework `SessionOrchestrator` and host-provided orchestrators create their
|
|
197
|
+
* own instance.
|
|
198
|
+
*
|
|
199
|
+
* Storage calls use `bus.requestOptional` so the manager degrades
|
|
200
|
+
* gracefully in ephemeral mode (no storage handlers registered). When
|
|
201
|
+
* `TurnStorageSubjects.create` is unhandled, synthetic IDs are generated
|
|
202
|
+
* locally. When `TurnStorageSubjects.complete` is unhandled, the turn is
|
|
203
|
+
* still cleared from memory and `session.turn.completed` is emitted.
|
|
204
|
+
*/
|
|
205
|
+
declare class SessionTurnManager {
|
|
206
|
+
private readonly bus;
|
|
207
|
+
/** Active turns keyed by sessionId (one turn per session). */
|
|
208
|
+
private readonly activeTurns;
|
|
209
|
+
/** Per-session usage accumulators, parallel to activeTurns. */
|
|
210
|
+
private readonly usageAccumulators;
|
|
211
|
+
/** Sessions currently persisting turn completion (prevents concurrent writes). */
|
|
212
|
+
private readonly completingSessions;
|
|
213
|
+
/** Usage events received while completion persistence is in-flight. */
|
|
214
|
+
private readonly bufferedUsageDuringCompletion;
|
|
215
|
+
/**
|
|
216
|
+
* Synthetic turn number counters for ephemeral mode (no storage handlers).
|
|
217
|
+
* Keyed by sessionId, incremented on each turn creation.
|
|
218
|
+
*
|
|
219
|
+
* Intentionally never pruned: turn numbers must be monotonically increasing
|
|
220
|
+
* across all turns in a session. Pruning after a turn completes would reset
|
|
221
|
+
* the counter and cause duplicate turn numbers if the session continues.
|
|
222
|
+
*/
|
|
223
|
+
private readonly syntheticTurnCounters;
|
|
224
|
+
/** Bus subscription cleanup functions. */
|
|
225
|
+
private readonly cleanups;
|
|
226
|
+
/**
|
|
227
|
+
* @param bus - Event bus used for storage RPCs and event emission
|
|
228
|
+
*/
|
|
229
|
+
constructor(bus: IMakaioBus);
|
|
230
|
+
/**
|
|
231
|
+
* Create a new turn, tracking it as active.
|
|
232
|
+
*
|
|
233
|
+
* Calls `TurnStorageSubjects.create` via `requestOptional`. If no storage
|
|
234
|
+
* handler is registered (ephemeral mode), generates a synthetic UUID turn ID
|
|
235
|
+
* and a per-session incrementing turn number.
|
|
236
|
+
* @param sessionId - Session the turn belongs to
|
|
237
|
+
* @param agentIds - Agents participating in this turn
|
|
238
|
+
* @param initiator - Turn origin metadata (user, plugin, system)
|
|
239
|
+
* @param turnId - Optional pre-assigned turn ID (passed through to storage)
|
|
240
|
+
* @returns The newly created and activated Turn entity
|
|
241
|
+
*/
|
|
242
|
+
createTurn(sessionId: string, agentIds: string[], initiator?: TurnInitiator, turnId?: string): Promise<Turn$1>;
|
|
243
|
+
/**
|
|
244
|
+
* Register bus listeners for `agent.usage` and `agent.complete` events.
|
|
245
|
+
*
|
|
246
|
+
* Must be called once during initialisation. The `onTurnComplete` callback
|
|
247
|
+
* is invoked when all agents in a turn have finished (success or error);
|
|
248
|
+
* typically the orchestrator passes its own `completeTurn` method.
|
|
249
|
+
* @param onTurnComplete - Callback invoked when all agents in a turn finish
|
|
250
|
+
*/
|
|
251
|
+
registerCompletionHandlers(onTurnComplete: TurnCompleteCallback): void;
|
|
252
|
+
/**
|
|
253
|
+
* Complete a turn: persist via storage, emit `session.turn.completed`, clear state.
|
|
254
|
+
*
|
|
255
|
+
* A concurrent-completion guard prevents duplicate writes when two agent
|
|
256
|
+
* completions race. The second call is a no-op.
|
|
257
|
+
*
|
|
258
|
+
* Usage is snapshotted before the storage call. Any usage events that arrive
|
|
259
|
+
* while persistence is in-flight are buffered and merged into a second
|
|
260
|
+
* `TurnStorageSubjects.complete` call. State is cleared only after durable
|
|
261
|
+
* persistence succeeds; if persistence fails, the state remains intact so
|
|
262
|
+
* completion can be retried.
|
|
263
|
+
* @param turn - The turn to complete
|
|
264
|
+
* @param result - Turn result (success status and error messages)
|
|
265
|
+
*/
|
|
266
|
+
completeTurn(turn: Turn$1, result: TurnCompletionResult): Promise<void>;
|
|
267
|
+
/**
|
|
268
|
+
* Get the active turn for a session, if any.
|
|
269
|
+
* @param sessionId - Session identifier
|
|
270
|
+
* @returns Active turn, or `undefined` if no turn is in progress
|
|
271
|
+
*/
|
|
272
|
+
getActiveTurn(sessionId: string): Turn$1 | undefined;
|
|
273
|
+
/**
|
|
274
|
+
* Expose the active turns map for handlers that need direct access.
|
|
275
|
+
*
|
|
276
|
+
* Used by `registerAttachHandler` which tracks turns started via
|
|
277
|
+
* `session.agent.attach` (with an `initialMessage`) in the shared map so
|
|
278
|
+
* that the completion handler can detect when the attached turn finishes.
|
|
279
|
+
* @returns Reference to the internal active turns map
|
|
280
|
+
*/
|
|
281
|
+
getActiveTurnsMap(): Map<string, Turn$1>;
|
|
282
|
+
/**
|
|
283
|
+
* Find an active turn by turn ID (scans all sessions).
|
|
284
|
+
*
|
|
285
|
+
* Used to correlate `agent.usage` events that carry a `turnId` rather
|
|
286
|
+
* than a `sessionId`.
|
|
287
|
+
* @param turnId - Turn identifier from an agent event payload
|
|
288
|
+
* @returns Matching active turn, or `undefined` if not found
|
|
289
|
+
*/
|
|
290
|
+
findActiveTurnByTurnId(turnId: string): Turn$1 | undefined;
|
|
291
|
+
/**
|
|
292
|
+
* Cancel all bus subscriptions and clear all in-memory state.
|
|
293
|
+
*
|
|
294
|
+
* Call when the owning orchestrator is destroyed.
|
|
295
|
+
*/
|
|
296
|
+
destroy(): void;
|
|
297
|
+
/**
|
|
298
|
+
* Handle an agent completing (success or error).
|
|
299
|
+
*
|
|
300
|
+
* Marks the agent on the turn, emits `user_message.completed` for each
|
|
301
|
+
* message in the turn, then calls `onTurnComplete` when all agents are done.
|
|
302
|
+
* @param agentId - The agent that completed
|
|
303
|
+
* @param success - Whether the agent completed successfully
|
|
304
|
+
* @param error - Error message if the agent failed
|
|
305
|
+
* @param onTurnComplete - Callback to invoke when the turn is complete
|
|
306
|
+
*/
|
|
307
|
+
private handleAgentCompletion;
|
|
308
|
+
/**
|
|
309
|
+
* Buffer a usage event that arrived while turn completion persistence is in-flight.
|
|
310
|
+
* @param sessionId - Session whose turn is currently completing
|
|
311
|
+
* @param usageEvent - Usage event to defer until after persistence
|
|
312
|
+
*/
|
|
313
|
+
private bufferUsageDuringCompletion;
|
|
314
|
+
}
|
|
315
|
+
//#endregion
|
|
316
|
+
//#region packages/services/core/src/session/handlers/abandon-handler.d.ts
|
|
317
|
+
/**
|
|
318
|
+
* Registers the session.abandon RPC handler.
|
|
319
|
+
*
|
|
320
|
+
* Abandons a child session without merging (no handoff).
|
|
321
|
+
* @param bus - Bus instance for communication
|
|
322
|
+
* @returns Cleanup function to unsubscribe
|
|
323
|
+
*/
|
|
324
|
+
declare function registerAbandonHandler(bus: IMakaioBus): () => void;
|
|
325
|
+
//#endregion
|
|
326
|
+
//#region packages/services/core/src/session/handlers/attach-handler.d.ts
|
|
327
|
+
/**
|
|
328
|
+
* Registers the session.agent.attach RPC handler.
|
|
329
|
+
*
|
|
330
|
+
* Explicitly attaches a fresh agent to a session with full control over:
|
|
331
|
+
* - Role assignment (lead vs member)
|
|
332
|
+
* - Optional initial message
|
|
333
|
+
*
|
|
334
|
+
* For branching conversations (fork), use session.fork to create a new session
|
|
335
|
+
* with copied history, then attach agents to the new session.
|
|
336
|
+
* @param bus - Bus instance for communication
|
|
337
|
+
* @param activeTurns - Shared turn state map
|
|
338
|
+
* @param machineId - Optional machine ID for deterministic adapter resolution
|
|
339
|
+
* @returns Cleanup function to unsubscribe
|
|
340
|
+
*/
|
|
341
|
+
declare function registerAttachHandler(bus: IMakaioBus, activeTurns: Map<string, Turn$1>, machineId?: string): () => void;
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region packages/services/core/src/session/handlers/compress-handler.d.ts
|
|
344
|
+
/**
|
|
345
|
+
* Registers the session.compress RPC handler.
|
|
346
|
+
*
|
|
347
|
+
* Executes a pipeline on session messages and inserts a squash event.
|
|
348
|
+
* The squash event marks a context boundary - messages before it
|
|
349
|
+
* are summarized by the context JSON.
|
|
350
|
+
* @param bus - Bus instance
|
|
351
|
+
* @returns Cleanup function
|
|
352
|
+
*/
|
|
353
|
+
declare function registerCompressHandler(bus: IMakaioBus): () => void;
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region packages/services/core/src/session/handlers/fork-handler.d.ts
|
|
356
|
+
/**
|
|
357
|
+
* Registers the session.fork RPC handler.
|
|
358
|
+
*
|
|
359
|
+
* Creates a new session with parent reference. The forked session starts
|
|
360
|
+
* empty - its full conversation is assembled by traversing the parent chain.
|
|
361
|
+
* @param bus - Bus instance for communication
|
|
362
|
+
* @returns Cleanup function to unsubscribe
|
|
363
|
+
*/
|
|
364
|
+
declare function registerForkHandler(bus: IMakaioBus): () => void;
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region packages/services/core/src/session/handlers/merge-handler.d.ts
|
|
367
|
+
/**
|
|
368
|
+
* Registers the session.merge RPC handler.
|
|
369
|
+
*
|
|
370
|
+
* Merges a child session's work back into parent with a handoff summary.
|
|
371
|
+
* @param bus - Bus instance for communication
|
|
372
|
+
* @returns Cleanup function to unsubscribe
|
|
373
|
+
*/
|
|
374
|
+
declare function registerMergeHandler(bus: IMakaioBus): () => void;
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region packages/services/core/src/session/handlers/route-to-agents.d.ts
|
|
377
|
+
/**
|
|
378
|
+
* Interface for turn context enrichment.
|
|
379
|
+
* Implemented by TurnContextEnricher in orchestration package.
|
|
380
|
+
*/
|
|
381
|
+
interface ITurnContextEnricher {
|
|
382
|
+
enrichForDeliveryMode(originalHistory: Message[] | undefined, turnId: string, deliveryMode: 'enqueue' | 'immediate' | 'replace' | undefined): Promise<Message[] | undefined>;
|
|
383
|
+
}
|
|
384
|
+
interface CwdSwapMeta {
|
|
385
|
+
previousCwd: string;
|
|
386
|
+
newCwd: string;
|
|
387
|
+
}
|
|
388
|
+
/**
|
|
389
|
+
* Route a message to target agents via agent.sendMessage.
|
|
390
|
+
*
|
|
391
|
+
* Fans out to all agents in parallel. On routing failure, marks agent as errored
|
|
392
|
+
* and checks for turn completion.
|
|
393
|
+
*
|
|
394
|
+
* For fork sessions on their first turn, assembles projected context from parent chain.
|
|
395
|
+
* @param bus - Bus instance for communication
|
|
396
|
+
* @param session - Session metadata (for fork detection)
|
|
397
|
+
* @param agents - Target agents to route to
|
|
398
|
+
* @param message - Message content to send
|
|
399
|
+
* @param messageId - Message identifier
|
|
400
|
+
* @param turn - Turn tracking object
|
|
401
|
+
* @param deliveryMode - How to deliver the message
|
|
402
|
+
* @param onTurnComplete - Callback when turn completes (all agents done)
|
|
403
|
+
* @param sessionContext - Session context with curated messageHistory and decision signals
|
|
404
|
+
* @param turnContextEnricher - Optional enricher for immediate message context
|
|
405
|
+
* @param isNewTurn - Whether this is the first message in a new turn
|
|
406
|
+
* @param recoveryContext - Context enriched with messageHistory for agents that were just recovered
|
|
407
|
+
* @param recoveredAgentIds - Set of agent IDs that were recovered in this handler invocation
|
|
408
|
+
* @param swappedAgentIds - Set of agent IDs that swapped connector due to cwd mismatch
|
|
409
|
+
* @param swappedAgentCwd - Previous/new cwd metadata keyed by agent ID
|
|
410
|
+
* @param freshMessageHistory - Curated history for agents forced into fresh mode
|
|
411
|
+
* @param responseSchema - Optional JSON schema for structured responses
|
|
412
|
+
*/
|
|
413
|
+
declare function routeToAgents(bus: IMakaioBus, session: IMakaioSession, agents: MakaioSessionAgent[], message: MessageInput, messageId: string, turn: Turn$1, deliveryMode: 'enqueue' | 'immediate' | undefined, onTurnComplete: (turn: Turn$1, result: {
|
|
414
|
+
success: boolean;
|
|
415
|
+
errors: string[];
|
|
416
|
+
}) => Promise<void>, sessionContext?: SessionContext, turnContextEnricher?: ITurnContextEnricher, isNewTurn?: boolean, recoveryContext?: SessionContext, recoveredAgentIds?: ReadonlySet<string>, swappedAgentIds?: ReadonlySet<string>, swappedAgentCwd?: ReadonlyMap<string, CwdSwapMeta>, freshMessageHistory?: Message[], responseSchema?: Record<string, unknown>): Promise<void>;
|
|
417
|
+
//#endregion
|
|
418
|
+
//#region packages/services/core/src/session/handlers/route-to-agents-core.d.ts
|
|
419
|
+
/**
|
|
420
|
+
* Route a message to target agents using a single shared session context.
|
|
421
|
+
*
|
|
422
|
+
* Fans out to all agents in parallel. On routing failure, marks the agent
|
|
423
|
+
* as errored and checks for turn completion. On `HookAbortError`, marks
|
|
424
|
+
* the agent as completed with `cancelled` outcome.
|
|
425
|
+
* @param bus - Bus instance for communication
|
|
426
|
+
* @param session - Session metadata (for session ID)
|
|
427
|
+
* @param agents - Target agents to route to
|
|
428
|
+
* @param message - Message content to send
|
|
429
|
+
* @param messageId - Message identifier
|
|
430
|
+
* @param turn - Turn tracking object
|
|
431
|
+
* @param deliveryMode - How to deliver the message to the agent
|
|
432
|
+
* @param onTurnComplete - Callback invoked when the turn completes (all agents done)
|
|
433
|
+
* @param sessionContext - Optional shared session context forwarded to all agents
|
|
434
|
+
* @param responseSchema - Optional JSON schema for structured responses
|
|
435
|
+
*/
|
|
436
|
+
declare function routeToAgentsCore(bus: IMakaioBus, session: IMakaioSession, agents: MakaioSessionAgent[], message: MessageInput, messageId: string, turn: Turn$1, deliveryMode: 'enqueue' | 'immediate' | undefined, onTurnComplete: TurnCompleteCallback, sessionContext?: SessionContext, responseSchema?: Record<string, unknown>): Promise<void>;
|
|
437
|
+
//#endregion
|
|
438
|
+
export { registerCompressHandler as a, SessionTurnManager as c, Turn$1 as d, TurnConfig as f, TurnStateChange as h, registerForkHandler as i, TurnCompleteCallback as l, TurnResult as m, routeToAgents as n, registerAttachHandler as o, TurnContext as p, registerMergeHandler as r, registerAbandonHandler as s, routeToAgentsCore as t, TurnCompletionResult as u };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
2
|
+
import { ProviderContext } from "@makaio/framework/contracts";
|
|
3
|
+
|
|
4
|
+
//#region packages/services/core/src/provider-context/build-provider-context.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the bus-safe provider context via the adapter subsystem subject.
|
|
7
|
+
*
|
|
8
|
+
* The adapter subsystem owns the canonical provider-context assembly. This
|
|
9
|
+
* helper keeps framework consumers on that seam while preserving the local
|
|
10
|
+
* error contract for missing provider configs.
|
|
11
|
+
* @param bus - Bus instance used to request the subsystem subject
|
|
12
|
+
* @param providerConfigId - Provider config identifier to resolve
|
|
13
|
+
* @returns Unresolved provider context with credential refs
|
|
14
|
+
* @throws Error when the config cannot be found
|
|
15
|
+
*/
|
|
16
|
+
declare function buildProviderContext(bus: IMakaioBus, providerConfigId: string): Promise<ProviderContext>;
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region packages/services/core/src/provider-context/activate-provider-context.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* Fire the credential activation hook for a provider context.
|
|
21
|
+
*
|
|
22
|
+
* Callers await this before starting an adapter so extensions such as
|
|
23
|
+
* account-manager can prepare native credential stores ahead of connector-side
|
|
24
|
+
* resolution. Missing handlers are treated as a no-op and handler failures are
|
|
25
|
+
* intentionally suppressed because activation must not block agent startup.
|
|
26
|
+
* @param bus - Bus used to invoke the activation hook
|
|
27
|
+
* @param providerContext - Provider context whose refs should be activated
|
|
28
|
+
*/
|
|
29
|
+
declare function activateProviderContext(bus: IMakaioBus, providerContext: ProviderContext): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Fire the credential activation hook and propagate failures.
|
|
32
|
+
*
|
|
33
|
+
* Rotation paths use this stricter variant so a failed native-store update does
|
|
34
|
+
* not report a successful credential swap.
|
|
35
|
+
* @param bus - Bus used to invoke the activation hook
|
|
36
|
+
* @param providerContext - Provider context whose refs should be activated
|
|
37
|
+
*/
|
|
38
|
+
declare function activateProviderContextStrict(bus: IMakaioBus, providerContext: ProviderContext): Promise<void>;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { activateProviderContextStrict as n, buildProviderContext as r, activateProviderContext as t };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { n as ResolveIdRequest } from "./schemas-Di0XnnMX.mjs";
|
|
2
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
3
|
+
|
|
4
|
+
//#region packages/services/core/src/adapter-runtime/identity.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Build the deterministic runtime adapter id for a machine-local adapter.
|
|
7
|
+
* @param machineId - Runtime machine identifier.
|
|
8
|
+
* @param adapterName - Stable adapter driver name.
|
|
9
|
+
* @returns Deterministic UUID-shaped runtime adapter id.
|
|
10
|
+
*/
|
|
11
|
+
declare function buildDeterministicAdapterId(machineId: string, adapterName: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Resolve an adapter id request against the current runtime machine.
|
|
14
|
+
* @param request - Forward lookup payload.
|
|
15
|
+
* @param currentMachineId - Runtime-default machine identifier.
|
|
16
|
+
* @returns Deterministic UUID-shaped runtime adapter id.
|
|
17
|
+
*/
|
|
18
|
+
declare function resolveDeterministicAdapterId(request: ResolveIdRequest, currentMachineId?: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Service-lifetime adapter identity index.
|
|
21
|
+
*/
|
|
22
|
+
declare class AdapterIdentityRegistry {
|
|
23
|
+
private readonly currentMachineId?;
|
|
24
|
+
private readonly adapterNamesById;
|
|
25
|
+
private localAdapterIds;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new identity registry.
|
|
28
|
+
* @param currentMachineId - Runtime-default machine identifier.
|
|
29
|
+
*/
|
|
30
|
+
constructor(currentMachineId?: string | undefined);
|
|
31
|
+
/**
|
|
32
|
+
* Replace the set of locally known adapters while preserving remote ids
|
|
33
|
+
* already resolved during this service lifetime.
|
|
34
|
+
* @param adapterNames - Current local adapter names.
|
|
35
|
+
*/
|
|
36
|
+
replaceKnownAdapterNames(adapterNames: Iterable<string>): void;
|
|
37
|
+
/**
|
|
38
|
+
* Resolve and remember an adapter id.
|
|
39
|
+
* @param request - Forward lookup payload.
|
|
40
|
+
* @returns Deterministic runtime adapter id.
|
|
41
|
+
*/
|
|
42
|
+
resolveId(request: ResolveIdRequest): string;
|
|
43
|
+
/**
|
|
44
|
+
* Remember a resolved adapter id without re-deriving it.
|
|
45
|
+
* @param adapterId - Runtime adapter id.
|
|
46
|
+
* @param adapterName - Stable adapter driver name.
|
|
47
|
+
*/
|
|
48
|
+
rememberAdapterId(adapterId: string, adapterName: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve a runtime adapter id back to its known adapter name.
|
|
51
|
+
* @param adapterId - Runtime adapter id.
|
|
52
|
+
* @returns Adapter name when known.
|
|
53
|
+
*/
|
|
54
|
+
resolveAdapterName(adapterId: string): string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Hydrate local deterministic adapter names from the provided catalog and
|
|
57
|
+
* retry the reverse lookup.
|
|
58
|
+
* @param adapterId - Runtime adapter id to resolve.
|
|
59
|
+
* @param listKnownAdapterNames - Canonical name supplier.
|
|
60
|
+
* @returns Adapter name when known after hydration.
|
|
61
|
+
*/
|
|
62
|
+
resolveAdapterNameFromKnownNames(adapterId: string, listKnownAdapterNames: () => Promise<Iterable<string>>): Promise<string | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Clear all remembered ids.
|
|
65
|
+
*/
|
|
66
|
+
clear(): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Registered adapter identity helpers for tests and lightweight hosts.
|
|
70
|
+
*/
|
|
71
|
+
interface RegisteredAdapterRuntimeIdentityHandlers {
|
|
72
|
+
/** Mutable identity registry backing the registered handlers. */
|
|
73
|
+
readonly registry: AdapterIdentityRegistry;
|
|
74
|
+
/** Cleanup function that unregisters the handlers. */
|
|
75
|
+
readonly cleanup: () => void;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Register runtime adapter identity handlers.
|
|
79
|
+
* @param bus - Bus instance used for registration.
|
|
80
|
+
* @param options - Runtime identity configuration.
|
|
81
|
+
* @returns Registry instance and cleanup function.
|
|
82
|
+
*/
|
|
83
|
+
declare function registerAdapterRuntimeIdentityHandlers(bus: IMakaioBus, options?: {
|
|
84
|
+
currentMachineId?: string;
|
|
85
|
+
knownAdapterNames?: Iterable<string>;
|
|
86
|
+
listKnownAdapterNames?: () => Promise<Iterable<string>>;
|
|
87
|
+
}): RegisteredAdapterRuntimeIdentityHandlers;
|
|
88
|
+
//#endregion
|
|
89
|
+
export { resolveDeterministicAdapterId as a, registerAdapterRuntimeIdentityHandlers as i, RegisteredAdapterRuntimeIdentityHandlers as n, buildDeterministicAdapterId as r, AdapterIdentityRegistry as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region packages/services/log-import/src/schemas/mode.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Tri-state import mode for external session discovery.
|
|
6
|
+
*
|
|
7
|
+
* - `disabled`: No scanning or import
|
|
8
|
+
* - `discover`: Shallow scan creates stubs in session list (lazy-load on demand)
|
|
9
|
+
* - `import`: Full import of all sessions and messages
|
|
10
|
+
*/
|
|
11
|
+
declare const LogImportModeSchema: z.ZodEnum<{
|
|
12
|
+
disabled: "disabled";
|
|
13
|
+
discover: "discover";
|
|
14
|
+
import: "import";
|
|
15
|
+
}>;
|
|
16
|
+
/** Tri-state import mode for external session discovery. */
|
|
17
|
+
type LogImportMode = z.infer<typeof LogImportModeSchema>;
|
|
18
|
+
/**
|
|
19
|
+
* Persisted settings shape for the `log_import_settings` table.
|
|
20
|
+
*
|
|
21
|
+
* Represents a global (adapter-level) import mode row. Project-scoped settings
|
|
22
|
+
* live in the host-owned `log_import_scoped_settings` table and are not
|
|
23
|
+
* represented here.
|
|
24
|
+
*/
|
|
25
|
+
declare const LogImportSettingsSchema: z.ZodObject<{
|
|
26
|
+
adapterName: z.ZodString;
|
|
27
|
+
mode: z.ZodEnum<{
|
|
28
|
+
disabled: "disabled";
|
|
29
|
+
discover: "discover";
|
|
30
|
+
import: "import";
|
|
31
|
+
}>;
|
|
32
|
+
createdAt: z.ZodNumber;
|
|
33
|
+
updatedAt: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
/**
|
|
36
|
+
* Persisted settings shape for the `log_import_settings` table.
|
|
37
|
+
*
|
|
38
|
+
* Represents a global (adapter-level) import mode row.
|
|
39
|
+
*/
|
|
40
|
+
type LogImportSettings = z.infer<typeof LogImportSettingsSchema>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region packages/services/log-import/src/schemas/settings.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* Category key for last scan timestamp in preferences storage.
|
|
45
|
+
* Separate from settings to avoid read-modify-write race conditions.
|
|
46
|
+
*/
|
|
47
|
+
declare const IMPORT_LAST_SCAN_CATEGORY = "import-last-scan";
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region packages/services/log-import/src/schemas/list-importers.d.ts
|
|
50
|
+
/**
|
|
51
|
+
* Information about a registered log importer.
|
|
52
|
+
*/
|
|
53
|
+
declare const LogImporterInfoSchema: z.ZodObject<{
|
|
54
|
+
id: z.ZodString;
|
|
55
|
+
adapterName: z.ZodString;
|
|
56
|
+
displayName: z.ZodString;
|
|
57
|
+
source: z.ZodEnum<{
|
|
58
|
+
adapter: "adapter";
|
|
59
|
+
extension: "extension";
|
|
60
|
+
}>;
|
|
61
|
+
logFilePattern: z.ZodString;
|
|
62
|
+
isRunning: z.ZodBoolean;
|
|
63
|
+
supportsManualImport: z.ZodDefault<z.ZodBoolean>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
type LogImporterInfo = z.infer<typeof LogImporterInfoSchema>;
|
|
66
|
+
//#endregion
|
|
67
|
+
export { LogImportSettings as i, IMPORT_LAST_SCAN_CATEGORY as n, LogImportMode as r, LogImporterInfo as t };
|