@romiluz/clawmongo 2026.3.31 → 2026.3.32
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/CHANGELOG.md +1 -0
- package/README.md +21 -1
- package/dist/.buildstamp +1 -1
- package/dist/{abort.runtime-CBZWFKHx.js → abort.runtime-B76dHUab.js} +19 -19
- package/dist/{accounts-256Lpw3_.js → accounts-f4oUR-KU.js} +19 -19
- package/dist/{action-runtime-By1tjY4j.js → action-runtime-BvmlxSow.js} +3 -3
- package/dist/{action-runtime-BCwNxCYz.js → action-runtime-FNaeyiHa.js} +1 -1
- package/dist/{actions.runtime-GIuEnX5c.js → actions.runtime-B5SHXVBM.js} +19 -19
- package/dist/{actions.runtime-BxXCTdgf.js → actions.runtime-Bpqvp-P6.js} +22 -22
- package/dist/{agent-runner.runtime-D9LcBP7a.js → agent-runner.runtime-DHFYjcOQ.js} +20 -20
- package/dist/{agent-tools-login-D9QlyPBk.js → agent-tools-login-CeAUGuwk.js} +1 -1
- package/dist/agents/auth-profiles.runtime.js +2 -2
- package/dist/agents/pi-model-discovery-runtime.js +2 -2
- package/dist/{agents-Tnjt3Tfi.js → agents-CcuzSVX3.js} +4 -4
- package/dist/{agents-CVZPbAax.js → agents-D2s_vbN2.js} +79 -79
- package/dist/{api-kAoyZLGE.js → api-f7Fg5X8w.js} +19 -19
- package/dist/{apply-CSgSTV31.js → apply-CZkOfJvf.js} +3 -3
- package/dist/{apply.runtime-BDFdeq7V.js → apply.runtime-Kzh-0Ydt.js} +21 -21
- package/dist/{audit-DI8FYBF-.js → audit-BGahYsDD.js} +1 -1
- package/dist/{audit-dQxBQt16.js → audit-BUkP9jdj.js} +1 -1
- package/dist/{audit-kLLus1gm.js → audit-D10PteOl.js} +1 -1
- package/dist/{audit-channel.collect.runtime-CCR8jR42.js → audit-channel.collect.runtime-DQp-gOhf.js} +1 -1
- package/dist/{audit-membership-runtime-DpPWzuTj.js → audit-membership-runtime-BUJmX2hm.js} +19 -19
- package/dist/{audit.runtime-D_EJ3boD.js → audit.runtime-i_V5qm4G.js} +1 -1
- package/dist/{auth-choice-CLy97hbI.js → auth-choice-BAvI_XDP.js} +25 -25
- package/dist/{auth-choice-CNgSjNra.js → auth-choice-CFX43ZMS.js} +25 -25
- package/dist/{auth-choice-C5McfL86.js → auth-choice-D92NWROm.js} +4 -4
- package/dist/{auth-choice-options-BSdoCxVO.js → auth-choice-options-eOov4lHK.js} +1 -1
- package/dist/{auth-choice-prompt-CSTIBRxx.js → auth-choice-prompt-BHZS0zzd.js} +22 -22
- package/dist/{auth-choice-prompt-ClPBv5Hb.js → auth-choice-prompt-DPu-KM86.js} +1 -1
- package/dist/{auth-choice.plugin-providers.runtime-BvBk5zj8.js → auth-choice.plugin-providers.runtime-BKJ1G30p.js} +20 -20
- package/dist/{auth-health-YaKxC3_1.js → auth-health-DrhDwT0A.js} +1 -1
- package/dist/{auth-profiles-v2ZAir2o.js → auth-profiles-9ZmqHW26.js} +1 -1
- package/dist/{bluebubbles-C9A57ciK.js → bluebubbles-DY0qI3hH.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +19 -19
- package/dist/bundled/session-memory/handler.js +20 -20
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-E-KD0cHt.js → channel-Bf_8K6l5.js} +1 -1
- package/dist/{channel-fOhV_J6a.js → channel-Bhq2K6s9.js} +8 -8
- package/dist/{channel-wpeZAdJl.js → channel-CxCge-T_.js} +5 -5
- package/dist/{channel-Cbyd5iYB.js → channel-D0kqeNUy.js} +2 -2
- package/dist/{channel-DiWzi-Z9.js → channel-DPEykAqH.js} +6 -6
- package/dist/{channel-CAA94kAx.js → channel-DPSZvfT6.js} +1 -1
- package/dist/{channel-DMllR7sN.js → channel-DR1oHx-c.js} +2 -2
- package/dist/{channel-k__povtY.js → channel-DufwL-jz.js} +2 -2
- package/dist/{channel-Cfx75uDY2.js → channel-DwfNwzMC2.js} +1 -1
- package/dist/{channel-Bm6vQ7Vk.js → channel-_Q3YP1AX.js} +3 -3
- package/dist/{channel-account-context-Bj5Ap7Uy.js → channel-account-context-BFz9niGc.js} +1 -1
- package/dist/{channel-BcHlUn1x.js → channel-kTbF3pA5.js} +2 -2
- package/dist/{channel-plugin-resolution-FPqk6upJ.js → channel-plugin-resolution-Byfh8pYk.js} +1 -1
- package/dist/{channel-DLsGlHed.js → channel-qF8P5wpX.js} +3 -3
- package/dist/{channel-shared-BDFGo_d6.js → channel-shared-B4K06EQd.js} +1 -1
- package/dist/{channel-summary-BaB6JLjL.js → channel-summary-BmBR7Kyt.js} +2 -2
- package/dist/{channel-summary-ZBxYr-BD.js → channel-summary-Cps0Fzte.js} +1 -1
- package/dist/{channel.runtime-B6xeMwMc.js → channel.runtime-BzZnxn5I.js} +21 -21
- package/dist/{channel.runtime-DL2L4PBZ.js → channel.runtime-CAJ1UBh5.js} +20 -20
- package/dist/{channel.runtime-DVnUJJdT.js → channel.runtime-CPxxZ41Y.js} +21 -21
- package/dist/{channel.runtime-BEJ4hBtm.js → channel.runtime-Coxx1f6o.js} +19 -19
- package/dist/{channel.runtime-bS2ATGEr.js → channel.runtime-CqqmR7yi.js} +21 -21
- package/dist/{channel.runtime-BQ4BzagZ.js → channel.runtime-D5JucO51.js} +22 -22
- package/dist/{channel.runtime-D0KC-jG7.js → channel.runtime-DMuT9kyy.js} +24 -24
- package/dist/{channel.runtime-fJE2Uv7C.js → channel.runtime-PIf86KG-.js} +20 -20
- package/dist/{channel.runtime-zyLXuzKv.js → channel.runtime-UVqYDaHP.js} +19 -19
- package/dist/{channel.runtime-Cs1nBp_b.js → channel.runtime-jcUrSIfm.js} +4 -4
- package/dist/{channel.runtime-3haExTH6.js → channel.runtime-rDFtpoEo.js} +20 -20
- package/dist/{channel.runtime-DNqjL-Ln.js → channel.runtime-uQuAYc-i.js} +21 -21
- package/dist/{channels-BfTj2PAc.js → channels-CWTVAS0q.js} +75 -75
- package/dist/{channels-DQBlQQrk.js → channels-CkPYFQcl.js} +1 -1
- package/dist/{channels-cli-COIjLRrE.js → channels-cli-B2T-CXmj.js} +28 -28
- package/dist/{clawbot-cli-UsX8B-JC.js → clawbot-cli-BVJttc88.js} +20 -20
- package/dist/cli/memory-cli.js +1 -1
- package/dist/{cli-BsveDkwV.js → cli-CuTfyWVy.js} +19 -19
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-qQjN8Ype.js → command-registry-CGPkVPqo.js} +9 -9
- package/dist/{command-registry-zjq2WVu_.js → command-registry-LeMajblS.js} +2 -2
- package/dist/{command-secret-gateway-C1EpZaYu.js → command-secret-gateway-C7Mc8VN7.js} +19 -19
- package/dist/{commands-core-Dsj3CaMs.js → commands-core-BUvPkOM8.js} +4 -4
- package/dist/{commands-core.runtime-DYTk8kt6.js → commands-core.runtime-BpRYOOMO.js} +21 -21
- package/dist/{commands-handlers.runtime-JbCSciWA.js → commands-handlers.runtime-CZHHYyzf.js} +37 -37
- package/dist/{commands-status.runtime-4le0QhLr.js → commands-status.runtime-B-GnL-VS.js} +19 -19
- package/dist/{commands.runtime-BfqO2kHQ.js → commands.runtime-Bj9ga9MT.js} +21 -21
- package/dist/{compact.runtime-CSWiKfxL.js → compact.runtime-CdBroITS.js} +19 -19
- package/dist/{completion-cli-CrnAbjgi.js → completion-cli-Bq8XV85J.js} +2 -2
- package/dist/{completion-cli-DEuK1m4B.js → completion-cli-kRec0CWS.js} +3 -3
- package/dist/{config-cli-Cq7Y1WGO.js → config-cli-BYCA-iPM.js} +21 -21
- package/dist/{config-guard-BI_MUR9S.js → config-guard-Cwr_cNeJ.js} +1 -1
- package/dist/{config-validation-BmBOmlo6.js → config-validation-DdoPNepT.js} +1 -1
- package/dist/{configure-D3Iva24K.js → configure-B4ln4G6g.js} +80 -80
- package/dist/{configure-CDhjeL6x.js → configure-Dsnm-Ir2.js} +10 -10
- package/dist/{credentials-Do95FF_5.js → credentials-Bs62UXYm.js} +22 -22
- package/dist/{credentials-read-CZ9hc1hW.js → credentials-read-Bh2q30jm.js} +1 -1
- package/dist/{credentials-write.runtime-BNZpXVG3.js → credentials-write.runtime-C7dM8wyv.js} +2 -2
- package/dist/{daemon-install-GPm24bM4.js → daemon-install-Y3CYUtX4.js} +2 -2
- package/dist/{deliver-DOIj_10v.js → deliver-CR4444dH.js} +19 -19
- package/dist/{deliver-runtime-rhGItjx0.js → deliver-runtime-CNc9Aad-.js} +19 -19
- package/dist/{directive-handling.fast-lane-CP7g4eqP.js → directive-handling.fast-lane-Dt2KTIe5.js} +22 -22
- package/dist/{directive-handling.impl-C5fXbYoU.js → directive-handling.impl-BaUsXoy2.js} +5 -5
- package/dist/{directive-handling.impl-Du7GIJCI.js → directive-handling.impl-D5J8xrYm.js} +22 -22
- package/dist/{directive-handling.persist.runtime-DHYSMC3t.js → directive-handling.persist.runtime-4Axq0DLo.js} +4 -4
- package/dist/{directive-handling.shared-D9Qp4qBu.js → directive-handling.shared-DmCT9_Rg.js} +1 -1
- package/dist/{directory-cli-MGZpBHMI.js → directory-cli-D-ntETKX.js} +21 -21
- package/dist/{discord-CkL1CbLZ.js → discord-4CFl2xzs.js} +29 -29
- package/dist/{discord-DVjQ-DvJ.js → discord-D39mQ5Rd.js} +8 -8
- package/dist/{dispatch-acp.runtime-DmwlgoFE.js → dispatch-acp.runtime-BBmK1C89.js} +21 -21
- package/dist/{doctor-completion-BI17hUZP.js → doctor-completion-BxDlXsGv.js} +1 -1
- package/dist/{doctor-config-preflight-BrDhJTRg.js → doctor-config-preflight-CbCtPfaf.js} +1 -1
- package/dist/{doctor-config-preflight-DJ2CpABg.js → doctor-config-preflight-D5voShkd.js} +1 -1
- package/dist/{doctor-state-migrations-DGjrIHzs.js → doctor-state-migrations-BU45Yv4K.js} +1 -1
- package/dist/{doctor-state-migrations-DOA54fyw.js → doctor-state-migrations-DjxQL7mH.js} +20 -20
- package/dist/{encryption-guidance-BPRK7Uku.js → encryption-guidance-C3e_Pa6m.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +19 -19
- package/dist/extensions/amazon-bedrock/index.js +19 -19
- package/dist/extensions/anthropic/index.js +20 -20
- package/dist/extensions/anthropic/media-understanding-provider.js +2 -2
- package/dist/extensions/bluebubbles/api.js +23 -23
- package/dist/extensions/bluebubbles/index.js +24 -24
- package/dist/extensions/bluebubbles/runtime-api.js +19 -19
- package/dist/extensions/bluebubbles/setup-entry.js +21 -21
- package/dist/extensions/byteplus/index.js +19 -19
- package/dist/extensions/chutes/index.js +20 -20
- package/dist/extensions/cloudflare-ai-gateway/index.js +19 -19
- package/dist/extensions/deepgram/audio.js +1 -1
- package/dist/extensions/deepgram/index.js +1 -1
- package/dist/extensions/deepgram/media-understanding-provider.js +1 -1
- package/dist/extensions/device-pair/api.js +19 -19
- package/dist/extensions/device-pair/index.js +19 -19
- package/dist/extensions/device-pair/notify.js +19 -19
- package/dist/extensions/device-pair/qr-image.js +19 -19
- package/dist/extensions/discord/api.js +19 -19
- package/dist/extensions/discord/index.js +27 -27
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2021-11-03/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2021-11-03/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-01-31/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-01-31/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-03-21/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-03-21/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-08-04/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-08-04/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-10-31/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-10-31/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-11-30/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2022-11-30/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2023-03-01/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2023-03-01/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2023-07-01/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/2023-07-01/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/experimental/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/experimental/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/latest/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/latest/index.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/oldest/index.d.ts +0 -0
- package/dist/extensions/discord/node_modules/@cloudflare/workers-types/oldest/index.ts +0 -0
- package/dist/extensions/discord/node_modules/opusscript/build/opusscript_native_wasm.wasm +0 -0
- package/dist/extensions/discord/runtime-api.js +29 -29
- package/dist/extensions/discord/setup-entry.js +22 -22
- package/dist/extensions/elevenlabs/index.js +19 -19
- package/dist/extensions/elevenlabs/speech-provider.js +19 -19
- package/dist/extensions/fal/image-generation-provider.js +20 -20
- package/dist/extensions/fal/index.js +20 -20
- package/dist/extensions/feishu/api.js +19 -19
- package/dist/extensions/feishu/index.js +22 -22
- package/dist/extensions/feishu/node_modules/axios/lib/adapters/http.js +0 -0
- package/dist/extensions/feishu/runtime-api.js +19 -19
- package/dist/extensions/feishu/setup-api.js +19 -19
- package/dist/extensions/feishu/setup-entry.js +20 -20
- package/dist/extensions/firecrawl/index.js +19 -19
- package/dist/extensions/github-copilot/index.js +20 -20
- package/dist/extensions/github-copilot/login.js +19 -19
- package/dist/extensions/google/gemini-cli-provider.js +19 -19
- package/dist/extensions/google/image-generation-provider.js +19 -19
- package/dist/extensions/google/index.js +19 -19
- package/dist/extensions/google/media-understanding-provider.js +2 -2
- package/dist/extensions/google/oauth.flow.js +19 -19
- package/dist/extensions/google/oauth.http.js +19 -19
- package/dist/extensions/google/oauth.js +19 -19
- package/dist/extensions/google/oauth.project.js +19 -19
- package/dist/extensions/google/oauth.runtime.js +19 -19
- package/dist/extensions/google/oauth.token.js +19 -19
- package/dist/extensions/googlechat/api.js +19 -19
- package/dist/extensions/googlechat/index.js +20 -20
- package/dist/extensions/googlechat/runtime-api.js +19 -19
- package/dist/extensions/googlechat/setup-entry.js +20 -20
- package/dist/extensions/groq/index.js +1 -1
- package/dist/extensions/groq/media-understanding-provider.js +1 -1
- package/dist/extensions/huggingface/index.js +19 -19
- package/dist/extensions/imessage/api.js +19 -19
- package/dist/extensions/imessage/index.js +23 -23
- package/dist/extensions/imessage/runtime-api.js +20 -20
- package/dist/extensions/imessage/setup-entry.js +23 -23
- package/dist/extensions/irc/api.js +19 -19
- package/dist/extensions/irc/index.js +21 -21
- package/dist/extensions/irc/setup-entry.js +20 -20
- package/dist/extensions/kilocode/index.js +19 -19
- package/dist/extensions/kimi-coding/index.js +19 -19
- package/dist/extensions/line/api.js +19 -19
- package/dist/extensions/line/index.js +21 -21
- package/dist/extensions/line/runtime-api.js +19 -19
- package/dist/extensions/line/setup-api.js +19 -19
- package/dist/extensions/line/setup-entry.js +21 -21
- package/dist/extensions/lobster/index.js +19 -19
- package/dist/extensions/lobster/runtime-api.js +19 -19
- package/dist/extensions/matrix/api.js +28 -28
- package/dist/extensions/matrix/helper-api.js +20 -20
- package/dist/extensions/matrix/index.js +32 -32
- package/dist/extensions/matrix/runtime-api.js +20 -20
- package/dist/extensions/matrix/setup-entry.js +27 -27
- package/dist/extensions/mattermost/api.js +20 -20
- package/dist/extensions/mattermost/index.js +21 -21
- package/dist/extensions/mattermost/runtime-api.js +19 -19
- package/dist/extensions/mattermost/setup-entry.js +20 -20
- package/dist/extensions/microsoft/index.js +19 -19
- package/dist/extensions/microsoft/speech-provider.js +19 -19
- package/dist/extensions/microsoft-foundry/auth.js +19 -19
- package/dist/extensions/microsoft-foundry/cli.js +19 -19
- package/dist/extensions/microsoft-foundry/index.js +19 -19
- package/dist/extensions/microsoft-foundry/onboard.js +19 -19
- package/dist/extensions/microsoft-foundry/provider.js +19 -19
- package/dist/extensions/microsoft-foundry/runtime.js +19 -19
- package/dist/extensions/microsoft-foundry/shared-runtime.js +19 -19
- package/dist/extensions/microsoft-foundry/shared.js +19 -19
- package/dist/extensions/minimax/image-generation-provider.js +20 -20
- package/dist/extensions/minimax/index.js +21 -21
- package/dist/extensions/minimax/media-understanding-provider.js +2 -2
- package/dist/extensions/minimax/oauth.js +20 -20
- package/dist/extensions/minimax/oauth.runtime.js +20 -20
- package/dist/extensions/mistral/index.js +2 -2
- package/dist/extensions/mistral/media-understanding-provider.js +2 -2
- package/dist/extensions/moonshot/index.js +19 -19
- package/dist/extensions/moonshot/media-understanding-provider.js +2 -2
- package/dist/extensions/msteams/api.js +21 -21
- package/dist/extensions/msteams/index.js +22 -22
- package/dist/extensions/msteams/runtime-api.js +19 -19
- package/dist/extensions/msteams/setup-entry.js +22 -22
- package/dist/extensions/nextcloud-talk/api.js +20 -20
- package/dist/extensions/nextcloud-talk/index.js +21 -21
- package/dist/extensions/nextcloud-talk/runtime-api.js +19 -19
- package/dist/extensions/nextcloud-talk/setup-entry.js +20 -20
- package/dist/extensions/nostr/api.js +19 -19
- package/dist/extensions/nostr/index.js +21 -21
- package/dist/extensions/nostr/runtime-api.js +19 -19
- package/dist/extensions/nostr/setup-api.js +20 -20
- package/dist/extensions/nostr/setup-entry.js +21 -21
- package/dist/extensions/openai/image-generation-provider.js +20 -20
- package/dist/extensions/openai/index.js +24 -24
- package/dist/extensions/openai/media-understanding-provider.js +2 -2
- package/dist/extensions/openai/openai-codex-provider.js +21 -21
- package/dist/extensions/openai/openai-codex-provider.runtime.js +19 -19
- package/dist/extensions/openai/openai-provider.js +20 -20
- package/dist/extensions/openai/speech-provider.js +19 -19
- package/dist/extensions/opencode/index.js +19 -19
- package/dist/extensions/opencode-go/index.js +19 -19
- package/dist/extensions/openrouter/index.js +19 -19
- package/dist/extensions/sglang/index.js +19 -19
- package/dist/extensions/signal/api.js +19 -19
- package/dist/extensions/signal/index.js +22 -22
- package/dist/extensions/signal/runtime-api.js +19 -19
- package/dist/extensions/signal/setup-entry.js +22 -22
- package/dist/extensions/slack/api.js +19 -19
- package/dist/extensions/slack/index.js +23 -23
- package/dist/extensions/slack/node_modules/.package-lock.json +11 -8
- package/dist/extensions/slack/node_modules/axios/README.md +26 -1
- package/dist/extensions/slack/node_modules/axios/dist/axios.js +91 -100
- package/dist/extensions/slack/node_modules/axios/dist/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js +2 -2
- package/dist/extensions/slack/node_modules/axios/dist/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs +70 -84
- package/dist/extensions/slack/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js +99 -116
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/dist/extensions/slack/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs +1421 -2367
- package/dist/extensions/slack/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/adapters/fetch.js +5 -1
- package/dist/extensions/slack/node_modules/axios/lib/adapters/http.js +5 -2
- package/dist/extensions/slack/node_modules/axios/lib/core/Axios.js +0 -2
- package/dist/extensions/slack/node_modules/axios/lib/core/AxiosHeaders.js +3 -1
- package/dist/extensions/slack/node_modules/axios/lib/env/data.js +1 -1
- package/dist/extensions/slack/node_modules/axios/lib/helpers/buildURL.js +2 -2
- package/dist/extensions/slack/node_modules/axios/package.json +93 -132
- package/dist/extensions/slack/node_modules/proxy-from-env/README.md +43 -11
- package/dist/extensions/slack/node_modules/proxy-from-env/index.cjs +105 -0
- package/dist/extensions/slack/node_modules/proxy-from-env/index.js +14 -19
- package/dist/extensions/slack/node_modules/proxy-from-env/package.json +20 -11
- package/dist/extensions/slack/node_modules/semver/bin/semver.js +0 -0
- package/dist/extensions/slack/runtime-api.js +23 -23
- package/dist/extensions/slack/setup-entry.js +22 -22
- package/dist/extensions/synology-chat/index.js +21 -21
- package/dist/extensions/synology-chat/setup-api.js +19 -19
- package/dist/extensions/synology-chat/setup-entry.js +20 -20
- package/dist/extensions/tavily/index.js +19 -19
- package/dist/extensions/telegram/api.js +19 -19
- package/dist/extensions/telegram/index.js +21 -21
- package/dist/extensions/telegram/node_modules/bottleneck/scripts/build.sh +0 -0
- package/dist/extensions/telegram/node_modules/bottleneck/scripts/test_all.sh +0 -0
- package/dist/extensions/telegram/runtime-api.js +19 -19
- package/dist/extensions/telegram/setup-entry.js +21 -21
- package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/bin/tlon.js +0 -0
- package/dist/extensions/tlon/bundled-skills/@tloncorp/tlon-skill/scripts/postinstall.js +0 -0
- package/dist/extensions/tlon/index.js +20 -20
- package/dist/extensions/tlon/setup-api.js +19 -19
- package/dist/extensions/tlon/setup-entry.js +20 -20
- package/dist/extensions/twitch/index.js +19 -19
- package/dist/extensions/vllm/index.js +19 -19
- package/dist/extensions/voice-call/api.js +19 -19
- package/dist/extensions/voice-call/index.js +19 -19
- package/dist/extensions/voice-call/runtime-api.js +19 -19
- package/dist/extensions/volcengine/index.js +19 -19
- package/dist/extensions/whatsapp/action-runtime-api.js +23 -23
- package/dist/extensions/whatsapp/action-runtime.runtime.js +23 -23
- package/dist/extensions/whatsapp/api.js +22 -22
- package/dist/extensions/whatsapp/auth-presence.js +19 -19
- package/dist/extensions/whatsapp/index.js +25 -25
- package/dist/extensions/whatsapp/light-runtime-api.js +22 -22
- package/dist/extensions/whatsapp/login-qr-api.js +21 -21
- package/dist/extensions/whatsapp/runtime-api.js +25 -25
- package/dist/extensions/whatsapp/setup-entry.js +23 -23
- package/dist/extensions/xai/index.js +19 -19
- package/dist/extensions/zai/index.js +20 -20
- package/dist/extensions/zai/media-understanding-provider.js +2 -2
- package/dist/extensions/zalo/api.js +19 -19
- package/dist/extensions/zalo/index.js +21 -21
- package/dist/extensions/zalo/runtime-api.js +19 -19
- package/dist/extensions/zalo/setup-entry.js +20 -20
- package/dist/extensions/zalouser/api.js +19 -19
- package/dist/extensions/zalouser/index.js +21 -21
- package/dist/extensions/zalouser/runtime-api.js +19 -19
- package/dist/extensions/zalouser/setup-entry.js +20 -20
- package/dist/{feishu-032avHo-.js → feishu-DAfm89Ne.js} +2 -2
- package/dist/{gateway-cli-B6RmL7DU.js → gateway-cli-DQ5fdSX-.js} +52 -52
- package/dist/{get-reply-from-config.runtime-CNXikh4t.js → get-reply-from-config.runtime-1QHXDFiF.js} +19 -19
- package/dist/{health-jAeEfKcx.js → health-Ch5rG-yt.js} +2 -2
- package/dist/{health-Cr2RHats.js → health-U_VD3M-X.js} +1 -1
- package/dist/{helper-api-D4pFdc-A.js → helper-api-sb3px4St.js} +1 -1
- package/dist/{hooks-cli-OhIK-Jwz.js → hooks-cli-C-IJXJJK.js} +27 -27
- package/dist/{image-MtAkUhKP.js → image-DYAVm4B_.js} +19 -19
- package/dist/{image-generation-provider-D8YsS1rn.js → image-generation-provider-B6HOHZPa.js} +1 -1
- package/dist/{image-generation-provider-CpNAFwzF.js → image-generation-provider-BZUvqThx.js} +1 -1
- package/dist/{image-generation-provider-UYEVOEd0.js → image-generation-provider-CdSWrVdg.js} +1 -1
- package/dist/{imessage-D0fRSnp0.js → imessage-BpHhiPZ8.js} +5 -5
- package/dist/{imessage-B9WX3VyA.js → imessage-CmTkA3tu.js} +20 -20
- package/dist/{imessage-DA6FgvBt.js → imessage-DQ7mZxR2.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/{input-files-1btaqY7P.js → input-files-BaH2xNfq.js} +1 -1
- package/dist/{irc-YBAB_ERE.js → irc-DcCw8fHY.js} +2 -2
- package/dist/{kb-cli-DgdR904k.js → kb-cli-CZO3ntYH.js} +6 -6
- package/dist/{level-overrides-DuwDsvf4.js → level-overrides-DXdu8VWh.js} +3 -3
- package/dist/{library-8bTT9vzg.js → library-C1zzlE79.js} +19 -19
- package/dist/{line-Bzir-OER.js → line-ch3hQ4Ib.js} +2 -2
- package/dist/{llm-slug-generator-CyV5su8d.js → llm-slug-generator-0dp6rtz_.js} +1 -1
- package/dist/llm-slug-generator.js +20 -20
- package/dist/{login-qr-DIGtSUSe.js → login-qr-DZgP1-xQ.js} +21 -21
- package/dist/{login-qr-C787VIZB.js → login-qr-Lby65pZK.js} +2 -2
- package/dist/{manager.runtime-BiGaBsRN.js → manager.runtime-DBDC0R6Y.js} +19 -19
- package/dist/{matrix-B8InU2XN.js → matrix-CTk91yTE.js} +1 -1
- package/dist/{matrix-migration-snapshot-BV2mwHhy.js → matrix-migration-snapshot-Bw4V54U6.js} +1 -1
- package/dist/{mattermost-CFQiUJCu.js → mattermost-CHxzUt1o.js} +2 -2
- package/dist/{media-understanding-BXkVRtCI.js → media-understanding-UMiRWD8-.js} +1 -1
- package/dist/{media-understanding-provider-DIdBJ9Xp.js → media-understanding-provider-B-6a8wqe.js} +1 -1
- package/dist/{media-understanding-provider-8FcgSAxz.js → media-understanding-provider-BtI-QryE.js} +1 -1
- package/dist/{media-understanding-provider-CI5MQviC.js → media-understanding-provider-CglfyjQc.js} +1 -1
- package/dist/{media-understanding-provider-BcCjF67F.js → media-understanding-provider-CrwMKCZN.js} +1 -1
- package/dist/{media-understanding-provider-CsJmTq35.js → media-understanding-provider-CwqqqVIn.js} +1 -1
- package/dist/{media-understanding-provider-CBOmy0_0.js → media-understanding-provider-Df8pFj5j.js} +1 -1
- package/dist/{media-understanding-provider-BgyEbqug.js → media-understanding-provider-LV6EOUbK.js} +1 -1
- package/dist/{media-understanding.runtime-DVVJmGSv.js → media-understanding.runtime-DzuRi3ex.js} +19 -19
- package/dist/{memory-cli-CmlCSSU8.js → memory-cli-B6ntRRG3.js} +1 -1
- package/dist/{memory-cli.runtime-Z_TFVK44.js → memory-cli.runtime-B0WsFtO6.js} +20 -20
- package/dist/{memory-tool.runtime-CbpALwGz.js → memory-tool.runtime-G24H6pM2.js} +8 -8
- package/dist/{message-handler-DJCUJDuA.js → message-handler-DgKm2IRd.js} +5 -5
- package/dist/{model-catalog.runtime-2xR9DL3-.js → model-catalog.runtime-Brzzbmjx.js} +19 -19
- package/dist/{model-picker-Dru3xiO2.js → model-picker-DnZzHtjs.js} +2 -2
- package/dist/{model-picker-6CJrma4y.js → model-picker-TgAPF80l.js} +20 -20
- package/dist/{model-picker.runtime-BXOTybjR.js → model-picker.runtime-DYyDSe3Y.js} +21 -21
- package/dist/{model-suppression.runtime-Ch3LqX5E.js → model-suppression.runtime-CmmbaqiG.js} +19 -19
- package/dist/{models-DQKHO2UC.js → models-BypV4e0x.js} +23 -23
- package/dist/{models-CaJUrFJw.js → models-C4I-QaFn.js} +5 -5
- package/dist/{models-cli-DkSoyfO3.js → models-cli-yxlL4EE5.js} +23 -23
- package/dist/{models-config-DZWh3wCS.js → models-config-3u--_pML.js} +19 -19
- package/dist/{models-config.runtime-Csw9D9Eh.js → models-config.runtime-5gbgiQPZ.js} +19 -19
- package/dist/{mongodb-analytics-CrA0mSGw.js → mongodb-analytics-BSMApVSO.js} +2 -2
- package/dist/{mongodb-analytics-DrEyw-zF.js → mongodb-analytics-qg8zwvek.js} +1 -1
- package/dist/{mongodb-kb-DUUWKxNi.js → mongodb-kb-CumfgJ4z.js} +1 -1
- package/dist/{mongodb-kb-search-BGTpjjGf.js → mongodb-kb-search-BhNWYrUs.js} +3 -3
- package/dist/{mongodb-kb-search-Cgkz-lmv.js → mongodb-kb-search-CeBKQO-B.js} +1 -1
- package/dist/{mongodb-manager-BV_j5Yce.js → mongodb-manager--Zs-oIkk.js} +626 -99
- package/dist/{mongodb-manager-Biv93U0H.js → mongodb-manager-CPfoxQj8.js} +7 -7
- package/dist/{mongodb-procedures-DnwLD-cO.js → mongodb-procedures-CobuqpD2.js} +2 -2
- package/dist/{mongodb-procedures-Cw_cRVPq.js → mongodb-procedures-DAM6zeem.js} +3 -3
- package/dist/{mongodb-schema-BVL5w9BA.js → mongodb-schema-Bsgr9q6v.js} +1 -1
- package/dist/{mongodb-schema-GMwMn5aY.js → mongodb-schema-CJHFxfrx.js} +118 -30
- package/dist/{mongodb-search-DLeKW4uS.js → mongodb-search-BHRn7dF1.js} +1 -1
- package/dist/{mongodb-structured-memory-B-kVmcth.js → mongodb-structured-memory-BlYP5KWD.js} +2 -2
- package/dist/{mongodb-structured-memory-0q2ekhJA.js → mongodb-structured-memory-D4lNdWB9.js} +3 -3
- package/dist/{monitor-CDt0S8xC.js → monitor-CDfWpqcx.js} +27 -27
- package/dist/{monitor-C69ir4uG.js → monitor-CIToiuwg.js} +19 -19
- package/dist/{monitor-Xo3VU-wW.js → monitor-CIfR6zbp.js} +19 -19
- package/dist/{monitor-DRB_fLkJ.js → monitor-COiWsxl7.js} +20 -20
- package/dist/{monitor-BIyUFMVX.js → monitor-C_SOlJ_G.js} +1 -1
- package/dist/{monitor-SuEcqRu3.js → monitor-JPdN6WeQ.js} +3 -3
- package/dist/{nextcloud-talk-agsgfFjz.js → nextcloud-talk-1Gt8afk_.js} +2 -2
- package/dist/{node-cli-DofJfBBE.js → node-cli-CT38_Wdg.js} +19 -19
- package/dist/{nodes-cli-SNw1MX_K.js → nodes-cli-CyiFT1SQ.js} +19 -19
- package/dist/{oauth-DBzhQTd_.js → oauth-BpzyXsae.js} +1 -1
- package/dist/{onboard-CvTseD2x.js → onboard-CbfnxuTW.js} +4 -4
- package/dist/{onboard-channels-GUcSQbZH.js → onboard-channels-CdMbn_WA.js} +68 -68
- package/dist/{onboard-channels-Bo5d3rof.js → onboard-channels-DmJdrOkU.js} +21 -21
- package/dist/{onboard-custom-DwgQ4K34.js → onboard-custom-Ze5mpBkN.js} +21 -21
- package/dist/{onboard-custom-jzmYeBPE.js → onboard-custom-lcCTz5S-.js} +1 -1
- package/dist/{onboard-search-BFP8baYg.js → onboard-search-de3_TfoC.js} +19 -19
- package/dist/{onboarding-memory-K_kjXDqY.js → onboarding-memory-CJaXaUlN.js} +2 -2
- package/dist/{openai-codex-provider-BRyHUGXD.js → openai-codex-provider-BEv_ZLte.js} +2 -2
- package/dist/{openai-provider-BhmM1Cq4.js → openai-provider-CzynW3Tk.js} +1 -1
- package/dist/{openclaw-tools.runtime-BiR0y2tq.js → openclaw-tools.runtime-C-MSNR-3.js} +19 -19
- package/dist/{pi-embedded-Co091_an.js → pi-embedded-BTJ6JO78.js} +39 -39
- package/dist/{pi-embedded.runtime-aBYwZl1k.js → pi-embedded.runtime-BgDuoU-k.js} +19 -19
- package/dist/{plugin-entry.runtime-CBQYDDSg.js → plugin-entry.runtime-DhIWzVPR.js} +25 -25
- package/dist/{plugin-install-Bq-UaXp5.js → plugin-install-CJtPpsUE.js} +20 -20
- package/dist/{plugin-install-DYdfHNHF.js → plugin-install-DttRvMaB.js} +1 -1
- package/dist/{plugin-install-config-policy-CAUakocL.js → plugin-install-config-policy-BNbWWW2z.js} +1 -1
- package/dist/{plugin-registry-DkTJiea7.js → plugin-registry-B3vXGLpf.js} +1 -1
- package/dist/{plugin-registry-E-375dF2.js → plugin-registry-DkyxmvO6.js} +20 -20
- package/dist/plugin-sdk/account-resolution.js +19 -19
- package/dist/plugin-sdk/agent-runtime.js +19 -19
- package/dist/plugin-sdk/allow-from.js +19 -19
- package/dist/plugin-sdk/bluebubbles.js +19 -19
- package/dist/plugin-sdk/channel-config-helpers.js +19 -19
- package/dist/plugin-sdk/channel-inbound.js +19 -19
- package/dist/plugin-sdk/channel-policy.js +19 -19
- package/dist/plugin-sdk/channel-runtime.js +19 -19
- package/dist/plugin-sdk/command-auth.js +19 -19
- package/dist/plugin-sdk/compat.js +19 -19
- package/dist/plugin-sdk/core.js +19 -19
- package/dist/plugin-sdk/directory-runtime.js +1 -1
- package/dist/plugin-sdk/discord.js +29 -29
- package/dist/plugin-sdk/feishu.js +19 -19
- package/dist/plugin-sdk/googlechat.js +19 -19
- package/dist/plugin-sdk/image-generation-core.js +19 -19
- package/dist/plugin-sdk/image-generation.js +21 -21
- package/dist/plugin-sdk/imessage-core.js +19 -19
- package/dist/plugin-sdk/imessage.js +20 -20
- package/dist/plugin-sdk/index.js +21 -21
- package/dist/plugin-sdk/infra-runtime.js +19 -19
- package/dist/plugin-sdk/irc.js +19 -19
- package/dist/plugin-sdk/line-core.js +19 -19
- package/dist/plugin-sdk/line-runtime.js +19 -19
- package/dist/plugin-sdk/line.js +19 -19
- package/dist/plugin-sdk/matrix-runtime-heavy.js +21 -21
- package/dist/plugin-sdk/matrix.js +20 -20
- package/dist/plugin-sdk/mattermost.js +19 -19
- package/dist/plugin-sdk/media-runtime.js +19 -19
- package/dist/plugin-sdk/media-understanding-runtime.js +19 -19
- package/dist/plugin-sdk/media-understanding.js +1 -1
- package/dist/plugin-sdk/msteams.js +19 -19
- package/dist/plugin-sdk/nextcloud-talk.js +19 -19
- package/dist/plugin-sdk/nostr.js +19 -19
- package/dist/plugin-sdk/plugin-runtime.js +19 -19
- package/dist/plugin-sdk/provider-auth-api-key.js +2 -2
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth.js +19 -19
- package/dist/plugin-sdk/provider-stream.js +19 -19
- package/dist/plugin-sdk/reply-runtime.js +19 -19
- package/dist/plugin-sdk/signal.js +19 -19
- package/dist/plugin-sdk/slack.js +23 -23
- package/dist/plugin-sdk/speech-core.js +19 -19
- package/dist/plugin-sdk/speech-runtime.js +19 -19
- package/dist/plugin-sdk/speech.js +19 -19
- package/dist/plugin-sdk/src/memory/index.d.ts +1 -1
- package/dist/plugin-sdk/src/memory/mongodb-manager.d.ts +21 -1
- package/dist/plugin-sdk/src/memory/mongodb-query-cache.d.ts +3 -0
- package/dist/plugin-sdk/src/memory/mongodb-retrieval-planner.d.ts +7 -0
- package/dist/plugin-sdk/src/memory/mongodb-search-executor.d.ts +78 -0
- package/dist/plugin-sdk/src/memory/types.d.ts +82 -0
- package/dist/plugin-sdk/telegram.js +19 -19
- package/dist/plugin-sdk/voice-call.js +19 -19
- package/dist/plugin-sdk/whatsapp-core.js +22 -22
- package/dist/plugin-sdk/whatsapp-shared.js +19 -19
- package/dist/plugin-sdk/zalo.js +19 -19
- package/dist/plugin-sdk/zalouser.js +19 -19
- package/dist/plugins/build-smoke-entry.js +19 -19
- package/dist/plugins/provider-runtime.runtime.js +1 -1
- package/dist/plugins/runtime/index.js +32 -32
- package/dist/{plugins-cli-DfF6zVw5.js → plugins-cli-ut4oj3do.js} +27 -27
- package/dist/{plugins-command-helpers-CwQ6OC2v.js → plugins-command-helpers-rvnvcYxr.js} +1 -1
- package/dist/{plugins-install-persist-1OHlLaq2.js → plugins-install-persist-IutOzOB6.js} +1 -1
- package/dist/{plugins-update-command-BXC9BF3H.js → plugins-update-command-C_fel82u.js} +4 -4
- package/dist/{poll-summary-DhAosjGw.js → poll-summary-CNG8Fusj.js} +1 -1
- package/dist/{preflight-audio.runtime-C85FHgtP.js → preflight-audio.runtime-Yht_V1Le.js} +19 -19
- package/dist/{probe-DjQoKbwz.js → probe-D72rl6CO.js} +1 -1
- package/dist/{profile-update-DYmh_XMw.js → profile-update-B5Z8ilIa.js} +3 -3
- package/dist/{program-DbqKjPvP.js → program-4TMxpZy_.js} +26 -26
- package/dist/{prompt-select-styled-CI9PmwhK.js → prompt-select-styled-BLu5H3Iu.js} +102 -20
- package/dist/{provider-BK7pHDG6.js → provider-7_3-BcYG.js} +10 -10
- package/dist/{provider-auth-choice-oRq4HV9r.js → provider-auth-choice-BddX8_Ml.js} +1 -1
- package/dist/{provider-auth-choice-preference-yjBut-C5.js → provider-auth-choice-preference-CrnnKpVA.js} +2 -2
- package/dist/{provider-auth-choice.runtime-B-qUcAA_.js → provider-auth-choice.runtime-BGE7w978.js} +2 -2
- package/dist/{provider-auth-choice.runtime-eOUq3Tf2.js → provider-auth-choice.runtime-Bu1ZtMTk.js} +21 -21
- package/dist/{provider-auth-guidance-DvSjjID0.js → provider-auth-guidance-DS2ZuTD0.js} +1 -1
- package/dist/{provider-auth-login-CH373M_7.js → provider-auth-login-C1r5GM4i.js} +1 -1
- package/dist/{provider-auth-login.runtime-DVRRk8I2.js → provider-auth-login.runtime-Dk6_ZqRz.js} +19 -19
- package/dist/{provider-runtime-Bbtb5Zog.js → provider-runtime-CJEWm23t.js} +19 -19
- package/dist/{provider-runtime.runtime-B-d-D5Kz.js → provider-runtime.runtime-DDgrBRLf.js} +1 -1
- package/dist/{provider-session.runtime-wDrkFHvn.js → provider-session.runtime-BkTJMsCn.js} +23 -23
- package/dist/{provider-usage-gzNKR4mS.js → provider-usage-CRyRjyGd.js} +19 -19
- package/dist/{provider-wizard-hN_fAXfG.js → provider-wizard-BsQikn24.js} +1 -1
- package/dist/{provider.runtime-DwN-v881.js → provider.runtime-xMrL_pJh.js} +25 -25
- package/dist/{push-apns-C5Uk-nC3.js → push-apns-DAkue9zw.js} +1 -1
- package/dist/{qr-cli-DOYdibf2.js → qr-cli-BYzDr-x-.js} +20 -20
- package/dist/{qr-cli-BbuWpIuy.js → qr-cli-CeiE35Dc.js} +1 -1
- package/dist/{read-only-account-inspect-w1amnKer.js → read-only-account-inspect-BTQe0sT8.js} +3 -3
- package/dist/{read-only-account-inspect.discord.runtime-D2cC-4_X.js → read-only-account-inspect.discord.runtime-C-IO6zkd.js} +19 -19
- package/dist/{read-only-account-inspect.slack.runtime-ZP9jhJcE.js → read-only-account-inspect.slack.runtime-BQAZCGkh.js} +19 -19
- package/dist/{read-only-account-inspect.telegram.runtime-BpZ-3hxu.js → read-only-account-inspect.telegram.runtime-DqN2PI7b.js} +19 -19
- package/dist/{register.agent-DiQgJ89K.js → register.agent-D_b9lTfb.js} +79 -79
- package/dist/{register.configure-CtFlREe1.js → register.configure-BLtqPmam.js} +80 -80
- package/dist/{register.maintenance-BhnKvBAb.js → register.maintenance-Bk-Hn7SB.js} +35 -35
- package/dist/{register.message-CUkFT4PI.js → register.message-Bu-OcxdA.js} +20 -20
- package/dist/{register.onboard-BQxwgj-_.js → register.onboard-BTFDvscE.js} +24 -24
- package/dist/{register.setup-CLjB8Dtk.js → register.setup-sVqaV2FT.js} +22 -22
- package/dist/{register.status-health-sessions-DdHFD-kt.js → register.status-health-sessions-BU1bXsrQ.js} +25 -25
- package/dist/{register.subclis-B4zf3Nuq.js → register.subclis-B1qOtFfK.js} +18 -18
- package/dist/{register.subclis-CVzODp-F.js → register.subclis-CLaHGSD-.js} +1 -1
- package/dist/{replies-D3IVK5Zm.js → replies-CgFl5Aw7.js} +1 -1
- package/dist/{reply-payloads-dedupe.runtime-BbYht9yH.js → reply-payloads-dedupe.runtime-BWGZO04T.js} +19 -19
- package/dist/{resolve-allowlist-BgUySVP0.js → resolve-allowlist-DbwZKnpW.js} +1 -1
- package/dist/{resolve-channels-ChqMQdlk.js → resolve-channels-B7Ufe43c.js} +2 -2
- package/dist/{resolve-targets-CkaDv15d.js → resolve-targets-CzJQrNp5.js} +1 -1
- package/dist/{resolve-users-CWreAWn8.js → resolve-users-PZ9SfZPy.js} +1 -1
- package/dist/{resolve-users-KHapSSfM.js → resolve-users-rHAqZUhg.js} +1 -1
- package/dist/{route-reply.runtime-CnaIn-qC.js → route-reply.runtime-B8ftgCm9.js} +19 -19
- package/dist/{route-resolution-C_EcVPhm.js → route-resolution-y0cc0LsM.js} +1 -1
- package/dist/{run-main-BsVSrcN_.js → run-main-C6oLk7UA.js} +17 -17
- package/dist/{runtime-5FvGEKxh.js → runtime-C5LUWYAK.js} +182 -27
- package/dist/{runtime-api-CVKb2LXQ.js → runtime-api-BPWBJF1r.js} +1 -1
- package/dist/{runtime-api-Dgo4Q55T.js → runtime-api-BqegFQ1W.js} +1 -1
- package/dist/{runtime-api-BErp2YEb.js → runtime-api-Cvm0N8kC.js} +7 -7
- package/dist/{runtime-discord-ops.runtime-Chk1BYXI.js → runtime-discord-ops.runtime-BCqCLCzH.js} +29 -29
- package/dist/{runtime-embedded-pi.runtime-BZQ5kX8u.js → runtime-embedded-pi.runtime-r03F73VL.js} +19 -19
- package/dist/{runtime-media-understanding.runtime-D2FcTJOu.js → runtime-media-understanding.runtime-BwZKC8rO.js} +19 -19
- package/dist/{runtime-model-auth.runtime-Z-OqYqyi.js → runtime-model-auth.runtime-DLewLudS.js} +19 -19
- package/dist/{runtime-schema-Cqjdf8in.js → runtime-schema-CBiwYCmy.js} +2 -2
- package/dist/{runtime-slack-ops.runtime-AL97qKPw.js → runtime-slack-ops.runtime-CUkNfhY5.js} +23 -23
- package/dist/{runtime-telegram-ops.runtime-DxfCchkI.js → runtime-telegram-ops.runtime-qIwp5p7q.js} +19 -19
- package/dist/{runtime-tts.runtime-BlmtrtjE.js → runtime-tts.runtime-CC3F0FOC.js} +19 -19
- package/dist/{search-manager-CGO-3dKu.js → search-manager-D_BnmkI_.js} +1 -1
- package/dist/{search-manager-CS9u92oP.js → search-manager-IcYZu7aE.js} +1 -1
- package/dist/{secrets-cli-DUZNkEFh.js → secrets-cli-8CycF-5i.js} +19 -19
- package/dist/{security-cli-rV3d5xoZ.js → security-cli-E-X2Uzs0.js} +20 -20
- package/dist/{send-B0xLU00X.js → send-Cgo9NxMT.js} +5 -5
- package/dist/{server-node-events-B5MIqHgC.js → server-node-events-lK9q3nqZ.js} +20 -20
- package/dist/{server-startup-matrix-migration-CpXrqvXI.js → server-startup-matrix-migration-ByASvLuc.js} +2 -2
- package/dist/{session-wGltxAdM.js → session-BBsZKt5n.js} +1 -1
- package/dist/{session-cost-usage-CwCnoOHW.js → session-cost-usage-D6n4vBJx.js} +1 -1
- package/dist/{session-cost-usage-DTYqtcLN.js → session-cost-usage-VvM6PPmc.js} +20 -20
- package/dist/{session-system-events-Bp6nE5En.js → session-system-events-DSTdWdbE.js} +1 -1
- package/dist/{session-updates.runtime-OfmZ7igB.js → session-updates.runtime-BFBXRe-j.js} +3 -3
- package/dist/{sessions-BU2oWFP1.js → sessions-DRy1UI3l.js} +2 -2
- package/dist/{sessions-DhCUH5Gr.js → sessions-DyzSGMVD.js} +20 -20
- package/dist/{setup-O9acDtfi.js → setup-BINrlDkd.js} +9 -9
- package/dist/{setup-core-D4kXAbMv.js → setup-core-1UbYG-pF.js} +1 -1
- package/dist/{setup-core-BeCRtZtb.js → setup-core-BhIi9PVc.js} +1 -1
- package/dist/{setup-core-CJ1YGhvT.js → setup-core-CGwCnv7D.js} +2 -2
- package/dist/{setup-core-DCJBGsVz.js → setup-core-CLQmmwkw.js} +1 -1
- package/dist/{setup-entry-rsEnOaFI.js → setup-entry-B9BscY1h.js} +3 -3
- package/dist/{setup-entry-B292hKEh.js → setup-entry-Cr84K4Uh.js} +2 -2
- package/dist/{setup-entry-C9TrfYIV.js → setup-entry-Dbpj9LvN.js} +3 -3
- package/dist/{setup-entry-DVwdntnF.js → setup-entry-_d3sU_VL.js} +2 -2
- package/dist/{setup-entry-ThbCklDH.js → setup-entry-lfZ4hXP4.js} +3 -3
- package/dist/{setup-entry-Cw06Kmxh.js → setup-entry-tRK0vqq9.js} +2 -2
- package/dist/{setup-surface-i3fRyh0E.js → setup-surface-14luDtku.js} +2 -2
- package/dist/{setup-surface-C0649DZF.js → setup-surface-BAoLAVIS.js} +1 -1
- package/dist/{setup-surface-LQP0zEJw.js → setup-surface-BSPQE-EJ.js} +22 -22
- package/dist/{setup-surface-Ddhe1d6X.js → setup-surface-Bq8CCsw0.js} +2 -2
- package/dist/{setup-surface-CeNYw1hO.js → setup-surface-Cq7PnSWt.js} +1 -1
- package/dist/{setup.finalize-BFW127lu.js → setup.finalize-B6VOfrgd.js} +27 -27
- package/dist/{shared-CduAoq6D.js → shared-B0okQn9t.js} +2 -2
- package/dist/{shared-Bv7D0cvs.js → shared-B4mgl1hs.js} +3 -3
- package/dist/{shared-DxWAkuUd.js → shared-MnhwscPz.js} +3 -3
- package/dist/{shared-DjTqchJL.js → shared-cSJLw4mZ.js} +1 -1
- package/dist/{shared-B_m8rpzz.js → shared-cyAcNs5Z.js} +1 -1
- package/dist/{shared-BvXSIdhL.js → shared-sW0JYaOH.js} +3 -3
- package/dist/{signal-B3JE51EF.js → signal-BAZKGRfn.js} +19 -19
- package/dist/{signal-BOqRoG7_.js → signal-C36jfJU3.js} +3 -3
- package/dist/{slack-DQMZKIuW.js → slack--31D299J.js} +23 -23
- package/dist/{slack-ECt4h0Hu.js → slack-B9lSH1M2.js} +4 -4
- package/dist/{slash-commands.runtime-DWt0QyST.js → slash-commands.runtime-DdeDPbjA.js} +19 -19
- package/dist/{slash-dispatch.runtime-BeTERhvj.js → slash-dispatch.runtime-ADbYSJpf.js} +20 -20
- package/dist/{slash-skill-commands.runtime-Cid-sSa3.js → slash-skill-commands.runtime-Da40q2OX.js} +19 -19
- package/dist/{src-XVdNPr4B.js → src-DOwTfreQ.js} +21 -21
- package/dist/{status-CXOVuCND.js → status-Bf6ZMQXm.js} +24 -24
- package/dist/{status-B8LdUsqp.js → status-DrEiuz53.js} +9 -9
- package/dist/{status-rqxi-BQ-.js → status-T77yTR0p.js} +1 -1
- package/dist/{status-CWaWMoOB.js → status-XNNhFJFh.js} +1 -1
- package/dist/{status-json-DA8vURuP.js → status-json-CiaELzwJ.js} +5 -5
- package/dist/{status.link-channel-i1B0BhMt.js → status.link-channel-xcMdXLjx.js} +2 -2
- package/dist/{status.scan.deps.runtime--ESlvC-h.js → status.scan.deps.runtime-CUPJWHFt.js} +8 -8
- package/dist/{status.scan.json-core-B5fWzAXX.js → status.scan.json-core-DGIwFxFo.js} +4 -4
- package/dist/{status.scan.runtime-CbZR0ayi.js → status.scan.runtime-BAAA0eKn.js} +2 -2
- package/dist/{subagent-orphan-recovery-CwzQuKXV.js → subagent-orphan-recovery-DdbLuYCt.js} +19 -19
- package/dist/{subagent-registry-runtime-BASPOpkx.js → subagent-registry-runtime-CWyyx5KZ.js} +19 -19
- package/dist/{synology-chat-O8fctw-z.js → synology-chat-CoeHg_-G.js} +2 -2
- package/dist/{targets-CIpEQq5a.js → targets-BF8_iYux.js} +1 -1
- package/dist/telegram/audit.js +1 -1
- package/dist/telegram/token.js +19 -19
- package/dist/{telegram-BQLx1Cmm.js → telegram-Bq29SDXS.js} +19 -19
- package/dist/{telegram-CdyPvNcV.js → telegram-DhCtytlC.js} +5 -5
- package/dist/{thread-bindings-DUZj5oTC.js → thread-bindings-B92fpSB_.js} +1 -1
- package/dist/{thread-bindings-CPuNENBW.js → thread-bindings-BXSN3Lme.js} +2 -2
- package/dist/{thread-bindings.messages-wvAd3TUZ.js → thread-bindings.messages-BEo_b3yC.js} +1 -1
- package/dist/{tool-actions.runtime-B9ha--Vj.js → tool-actions.runtime-BC4E15O0.js} +27 -27
- package/dist/{tts.runtime-GeJEVmoE.js → tts.runtime-DCAazXil.js} +19 -19
- package/dist/{tui-D8O3rgl9.js → tui-VnxDoYFY.js} +1 -1
- package/dist/{tui-cli-D8kw-oSV.js → tui-cli-Dn6jOXXm.js} +20 -20
- package/dist/{ui-CVFJs1wJ.js → ui-_wzuJeHY.js} +1 -1
- package/dist/{update-cli-TTPqi6r3.js → update-cli-CR50kfye.js} +35 -35
- package/dist/{update-offset-store-e6CGb6BA.js → update-offset-store-BmmtcMK9.js} +19 -19
- package/dist/{verification-CIgqa4HW.js → verification-BoW7hiLV.js} +3 -3
- package/dist/{webhook-shared-CljrL-0X.js → webhook-shared-DKeX_CoJ.js} +1 -1
- package/dist/{whatsapp-core-CaAr8WsA.js → whatsapp-core-FP13jVxy.js} +1 -1
- package/dist/{zalo-D1hFuacG.js → zalo-DZtlBJvq.js} +2 -2
- package/docs/concepts/memory.md +7 -0
- package/docs/reference/memory-config.md +10 -0
- package/package.json +136 -89
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -0
- package/skills/tmux/scripts/find-sessions.sh +0 -0
- package/skills/tmux/scripts/wait-for-text.sh +0 -0
- package/dist/extensions/slack/node_modules/proxy-from-env/.eslintrc +0 -29
- package/dist/extensions/slack/node_modules/proxy-from-env/.travis.yml +0 -10
- package/dist/extensions/slack/node_modules/proxy-from-env/test.js +0 -483
|
@@ -2,13 +2,13 @@ import { n as redactSensitiveText } from "./redact-BDinS1q9.js";
|
|
|
2
2
|
import { o as createSubsystemLogger, yi as resolveAgentWorkspaceDir } from "./env-DSps_l9i.js";
|
|
3
3
|
import { c as resolveSessionTranscriptsDirForAgent } from "./paths-Cl8Vw1Jj.js";
|
|
4
4
|
import { a as listMemoryFiles, n as chunkMarkdown, o as normalizeExtraMemoryPaths, r as hashText, t as buildFileEntry } from "./internal-CQyd3YZq.js";
|
|
5
|
-
import { C as relationsCollection, D as structuredMemCollection, E as relevanceRunsCollection, S as queryCacheCollection, _ as metaCollection, a as ensureCollections, b as proceduresCollection, c as ensureStandardIndexes, d as episodesCollection, f as eventsCollection, g as kbCollection, h as kbChunksCollection, k as telemetryCollection, l as entitiesCollection, m as ingestRunsCollection, n as chunksCollection, p as filesCollection, r as detectCapabilities, s as ensureSearchIndexes, u as entityLinksCollection, x as projectionRunsCollection } from "./mongodb-schema-
|
|
5
|
+
import { C as relationsCollection, D as structuredMemCollection, E as relevanceRunsCollection, S as queryCacheCollection, _ as metaCollection, a as ensureCollections, b as proceduresCollection, c as ensureStandardIndexes, d as episodesCollection, f as eventsCollection, g as kbCollection, h as kbChunksCollection, k as telemetryCollection, l as entitiesCollection, m as ingestRunsCollection, n as chunksCollection, p as filesCollection, r as detectCapabilities, s as ensureSearchIndexes, u as entityLinksCollection, x as projectionRunsCollection } from "./mongodb-schema-CJHFxfrx.js";
|
|
6
6
|
import { t as resolveScopeRef } from "./mongodb-scope-BgB-USEx.js";
|
|
7
|
-
import { n as writeStructuredMemory, t as searchStructuredMemory } from "./mongodb-structured-memory-
|
|
8
|
-
import { a as normalizeSearchResults, n as buildVectorSearchStage, o as rrfScore, r as mongoSearch, s as MongoDBRelevanceRuntime } from "./mongodb-search-
|
|
9
|
-
import { n as writeProcedure, t as searchProcedures } from "./mongodb-procedures-
|
|
10
|
-
import { t as getMemoryStats } from "./mongodb-analytics-
|
|
11
|
-
import { t as searchKB } from "./mongodb-kb-search-
|
|
7
|
+
import { n as writeStructuredMemory, t as searchStructuredMemory } from "./mongodb-structured-memory-BlYP5KWD.js";
|
|
8
|
+
import { a as normalizeSearchResults, n as buildVectorSearchStage, o as rrfScore, r as mongoSearch, s as MongoDBRelevanceRuntime } from "./mongodb-search-BHRn7dF1.js";
|
|
9
|
+
import { n as writeProcedure, t as searchProcedures } from "./mongodb-procedures-CobuqpD2.js";
|
|
10
|
+
import { t as getMemoryStats } from "./mongodb-analytics-qg8zwvek.js";
|
|
11
|
+
import { t as searchKB } from "./mongodb-kb-search-CeBKQO-B.js";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import { createHash, randomUUID } from "node:crypto";
|
|
14
14
|
import fs from "node:fs/promises";
|
|
@@ -167,6 +167,16 @@ async function getEventsByTimeRange(params) {
|
|
|
167
167
|
_id: 1
|
|
168
168
|
}).limit(limit ?? 1e3).toArray();
|
|
169
169
|
}
|
|
170
|
+
async function getEventsBySession(params) {
|
|
171
|
+
const { db, prefix, agentId, sessionId, limit } = params;
|
|
172
|
+
return await eventsCollection(db, prefix).find({
|
|
173
|
+
agentId,
|
|
174
|
+
sessionId
|
|
175
|
+
}).sort({
|
|
176
|
+
timestamp: 1,
|
|
177
|
+
_id: 1
|
|
178
|
+
}).limit(limit ?? 1e3).toArray();
|
|
179
|
+
}
|
|
170
180
|
async function markEventsProjected(params) {
|
|
171
181
|
const { db, prefix, eventIds } = params;
|
|
172
182
|
if (eventIds.length === 0) return 0;
|
|
@@ -1275,6 +1285,16 @@ async function checkAutoEpisodeTriggers(params) {
|
|
|
1275
1285
|
//#endregion
|
|
1276
1286
|
//#region src/memory/mongodb-retrieval-planner.ts
|
|
1277
1287
|
const log$10 = createSubsystemLogger("memory:mongodb:planner");
|
|
1288
|
+
function classifyRetrievalQuery(params) {
|
|
1289
|
+
const query = params.query.trim().toLowerCase();
|
|
1290
|
+
if (!query) return "direct";
|
|
1291
|
+
if (params.hasTimeRange || TIME_REGEXES.some((re) => re.test(query))) return "temporal";
|
|
1292
|
+
if (params.hasScopes) return "scoped";
|
|
1293
|
+
if (/\b(compare|comparison|difference|different|vs|versus|better than)\b/i.test(query)) return "comparison";
|
|
1294
|
+
if (/\b(family|alternatives?|similar|related tools|ecosystem|what else|options|which tools|all the tools|all tools)\b/i.test(query) || /כל המשפחה|עוד כלים|חלופות|מה עוד/u.test(query)) return "family";
|
|
1295
|
+
if (/\b(because|why did|how did|lead to|after that|before that|then what)\b/i.test(query)) return "multi-hop";
|
|
1296
|
+
return "direct";
|
|
1297
|
+
}
|
|
1278
1298
|
function buildKeywordRegexes(keywords) {
|
|
1279
1299
|
return keywords.map((kw) => new RegExp(`\\b${kw.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`, "i"));
|
|
1280
1300
|
}
|
|
@@ -1359,6 +1379,31 @@ const PROCEDURAL_REGEXES = buildKeywordRegexes([
|
|
|
1359
1379
|
"steps",
|
|
1360
1380
|
"checklist"
|
|
1361
1381
|
]);
|
|
1382
|
+
const FAMILY_REGEXES = buildKeywordRegexes([
|
|
1383
|
+
"family",
|
|
1384
|
+
"alternatives",
|
|
1385
|
+
"alternative",
|
|
1386
|
+
"similar",
|
|
1387
|
+
"related",
|
|
1388
|
+
"what else",
|
|
1389
|
+
"ecosystem",
|
|
1390
|
+
"other tools"
|
|
1391
|
+
]);
|
|
1392
|
+
const COMPARISON_REGEXES = buildKeywordRegexes([
|
|
1393
|
+
"compare",
|
|
1394
|
+
"comparison",
|
|
1395
|
+
"difference",
|
|
1396
|
+
"versus",
|
|
1397
|
+
"vs"
|
|
1398
|
+
]);
|
|
1399
|
+
const MULTI_HOP_REGEXES = buildKeywordRegexes([
|
|
1400
|
+
"and then",
|
|
1401
|
+
"after that",
|
|
1402
|
+
"followed by",
|
|
1403
|
+
"step by step",
|
|
1404
|
+
"how did",
|
|
1405
|
+
"why did"
|
|
1406
|
+
]);
|
|
1362
1407
|
const PATH_PRIORITY = {
|
|
1363
1408
|
"active-critical": 0,
|
|
1364
1409
|
procedural: 1,
|
|
@@ -1594,6 +1639,7 @@ function planRetrieval(query, context) {
|
|
|
1594
1639
|
try {
|
|
1595
1640
|
if (!query.trim()) return {
|
|
1596
1641
|
paths: context.availablePaths.has("hybrid") ? ["hybrid"] : [],
|
|
1642
|
+
classification: "direct",
|
|
1597
1643
|
confidence: "low",
|
|
1598
1644
|
reasoning: "empty query"
|
|
1599
1645
|
};
|
|
@@ -1656,9 +1702,18 @@ function planRetrieval(query, context) {
|
|
|
1656
1702
|
}
|
|
1657
1703
|
scores.hybrid += 1;
|
|
1658
1704
|
const finalPaths = Object.entries(scores).filter(([path]) => context.availablePaths.has(path)).toSorted((a, b) => b[1] - a[1] || PATH_PRIORITY[a[0]] - PATH_PRIORITY[b[0]]).map(([path]) => path);
|
|
1705
|
+
const classification = (() => {
|
|
1706
|
+
if (COMPARISON_REGEXES.some((re) => re.test(query))) return "comparison";
|
|
1707
|
+
if (FAMILY_REGEXES.some((re) => re.test(query))) return "family";
|
|
1708
|
+
if (timeConstraint) return "temporal";
|
|
1709
|
+
if (structuredConstraint?.hard === true || kbConstraint?.hard === true || !!entityConstraint) return "scoped";
|
|
1710
|
+
if (MULTI_HOP_REGEXES.some((re) => re.test(query)) || /\b(and|then)\b/i.test(query) || (query.match(/\?/g)?.length ?? 0) > 1) return "multi-hop";
|
|
1711
|
+
return "direct";
|
|
1712
|
+
})();
|
|
1659
1713
|
const topScore = scores[finalPaths[0]] ?? 0;
|
|
1660
1714
|
return {
|
|
1661
1715
|
paths: finalPaths,
|
|
1716
|
+
classification,
|
|
1662
1717
|
confidence: topScore >= 3 ? "high" : topScore >= 2 ? "medium" : "low",
|
|
1663
1718
|
reasoning: reasons.length > 0 ? reasons.join("; ") : "no strong signals, defaulting to hybrid",
|
|
1664
1719
|
...Object.keys(constraints).length > 0 ? { constraints } : {}
|
|
@@ -2609,10 +2664,12 @@ async function checkCache(params) {
|
|
|
2609
2664
|
const cacheStart = Date.now();
|
|
2610
2665
|
const col = queryCacheCollection(db, prefix);
|
|
2611
2666
|
const qHash = hashQuery(normalized);
|
|
2667
|
+
const requestSignature = params.requestSignature ?? "default";
|
|
2612
2668
|
const now = /* @__PURE__ */ new Date();
|
|
2613
2669
|
try {
|
|
2614
2670
|
const exact = await col.findOne({
|
|
2615
2671
|
queryHash: qHash,
|
|
2672
|
+
requestSignature,
|
|
2616
2673
|
agentId,
|
|
2617
2674
|
scope,
|
|
2618
2675
|
scopeRef,
|
|
@@ -2670,7 +2727,8 @@ async function checkCache(params) {
|
|
|
2670
2727
|
filter: {
|
|
2671
2728
|
agentId,
|
|
2672
2729
|
scope,
|
|
2673
|
-
scopeRef
|
|
2730
|
+
scopeRef,
|
|
2731
|
+
requestSignature
|
|
2674
2732
|
},
|
|
2675
2733
|
textFieldPath: "queryNorm"
|
|
2676
2734
|
});
|
|
@@ -2698,6 +2756,7 @@ async function checkCache(params) {
|
|
|
2698
2756
|
results: 1,
|
|
2699
2757
|
pathUsed: 1,
|
|
2700
2758
|
sourceScope: 1,
|
|
2759
|
+
requestSignature: 1,
|
|
2701
2760
|
expiresAt: 1,
|
|
2702
2761
|
score: { $meta: "vectorSearchScore" }
|
|
2703
2762
|
} }
|
|
@@ -2757,14 +2816,17 @@ function writeCache(params) {
|
|
|
2757
2816
|
const now = /* @__PURE__ */ new Date();
|
|
2758
2817
|
const expiresAt = new Date(now.getTime() + ttlSec * 1e3);
|
|
2759
2818
|
const qHash = hashQuery(normalized);
|
|
2819
|
+
const requestSignature = params.requestSignature ?? "default";
|
|
2760
2820
|
queryCacheCollection(db, prefix).updateOne({
|
|
2761
2821
|
queryHash: qHash,
|
|
2822
|
+
requestSignature,
|
|
2762
2823
|
agentId,
|
|
2763
2824
|
scope,
|
|
2764
2825
|
scopeRef
|
|
2765
2826
|
}, {
|
|
2766
2827
|
$setOnInsert: {
|
|
2767
2828
|
queryNorm: normalized,
|
|
2829
|
+
requestSignature,
|
|
2768
2830
|
createdAt: now,
|
|
2769
2831
|
hitCount: 0
|
|
2770
2832
|
},
|
|
@@ -3064,6 +3126,334 @@ async function crossEncoderRerank(params) {
|
|
|
3064
3126
|
}
|
|
3065
3127
|
}
|
|
3066
3128
|
//#endregion
|
|
3129
|
+
//#region src/memory/mongodb-search-executor.ts
|
|
3130
|
+
function sourcePreferencePaths(source) {
|
|
3131
|
+
switch (source) {
|
|
3132
|
+
case "conversation": return ["hybrid", "raw-window"];
|
|
3133
|
+
case "reference": return ["kb"];
|
|
3134
|
+
case "structured": return ["active-critical", "structured"];
|
|
3135
|
+
case "procedural": return ["procedural"];
|
|
3136
|
+
case "episodic": return ["episodic"];
|
|
3137
|
+
case "graph": return ["graph"];
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
function selectPassPaths(params) {
|
|
3141
|
+
const allowed = new Set(params.availablePaths);
|
|
3142
|
+
if (params.timeRange) {
|
|
3143
|
+
for (const path of allowed) if (![
|
|
3144
|
+
"raw-window",
|
|
3145
|
+
"hybrid",
|
|
3146
|
+
"episodic"
|
|
3147
|
+
].includes(path)) allowed.delete(path);
|
|
3148
|
+
}
|
|
3149
|
+
if (params.sourcePreference.length === 0) return allowed;
|
|
3150
|
+
const preferredAllowed = new Set(params.sourcePreference.flatMap((source) => sourcePreferencePaths(source)));
|
|
3151
|
+
const effectiveAllowed = new Set(Array.from(allowed).filter((path) => preferredAllowed.has(path)));
|
|
3152
|
+
const preferredSource = params.sourcePreference[Math.min(params.pass - 1, params.sourcePreference.length - 1)];
|
|
3153
|
+
const preferredPaths = sourcePreferencePaths(preferredSource).filter((path) => effectiveAllowed.has(path));
|
|
3154
|
+
if (preferredPaths.length === 0 || params.pass > params.sourcePreference.length) return effectiveAllowed;
|
|
3155
|
+
return new Set(preferredPaths);
|
|
3156
|
+
}
|
|
3157
|
+
function sortObject(value) {
|
|
3158
|
+
if (Array.isArray(value)) return value.map(sortObject);
|
|
3159
|
+
if (!value || typeof value !== "object") return value;
|
|
3160
|
+
return Object.fromEntries(Object.entries(value).toSorted(([left], [right]) => left.localeCompare(right)).map(([key, entry]) => [key, sortObject(entry)]));
|
|
3161
|
+
}
|
|
3162
|
+
function buildMemorySearchRequestSignature(request) {
|
|
3163
|
+
return JSON.stringify(sortObject({
|
|
3164
|
+
query: request.query,
|
|
3165
|
+
maxResults: request.maxResults,
|
|
3166
|
+
minScore: request.minScore,
|
|
3167
|
+
searchMode: request.searchMode,
|
|
3168
|
+
sourcePreference: request.sourcePreference,
|
|
3169
|
+
timeRange: request.timeRange,
|
|
3170
|
+
needExactEvidence: request.needExactEvidence,
|
|
3171
|
+
maxPasses: request.maxPasses,
|
|
3172
|
+
conversationScope: request.conversationScope,
|
|
3173
|
+
structuredScope: request.structuredScope,
|
|
3174
|
+
referenceScope: request.referenceScope,
|
|
3175
|
+
proceduralScope: request.proceduralScope
|
|
3176
|
+
}));
|
|
3177
|
+
}
|
|
3178
|
+
function normalizeMemorySearchRequest(request) {
|
|
3179
|
+
const requestedMode = request.searchMode ?? "auto";
|
|
3180
|
+
const maxPasses = Math.max(1, Math.min(3, Math.trunc(request.maxPasses ?? {
|
|
3181
|
+
direct: 1,
|
|
3182
|
+
auto: 2,
|
|
3183
|
+
agentic: 3
|
|
3184
|
+
}[requestedMode])));
|
|
3185
|
+
return {
|
|
3186
|
+
...request,
|
|
3187
|
+
searchMode: requestedMode,
|
|
3188
|
+
maxPasses,
|
|
3189
|
+
sourcePreference: request.sourcePreference ?? [
|
|
3190
|
+
"conversation",
|
|
3191
|
+
"structured",
|
|
3192
|
+
"procedural",
|
|
3193
|
+
"reference",
|
|
3194
|
+
"episodic",
|
|
3195
|
+
"graph"
|
|
3196
|
+
]
|
|
3197
|
+
};
|
|
3198
|
+
}
|
|
3199
|
+
function resolveExecutorTimeRange(request) {
|
|
3200
|
+
const raw = request.timeRange;
|
|
3201
|
+
if (!raw) return;
|
|
3202
|
+
if (raw.preset) return resolveTimeRangePreset(raw.preset);
|
|
3203
|
+
const start = raw.start ? new Date(raw.start) : void 0;
|
|
3204
|
+
const end = raw.end ? new Date(raw.end) : void 0;
|
|
3205
|
+
if (start && Number.isNaN(start.getTime()) || end && Number.isNaN(end.getTime()) || !start || !end) return;
|
|
3206
|
+
return {
|
|
3207
|
+
start,
|
|
3208
|
+
end
|
|
3209
|
+
};
|
|
3210
|
+
}
|
|
3211
|
+
function classifyExecutorSearch(request) {
|
|
3212
|
+
return classifyRetrievalQuery({
|
|
3213
|
+
query: request.query,
|
|
3214
|
+
hasTimeRange: Boolean(request.timeRange),
|
|
3215
|
+
hasScopes: Boolean(request.conversationScope || request.structuredScope || request.referenceScope || request.proceduralScope)
|
|
3216
|
+
});
|
|
3217
|
+
}
|
|
3218
|
+
function uniqueQueries(values) {
|
|
3219
|
+
const seen = /* @__PURE__ */ new Set();
|
|
3220
|
+
const ordered = [];
|
|
3221
|
+
for (const value of values) {
|
|
3222
|
+
const trimmed = value.trim();
|
|
3223
|
+
if (!trimmed) continue;
|
|
3224
|
+
const normalized = trimmed.toLowerCase();
|
|
3225
|
+
if (seen.has(normalized)) continue;
|
|
3226
|
+
seen.add(normalized);
|
|
3227
|
+
ordered.push(trimmed);
|
|
3228
|
+
}
|
|
3229
|
+
return ordered;
|
|
3230
|
+
}
|
|
3231
|
+
function buildExecutorPasses(request, classification) {
|
|
3232
|
+
const passes = [{
|
|
3233
|
+
pass: 1,
|
|
3234
|
+
query: request.query,
|
|
3235
|
+
reason: "original query",
|
|
3236
|
+
variant: "original"
|
|
3237
|
+
}];
|
|
3238
|
+
if (!(request.searchMode === "agentic" || request.searchMode === "auto" && classification !== "direct") || request.maxPasses <= 1) return passes;
|
|
3239
|
+
const expansionQueries = [];
|
|
3240
|
+
switch (classification) {
|
|
3241
|
+
case "family":
|
|
3242
|
+
expansionQueries.push(`${request.query} alternatives`);
|
|
3243
|
+
expansionQueries.push(`${request.query} related tools`);
|
|
3244
|
+
break;
|
|
3245
|
+
case "comparison":
|
|
3246
|
+
expansionQueries.push(`${request.query} differences`);
|
|
3247
|
+
expansionQueries.push(`${request.query} tradeoffs`);
|
|
3248
|
+
break;
|
|
3249
|
+
case "temporal":
|
|
3250
|
+
expansionQueries.push(`${request.query} exact evidence`);
|
|
3251
|
+
break;
|
|
3252
|
+
case "scoped":
|
|
3253
|
+
expansionQueries.push(`${request.query} exact match`);
|
|
3254
|
+
break;
|
|
3255
|
+
case "multi-hop":
|
|
3256
|
+
expansionQueries.push(`${request.query} cause`);
|
|
3257
|
+
expansionQueries.push(`${request.query} consequence`);
|
|
3258
|
+
break;
|
|
3259
|
+
case "direct":
|
|
3260
|
+
if (request.needExactEvidence) expansionQueries.push(`${request.query} exact evidence`);
|
|
3261
|
+
break;
|
|
3262
|
+
}
|
|
3263
|
+
const deduped = uniqueQueries(expansionQueries);
|
|
3264
|
+
for (const query of deduped.slice(0, Math.max(0, request.maxPasses - 1))) passes.push({
|
|
3265
|
+
pass: passes.length + 1,
|
|
3266
|
+
query,
|
|
3267
|
+
reason: classification === "family" ? "family expansion" : "agentic follow-up",
|
|
3268
|
+
variant: classification === "multi-hop" ? "decomposition" : "family-expansion"
|
|
3269
|
+
});
|
|
3270
|
+
return passes;
|
|
3271
|
+
}
|
|
3272
|
+
function resultHasExactEvidence(result) {
|
|
3273
|
+
if (result.canonicalId?.trim()) return true;
|
|
3274
|
+
if (result.path.trim()) return true;
|
|
3275
|
+
return false;
|
|
3276
|
+
}
|
|
3277
|
+
function searchResultIdentity(result) {
|
|
3278
|
+
return result.canonicalId ?? `${result.path}:${result.startLine}:${result.endLine}`;
|
|
3279
|
+
}
|
|
3280
|
+
function computeEvidenceCoverage(results) {
|
|
3281
|
+
if (results.length === 0) return "none";
|
|
3282
|
+
const exactCount = results.filter(resultHasExactEvidence).length;
|
|
3283
|
+
if (exactCount === results.length) return "direct";
|
|
3284
|
+
if (exactCount > 0) return "partial";
|
|
3285
|
+
return "indirect";
|
|
3286
|
+
}
|
|
3287
|
+
function applyHardConstraintRejections(params) {
|
|
3288
|
+
const accepted = [];
|
|
3289
|
+
const rejected = [];
|
|
3290
|
+
for (const result of params.results) {
|
|
3291
|
+
if (params.timeRange) {
|
|
3292
|
+
if (!(result.timestamp instanceof Date)) {
|
|
3293
|
+
rejected.push({
|
|
3294
|
+
canonicalId: result.canonicalId,
|
|
3295
|
+
path: result.path,
|
|
3296
|
+
source: result.source,
|
|
3297
|
+
reason: "missing timestamp for requested time range"
|
|
3298
|
+
});
|
|
3299
|
+
continue;
|
|
3300
|
+
}
|
|
3301
|
+
const ts = result.timestamp.getTime();
|
|
3302
|
+
if (ts < params.timeRange.start.getTime() || ts > params.timeRange.end.getTime()) {
|
|
3303
|
+
rejected.push({
|
|
3304
|
+
canonicalId: result.canonicalId,
|
|
3305
|
+
path: result.path,
|
|
3306
|
+
source: result.source,
|
|
3307
|
+
reason: "outside requested time range"
|
|
3308
|
+
});
|
|
3309
|
+
continue;
|
|
3310
|
+
}
|
|
3311
|
+
}
|
|
3312
|
+
if (params.request.needExactEvidence && !resultHasExactEvidence(result)) {
|
|
3313
|
+
rejected.push({
|
|
3314
|
+
canonicalId: result.canonicalId,
|
|
3315
|
+
path: result.path,
|
|
3316
|
+
source: result.source,
|
|
3317
|
+
reason: "missing exact evidence locator"
|
|
3318
|
+
});
|
|
3319
|
+
continue;
|
|
3320
|
+
}
|
|
3321
|
+
accepted.push(result);
|
|
3322
|
+
}
|
|
3323
|
+
return {
|
|
3324
|
+
accepted,
|
|
3325
|
+
rejected
|
|
3326
|
+
};
|
|
3327
|
+
}
|
|
3328
|
+
function canUseLegacyFallback(request) {
|
|
3329
|
+
return !(request.needExactEvidence || request.timeRange || request.conversationScope || request.structuredScope || request.referenceScope || request.proceduralScope);
|
|
3330
|
+
}
|
|
3331
|
+
function requestHasHardConstraints(request) {
|
|
3332
|
+
return !canUseLegacyFallback(request);
|
|
3333
|
+
}
|
|
3334
|
+
function buildConstraintSummaries(request) {
|
|
3335
|
+
const applied = [];
|
|
3336
|
+
if (request.timeRange) {
|
|
3337
|
+
if (request.timeRange.preset) applied.push(`timeRange:${request.timeRange.preset}`);
|
|
3338
|
+
else if (request.timeRange.start && request.timeRange.end) applied.push(`timeRange:${request.timeRange.start}..${request.timeRange.end}`);
|
|
3339
|
+
}
|
|
3340
|
+
if (request.needExactEvidence) applied.push("needExactEvidence");
|
|
3341
|
+
if (request.conversationScope?.sessionKey) applied.push(`conversationScope.sessionKey:${request.conversationScope.sessionKey}`);
|
|
3342
|
+
if (request.structuredScope?.type) applied.push(`structuredScope.type:${request.structuredScope.type}`);
|
|
3343
|
+
if (request.referenceScope?.category) applied.push(`referenceScope.category:${request.referenceScope.category}`);
|
|
3344
|
+
if (request.referenceScope?.source) applied.push(`referenceScope.source:${request.referenceScope.source}`);
|
|
3345
|
+
if (request.proceduralScope?.state) applied.push(`proceduralScope.state:${request.proceduralScope.state}`);
|
|
3346
|
+
return applied;
|
|
3347
|
+
}
|
|
3348
|
+
function mergeMetadata(params) {
|
|
3349
|
+
const pathsExecuted = Array.from(new Set(params.passes.flatMap((pass) => pass.metadata.pathsExecuted)));
|
|
3350
|
+
const resultsByPath = params.passes.reduce((acc, pass) => {
|
|
3351
|
+
for (const [path, count] of Object.entries(pass.metadata.resultsByPath)) acc[path] = (acc[path] ?? 0) + count;
|
|
3352
|
+
return acc;
|
|
3353
|
+
}, {});
|
|
3354
|
+
return {
|
|
3355
|
+
mode: params.request.searchMode,
|
|
3356
|
+
classification: params.classification,
|
|
3357
|
+
sourceOrder: params.request.sourcePreference,
|
|
3358
|
+
passes: params.passes.map(({ metadata: _metadata, ...pass }) => pass),
|
|
3359
|
+
queriesTried: params.passes.map((pass) => pass.query),
|
|
3360
|
+
constraintsApplied: buildConstraintSummaries(params.request),
|
|
3361
|
+
resultsRejected: params.resultsRejected,
|
|
3362
|
+
evidenceCoverage: computeEvidenceCoverage(params.results),
|
|
3363
|
+
pathsExecuted,
|
|
3364
|
+
resultsByPath,
|
|
3365
|
+
queryRewritten: params.passes.some((pass) => pass.metadata.queryRewritten),
|
|
3366
|
+
reranked: params.passes.some((pass) => pass.metadata.reranked),
|
|
3367
|
+
...params.noDirectEvidenceReason ? { noDirectEvidenceReason: params.noDirectEvidenceReason } : {},
|
|
3368
|
+
...params.request.returnPlan && params.passes[0]?.metadata.plan ? { plan: params.passes[0].metadata.plan } : {}
|
|
3369
|
+
};
|
|
3370
|
+
}
|
|
3371
|
+
function buildNoDirectEvidenceResponse(params) {
|
|
3372
|
+
return {
|
|
3373
|
+
results: [],
|
|
3374
|
+
metadata: mergeMetadata({
|
|
3375
|
+
request: params.request,
|
|
3376
|
+
classification: params.classification,
|
|
3377
|
+
passes: params.passes,
|
|
3378
|
+
resultsRejected: params.resultsRejected,
|
|
3379
|
+
results: [],
|
|
3380
|
+
noDirectEvidenceReason: params.reason
|
|
3381
|
+
})
|
|
3382
|
+
};
|
|
3383
|
+
}
|
|
3384
|
+
async function executeMongoSearchPlan(params) {
|
|
3385
|
+
const normalized = normalizeMemorySearchRequest(params.request);
|
|
3386
|
+
const classification = classifyExecutorSearch(normalized);
|
|
3387
|
+
const timeRange = resolveExecutorTimeRange(normalized);
|
|
3388
|
+
const passPlans = buildExecutorPasses(normalized, classification);
|
|
3389
|
+
const passes = [];
|
|
3390
|
+
const allRejected = [];
|
|
3391
|
+
const acceptedById = /* @__PURE__ */ new Map();
|
|
3392
|
+
for (const passPlan of passPlans) {
|
|
3393
|
+
const passPaths = selectPassPaths({
|
|
3394
|
+
availablePaths: params.availablePaths,
|
|
3395
|
+
sourcePreference: normalized.sourcePreference,
|
|
3396
|
+
pass: passPlan.pass,
|
|
3397
|
+
...timeRange ? { timeRange } : {}
|
|
3398
|
+
});
|
|
3399
|
+
const executed = await params.executePass({
|
|
3400
|
+
pass: passPlan.pass,
|
|
3401
|
+
query: passPlan.query,
|
|
3402
|
+
availablePaths: passPaths,
|
|
3403
|
+
...timeRange ? { timeRange } : {}
|
|
3404
|
+
});
|
|
3405
|
+
const filtered = applyHardConstraintRejections({
|
|
3406
|
+
results: executed.results,
|
|
3407
|
+
request: normalized,
|
|
3408
|
+
...timeRange ? { timeRange } : {}
|
|
3409
|
+
});
|
|
3410
|
+
allRejected.push(...filtered.rejected);
|
|
3411
|
+
for (const result of filtered.accepted) acceptedById.set(searchResultIdentity(result), result);
|
|
3412
|
+
passes.push({
|
|
3413
|
+
pass: passPlan.pass,
|
|
3414
|
+
query: passPlan.query,
|
|
3415
|
+
reason: passPlan.reason,
|
|
3416
|
+
pathsExecuted: executed.metadata.pathsExecuted,
|
|
3417
|
+
resultCount: filtered.accepted.length,
|
|
3418
|
+
queryRewritten: executed.metadata.queryRewritten === true,
|
|
3419
|
+
reranked: executed.metadata.reranked === true,
|
|
3420
|
+
metadata: {
|
|
3421
|
+
pathsExecuted: executed.metadata.pathsExecuted,
|
|
3422
|
+
resultsByPath: executed.metadata.resultsByPath,
|
|
3423
|
+
queryRewritten: executed.metadata.queryRewritten === true,
|
|
3424
|
+
reranked: executed.metadata.reranked === true,
|
|
3425
|
+
plan: {
|
|
3426
|
+
paths: executed.metadata.plan.paths,
|
|
3427
|
+
confidence: executed.metadata.plan.confidence,
|
|
3428
|
+
reasoning: executed.metadata.plan.reasoning,
|
|
3429
|
+
...executed.metadata.plan.constraints ? { constraints: executed.metadata.plan.constraints } : {}
|
|
3430
|
+
}
|
|
3431
|
+
}
|
|
3432
|
+
});
|
|
3433
|
+
const acceptedResults = Array.from(acceptedById.values());
|
|
3434
|
+
const evidenceCoverage = computeEvidenceCoverage(acceptedResults);
|
|
3435
|
+
if (acceptedResults.length > 0 && (classification === "direct" ? !normalized.needExactEvidence || evidenceCoverage === "direct" || evidenceCoverage === "partial" : classification === "family" || classification === "comparison" ? acceptedResults.length >= Math.min(normalized.maxResults ?? 10, 3) : !normalized.needExactEvidence || evidenceCoverage === "direct" || evidenceCoverage === "partial")) break;
|
|
3436
|
+
}
|
|
3437
|
+
const acceptedResults = Array.from(acceptedById.values());
|
|
3438
|
+
if (normalized.needExactEvidence && acceptedResults.length === 0) return buildNoDirectEvidenceResponse({
|
|
3439
|
+
request: normalized,
|
|
3440
|
+
classification,
|
|
3441
|
+
passes,
|
|
3442
|
+
resultsRejected: allRejected,
|
|
3443
|
+
reason: "No exact-evidence results survived the active constraints."
|
|
3444
|
+
});
|
|
3445
|
+
return {
|
|
3446
|
+
results: acceptedResults,
|
|
3447
|
+
metadata: mergeMetadata({
|
|
3448
|
+
request: normalized,
|
|
3449
|
+
classification,
|
|
3450
|
+
passes,
|
|
3451
|
+
resultsRejected: allRejected,
|
|
3452
|
+
results: acceptedResults
|
|
3453
|
+
})
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
//#endregion
|
|
3067
3457
|
//#region src/memory/session-files.ts
|
|
3068
3458
|
const log$2 = createSubsystemLogger("memory");
|
|
3069
3459
|
async function listSessionFilesForAgent(agentId) {
|
|
@@ -3627,6 +4017,39 @@ function classifyQueryCacheSourceScope(results) {
|
|
|
3627
4017
|
function resolveQueryCacheTtlSec(results, config) {
|
|
3628
4018
|
return collectSearchResultSources(results).has("reference") ? config.kbTtlSec : config.conversationTtlSec;
|
|
3629
4019
|
}
|
|
4020
|
+
function normalizeSearchRequest(request) {
|
|
4021
|
+
const query = request.query.trim();
|
|
4022
|
+
return {
|
|
4023
|
+
...request,
|
|
4024
|
+
query,
|
|
4025
|
+
searchMode: request.searchMode ?? "auto",
|
|
4026
|
+
maxResults: request.maxResults ?? 10,
|
|
4027
|
+
minScore: request.minScore ?? .1,
|
|
4028
|
+
needExactEvidence: request.needExactEvidence === true,
|
|
4029
|
+
returnPlan: request.returnPlan === true,
|
|
4030
|
+
...request.maxPasses != null ? { maxPasses: Math.max(1, Math.min(3, request.maxPasses)) } : {}
|
|
4031
|
+
};
|
|
4032
|
+
}
|
|
4033
|
+
function emptySearchMetadata(request) {
|
|
4034
|
+
return {
|
|
4035
|
+
mode: request.searchMode ?? "auto",
|
|
4036
|
+
classification: "direct",
|
|
4037
|
+
sourceOrder: request.sourcePreference ?? [
|
|
4038
|
+
"conversation",
|
|
4039
|
+
"structured",
|
|
4040
|
+
"reference"
|
|
4041
|
+
],
|
|
4042
|
+
passes: [],
|
|
4043
|
+
queriesTried: [],
|
|
4044
|
+
constraintsApplied: [],
|
|
4045
|
+
resultsRejected: [],
|
|
4046
|
+
evidenceCoverage: "none",
|
|
4047
|
+
pathsExecuted: [],
|
|
4048
|
+
resultsByPath: {},
|
|
4049
|
+
queryRewritten: false,
|
|
4050
|
+
reranked: false
|
|
4051
|
+
};
|
|
4052
|
+
}
|
|
3630
4053
|
/**
|
|
3631
4054
|
* Heuristic reranker for v2 search results.
|
|
3632
4055
|
* - Source diversity penalty: no more than 2 results from the same source at the top
|
|
@@ -3839,21 +4262,32 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
3839
4262
|
log.info(`ready: profile=${mongoCfg.deploymentProfile} embedding=${mongoCfg.embeddingMode} fusion=${mongoCfg.fusionMethod} caps=${JSON.stringify(capabilities)}`);
|
|
3840
4263
|
return manager;
|
|
3841
4264
|
}
|
|
3842
|
-
buildConversationChunkFilter() {
|
|
3843
|
-
|
|
4265
|
+
buildConversationChunkFilter(params) {
|
|
4266
|
+
const filter = {
|
|
3844
4267
|
source: { $in: ["conversation", "sessions"] },
|
|
3845
4268
|
agentId: this.agentId,
|
|
3846
4269
|
status: { $ne: "deleted" }
|
|
3847
4270
|
};
|
|
4271
|
+
if (params?.sessionKey) filter.sessionId = params.sessionKey;
|
|
4272
|
+
if (params?.timeRange) filter.timestamp = {
|
|
4273
|
+
$gte: params.timeRange.start,
|
|
4274
|
+
$lte: params.timeRange.end
|
|
4275
|
+
};
|
|
4276
|
+
return filter;
|
|
3848
4277
|
}
|
|
3849
|
-
buildBridgeChunkFilter() {
|
|
3850
|
-
|
|
4278
|
+
buildBridgeChunkFilter(params) {
|
|
4279
|
+
const filter = {
|
|
3851
4280
|
source: { $in: ["conversation", "memory"] },
|
|
3852
4281
|
agentId: this.agentId,
|
|
3853
4282
|
scope: "workspace",
|
|
3854
4283
|
scopeRef: this.workspaceScopeRef,
|
|
3855
4284
|
status: { $ne: "deleted" }
|
|
3856
4285
|
};
|
|
4286
|
+
if (params?.timeRange) filter.updatedAt = {
|
|
4287
|
+
$gte: params.timeRange.start,
|
|
4288
|
+
$lte: params.timeRange.end
|
|
4289
|
+
};
|
|
4290
|
+
return filter;
|
|
3857
4291
|
}
|
|
3858
4292
|
getBridgeChunkBudget(maxResults) {
|
|
3859
4293
|
return Math.max(2, Math.ceil(maxResults / 3));
|
|
@@ -4017,21 +4451,33 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
4017
4451
|
return finalResults;
|
|
4018
4452
|
}
|
|
4019
4453
|
async search(query, opts) {
|
|
4020
|
-
|
|
4021
|
-
|
|
4454
|
+
return (await this.searchDetailed({
|
|
4455
|
+
query,
|
|
4456
|
+
maxResults: opts?.maxResults,
|
|
4457
|
+
minScore: opts?.minScore,
|
|
4458
|
+
...opts?.sessionKey ? { conversationScope: { sessionKey: opts.sessionKey } } : {}
|
|
4459
|
+
})).results;
|
|
4460
|
+
}
|
|
4461
|
+
async searchDetailed(request) {
|
|
4462
|
+
const normalized = normalizeSearchRequest(request);
|
|
4463
|
+
if (!normalized.query) {
|
|
4022
4464
|
this.setLastSearchMode("v2:empty-query");
|
|
4023
|
-
return
|
|
4465
|
+
return {
|
|
4466
|
+
results: [],
|
|
4467
|
+
metadata: emptySearchMetadata(normalized)
|
|
4468
|
+
};
|
|
4024
4469
|
}
|
|
4025
4470
|
const mongoCfg = this.config.mongodb;
|
|
4026
|
-
const maxResults = opts?.maxResults ?? 10;
|
|
4027
|
-
const minScore = opts?.minScore ?? .1;
|
|
4028
4471
|
const activeSources = getActiveSources(mongoCfg.sources, mongoCfg.kb.enabled);
|
|
4029
4472
|
const availablePaths = this.buildV2AvailablePaths(activeSources);
|
|
4473
|
+
const cacheQuery = normalized.query;
|
|
4474
|
+
const requestSignature = buildMemorySearchRequestSignature(normalized);
|
|
4030
4475
|
if (mongoCfg.cache.enabled) {
|
|
4031
4476
|
const cacheResult = await checkCache({
|
|
4032
4477
|
db: this.db,
|
|
4033
4478
|
prefix: this.prefix,
|
|
4034
|
-
query:
|
|
4479
|
+
query: cacheQuery,
|
|
4480
|
+
requestSignature,
|
|
4035
4481
|
agentId: this.agentId,
|
|
4036
4482
|
scope: "agent",
|
|
4037
4483
|
scopeRef: this.agentScopeRef,
|
|
@@ -4042,89 +4488,129 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
4042
4488
|
pathUsed: cacheResult.pathUsed,
|
|
4043
4489
|
sourceScope: cacheResult.sourceScope
|
|
4044
4490
|
});
|
|
4045
|
-
|
|
4491
|
+
const executorRequest = normalizeMemorySearchRequest(normalized);
|
|
4492
|
+
const classification = classifyExecutorSearch(executorRequest);
|
|
4493
|
+
const cachedPaths = cacheResult.pathUsed ? cacheResult.pathUsed.split(",").filter(Boolean) : [];
|
|
4494
|
+
const plannedPasses = buildExecutorPasses(executorRequest, classification).map((pass, index) => ({
|
|
4495
|
+
pass: pass.pass,
|
|
4496
|
+
query: pass.query,
|
|
4497
|
+
reason: index === 0 ? `${pass.reason} (cache hit)` : pass.reason,
|
|
4498
|
+
pathsExecuted: index === 0 ? cachedPaths : [],
|
|
4499
|
+
resultCount: index === 0 ? cacheResult.results.length : 0,
|
|
4500
|
+
queryRewritten: false,
|
|
4501
|
+
reranked: false
|
|
4502
|
+
}));
|
|
4503
|
+
return {
|
|
4504
|
+
results: cacheResult.results,
|
|
4505
|
+
metadata: {
|
|
4506
|
+
...emptySearchMetadata(normalized),
|
|
4507
|
+
classification,
|
|
4508
|
+
passes: plannedPasses,
|
|
4509
|
+
queriesTried: plannedPasses.map((pass) => pass.query),
|
|
4510
|
+
constraintsApplied: [...buildConstraintSummaries(executorRequest), ...requestHasHardConstraints(normalized) ? ["cache-hit-constrained"] : []],
|
|
4511
|
+
evidenceCoverage: computeEvidenceCoverage(cacheResult.results),
|
|
4512
|
+
pathsExecuted: cachedPaths
|
|
4513
|
+
}
|
|
4514
|
+
};
|
|
4046
4515
|
}
|
|
4047
4516
|
}
|
|
4048
4517
|
const searchStart = Date.now();
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4518
|
+
const response = await executeMongoSearchPlan({
|
|
4519
|
+
request: normalized,
|
|
4520
|
+
availablePaths,
|
|
4521
|
+
executePass: async ({ query: passQuery, availablePaths: passPaths, timeRange }) => searchV2(this.db, this.prefix, passQuery, this.agentId, {
|
|
4522
|
+
availablePaths: passPaths,
|
|
4052
4523
|
hasEpisodes: mongoCfg.episodes.enabled,
|
|
4053
4524
|
hasGraphData: mongoCfg.graph.enabled,
|
|
4054
|
-
maxResults,
|
|
4525
|
+
maxResults: normalized.maxResults,
|
|
4055
4526
|
searchOptions: {
|
|
4056
|
-
minScore,
|
|
4057
|
-
sessionKey:
|
|
4527
|
+
minScore: normalized.minScore,
|
|
4528
|
+
sessionKey: normalized.conversationScope?.sessionKey,
|
|
4058
4529
|
numCandidates: mongoCfg.numCandidates,
|
|
4059
4530
|
capabilities: this.capabilities,
|
|
4060
4531
|
fusionMethod: mongoCfg.fusionMethod,
|
|
4061
4532
|
embeddingMode: mongoCfg.embeddingMode,
|
|
4062
|
-
conversationFilter: this.buildConversationChunkFilter(
|
|
4063
|
-
|
|
4064
|
-
|
|
4533
|
+
conversationFilter: this.buildConversationChunkFilter({
|
|
4534
|
+
sessionKey: normalized.conversationScope?.sessionKey,
|
|
4535
|
+
...timeRange ? { timeRange } : {}
|
|
4536
|
+
}),
|
|
4537
|
+
bridgeFilter: activeSources.conversation ? this.buildBridgeChunkFilter(timeRange ? { timeRange } : void 0) : void 0,
|
|
4538
|
+
bridgeMaxResults: this.getBridgeChunkBudget(normalized.maxResults ?? 10),
|
|
4065
4539
|
scope: "agent",
|
|
4066
4540
|
scopeRef: this.agentScopeRef,
|
|
4067
4541
|
rerankConfig: mongoCfg.reranking,
|
|
4068
4542
|
queryRewriteConfig: mongoCfg.queryRewriting,
|
|
4069
4543
|
enableContiguousMerge: mongoCfg.enableContiguousMerge,
|
|
4070
|
-
enableContextExpansion: mongoCfg.enableContextExpansion
|
|
4544
|
+
enableContextExpansion: mongoCfg.enableContextExpansion,
|
|
4545
|
+
...normalized.sourcePreference ? { sourcePreference: normalized.sourcePreference } : {},
|
|
4546
|
+
...timeRange ? { explicitTimeRange: timeRange } : {},
|
|
4547
|
+
...normalized.structuredScope ? { structuredScope: normalized.structuredScope } : {},
|
|
4548
|
+
...normalized.referenceScope ? { referenceScope: normalized.referenceScope } : {},
|
|
4549
|
+
...normalized.proceduralScope ? { proceduralScope: normalized.proceduralScope } : {}
|
|
4071
4550
|
}
|
|
4072
|
-
})
|
|
4073
|
-
|
|
4074
|
-
|
|
4551
|
+
})
|
|
4552
|
+
});
|
|
4553
|
+
emitTelemetry(this.db, this.prefix, {
|
|
4554
|
+
meta: {
|
|
4555
|
+
agentId: this.agentId,
|
|
4556
|
+
operation: "search"
|
|
4557
|
+
},
|
|
4558
|
+
durationMs: Date.now() - searchStart,
|
|
4559
|
+
ok: response.results.length > 0,
|
|
4560
|
+
pathUsed: response.metadata.pathsExecuted.join(","),
|
|
4561
|
+
resultCount: response.results.length,
|
|
4562
|
+
topScore: response.results[0]?.score ?? 0,
|
|
4563
|
+
fusionMethod: mongoCfg.fusionMethod
|
|
4564
|
+
});
|
|
4565
|
+
const v2Details = {
|
|
4566
|
+
classification: response.metadata.classification,
|
|
4567
|
+
sourceOrder: response.metadata.sourceOrder,
|
|
4568
|
+
constraintsApplied: response.metadata.constraintsApplied,
|
|
4569
|
+
pathsExecuted: response.metadata.pathsExecuted,
|
|
4570
|
+
resultsByPath: response.metadata.resultsByPath,
|
|
4571
|
+
evidenceCoverage: response.metadata.evidenceCoverage
|
|
4572
|
+
};
|
|
4573
|
+
if (response.results.length > 0) {
|
|
4574
|
+
this.setLastSearchMode("v2", v2Details);
|
|
4575
|
+
if (mongoCfg.cache.enabled) {
|
|
4576
|
+
const sourceScope = classifyQueryCacheSourceScope(response.results);
|
|
4577
|
+
const ttlSec = resolveQueryCacheTtlSec(response.results, mongoCfg.cache);
|
|
4578
|
+
writeCache({
|
|
4579
|
+
db: this.db,
|
|
4580
|
+
prefix: this.prefix,
|
|
4581
|
+
query: cacheQuery,
|
|
4582
|
+
requestSignature,
|
|
4075
4583
|
agentId: this.agentId,
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
fusionMethod: mongoCfg.fusionMethod
|
|
4084
|
-
});
|
|
4085
|
-
const v2Details = {
|
|
4086
|
-
plan: v2.metadata.plan.paths,
|
|
4087
|
-
confidence: v2.metadata.plan.confidence,
|
|
4088
|
-
constraints: v2.metadata.plan.constraints,
|
|
4089
|
-
pathsExecuted: v2.metadata.pathsExecuted,
|
|
4090
|
-
resultsByPath: v2.metadata.resultsByPath
|
|
4091
|
-
};
|
|
4092
|
-
if (v2.results.length > 0) {
|
|
4093
|
-
this.setLastSearchMode("v2", v2Details);
|
|
4094
|
-
if (mongoCfg.cache.enabled) {
|
|
4095
|
-
const sourceScope = classifyQueryCacheSourceScope(v2.results);
|
|
4096
|
-
const ttlSec = resolveQueryCacheTtlSec(v2.results, mongoCfg.cache);
|
|
4097
|
-
writeCache({
|
|
4098
|
-
db: this.db,
|
|
4099
|
-
prefix: this.prefix,
|
|
4100
|
-
query: cleaned,
|
|
4101
|
-
agentId: this.agentId,
|
|
4102
|
-
scope: "agent",
|
|
4103
|
-
scopeRef: this.agentScopeRef,
|
|
4104
|
-
results: v2.results,
|
|
4105
|
-
pathUsed: v2.metadata.pathsExecuted.join(","),
|
|
4106
|
-
sourceScope,
|
|
4107
|
-
ttlSec
|
|
4108
|
-
});
|
|
4109
|
-
}
|
|
4110
|
-
return v2.results;
|
|
4584
|
+
scope: "agent",
|
|
4585
|
+
scopeRef: this.agentScopeRef,
|
|
4586
|
+
results: response.results,
|
|
4587
|
+
pathUsed: response.metadata.pathsExecuted.join(","),
|
|
4588
|
+
sourceScope,
|
|
4589
|
+
ttlSec
|
|
4590
|
+
});
|
|
4111
4591
|
}
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
return fallbackResults;
|
|
4118
|
-
} catch (err) {
|
|
4119
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
4120
|
-
log.warn(`planner search failed, falling back to legacy search: ${message}`);
|
|
4121
|
-
const fallbackResults = await this.legacySearch(cleaned, opts);
|
|
4122
|
-
this.setLastSearchMode("v2->legacy-error", {
|
|
4123
|
-
error: message,
|
|
4124
|
-
fallbackResults: fallbackResults.length
|
|
4125
|
-
});
|
|
4126
|
-
return fallbackResults;
|
|
4592
|
+
return response;
|
|
4593
|
+
}
|
|
4594
|
+
if (requestHasHardConstraints(normalized)) {
|
|
4595
|
+
this.setLastSearchMode("v2:constrained-empty", v2Details);
|
|
4596
|
+
return response;
|
|
4127
4597
|
}
|
|
4598
|
+
const fallbackResults = await this.legacySearch(normalized.query, {
|
|
4599
|
+
maxResults: normalized.maxResults,
|
|
4600
|
+
minScore: normalized.minScore,
|
|
4601
|
+
sessionKey: normalized.conversationScope?.sessionKey
|
|
4602
|
+
});
|
|
4603
|
+
this.setLastSearchMode("v2->legacy-empty", {
|
|
4604
|
+
...v2Details,
|
|
4605
|
+
fallbackResults: fallbackResults.length
|
|
4606
|
+
});
|
|
4607
|
+
return {
|
|
4608
|
+
results: fallbackResults,
|
|
4609
|
+
metadata: {
|
|
4610
|
+
...response.metadata,
|
|
4611
|
+
pathsExecuted: response.metadata.pathsExecuted.length ? response.metadata.pathsExecuted : ["legacy"]
|
|
4612
|
+
}
|
|
4613
|
+
};
|
|
4128
4614
|
}
|
|
4129
4615
|
async relevanceExplain(params) {
|
|
4130
4616
|
if (!this.relevance) throw new Error("relevance runtime is unavailable");
|
|
@@ -4904,7 +5390,7 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
4904
5390
|
if (hoursSinceRefresh < autoRefreshHours) return;
|
|
4905
5391
|
log.info(`KB auto-refresh: ${hoursSinceRefresh.toFixed(1)}h since last import, refreshing ${paths.length} paths`);
|
|
4906
5392
|
try {
|
|
4907
|
-
const { ingestFilesToKB } = await import("./mongodb-kb-
|
|
5393
|
+
const { ingestFilesToKB } = await import("./mongodb-kb-CumfgJ4z.js");
|
|
4908
5394
|
const result = await ingestFilesToKB({
|
|
4909
5395
|
db: this.db,
|
|
4910
5396
|
prefix: this.prefix,
|
|
@@ -4979,7 +5465,7 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
4979
5465
|
}
|
|
4980
5466
|
async writeStructuredMemory(entry) {
|
|
4981
5467
|
const mongoCfg = this.config.mongodb;
|
|
4982
|
-
const { writeStructuredMemory: writeFn } = await import("./mongodb-structured-memory-
|
|
5468
|
+
const { writeStructuredMemory: writeFn } = await import("./mongodb-structured-memory-D4lNdWB9.js");
|
|
4983
5469
|
return writeFn({
|
|
4984
5470
|
db: this.db,
|
|
4985
5471
|
prefix: this.prefix,
|
|
@@ -4993,7 +5479,7 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
4993
5479
|
}
|
|
4994
5480
|
async writeProcedure(entry) {
|
|
4995
5481
|
const mongoCfg = this.config.mongodb;
|
|
4996
|
-
const { writeProcedure: writeFn } = await import("./mongodb-procedures-
|
|
5482
|
+
const { writeProcedure: writeFn } = await import("./mongodb-procedures-DAM6zeem.js");
|
|
4997
5483
|
return writeFn({
|
|
4998
5484
|
db: this.db,
|
|
4999
5485
|
prefix: this.prefix,
|
|
@@ -5189,6 +5675,25 @@ var MongoDBMemoryManager = class MongoDBMemoryManager {
|
|
|
5189
5675
|
}
|
|
5190
5676
|
}
|
|
5191
5677
|
};
|
|
5678
|
+
function pathMatchesSourcePreference(path, source) {
|
|
5679
|
+
switch (source) {
|
|
5680
|
+
case "conversation": return path === "hybrid" || path === "raw-window";
|
|
5681
|
+
case "reference": return path === "kb";
|
|
5682
|
+
case "structured": return path === "structured" || path === "active-critical";
|
|
5683
|
+
case "procedural": return path === "procedural";
|
|
5684
|
+
case "episodic": return path === "episodic";
|
|
5685
|
+
case "graph": return path === "graph";
|
|
5686
|
+
default: return false;
|
|
5687
|
+
}
|
|
5688
|
+
}
|
|
5689
|
+
function reorderPathsBySourcePreference(paths, sourcePreference) {
|
|
5690
|
+
if (!sourcePreference || sourcePreference.length === 0) return paths;
|
|
5691
|
+
return [...paths].toSorted((left, right) => {
|
|
5692
|
+
const leftRank = sourcePreference.findIndex((source) => pathMatchesSourcePreference(left, source));
|
|
5693
|
+
const rightRank = sourcePreference.findIndex((source) => pathMatchesSourcePreference(right, source));
|
|
5694
|
+
return (leftRank === -1 ? sourcePreference.length : leftRank) - (rightRank === -1 ? sourcePreference.length : rightRank);
|
|
5695
|
+
});
|
|
5696
|
+
}
|
|
5192
5697
|
function graphRelationPriority(type) {
|
|
5193
5698
|
switch (type) {
|
|
5194
5699
|
case "works_on":
|
|
@@ -5260,22 +5765,21 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5260
5765
|
const maxResults = context.maxResults ?? 20;
|
|
5261
5766
|
const minScore = context.searchOptions?.minScore ?? .1;
|
|
5262
5767
|
const numCandidates = context.searchOptions?.numCandidates ?? 200;
|
|
5263
|
-
const capabilities = context.searchOptions?.capabilities ?? {
|
|
5264
|
-
vectorSearch: true,
|
|
5265
|
-
textSearch: true,
|
|
5266
|
-
scoreFusion: true,
|
|
5267
|
-
rankFusion: false
|
|
5268
|
-
};
|
|
5768
|
+
const capabilities = context.searchOptions?.capabilities ?? await detectCapabilities(db, `${prefix}chunks`);
|
|
5269
5769
|
const fusionMethod = context.searchOptions?.fusionMethod ?? "scoreFusion";
|
|
5270
5770
|
const embeddingMode = context.searchOptions?.embeddingMode ?? "automated";
|
|
5271
5771
|
const bridgeMaxResults = context.searchOptions?.bridgeMaxResults ?? Math.max(2, Math.ceil(maxResults / 3));
|
|
5272
5772
|
const allowHybridBackstop = context.searchOptions?.allowHybridBackstop ?? true;
|
|
5273
|
-
const
|
|
5773
|
+
const rawPlan = planRetrieval(query, {
|
|
5274
5774
|
availablePaths: context.availablePaths,
|
|
5275
5775
|
knownEntityNames: graphQueryCandidates,
|
|
5276
5776
|
hasEpisodes: context.hasEpisodes,
|
|
5277
5777
|
hasGraphData: context.hasGraphData
|
|
5278
5778
|
});
|
|
5779
|
+
const plan = {
|
|
5780
|
+
...rawPlan,
|
|
5781
|
+
paths: reorderPathsBySourcePreference(rawPlan.paths, context.searchOptions?.sourcePreference)
|
|
5782
|
+
};
|
|
5279
5783
|
const qrConfig = context.searchOptions?.queryRewriteConfig;
|
|
5280
5784
|
let searchQuery = query;
|
|
5281
5785
|
let wasQueryRewritten = false;
|
|
@@ -5293,22 +5797,37 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5293
5797
|
}
|
|
5294
5798
|
}
|
|
5295
5799
|
const constrainedGraphCandidates = plan.constraints?.entities?.names && plan.constraints.entities.names.length > 0 ? plan.constraints.entities.names : graphQueryCandidates;
|
|
5296
|
-
const timeRange = plan.constraints?.timeRange ? resolveTimeRangePreset(plan.constraints.timeRange.preset) : void 0;
|
|
5800
|
+
const timeRange = context.searchOptions?.explicitTimeRange ?? (plan.constraints?.timeRange ? resolveTimeRangePreset(plan.constraints.timeRange.preset) : void 0);
|
|
5297
5801
|
const structuredFilter = {
|
|
5298
5802
|
agentId,
|
|
5299
|
-
|
|
5803
|
+
scope,
|
|
5804
|
+
scopeRef: agentScopeRef,
|
|
5805
|
+
...plan.constraints?.structured?.type ? { type: plan.constraints.structured.type } : {},
|
|
5806
|
+
...context.searchOptions?.structuredScope?.type ? { type: context.searchOptions.structuredScope.type } : {},
|
|
5807
|
+
...context.searchOptions?.structuredScope?.state ? { state: Array.isArray(context.searchOptions.structuredScope.state) ? context.searchOptions.structuredScope.state : context.searchOptions.structuredScope.state } : {},
|
|
5808
|
+
...context.searchOptions?.structuredScope?.salience?.length ? { salience: context.searchOptions.structuredScope.salience } : {}
|
|
5300
5809
|
};
|
|
5301
5810
|
const activeCriticalFilter = {
|
|
5302
5811
|
agentId,
|
|
5812
|
+
scope,
|
|
5813
|
+
scopeRef: agentScopeRef,
|
|
5303
5814
|
state: "active",
|
|
5304
5815
|
salience: plan.constraints?.activeCritical?.salience ?? ["critical", "high"],
|
|
5305
5816
|
currentOnly: true
|
|
5306
5817
|
};
|
|
5307
5818
|
const proceduralFilter = {
|
|
5308
5819
|
agentId,
|
|
5309
|
-
|
|
5820
|
+
scope,
|
|
5821
|
+
scopeRef: agentScopeRef,
|
|
5822
|
+
state: context.searchOptions?.proceduralScope?.state ?? "active",
|
|
5823
|
+
...context.searchOptions?.proceduralScope?.intentTags?.length ? { intentTags: context.searchOptions.proceduralScope.intentTags } : {}
|
|
5824
|
+
};
|
|
5825
|
+
const kbFilter = {
|
|
5826
|
+
...plan.constraints?.kb?.source ? { source: plan.constraints.kb.source } : {},
|
|
5827
|
+
...context.searchOptions?.referenceScope?.source ? { source: context.searchOptions.referenceScope.source } : {},
|
|
5828
|
+
...context.searchOptions?.referenceScope?.category ? { category: context.searchOptions.referenceScope.category } : {},
|
|
5829
|
+
...context.searchOptions?.referenceScope?.tags?.length ? { tags: context.searchOptions.referenceScope.tags } : {}
|
|
5310
5830
|
};
|
|
5311
|
-
const kbFilter = plan.constraints?.kb ? plan.constraints.kb.source ? { source: plan.constraints.kb.source } : {} : void 0;
|
|
5312
5831
|
const results = [];
|
|
5313
5832
|
const pathsExecuted = [];
|
|
5314
5833
|
const resultsByPath = {};
|
|
@@ -5345,8 +5864,15 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5345
5864
|
return [];
|
|
5346
5865
|
});
|
|
5347
5866
|
break;
|
|
5348
|
-
case "raw-window":
|
|
5349
|
-
|
|
5867
|
+
case "raw-window": {
|
|
5868
|
+
const rawWindowLimit = 50;
|
|
5869
|
+
pathResults = [...context.searchOptions?.sessionKey ? await getEventsBySession({
|
|
5870
|
+
db,
|
|
5871
|
+
prefix,
|
|
5872
|
+
agentId,
|
|
5873
|
+
sessionId: context.searchOptions.sessionKey,
|
|
5874
|
+
limit: rawWindowLimit
|
|
5875
|
+
}) : await getEventsByTimeRange({
|
|
5350
5876
|
db,
|
|
5351
5877
|
prefix,
|
|
5352
5878
|
agentId,
|
|
@@ -5354,7 +5880,7 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5354
5880
|
end: timeRange?.end ?? /* @__PURE__ */ new Date(),
|
|
5355
5881
|
scope,
|
|
5356
5882
|
scopeRef: agentScopeRef,
|
|
5357
|
-
limit:
|
|
5883
|
+
limit: rawWindowLimit
|
|
5358
5884
|
})].toSorted((a, b) => b.timestamp.getTime() - a.timestamp.getTime()).map((e, i) => ({
|
|
5359
5885
|
canonicalId: e.eventId,
|
|
5360
5886
|
path: `events/${e.eventId}`,
|
|
@@ -5369,6 +5895,7 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5369
5895
|
timestamp: e.timestamp
|
|
5370
5896
|
}));
|
|
5371
5897
|
break;
|
|
5898
|
+
}
|
|
5372
5899
|
case "graph":
|
|
5373
5900
|
if (constrainedGraphCandidates.length > 0) {
|
|
5374
5901
|
const entity = pickBestEntityMatch((await Promise.all(constrainedGraphCandidates.slice(0, 4).map((name) => findEntitiesByName({
|
|
@@ -5479,7 +6006,7 @@ async function searchV2(db, prefix, query, agentId, context) {
|
|
|
5479
6006
|
pathResults = await searchKB(kbChunksCollection(db, prefix), searchQuery, null, {
|
|
5480
6007
|
maxResults: Math.max(3, Math.floor((context.maxResults ?? 10) / 3)),
|
|
5481
6008
|
minScore,
|
|
5482
|
-
...kbFilter ? { filter: kbFilter } : {},
|
|
6009
|
+
...Object.keys(kbFilter).length > 0 ? { filter: kbFilter } : {},
|
|
5483
6010
|
numCandidates,
|
|
5484
6011
|
vectorIndexName: `${prefix}kb_chunks_vector`,
|
|
5485
6012
|
textIndexName: `${prefix}kb_chunks_text`,
|