@makaio/framework 1.0.0-dev-1781022866275 → 1.0.0-dev-1781023871421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.makaio-build.json +5 -0
- package/dist/account-identity-DT5NOtFi.mjs +1 -0
- package/dist/adapter-C1eI-fGV.mjs +1 -0
- package/dist/adapters/acp-client/index.d.mts +6208 -0
- package/dist/adapters/acp-client/index.mjs +3 -0
- package/dist/adapters/config/index.d.mts +429 -0
- package/dist/adapters/config/index.mjs +1 -0
- package/dist/adapters/index.d.mts +4202 -0
- package/dist/adapters/index.mjs +18 -0
- package/dist/adapters/node.d.mts +263 -0
- package/dist/adapters/node.mjs +4 -0
- package/dist/adapters/stream-session/index.d.mts +1414 -0
- package/dist/adapters/stream-session/index.mjs +1 -0
- package/dist/adapters/stream-session/testing/index.d.mts +29 -0
- package/dist/adapters/stream-session/testing/index.mjs +1 -0
- package/dist/artifact-B3npq1cy.mjs +1 -0
- package/dist/base-orchestrator-wyumsn3b.d.mts +772 -0
- package/dist/bus/index.d.mts +3994 -0
- package/dist/bus/index.mjs +1 -0
- package/dist/bus-Caz3Jpbc.mjs +1 -0
- package/dist/bus-Hb-LGzgb.mjs +2 -0
- package/dist/capability-service-CJbmhfv9.mjs +1 -0
- package/dist/chunk-DTipWd-i.mjs +1 -0
- package/dist/chunk-cpUYaJdV.mjs +1 -0
- package/dist/cleanEnvForAdapter-KkYzQa1f.mjs +1 -0
- package/dist/client-bx74gm4R.mjs +1 -0
- package/dist/clients/index.d.mts +2639 -0
- package/dist/clients/index.mjs +2 -0
- package/dist/clients-namespace-GmSJpBUV.d.mts +332 -0
- package/dist/config-namespace-CPY9YsR8.d.mts +638 -0
- package/dist/config-namespace-ncYg2ct_.mjs +1 -0
- package/dist/contracts/adapter/index.d.mts +3 -0
- package/dist/contracts/adapter/index.mjs +1 -0
- package/dist/contracts/adapter/schemas/session-lineage.d.mts +2 -0
- package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -0
- package/dist/contracts/artifact/index.d.mts +2 -0
- package/dist/contracts/artifact/index.mjs +1 -0
- package/dist/contracts/client/index.d.mts +3 -0
- package/dist/contracts/client/index.mjs +1 -0
- package/dist/contracts/common/index.d.mts +2 -0
- package/dist/contracts/common/index.mjs +1 -0
- package/dist/contracts/config/index.d.mts +455 -0
- package/dist/contracts/config/index.mjs +1 -0
- package/dist/contracts/extension/index.d.mts +4 -0
- package/dist/contracts/extension/index.mjs +1 -0
- package/dist/contracts/facet/index.d.mts +2 -0
- package/dist/contracts/facet/index.mjs +1 -0
- package/dist/contracts/harness/index.d.mts +2 -0
- package/dist/contracts/harness/index.mjs +1 -0
- package/dist/contracts/host/index.d.mts +2 -0
- package/dist/contracts/host/index.mjs +1 -0
- package/dist/contracts/index.d.mts +23046 -0
- package/dist/contracts/index.mjs +1 -0
- package/dist/contracts/materialization/index.d.mts +4 -0
- package/dist/contracts/materialization/index.mjs +1 -0
- package/dist/contracts/model-registry/index.d.mts +2 -0
- package/dist/contracts/model-registry/index.mjs +1 -0
- package/dist/contracts/native-session-supervisor/index.d.mts +2 -0
- package/dist/contracts/native-session-supervisor/index.mjs +1 -0
- package/dist/contracts/platform/index.d.mts +2 -0
- package/dist/contracts/platform/index.mjs +1 -0
- package/dist/contracts/provider/index.d.mts +3 -0
- package/dist/contracts/provider/index.mjs +1 -0
- package/dist/contracts/session/index.d.mts +3 -0
- package/dist/contracts/session/index.mjs +1 -0
- package/dist/contracts/shared/index.d.mts +2 -0
- package/dist/contracts/shared/index.mjs +1 -0
- package/dist/contracts/skill/index.d.mts +2 -0
- package/dist/contracts/skill/index.mjs +1 -0
- package/dist/contracts/telemetry/index.d.mts +2 -0
- package/dist/contracts/telemetry/index.mjs +1 -0
- package/dist/contracts/timeout/index.d.mts +2 -0
- package/dist/contracts/timeout/index.mjs +1 -0
- package/dist/contracts/toast/index.d.mts +198 -0
- package/dist/contracts/toast/index.mjs +1 -0
- package/dist/contracts/variant/index.d.mts +2 -0
- package/dist/contracts/variant/index.mjs +1 -0
- package/dist/core/index.d.mts +1263 -0
- package/dist/core/index.mjs +1 -0
- package/dist/credential-ref-YWQQENEo.mjs +1 -0
- package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
- package/dist/definition-BLCdXGzh.d.mts +383 -0
- package/dist/definition-CrgHIpTK.d.mts +60 -0
- package/dist/definition-DZMXOnjX.mjs +1 -0
- package/dist/definition-pkJ6szUl.d.mts +158 -0
- package/dist/drizzle-Eq8W1EbD.mjs +1 -0
- package/dist/event-Ca2yUf5i.mjs +1 -0
- package/dist/execution-target-CRPTfZlc.mjs +1 -0
- package/dist/extension-C-4BHMRI.mjs +1 -0
- package/dist/extension-CpIUgBKI.mjs +1 -0
- package/dist/extension-namespace-cMh_mMiL.mjs +1 -0
- package/dist/facet-BuwhrThl.mjs +1 -0
- package/dist/filesystem-service-B8rhBRgB.mjs +1 -0
- package/dist/filesystem-service-p_iJVHd4.d.mts +66 -0
- package/dist/git/index.d.mts +210 -0
- package/dist/git/index.mjs +18 -0
- package/dist/globby-rtWVaFHv.mjs +41 -0
- package/dist/handlers-CkTsQLra.mjs +41 -0
- package/dist/harness-BRCMcvQN.mjs +1 -0
- package/dist/hooks/index.d.mts +423 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/host-Br9VuOyr.mjs +1 -0
- package/dist/identity-Cz2IeEtm.mjs +1 -0
- package/dist/index-472sOmsW.d.mts +218 -0
- package/dist/index-8SZkg7s6.d.mts +353 -0
- package/dist/index-B3PK4FIn.d.mts +5116 -0
- package/dist/index-B80L4YqA.d.mts +180 -0
- package/dist/index-BFg9BUpx.d.mts +355 -0
- package/dist/index-BGfWS6GE.d.mts +483 -0
- package/dist/index-BVgfS-AJ.d.mts +109 -0
- package/dist/index-B_zQC98V.d.mts +995 -0
- package/dist/index-Bh_Ne7LF.d.mts +1008 -0
- package/dist/index-Bvb2mMH6.d.mts +1730 -0
- package/dist/index-CCGVh9BF2.d.mts +749 -0
- package/dist/index-CGmcS0Ma.d.mts +412 -0
- package/dist/index-CHQ1SqT0.d.mts +117 -0
- package/dist/index-CLpjm52M.d.mts +183 -0
- package/dist/index-Caig6TeF.d.mts +6746 -0
- package/dist/index-CelJCBjk.d.mts +2992 -0
- package/dist/index-ChunCFu4.d.mts +11 -0
- package/dist/index-Cm0dUkWL.d.mts +4651 -0
- package/dist/index-CokQYGVP.d.mts +184 -0
- package/dist/index-Cs0kZXIz2.d.mts +37 -0
- package/dist/index-D5d5HeWI2.d.mts +259 -0
- package/dist/index-D90OmGmV.d.mts +389 -0
- package/dist/index-D9MwJ2Q8.d.mts +67 -0
- package/dist/index-DANINzMu.d.mts +40 -0
- package/dist/index-DBw-89vC2.d.mts +3640 -0
- package/dist/index-DGBu6bHi2.d.mts +438 -0
- package/dist/index-DKC62dY5.d.mts +146 -0
- package/dist/index-DKia0MX1.d.mts +43 -0
- package/dist/index-DMKnON5s.d.mts +28 -0
- package/dist/index-DUaw0Dw8.d.mts +14747 -0
- package/dist/index-De3kPhlN.d.mts +72 -0
- package/dist/index-L4GjJDKb.d.mts +822 -0
- package/dist/index-U-A8eyGT.d.mts +1490 -0
- package/dist/index-eemAKwsB.d.mts +362 -0
- package/dist/index-mNec7V-9.d.mts +1075 -0
- package/dist/index-soFznFCy2.d.mts +89 -0
- package/dist/index-vtXJuwrz.d.mts +40 -0
- package/dist/index-x_lVDp_J.d.mts +134 -0
- package/dist/json-value-CmhSGMLv.mjs +1 -0
- package/dist/kernel/cli/index.d.mts +143 -0
- package/dist/kernel/cli/index.mjs +1 -0
- package/dist/kernel/cli/schemas.d.mts +64 -0
- package/dist/kernel/cli/schemas.mjs +1 -0
- package/dist/kernel/extension/index.d.mts +2 -0
- package/dist/kernel/extension/index.mjs +1 -0
- package/dist/kernel/index.d.mts +296 -0
- package/dist/kernel/index.mjs +1 -0
- package/dist/kernel/namespace/index.d.mts +2 -0
- package/dist/kernel/namespace/index.mjs +1 -0
- package/dist/kernel/observability/index.d.mts +2 -0
- package/dist/kernel/observability/index.mjs +1 -0
- package/dist/kernel/providers/index.d.mts +2 -0
- package/dist/kernel/providers/index.mjs +1 -0
- package/dist/kernel/window/index.d.mts +2 -0
- package/dist/kernel/window/index.mjs +1 -0
- package/dist/materialization-CuUBu4XI.mjs +1 -0
- package/dist/model-registry-CfXytvzx.mjs +1 -0
- package/dist/model-registry-Scn_MC2d.mjs +1 -0
- package/dist/namespace-5QQqbF-B.d.mts +3133 -0
- package/dist/namespace-BM7Djng9.d.mts +189 -0
- package/dist/namespace-BoD94mrN.mjs +1 -0
- package/dist/namespace-BwzZJqTV.mjs +1 -0
- package/dist/namespace-CFLAmQfh.mjs +1 -0
- package/dist/namespace-CTm3nEvh.d.mts +51 -0
- package/dist/namespace-CaaNnKcR.d.mts +921 -0
- package/dist/namespace-CaoZ3S78.d.mts +43 -0
- package/dist/namespace-CxhsoFUP.d.mts +607 -0
- package/dist/namespace-DD8Oiqo7.d.mts +580 -0
- package/dist/namespace-DLovh2Ws.d.mts +1313 -0
- package/dist/namespace-DgqkaOVu.d.mts +768 -0
- package/dist/namespace-DkRgbZYn.mjs +1 -0
- package/dist/namespace-Dr8K0MCp.d.mts +2047 -0
- package/dist/namespace-DuXK5AYN.mjs +1 -0
- package/dist/namespace-EQniz-Aw.d.mts +142 -0
- package/dist/namespace-IV1QK__V.d.mts +159 -0
- package/dist/namespace-LViZ-EQk.mjs +1 -0
- package/dist/namespace-TyiTsLFv.d.mts +3020 -0
- package/dist/namespace-Yna5-Pws.mjs +1 -0
- package/dist/namespace-xcmbQlxh.mjs +1 -0
- package/dist/native-session-supervisor-B1TnaPUF.mjs +1 -0
- package/dist/node/bus-server/index.d.mts +178 -0
- package/dist/node/bus-server/index.mjs +1 -0
- package/dist/node/bus-server/server-lifecycle.d.mts +2 -0
- package/dist/node/bus-server/server-lifecycle.mjs +1 -0
- package/dist/node/machine-identity/index.d.mts +85 -0
- package/dist/node/machine-identity/index.mjs +3 -0
- package/dist/node/transports/index.d.mts +1945 -0
- package/dist/node/transports/index.mjs +2 -0
- package/dist/orchestrator-shared-CIDiFJMD.mjs +1 -0
- package/dist/orchestrator-shared-Dfa7FMyw.d.mts +249 -0
- package/dist/package-DKVlsMP3.mjs +1 -0
- package/dist/platform-DZ7z-wXD.mjs +1 -0
- package/dist/profile-6ynCD5k3.mjs +1 -0
- package/dist/provider-context-CK6B4X_8.mjs +1 -0
- package/dist/providers/index.d.mts +135 -0
- package/dist/providers/index.mjs +1 -0
- package/dist/providers-namespace-DSEpli4A.d.mts +583 -0
- package/dist/providers-u8i15co9.mjs +1 -0
- package/dist/schema-CoyE6mPt.mjs +1 -0
- package/dist/schema-M5YTvSAG.d.mts +949 -0
- package/dist/schema-e0wU_lcV.mjs +1 -0
- package/dist/schema-introspection-Dn1jWQs1.mjs +1 -0
- package/dist/schemas-Bd0OjRQf.d.mts +46 -0
- package/dist/schemas-C46QfKzv.d.mts +459 -0
- package/dist/schemas-CDBSjg7o.d.mts +237 -0
- package/dist/schemas-CR1Rripy.mjs +1 -0
- package/dist/schemas-CVvwIfG4.mjs +1 -0
- package/dist/schemas-CaLhkkLn.mjs +1 -0
- package/dist/schemas-ClOOT1W6.d.mts +174 -0
- package/dist/schemas-DATniTHb.d.mts +182 -0
- package/dist/schemas-DE-GNmSD.mjs +1 -0
- package/dist/schemas-DVF1A4DF.d.mts +160 -0
- package/dist/schemas-DaRSfYLf.d.mts +73 -0
- package/dist/schemas-DiYVzG6e.d.mts +315 -0
- package/dist/schemas-hSrzflwZ.mjs +1 -0
- package/dist/schemas-j7ivZ2HI.d.mts +944 -0
- package/dist/schemas-jFe1AuI-.mjs +1 -0
- package/dist/schemas-wg_6PAdV.d.mts +153 -0
- package/dist/scoped-bus-04pwo1uM.mjs +1 -0
- package/dist/server-lifecycle-FXTPW39-.mjs +1 -0
- package/dist/server-lifecycle-YoSGFGnU.d.mts +160 -0
- package/dist/service-base/index.d.mts +98 -0
- package/dist/service-base/index.mjs +1 -0
- package/dist/services/adapter-runtime/index.d.mts +4 -0
- package/dist/services/adapter-runtime/index.mjs +1 -0
- package/dist/services/adapter-runtime/namespace.d.mts +2 -0
- package/dist/services/adapter-runtime/namespace.mjs +1 -0
- package/dist/services/adapter-runtime/schemas.d.mts +2 -0
- package/dist/services/adapter-runtime/schemas.mjs +1 -0
- package/dist/services/adapter-subsystem/index.d.mts +3 -0
- package/dist/services/adapter-subsystem/index.mjs +1 -0
- package/dist/services/adapter-subsystem/namespace.d.mts +2 -0
- package/dist/services/adapter-subsystem/namespace.mjs +1 -0
- package/dist/services/agent-runtime/index.d.mts +3 -0
- package/dist/services/agent-runtime/index.mjs +1 -0
- package/dist/services/agent-runtime/namespace.d.mts +2 -0
- package/dist/services/agent-runtime/namespace.mjs +1 -0
- package/dist/services/agent-runtime/schemas.d.mts +2 -0
- package/dist/services/agent-runtime/schemas.mjs +1 -0
- package/dist/services/capability/index.d.mts +2 -0
- package/dist/services/capability/index.mjs +1 -0
- package/dist/services/cli-detection/namespace.d.mts +56 -0
- package/dist/services/cli-detection/namespace.mjs +1 -0
- package/dist/services/codebase/index.d.mts +3 -0
- package/dist/services/codebase/index.mjs +1 -0
- package/dist/services/codebase/namespace.d.mts +2 -0
- package/dist/services/codebase/namespace.mjs +1 -0
- package/dist/services/codebase/schemas.d.mts +2 -0
- package/dist/services/codebase/schemas.mjs +1 -0
- package/dist/services/compression/index.d.mts +3 -0
- package/dist/services/compression/index.mjs +1 -0
- package/dist/services/compression/namespace.d.mts +2 -0
- package/dist/services/compression/namespace.mjs +1 -0
- package/dist/services/compression/schemas.d.mts +2 -0
- package/dist/services/compression/schemas.mjs +1 -0
- package/dist/services/context-rules/index.d.mts +412 -0
- package/dist/services/context-rules/index.mjs +1 -0
- package/dist/services/credential-change/index.d.mts +17 -0
- package/dist/services/credential-change/index.mjs +1 -0
- package/dist/services/definition/index.d.mts +2 -0
- package/dist/services/definition/index.mjs +1 -0
- package/dist/services/definition/namespace.d.mts +71 -0
- package/dist/services/definition/namespace.mjs +1 -0
- package/dist/services/definition/schemas.d.mts +38 -0
- package/dist/services/definition/schemas.mjs +1 -0
- package/dist/services/dialog/namespace.d.mts +105 -0
- package/dist/services/dialog/namespace.mjs +1 -0
- package/dist/services/dialog/schemas.d.mts +109 -0
- package/dist/services/dialog/schemas.mjs +1 -0
- package/dist/services/execution-target/index.d.mts +4 -0
- package/dist/services/execution-target/index.mjs +1 -0
- package/dist/services/execution-target/namespace.d.mts +2 -0
- package/dist/services/execution-target/namespace.mjs +1 -0
- package/dist/services/execution-target/schemas.d.mts +2 -0
- package/dist/services/execution-target/schemas.mjs +1 -0
- package/dist/services/filesystem/index.d.mts +3 -0
- package/dist/services/filesystem/index.mjs +1 -0
- package/dist/services/filesystem/namespace.d.mts +432 -0
- package/dist/services/filesystem/namespace.mjs +1 -0
- package/dist/services/filesystem/schemas.d.mts +240 -0
- package/dist/services/filesystem/schemas.mjs +1 -0
- package/dist/services/git/namespace.d.mts +1163 -0
- package/dist/services/git/namespace.mjs +1 -0
- package/dist/services/git/schemas.d.mts +932 -0
- package/dist/services/git/schemas.mjs +1 -0
- package/dist/services/harness/index.d.mts +861 -0
- package/dist/services/harness/index.mjs +1 -0
- package/dist/services/harness/storage/schema.d.mts +424 -0
- package/dist/services/harness/storage/schema.mjs +1 -0
- package/dist/services/index.d.mts +6185 -0
- package/dist/services/index.mjs +1 -0
- package/dist/services/local-notification/index.d.mts +25 -0
- package/dist/services/local-notification/index.mjs +1 -0
- package/dist/services/local-notification/namespace.d.mts +73 -0
- package/dist/services/local-notification/namespace.mjs +1 -0
- package/dist/services/local-notification/schemas.d.mts +88 -0
- package/dist/services/local-notification/schemas.mjs +1 -0
- package/dist/services/log-import/browser.d.mts +3 -0
- package/dist/services/log-import/browser.mjs +1 -0
- package/dist/services/log-import/index.d.mts +274 -0
- package/dist/services/log-import/index.mjs +2 -0
- package/dist/services/log-import/log-import.d.mts +3 -0
- package/dist/services/log-import/log-import.mjs +1 -0
- package/dist/services/log-import/namespace.d.mts +327 -0
- package/dist/services/log-import/namespace.mjs +1 -0
- package/dist/services/log-import/schemas.d.mts +217 -0
- package/dist/services/log-import/schemas.mjs +1 -0
- package/dist/services/model-registry/index.d.mts +2 -0
- package/dist/services/model-registry/index.mjs +1 -0
- package/dist/services/preferences/index.d.mts +3 -0
- package/dist/services/preferences/index.mjs +1 -0
- package/dist/services/preferences/schemas.d.mts +2 -0
- package/dist/services/preferences/schemas.mjs +1 -0
- package/dist/services/preferences/storage-namespace.d.mts +3 -0
- package/dist/services/preferences/storage-namespace.mjs +1 -0
- package/dist/services/provider-context/index.d.mts +2 -0
- package/dist/services/provider-context/index.mjs +1 -0
- package/dist/services/provider-runtime/index.d.mts +136 -0
- package/dist/services/provider-runtime/index.mjs +1 -0
- package/dist/services/session/handlers/index.d.mts +2 -0
- package/dist/services/session/handlers/index.mjs +1 -0
- package/dist/services/session/index.d.mts +10 -0
- package/dist/services/session/index.mjs +1 -0
- package/dist/services/session/messages/namespace.d.mts +2 -0
- package/dist/services/session/messages/namespace.mjs +1 -0
- package/dist/services/session/orchestrator-testing/index.d.mts +2 -0
- package/dist/services/session/orchestrator-testing/index.mjs +1 -0
- package/dist/services/session/session-events/namespace.d.mts +2 -0
- package/dist/services/session/session-events/namespace.mjs +1 -0
- package/dist/services/session/storage/namespace.d.mts +2 -0
- package/dist/services/session/storage/namespace.mjs +1 -0
- package/dist/services/session/storage/schema.d.mts +2 -0
- package/dist/services/session/storage/schema.mjs +1 -0
- package/dist/services/session/testing/index.d.mts +35 -0
- package/dist/services/session/testing/index.mjs +65 -0
- package/dist/services/session/testing/orchestrator-shared.d.mts +2 -0
- package/dist/services/session/testing/orchestrator-shared.mjs +1 -0
- package/dist/services/session/turns/namespace.d.mts +2 -0
- package/dist/services/session/turns/namespace.mjs +1 -0
- package/dist/services/session-editor/index.d.mts +119 -0
- package/dist/services/session-editor/index.mjs +1 -0
- package/dist/services/settings/index.d.mts +47 -0
- package/dist/services/settings/index.mjs +1 -0
- package/dist/services/settings/namespace.d.mts +663 -0
- package/dist/services/settings/namespace.mjs +1 -0
- package/dist/services/settings/storage/clients-namespace.d.mts +2 -0
- package/dist/services/settings/storage/clients-namespace.mjs +1 -0
- package/dist/services/settings/storage/extension-configs/namespace.d.mts +184 -0
- package/dist/services/settings/storage/extension-configs/namespace.mjs +1 -0
- package/dist/services/settings/storage/index.d.mts +4 -0
- package/dist/services/settings/storage/index.mjs +1 -0
- package/dist/services/settings/storage/providers-namespace.d.mts +2 -0
- package/dist/services/settings/storage/providers-namespace.mjs +1 -0
- package/dist/services/subagent/index.d.mts +2 -0
- package/dist/services/subagent/index.mjs +1 -0
- package/dist/services/subagent-template/index.d.mts +3 -0
- package/dist/services/subagent-template/index.mjs +1 -0
- package/dist/services/subagent-template/namespace.d.mts +2 -0
- package/dist/services/subagent-template/namespace.mjs +1 -0
- package/dist/services/subagent-template/schemas.d.mts +2 -0
- package/dist/services/subagent-template/schemas.mjs +1 -0
- package/dist/services/tool-approval/index.d.mts +2 -0
- package/dist/services/tool-approval/index.mjs +1 -0
- package/dist/services/tools/index.d.mts +2 -0
- package/dist/services/tools/index.mjs +1 -0
- package/dist/services/tray-menu/index.d.mts +4 -0
- package/dist/services/tray-menu/index.mjs +1 -0
- package/dist/services/tray-menu/namespace.d.mts +2 -0
- package/dist/services/tray-menu/namespace.mjs +1 -0
- package/dist/services/tray-menu/schemas.d.mts +2 -0
- package/dist/services/tray-menu/schemas.mjs +1 -0
- package/dist/services/turn/index.d.mts +2 -0
- package/dist/services/turn/index.mjs +1 -0
- package/dist/services/turn/namespace.d.mts +2 -0
- package/dist/services/turn/namespace.mjs +1 -0
- package/dist/services/turn/schemas.d.mts +335 -0
- package/dist/services/turn/schemas.mjs +1 -0
- package/dist/session-BoldSdNZ2.mjs +134 -0
- package/dist/session-DuVOYctZ.mjs +1 -0
- package/dist/session-lineage-CRsc9g1x.d.mts +65 -0
- package/dist/shared-DpOEfD8F.mjs +1 -0
- package/dist/shared-schemas-CPShiLNp.mjs +1 -0
- package/dist/skill-CQO4mDqK.mjs +1 -0
- package/dist/storage/drizzle/client.d.mts +78 -0
- package/dist/storage/drizzle/client.mjs +1 -0
- package/dist/storage/drizzle/index.d.mts +137 -0
- package/dist/storage/drizzle/index.mjs +1 -0
- package/dist/storage/handlers/drizzle/index.d.mts +2 -0
- package/dist/storage/handlers/drizzle/index.mjs +1 -0
- package/dist/storage/handlers/index.d.mts +33 -0
- package/dist/storage/handlers/index.mjs +1 -0
- package/dist/storage/index.d.mts +192 -0
- package/dist/storage/index.mjs +1 -0
- package/dist/storage-namespace-BXkoh5Sy.d.mts +221 -0
- package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
- package/dist/storage-namespace-definition-Bkx5rSto.d.mts +17 -0
- package/dist/storage-namespace-definition-CqSdsuCC.mjs +1 -0
- package/dist/style.css +3782 -0
- package/dist/telemetry-CvdLBWuk.mjs +1 -0
- package/dist/testing/drizzle-harness.d.mts +130 -0
- package/dist/testing/drizzle-harness.mjs +1 -0
- package/dist/testing/index.d.mts +106 -0
- package/dist/testing/index.mjs +1 -0
- package/dist/timeout-XsYIOKrc.mjs +1 -0
- package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
- package/dist/tools/index.d.mts +835 -0
- package/dist/tools/index.mjs +1 -0
- package/dist/tools/testing/index.d.mts +53 -0
- package/dist/tools/testing/index.mjs +1 -0
- package/dist/tools-D-luYcDw.mjs +1431 -0
- package/dist/tray-menu-service-DuXq5k22.mjs +1 -0
- package/dist/types-BCMUtBj1.d.mts +1106 -0
- package/dist/types-C2Ob9zz_.d.mts +128 -0
- package/dist/types-CCdqjeuH.d.mts +262 -0
- package/dist/types-DZHvOc_Q.d.mts +305 -0
- package/dist/types-Dy3YTcTF.d.mts +6777 -0
- package/dist/types-MfJZ67e9.d.mts +315 -0
- package/dist/types-dyP-bXXE.d.mts +31 -0
- package/dist/ui-components/index.d.mts +2342 -0
- package/dist/ui-components/index.mjs +8 -0
- package/dist/ui-config-9bDRwFZr.mjs +1 -0
- package/dist/ui-hooks/index.d.mts +1915 -0
- package/dist/ui-hooks/index.mjs +1 -0
- package/dist/ui-kernel/index.d.mts +2793 -0
- package/dist/ui-kernel/index.mjs +1 -0
- package/dist/ui-kernel/pages/namespace.d.mts +88 -0
- package/dist/ui-kernel/pages/namespace.mjs +1 -0
- package/dist/ui-kernel/pages/schemas.d.mts +2 -0
- package/dist/ui-kernel/pages/schemas.mjs +1 -0
- package/dist/ui-views/index.d.mts +487 -0
- package/dist/ui-views/index.mjs +30 -0
- package/dist/utils/health-probe.d.mts +26 -0
- package/dist/utils/health-probe.mjs +1 -0
- package/dist/utils/index.d.mts +262 -0
- package/dist/utils/index.mjs +2 -0
- package/dist/utils/keychain.d.mts +31 -0
- package/dist/utils/keychain.mjs +1 -0
- package/dist/utils/project-manifest.d.mts +130 -0
- package/dist/utils/project-manifest.mjs +1 -0
- package/dist/utils/resolve-package-root.d.mts +12 -0
- package/dist/utils/resolve-package-root.mjs +1 -0
- package/dist/utils/scope-paths.d.mts +33 -0
- package/dist/utils/scope-paths.mjs +1 -0
- package/dist/utils/workspace-packages.d.mts +59 -0
- package/dist/utils/workspace-packages.mjs +1 -0
- package/dist/utils/workspace-root.d.mts +24 -0
- package/dist/utils/workspace-root.mjs +2 -0
- package/dist/variant-CT6XBP6T.mjs +1 -0
- package/dist/version-BeT3ASEe.mjs +1 -0
- package/dist/visibility-Cb62p9bv.mjs +1 -0
- package/dist/window-registry-CBcrGTv4.d.mts +130 -0
- package/dist/window-registry-DW-dKRjQ.mjs +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { t as MakaioDatabase } from "../../types-dyP-bXXE.mjs";
|
|
2
|
+
import { IMakaioBus } from "@makaio/framework/bus";
|
|
3
|
+
import { ExtensionContext } from "@makaio/framework/contracts";
|
|
4
|
+
import { Table } from "drizzle-orm";
|
|
5
|
+
import { StorageNamespace, StorageNamespaceConfig, StorageNamespaceExtensions, createStorageNamespace } from "@makaio/framework/storage";
|
|
6
|
+
|
|
7
|
+
//#region storage/drizzle/src/transaction.d.ts
|
|
8
|
+
type LibSQLTransactionExecutor = MakaioDatabase['transaction'];
|
|
9
|
+
/**
|
|
10
|
+
* Transaction callback that receives Drizzle's transaction context.
|
|
11
|
+
*
|
|
12
|
+
* Typed against the libsql async transaction context, which is the widest
|
|
13
|
+
* compatible contract. Callbacks written against this type work on both the
|
|
14
|
+
* libsql (Node.js) and bun-sqlite (Bun) drivers because `await syncValue` is
|
|
15
|
+
* a JavaScript no-op.
|
|
16
|
+
* @typeParam T - Callback result type
|
|
17
|
+
*/
|
|
18
|
+
type TransactionCallback<T> = Parameters<LibSQLTransactionExecutor>[0] extends ((tx: infer TTx) => Promise<unknown>) ? (tx: TTx) => Promise<T> : never;
|
|
19
|
+
/**
|
|
20
|
+
* Execute a database transaction through a shared transaction seam.
|
|
21
|
+
*
|
|
22
|
+
* Transaction work is serialized per database instance. SQLite permits only
|
|
23
|
+
* one active transaction on a connection; without this queue, concurrent bus
|
|
24
|
+
* handlers can fail at `BEGIN` with SQLITE_BUSY before busy_timeout can help.
|
|
25
|
+
*
|
|
26
|
+
* **Driver compatibility:** `MakaioDatabase` is typed as `LibSQLDatabase`
|
|
27
|
+
* (Node.js async dialect), which runs the transaction asynchronously and
|
|
28
|
+
* returns `Promise<T>`. At runtime under Bun, `db` is a `BunSQLiteDatabase`
|
|
29
|
+
* cast to `MakaioDatabase`; the sync dialect propagates the async callback's
|
|
30
|
+
* return value, so the transaction still resolves as `Promise<T>`, which
|
|
31
|
+
* `await` unwraps normally.
|
|
32
|
+
* @param db - Makaio database instance
|
|
33
|
+
* @param callback - Transaction work to execute
|
|
34
|
+
* @returns Result returned by the callback
|
|
35
|
+
*/
|
|
36
|
+
declare function executeTransaction<T>(db: MakaioDatabase, callback: TransactionCallback<T>): Promise<T>;
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region storage/drizzle/src/fts.d.ts
|
|
39
|
+
/**
|
|
40
|
+
* FTS5 query utilities for SQLite full-text search.
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Sanitizes a user query for safe use in FTS5 MATCH expressions.
|
|
44
|
+
*
|
|
45
|
+
* Each whitespace-delimited token is individually quoted to prevent FTS5
|
|
46
|
+
* syntax injection (via operators like `OR`, `AND`, `NOT`, `*`, `^`) while
|
|
47
|
+
* preserving multi-term implicit AND matching. Internal double-quote
|
|
48
|
+
* characters are escaped as two consecutive double quotes per the FTS5
|
|
49
|
+
* phrase-quoting convention.
|
|
50
|
+
* @example
|
|
51
|
+
* sanitizeFtsQuery('typescript generics') // → '"typescript" "generics"'
|
|
52
|
+
* sanitizeFtsQuery('a "broken quote') // → '"a" """broken" "quote"'
|
|
53
|
+
* sanitizeFtsQuery('') // → '""'
|
|
54
|
+
* @param query - Raw user input
|
|
55
|
+
* @returns Sanitized FTS5 query string with each token individually quoted
|
|
56
|
+
*/
|
|
57
|
+
declare function sanitizeFtsQuery(query: string): string;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region storage/drizzle/src/result.d.ts
|
|
60
|
+
/**
|
|
61
|
+
* Cross-driver result helpers for Drizzle write operations.
|
|
62
|
+
*
|
|
63
|
+
* The libsql dialect returns `{ rowsAffected: number }` while the bun-sqlite
|
|
64
|
+
* dialect returns `{ changes: number }`. Consumers must not depend on either
|
|
65
|
+
* field directly — use {@link didAffectRows} to normalise across drivers.
|
|
66
|
+
* @packageDocumentation
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* Shape emitted by Drizzle write operations across all supported drivers.
|
|
70
|
+
*
|
|
71
|
+
* The libsql (Node.js) driver populates `rowsAffected`; the bun-sqlite driver
|
|
72
|
+
* populates `changes`. Both may be present when a future driver version unifies
|
|
73
|
+
* the surface; either being absent is normal.
|
|
74
|
+
*/
|
|
75
|
+
interface DrizzleWriteResult {
|
|
76
|
+
readonly rowsAffected?: number | null;
|
|
77
|
+
readonly changes?: number | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Determine whether a Drizzle write operation mutated at least one row.
|
|
81
|
+
*
|
|
82
|
+
* Normalises the driver-specific result shape so callers do not need to know
|
|
83
|
+
* which SQLite dialect is active at runtime.
|
|
84
|
+
* @param result - Write result from a Drizzle `insert`, `update`, or `delete`.
|
|
85
|
+
* @returns `true` when one or more rows were affected.
|
|
86
|
+
*/
|
|
87
|
+
declare function didAffectRows(result: DrizzleWriteResult): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Extract the affected row count from a Drizzle write result.
|
|
90
|
+
*
|
|
91
|
+
* Returns the driver-appropriate count regardless of whether the libsql or
|
|
92
|
+
* bun-sqlite dialect is active.
|
|
93
|
+
* @param result - Write result from a Drizzle `insert`, `update`, or `delete`.
|
|
94
|
+
* @returns Number of affected rows, defaulting to `0` when neither field is set.
|
|
95
|
+
*/
|
|
96
|
+
declare function affectedRowCount(result: DrizzleWriteResult): number;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region storage/drizzle/src/register-handlers.d.ts
|
|
99
|
+
/**
|
|
100
|
+
* Typed storage handler registration callback with `db` narrowed to
|
|
101
|
+
* {@link MakaioDatabase}.
|
|
102
|
+
*
|
|
103
|
+
* Use this as the argument type for your handler registration function when
|
|
104
|
+
* wrapping it with {@link registerDrizzleHandlers}.
|
|
105
|
+
* @typeParam TSchema - Drizzle table schema record. Defaults to an empty schema.
|
|
106
|
+
*/
|
|
107
|
+
type DrizzleHandlerRegistration<TSchema extends Record<string, unknown> = Record<string, never>> = (bus: IMakaioBus, db: MakaioDatabase<TSchema>, ctx: ExtensionContext) => (() => void) | void;
|
|
108
|
+
/**
|
|
109
|
+
* Wraps a typed Drizzle handler registration into the
|
|
110
|
+
* `(bus, db: unknown, ctx) => ...` shape required by
|
|
111
|
+
* {@link MakaioExtension.storage.registerHandlers}.
|
|
112
|
+
*
|
|
113
|
+
* The single `db as MakaioDatabase` cast lives here — at the Drizzle
|
|
114
|
+
* boundary — so package authors receive a fully-typed `db` without
|
|
115
|
+
* repeating the unsafe cast at every registration site.
|
|
116
|
+
* @param registration - Typed handler registration callback.
|
|
117
|
+
* @returns Opaque callback compatible with the contracts-layer signature.
|
|
118
|
+
*/
|
|
119
|
+
declare function registerDrizzleHandlers<TSchema extends Record<string, unknown> = Record<string, never>>(registration: DrizzleHandlerRegistration<TSchema>): (bus: IMakaioBus, db: unknown, ctx: ExtensionContext) => (() => void) | void;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region storage/drizzle/src/index.d.ts
|
|
122
|
+
/**
|
|
123
|
+
* Drizzle schema record type.
|
|
124
|
+
* Maps table names to Drizzle table definitions.
|
|
125
|
+
*/
|
|
126
|
+
type DrizzleSchemaRecord = Record<string, Table>;
|
|
127
|
+
declare module '@makaio/framework/storage' {
|
|
128
|
+
interface StorageNamespaceExtensions {
|
|
129
|
+
/**
|
|
130
|
+
* Drizzle ORM table schemas for this storage domain.
|
|
131
|
+
* Contains table definitions that can be used by Drizzle-based storage services.
|
|
132
|
+
*/
|
|
133
|
+
drizzle?: DrizzleSchemaRecord;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//#endregion
|
|
137
|
+
export { type DrizzleHandlerRegistration, DrizzleSchemaRecord, type MakaioDatabase, type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceExtensions, type TransactionCallback, affectedRowCount, createStorageNamespace, didAffectRows, executeTransaction, registerDrizzleHandlers, sanitizeFtsQuery };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createStorageNamespace as e}from"@makaio/framework/storage";async function t(e,t){let r=n.get(e)??Promise.resolve(),i=()=>{},a=new Promise(e=>{i=e}),o=r.catch(()=>void 0).then(()=>a);n.set(e,o),await r.catch(()=>void 0);try{return await e.transaction(t)}finally{i(),n.get(e)===o&&n.delete(e)}}const n=new WeakMap;function r(e){let t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?`""`:t.map(e=>`"${e.replace(/"/g,`""`)}"`).join(` `)}function i(e){return(e.rowsAffected??e.changes??0)>0}function a(e){return e.rowsAffected??e.changes??0}function o(e){return(t,n,r)=>e(t,n,r)}export{a as affectedRowCount,e as createStorageNamespace,i as didAffectRows,t as executeTransaction,o as registerDrizzleHandlers,r as sanitizeFtsQuery};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../../index-CokQYGVP.mjs";
|
|
2
|
+
export { CrudLifecycleConfig, DrizzleCrudConfig, DrizzleListConfig, buildScopePredicates, createDrizzleCrudHandlers, createDrizzleListHandler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"../../../drizzle-Eq8W1EbD.mjs";export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../index-CokQYGVP.mjs";
|
|
2
|
+
|
|
3
|
+
//#region storage/handlers/src/utils.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Convert null values to undefined for specified keys.
|
|
6
|
+
* Used when mapping database rows to API types.
|
|
7
|
+
* @param obj - Source object with nullable fields
|
|
8
|
+
* @param keys - Keys to convert from null to undefined
|
|
9
|
+
* @returns New object with null converted to undefined for specified keys
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* const dbRow = { id: '1', name: 'test', description: null, value: 42 };
|
|
13
|
+
* const result = nullToUndefined(dbRow, ['description']);
|
|
14
|
+
* // { id: '1', name: 'test', description: undefined, value: 42 }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
declare function nullToUndefined<T extends Record<string, unknown>>(obj: T, keys: (keyof T)[]): T;
|
|
18
|
+
/**
|
|
19
|
+
* Convert undefined values to null for specified keys.
|
|
20
|
+
* Used when mapping API inputs to database values.
|
|
21
|
+
* @param obj - Source object with optional fields
|
|
22
|
+
* @param keys - Keys to convert from undefined to null
|
|
23
|
+
* @returns New object with undefined converted to null for specified keys
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const apiInput = { id: '1', name: 'test', description: undefined, value: 42 };
|
|
27
|
+
* const result = undefinedToNull(apiInput, ['description']);
|
|
28
|
+
* // { id: '1', name: 'test', description: null, value: 42 }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
declare function undefinedToNull<T extends Record<string, unknown>>(obj: T, keys: (keyof T)[]): T;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { type CrudLifecycleConfig, type DrizzleCrudConfig, type DrizzleListConfig, buildScopePredicates, createDrizzleCrudHandlers, createDrizzleListHandler, nullToUndefined, undefinedToNull };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,r as t,t as n}from"../../drizzle-Eq8W1EbD.mjs";function r(e,t){let n={...e};for(let e of t)n[e]===null&&(n[e]=void 0);return n}function i(e,t){let n={...e};for(let e of t)n[e]===void 0&&(n[e]=null);return n}export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler,r as nullToUndefined,i as undefinedToNull};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { BusNamespaceDefinition, FilterablePayloadIntersection, SchemaRecord, SubjectRecord, SubjectRecordFromSchemaRecord } from "@makaio/framework/core";
|
|
2
|
+
import { BusNamespace } from "@makaio/framework/bus";
|
|
3
|
+
|
|
4
|
+
//#region storage/core/src/types.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Extension point for storage namespace extensions.
|
|
7
|
+
*
|
|
8
|
+
* Use declaration merging to add ORM-specific properties:
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* // In @makaio/storage-drizzle
|
|
12
|
+
* declare module '@makaio/framework/storage' {
|
|
13
|
+
* interface StorageNamespaceExtensions {
|
|
14
|
+
* drizzle?: Record<string, Table>;
|
|
15
|
+
* }
|
|
16
|
+
* }
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
interface StorageNamespaceExtensions {}
|
|
20
|
+
/**
|
|
21
|
+
* Storage namespace combines bus namespace with extensible storage-specific properties.
|
|
22
|
+
*
|
|
23
|
+
* Wraps BusNamespace with:
|
|
24
|
+
* - Automatic 'storage:' prefix for domain naming
|
|
25
|
+
* - Extension point for ORM schemas via declaration merging
|
|
26
|
+
* @typeParam N - Storage domain name (without 'storage:' prefix)
|
|
27
|
+
* @typeParam Subjects - Subject record type from schemas
|
|
28
|
+
* @typeParam FilterPayload - Filter payload type for type-safe filtering
|
|
29
|
+
* @typeParam Ext - Extension type preserving specific table types
|
|
30
|
+
* @typeParam Schemas - Original schema record; drives narrow literal types on subjects.$meta
|
|
31
|
+
*/
|
|
32
|
+
interface StorageNamespace<N extends string = string, Subjects extends SubjectRecord = SubjectRecord, FilterPayload = unknown, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions, Schemas extends SchemaRecord = SchemaRecord> extends BusNamespace<`storage:${N}`, Subjects, FilterPayload, Schemas> {
|
|
33
|
+
/**
|
|
34
|
+
* Storage domain name (without 'storage:' prefix).
|
|
35
|
+
*/
|
|
36
|
+
readonly domain: N;
|
|
37
|
+
/**
|
|
38
|
+
* Extension properties added via declaration merging.
|
|
39
|
+
* @see StorageNamespaceExtensions
|
|
40
|
+
*/
|
|
41
|
+
readonly extensions: Ext;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Configuration for creating a storage namespace.
|
|
45
|
+
* @typeParam Schemas - Schema record type for bus subjects
|
|
46
|
+
* @typeParam Ext - Extension type preserving specific table types
|
|
47
|
+
*/
|
|
48
|
+
interface StorageNamespaceConfig<Schemas extends SchemaRecord, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions> {
|
|
49
|
+
/**
|
|
50
|
+
* Bus subject schemas for storage operations.
|
|
51
|
+
* Typically includes get, set, delete, list operations.
|
|
52
|
+
*/
|
|
53
|
+
schemas: Schemas;
|
|
54
|
+
/**
|
|
55
|
+
* Extension properties (populated by declaration merging).
|
|
56
|
+
* @see StorageNamespaceExtensions
|
|
57
|
+
*/
|
|
58
|
+
extensions?: Ext;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Infer the storage namespace type from config.
|
|
62
|
+
*/
|
|
63
|
+
type StorageNamespaceFromConfig<N extends string, Schemas extends SchemaRecord> = StorageNamespace<N, SubjectRecordFromSchemaRecord<Schemas>, FilterablePayloadIntersection<SubjectRecordFromSchemaRecord<Schemas>>, StorageNamespaceExtensions, Schemas>;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region storage/core/src/create-storage-namespace-definition.d.ts
|
|
66
|
+
/**
|
|
67
|
+
* A declarative storage namespace definition.
|
|
68
|
+
*
|
|
69
|
+
* Created by {@link createStorageNamespaceDefinition}. Extends
|
|
70
|
+
* {@link BusNamespaceDefinition} with storage-specific fields (`domain`,
|
|
71
|
+
* `extensions`) and carries typed subject tokens for immediate use in bus
|
|
72
|
+
* operations. Registration is deferred until
|
|
73
|
+
* `createStorageNamespace(definition)` is called at a composition root.
|
|
74
|
+
* @typeParam N - Storage domain name without the `'storage:'` prefix
|
|
75
|
+
* @typeParam Schemas - Schema record mapping subject keys to Zod schemas
|
|
76
|
+
* @typeParam Ext - Extension type preserving specific ORM table types
|
|
77
|
+
*/
|
|
78
|
+
interface StorageNamespaceDefinition<N extends string = string, Schemas extends SchemaRecord = SchemaRecord, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions> extends BusNamespaceDefinition<`storage:${N}`, Schemas> {
|
|
79
|
+
/**
|
|
80
|
+
* Storage domain name without the `'storage:'` prefix (e.g., `'session'`).
|
|
81
|
+
*/
|
|
82
|
+
readonly domain: N;
|
|
83
|
+
/**
|
|
84
|
+
* Extension properties added via declaration merging.
|
|
85
|
+
* @see StorageNamespaceExtensions
|
|
86
|
+
*/
|
|
87
|
+
readonly extensions: Ext;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Creates a storage namespace definition with typed subject tokens.
|
|
91
|
+
*
|
|
92
|
+
* Pure function — no side-effects, no bus singleton mutation. The returned
|
|
93
|
+
* definition can be used immediately for bus operations (`bus.on()`,
|
|
94
|
+
* `bus.emit()`, etc.) and registered later at a composition root via
|
|
95
|
+
* `createStorageNamespace(definition)`.
|
|
96
|
+
* @param domain - Storage domain name without the `'storage:'` prefix
|
|
97
|
+
* (e.g., `'session'` becomes `'storage:session'`)
|
|
98
|
+
* @param config - Namespace configuration with schemas and optional extensions
|
|
99
|
+
* @returns Storage namespace definition with typed subject tokens and carried
|
|
100
|
+
* schemas
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* import { createStorageNamespaceDefinition } from '@makaio/framework/storage';
|
|
104
|
+
* import { z } from 'zod';
|
|
105
|
+
*
|
|
106
|
+
* export const SessionStorageDefinition = createStorageNamespaceDefinition('session', {
|
|
107
|
+
* schemas: {
|
|
108
|
+
* get: { request: z.object({ sessionId: z.string() }), response: SessionSchema },
|
|
109
|
+
* set: { request: z.object({ sessionId: z.string(), session: SessionSchema }), response: SuccessSchema },
|
|
110
|
+
* },
|
|
111
|
+
* });
|
|
112
|
+
*
|
|
113
|
+
* // Subjects are immediately available without registration:
|
|
114
|
+
* bus.on(SessionStorageDefinition.subjects.get, handler);
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
declare function createStorageNamespaceDefinition<N extends string, Schemas extends SchemaRecord, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions>(domain: N, config: StorageNamespaceConfig<Schemas, Ext>): StorageNamespaceDefinition<N, Schemas, Ext>;
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region storage/core/src/create-storage-namespace.d.ts
|
|
120
|
+
/**
|
|
121
|
+
* Registers a storage namespace definition on the bus singleton.
|
|
122
|
+
*
|
|
123
|
+
* Accepts a {@link StorageNamespaceDefinition} created by
|
|
124
|
+
* {@link createStorageNamespaceDefinition} and registers it with
|
|
125
|
+
* `MakaioBus.registerNamespace()`. Returns a {@link StorageNamespace} that
|
|
126
|
+
* additionally exposes `scopedBus()` for scoped bus operations.
|
|
127
|
+
*
|
|
128
|
+
* Call this function at composition roots (app entry-points, service
|
|
129
|
+
* constructors) — never in module scope where the bus singleton may not yet
|
|
130
|
+
* be ready.
|
|
131
|
+
* @param definition - Storage namespace definition created by
|
|
132
|
+
* `createStorageNamespaceDefinition()`
|
|
133
|
+
* @returns Storage namespace with typed subjects, `scopedBus()`, and
|
|
134
|
+
* extensions
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* // At module level (pure, no side-effects):
|
|
138
|
+
* export const SessionStorageDefinition = createStorageNamespaceDefinition('session', {
|
|
139
|
+
* schemas: {
|
|
140
|
+
* get: { request: z.object({ id: z.string() }), response: z.object({ data: DataSchema }) },
|
|
141
|
+
* set: { request: z.object({ id: z.string(), data: DataSchema }), response: z.object({ success: z.boolean() }) },
|
|
142
|
+
* },
|
|
143
|
+
* });
|
|
144
|
+
*
|
|
145
|
+
* // At composition root (registers on the bus):
|
|
146
|
+
* const SessionStorage = createStorageNamespace(SessionStorageDefinition);
|
|
147
|
+
* await bus.request(SessionStorage.subjects.get, { id: '123' });
|
|
148
|
+
* ```
|
|
149
|
+
*/
|
|
150
|
+
declare function createStorageNamespace<N extends string, Schemas extends SchemaRecord, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions>(definition: StorageNamespaceDefinition<N, Schemas, Ext>): StorageNamespace<N, SubjectRecordFromSchemaRecord<Schemas>, FilterablePayloadIntersection<SubjectRecordFromSchemaRecord<Schemas>>, Ext, Schemas>;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region storage/core/src/create-extension-storage-namespace.d.ts
|
|
153
|
+
type Whitespace = ' ' | '\n' | '\r' | '\t' | '\v' | '\f' | '\u00A0' | '\u1680' | '\u2000' | '\u2001' | '\u2002' | '\u2003' | '\u2004' | '\u2005' | '\u2006' | '\u2007' | '\u2008' | '\u2009' | '\u200A' | '\u2028' | '\u2029' | '\u202F' | '\u205F' | '\u3000' | '\uFEFF';
|
|
154
|
+
type TrimLeft<T extends string> = T extends `${Whitespace}${infer Rest}` ? TrimLeft<Rest> : T;
|
|
155
|
+
type TrimRight<T extends string> = T extends `${infer Rest}${Whitespace}` ? TrimRight<Rest> : T;
|
|
156
|
+
type Trim<T extends string> = string extends T ? string : TrimLeft<TrimRight<T>>;
|
|
157
|
+
/**
|
|
158
|
+
* Creates a storage namespace for an extension with typed subject definitions.
|
|
159
|
+
*
|
|
160
|
+
* Pure wrapper around {@link createStorageNamespaceDefinition} that:
|
|
161
|
+
* - Automatically prepends `'extension:'` to the extension name before
|
|
162
|
+
* creating the storage namespace
|
|
163
|
+
* - Results in namespaces like `'storage:extension:terminal'`
|
|
164
|
+
* - Preserves all storage namespace capabilities (ORM extensions, type-safe
|
|
165
|
+
* filtering)
|
|
166
|
+
* @param extensionName - Extension name (e.g., `'terminal'` becomes
|
|
167
|
+
* `'storage:extension:terminal'`)
|
|
168
|
+
* @param config - Storage namespace configuration with schemas and optional
|
|
169
|
+
* extensions
|
|
170
|
+
* @returns Storage namespace with typed subjects and extensions
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* // Basic usage
|
|
174
|
+
* const TerminalStorage = createExtensionStorageNamespace('terminal', {
|
|
175
|
+
* schemas: {
|
|
176
|
+
* get: { request: z.object({ id: z.string() }), response: z.object({ data: DataSchema }) },
|
|
177
|
+
* set: { request: z.object({ id: z.string(), data: DataSchema }), response: z.object({ success: z.boolean() }) },
|
|
178
|
+
* },
|
|
179
|
+
* });
|
|
180
|
+
*
|
|
181
|
+
* // With drizzle extension (after importing @makaio/storage-drizzle)
|
|
182
|
+
* const TerminalStorage = createExtensionStorageNamespace('terminal', {
|
|
183
|
+
* schemas: { ... },
|
|
184
|
+
* extensions: {
|
|
185
|
+
* drizzle: { terminals: terminalsTable },
|
|
186
|
+
* },
|
|
187
|
+
* });
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
declare function createExtensionStorageNamespace<N extends string, Schemas extends SchemaRecord, Ext extends StorageNamespaceExtensions = StorageNamespaceExtensions>(extensionName: N, config: StorageNamespaceConfig<Schemas, Ext>): StorageNamespaceDefinition<`extension:${Trim<N>}`, Schemas, Ext>;
|
|
191
|
+
//#endregion
|
|
192
|
+
export { type StorageNamespace, type StorageNamespaceConfig, type StorageNamespaceDefinition, type StorageNamespaceExtensions, type StorageNamespaceFromConfig, createExtensionStorageNamespace, createStorageNamespace, createStorageNamespaceDefinition };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createBusNamespace as e}from"@makaio/framework/core";import{MakaioBus as t}from"@makaio/framework/bus";function n(e){return{...t.registerNamespace(e),domain:e.domain,extensions:e.extensions}}function r(t,n){return{...e(`storage:${t}`,n.schemas),domain:t,extensions:n.extensions??{}}}function i(e,t){let n=e.trim();if(n.length===0||n.startsWith(`extension:`))throw Error(`Invalid extensionName: expected a non-empty extension name without the "extension:" prefix.`);return r(`extension:${n}`,t)}export{i as createExtensionStorageNamespace,n as createStorageNamespace,r as createStorageNamespaceDefinition};
|
|
@@ -0,0 +1,221 @@
|
|
|
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 services/core/src/preferences/storage-namespace.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Preferences namespace definition.
|
|
8
|
+
*/
|
|
9
|
+
declare const PreferencesNamespace: _$_makaio_core0.BusNamespaceDefinition<"preferences", {
|
|
10
|
+
get: {
|
|
11
|
+
request: _$zod.ZodObject<{
|
|
12
|
+
key: _$zod.ZodObject<{
|
|
13
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
14
|
+
ui: "ui";
|
|
15
|
+
app: "app";
|
|
16
|
+
}>>;
|
|
17
|
+
scope: _$zod.ZodString;
|
|
18
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
19
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
20
|
+
mobile: "mobile";
|
|
21
|
+
desktop: "desktop";
|
|
22
|
+
tablet: "tablet";
|
|
23
|
+
}>>;
|
|
24
|
+
}, _$zod_v4_core0.$strip>;
|
|
25
|
+
category: _$zod.ZodString;
|
|
26
|
+
}, _$zod_v4_core0.$strip>;
|
|
27
|
+
response: _$zod.ZodObject<{
|
|
28
|
+
value: _$zod.ZodNullable<_$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>>;
|
|
29
|
+
}, _$zod_v4_core0.$strip>;
|
|
30
|
+
};
|
|
31
|
+
set: {
|
|
32
|
+
request: _$zod.ZodObject<{
|
|
33
|
+
key: _$zod.ZodObject<{
|
|
34
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
35
|
+
ui: "ui";
|
|
36
|
+
app: "app";
|
|
37
|
+
}>>;
|
|
38
|
+
scope: _$zod.ZodString;
|
|
39
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
40
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
41
|
+
mobile: "mobile";
|
|
42
|
+
desktop: "desktop";
|
|
43
|
+
tablet: "tablet";
|
|
44
|
+
}>>;
|
|
45
|
+
}, _$zod_v4_core0.$strip>;
|
|
46
|
+
category: _$zod.ZodString;
|
|
47
|
+
value: _$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
|
|
48
|
+
}, _$zod_v4_core0.$strip>;
|
|
49
|
+
response: _$zod.ZodObject<{
|
|
50
|
+
success: _$zod.ZodBoolean;
|
|
51
|
+
}, _$zod_v4_core0.$strip>;
|
|
52
|
+
};
|
|
53
|
+
delete: {
|
|
54
|
+
request: _$zod.ZodObject<{
|
|
55
|
+
key: _$zod.ZodObject<{
|
|
56
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
57
|
+
ui: "ui";
|
|
58
|
+
app: "app";
|
|
59
|
+
}>>;
|
|
60
|
+
scope: _$zod.ZodString;
|
|
61
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
62
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
63
|
+
mobile: "mobile";
|
|
64
|
+
desktop: "desktop";
|
|
65
|
+
tablet: "tablet";
|
|
66
|
+
}>>;
|
|
67
|
+
}, _$zod_v4_core0.$strip>;
|
|
68
|
+
category: _$zod.ZodString;
|
|
69
|
+
}, _$zod_v4_core0.$strip>;
|
|
70
|
+
response: _$zod.ZodObject<{
|
|
71
|
+
success: _$zod.ZodBoolean;
|
|
72
|
+
}, _$zod_v4_core0.$strip>;
|
|
73
|
+
};
|
|
74
|
+
list: {
|
|
75
|
+
request: _$zod.ZodObject<{
|
|
76
|
+
key: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
77
|
+
surface: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodEnum<{
|
|
78
|
+
ui: "ui";
|
|
79
|
+
app: "app";
|
|
80
|
+
}>>>;
|
|
81
|
+
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
82
|
+
context: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
|
|
83
|
+
viewport: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodEnum<{
|
|
84
|
+
mobile: "mobile";
|
|
85
|
+
desktop: "desktop";
|
|
86
|
+
tablet: "tablet";
|
|
87
|
+
}>>>;
|
|
88
|
+
}, _$zod_v4_core0.$strip>>;
|
|
89
|
+
category: _$zod.ZodOptional<_$zod.ZodString>;
|
|
90
|
+
}, _$zod_v4_core0.$strip>;
|
|
91
|
+
response: _$zod.ZodObject<{
|
|
92
|
+
items: _$zod.ZodArray<_$zod.ZodObject<{
|
|
93
|
+
key: _$zod.ZodObject<{
|
|
94
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
95
|
+
ui: "ui";
|
|
96
|
+
app: "app";
|
|
97
|
+
}>>;
|
|
98
|
+
scope: _$zod.ZodString;
|
|
99
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
100
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
101
|
+
mobile: "mobile";
|
|
102
|
+
desktop: "desktop";
|
|
103
|
+
tablet: "tablet";
|
|
104
|
+
}>>;
|
|
105
|
+
}, _$zod_v4_core0.$strip>;
|
|
106
|
+
category: _$zod.ZodString;
|
|
107
|
+
value: _$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
|
|
108
|
+
updatedAt: _$zod.ZodNumber;
|
|
109
|
+
}, _$zod_v4_core0.$strip>>;
|
|
110
|
+
}, _$zod_v4_core0.$strip>;
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Preferences subjects for bus communication.
|
|
115
|
+
*/
|
|
116
|
+
declare const PreferencesSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"preferences", {
|
|
117
|
+
get: {
|
|
118
|
+
request: _$zod.ZodObject<{
|
|
119
|
+
key: _$zod.ZodObject<{
|
|
120
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
121
|
+
ui: "ui";
|
|
122
|
+
app: "app";
|
|
123
|
+
}>>;
|
|
124
|
+
scope: _$zod.ZodString;
|
|
125
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
126
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
127
|
+
mobile: "mobile";
|
|
128
|
+
desktop: "desktop";
|
|
129
|
+
tablet: "tablet";
|
|
130
|
+
}>>;
|
|
131
|
+
}, _$zod_v4_core0.$strip>;
|
|
132
|
+
category: _$zod.ZodString;
|
|
133
|
+
}, _$zod_v4_core0.$strip>;
|
|
134
|
+
response: _$zod.ZodObject<{
|
|
135
|
+
value: _$zod.ZodNullable<_$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>>;
|
|
136
|
+
}, _$zod_v4_core0.$strip>;
|
|
137
|
+
};
|
|
138
|
+
set: {
|
|
139
|
+
request: _$zod.ZodObject<{
|
|
140
|
+
key: _$zod.ZodObject<{
|
|
141
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
142
|
+
ui: "ui";
|
|
143
|
+
app: "app";
|
|
144
|
+
}>>;
|
|
145
|
+
scope: _$zod.ZodString;
|
|
146
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
147
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
148
|
+
mobile: "mobile";
|
|
149
|
+
desktop: "desktop";
|
|
150
|
+
tablet: "tablet";
|
|
151
|
+
}>>;
|
|
152
|
+
}, _$zod_v4_core0.$strip>;
|
|
153
|
+
category: _$zod.ZodString;
|
|
154
|
+
value: _$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
|
|
155
|
+
}, _$zod_v4_core0.$strip>;
|
|
156
|
+
response: _$zod.ZodObject<{
|
|
157
|
+
success: _$zod.ZodBoolean;
|
|
158
|
+
}, _$zod_v4_core0.$strip>;
|
|
159
|
+
};
|
|
160
|
+
delete: {
|
|
161
|
+
request: _$zod.ZodObject<{
|
|
162
|
+
key: _$zod.ZodObject<{
|
|
163
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
164
|
+
ui: "ui";
|
|
165
|
+
app: "app";
|
|
166
|
+
}>>;
|
|
167
|
+
scope: _$zod.ZodString;
|
|
168
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
169
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
170
|
+
mobile: "mobile";
|
|
171
|
+
desktop: "desktop";
|
|
172
|
+
tablet: "tablet";
|
|
173
|
+
}>>;
|
|
174
|
+
}, _$zod_v4_core0.$strip>;
|
|
175
|
+
category: _$zod.ZodString;
|
|
176
|
+
}, _$zod_v4_core0.$strip>;
|
|
177
|
+
response: _$zod.ZodObject<{
|
|
178
|
+
success: _$zod.ZodBoolean;
|
|
179
|
+
}, _$zod_v4_core0.$strip>;
|
|
180
|
+
};
|
|
181
|
+
list: {
|
|
182
|
+
request: _$zod.ZodObject<{
|
|
183
|
+
key: _$zod.ZodOptional<_$zod.ZodObject<{
|
|
184
|
+
surface: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodEnum<{
|
|
185
|
+
ui: "ui";
|
|
186
|
+
app: "app";
|
|
187
|
+
}>>>;
|
|
188
|
+
scope: _$zod.ZodOptional<_$zod.ZodString>;
|
|
189
|
+
context: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodString>>;
|
|
190
|
+
viewport: _$zod.ZodOptional<_$zod.ZodOptional<_$zod.ZodEnum<{
|
|
191
|
+
mobile: "mobile";
|
|
192
|
+
desktop: "desktop";
|
|
193
|
+
tablet: "tablet";
|
|
194
|
+
}>>>;
|
|
195
|
+
}, _$zod_v4_core0.$strip>>;
|
|
196
|
+
category: _$zod.ZodOptional<_$zod.ZodString>;
|
|
197
|
+
}, _$zod_v4_core0.$strip>;
|
|
198
|
+
response: _$zod.ZodObject<{
|
|
199
|
+
items: _$zod.ZodArray<_$zod.ZodObject<{
|
|
200
|
+
key: _$zod.ZodObject<{
|
|
201
|
+
surface: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
202
|
+
ui: "ui";
|
|
203
|
+
app: "app";
|
|
204
|
+
}>>;
|
|
205
|
+
scope: _$zod.ZodString;
|
|
206
|
+
context: _$zod.ZodOptional<_$zod.ZodString>;
|
|
207
|
+
viewport: _$zod.ZodOptional<_$zod.ZodEnum<{
|
|
208
|
+
mobile: "mobile";
|
|
209
|
+
desktop: "desktop";
|
|
210
|
+
tablet: "tablet";
|
|
211
|
+
}>>;
|
|
212
|
+
}, _$zod_v4_core0.$strip>;
|
|
213
|
+
category: _$zod.ZodString;
|
|
214
|
+
value: _$zod.ZodType<unknown, unknown, _$zod_v4_core0.$ZodTypeInternals<unknown, unknown>>;
|
|
215
|
+
updatedAt: _$zod.ZodNumber;
|
|
216
|
+
}, _$zod_v4_core0.$strip>>;
|
|
217
|
+
}, _$zod_v4_core0.$strip>;
|
|
218
|
+
};
|
|
219
|
+
}>, "preferences">;
|
|
220
|
+
//#endregion
|
|
221
|
+
export { PreferencesSubjects as n, PreferencesNamespace as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./schemas-CVvwIfG4.mjs";import{z as t}from"zod";import{createBusNamespace as n}from"@makaio/framework/core";import{createStorageNamespaceDefinition as r}from"@makaio/framework/storage";const i=`contextRules`,a=[`AGENTS.md`,`CLAUDE.md`,`GEMINI.md`,`COPILOT.md`,`CURSOR.md`],o=t.object({cwd:t.string().optional(),adapterId:t.string().optional(),sessionId:t.string().optional(),agentId:t.string().optional()}).strict(),s=o.catchall(t.unknown()),c=t.enum(a),l=t.object({channel:t.literal(`turnContext`),content:t.string(),turnContextKey:t.string().optional()}).strict(),u=t.object({channel:t.literal(`file`),content:t.string(),fileTarget:c}).strict(),d=t.discriminatedUnion(`channel`,[l,u]),f=t.enum([`global`,`project`,`session`]);function p(e){return e.scope===`global`?e.projectId!==void 0||e.sessionId!==void 0?[{path:[`projectId`],message:`Global scope context rules must not have projectId or sessionId`}]:[]:e.scope===`project`?e.projectId?e.sessionId===void 0?[]:[{path:[`sessionId`],message:`Project scope context rules must not have sessionId`}]:[{path:[`projectId`],message:`Project scope context rules require projectId`}]:e.sessionId?[]:[{path:[`sessionId`],message:`Session scope context rules require sessionId`}]}function m(e){let[t]=p(e);if(t)throw Error(t.message)}const h=t.object({id:t.string().min(1),name:t.string().min(1),description:t.string().optional(),condition:e,action:d,priority:t.number(),enabled:t.boolean(),scope:f,projectId:t.string().optional(),sessionId:t.string().optional()}).strict(),g=h.superRefine((e,t)=>{for(let n of p(e))t.addIssue({code:`custom`,path:n.path,message:n.message})}),_=h.extend({createdAt:t.number(),updatedAt:t.number()}).superRefine((e,t)=>{for(let n of p(e))t.addIssue({code:`custom`,path:n.path,message:n.message})}),v=t.object({projectId:t.string().optional(),sessionId:t.string().optional()}).strict(),y=t.object({scope:f,projectId:t.string().nullable(),sessionId:t.string().nullable()}).strict(),b=o,x=t.object({id:t.string(),name:t.string(),priority:t.number(),action:d,renderedContent:t.string()}).strict(),S=t.object(Object.fromEntries(a.map(e=>[e,t.array(x).optional()]))).strict(),C=t.object({snapshot:s,turnContext:t.record(t.string(),t.array(x)),files:S}).strict(),w=t.object({ruleId:t.string(),changeType:t.enum([`created`,`updated`,`deleted`]),previous:y.nullable(),current:y.nullable(),timestamp:t.number()}).strict(),T=n(`contextRules`,{resolve:{request:b,response:C},changed:w}),E=T.subjects,D=r(`contextRules`,{schemas:{get:{request:t.object({id:t.string()}),response:t.object({rule:_.nullable()})},set:{request:t.object({rule:g}),response:t.object({id:t.string()})},delete:{request:t.object({id:t.string()}),response:t.object({deleted:t.boolean()})},list:{request:v,response:t.object({rules:t.array(_)})}}}),O=D.subjects;export{a as S,x as _,d as a,m as b,v as c,y as d,f,c as g,u as h,E as i,b as l,s as m,O as n,w as o,o as p,T as r,g as s,D as t,_ as u,C as v,i as x,l as y};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BusNamespaceDefinition, SchemaRecord } from "@makaio/framework/core";
|
|
2
|
+
|
|
3
|
+
//#region core/contracts/src/storage-namespace-definition.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Declarative storage namespace definition used by contracts.
|
|
6
|
+
*
|
|
7
|
+
* This mirrors the public shape consumed by storage runtimes without importing
|
|
8
|
+
* `@makaio/storage-core`, keeping `@makaio/contracts` pure.
|
|
9
|
+
*/
|
|
10
|
+
interface ContractStorageNamespaceDefinition<Domain extends string = string, Schemas extends SchemaRecord = SchemaRecord, Extensions extends Record<string, unknown> = Record<string, never>> extends BusNamespaceDefinition<`storage:${Domain}`, Schemas> {
|
|
11
|
+
/** Storage domain without the `storage:` prefix. */
|
|
12
|
+
readonly domain: Domain;
|
|
13
|
+
/** Optional storage metadata carried for runtime handler wiring. */
|
|
14
|
+
readonly extensions: Extensions;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { ContractStorageNamespaceDefinition as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createBusNamespace as e}from"@makaio/framework/core";function t(t,n){return{...e(`storage:${t}`,n.schemas),domain:t,extensions:n.extensions??{}}}export{t};
|