@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 @@
|
|
|
1
|
+
import{z as e}from"zod";import{MakaioBus as t,OnceAbortError as n}from"@makaio/framework/bus";import{AgentSubjects as r,McpSubjects as i,ToolSubjects as a}from"@makaio/framework/contracts";import{AIAgent as o,AgentCompleteEventSchema as s,AgentStartedEventSchema as c,BaseConnectorSession as l,ErrorEventSchema as u,ProceduralAgentConnector as d,ToolCompletedEventSchema as f,ToolStartedEventSchema as p,UserMessageQueue as m,extractMcpCallTarget as h,isMcpCallTool as g,markCompletedWithFinalResult as _,processQueueMessages as v}from"@makaio/framework/adapters";const y=8e3;function b(e){if(e.length<=8e3)return e;let t=y,n=``;for(;;){let r=`\n...[truncated ${e.length-t} chars]`,i=y-r.length;if(i<0)return r.slice(0,y);if(i===t&&r===n)break;t=i,n=r}return`${e.slice(0,t)}${n}`}function x(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function S(e,t=`Adapter`){let n;try{n=JSON.parse(e.function.arguments)}catch{let n=e.function.arguments.length;throw console.error(`[${t}] Failed to parse tool arguments for "${e.function.name}" (argsLength=${n})`),Error(`Failed to parse tool arguments for "${e.function.name}"`)}if(!x(n)){let r=n===null?`null`:Array.isArray(n)?`array`:typeof n;throw console.error(`[${t}] Parsed tool arguments for "${e.function.name}" must be a JSON object (received ${r})`,n),Error(`Tool arguments for "${e.function.name}" must be a JSON object`)}return{toolName:e.function.name,args:n,toolCallId:e.id}}function C(e,t,n=`Adapter`){return{...S(e,n),agentId:t.agentId,adapterId:t.adapterId,adapterName:t.adapterName,adapterSessionId:t.adapterSessionId,sessionId:t.sessionId}}function w(e,t){t.updatedInput!==void 0&&(e.function.arguments=JSON.stringify(t.updatedInput))}async function T(e,n){try{return(await t.request(a.list,{adapterId:e,adapterName:n})).tools}catch(e){return console.warn(`[${n}] Failed to fetch tools from bus:`,e),[]}}function E(e){return e.filter(e=>e.inputSchema!==void 0)}async function D(e,n,r){await n({eventType:`tool_started`,toolName:e.function.name,toolCallId:e.id});try{let i=JSON.parse(e.function.arguments),o=await t.request(a.execute,{toolName:e.function.name,input:i,adapterId:r.adapterId,adapterName:r.adapterName,contextOverrides:{...r,toolCallId:e.id}});return n({eventType:`tool_completed`,toolName:e.function.name,toolCallId:e.id,result:o.success?JSON.stringify(o.data):JSON.stringify(o.error),success:o.success}).then(()=>o)}catch(t){let r=t instanceof Error?{message:t.message,name:t.name}:{message:String(t),name:`UnknownError`};throw await n({eventType:`tool_completed`,toolName:e.function.name,toolCallId:e.id,result:JSON.stringify(r),success:!1}),t}}async function O(e,t,n,r,i){let a=[];for(let o of e){let e=S(o,i),s=await t.requestToolApproval({...e,reasoning:n.reasoning});if(s.action===`deny`){if(s.shouldAbort)throw Error(`Tool use denied by approval handler: ${o.function.name}`);let e=b(JSON.stringify({error:s.message}));a.push(r(o.id,e,!0));continue}w(o,s);let c=await D(o,t.emitSdkEvent,n);if(c.success&&t.recordMcpCall&&g(e.toolName)){let n=h(s.updatedInput??e.args);n!==void 0&&t.recordMcpCall(n)}let l=c.success?typeof c.data==`string`?c.data:JSON.stringify(c.data??null):JSON.stringify({error:c.error.message,code:c.error.code});a.push(r(o.id,b(l),!c.success))}return a}const k=e.enum([`idle`,`turn_started`,`step_started`,`step_finished`,`turn_finished`]),A=e.object({adapterId:e.string(),agentId:e.string(),oldState:k,newState:k,timestamp:e.number()}),j=e.object({eventType:e.literal(`reasoning_delta`),content:e.string()}),M=e.object({eventType:e.literal(`reasoning_complete`),content:e.string()}),N=e.object({name:e.string(),arguments:e.string()}),P=e.object({id:e.string(),type:e.literal(`function`),function:N}),F=e.object({eventType:e.literal(`tool_calls`),toolCalls:e.array(P)}),I=e.object({id:e.string(),type:e.literal(`function`),function:N}),L=e.object({eventType:e.literal(`message_complete`),content:e.string().nullable(),reasoning:e.string().optional(),tool_calls:e.array(I).optional(),finish_reason:e.string().nullable()}),R=`stream_start_timeout`;var z=class extends l{static MAX_TOOL_CALL_ITERATIONS=8;lastAssistantMessage;currentModel;currentCwd;pendingAssistantHistoryCompactions=[];constructor(e){super(e),this.sessionId=crypto.randomUUID(),this.currentModel=e.model,this.currentCwd=e.cwd}async processQueue(e){await v(e,{getCurrentTurn:()=>this.currentTurn,startNewTurn:(e,t)=>this.startNewTurn(e,t)})}async startNewTurn(e,t){this.config.onTurnStart?.(e),this.sessionId=crypto.randomUUID(),e.adapterSessionId=this.sessionId,e.internalRetry||this.closePendingAssistantHistoryCompactions(this.getConversationHistoryLength()),this.buildMessages(e,t);let n=this.getConversationHistoryLength(),r;if(!e.isProcessed&&!e.internalRetry){let t,i={setEndIndex:e=>{t??=e}};this.pendingAssistantHistoryCompactions.push(i),e.addCompletionObserver(e=>{try{let i=e.outcome===`completed`?e.result?.message:void 0;if(i===void 0||r===void 0||i===r)return;let a=t??this.getConversationHistoryLength();this.replaceAssistantTurnHistory(n,a,i),this.lastAssistantMessage=i}finally{this.removePendingAssistantHistoryCompaction(i)}})}this.currentTurn=this.createTurn(e),this.lastAssistantMessage=void 0,e.markAcknowledged(),await this.config.emitSdkEvent({eventType:`agent_started`,model:this.currentModel});let i=this.currentTurn;queueMicrotask(async()=>{try{if(!i||(await this.runTurn(i,e),e.isProcessed||this.isTurnSuperseded(i)))return;r=this.lastAssistantMessage||``,await _(e,{outcome:`completed`,result:{message:r}},this.config.onTurnComplete)}catch(t){await this.handleTurnError(t,i,e)}finally{i&&(!i.isPaused()||e.deliveryMode!==`immediate`)&&(await i.markTurnFinished(),this.currentTurn===i&&(this.currentTurn=void 0))}})}async handleTurnError(e,t,n){if(t?.isPaused()&&n.deliveryMode===`immediate`)return;let r=e instanceof Error?e:Error(String(e));if(t?.isPaused()){n.isProcessed||await _(n,{outcome:`error`,error:r},this.config.onTurnComplete);return}console.error(`[${this.config.adapterName}] Turn error:`,e),n.isProcessed||await _(n,{outcome:`error`,error:r},this.config.onTurnComplete),this.config.handleError(r,!1)}async runTurn(e,t){this.isTurnSuperseded(e)||(await e.start(),await this.runTurnIteration(e,t))}createMessageCompletePromise(e,t){return this.bus.once(this.getSdkEventSubject(),{timeoutMs:3e5,filter:{"event.eventType":`message_complete`,agentId:this.config.agentId,adapterId:this.config.adapterId,adapterSessionId:t},signal:e})}async executeStreamingStep(e,t,n){let r=this.config.streamStartTimeoutMs??3e4,i=new AbortController,a=setTimeout(()=>{i.abort()},r);try{await this.executeApiCall(e,AbortSignal.any([t,i.signal]),n)}catch(e){throw!t.aborted&&i.signal.aborted?Error(R,{cause:e}):e}finally{clearTimeout(a)}}async runTurnIteration(e,t,r=0){if(this.isTurnSuperseded(e))return;let i=e.getAbortSignal(),a=0,o;for(;;){if(this.shouldAbortTurnProcessing(e,t))return;try{let n=t.adapterSessionId??this.sessionId;if(!n)throw Error(`adapterSessionId must be set before waiting for message_complete`);if(o=this.createMessageCompletePromise(i,n),await this.executeStreamingStep(e,i,n),this.shouldAbortTurnProcessing(e,t)){o.catch(()=>{});return}let{payload:a}=await o,s=a.event;if(s.eventType!==`message_complete`)throw Error(`Expected message_complete event, got ${s.eventType}`);if(this.shouldAbortTurnProcessing(e,t))return;await this.applyMessageComplete(s,t,r,e);return}catch(e){if(o?.catch(()=>{}),e instanceof Error&&e.message===R&&!i.aborted&&a===0){a++;continue}if(i.aborted||e.name===`AbortError`||e instanceof n)return;let t=this.classifyError(e);throw r===0&&await this.config.emitSdkEvent({eventType:`error`,message:t.message,code:e?.code,type:e?.type}),t}}}buildToolConstraints(){if(this.config.allowedDirectories!==void 0)return{allowedDirectories:this.config.allowedDirectories}}updateModel(e){this.currentModel=e}updateCwd(e){this.currentCwd=e}getCurrentTurn(){return this.currentTurn}isTurnSuperseded(e){return this.currentTurn!==e}shouldAbortTurnProcessing(e,t){return t.isProcessed||e.isPaused()||this.isTurnSuperseded(e)}closePendingAssistantHistoryCompactions(e){for(let t of this.pendingAssistantHistoryCompactions)t.setEndIndex(e)}removePendingAssistantHistoryCompaction(e){let t=this.pendingAssistantHistoryCompactions.indexOf(e);t>=0&&this.pendingAssistantHistoryCompactions.splice(t,1)}},B=class extends d{session;userMessageQueue=new m;mcpDirectTools=[];mcpSessionContextCache;hasPendingToolRefresh=!1;hasPendingLedgerInjection=!1;markToolRefreshPending(){this.hasPendingToolRefresh=!0}afterSessionCreated(e){}getSession(){return this.session}async ensureSession(){return this.session||await this.initializeSession(),this.session}getSessionQueue(){return this.userMessageQueue}async initializeSession(){await this.fetchToolsViaBus(),this.prepareMcpDirectTools(),this.session=this.createSession(),this.afterSessionCreated(this.session),this.wireSessionEvents(),this.mcpDirectTools.length>0&&this.session.updateTools?.(this.mcpDirectTools);let e=(this.pendingTurnNumber??this.currentTurnNumber)||1;this.config.toolLedger?.recordInjection(this.mcpDirectTools,e)}prepareMcpDirectTools(){let e=this.mcpSessionContextCache??this.config.mcpSessionContext;e&&(this.mcpDirectTools=e.directTools.map(e=>({name:e.fullName,description:e.description??``,toolsetName:e.serverName,inputSchema:e.inputSchema})))}async fetchToolsViaBus(){this.session||await this.fetchTools()}async refreshTools(){await this.resolveAndCacheMcpContext(),this.prepareMcpDirectTools(),this.hasPendingLedgerInjection=!0}async resolveAndCacheMcpContext(){let e=this.config.mcpSessionContext;if(!(!e||!(`sessionId`in e)))try{this.mcpSessionContextCache=await t.request(i.session.resolve,{sessionId:e.sessionId,profileId:e.profileId,projectId:e.projectId})}catch(e){console.warn(`[${this.config.adapterName}] MCP session re-resolve failed; using previous tool snapshot.`,e)}}getWireSessionConfig(){return{onTurnStarted:async()=>{if(this.consumeTurnNumber(),this.hasPendingToolRefresh)try{await this.refreshTools()}catch(e){console.warn(`[${this.config.adapterName}] Tool refresh failed at turn start; continuing with stale tools.`,e)}finally{this.hasPendingToolRefresh=!1}this.hasPendingLedgerInjection&&=(this.config.toolLedger?.recordInjection(this.mcpDirectTools,this.currentTurnNumber),!1)},onTurnFinished:async e=>{if(this.hasPendingToolRefresh)try{await this.refreshTools()}catch(e){console.warn(`[${this.config.adapterName}] Tool refresh failed; continuing with stale tools.`,e)}finally{this.hasPendingToolRefresh=!1}await e()}}}resolveSystemPrompt(){if(this.systemPrompt!==void 0)return typeof this.systemPrompt==`string`?this.systemPrompt:this.systemPrompt.content}async sendMessage(e,t){let n=this.createMessageHandle(e,t);return await this.processUserMessages([n]),n}abort(){this.session?.abort()}async close(){await this.session?.abort()}async changeModelInPlace(e){return this.session?.updateModel(e),!0}async changeCwdInPlace(e){return this.session?.updateCwd(e),!0}async changeReasoningInPlace(e){return this.session?.updateReasoning?.(e),!0}async interrupt(){await this.session?.abort()}async getAdapterSessionId(){if(this.adapterSessionId||this.initAdapterSessionId(),!this.adapterSessionId)throw Error(`Adapter session ID is missing in getAdapterSessionId(); ensure initAdapterSessionId() ran during connector initialization.`);return this.adapterSessionId}initAdapterSessionId(){this.adapterSessionId??=crypto.randomUUID()}};function V(e){try{let t=JSON.parse(e);return typeof t==`object`&&t&&!Array.isArray(t)?t:{}}catch{return{}}}var H=class extends o{toolBlockIndexMap=new Map;completedToolIds=new Set;toolCallArgsMap=new Map;resetPerTurnToolTracking(){this.toolBlockIndexMap.clear(),this.completedToolIds.clear(),this.toolCallArgsMap.clear()}wireEvents(e){this.wireSdkEvents(),this.wireSemanticEvents(e,this.getConnectorSubjects()),this.wireToolApprovalRpc(e)}wireSemanticEvents(e,t){this.wireMessageEvents(e,t),this.wireUsageEvents(e,t),this.wireToolEvents(e,t),this.wireReasoningEvents(e,t),this.wireLifecycleEvents(e,t)}wireMessageEvents(e,t){this.subscribeConnector(e,t.chunk,async e=>{let t=this.extractChunkText(e.payload);t&&await this.emitGlobal(r.message_delta,{text:t})}),this.subscribeConnector(e,t.messageComplete,async e=>{let{content:t}=e.payload;t&&(await this.emitStepStarted(`text`),await this.emitStepFinished(`text`,{type:`text`,content:t})),await this.emitGlobal(r.message,{content:t??``})})}wireUsageEvents(e,t){this.subscribeConnector(e,t.usage,async e=>{let t=this.extractUsagePayload(e.payload);await this.trackUsage(t),await this.emitUsageContextWindowUpdate(e.payload)})}wireToolEvents(e,t){this.subscribeConnector(e,t.toolCalls,async e=>{let{toolCalls:t}=e.payload;for(let e of t){if(this.completedToolIds.has(e.id)){console.warn(`[BaseStreamAgent] Ignoring late tool_calls for completed toolCallId ${e.id}`);continue}let t=V(e.function.arguments);this.toolCallArgsMap.set(e.id,t);let n=this.reserveToolCallBlockIndex(e);this.toolBlockIndexMap.set(e.id,n),await this.emitGlobal(r.step.started,{stepType:`tool_use`,blockIndex:n,blockData:{type:`tool_use`,toolName:e.function.name,toolCallId:e.id},content:{type:`tool_call`,toolCallId:e.id,name:e.function.name,args:t}}),this.afterToolCallStepEmitted(n),await this.emitGlobal(r.tool.use,{toolName:e.function.name,args:t,toolCallId:e.id})}}),this.subscribeConnector(e,t.toolStarted,async e=>{let{toolName:t,toolCallId:n}=e.payload;await this.emitGlobal(r.tool.started,{toolName:t,toolCallId:n})}),this.subscribeConnector(e,t.toolCompleted,async e=>{let{toolCallId:t,toolName:n,result:i,success:a}=e.payload;this.completedToolIds.add(t);let o=this.toolBlockIndexMap.get(t);o===void 0&&console.warn(`[BaseStreamAgent] toolCallId ${t} missing from toolBlockIndexMap; using fallback`);let s=o??this.getFallbackToolCompletedBlockIndex();this.toolBlockIndexMap.delete(t),await this.emitGlobal(r.step.finished,{stepType:`tool_use`,blockIndex:s,content:{type:`tool_output`,toolCallId:t,output:i,isError:!a}}),this.afterToolCompletedStepEmitted(s);let c=this.toolCallArgsMap.get(t);this.toolCallArgsMap.delete(t),c===void 0&&console.warn(`[BaseStreamAgent] toolCallId ${t} missing args for tool ${n}`),await this.emitGlobal(r.tool.completed,{toolName:n,args:c,result:{output:i},success:a,toolCallId:t})})}wireReasoningEvents(e,t){this.subscribeConnector(e,t.reasoningDelta,async e=>{let{content:t}=e.payload;await this.emitGlobal(r.reasoning_delta,{content:t})}),this.subscribeConnector(e,t.reasoningComplete,async e=>{let t=e.payload.content;if(t){let t=this.buildReasoningBlock(e.payload);await this.emitStepStarted(`reasoning`),await this.emitStepFinished(`reasoning`,t)}await this.emitGlobal(r.reasoning,{content:t??``})})}wireLifecycleEvents(e,t){this.subscribeConnector(e,t.agentStarted,async e=>{e.payload,this.resetPerTurnToolTracking(),await this.emitStart()}),this.subscribeConnector(e,t.agentComplete,async e=>{e.payload,this.resetPerTurnToolTracking()}),this.subscribeConnector(e,t.error,async e=>{let{message:t}=e.payload;this.emitError({error:t})})}};export{s as AgentCompleteEventSchema,c as AgentStartedEventSchema,H as BaseStreamAgent,B as BaseStreamConnector,z as BaseStreamSession,u as ErrorEventSchema,y as MAX_TOOL_RESULT_CONTENT_CHARS,L as MessageCompleteEventSchema,I as MessageToolCallSchema,M as ReasoningCompleteEventSchema,j as ReasoningDeltaEventSchema,k as StreamSessionTurnStateSchema,N as ToolCallFunctionSchema,P as ToolCallSchema,F as ToolCallsEventSchema,f as ToolCompletedEventSchema,p as ToolStartedEventSchema,A as TurnStateChangedSchema,w as applyApprovedArgs,b as boundToolResultContent,D as executeTool,S as extractToolCallPayload,E as filterToolsWithSchema,O as handleToolCalls,T as loadToolsFromRegistry,C as toGlobalToolApproval};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AIReasoningLevel } from "@makaio/framework/contracts";
|
|
2
|
+
|
|
3
|
+
//#region adapters/shared/stream-session/src/testing/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Minimal public surface required from the connector under test.
|
|
6
|
+
*
|
|
7
|
+
* Intentionally narrow: the contract only exercises `changeReasoningInPlace`
|
|
8
|
+
* and the read-only `currentReasoningEffort` snapshot, keeping the helper
|
|
9
|
+
* decoupled from any concrete connector class.
|
|
10
|
+
*/
|
|
11
|
+
interface ChangeReasoningConnector {
|
|
12
|
+
/** Attempt an in-place reasoning level change; returns `true` on success. */
|
|
13
|
+
changeReasoningInPlace(level: AIReasoningLevel): Promise<boolean>;
|
|
14
|
+
/** Current reasoning effort level managed by the caller, never mutated in-place. */
|
|
15
|
+
readonly currentReasoningEffort: AIReasoningLevel | undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Register the shared `changeReasoningInPlace` contract suite for a
|
|
19
|
+
* stream-based connector.
|
|
20
|
+
*
|
|
21
|
+
* Each test creates a fresh connector via `makeConnector()` to guarantee
|
|
22
|
+
* isolation — the factory must return a pre-start connector with no active
|
|
23
|
+
* session.
|
|
24
|
+
* @param connectorName - Display name used in the outer `describe` block
|
|
25
|
+
* @param makeConnector - Async factory that returns a fresh connector instance
|
|
26
|
+
*/
|
|
27
|
+
declare function describeChangeReasoningInPlaceContract(connectorName: string, makeConnector: () => Promise<ChangeReasoningConnector>): void;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { ChangeReasoningConnector, describeChangeReasoningInPlaceContract };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{describe as e,expect as t,it as n,vi as r}from"vitest";function i(i,a){e(`${i}.changeReasoningInPlace()`,()=>{n(`always returns true (stream-based adapters apply reasoning per-request)`,async()=>{t(await(await a()).changeReasoningInPlace(`medium`)).toBe(!0)}),n(`returns true for every canonical reasoning level`,async()=>{let e=await a();for(let n of[`none`,`low`,`medium`,`high`,`extra-high`])t(await e.changeReasoningInPlace(n)).toBe(!0)}),n(`does NOT mutate connector.currentReasoningEffort (mutation contract — caller is responsible)`,async()=>{let e=await a(),n=e.currentReasoningEffort;await e.changeReasoningInPlace(`high`),t(e.currentReasoningEffort).toBe(n)}),n(`calls session.updateReasoning with the requested level when a session is active`,async()=>{let e=await a(),n=r.fn();Reflect.set(e,`session`,{updateReasoning:n}),await e.changeReasoningInPlace(`high`),t(n).toHaveBeenCalledOnce(),t(n).toHaveBeenCalledWith(`high`)}),n(`does not throw and returns true when no session exists (pre-start state)`,async()=>{t(await(await a()).changeReasoningInPlace(`medium`)).toBe(!0)}),n(`returns true and does not throw when session is null (optional-chain guard)`,async()=>{let e=await a();Reflect.set(e,`session`,null),t(await e.changeReasoningInPlace(`medium`)).toBe(!0)})})}export{i as describeChangeReasoningInPlaceContract};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./json-value-CmhSGMLv.mjs";import{n}from"./schemas-CR1Rripy.mjs";import{z as r}from"zod";import{createBusNamespace as i}from"@makaio/framework/core";const a=r.object({kind:r.string().min(1),id:r.string().min(1),displayName:r.string().optional()}),o=r.object({level:r.string().min(1),ids:r.record(r.string().min(1),r.string().min(1)).optional()}).superRefine((e,t)=>{e.level!==`global`&&(!e.ids||Object.keys(e.ids).length===0)&&t.addIssue({code:r.ZodIssueCode.custom,path:[`ids`],message:`ids is required when scope level is not 'global'`})}),s=r.object({level:r.string().min(1),ids:r.record(r.string().min(1),r.string().min(1)).optional()}),c=r.object({refClass:r.literal(`artifact`).default(`artifact`),kind:r.string().min(1),id:r.string().min(1),revision:r.string().min(1)}),l=r.object({refClass:r.literal(`local`).default(`local`),artifact:c,localId:r.string().min(1)}),u=r.object({refClass:r.literal(`evidence`).default(`evidence`),kind:r.string().min(1),id:r.string().min(1),revision:r.string().min(1).optional(),locator:r.string().min(1).optional()}),d=r.discriminatedUnion(`refClass`,[c,l,u]);function f(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e||!(`revision`in e)?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const p=r.preprocess(f,d),m=r.discriminatedUnion(`refClass`,[c.extend({revision:r.string().min(1).optional()}),l,u]);function h(e){return!e||typeof e!=`object`||Array.isArray(e)||`refClass`in e?e:`artifact`in e&&`localId`in e?{...e,refClass:`local`}:`locator`in e?{...e,refClass:`evidence`}:{...e,refClass:`artifact`}}const g=r.preprocess(h,m),_=r.object({type:r.string().min(1),target:p}),v=r.enum([`assumed`,`inferred`,`stated`,`confirmed`,`verified`]),y=r.object({kind:r.string().min(1),actor:a,timestamp:r.number().int().nonnegative(),detail:r.string().optional(),evidenceRef:p.optional()}),b=r.object({level:v,basis:r.array(y)}),x=r.object({id:r.string().min(1),kind:r.string().min(1),summary:r.string().min(1),detail:r.string().optional(),severity:r.enum([`info`,`warning`,`blocker`]).optional(),tags:r.array(r.string().min(1)).optional(),regarding:r.union([c,l]).optional(),evidence:r.union([c,u]).optional(),actor:a,timestamp:r.number().int().nonnegative()}),S=r.object({markdown:r.string().optional(),summary:r.string().optional(),plaintext:r.string().optional()}),C=r.object({kind:r.string().min(1),id:r.string().min(1),revision:r.string().min(1),scope:o,schemaVersion:r.string().min(1),data:t,relations:r.array(_),confidence:b.optional(),representations:S.optional(),actor:a,timestamp:r.number().int().nonnegative(),createdAt:r.number().int().nonnegative().optional()}),w=r.enum([`supersedes`,`manual`,`coexist`]),T=r.object({kind:r.string().min(1),description:r.string().trim().min(1),schemaVersion:r.string().min(1),dataSchema:t,scopeSchema:t.optional(),observationSchema:t.optional(),discriminator:r.union([r.string().min(1),r.array(r.string().min(1))]).optional(),conflictPolicy:w,status:r.object({path:r.string().min(1),values:r.array(r.string().min(1)).optional()}).optional(),lifecycle:r.object({defaultRelevance:r.enum([`active`,`fading`,`retired`,`archived`]).optional(),decayPolicy:r.string().min(1).optional()}).optional(),indexedFields:r.array(r.string().min(1)).optional(),searchableFields:r.array(r.string().min(1)).optional(),projection:n.optional()}),E=r.object({type:r.string().min(1),symmetry:r.enum([`asymmetric`,`symmetric`]),implication:r.string().min(1).optional(),sourceKinds:r.array(r.string().min(1)).optional(),targetKinds:r.array(r.string().min(1)).optional(),targetRefClasses:r.array(r.enum([`artifact`,`local`,`evidence`])).optional()}),D=r.object({kind:r.string().min(1).optional(),scope:s.optional(),ids:r.array(r.string().min(1)).optional(),currentOnly:r.boolean().optional(),search:r.string().optional(),relation:r.object({type:r.string().min(1).optional(),target:g.optional()}).optional(),confidence:r.object({maxLevel:v.optional(),minLevel:v.optional()}).optional(),indexed:r.record(r.string(),e).optional(),limit:r.number().int().min(1).optional()}),O=r.object({base:c,target:c}),k=r.object({base:C,target:C,changedPaths:r.array(r.string())});function A(e){let{$schema:t,...n}=r.toJSONSchema(e);return n}function j(e){return{...e,toRegistration:()=>({kind:e.kind,description:e.description,schemaVersion:e.schemaVersion,dataSchema:A(e.dataSchema),...e.scopeSchema?{scopeSchema:A(e.scopeSchema)}:{},...e.observationSchema?{observationSchema:A(e.observationSchema)}:{},...e.discriminator===void 0?{}:{discriminator:typeof e.discriminator==`string`?e.discriminator:Array.from(e.discriminator)},conflictPolicy:e.conflictPolicy,...e.status?{status:{...e.status,...e.status.values?{values:[...e.status.values]}:{}}}:{},...e.lifecycle?{lifecycle:e.lifecycle}:{},...e.indexedFields?{indexedFields:[...e.indexedFields]}:{},...e.searchableFields?{searchableFields:[...e.searchableFields]}:{},...e.projection?{projection:{...e.projection,...e.projection.semanticEvents?{semanticEvents:[...e.projection.semanticEvents]}:{},...e.projection.projectedFields?{projectedFields:e.projection.projectedFields.map(e=>({...e}))}:{}}}:{}})}}function M(e){return{hooks:[...e.hooks]}}const N={"kind.register":{request:T,response:r.object({registered:r.boolean()})},"kind.list":{request:r.object({kind:r.string().min(1).optional()}),response:r.object({kinds:r.array(T)})},"relation-type.register":{request:E,response:r.object({registered:r.boolean()})},"relation-type.list":{request:r.object({type:r.string().min(1).optional()}),response:r.object({relationTypes:r.array(E)})},create:{request:C.omit({id:!0,revision:!0,timestamp:!0}),response:r.object({artifact:C})},revise:{request:r.object({previous:c,revision:C.omit({id:!0,revision:!0,timestamp:!0})}),response:r.object({artifact:C})},resolve:{request:r.object({ref:c}),response:r.object({artifact:C.nullable()})},query:{request:D,response:r.object({artifacts:r.array(C)})},compare:{request:O,response:k},created:r.object({artifact:C}),revised:r.object({previous:c,artifact:C}),"relation.added":r.object({artifact:c,relation:_}),"observation.added":r.object({artifact:c,observation:x}),"status.changed":r.object({artifact:c,path:r.string().min(1),previous:r.unknown().optional(),current:r.unknown().optional()}),"kind.changed":r.object({kind:r.string().min(1),schemaVersion:r.string().min(1)})},P=i(`artifact`,N),F=P.subjects;export{b as C,E,v as S,l as T,p as _,j as a,o as b,k as c,x as d,D as f,_ as g,g as h,M as i,w as l,c as m,N as n,a as o,s as p,F as r,O as s,P as t,T as u,S as v,u as w,y as x,C as y};
|