@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 @@
|
|
|
1
|
+
import{agents as ee,sessions as te}from"./session/storage/schema.mjs";import{t as e}from"../schema-uSGW-6oM.mjs";import{t as ne}from"../schema-CAw_BqaG.mjs";import{n as re,r as ie,t as ae}from"../namespace-8cNguvIp.mjs";import{SessionStorageNamespace as oe,SessionStorageSubjects as se}from"./session/storage/namespace.mjs";import{A as ce,C as le,D as ue,E as de,F as fe,M as pe,N as t,O as n,P as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,j as h,k as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T,v as E,w as D,x as O,y as k}from"../handlers-iGKUJ380.mjs";import{A,B as j,C as M,D as N,E as P,F,G as I,H as L,I as R,J as z,K as B,L as me,M as he,N as ge,O as _e,P as ve,Q as ye,R as be,S as xe,T as Se,U as V,V as Ce,W as we,X as Te,Y as Ee,Z as De,_ as Oe,a as ke,b as Ae,c as je,d as Me,f as Ne,g as Pe,h as Fe,i as Ie,j as Le,k as Re,l as ze,m as Be,n as Ve,o as He,p as Ue,q as We,r as Ge,s as Ke,t as qe,u as H,v as Je,w as Ye,x as Xe,y as Ze,z as Qe}from"../session-Do6lDZM4.mjs";import{TurnStorageNamespace as $e,TurnStorageSubjects as et}from"./turn/namespace.mjs";import{TurnStorageNamespace as tt}from"./session/turns/namespace.mjs";import{AdapterRuntimeSchemas as nt,ResolveIdRequestSchema as rt,ResolveIdResponseSchema as it,ResolveNameRequestSchema as at,ResolveNameResponseSchema as ot}from"./adapter-runtime/schemas.mjs";import{AdapterRuntimeNamespace as U,AdapterRuntimeSubjects as st}from"./adapter-runtime/namespace.mjs";import{MessageStorageNamespace as ct,MessageStorageSubjects as lt}from"./session/messages/namespace.mjs";import{t as ut}from"../namespace-Db-p67Rg.mjs";import{ProviderStorageNamespace as dt}from"./settings/storage/providers-namespace.mjs";import{ContainerIsolatedExecutionTargetSchema as ft,ContainerLocalExecutionTargetSchema as pt,ExecutionTargetInputSchema as mt,ExecutionTargetListQuerySchema as ht,ExecutionTargetResolveRequestSchema as gt,ExecutionTargetSchema as _t,ExecutionTargetSchemas as vt,ExecutionTargetTypeSchema as yt,LocalExecutionTargetSchema as bt}from"./execution-target/schemas.mjs";import{ExecutionTargetNamespace as W,ExecutionTargetSubjects as xt}from"./execution-target/namespace.mjs";import{n as St,r as Ct,t as wt}from"../provider-context-CNRQ4d5m.mjs";import{BugEntrySchema as Tt,CompressRequestSchema as Et,CompressResponseSchema as Dt,CompressionEventSchema as Ot,CompressionSchemas as kt,ExtractedContextSchema as At,TechnicalDetailsSchema as jt,TodoEntrySchema as Mt}from"./compression/schemas.mjs";import{PreferenceItemSchema as Nt,PreferenceKeySchema as Pt,PreferenceValueSchema as Ft,PreferencesSchemas as It}from"./preferences/schemas.mjs";import{PreferencesNamespace as G,PreferencesSubjects as Lt}from"./preferences/storage-namespace.mjs";import{t as Rt}from"../namespace-D5Wrt7YU.mjs";import{C as zt,D as Bt,E as Vt,S as Ht,T as Ut,_ as Wt,a as K,b as Gt,c as Kt,d as qt,f as Jt,g as Yt,h as Xt,i as Zt,l as Qt,m as $t,o as en,p as tn,r as nn,s as rn,u as an,v as on,w as sn,x as cn,y as ln}from"../tools-CDSgj0ee.mjs";import{t as un}from"../capability-service-tnpR_TaB.mjs";import{a as dn,c as fn,i as pn,l as mn,n as hn,o as q,r as gn,s as _n,t as vn,u as yn}from"../model-registry-CIscwC52.mjs";import{t as bn}from"../tool-approval-service-BcBSUZCO.mjs";import{TrayMenuEntrySchema as xn,TrayMenuGroupEntrySchema as Sn,TrayMenuGroupSchema as Cn,TrayMenuItemClickedSchema as wn,TrayMenuListEntrySchema as Tn,TrayMenuMetadataSchema as En,TrayMenuSchemas as Dn,TrayMenuSectionSchema as On}from"./tray-menu/schemas.mjs";import{TrayMenuNamespace as J,TrayMenuSubjects as kn}from"./tray-menu/namespace.mjs";import{t as An}from"../tray-menu-service-CTXC1Elg.mjs";import{t as jn}from"../namespace-CfEWMXBx.mjs";import"./capability/index.mjs";import"./tool-approval/index.mjs";import"./tray-menu/index.mjs";import{AgentInstanceStatusSchema as Mn,AgentRuntimeSchemas as Nn,AgentRuntimeSelectionSchema as Pn}from"./agent-runtime/schemas.mjs";import{AgentRuntimeNamespace as Y,AgentRuntimeSubjects as Fn}from"./agent-runtime/namespace.mjs";import{CodebaseChangedEventSchema as In,CodebaseSchemas as Ln}from"./codebase/schemas.mjs";import{CodebaseNamespace as X,CodebaseSubjects as Rn}from"./codebase/namespace.mjs";import{CompressionNamespace as Z,CompressionSubjects as zn}from"./compression/namespace.mjs";import{r as Bn,t as Vn}from"../storage-namespace-ADwyijoe.mjs";import{DefinitionNamespace as Hn}from"./definition/namespace.mjs";import{DialogNamespace as Un}from"./dialog/namespace.mjs";import{_ as Wn,a as Gn,c as Kn,d as qn,f as Jn,g as Yn,h as Xn,i as Zn,l as Qn,m as $n,n as er,o as tr,p as nr,r as Q,s as rr,t as ir,u as ar,v as or}from"../execution-target-BW_uiBVe.mjs";import{FsNamespace as sr}from"./filesystem/namespace.mjs";import{CLIDetectionNamespace as cr}from"./cli-detection/namespace.mjs";import{LocalNotificationNamespace as lr}from"./local-notification/namespace.mjs";import{t as ur}from"../namespace-N0dfwSg6.mjs";import{ExtensionConfigStorageNamespace as dr}from"./settings/storage/extension-configs/namespace.mjs";import{ClientStorageNamespace as fr}from"./settings/storage/clients-namespace.mjs";import{WorkerCompletedEventSchema as pr,WorkerDefinitionCreateSchema as mr,WorkerDefinitionSchema as hr,WorkerDefinitionSummarySchema as gr,WorkerDefinitionUpdateSchema as _r,WorkerInstanceSchema as vr,WorkerInstanceStatusSchema as yr,WorkerKernelSchemas as br,WorkerSettingsSchemas as xr,WorkerSpawnRequestSchema as Sr,WorkerSpawnedEventSchema as Cr}from"./worker/schemas.mjs";import{r as wr,t as Tr}from"../namespace-Bmc7AW4J2.mjs";import{WorkerKernelNamespace as $,WorkerSubjects as Er}from"./worker/namespace.mjs";import{i as Dr,n as Or,r as kr,t as Ar}from"../identity-B_A0mE63.mjs";import"./adapter-runtime/index.mjs";import"./agent-runtime/index.mjs";import"./codebase/index.mjs";import"./compression/index.mjs";import"./preferences/index.mjs";import"./worker/index.mjs";import{ImportCursorStorageNamespace as jr}from"@makaio/framework/adapters";import{ModelRegistryPublicNamespace as Mr}from"@makaio/framework/contracts/model-registry";const Nr=[U,ut,Y,r,H,cr,fr,X,Z,Bn,Vn,Hn,Un,Q,W,dr,sr,jn,jr,lr,V,q,Mr,G,ur,dt,Rt,Tr,J,$e,$,wr];export{Ar as AdapterIdentityRegistry,Te as AdapterRegistry,U as AdapterRuntimeNamespace,nt as AdapterRuntimeSchemas,st as AdapterRuntimeSubjects,H as AdapterSessionStorageNamespace,Me as AdapterSessionStorageSubjects,Mn as AgentInstanceStatusSchema,Y as AgentRuntimeNamespace,Nn as AgentRuntimeSchemas,Pn as AgentRuntimeSelectionSchema,Fn as AgentRuntimeSubjects,r as AgentStorageNamespace,fe as AgentStorageSubjects,Tt as BugEntrySchema,F as CONNECTOR_SWAP_DEFAULT_PIPELINE,vn as CachedRegistryFetcher,Vt as CanonicalModelResolutionError,Ut as CanonicalModelResolver,sn as CanonicalModelService,un as CapabilityService,Zt as CapabilityToken,In as CodebaseChangedEventSchema,X as CodebaseNamespace,Ln as CodebaseSchemas,Rn as CodebaseSubjects,Et as CompressRequestSchema,Dt as CompressResponseSchema,Ot as CompressionEventSchema,Z as CompressionNamespace,kt as CompressionSchemas,zn as CompressionSubjects,Gn as ContainerCreatedSchema,tr as ContainerDestroyedSchema,ft as ContainerIsolatedExecutionTargetSchema,rr as ContainerIsolatedSpawnRequestSchema,pt as ContainerLocalExecutionTargetSchema,Kn as ContainerLocalSpawnRequestSchema,Qn as ContainerRuntimeSchema,ir as ContainerSpawnNamespace,er as ContainerSpawnSubjects,ar as ContainerStartedSchema,qn as ContainerStateSchema,Jn as ContainerStoppedSchema,qe as ContextWindowTracker,Q as DockerNamespace,Zn as DockerSubjects,mt as ExecutionTargetInputSchema,ht as ExecutionTargetListQuerySchema,W as ExecutionTargetNamespace,gt as ExecutionTargetResolveRequestSchema,_t as ExecutionTargetSchema,vt as ExecutionTargetSchemas,xt as ExecutionTargetSubjects,yt as ExecutionTargetTypeSchema,At as ExtractedContextSchema,hn as FallbackRegistryFetcher,Nr as FrameworkServicesCoreNamespaces,bt as LocalExecutionTargetSchema,Ue as MakaioSession,De as MakaioSessionService,V as MessageRoutingNamespace,we as MessageRoutingSubjects,ct as MessageStorageNamespace,lt as MessageStorageSubjects,q as ModelRegistryNamespace,gn as ModelRegistryProviderNotFoundError,fn as ModelRegistrySchema,mn as ModelRegistrySchemas,pn as ModelRegistryService,_n as ModelRegistrySubjects,K as ModelRegistryToken,Nt as PreferenceItemSchema,Pt as PreferenceKeySchema,Ft as PreferenceValueSchema,G as PreferencesNamespace,It as PreferencesSchemas,Lt as PreferencesSubjects,yn as ProviderModelOverrideSchema,rt as ResolveIdRequestSchema,it as ResolveIdResponseSchema,at as ResolveNameRequestSchema,ot as ResolveNameResponseSchema,he as SessionBridge,en as SessionBridgeToken,ae as SessionEventStorageNamespace,re as SessionEventStorageSubjects,A as SessionExtensionContextImpl,Pe as SessionLogger,j as SessionOrchestrator,rn as SessionOrchestratorToken,oe as SessionStorageNamespace,se as SessionStorageSubjects,Kt as SessionStorageToken,Qt as SessionToken,Ce as SessionTurnManager,nr as SpawnRequestSchema,$n as SpawnResponseSchema,Xn as StatusRequestSchema,Yn as StatusResponseSchema,Wn as StopRequestSchema,or as StopResponseSchema,jt as TechnicalDetailsSchema,Mt as TodoEntrySchema,bn as ToolApprovalService,an as ToolApprovalToken,Bt as ToolRegistry,qt as ToolRegistryToken,xn as TrayMenuEntrySchema,Sn as TrayMenuGroupEntrySchema,Cn as TrayMenuGroupSchema,wn as TrayMenuItemClickedSchema,Tn as TrayMenuListEntrySchema,En as TrayMenuMetadataSchema,J as TrayMenuNamespace,Dn as TrayMenuSchemas,On as TrayMenuSectionSchema,An as TrayMenuService,kn as TrayMenuSubjects,Jt as TrayMenuToken,h as Turn,Qe as TurnContextEnricher,tt as TurnStorageNamespace,et as TurnStorageSubjects,pr as WorkerCompletedEventSchema,mr as WorkerDefinitionCreateSchema,hr as WorkerDefinitionSchema,gr as WorkerDefinitionSummarySchema,_r as WorkerDefinitionUpdateSchema,vr as WorkerInstanceSchema,yr as WorkerInstanceStatusSchema,$ as WorkerKernelNamespace,br as WorkerKernelSchemas,xr as WorkerSettingsSchemas,Sr as WorkerSpawnRequestSchema,Cr as WorkerSpawnedEventSchema,Er as WorkerSubjects,c as actionRegistry,wt as activateProviderContext,St as activateProviderContextStrict,Ne as adapterSessions,ee as agents,y as assembleForkContext,Or as buildDeterministicAdapterId,Ct as buildProviderContext,E as buildRecoveryContext,x as buildRecoveryContextWithPipeline,O as buildSessionContext,a as buildTurnInitiator,zt as canonicalModelPackage,tn as capabilityPackage,ke as createAndLinkImportedSession,ge as createAttachmentArtifacts,$t as createModelRegistryPackage,Le as createSessionExtensionContext,nn as createToolContributionProcessor,v as ensureAgentCwd,p as ensureAgentModel,g as extractTextContent,Je as fetchAgentsBySession,Ze as fetchMessageCountsBySession,Ae as fetchPreviewBySession,Se as fetchSessionPreviewMaps,de as findTurnByAgent,Xt as frameworkCorePackages,k as getFullConversation,ue as getOrCreateSession,Fe as importCursors,je as kindToBranchKind,P as mapAgentsBySession,Xe as mapRowToSession,N as mapToSession,dn as mergeModelMetadata,I as messageRouting,ne as messages,u as normalizeSelectionString,ce as normalizeToBlocks,xe as parseForkTransforms,ve as pickFallbackRuntimeOptions,f as recoverAgent,_ as registerAbandonHandler,kr as registerAdapterRuntimeIdentityHandlers,l as registerAttachHandler,b as registerBuiltInActions,s as registerCompressHandler,Ge as registerCompressLineageResolver,ye as registerCoreSessionServiceHandlers,He as registerCreateAndLinkHandler,ze as registerDrizzleAdapterSessionStorage,_e as registerDrizzleAgentStorage,Be as registerDrizzleImportCursorStorage,L as registerDrizzleMessageRoutingStorage,We as registerDrizzleMessageStorage,z as registerDrizzleSessionEventStorage,Ye as registerDrizzleSessionStorage,t as registerDrizzleTurnStorage,m as registerForkHandler,Oe as registerFtsSearchHandler,me as registerGetStatusCountsHandler,R as registerListActionsHandler,M as registerMemoryAgentStorage,B as registerMemoryMessageStorage,Ee as registerMemorySessionEventStorage,Re as registerMemorySessionStorage,pe as registerMemoryTurnStorage,S as registerMergeHandler,Ie as registerParentResolver,be as registerResumeHandler,Ke as registerSessionDiscoveredHandler,Ve as registerSpawningToolCallResolver,C as resetBuiltInActionsRegistration,i as resolveAdapterId,d as resolveAdapterNameById,Dr as resolveDeterministicAdapterId,le as resolveExecutionTarget,D as resolveModelCapabilities,n as resolveTargetAgents,w as routeToAgents,T as routeToAgentsCore,Yt as sessionBridgePackage,ie as sessionEvents,Wt as sessionOrchestratorPackage,on as sessionPackage,ln as sessionStoragePackage,te as sessions,Gt as toolApprovalPackage,cn as toolRegistryPackage,Ht as trayMenuPackage,e as turns,o as verifyAndRecoverAgents};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { LocalNotificationPayload, LocalNotificationProviderSummary, LocalNotificationSchemas, NotifyFailureResponse, NotifyRequest, NotifyResponse, NotifySuccessResponse } from "./schemas.mjs";
|
|
2
|
+
import { ICapabilityProvider } from "@makaio/framework/contracts";
|
|
3
|
+
|
|
4
|
+
//#region packages/services/core/src/local-notification/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Local notification provider interface.
|
|
7
|
+
*
|
|
8
|
+
* Each platform (Electron, iOS, Android, Web) implements this interface
|
|
9
|
+
* to show native notifications.
|
|
10
|
+
*/
|
|
11
|
+
interface ILocalNotificationProvider extends ICapabilityProvider {
|
|
12
|
+
/**
|
|
13
|
+
* Show a notification using the platform's native API.
|
|
14
|
+
* @param notification - The notification payload
|
|
15
|
+
* @returns Result indicating success or failure
|
|
16
|
+
*/
|
|
17
|
+
notify(notification: LocalNotificationPayload): Promise<NotifyResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Check if the provider is available and has permission.
|
|
20
|
+
* @returns Whether notifications can be shown
|
|
21
|
+
*/
|
|
22
|
+
isAvailable(): boolean;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { type ILocalNotificationProvider, type LocalNotificationPayload, type LocalNotificationProviderSummary, LocalNotificationSchemas, type NotifyFailureResponse, type NotifyRequest, type NotifyResponse, type NotifySuccessResponse };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LocalNotificationSchemas as e}from"./schemas.mjs";export{e as LocalNotificationSchemas};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as _$zod from "zod";
|
|
2
|
+
import * as _$_makaio_core0 from "@makaio/framework/core";
|
|
3
|
+
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
4
|
+
|
|
5
|
+
//#region packages/services/core/src/local-notification/namespace.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Local notification namespace definition.
|
|
8
|
+
*
|
|
9
|
+
* Provides type-safe subjects for platform-native notification operations.
|
|
10
|
+
* Each platform (Electron, iOS, Android, Web) registers a single provider
|
|
11
|
+
* that handles these subjects.
|
|
12
|
+
*/
|
|
13
|
+
declare const LocalNotificationNamespace: _$_makaio_core0.BusNamespaceDefinition<"local-notification", {
|
|
14
|
+
notify: {
|
|
15
|
+
request: _$zod.ZodObject<{
|
|
16
|
+
title: _$zod.ZodString;
|
|
17
|
+
body: _$zod.ZodString;
|
|
18
|
+
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
19
|
+
url: _$zod.ZodOptional<_$zod.ZodString>;
|
|
20
|
+
}, _$zod_v4_core0.$strip>;
|
|
21
|
+
response: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
22
|
+
success: _$zod.ZodLiteral<true>;
|
|
23
|
+
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
24
|
+
success: _$zod.ZodLiteral<false>;
|
|
25
|
+
error: _$zod.ZodString;
|
|
26
|
+
}, _$zod_v4_core0.$strict>], "success">;
|
|
27
|
+
};
|
|
28
|
+
getProvider: {
|
|
29
|
+
request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
|
|
30
|
+
response: _$zod.ZodObject<{
|
|
31
|
+
provider: _$zod.ZodNullable<_$zod.ZodObject<{
|
|
32
|
+
id: _$zod.ZodString;
|
|
33
|
+
displayName: _$zod.ZodString;
|
|
34
|
+
available: _$zod.ZodBoolean;
|
|
35
|
+
}, _$zod_v4_core0.$strip>>;
|
|
36
|
+
}, _$zod_v4_core0.$strip>;
|
|
37
|
+
};
|
|
38
|
+
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Typed subjects for local notification operations.
|
|
41
|
+
*
|
|
42
|
+
* Subjects available:
|
|
43
|
+
* - `LocalNotificationSubjects.notify` — Show a local notification (RPC)
|
|
44
|
+
* - `LocalNotificationSubjects.getProvider` — Get provider info (RPC)
|
|
45
|
+
*/
|
|
46
|
+
declare const LocalNotificationSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"local-notification", {
|
|
47
|
+
notify: {
|
|
48
|
+
request: _$zod.ZodObject<{
|
|
49
|
+
title: _$zod.ZodString;
|
|
50
|
+
body: _$zod.ZodString;
|
|
51
|
+
icon: _$zod.ZodOptional<_$zod.ZodString>;
|
|
52
|
+
url: _$zod.ZodOptional<_$zod.ZodString>;
|
|
53
|
+
}, _$zod_v4_core0.$strip>;
|
|
54
|
+
response: _$zod.ZodDiscriminatedUnion<[_$zod.ZodObject<{
|
|
55
|
+
success: _$zod.ZodLiteral<true>;
|
|
56
|
+
}, _$zod_v4_core0.$strict>, _$zod.ZodObject<{
|
|
57
|
+
success: _$zod.ZodLiteral<false>;
|
|
58
|
+
error: _$zod.ZodString;
|
|
59
|
+
}, _$zod_v4_core0.$strict>], "success">;
|
|
60
|
+
};
|
|
61
|
+
getProvider: {
|
|
62
|
+
request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
|
|
63
|
+
response: _$zod.ZodObject<{
|
|
64
|
+
provider: _$zod.ZodNullable<_$zod.ZodObject<{
|
|
65
|
+
id: _$zod.ZodString;
|
|
66
|
+
displayName: _$zod.ZodString;
|
|
67
|
+
available: _$zod.ZodBoolean;
|
|
68
|
+
}, _$zod_v4_core0.$strip>>;
|
|
69
|
+
}, _$zod_v4_core0.$strip>;
|
|
70
|
+
};
|
|
71
|
+
}>, "local-notification">;
|
|
72
|
+
//#endregion
|
|
73
|
+
export { LocalNotificationNamespace, LocalNotificationSubjects };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LocalNotificationSchemas as e}from"./schemas.mjs";import{createBusNamespace as t}from"@makaio/framework/core";const n=t(`local-notification`,e),r=n.subjects;export{n as LocalNotificationNamespace,r as LocalNotificationSubjects};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region packages/services/core/src/local-notification/schemas.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Local notification payload sent to the active platform provider.
|
|
6
|
+
*/
|
|
7
|
+
interface LocalNotificationPayload {
|
|
8
|
+
/** Notification title. */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Notification body text. */
|
|
11
|
+
body: string;
|
|
12
|
+
/** Optional icon path or identifier. */
|
|
13
|
+
icon?: string;
|
|
14
|
+
/** Optional click action URL. */
|
|
15
|
+
url?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Request payload for showing a local notification.
|
|
19
|
+
*/
|
|
20
|
+
type NotifyRequest = LocalNotificationPayload;
|
|
21
|
+
/**
|
|
22
|
+
* Response returned when the platform provider accepts the notification.
|
|
23
|
+
*/
|
|
24
|
+
type NotifySuccessResponse = {
|
|
25
|
+
/** Whether the notification was shown. */success: true;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Response returned when the platform provider cannot show the notification.
|
|
29
|
+
*/
|
|
30
|
+
type NotifyFailureResponse = {
|
|
31
|
+
/** Whether the notification was shown. */success: false; /** Human-readable failure reason. */
|
|
32
|
+
error: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Local notification result.
|
|
36
|
+
*/
|
|
37
|
+
type NotifyResponse = NotifySuccessResponse | NotifyFailureResponse;
|
|
38
|
+
/**
|
|
39
|
+
* Summary of the active local notification provider.
|
|
40
|
+
*/
|
|
41
|
+
interface LocalNotificationProviderSummary {
|
|
42
|
+
/** Provider identifier. */
|
|
43
|
+
id: string;
|
|
44
|
+
/** Human-readable provider name. */
|
|
45
|
+
displayName: string;
|
|
46
|
+
/** Whether the provider can currently show notifications. */
|
|
47
|
+
available: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Local notification domain schemas.
|
|
51
|
+
*
|
|
52
|
+
* Local notifications are platform-native notifications (Electron, iOS, Android, Web).
|
|
53
|
+
* Unlike push notifications, only one provider is active per platform.
|
|
54
|
+
*/
|
|
55
|
+
declare const LocalNotificationSchemas: {
|
|
56
|
+
/**
|
|
57
|
+
* Show a local notification on the current platform.
|
|
58
|
+
*/
|
|
59
|
+
notify: {
|
|
60
|
+
request: z.ZodObject<{
|
|
61
|
+
title: z.ZodString;
|
|
62
|
+
body: z.ZodString;
|
|
63
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
64
|
+
url: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
response: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
67
|
+
success: z.ZodLiteral<true>;
|
|
68
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
69
|
+
success: z.ZodLiteral<false>;
|
|
70
|
+
error: z.ZodString;
|
|
71
|
+
}, z.core.$strict>], "success">;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Get the current platform's notification provider info.
|
|
75
|
+
*/
|
|
76
|
+
getProvider: {
|
|
77
|
+
request: z.ZodObject<{}, z.core.$strip>;
|
|
78
|
+
response: z.ZodObject<{
|
|
79
|
+
provider: z.ZodNullable<z.ZodObject<{
|
|
80
|
+
id: z.ZodString;
|
|
81
|
+
displayName: z.ZodString;
|
|
82
|
+
available: z.ZodBoolean;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
//#endregion
|
|
88
|
+
export { LocalNotificationPayload, LocalNotificationProviderSummary, LocalNotificationSchemas, NotifyFailureResponse, NotifyRequest, NotifyResponse, NotifySuccessResponse };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{z as e}from"zod";const t=e.object({title:e.string(),body:e.string(),icon:e.string().optional(),url:e.string().optional()}),n=e.discriminatedUnion(`success`,[e.object({success:e.literal(!0)}).strict(),e.object({success:e.literal(!1),error:e.string()}).strict()]),r=e.object({id:e.string(),displayName:e.string(),available:e.boolean()}),i={notify:{request:t,response:n},getProvider:{request:e.object({}),response:e.object({provider:r.nullable()})}};export{i as LocalNotificationSchemas};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { t as LogImporterInfo } from "../../index-D1T-PPqF.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-Cvrj2ogm.mjs";
|
|
3
|
+
export { type LogImportRegistryOptions, type LogImporterInfo, type LogImporterRegistration, type OrchestratorEntry, type OrchestratorFactory };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { i as LogImportSettings, t as LogImporterInfo } from "../../index-D1T-PPqF.mjs";
|
|
2
|
+
import { a as OrchestratorFactory, i as OrchestratorEntry, n as LogImportServiceInstance, o as LogImportRegistry, r as LogImporterRegistration, t as LogImportRegistryOptions } from "../../types-Cvrj2ogm.mjs";
|
|
3
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
4
|
+
import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
|
|
5
|
+
import { ExtensionContext, MakaioNodeExtension } from "@makaio/framework/contracts";
|
|
6
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
7
|
+
import { MakaioDatabase } from "@makaio/framework/storage/drizzle";
|
|
8
|
+
import { LogImporter, ProcessLogFileResult } from "@makaio/framework/adapters";
|
|
9
|
+
import { ContributionProcessor } from "@makaio/framework/kernel";
|
|
10
|
+
|
|
11
|
+
//#region packages/services/log-import/src/log-import-contribution-processor.d.ts
|
|
12
|
+
/**
|
|
13
|
+
* Create a {@link ContributionProcessor} that wires `MakaioNodeExtension<IMakaioBus>.logImport`
|
|
14
|
+
* surfaces into the {@link LogImportRegistry}.
|
|
15
|
+
*
|
|
16
|
+
* The returned processor:
|
|
17
|
+
* - Filters to extensions that declare `logImport`.
|
|
18
|
+
* - On activation: resolves `LogImportRegistry` from the extension context,
|
|
19
|
+
* registers the log importer, and attaches an orchestrator factory when the
|
|
20
|
+
* config provides orchestrator classes.
|
|
21
|
+
* - On stopped: unregisters the importer and calls any registered cleanup.
|
|
22
|
+
*
|
|
23
|
+
* **Error semantics:** `processActivated` throws a hard error when
|
|
24
|
+
* `LogImportRegistry` is missing (composition misconfiguration) or when
|
|
25
|
+
* registration fails. Any partial state is rolled back before re-throwing.
|
|
26
|
+
* `processStopped` is best-effort and must not throw.
|
|
27
|
+
* @returns A `ContributionProcessor` ready for registration with the coordinator.
|
|
28
|
+
*/
|
|
29
|
+
declare function createLogImportContributionProcessor(): ContributionProcessor;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region packages/services/log-import/src/package.d.ts
|
|
32
|
+
/** Token for the log import registry package. */
|
|
33
|
+
declare const LogImportRegistryToken: _$_makaio_contracts0.ExtensionToken<LogImportRegistry>;
|
|
34
|
+
/** Package that starts the framework log import registry. */
|
|
35
|
+
declare const logImportRegistryPackage: MakaioNodeExtension<IMakaioBus>;
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region packages/services/log-import/src/compaction-events.d.ts
|
|
38
|
+
/**
|
|
39
|
+
* Payload needed to persist a deterministic `session.compacted` event.
|
|
40
|
+
*/
|
|
41
|
+
interface SessionCompactedEventInput {
|
|
42
|
+
sessionId: string;
|
|
43
|
+
eventId: string;
|
|
44
|
+
timestamp: number;
|
|
45
|
+
trigger: 'manual' | 'auto';
|
|
46
|
+
preTokens: number | null;
|
|
47
|
+
summary: string | null;
|
|
48
|
+
compressChildSessionId: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Persist a deterministic `session.compacted` event with race-safe idempotency.
|
|
52
|
+
*
|
|
53
|
+
* This helper owns the existence check for the common case. If a concurrent
|
|
54
|
+
* importer wins the race between that check and the append, we re-check by
|
|
55
|
+
* `eventId` and treat the duplicate as success.
|
|
56
|
+
* @param bus - Bus instance for event storage requests
|
|
57
|
+
* @param event - Fully materialized compaction event payload
|
|
58
|
+
*/
|
|
59
|
+
declare function appendSessionCompactedEvent(bus: IMakaioBus, event: SessionCompactedEventInput): Promise<void>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region packages/services/log-import/src/import-types.d.ts
|
|
62
|
+
/** Result returned after persisting an imported segment subtree. */
|
|
63
|
+
interface ImportSegmentTreeResult {
|
|
64
|
+
/** Makaio session ID created or reused for the imported segment. */
|
|
65
|
+
sessionId: string;
|
|
66
|
+
/** Total messages persisted across the segment subtree. */
|
|
67
|
+
messageCount: number;
|
|
68
|
+
}
|
|
69
|
+
/** Minimal caller context required to persist a processed import result tree. */
|
|
70
|
+
interface PersistImportResultContext {
|
|
71
|
+
/** Owning adapter instance ID. */
|
|
72
|
+
adapterId: string;
|
|
73
|
+
/** Canonical adapter name used for linkage. */
|
|
74
|
+
adapterName: string;
|
|
75
|
+
/** Log file path on disk; only the root segment owns it. */
|
|
76
|
+
logFilePath?: string | null;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region packages/services/log-import/src/generic-import-handlers.d.ts
|
|
80
|
+
/**
|
|
81
|
+
* Persist a processed import result via the canonical segment-tree path.
|
|
82
|
+
*
|
|
83
|
+
* Uses the importer's explicit lineage tree as the single source of truth for
|
|
84
|
+
* session creation, message persistence, compaction events, and status finalization.
|
|
85
|
+
* @param bus - Bus instance
|
|
86
|
+
* @param result - Fully processed importer result for one log file
|
|
87
|
+
* @param ctx - Adapter identity and optional root log file path
|
|
88
|
+
* @returns Makaio session ID and total persisted message count
|
|
89
|
+
*/
|
|
90
|
+
declare function persistImportResultTree(bus: IMakaioBus, result: ProcessLogFileResult, ctx: PersistImportResultContext): Promise<ImportSegmentTreeResult>;
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region packages/services/log-import/src/import-phase.d.ts
|
|
93
|
+
/**
|
|
94
|
+
* Import lifecycle phase constants for the log-import persistence path.
|
|
95
|
+
* @packageDocumentation
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Named phases of the import lifecycle executed by {@link importSegmentTree}.
|
|
99
|
+
*
|
|
100
|
+
* Each phase represents a durable checkpoint with explicit invariants.
|
|
101
|
+
* Phases always progress in order; no phase is skipped or rolled back within a
|
|
102
|
+
* single segment tree traversal.
|
|
103
|
+
*
|
|
104
|
+
* ```
|
|
105
|
+
* linked ──► persisted ──► finalized
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* **linked**
|
|
109
|
+
* The Makaio session has been created and bound to its adapter session ID via
|
|
110
|
+
* `AdapterSessionStorageSubjects.createAndLink`. Messages may not exist yet.
|
|
111
|
+
* Lineage-sensitive consumers that require stored message content (e.g.
|
|
112
|
+
* `compress-lineage-resolver`) must not act on the linked signal alone during
|
|
113
|
+
* an active import; they should wait for the `persisted` phase.
|
|
114
|
+
*
|
|
115
|
+
* **persisted**
|
|
116
|
+
* All messages for this segment have been written to storage via
|
|
117
|
+
* `MessageStorageSubjects.upsertByAdapterMessageId`. If this segment is a
|
|
118
|
+
* compaction child, the `session.compacted` event has been appended to the
|
|
119
|
+
* parent session. At this point the session's message content is queryable, but
|
|
120
|
+
* the session status is still `'discovered'`.
|
|
121
|
+
*
|
|
122
|
+
* **finalized**
|
|
123
|
+
* The entire subtree (this segment and all descendants) has been persisted.
|
|
124
|
+
* The adapter session status has been moved to `'imported'` and the Makaio
|
|
125
|
+
* session status has been moved to `'active'`. The session is fully visible and
|
|
126
|
+
* queryable. Status finalization is always bottom-up: a parent only reaches
|
|
127
|
+
* `finalized` after every child has reached `finalized`.
|
|
128
|
+
*/
|
|
129
|
+
declare const ImportPhase: {
|
|
130
|
+
/**
|
|
131
|
+
* Session link created; messages may not exist yet.
|
|
132
|
+
*
|
|
133
|
+
* Invariant: `AdapterSessionStorageSubjects.createAndLink` has returned
|
|
134
|
+
* successfully and the Makaio `sessionId` is stable.
|
|
135
|
+
*/
|
|
136
|
+
readonly linked: "linked";
|
|
137
|
+
/**
|
|
138
|
+
* Messages stored and compaction events emitted.
|
|
139
|
+
*
|
|
140
|
+
* Invariant: all messages for this segment are in storage; if this segment
|
|
141
|
+
* carries compaction metadata, `session.compacted` has been appended to the
|
|
142
|
+
* parent session.
|
|
143
|
+
*/
|
|
144
|
+
readonly persisted: "persisted";
|
|
145
|
+
/**
|
|
146
|
+
* Status moved to `'imported'` / `'active'` after full subtree succeeds.
|
|
147
|
+
*
|
|
148
|
+
* Invariant: this segment and every descendant have reached `persisted`;
|
|
149
|
+
* `AdapterSessionStorageSubjects.updateStatus` has set the adapter session to
|
|
150
|
+
* `'imported'` and `SessionStorageSubjects.update` has set the Makaio session
|
|
151
|
+
* to `'active'`.
|
|
152
|
+
*/
|
|
153
|
+
readonly finalized: "finalized";
|
|
154
|
+
};
|
|
155
|
+
/**
|
|
156
|
+
* Union of all valid import lifecycle phase names.
|
|
157
|
+
*
|
|
158
|
+
* Derived from {@link ImportPhase} so the type and the runtime value are
|
|
159
|
+
* always in sync.
|
|
160
|
+
*/
|
|
161
|
+
type ImportPhaseValue = (typeof ImportPhase)[keyof typeof ImportPhase];
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region packages/services/log-import/src/storage/schema.d.ts
|
|
164
|
+
/**
|
|
165
|
+
* Drizzle schema for the `log_import_settings` table.
|
|
166
|
+
*
|
|
167
|
+
* Stores per-adapter global import mode. One row per adapter — `adapter_name`
|
|
168
|
+
* is the primary key. Hosts that need scoped overrides should provide their own
|
|
169
|
+
* extended storage subjects and tables.
|
|
170
|
+
*/
|
|
171
|
+
declare const logImportSettings: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
172
|
+
name: "log_import_settings";
|
|
173
|
+
schema: undefined;
|
|
174
|
+
columns: {
|
|
175
|
+
adapterName: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
176
|
+
name: "adapter_name";
|
|
177
|
+
tableName: "log_import_settings";
|
|
178
|
+
dataType: "string";
|
|
179
|
+
columnType: "SQLiteText";
|
|
180
|
+
data: string;
|
|
181
|
+
driverParam: string;
|
|
182
|
+
notNull: true;
|
|
183
|
+
hasDefault: false;
|
|
184
|
+
isPrimaryKey: true;
|
|
185
|
+
isAutoincrement: false;
|
|
186
|
+
hasRuntimeDefault: false;
|
|
187
|
+
enumValues: [string, ...string[]];
|
|
188
|
+
baseColumn: never;
|
|
189
|
+
identity: undefined;
|
|
190
|
+
generated: undefined;
|
|
191
|
+
}, {}, {
|
|
192
|
+
length: number | undefined;
|
|
193
|
+
}>;
|
|
194
|
+
mode: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
195
|
+
name: "mode";
|
|
196
|
+
tableName: "log_import_settings";
|
|
197
|
+
dataType: "string";
|
|
198
|
+
columnType: "SQLiteText";
|
|
199
|
+
data: "disabled" | "discover" | "import";
|
|
200
|
+
driverParam: string;
|
|
201
|
+
notNull: true;
|
|
202
|
+
hasDefault: true;
|
|
203
|
+
isPrimaryKey: false;
|
|
204
|
+
isAutoincrement: false;
|
|
205
|
+
hasRuntimeDefault: false;
|
|
206
|
+
enumValues: ["disabled", "discover", "import"];
|
|
207
|
+
baseColumn: never;
|
|
208
|
+
identity: undefined;
|
|
209
|
+
generated: undefined;
|
|
210
|
+
}, {}, {
|
|
211
|
+
length: number | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
createdAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
214
|
+
name: "created_at";
|
|
215
|
+
tableName: "log_import_settings";
|
|
216
|
+
dataType: "number";
|
|
217
|
+
columnType: "SQLiteInteger";
|
|
218
|
+
data: number;
|
|
219
|
+
driverParam: number;
|
|
220
|
+
notNull: true;
|
|
221
|
+
hasDefault: false;
|
|
222
|
+
isPrimaryKey: false;
|
|
223
|
+
isAutoincrement: false;
|
|
224
|
+
hasRuntimeDefault: false;
|
|
225
|
+
enumValues: undefined;
|
|
226
|
+
baseColumn: never;
|
|
227
|
+
identity: undefined;
|
|
228
|
+
generated: undefined;
|
|
229
|
+
}, {}, {}>;
|
|
230
|
+
updatedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
231
|
+
name: "updated_at";
|
|
232
|
+
tableName: "log_import_settings";
|
|
233
|
+
dataType: "number";
|
|
234
|
+
columnType: "SQLiteInteger";
|
|
235
|
+
data: number;
|
|
236
|
+
driverParam: number;
|
|
237
|
+
notNull: true;
|
|
238
|
+
hasDefault: false;
|
|
239
|
+
isPrimaryKey: false;
|
|
240
|
+
isAutoincrement: false;
|
|
241
|
+
hasRuntimeDefault: false;
|
|
242
|
+
enumValues: undefined;
|
|
243
|
+
baseColumn: never;
|
|
244
|
+
identity: undefined;
|
|
245
|
+
generated: undefined;
|
|
246
|
+
}, {}, {}>;
|
|
247
|
+
};
|
|
248
|
+
dialect: "sqlite";
|
|
249
|
+
}>;
|
|
250
|
+
/** Type for a selected log import settings row. */
|
|
251
|
+
type SelectLogImportSettings = typeof logImportSettings.$inferSelect;
|
|
252
|
+
//#endregion
|
|
253
|
+
//#region packages/services/log-import/src/storage/handlers.d.ts
|
|
254
|
+
/**
|
|
255
|
+
* Maps a database row to the {@link LogImportSettings} API type.
|
|
256
|
+
*
|
|
257
|
+
* Exported so the host-owned scoped-settings handler can reuse the same
|
|
258
|
+
* mapping when it falls back to the framework global row.
|
|
259
|
+
* @param row - Database row from `log_import_settings`
|
|
260
|
+
* @returns Mapped `LogImportSettings` object
|
|
261
|
+
*/
|
|
262
|
+
declare function rowToSettings(row: SelectLogImportSettings): LogImportSettings;
|
|
263
|
+
/**
|
|
264
|
+
* Registers all Drizzle-based log-import settings storage handlers with the bus.
|
|
265
|
+
*
|
|
266
|
+
* Handles `getMode`, `setMode`, and `listSettings` operations for the
|
|
267
|
+
* `log_import_settings` table.
|
|
268
|
+
* @param bus - MakaioBus instance for message handling
|
|
269
|
+
* @param db - Drizzle database instance
|
|
270
|
+
* @param _ctx - Extension context (unused; reserved for future use)
|
|
271
|
+
* @returns Cleanup function to unregister all handlers
|
|
272
|
+
*/
|
|
273
|
+
declare function registerDrizzleLogImportStorage(bus: IMakaioBus, db: MakaioDatabase, _ctx: ExtensionContext): () => void;
|
|
274
|
+
//#endregion
|
|
275
|
+
export { ImportPhase, type ImportPhaseValue, LogImportRegistry, type LogImportRegistryOptions, LogImportRegistryToken, type LogImportServiceInstance, type LogImporterInfo, type LogImporterRegistration, type OrchestratorEntry, type OrchestratorFactory, type PersistImportResultContext, type SessionCompactedEventInput, appendSessionCompactedEvent, createLogImportContributionProcessor, logImportRegistryPackage, persistImportResultTree, registerDrizzleLogImportStorage, rowToSettings };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{LogImportNamespace as e,LogImportSubjects as t}from"./namespace.mjs";import{z as n}from"zod";import{basename as r,dirname as i,isAbsolute as a,join as o,relative as s,resolve as c,sep as l}from"node:path";import{MakaioBus as u}from"@makaio/framework/bus";import{COMPRESS_SESSION_LINEAGE_KIND as d,CapabilitySubjects as f,FORK_SESSION_LINEAGE_KIND as p,ROOT_SESSION_LINEAGE_KIND as m,SUBAGENT_SESSION_LINEAGE_KIND as ee,extensionToken as te}from"@makaio/framework/contracts";import{integer as h,sqliteTable as g,text as _}from"drizzle-orm/sqlite-core";import{eq as ne}from"drizzle-orm";import{ImportCursorStorageSubjects as re,toImportSegment as ie}from"@makaio/framework/adapters";import*as v from"node:fs/promises";import{AdapterSessionStorageSubjects as y,MessageStorageSubjects as ae,SessionEventStorageSubjects as b,SessionStorageSubjects as x}from"@makaio/framework/services/session";const S=n.discriminatedUnion(`kind`,[n.object({adapterSessionId:n.string(),kind:n.literal(m),parentAdapterSessionId:n.null().default(null),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(p),parentAdapterSessionId:n.string(),forkPointMessageId:n.string(),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(ee),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()}),n.object({adapterSessionId:n.string(),kind:n.literal(d),parentAdapterSessionId:n.string(),forkPointMessageId:n.null().default(null),model:n.string().nullable().default(null),cwd:n.string().nullable().default(null),startedAt:n.number().finite().optional()})]);function C(e){return S.parse(e.payload)}function w(e,t,n,r,i,a){let o=T(e);return{adapterSessionId:e.adapterSessionId,adapterName:t,model:n,cwd:r,...i===void 0?{}:{logFilePath:i},...a===void 0?{}:{startedAt:a},...o}}function oe(e){let t={model:e.model,cwd:e.cwd,title:null};switch(e.kind){case`fork`:return{...t,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:e.forkPointMessageId,kind:e.kind};case`subagent`:return{...t,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null,kind:e.kind};case`root`:return{...t,parentAdapterSessionId:null,forkPointMessageId:null,kind:null};case`compress`:return{...t,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null,kind:e.kind};default:return e}}function T(e){switch(e.kind){case`root`:return{kind:`root`,parentAdapterSessionId:null,forkPointMessageId:null};case`fork`:return{kind:`fork`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:e.forkPointMessageId};case`subagent`:return{kind:`subagent`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null};case`compress`:return{kind:`compress`,parentAdapterSessionId:e.parentAdapterSessionId,forkPointMessageId:null};default:return e}}function E(e,t,n){let r={adapterSessionId:e.adapterSessionId,model:t,cwd:n};switch(e.lineage.kind){case`root`:return{...r,kind:`root`,parentAdapterSessionId:null,forkPointMessageId:null};case`fork`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Fork segment ${e.adapterSessionId} missing parentAdapterSessionId`);if(e.lineage.forkPointMessageId==null)throw Error(`Fork segment ${e.adapterSessionId} missing forkPointMessageId`);return{...r,kind:`fork`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:e.lineage.forkPointMessageId};case`subagent`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Subagent segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`subagent`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};case`compress`:if(e.lineage.parentAdapterSessionId==null)throw Error(`Compress segment ${e.adapterSessionId} missing parentAdapterSessionId`);return{...r,kind:`compress`,parentAdapterSessionId:e.lineage.parentAdapterSessionId,forkPointMessageId:null};default:{let t=e.lineage.kind;throw Error(`Unknown lineage kind: ${String(t)}`)}}}async function D(e,t){let{events:n}=await e.request(b.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(!(n.length>0))try{await e.request(b.append,{event:{sessionId:t.sessionId,eventId:t.eventId,timestamp:t.timestamp,type:`session.compacted`,payload:{trigger:t.trigger,preTokens:t.preTokens,summary:t.summary,compressChildSessionId:t.compressChildSessionId}}})}catch(n){let{events:r}=await e.request(b.getByIds,{sessionId:t.sessionId,eventIds:[t.eventId]});if(r.length>0)return;throw n}}const O=new Map,k=`MAKAIO_GLOBSTAR_DIR`,A=`MAKAIO_GLOBSTAR`,j=`MAKAIO_STAR`;function M(e){return e.replace(/[\\/]+/g,`/`).replace(/^\.\/+/,``)}function se(e,t){let n=M(e),i=M(t),a=i.includes(`/`)?n:r(n);if(i.length>200)return!1;if(!i.includes(`*`))return a===i;let o=0;for(let e of i)if(e===`*`&&(o+=1,o>64))return!1;let s=O.get(i);if(s)return O.delete(i),O.set(i,s),s.test(a);let c=i.replace(/\*\*\//g,k).replace(/\*\*/g,A).replace(/\*/g,j).replace(/[.+^${}()|[\]\\]/g,`\\$&`).replaceAll(k,`(?:.*/)?`).replaceAll(A,`.*`).replaceAll(j,`[^/]*`),l=RegExp(`^${c}$`);if(O.size>=512){let e=O.keys().next();e.done||O.delete(e.value)}return O.set(i,l),l.test(a)}async function N(e,t,n=e){let r=[];try{let i=await v.readdir(e,{withFileTypes:!0});for(let a of i){let i=o(e,a.name);if(a.isDirectory()){let e=await N(i,t,n);r.push(...e)}else if(a.isFile()){if(!se(s(n,i).split(l).join(`/`),t))continue;r.push(i)}}}catch{}return r}function P(e,t,n){if(e!==void 0){if(a(e))return e;if(t&&a(t))return c(i(t),e);if(n&&a(n))return c(n,e)}}function F(e,t,n=!0,r){let i=[];if(n){let n=e.split(`
|
|
2
|
+
`).filter(e=>e.trim());for(let e of n){let n=t.parseRecord(e,r);n&&i.push(n)}}else{let n=t.parseRecord(e,r);n&&i.push(n)}return i}function I(e,n){return e.on(t.scan,async t=>{let{adapterName:r}=t.payload,i=n(r);if(!i){t.setResult({adapterName:r,sessionsFound:0,newSessions:0});return}let{importer:a,logFilePattern:o,adapterName:s}=i,c=a.getLogDirectory();try{await v.access(c)}catch{t.setResult({adapterName:r,sessionsFound:0,newSessions:0});return}let l=o.endsWith(`.jsonl`),u=await N(c,o),d=0,f=0;for(let t of u)try{let n=F(await v.readFile(t,`utf8`),a,l,t);if(n.length===0)continue;let r=C(a.extractSessionContext(n).sessionEvent);d++;let{created:i}=await e.request(y.upsert,w(r,s,r.model,r.cwd,t,r.startedAt));i&&f++}catch(e){console.warn(`[LogImportRegistry] Failed to process ${t}:`,e instanceof Error?e.message:e)}t.setResult({adapterName:r,sessionsFound:d,newSessions:f})})}async function L(e,t,n,r,i){let{sessionId:a}=await e.request(y.createAndLink,{adapterSessionId:t,adapterName:r,adapterId:n,metadata:oe(i)});return a}async function R(e,t){await e.request(x.update,{sessionId:t,status:`active`})}async function z(e,t,n,r,i,a){try{let i=await v.stat(r),o=t.extractSessionContext(n),s={adapterSessionId:a,model:o.model,cwd:o.cwd,sessionEvent:o.sessionEvent,startedEvent:o.startedEvent,state:t.serializeState(o.state)};await e.request(re.set,{filePath:r,bytesRead:i.size,lastModified:i.mtime.toISOString(),sessionContext:s})}catch(e){console.warn(`[importFromFileContent] Failed to persist import cursor`,{adapterName:i,adapterSessionId:a,filePath:r,error:e instanceof Error?e.message:String(e),stack:e instanceof Error?e.stack:void 0})}}async function B(e,t,n,r,i){let a=i.find(e=>e.origin===`compact`),o=a?.contentText??null,s=r.timestamp??a?.timestamp??Date.now();await D(e,{sessionId:t,eventId:`session-compacted:${t}:${n}`,timestamp:s,trigger:r.trigger,preTokens:r.preTokens,summary:o,compressChildSessionId:n})}async function V(e,t,n){for(let r of n)await e.request(ae.upsertByAdapterMessageId,{sessionId:t,turnId:null,adapterMessageId:r.adapterMessageId,role:r.role,contentText:r.contentText,blocks:r.blocks,agentId:r.agentId,adapterSessionId:r.adapterSessionId,timestamp:r.timestamp,...r.origin!==void 0&&{origin:r.origin}})}async function H(e,t,n,r){let i=E(t,n.model,n.cwd),a=t.messages.length>0?t.messages.reduce((e,t)=>Math.min(e,t.timestamp),1/0):void 0;await e.request(y.upsert,w(i,n.adapterName,n.model,n.cwd,n.logFilePath,a));let o=await L(e,t.adapterSessionId,n.adapterId,n.adapterName,i);await V(e,o,t.messages),r!==void 0&&t.compaction!==void 0&&await B(e,r,o,t.compaction,t.messages);let s=t.messages.length,c={adapterId:n.adapterId,adapterName:n.adapterName,model:n.model,cwd:n.cwd,logFilePath:null};for(let n of t.children??[]){let t=await H(e,n,c,o);s+=t.messageCount}return await e.request(y.updateStatus,{adapterSessionId:t.adapterSessionId,status:`imported`}),await R(e,o),{sessionId:o,messageCount:s}}async function U(e,t,n){let r=C(t.sessionEvent);return H(e,ie(t),{adapterId:n.adapterId,adapterName:n.adapterName,model:r.model,cwd:r.cwd,logFilePath:n.logFilePath})}async function W(e){let{bus:t,importer:n,content:r,isJsonl:i,adapterName:a,adapterId:o,sourceFilePath:s,persistedLogFilePath:c}=e,l=F(r,n,i,s);if(l.length===0)throw Error(`No valid records found`);let u=n.processLogFile(l),d=P(c,s,C(u.sessionEvent).cwd),{sessionId:f,messageCount:p}=await U(t,u,{adapterId:o,adapterName:a,logFilePath:d});return d!==void 0&&await z(t,n,l,d,a,u.adapterSessionId),{sessionId:f,messageCount:p}}function G(e,n){return e.on(t.uploadFiles,async t=>{let{adapterName:r,files:i}=t.payload,a=n(r);if(!a){t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:0,errors:i.map(e=>({filename:e.filename,error:`No importer registered for this adapter`}))});return}let{importer:o,logFilePattern:s,adapterName:c,id:l}=a,u=s.endsWith(`.jsonl`),d=0,f=[];for(let t of i)try{await W({bus:e,importer:o,content:Buffer.from(t.contentBase64,`base64`).toString(`utf8`),isJsonl:u,adapterName:c,adapterId:l,sourceFilePath:t.filename}),d++}catch(e){f.push({filename:t.filename,error:e instanceof Error?e.message:String(e)})}t.setResult({adapterName:r,filesProcessed:i.length,sessionsImported:d,errors:f})})}function K(e,n){return e.on(t.importSession,async t=>{let{adapterSessionId:r,adapterName:i}=t.payload,{session:a}=await e.request(y.get,{adapterSessionId:r});if(!a)throw Error(`Adapter session not found: ${r}`);if(!a.logFilePath)throw Error(`No log file path recorded for adapter session '${r}'. Re-run a discovery scan to populate the file path.`);let o=n(i);if(!o)throw Error(`No importer registered for adapter '${i}'`);let{importer:s,logFilePattern:c,adapterName:l,id:u}=o,d=c.endsWith(`.jsonl`),{sessionId:f,messageCount:p}=await W({bus:e,importer:s,content:await v.readFile(a.logFilePath,`utf8`),isJsonl:d,adapterName:l,adapterId:u,sourceFilePath:a.logFilePath,persistedLogFilePath:a.logFilePath});t.setResult({sessionId:f,messageCount:p})})}function q(e){return e.hasAdapterContribution?`adapter`:`extension`}function ce(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.registration;return typeof t.id==`string`&&typeof t.displayName==`string`&&typeof t.adapterName==`string`&&!!n&&typeof n==`object`&&typeof n.LogImporterClass==`function`&&typeof n.logFilePattern==`string`&&(n.LogOrchestratorClass===void 0||typeof n.LogOrchestratorClass==`function`)&&(n.LogDiscoveryOrchestratorClass===void 0||typeof n.LogDiscoveryOrchestratorClass==`function`)}function le(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function ue(e,t,n,r,i){if(!r&&!i)return null;let a=le(e,t,n);return e=>a.enabled?e===`discover`&&i?new i(a):e===`import`&&r?new r(a):null:null}async function de(e,n,r,i){try{let a=await r.requestOptional(t.getMode,{adapterName:n});if(!a.handled)return;let{mode:o}=a.data;if(o===`disabled`)return;await i(e,o)}catch(e){console.warn(`[LogImport] Failed to restore persisted mode for '${n}':`,e)}}async function J(e,t,n){if(!ce(e)||n.getImporter(e.id)!==void 0)return;await n.register({id:e.id,adapterName:e.adapterName,displayName:e.displayName,source:q({hasAdapterContribution:!0}),importer:new e.registration.LogImporterClass({adapterId:e.id,adapterName:e.adapterName}),logFilePattern:e.registration.logFilePattern});let r=ue(e.id,e.adapterName,e.logImportConfig,e.registration.LogOrchestratorClass,e.registration.LogDiscoveryOrchestratorClass);r&&n.setOrchestratorFactory(e.id,r),await de(e.id,e.adapterName,t,(e,t)=>n.switchMode(e,t))}async function fe(e,t,n){let r=e.on(f.register,async t=>{await J(t.payload.provider,e,n)},{filter:{capabilityId:`log-import`}});for(let r of t?.getProviders(`log-import`)??[])await J(r,e,n);return r}async function Y(e,t){let n=e.get(t);if(n)try{n.orchestrator.isRunning()&&await n.orchestrator.stop()}finally{try{await n.orchestrator.dispose()}finally{e.delete(t)}}}async function pe(e,t){try{await e.start()}catch(n){try{try{e.isRunning()&&await e.stop()}finally{await e.dispose()}}catch(e){console.warn(`[LogImportRegistry] Failed to clean up orchestrator after start failure for '${t}'.`,e instanceof Error?e.message:String(e))}throw n}}var X=class{bus;capabilityService;registrations=new Map;orchestrators=new Map;cleanupHandlers=[];initialized=!1;constructor(e){this.bus=e?.bus??u,this.capabilityService=e?.capabilityService}async init(){if(this.initialized)return;let e=this.bus.on(t.listImporters,e=>{let t=this.listImporters();e.setResult({importers:t})});this.cleanupHandlers.push(e);let n=I(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(n);let r=G(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(r);let i=K(this.bus,e=>this.getImporterByAdapterName(e));this.cleanupHandlers.push(i);let a=await fe(this.bus,this.capabilityService,this);this.cleanupHandlers.push(a),this.initialized=!0}async register(e){if(this.registrations.has(e.id))throw Error(`Log importer '${e.id}' is already registered`);this.registrations.set(e.id,e)}async unregister(e){if(!this.registrations.has(e))throw Error(`Log importer '${e}' is not registered`);await Y(this.orchestrators,e),this.registrations.delete(e)}async startImporter(e){if(!this.registrations.get(e))throw Error(`Log importer '${e}' is not registered`);let t=this.orchestrators.get(e);if(!t)throw Error(`No orchestrator available for '${e}'. Orchestrators must be created and provided by the adapter or extension before starting.`);t.orchestrator.isRunning()||(await t.orchestrator.start(),t.isManaged=!0)}async stopImporter(e){let t=this.orchestrators.get(e);t&&(t.orchestrator.isRunning()&&await t.orchestrator.stop(),t.isManaged=!1)}async switchMode(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Log importer '${e}' is not registered`);if(await Y(this.orchestrators,e),t===`disabled`||!n.orchestratorFactory)return;let r=n.orchestratorFactory(t);r&&(await pe(r,e),this.orchestrators.set(e,{orchestrator:r,isManaged:!0}))}async startDiscovery(e){return this.switchMode(e,`discover`)}setOrchestratorFactory(e,t){let n=this.registrations.get(e);if(!n)throw Error(`Cannot set orchestrator factory for unregistered importer '${e}'`);this.registrations.set(e,{...n,orchestratorFactory:t})}listImporters(){let e=[];for(let[,t]of this.registrations){let n=this.orchestrators.get(t.id)?.orchestrator.isRunning()??!1;e.push({id:t.id,adapterName:t.adapterName,displayName:t.displayName,source:t.source,logFilePattern:t.logFilePattern,isRunning:n,supportsManualImport:t.supportsManualImport??!0})}return e}getImporter(e){let t=this.registrations.get(e);return t?{...t}:void 0}getImporterByAdapterName(e){for(let t of this.registrations.values())if(t.adapterName===e)return{...t}}detectImporter(e){let t,n=0;for(let r of this.registrations.values()){let i=r.importer.canHandle(e);if(i===!1)continue;let a=i===!0?1:i.confidence;a>n&&(n=a,t=r)}return t}async registerOrchestrator(e,t){if(!this.registrations.has(e))throw Error(`Cannot register orchestrator for unregistered importer '${e}'`);await Y(this.orchestrators,e),this.orchestrators.set(e,{orchestrator:t,isManaged:!1})}async destroy(){if(!(!this.initialized&&this.orchestrators.size===0&&this.cleanupHandlers.length===0)){for(let[e]of this.orchestrators)await Y(this.orchestrators,e);for(let e of this.cleanupHandlers)e();this.cleanupHandlers.length=0,this.initialized=!1}}};const Z=te(`log-import-registry`),me={name:Z.name,displayName:`Log Import Registry`,version:`0.1.0`,critical:!0,namespaces:[e],create:e=>new X({bus:e.bus})};function he(e,t,n){return{enabled:n?.enabled??!0,pollIntervalMs:n?.pollIntervalMs,eventsPerSecond:n?.eventsPerSecond,adapterId:e,adapterName:t,checkMakaioManaged:n?.checkMakaioManaged}}function ge(e,t,n){if(!n.LogOrchestratorClass&&!n.LogDiscoveryOrchestratorClass)return null;let r=he(e,t,n.logImportConfig);return e=>r.enabled?e===`discover`&&n.LogDiscoveryOrchestratorClass?new n.LogDiscoveryOrchestratorClass(r):e===`import`&&n.LogOrchestratorClass?new n.LogOrchestratorClass(r):null:null}function _e(){let e=new Map;return{filter:e=>!!e.logImport,processActivated:async(t,n,r)=>{let{logImport:i}=n;if(!i)return;let a=r.getService(Z);if(!a)throw Error(`[LogImportContributionProcessor] LogImportRegistry is not available. Ensure '${Z.name}' is listed as a dependency before activating '${t}'.`);let{adapterName:o,displayName:s,config:c}=i,l=c,u=`package:${t}`,d=q({hasAdapterContribution:!!n.adapters?.length}),f=new l.LogImporterClass({adapterId:u,adapterName:o});await a.register({id:u,adapterName:o,displayName:s,source:d,importer:f,logFilePattern:l.logFilePattern??``,supportsManualImport:l.supportsManualImport});try{let e=ge(u,o,l);e&&a.setOrchestratorFactory(u,e)}catch(e){try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Rollback of log importer '${u}' failed:`,e)}throw e}console.info(`[LogImportContributionProcessor] Registered log importer '${o}' from package: ${t}`),e.set(u,async()=>{try{await a.unregister(u)}catch(e){console.error(`[LogImportContributionProcessor] Failed to unregister log importer '${u}' during cleanup:`,e)}})},processStopped:async t=>{let n=`package:${t}`,r=e.get(n);r&&(e.delete(n),await r())}}}const ve={linked:`linked`,persisted:`persisted`,finalized:`finalized`},Q=g(`log_import_settings`,{adapterName:_(`adapter_name`).primaryKey(),mode:_(`mode`,{enum:[`disabled`,`discover`,`import`]}).notNull().default(`disabled`),createdAt:h(`created_at`).notNull(),updatedAt:h(`updated_at`).notNull()});function $(e){return{adapterName:e.adapterName,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt}}function ye(e){let{bus:n,db:r}=e;return n.on(t.getMode,async e=>{let{adapterName:t}=e.payload,[n]=await r.select().from(Q).where(ne(Q.adapterName,t)).limit(1);e.setResult({mode:n?.mode??`disabled`})})}function be(e){let{bus:n,db:r}=e;return n.on(t.setMode,async e=>{let{adapterName:t,mode:n}=e.payload,i=Date.now();await r.insert(Q).values({adapterName:t,mode:n,createdAt:i,updatedAt:i}).onConflictDoUpdate({target:Q.adapterName,set:{mode:n,updatedAt:i}}),e.setResult({success:!0})})}function xe(e){let{bus:n,db:r}=e;return n.on(t.listSettings,async e=>{let t=await r.select().from(Q);e.setResult({settings:t.map($)})})}function Se(e,t,n){let r={bus:e,db:t},i=[ye(r),be(r),xe(r)];return()=>i.forEach(e=>e())}export{ve as ImportPhase,X as LogImportRegistry,Z as LogImportRegistryToken,D as appendSessionCompactedEvent,_e as createLogImportContributionProcessor,me as logImportRegistryPackage,U as persistImportResultTree,Se as registerDrizzleLogImportStorage,$ as rowToSettings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"../../schemas-C40ZAJ33.mjs";import{LogImportSubjects as t}from"./namespace.mjs";export{e as IMPORT_LAST_SCAN_CATEGORY,t as LogImportSubjects};
|