stableclaw 2026.4.6 → 2026.4.8
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/README.md +22 -290
- package/package.json +1 -73
- package/dist/.buildstamp +0 -1
- package/dist/abort-C9luPDzM.js +0 -192
- package/dist/abort-cutoff-B1ws4nOb.js +0 -56
- package/dist/abort-cutoff.runtime-DyRUNN6p.js +0 -20
- package/dist/abort-cutoff.runtime.js +0 -1
- package/dist/abort-primitives-CGyFwJ93.js +0 -92
- package/dist/abort-signal-CrrraMAi.js +0 -13
- package/dist/abort.runtime-oBiooAFx.js +0 -2
- package/dist/abort.runtime.js +0 -1
- package/dist/access-DIqrGWVo.js +0 -81
- package/dist/access-control-DfV6HWO9.js +0 -152
- package/dist/account-action-gate-eHi2MB4J.js +0 -12
- package/dist/account-core-DOelA7Wl.js +0 -26
- package/dist/account-helpers-CafpxP7V.js +0 -1
- package/dist/account-helpers-jJOgsae3.js +0 -102
- package/dist/account-id-DXal1kRJ.js +0 -1
- package/dist/account-inspect-CfagweUE.js +0 -158
- package/dist/account-inspect-DOt4IDX6.js +0 -92
- package/dist/account-inspect-pnXre-7b.js +0 -81
- package/dist/account-lookup-CLJxpfHr.js +0 -17
- package/dist/account-resolution-CbKUJkzG.js +0 -30
- package/dist/account-selection-B8a_DqXo.js +0 -222
- package/dist/account-snapshot-fields-mr-1u321.js +0 -130
- package/dist/account-summary-DA6ds0Hk.js +0 -36
- package/dist/accounts-CO-lK8jJ.js +0 -150
- package/dist/accounts-D419O6Gq.js +0 -2
- package/dist/accounts-DKMLcV4g.js +0 -132
- package/dist/accounts-DdiZwn14.js +0 -57
- package/dist/accounts-SWhOQhoA.js +0 -58
- package/dist/accounts-iR2U_Vs4.js +0 -41
- package/dist/accounts-jsSym1md.js +0 -102
- package/dist/accounts-p4Eir-wB.js +0 -107
- package/dist/accounts-uAWNlC7q.js +0 -94
- package/dist/accounts-x23pAGjm.js +0 -137
- package/dist/accounts.runtime-PJOhs60R.js +0 -2
- package/dist/accounts.runtime.js +0 -1
- package/dist/ack-reactions-fcKs7CQ_.js +0 -43
- package/dist/acp-cli-ByWTIhFx.js +0 -2207
- package/dist/acp-runtime-D7wrReOP.js +0 -8
- package/dist/acp-stateful-target-driver-DY2EfkQt.js +0 -60
- package/dist/action-runtime-BdRtmydq.js +0 -318
- package/dist/action-runtime-DvNB5A61.js +0 -72
- package/dist/action-runtime-api-BnVs42oX.js +0 -1028
- package/dist/actions-CUYHtUqe.js +0 -531
- package/dist/actions.runtime-BBrSlYkH.js +0 -18
- package/dist/actions.runtime-DB4aKmBO.js +0 -5
- package/dist/actions.runtime-bdKprwSE.js +0 -2
- package/dist/actions.runtime.js +0 -1
- package/dist/active-listener-SB9ihcaC.js +0 -46
- package/dist/agent-command-C_MGil8o.js +0 -1457
- package/dist/agent-list-MRXQwyo0.js +0 -52
- package/dist/agent-media-payload-DDTSvr-n.js +0 -17
- package/dist/agent-paths-D711oayD.js +0 -12
- package/dist/agent-runner-utils-DEYzwZHa.js +0 -182
- package/dist/agent-runner.runtime-v2uIsAVy.js +0 -2218
- package/dist/agent-runner.runtime.js +0 -1
- package/dist/agent-runtime-Cz19IsmJ.js +0 -142
- package/dist/agent-s4m0Xp6V.js +0 -2
- package/dist/agent-scope-rWWUivuC.js +0 -215
- package/dist/agent-tools-login-DU1gQC9-.js +0 -57
- package/dist/agents/auth-profiles.runtime.js +0 -7
- package/dist/agents/pi-model-discovery-runtime.js +0 -2
- package/dist/agents-B2W3IoEe.js +0 -888
- package/dist/agents-DmE3LRim.js +0 -5
- package/dist/agents.config-D6XoJFQ-.js +0 -3
- package/dist/agents.config-Ui_tQc3C.js +0 -121
- package/dist/allow-from-Bj0HDNYh.js +0 -20
- package/dist/allow-from-CJwSUt_K.js +0 -9
- package/dist/allow-from-xOap1t02.js +0 -62
- package/dist/allow-list-DeRUbyj4.js +0 -319
- package/dist/allowed-updates-aOgPxM0g.js +0 -31
- package/dist/allowlist-config-edit-Ch2EvAYo.js +0 -279
- package/dist/allowlist-match-Dm6AqFEs.js +0 -63
- package/dist/ansi-B_0KjIJj.js +0 -54
- package/dist/anthropic-vertex-Stff_3_3.js +0 -21
- package/dist/anthropic-vertex-stream-DgR8-m-G.js +0 -653
- package/dist/api-7Pf2fGBp.js +0 -11
- package/dist/api-B80kCRiV.js +0 -11
- package/dist/api-B8_Wwelx.js +0 -2
- package/dist/api-BLI24uxW.js +0 -2
- package/dist/api-BLSg8PM8.js +0 -2
- package/dist/api-BRy2h4ZA.js +0 -2
- package/dist/api-BU_YBaOK.js +0 -3
- package/dist/api-BXQjqvPC.js +0 -2
- package/dist/api-BY9iT-AK.js +0 -106
- package/dist/api-BipiQQoS.js +0 -2
- package/dist/api-Bk5mFOju.js +0 -10
- package/dist/api-BrsLZRXn.js +0 -3
- package/dist/api-C16j1Xno.js +0 -2
- package/dist/api-CGtiPyfv.js +0 -8358
- package/dist/api-CHIsf5Wl.js +0 -21
- package/dist/api-CP9q4gi6.js +0 -19
- package/dist/api-CWPDpJCM.js +0 -2
- package/dist/api-CaMdAP9T.js +0 -2
- package/dist/api-CftMlodx.js +0 -5
- package/dist/api-Cpj_QQAF.js +0 -5
- package/dist/api-D13mhDzE.js +0 -33
- package/dist/api-DGcbqpSh.js +0 -2
- package/dist/api-DIGFhGqm.js +0 -30
- package/dist/api-DNxTJAiA.js +0 -5
- package/dist/api-DasNTWRo.js +0 -2
- package/dist/api-Dn7n2sWC.js +0 -74
- package/dist/api-Drq06O1M2.js +0 -6
- package/dist/api-OOJHubHS.js +0 -77
- package/dist/api-XH46JouJ.js +0 -2
- package/dist/api-builder-uuKvRs_O.js +0 -66
- package/dist/api-e3cIcFaV.js +0 -1
- package/dist/api-fetch-CvBBI8q8.js +0 -35
- package/dist/api-key-rotation-BCssmYGp.js +0 -150
- package/dist/api-rPpH8518.js +0 -322
- package/dist/api-w-46PN0B.js +0 -2
- package/dist/apply-DfjUTAkv.js +0 -485
- package/dist/apply.runtime-B-srtEUl.js +0 -2
- package/dist/apply.runtime-DOG87kW8.js +0 -166
- package/dist/apply.runtime.js +0 -1
- package/dist/approval-native-CI9-iVJa.js +0 -79
- package/dist/approval-native-runtime-2AVlvrdL.js +0 -399
- package/dist/approval-renderers-BTKeDNRo.js +0 -87
- package/dist/approval-runtime-DIA8ohXa.js +0 -262
- package/dist/archive-BaCqqQP1.js +0 -537
- package/dist/arg-split-get0R_Yr.js +0 -38
- package/dist/artifacts-DXKlQp1z.js +0 -52
- package/dist/assistant-error-format-CFSPB8qt.js +0 -109
- package/dist/async-lock-QqhPYwhW.js +0 -19
- package/dist/attachment-normalize-CMMyswNa.js +0 -921
- package/dist/audio-BxqNDSFq.js +0 -53
- package/dist/audio-DZWA6M9B.js +0 -41
- package/dist/audit-86J-sIQq.js +0 -54
- package/dist/audit-D9O3O-41.js +0 -86
- package/dist/audit-DwAT-Kzg.js +0 -892
- package/dist/audit-channel.allow-from.runtime-DmuUvr2f.js +0 -5
- package/dist/audit-channel.allow-from.runtime.js +0 -1
- package/dist/audit-channel.collect.runtime-B76LAkrF.js +0 -528
- package/dist/audit-channel.collect.runtime.js +0 -1
- package/dist/audit-channel.discord.runtime-qM5u1Hnl.js +0 -5
- package/dist/audit-channel.discord.runtime.js +0 -1
- package/dist/audit-channel.telegram.runtime-DpwmRUPy.js +0 -8
- package/dist/audit-channel.telegram.runtime.js +0 -1
- package/dist/audit-channel.zalouser.runtime-CzlFZYsv.js +0 -5
- package/dist/audit-channel.zalouser.runtime.js +0 -1
- package/dist/audit-extra.async-BupKW2BB.js +0 -820
- package/dist/audit-fs-B3GdTjId.js +0 -375
- package/dist/audit-membership-runtime-n195y1jy.js +0 -55
- package/dist/audit.deep.runtime-2gZPpwj8.js +0 -2
- package/dist/audit.deep.runtime.js +0 -1
- package/dist/audit.nondeep.runtime-6MT8p_25.js +0 -831
- package/dist/audit.nondeep.runtime.js +0 -1
- package/dist/audit.runtime-jdG0-1Bq.js +0 -7
- package/dist/audit.runtime.js +0 -1
- package/dist/auth-CmL8nlqP.js +0 -371
- package/dist/auth-Zya_1BCc.js +0 -181
- package/dist/auth-choice-CSSk-2VN.js +0 -69
- package/dist/auth-choice-Uyll2O8p.js +0 -341
- package/dist/auth-choice-legacy-5XgU4yCZ.js +0 -44
- package/dist/auth-choice-options-DTRb6fq4.js +0 -98
- package/dist/auth-choice-prompt-BAQTSD2R.js +0 -36
- package/dist/auth-choice-prompt-D6qkTw8h.js +0 -2
- package/dist/auth-choice-x5Cm9EXp.js +0 -3
- package/dist/auth-choice.apply-helpers-CtKCiOT4.js +0 -2
- package/dist/auth-choice.plugin-providers.runtime-BVH7Kq_W.js +0 -11
- package/dist/auth-choice.plugin-providers.runtime.js +0 -1
- package/dist/auth-health-BBleirOY.js +0 -165
- package/dist/auth-mode-policy-BD7_M2AG.js +0 -18
- package/dist/auth-profiles-B0SpzBJv.js +0 -440
- package/dist/auth-rate-limit-OkMcM1wH.js +0 -119
- package/dist/auth-store-Bro-SY1-.js +0 -242
- package/dist/avatar-policy-pho6U35i.js +0 -67
- package/dist/backend-config-CNAjcjho.js +0 -311
- package/dist/backoff-nvVV-tHk.js +0 -18
- package/dist/backup-create-CkkM1HNg.js +0 -462
- package/dist/backup-health-BWSliymu.js +0 -59
- package/dist/banner-DPWatUan.js +0 -370
- package/dist/banner-lDKgB6uE.js +0 -2
- package/dist/base-session-key-CRSigEPk.js +0 -14
- package/dist/binaries-CWBYavgU.js +0 -2
- package/dist/binaries-sPf-9aLM.js +0 -11
- package/dist/binding-registry-BkSvI4jO.js +0 -520
- package/dist/binding-targets-CdIq3brX.js +0 -99
- package/dist/bindings-AuReyzvX.js +0 -21
- package/dist/bindings-CYhLRcr8.js +0 -69
- package/dist/block-reply-pipeline-GSCCinHx.js +0 -266
- package/dist/block-streaming-4outFa6R.js +0 -107
- package/dist/bluebubbles-CorTCHc9.js +0 -64
- package/dist/bluebubbles-D2WymlOg.js +0 -235
- package/dist/bluebubbles-policy-C3d8eqhQ.js +0 -13
- package/dist/bonjour-cache-cleanup-BZJ-GrdX.js +0 -126
- package/dist/boolean-BEhDlAk_.js +0 -29
- package/dist/boolean-param-B807dWHx.js +0 -13
- package/dist/bot-BM1bybV7.js +0 -4268
- package/dist/bot-message-context-CdedyAq_.js +0 -2
- package/dist/bot-message-context-DKGx6N8p.js +0 -1175
- package/dist/bot-message-context.runtime-ClW1x1V5.js +0 -7
- package/dist/bot-message-context.runtime.js +0 -1
- package/dist/bot-message-context.session.runtime-BWjdkRuf.js +0 -12
- package/dist/bot-message-context.session.runtime.js +0 -1
- package/dist/bot-native-commands.delivery.runtime-CgfbR-Nj.js +0 -3
- package/dist/bot-native-commands.delivery.runtime.js +0 -1
- package/dist/bot-native-commands.runtime-DCz7w0aK.js +0 -11
- package/dist/bot-native-commands.runtime.js +0 -1
- package/dist/boundary-file-read-DB4ibbUg.js +0 -192
- package/dist/brave-web-search-provider-B7m_Mprt.js +0 -441
- package/dist/brew-B9JEV5Jj.js +0 -44
- package/dist/browser-config-D_OlwMzh.js +0 -226
- package/dist/browser-open-C9FOO4U_.js +0 -94
- package/dist/browser-runtime-CnWZ_eLQ.js +0 -185
- package/dist/browser-support-Cdp2Gr_6.js +0 -34
- package/dist/btw-command-CPUGSdlD.js +0 -16
- package/dist/build-info.json +0 -5
- package/dist/bundle-lsp-CCIAK1od.js +0 -93
- package/dist/bundled/boot-md/HOOK.md +0 -20
- package/dist/bundled/boot-md/handler.js +0 -180
- package/dist/bundled/bootstrap-extra-files/HOOK.md +0 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +0 -42
- package/dist/bundled/command-logger/HOOK.md +0 -122
- package/dist/bundled/command-logger/handler.js +0 -56
- package/dist/bundled/session-memory/HOOK.md +0 -108
- package/dist/bundled/session-memory/handler.js +0 -196
- package/dist/bundled/workflow-summary/HOOK.md +0 -123
- package/dist/bundled/workflow-summary/handler.js +0 -115
- package/dist/bundled-capability-metadata-BpPgIy_5.js +0 -40
- package/dist/bundled-compat-BLlVmkDi.js +0 -64
- package/dist/bundled-sources-BQTCt2mJ.js +0 -53
- package/dist/button-types-B3_mzf8P.js +0 -54
- package/dist/cache-controls-DBdT4I-H.js +0 -40
- package/dist/call-dy-GwrXS.js +0 -649
- package/dist/call-ti-nPnzT.js +0 -2
- package/dist/canvas-host/a2ui/.bundle.hash +0 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +0 -14896
- package/dist/canvas-host/a2ui/index.html +0 -307
- package/dist/capability-provider-runtime-CFUC5NbJ.js +0 -40
- package/dist/catalog-5PPtilI5.js +0 -274
- package/dist/channel-2EW4xzvV.js +0 -788
- package/dist/channel-BiRtGLF8.js +0 -1135
- package/dist/channel-C3AVw0Nl.js +0 -883
- package/dist/channel-CPe2XmyD.js +0 -1217
- package/dist/channel-CVFWRvjf.js +0 -337
- package/dist/channel-Cs0onQ6d.js +0 -4976
- package/dist/channel-D18v9r53.js +0 -1661
- package/dist/channel-D2n2s8Le.js +0 -208
- package/dist/channel-DWKApPW2.js +0 -454
- package/dist/channel-Depm5C-f.js +0 -800
- package/dist/channel-DwTcZxFU.js +0 -1129
- package/dist/channel-LT5vI3EK.js +0 -361
- package/dist/channel-XgThIGmf.js +0 -698
- package/dist/channel-account-context-CWd3uN_m.js +0 -104
- package/dist/channel-actions-DSvaYD1T.js +0 -39
- package/dist/channel-bQKtZIt6.js +0 -599
- package/dist/channel-catalog.json +0 -3
- package/dist/channel-config-D0eO5f5m.js +0 -115
- package/dist/channel-config-helpers-CLFL8FLU.js +0 -482
- package/dist/channel-config-primitives-DwsP66Ak.js +0 -3
- package/dist/channel-config-schema-DsguzRfd.js +0 -6
- package/dist/channel-config-writes-DQZOOZZ8.js +0 -1
- package/dist/channel-configured-B6WgvouH.js +0 -108
- package/dist/channel-feedback-DiLm9hqS.js +0 -257
- package/dist/channel-inbound-CXD3aSAK.js +0 -30
- package/dist/channel-issues-C-49e607.js +0 -13
- package/dist/channel-lifecycle-BnjeZxB6.js +0 -286
- package/dist/channel-lifecycle.core-Cn3zeU0h.js +0 -69
- package/dist/channel-options-DXJ7b7Ye.js +0 -39
- package/dist/channel-pairing-Byr3MFbN.js +0 -68
- package/dist/channel-plugin-common-D2EFcTg8.js +0 -4
- package/dist/channel-plugin-ids-DiOSWlnO.js +0 -56
- package/dist/channel-plugin-resolution-SMHmHx5v.js +0 -144
- package/dist/channel-policy-B-XKjrjK.js +0 -32
- package/dist/channel-reply-pipeline-BtBcBCNu.js +0 -16
- package/dist/channel-resolution-Du3EtWh1.js +0 -60
- package/dist/channel-runtime-F8_51GPp.js +0 -9
- package/dist/channel-selection-Bz3pl14y.js +0 -125
- package/dist/channel-send-result-CyfDCXJG.js +0 -40
- package/dist/channel-setup-yWpuHwhm.js +0 -51
- package/dist/channel-shared-gHcJ8n-f.js +0 -58
- package/dist/channel-status-CyoeLEnj.js +0 -2
- package/dist/channel-summary-5zHt-z1E.js +0 -139
- package/dist/channel-summary-B_fbXZ3l.js +0 -2
- package/dist/channel-target-DHO43h-I.js +0 -157
- package/dist/channel-targets-C8ZPfJmV.js +0 -18
- package/dist/channel-y-bXwYi3.js +0 -783
- package/dist/channel.runtime-B2SEUCf0.js +0 -14
- package/dist/channel.runtime-BF5qdBeA.js +0 -5
- package/dist/channel.runtime-BPaq6EO_.js +0 -108
- package/dist/channel.runtime-BV8FGxyb.js +0 -373
- package/dist/channel.runtime-CGnamSTC.js +0 -125
- package/dist/channel.runtime-CRNf20Ct.js +0 -80
- package/dist/channel.runtime-CRSWVexY.js +0 -335
- package/dist/channel.runtime-Cg6DmoTp.js +0 -783
- package/dist/channel.runtime-CpHTHeFR.js +0 -309
- package/dist/channel.runtime-ZdhCn8XI.js +0 -3315
- package/dist/channel.runtime-cXufT2kW.js +0 -61
- package/dist/channel.runtime.js +0 -1
- package/dist/channel.setup-Bq1vgxXZ.js +0 -279
- package/dist/channels-BZC2kp_G.js +0 -409
- package/dist/channels-CMeYB3bY.js +0 -1134
- package/dist/channels-cli-BIzqRmuu.js +0 -246
- package/dist/channels-status-issues-DqTdy1lq.js +0 -17
- package/dist/chat-envelope-DlGbh8k2.js +0 -158
- package/dist/chat-meta-wVbKo1sw.js +0 -700
- package/dist/chat-target-prefixes-DCF8a_Lp.js +0 -156
- package/dist/chat-type-DXjGtE-S.js +0 -10
- package/dist/chunk-CW-a7Cfh.js +0 -334
- package/dist/chunk-CrysgU_F.js +0 -36
- package/dist/chutes-oauth-Bh3BTMMG.js +0 -127
- package/dist/cjk-chars-Dl_Ko7yI.js +0 -50
- package/dist/clack-prompter-C5PtKpUH.js +0 -112
- package/dist/clawbot-cli-CgHyabtp.js +0 -9
- package/dist/clawhub-CDs2LE11.js +0 -263
- package/dist/clawhub-CO6YnoQZ.js +0 -163
- package/dist/cli/daemon-cli.js +0 -9
- package/dist/cli-CoOwN-V4.js +0 -164
- package/dist/cli-CpOL_jWZ.js +0 -152
- package/dist/cli-DCp06hI2.js +0 -2
- package/dist/cli-DVSDSUQm.js +0 -695
- package/dist/cli-backend-B20k67rv.js +0 -44
- package/dist/cli-backend-CcuyEMrq.js +0 -1
- package/dist/cli-backend-DMTxL8mq.js +0 -40
- package/dist/cli-backend-M4CTb3mq.js +0 -49
- package/dist/cli-migration-BwqQvUer.js +0 -100
- package/dist/cli-name-C3PA6Rhs.js +0 -21
- package/dist/cli-runner-8SNo1pKS.js +0 -1014
- package/dist/cli-runtime-ChUqI2f-.js +0 -3
- package/dist/cli-shared-01J1LZRE.js +0 -72
- package/dist/cli-startup-metadata.json +0 -14
- package/dist/cli-utils-eYXt_xAg.js +0 -40
- package/dist/cli-watchdog-defaults-Dff-MFUz.js +0 -14
- package/dist/cli.runtime-WWGaX6X6.js +0 -547
- package/dist/cli.runtime.js +0 -1
- package/dist/client-BFxjGELJ.js +0 -5
- package/dist/client-C8_DsF-r.js +0 -7
- package/dist/client-bootstrap-BiVps8T6.js +0 -2
- package/dist/client-bootstrap-CFGCltAu.js +0 -121
- package/dist/client-lEilgam1.js +0 -87
- package/dist/cmd-argv-BbyQhzAC.js +0 -68
- package/dist/code-execution-CPcuE0sX.js +0 -142
- package/dist/codex-native-web-search-CyrsDBZ2.js +0 -155
- package/dist/codex-native-web-search-PFJu8fcM.js +0 -2
- package/dist/collection-runtime-DJjFReXJ.js +0 -1
- package/dist/command-auth-BAkZv3cP.js +0 -356
- package/dist/command-auth-native-Bsp5Doyd.js +0 -3
- package/dist/command-auth-tqFmaIaJ.js +0 -64
- package/dist/command-detection-BV7Ipg_0.js +0 -49
- package/dist/command-detection-DyqWl5Nq.js +0 -2
- package/dist/command-format-CX1xXtgB.js +0 -22
- package/dist/command-format-DwYoemR9.js +0 -2
- package/dist/command-gating-NyDk7t84.js +0 -40
- package/dist/command-options-BUoAEXAi.js +0 -25
- package/dist/command-poll-backoff-B7RiSvcV.js +0 -56
- package/dist/command-poll-backoff.runtime-DX9gobB0.js +0 -7
- package/dist/command-poll-backoff.runtime.js +0 -1
- package/dist/command-queue-CxEmvSGT.js +0 -253
- package/dist/command-registry-CaJXKNoO.js +0 -3
- package/dist/command-registry-Ct0qor9d.js +0 -199
- package/dist/command-secret-gateway-43O-1Hnf.js +0 -2
- package/dist/command-secret-gateway-C39SFGHd.js +0 -442
- package/dist/command-secret-targets-Bns-l1xV.js +0 -2
- package/dist/command-secret-targets-CTrFghcj.js +0 -87
- package/dist/command-surface-CfP1vask.js +0 -2
- package/dist/commands/status.summary.runtime.js +0 -146
- package/dist/commands-BxWe27p0.js +0 -42
- package/dist/commands-CiyPyNRY.js +0 -194
- package/dist/commands-acp-BeCm2Wnq.js +0 -990
- package/dist/commands-context-DbfMrVv4.js +0 -33
- package/dist/commands-core-CEmQydIV.js +0 -241
- package/dist/commands-core.runtime-BYooAQbc.js +0 -2
- package/dist/commands-core.runtime.js +0 -1
- package/dist/commands-handlers.runtime-CEAP4Yv2.js +0 -3707
- package/dist/commands-handlers.runtime.js +0 -1
- package/dist/commands-info-COwAtIWb.js +0 -651
- package/dist/commands-models-B4EJh5Fy.js +0 -395
- package/dist/commands-o21Y9Xck.js +0 -4
- package/dist/commands-registry-DgMc5_jk.js +0 -295
- package/dist/commands-registry.data-5O2FOeZl.js +0 -935
- package/dist/commands-registry.runtime-CT_YXpwM.js +0 -2
- package/dist/commands-registry.runtime.js +0 -1
- package/dist/commands-status.runtime-D4F4iVUh.js +0 -2
- package/dist/commands-status.runtime.js +0 -1
- package/dist/commands.runtime-_ALsMFcS.js +0 -4
- package/dist/commands.runtime.js +0 -1
- package/dist/common-Dbmo0I1E.js +0 -206
- package/dist/compact.runtime-CBfyBJbR.js +0 -7
- package/dist/compact.runtime.js +0 -1
- package/dist/completion-cli-COhEd9CF.js +0 -2
- package/dist/completion-cli-DHe4Rit5.js +0 -466
- package/dist/components-CamLdbbq.js +0 -797
- package/dist/components-DPbtLC3x.js +0 -2
- package/dist/config-CKJA2kAO.js +0 -53
- package/dist/config-D7-9dK3i.js +0 -138
- package/dist/config-DJ29sg5U.js +0 -475
- package/dist/config-DJNI2tTK.js +0 -136
- package/dist/config-Dr2GRT3y.js +0 -135
- package/dist/config-DsqKYjeo.js +0 -421
- package/dist/config-Q9kc32gz.js +0 -41
- package/dist/config-RUefx-_1.js +0 -8
- package/dist/config-cli-BqlYHmPA.js +0 -945
- package/dist/config-error-handler-BKRR0_j_.js +0 -197
- package/dist/config-error-handler-CT1igiX6.js +0 -2
- package/dist/config-eval-hTWq4IVy.js +0 -100
- package/dist/config-guard-Bk3_wSTH.js +0 -113
- package/dist/config-helpers-DLVbtn1B.js +0 -117
- package/dist/config-paths-BKYh__Ga.js +0 -8
- package/dist/config-paths-DP5yXXo2.js +0 -102
- package/dist/config-presence-omlqvhAQ.js +0 -79
- package/dist/config-regex-CvZFnWkO.js +0 -39
- package/dist/config-runtime-ngoccXmP.js +0 -13
- package/dist/config-schema-B3sQY5B_.js +0 -133
- package/dist/config-schema-B_2MhEQY.js +0 -71
- package/dist/config-schema-BpIXBNbc.js +0 -202
- package/dist/config-schema-BtfQOmdV.js +0 -115
- package/dist/config-schema-Bw-Xbo_T.js +0 -85
- package/dist/config-schema-Cqj-Mugi.js +0 -105
- package/dist/config-schema-DQSj_ZL_.js +0 -29
- package/dist/config-schema-Pe1Vn9kb.js +0 -17
- package/dist/config-schema-f7nntJMh.js +0 -25
- package/dist/config-schema-lBqODOnr.js +0 -25
- package/dist/config-schema-mfJ91WLf.js +0 -65
- package/dist/config-secret-input.runtime-B_HyRtgE.js +0 -3
- package/dist/config-secret-input.runtime.js +0 -1
- package/dist/config-state-DfIk9ME6.js +0 -289
- package/dist/config-status-Bnobp1-p.js +0 -2
- package/dist/config-status-Db93sFQB.js +0 -109
- package/dist/config-update-B_S0YQ_Y.js +0 -3
- package/dist/config-update-CK4EDDeD.js +0 -127
- package/dist/config-validation-Bh_sg7RW.js +0 -276
- package/dist/config-value-CMTdBw5q.js +0 -25
- package/dist/configure-CGDY1YR7.js +0 -1140
- package/dist/configure-V8jejRHr.js +0 -2
- package/dist/configured-provider-fallback-DWYDg0L7.js +0 -15
- package/dist/connection-auth-CKM60o55.js +0 -30
- package/dist/connection-details-DyVOoGG6.js +0 -56
- package/dist/constants-Bq55qi82.js +0 -71
- package/dist/constants-CimYBSye.js +0 -4
- package/dist/content-blocks-DuKJNUtm.js +0 -785
- package/dist/context-D-9a98Zk.js +0 -227
- package/dist/context-visibility-DTMZdcAH.js +0 -14
- package/dist/context-visibility-vOvLMUrZ.js +0 -35
- package/dist/context-window-guard-WE0ENAeQ.js +0 -46
- package/dist/control-ui-assets-DVYAF-2p.js +0 -240
- package/dist/control-ui-shared-BKXkFsA7.js +0 -29
- package/dist/conversation-binding-C2nuZ3Eg.js +0 -520
- package/dist/conversation-binding-input-CBwdWDC4.js +0 -250
- package/dist/conversation-bindings-Cq4z4vhr.js +0 -210
- package/dist/conversation-id-4JeHag0a.js +0 -168
- package/dist/conversation-id-CXuzm-Ub.js +0 -116
- package/dist/conversation-id-DCTwJCZF.js +0 -43
- package/dist/conversation-label-C2xTELop.js +0 -32
- package/dist/conversation-runtime-bArk0IjJ.js +0 -85
- package/dist/core-DaMVvavf.js +0 -195
- package/dist/core-api-D0U2iGRK.js +0 -670
- package/dist/core-command-descriptors-DxRm2H1p.js +0 -91
- package/dist/create-client-BOKOxyiu.js +0 -58
- package/dist/create-client-Bzn467Jo.js +0 -2
- package/dist/credentials-BGPs1gIX.js +0 -242
- package/dist/credentials-DUoYFiLk.js +0 -22
- package/dist/credentials-read-CDYtvkBt.js +0 -74
- package/dist/credentials-read-KB395CbD.js +0 -2
- package/dist/credentials-write.runtime-Bx7mKj4E.js +0 -9
- package/dist/credentials-write.runtime.js +0 -1
- package/dist/creds-files-CTtTs6zG.js +0 -19
- package/dist/cron-cli-Di3TakVa.js +0 -644
- package/dist/crypto-node.runtime-DI0fQ6wI.js +0 -5
- package/dist/crypto-node.runtime.js +0 -1
- package/dist/crypto-runtime-Bc-jKPlv.js +0 -1036
- package/dist/current-time--aIDbABZ.js +0 -20
- package/dist/daemon-cli-Cnry1ft1.js +0 -370
- package/dist/daemon-install-de_bWPuS.js +0 -63
- package/dist/daemon-install-plan.shared-u00bwv47.js +0 -222
- package/dist/daemon-runtime-DPejcJWG.js +0 -12
- package/dist/dangerous-name-matching-DnCDaXzP.js +0 -48
- package/dist/dangerous-name-runtime-Dinw00TZ.js +0 -1
- package/dist/dangerous-tools-C3RlQe7u.js +0 -38
- package/dist/date-time-DRQ0-oaw.js +0 -118
- package/dist/ddg-search-provider-B0zLjcDN.js +0 -182
- package/dist/dedupe-DZbQYOSD.js +0 -59
- package/dist/default-account-warnings-BCrmijcz.js +0 -15
- package/dist/default-models-Br0v8QOH.js +0 -35
- package/dist/defaults-DAt--D9n.js +0 -6
- package/dist/defaults-D_Y_lvUP.js +0 -7
- package/dist/defaults-MkMfnGzi.js +0 -7
- package/dist/delegate-CLP7zDS_.js +0 -43
- package/dist/deliver-CIUEKe4q.js +0 -954
- package/dist/deliver-LN-Yg8wS.js +0 -3
- package/dist/deliver-reply-DL-CSF43.js +0 -238
- package/dist/deliver-runtime-CoqXhxlS.js +0 -2
- package/dist/delivery-CL_3vFSl.js +0 -834
- package/dist/delivery-context-CoAL-jTI.js +0 -106
- package/dist/delivery-info-DTAUApso.js +0 -40
- package/dist/delivery-queue-DBW69jH4.js +0 -2
- package/dist/delivery-queue-DMubgaLa.js +0 -289
- package/dist/deps-34N0Nmbl.js +0 -67
- package/dist/deps-BVogrCia.js +0 -2
- package/dist/deps-DZJpA4XG.js +0 -153
- package/dist/detect-Zrcrs8SP.js +0 -12
- package/dist/detect-binary-CEX186X6.js +0 -30
- package/dist/device-auth-D_0GUMYY.js +0 -19
- package/dist/device-bootstrap-Bnn4K3fQ.js +0 -3
- package/dist/device-bootstrap-bwpHYQhY.js +0 -176
- package/dist/device-health-B3q7Cmqn.js +0 -2
- package/dist/device-health-DhmPD0gq.js +0 -16
- package/dist/device-identity-Cak311si.js +0 -2
- package/dist/device-identity-Doxo0HJx.js +0 -140
- package/dist/device-metadata-normalization-B5_zplC_.js +0 -21
- package/dist/device-pairing-BCpR-Vtb.js +0 -520
- package/dist/devices-cli-DYPkfzsG.js +0 -328
- package/dist/diagnostic-DfKz60Xk.js +0 -311
- package/dist/diagnostic-events-CUSmY-rn.js +0 -48
- package/dist/diagnostic-flags-DLDDycUv.js +0 -64
- package/dist/diagnostic-runtime-ZQC4AswI.js +0 -1
- package/dist/diagnostics-Cxl1bFGj.js +0 -33
- package/dist/diagnostics-GjF7wpY9.js +0 -2
- package/dist/diagnostics-otel-C2RQUlQT.js +0 -3
- package/dist/diffs-DsHt689X.js +0 -2
- package/dist/direct-dm-ByuWacLn.js +0 -139
- package/dist/direct-management-DEtuCcDL.js +0 -2
- package/dist/direct-management-DMp7MOnt.js +0 -300
- package/dist/direct-room-ARYWsCbX.js +0 -2
- package/dist/direct-room-DYlSJOU_.js +0 -67
- package/dist/directive-handling.defaults-BMh2DXTA.js +0 -19
- package/dist/directive-handling.fast-lane-CBX4jbax.js +0 -2
- package/dist/directive-handling.fast-lane-DRvycpgg.js +0 -64
- package/dist/directive-handling.impl-BKJf5Ltu.js +0 -672
- package/dist/directive-handling.impl-BkdGnm-T.js +0 -2
- package/dist/directive-handling.levels-BHOBnnn8.js +0 -2
- package/dist/directive-handling.levels-CecoBNlK.js +0 -12
- package/dist/directive-handling.parse-BuTiWmrT.js +0 -375
- package/dist/directive-handling.persist-D9RYevoA.js +0 -133
- package/dist/directive-handling.persist.runtime-Cb_unTVH.js +0 -2
- package/dist/directive-handling.persist.runtime.js +0 -1
- package/dist/directive-handling.shared-_Zvt3-ej.js +0 -158
- package/dist/directive-tags-Cm0H6Dn_.js +0 -109
- package/dist/directives-f-UxcP8D.js +0 -209
- package/dist/directory-cache-CM_EUchr.js +0 -62
- package/dist/directory-cli-D6N59tzr.js +0 -238
- package/dist/directory-config-helpers-BCrssKbI.js +0 -141
- package/dist/directory-runtime-CAabZ_XW.js +0 -20
- package/dist/directory.static-TKo2MeNR.js +0 -45
- package/dist/discord-BOpl5w4U.js +0 -5
- package/dist/discord-account-wyFuLDq_.js +0 -11
- package/dist/discord-core-BpzKxDZ7.js +0 -5
- package/dist/discord-lOPvIxp4.js +0 -11
- package/dist/discord-runtime-surface-Dm5WUtCV.js +0 -67
- package/dist/discord-session-key-DaPto1yr.js +0 -11
- package/dist/discord-surface-Cg_Mu9MI.js +0 -30
- package/dist/discord-thread-bindings-zIOp1Tj4.js +0 -29
- package/dist/discord-timeouts-Di5n5LAU.js +0 -12
- package/dist/discovery-DLbFJLD_.js +0 -171
- package/dist/dispatch-C4gGGYZt.js +0 -858
- package/dist/dispatch-acp.runtime-DUHj6bP-.js +0 -884
- package/dist/dispatch-acp.runtime.js +0 -1
- package/dist/dist-7JNqoGV7.js +0 -3
- package/dist/dist-BqJPEiV8.js +0 -14245
- package/dist/dist-DdE56Pmi.js +0 -503
- package/dist/dist-shQCTuJB.js +0 -1239
- package/dist/dm-policy-shared-C99GNVxp.js +0 -188
- package/dist/dns-cli-vQBAzTmg.js +0 -192
- package/dist/docker-BN7sQKCb.js +0 -789
- package/dist/docs-cli-Br6cfKoS.js +0 -156
- package/dist/doctor-completion-Cf0GcTXR.js +0 -90
- package/dist/doctor-config-preflight-C2cKYiKe.js +0 -2
- package/dist/doctor-config-preflight-DNbO-_N8.js +0 -148
- package/dist/doctor-state-migrations-BXkbeSFy.js +0 -2
- package/dist/doctor-state-migrations-G3shZ-W_.js +0 -3
- package/dist/dotenv-CelghjA4.js +0 -11
- package/dist/dotenv-Csg1Xj8n.js +0 -113
- package/dist/embedding-provider-Aey9VsDb.js +0 -129
- package/dist/enable-BgSxsKp_.js +0 -57
- package/dist/encryption-guidance-62xAQFP4.js +0 -33
- package/dist/entry-status-3ymZYX2l.js +0 -172
- package/dist/entry.js +0 -209
- package/dist/env-CK3eZNIX.js +0 -40
- package/dist/env-overrides-CcDOWo0Y.js +0 -346
- package/dist/env-overrides.runtime-CKb7-Q72.js +0 -7
- package/dist/env-overrides.runtime.js +0 -1
- package/dist/env-substitution-UhJwb0ys.js +0 -136
- package/dist/envelope-CrC9AdBL.js +0 -137
- package/dist/error-runtime-D-gKufd_.js +0 -2
- package/dist/error-text-BC9WfvfX.js +0 -24
- package/dist/errors-Bs2h5H8p.js +0 -71
- package/dist/errors-CjFsF-QY.js +0 -9
- package/dist/exa-web-search-provider-DUUlmDcV.js +0 -355
- package/dist/exec-BO6vYjRf.js +0 -368
- package/dist/exec-CD7C9g-b.js +0 -2
- package/dist/exec-approval-reply-CFOEcmIv.js +0 -189
- package/dist/exec-approval-session-target-BbsAlD1Q.js +0 -159
- package/dist/exec-approvals-3UDrE7Q9.js +0 -1565
- package/dist/exec-approvals-CW5axvaY.js +0 -121
- package/dist/exec-approvals-cli-BPYvtJv-.js +0 -483
- package/dist/exec-approvals-effective-DbLJfkpe.js +0 -140
- package/dist/exec-safe-bin-runtime-policy-218hHVyc.js +0 -90
- package/dist/exec-safety-XzKkUSvE.js +0 -24
- package/dist/export-html/template.css +0 -1060
- package/dist/export-html/template.html +0 -88
- package/dist/export-html/template.js +0 -1875
- package/dist/export-html/vendor/highlight.min.js +0 -1213
- package/dist/export-html/vendor/marked.min.js +0 -6
- package/dist/extension-shared-V_4IXpRU.js +0 -74
- package/dist/extensionAPI.js +0 -17
- package/dist/extensions/acpx/index.js +0 -1855
- package/dist/extensions/acpx/mcp-proxy.mjs +0 -151
- package/dist/extensions/acpx/openclaw.plugin.json +0 -132
- package/dist/extensions/acpx/package.json +0 -14
- package/dist/extensions/acpx/runtime-api.js +0 -5
- package/dist/extensions/acpx/skills/acp-router/SKILL.md +0 -245
- package/dist/extensions/aicq-chat/index.js +0 -284
- package/dist/extensions/aicq-chat/openclaw.plugin.json +0 -30
- package/dist/extensions/amazon-bedrock/api.js +0 -3
- package/dist/extensions/amazon-bedrock/discovery.js +0 -2
- package/dist/extensions/amazon-bedrock/index.js +0 -65
- package/dist/extensions/amazon-bedrock/openclaw.plugin.json +0 -44
- package/dist/extensions/amazon-bedrock/package.json +0 -23
- package/dist/extensions/anthropic/api.js +0 -3
- package/dist/extensions/anthropic/cli-backend.js +0 -2
- package/dist/extensions/anthropic/cli-migration.js +0 -2
- package/dist/extensions/anthropic/cli-shared.js +0 -2
- package/dist/extensions/anthropic/index.js +0 -357
- package/dist/extensions/anthropic/media-understanding-provider.js +0 -2
- package/dist/extensions/anthropic/openclaw.plugin.json +0 -64
- package/dist/extensions/anthropic/package.json +0 -12
- package/dist/extensions/anthropic/stream-wrappers.js +0 -2
- package/dist/extensions/anthropic/test-api.js +0 -2
- package/dist/extensions/anthropic-vertex/api.js +0 -4
- package/dist/extensions/anthropic-vertex/index.js +0 -36
- package/dist/extensions/anthropic-vertex/openclaw.plugin.json +0 -12
- package/dist/extensions/anthropic-vertex/package.json +0 -12
- package/dist/extensions/anthropic-vertex/provider-catalog.js +0 -2
- package/dist/extensions/anthropic-vertex/region.js +0 -2
- package/dist/extensions/bluebubbles/api.js +0 -5
- package/dist/extensions/bluebubbles/channel-config-api.js +0 -2
- package/dist/extensions/bluebubbles/index.js +0 -13
- package/dist/extensions/bluebubbles/openclaw.plugin.json +0 -11
- package/dist/extensions/bluebubbles/package.json +0 -48
- package/dist/extensions/bluebubbles/runtime-api.js +0 -2
- package/dist/extensions/bluebubbles/setup-entry.js +0 -26
- package/dist/extensions/brave/index.js +0 -13
- package/dist/extensions/brave/openclaw.plugin.json +0 -50
- package/dist/extensions/brave/package.json +0 -12
- package/dist/extensions/brave/test-api.js +0 -2
- package/dist/extensions/brave/web-search-provider.js +0 -2
- package/dist/extensions/browser/browser-runtime-api.js +0 -4
- package/dist/extensions/browser/index.js +0 -20
- package/dist/extensions/browser/openclaw.plugin.json +0 -9
- package/dist/extensions/browser/package.json +0 -12
- package/dist/extensions/browser/runtime-api.js +0 -6
- package/dist/extensions/browser/test-support.js +0 -50
- package/dist/extensions/byteplus/api.js +0 -3
- package/dist/extensions/byteplus/index.js +0 -63
- package/dist/extensions/byteplus/models.js +0 -2
- package/dist/extensions/byteplus/openclaw.plugin.json +0 -33
- package/dist/extensions/byteplus/package.json +0 -12
- package/dist/extensions/byteplus/provider-catalog.js +0 -2
- package/dist/extensions/chutes/api.js +0 -3
- package/dist/extensions/chutes/index.js +0 -143
- package/dist/extensions/chutes/models.js +0 -2
- package/dist/extensions/chutes/onboard.js +0 -3
- package/dist/extensions/chutes/openclaw.plugin.json +0 -44
- package/dist/extensions/chutes/package.json +0 -12
- package/dist/extensions/chutes/provider-catalog.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/api.js +0 -3
- package/dist/extensions/cloudflare-ai-gateway/index.js +0 -188
- package/dist/extensions/cloudflare-ai-gateway/models.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/onboard.js +0 -2
- package/dist/extensions/cloudflare-ai-gateway/openclaw.plugin.json +0 -33
- package/dist/extensions/cloudflare-ai-gateway/package.json +0 -12
- package/dist/extensions/copilot-proxy/index.js +0 -125
- package/dist/extensions/copilot-proxy/openclaw.plugin.json +0 -27
- package/dist/extensions/copilot-proxy/package.json +0 -12
- package/dist/extensions/copilot-proxy/runtime-api.js +0 -3
- package/dist/extensions/deepgram/audio.js +0 -2
- package/dist/extensions/deepgram/index.js +0 -13
- package/dist/extensions/deepgram/media-understanding-provider.js +0 -2
- package/dist/extensions/deepgram/openclaw.plugin.json +0 -13
- package/dist/extensions/deepgram/package.json +0 -12
- package/dist/extensions/deepseek/api.js +0 -3
- package/dist/extensions/deepseek/index.js +0 -33
- package/dist/extensions/deepseek/models.js +0 -2
- package/dist/extensions/deepseek/onboard.js +0 -2
- package/dist/extensions/deepseek/openclaw.plugin.json +0 -32
- package/dist/extensions/deepseek/package.json +0 -12
- package/dist/extensions/deepseek/provider-catalog.js +0 -2
- package/dist/extensions/device-pair/api.js +0 -10
- package/dist/extensions/device-pair/index.js +0 -483
- package/dist/extensions/device-pair/notify.js +0 -2
- package/dist/extensions/device-pair/openclaw.plugin.json +0 -21
- package/dist/extensions/device-pair/qr-image.js +0 -3
- package/dist/extensions/diagnostics-otel/api.js +0 -6
- package/dist/extensions/diagnostics-otel/index.js +0 -485
- package/dist/extensions/diagnostics-otel/openclaw.plugin.json +0 -8
- package/dist/extensions/diagnostics-otel/package.json +0 -27
- package/dist/extensions/diffs/api.js +0 -4
- package/dist/extensions/diffs/assets/viewer-runtime.js +0 -1888
- package/dist/extensions/diffs/index.js +0 -2058
- package/dist/extensions/diffs/openclaw.plugin.json +0 -226
- package/dist/extensions/diffs/package.json +0 -24
- package/dist/extensions/diffs/runtime-api.js +0 -3
- package/dist/extensions/diffs/skills/diffs/SKILL.md +0 -23
- package/dist/extensions/discord/action-runtime-api.js +0 -2
- package/dist/extensions/discord/api.js +0 -14
- package/dist/extensions/discord/channel-config-api.js +0 -2
- package/dist/extensions/discord/index.js +0 -612
- package/dist/extensions/discord/openclaw.plugin.json +0 -11
- package/dist/extensions/discord/package.json +0 -52
- package/dist/extensions/discord/runtime-api.js +0 -230
- package/dist/extensions/discord/session-key-api.js +0 -2
- package/dist/extensions/discord/setup-entry.js +0 -10
- package/dist/extensions/discord/test-api.js +0 -45
- package/dist/extensions/discord/timeouts.js +0 -2
- package/dist/extensions/duckduckgo/index.js +0 -13
- package/dist/extensions/duckduckgo/openclaw.plugin.json +0 -41
- package/dist/extensions/duckduckgo/package.json +0 -12
- package/dist/extensions/duckduckgo/web-search-provider.js +0 -2
- package/dist/extensions/elevenlabs/index.js +0 -13
- package/dist/extensions/elevenlabs/openclaw.plugin.json +0 -13
- package/dist/extensions/elevenlabs/package.json +0 -12
- package/dist/extensions/elevenlabs/speech-provider.js +0 -2
- package/dist/extensions/elevenlabs/test-api.js +0 -2
- package/dist/extensions/elevenlabs/tts.js +0 -2
- package/dist/extensions/exa/index.js +0 -13
- package/dist/extensions/exa/openclaw.plugin.json +0 -39
- package/dist/extensions/exa/package.json +0 -12
- package/dist/extensions/exa/web-search-provider.js +0 -2
- package/dist/extensions/fal/image-generation-provider.js +0 -2
- package/dist/extensions/fal/index.js +0 -45
- package/dist/extensions/fal/onboard.js +0 -2
- package/dist/extensions/fal/openclaw.plugin.json +0 -40
- package/dist/extensions/fal/package.json +0 -12
- package/dist/extensions/feishu/api.js +0 -7
- package/dist/extensions/feishu/index.js +0 -2531
- package/dist/extensions/feishu/openclaw.plugin.json +0 -14
- package/dist/extensions/feishu/package.json +0 -52
- package/dist/extensions/feishu/runtime-api.js +0 -34
- package/dist/extensions/feishu/session-key-api.js +0 -2
- package/dist/extensions/feishu/setup-api.js +0 -2
- package/dist/extensions/feishu/setup-entry.js +0 -6
- package/dist/extensions/feishu/skills/feishu-doc/SKILL.md +0 -211
- package/dist/extensions/feishu/skills/feishu-doc/references/block-types.md +0 -103
- package/dist/extensions/feishu/skills/feishu-drive/SKILL.md +0 -97
- package/dist/extensions/feishu/skills/feishu-perm/SKILL.md +0 -119
- package/dist/extensions/feishu/skills/feishu-wiki/SKILL.md +0 -111
- package/dist/extensions/firecrawl/api.js +0 -33
- package/dist/extensions/firecrawl/index.js +0 -184
- package/dist/extensions/firecrawl/openclaw.plugin.json +0 -87
- package/dist/extensions/firecrawl/package.json +0 -12
- package/dist/extensions/firecrawl/web-search-provider.js +0 -2
- package/dist/extensions/github-copilot/api.js +0 -2
- package/dist/extensions/github-copilot/index.js +0 -138
- package/dist/extensions/github-copilot/login.js +0 -2
- package/dist/extensions/github-copilot/models-defaults.js +0 -38
- package/dist/extensions/github-copilot/models.js +0 -2
- package/dist/extensions/github-copilot/openclaw.plugin.json +0 -31
- package/dist/extensions/github-copilot/package.json +0 -12
- package/dist/extensions/github-copilot/token.js +0 -3
- package/dist/extensions/github-copilot/usage.js +0 -2
- package/dist/extensions/google/api.js +0 -3
- package/dist/extensions/google/cli-backend.js +0 -2
- package/dist/extensions/google/gemini-cli-provider.js +0 -110
- package/dist/extensions/google/google-shared.test-helpers.js +0 -92
- package/dist/extensions/google/image-generation-provider.js +0 -162
- package/dist/extensions/google/index.js +0 -213
- package/dist/extensions/google/media-understanding-provider.js +0 -104
- package/dist/extensions/google/model-id.js +0 -2
- package/dist/extensions/google/oauth.credentials.js +0 -2
- package/dist/extensions/google/oauth.flow.js +0 -2
- package/dist/extensions/google/oauth.http.js +0 -2
- package/dist/extensions/google/oauth.js +0 -3
- package/dist/extensions/google/oauth.project.js +0 -2
- package/dist/extensions/google/oauth.runtime.js +0 -2
- package/dist/extensions/google/oauth.shared.js +0 -2
- package/dist/extensions/google/oauth.token.js +0 -2
- package/dist/extensions/google/openclaw.plugin.json +0 -89
- package/dist/extensions/google/package.json +0 -12
- package/dist/extensions/google/provider-models.js +0 -2
- package/dist/extensions/google/runtime-api.js +0 -4
- package/dist/extensions/google/test-api.js +0 -2
- package/dist/extensions/google/web-search-provider.js +0 -2
- package/dist/extensions/googlechat/api.js +0 -2
- package/dist/extensions/googlechat/channel-config-api.js +0 -7
- package/dist/extensions/googlechat/index.js +0 -13
- package/dist/extensions/googlechat/openclaw.plugin.json +0 -11
- package/dist/extensions/googlechat/package.json +0 -48
- package/dist/extensions/googlechat/runtime-api.js +0 -39
- package/dist/extensions/googlechat/setup-entry.js +0 -6
- package/dist/extensions/googlechat/test-api.js +0 -3
- package/dist/extensions/groq/index.js +0 -13
- package/dist/extensions/groq/media-understanding-provider.js +0 -2
- package/dist/extensions/groq/openclaw.plugin.json +0 -13
- package/dist/extensions/groq/package.json +0 -12
- package/dist/extensions/huggingface/api.js +0 -4
- package/dist/extensions/huggingface/index.js +0 -54
- package/dist/extensions/huggingface/models.js +0 -2
- package/dist/extensions/huggingface/onboard.js +0 -2
- package/dist/extensions/huggingface/openclaw.plugin.json +0 -34
- package/dist/extensions/huggingface/package.json +0 -12
- package/dist/extensions/huggingface/provider-catalog.js +0 -3
- package/dist/extensions/imessage/api.js +0 -4
- package/dist/extensions/imessage/channel-config-api.js +0 -2
- package/dist/extensions/imessage/index.js +0 -211
- package/dist/extensions/imessage/openclaw.plugin.json +0 -11
- package/dist/extensions/imessage/package.json +0 -26
- package/dist/extensions/imessage/runtime-api.js +0 -11
- package/dist/extensions/imessage/setup-entry.js +0 -13
- package/dist/extensions/irc/api.js +0 -2
- package/dist/extensions/irc/channel-config-api.js +0 -2
- package/dist/extensions/irc/index.js +0 -12
- package/dist/extensions/irc/openclaw.plugin.json +0 -11
- package/dist/extensions/irc/package.json +0 -28
- package/dist/extensions/irc/setup-entry.js +0 -6
- package/dist/extensions/kilocode/api.js +0 -3
- package/dist/extensions/kilocode/index.js +0 -37
- package/dist/extensions/kilocode/onboard.js +0 -3
- package/dist/extensions/kilocode/openclaw.plugin.json +0 -33
- package/dist/extensions/kilocode/package.json +0 -12
- package/dist/extensions/kilocode/provider-catalog.js +0 -2
- package/dist/extensions/kilocode/provider-models.js +0 -2
- package/dist/extensions/kilocode/shared.js +0 -2
- package/dist/extensions/kimi-coding/api.js +0 -3
- package/dist/extensions/kimi-coding/index.js +0 -81
- package/dist/extensions/kimi-coding/onboard.js +0 -2
- package/dist/extensions/kimi-coding/openclaw.plugin.json +0 -38
- package/dist/extensions/kimi-coding/package.json +0 -12
- package/dist/extensions/kimi-coding/provider-catalog.js +0 -2
- package/dist/extensions/kimi-coding/stream.js +0 -2
- package/dist/extensions/line/api.js +0 -13
- package/dist/extensions/line/index.js +0 -815
- package/dist/extensions/line/openclaw.plugin.json +0 -11
- package/dist/extensions/line/package.json +0 -41
- package/dist/extensions/line/runtime-api.js +0 -11
- package/dist/extensions/line/setup-api.js +0 -3
- package/dist/extensions/line/setup-entry.js +0 -15
- package/dist/extensions/litellm/api.js +0 -2
- package/dist/extensions/litellm/index.js +0 -36
- package/dist/extensions/litellm/onboard.js +0 -2
- package/dist/extensions/litellm/openclaw.plugin.json +0 -33
- package/dist/extensions/litellm/package.json +0 -12
- package/dist/extensions/litellm/provider-catalog.js +0 -2
- package/dist/extensions/llm-task/api.js +0 -6
- package/dist/extensions/llm-task/index.js +0 -156
- package/dist/extensions/llm-task/openclaw.plugin.json +0 -33
- package/dist/extensions/llm-task/package.json +0 -16
- package/dist/extensions/lobster/index.js +0 -232
- package/dist/extensions/lobster/openclaw.plugin.json +0 -10
- package/dist/extensions/lobster/package.json +0 -17
- package/dist/extensions/lobster/runtime-api.js +0 -4
- package/dist/extensions/matrix/api.js +0 -10
- package/dist/extensions/matrix/helper-api.js +0 -3
- package/dist/extensions/matrix/index.js +0 -44
- package/dist/extensions/matrix/legacy-crypto-inspector.js +0 -41
- package/dist/extensions/matrix/openclaw.plugin.json +0 -11
- package/dist/extensions/matrix/package.json +0 -53
- package/dist/extensions/matrix/plugin-entry.handlers.runtime.js +0 -48
- package/dist/extensions/matrix/runtime-api.js +0 -25
- package/dist/extensions/matrix/setup-entry.js +0 -6
- package/dist/extensions/matrix/test-api.js +0 -3
- package/dist/extensions/matrix/thread-bindings-runtime.js +0 -2
- package/dist/extensions/mattermost/api.js +0 -2
- package/dist/extensions/mattermost/index.js +0 -15
- package/dist/extensions/mattermost/openclaw.plugin.json +0 -11
- package/dist/extensions/mattermost/package.json +0 -41
- package/dist/extensions/mattermost/runtime-api.js +0 -41
- package/dist/extensions/mattermost/setup-entry.js +0 -6
- package/dist/extensions/memory-core/api.js +0 -1
- package/dist/extensions/memory-core/index.js +0 -440
- package/dist/extensions/memory-core/openclaw.plugin.json +0 -9
- package/dist/extensions/memory-core/package.json +0 -23
- package/dist/extensions/memory-core/runtime-api.js +0 -3
- package/dist/extensions/memory-lancedb/api.js +0 -4
- package/dist/extensions/memory-lancedb/config.js +0 -2
- package/dist/extensions/memory-lancedb/index.js +0 -7037
- package/dist/extensions/memory-lancedb/lancedb-runtime.js +0 -2
- package/dist/extensions/memory-lancedb/openclaw.plugin.json +0 -92
- package/dist/extensions/memory-lancedb/package.json +0 -24
- package/dist/extensions/microsoft/index.js +0 -13
- package/dist/extensions/microsoft/openclaw.plugin.json +0 -13
- package/dist/extensions/microsoft/package.json +0 -15
- package/dist/extensions/microsoft/speech-provider.js +0 -2
- package/dist/extensions/microsoft/test-api.js +0 -2
- package/dist/extensions/microsoft/tts.js +0 -2
- package/dist/extensions/microsoft-foundry/auth.js +0 -2
- package/dist/extensions/microsoft-foundry/cli.js +0 -2
- package/dist/extensions/microsoft-foundry/index.js +0 -13
- package/dist/extensions/microsoft-foundry/onboard.js +0 -3
- package/dist/extensions/microsoft-foundry/openclaw.plugin.json +0 -39
- package/dist/extensions/microsoft-foundry/package.json +0 -12
- package/dist/extensions/microsoft-foundry/provider.js +0 -2
- package/dist/extensions/microsoft-foundry/runtime.js +0 -2
- package/dist/extensions/microsoft-foundry/shared-runtime.js +0 -3
- package/dist/extensions/microsoft-foundry/shared.js +0 -2
- package/dist/extensions/minimax/api.js +0 -6
- package/dist/extensions/minimax/image-generation-provider.js +0 -2
- package/dist/extensions/minimax/index.js +0 -219
- package/dist/extensions/minimax/media-understanding-provider.js +0 -2
- package/dist/extensions/minimax/model-definitions.js +0 -2
- package/dist/extensions/minimax/oauth.js +0 -2
- package/dist/extensions/minimax/oauth.runtime.js +0 -2
- package/dist/extensions/minimax/onboard.js +0 -2
- package/dist/extensions/minimax/openclaw.plugin.json +0 -98
- package/dist/extensions/minimax/package.json +0 -12
- package/dist/extensions/minimax/provider-catalog.js +0 -2
- package/dist/extensions/minimax/provider-models.js +0 -2
- package/dist/extensions/mistral/api.js +0 -5
- package/dist/extensions/mistral/index.js +0 -79
- package/dist/extensions/mistral/media-understanding-provider.js +0 -2
- package/dist/extensions/mistral/model-definitions.js +0 -2
- package/dist/extensions/mistral/onboard.js +0 -2
- package/dist/extensions/mistral/openclaw.plugin.json +0 -37
- package/dist/extensions/mistral/package.json +0 -12
- package/dist/extensions/mistral/provider-catalog.js +0 -2
- package/dist/extensions/modelstudio/api.js +0 -4
- package/dist/extensions/modelstudio/index.js +0 -111
- package/dist/extensions/modelstudio/model-definitions.js +0 -2
- package/dist/extensions/modelstudio/models.js +0 -2
- package/dist/extensions/modelstudio/onboard.js +0 -3
- package/dist/extensions/modelstudio/openclaw.plugin.json +0 -75
- package/dist/extensions/modelstudio/package.json +0 -12
- package/dist/extensions/modelstudio/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/api.js +0 -4
- package/dist/extensions/moonshot/index.js +0 -58
- package/dist/extensions/moonshot/media-understanding-provider.js +0 -2
- package/dist/extensions/moonshot/onboard.js +0 -2
- package/dist/extensions/moonshot/openclaw.plugin.json +0 -87
- package/dist/extensions/moonshot/package.json +0 -12
- package/dist/extensions/moonshot/provider-catalog.js +0 -2
- package/dist/extensions/moonshot/test-api.js +0 -2
- package/dist/extensions/moonshot/web-search-provider.js +0 -2
- package/dist/extensions/msteams/api.js +0 -2
- package/dist/extensions/msteams/channel-config-api.js +0 -2
- package/dist/extensions/msteams/index.js +0 -13
- package/dist/extensions/msteams/openclaw.plugin.json +0 -11
- package/dist/extensions/msteams/package.json +0 -48
- package/dist/extensions/msteams/runtime-api.js +0 -47
- package/dist/extensions/msteams/setup-entry.js +0 -6
- package/dist/extensions/msteams/test-api.js +0 -2
- package/dist/extensions/nextcloud-talk/api.js +0 -2
- package/dist/extensions/nextcloud-talk/index.js +0 -12
- package/dist/extensions/nextcloud-talk/openclaw.plugin.json +0 -11
- package/dist/extensions/nextcloud-talk/package.json +0 -45
- package/dist/extensions/nextcloud-talk/runtime-api.js +0 -35
- package/dist/extensions/nextcloud-talk/setup-entry.js +0 -6
- package/dist/extensions/nostr/api.js +0 -15
- package/dist/extensions/nostr/index.js +0 -559
- package/dist/extensions/nostr/openclaw.plugin.json +0 -11
- package/dist/extensions/nostr/package.json +0 -44
- package/dist/extensions/nostr/runtime-api.js +0 -15
- package/dist/extensions/nostr/setup-api.js +0 -2
- package/dist/extensions/nostr/setup-entry.js +0 -6
- package/dist/extensions/nostr/test-api.js +0 -2
- package/dist/extensions/nvidia/api.js +0 -2
- package/dist/extensions/nvidia/index.js +0 -16
- package/dist/extensions/nvidia/openclaw.plugin.json +0 -17
- package/dist/extensions/nvidia/package.json +0 -12
- package/dist/extensions/nvidia/provider-catalog.js +0 -2
- package/dist/extensions/ollama/api.js +0 -3
- package/dist/extensions/ollama/index.js +0 -139
- package/dist/extensions/ollama/openclaw.plugin.json +0 -29
- package/dist/extensions/ollama/package.json +0 -12
- package/dist/extensions/ollama/runtime-api.js +0 -3
- package/dist/extensions/open-prose/index.js +0 -10
- package/dist/extensions/open-prose/openclaw.plugin.json +0 -13
- package/dist/extensions/open-prose/package.json +0 -12
- package/dist/extensions/open-prose/runtime-api.js +0 -3
- package/dist/extensions/open-prose/skills/prose/LICENSE +0 -21
- package/dist/extensions/open-prose/skills/prose/SKILL.md +0 -323
- package/dist/extensions/open-prose/skills/prose/alt-borges.md +0 -141
- package/dist/extensions/open-prose/skills/prose/alts/arabian-nights.md +0 -229
- package/dist/extensions/open-prose/skills/prose/alts/borges.md +0 -360
- package/dist/extensions/open-prose/skills/prose/alts/folk.md +0 -322
- package/dist/extensions/open-prose/skills/prose/alts/homer.md +0 -217
- package/dist/extensions/open-prose/skills/prose/alts/kafka.md +0 -373
- package/dist/extensions/open-prose/skills/prose/alts/shared-appendix.md +0 -35
- package/dist/extensions/open-prose/skills/prose/compiler.md +0 -2971
- package/dist/extensions/open-prose/skills/prose/examples/01-hello-world.prose +0 -4
- package/dist/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +0 -6
- package/dist/extensions/open-prose/skills/prose/examples/03-code-review.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +0 -14
- package/dist/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/07-refactor.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/08-blog-post.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +0 -25
- package/dist/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +0 -27
- package/dist/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +0 -43
- package/dist/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +0 -48
- package/dist/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +0 -23
- package/dist/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +0 -19
- package/dist/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +0 -36
- package/dist/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +0 -71
- package/dist/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +0 -35
- package/dist/extensions/open-prose/skills/prose/examples/22-error-handling.prose +0 -51
- package/dist/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +0 -63
- package/dist/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +0 -86
- package/dist/extensions/open-prose/skills/prose/examples/25-conditionals.prose +0 -114
- package/dist/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +0 -100
- package/dist/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +0 -105
- package/dist/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +0 -37
- package/dist/extensions/open-prose/skills/prose/examples/28-gas-town.prose +0 -1572
- package/dist/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +0 -218
- package/dist/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +0 -42
- package/dist/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +0 -145
- package/dist/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +0 -168
- package/dist/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +0 -204
- package/dist/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +0 -296
- package/dist/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +0 -237
- package/dist/extensions/open-prose/skills/prose/examples/37-the-forge.prose +0 -1474
- package/dist/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +0 -455
- package/dist/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +0 -277
- package/dist/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +0 -32
- package/dist/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +0 -38
- package/dist/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +0 -46
- package/dist/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +0 -50
- package/dist/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +0 -261
- package/dist/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +0 -159
- package/dist/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +0 -637
- package/dist/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +0 -148
- package/dist/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +0 -225
- package/dist/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +0 -356
- package/dist/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +0 -445
- package/dist/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +0 -210
- package/dist/extensions/open-prose/skills/prose/examples/README.md +0 -391
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/README.md +0 -22
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +0 -20
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +0 -18
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +0 -17
- package/dist/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +0 -223
- package/dist/extensions/open-prose/skills/prose/guidance/antipatterns.md +0 -951
- package/dist/extensions/open-prose/skills/prose/guidance/patterns.md +0 -700
- package/dist/extensions/open-prose/skills/prose/guidance/system-prompt.md +0 -180
- package/dist/extensions/open-prose/skills/prose/help.md +0 -144
- package/dist/extensions/open-prose/skills/prose/lib/README.md +0 -108
- package/dist/extensions/open-prose/skills/prose/lib/calibrator.prose +0 -215
- package/dist/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +0 -174
- package/dist/extensions/open-prose/skills/prose/lib/error-forensics.prose +0 -250
- package/dist/extensions/open-prose/skills/prose/lib/inspector.prose +0 -196
- package/dist/extensions/open-prose/skills/prose/lib/profiler.prose +0 -460
- package/dist/extensions/open-prose/skills/prose/lib/program-improver.prose +0 -275
- package/dist/extensions/open-prose/skills/prose/lib/project-memory.prose +0 -118
- package/dist/extensions/open-prose/skills/prose/lib/user-memory.prose +0 -93
- package/dist/extensions/open-prose/skills/prose/lib/vm-improver.prose +0 -243
- package/dist/extensions/open-prose/skills/prose/primitives/session.md +0 -593
- package/dist/extensions/open-prose/skills/prose/prose.md +0 -1237
- package/dist/extensions/open-prose/skills/prose/state/filesystem.md +0 -498
- package/dist/extensions/open-prose/skills/prose/state/in-context.md +0 -384
- package/dist/extensions/open-prose/skills/prose/state/postgres.md +0 -880
- package/dist/extensions/open-prose/skills/prose/state/sqlite.md +0 -531
- package/dist/extensions/openai/api.js +0 -4
- package/dist/extensions/openai/cli-backend.js +0 -2
- package/dist/extensions/openai/default-models.js +0 -2
- package/dist/extensions/openai/image-generation-provider.js +0 -2
- package/dist/extensions/openai/index.js +0 -24
- package/dist/extensions/openai/media-understanding-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-auth-identity.js +0 -2
- package/dist/extensions/openai/openai-codex-catalog.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.js +0 -2
- package/dist/extensions/openai/openai-codex-provider.runtime.js +0 -14
- package/dist/extensions/openai/openai-provider.js +0 -2
- package/dist/extensions/openai/openclaw.plugin.json +0 -61
- package/dist/extensions/openai/package.json +0 -12
- package/dist/extensions/openai/shared.js +0 -4
- package/dist/extensions/openai/speech-provider.js +0 -2
- package/dist/extensions/openai/test-api.js +0 -5
- package/dist/extensions/openai/tts.js +0 -2
- package/dist/extensions/opencode/api.js +0 -3
- package/dist/extensions/opencode/index.js +0 -63
- package/dist/extensions/opencode/onboard.js +0 -2
- package/dist/extensions/opencode/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode/package.json +0 -12
- package/dist/extensions/opencode-go/api.js +0 -3
- package/dist/extensions/opencode-go/index.js +0 -54
- package/dist/extensions/opencode-go/onboard.js +0 -2
- package/dist/extensions/opencode-go/openclaw.plugin.json +0 -33
- package/dist/extensions/opencode-go/package.json +0 -12
- package/dist/extensions/openrouter/api.js +0 -3
- package/dist/extensions/openrouter/index.js +0 -121
- package/dist/extensions/openrouter/media-understanding-provider.js +0 -2
- package/dist/extensions/openrouter/onboard.js +0 -2
- package/dist/extensions/openrouter/openclaw.plugin.json +0 -37
- package/dist/extensions/openrouter/package.json +0 -12
- package/dist/extensions/openrouter/provider-catalog.js +0 -2
- package/dist/extensions/openshell/index.js +0 -919
- package/dist/extensions/openshell/openclaw.plugin.json +0 -118
- package/dist/extensions/openshell/package.json +0 -12
- package/dist/extensions/perplexity/index.js +0 -13
- package/dist/extensions/perplexity/openclaw.plugin.json +0 -54
- package/dist/extensions/perplexity/package.json +0 -12
- package/dist/extensions/perplexity/test-api.js +0 -2
- package/dist/extensions/perplexity/web-search-provider.js +0 -2
- package/dist/extensions/phone-control/index.js +0 -283
- package/dist/extensions/phone-control/openclaw.plugin.json +0 -11
- package/dist/extensions/phone-control/runtime-api.js +0 -3
- package/dist/extensions/qianfan/api.js +0 -3
- package/dist/extensions/qianfan/index.js +0 -26
- package/dist/extensions/qianfan/onboard.js +0 -2
- package/dist/extensions/qianfan/openclaw.plugin.json +0 -32
- package/dist/extensions/qianfan/package.json +0 -12
- package/dist/extensions/qianfan/provider-catalog.js +0 -2
- package/dist/extensions/qqbot/api.js +0 -173
- package/dist/extensions/qqbot/index.js +0 -445
- package/dist/extensions/qqbot/openclaw.plugin.json +0 -257
- package/dist/extensions/qqbot/package.json +0 -52
- package/dist/extensions/qqbot/runtime-api.js +0 -2
- package/dist/extensions/qqbot/setup-entry.js +0 -6
- package/dist/extensions/qqbot/skills/qqbot-channel/SKILL.md +0 -262
- package/dist/extensions/qqbot/skills/qqbot-channel/references/api_references.md +0 -521
- package/dist/extensions/qqbot/skills/qqbot-media/SKILL.md +0 -36
- package/dist/extensions/qqbot/skills/qqbot-remind/SKILL.md +0 -149
- package/dist/extensions/searxng/index.js +0 -13
- package/dist/extensions/searxng/openclaw.plugin.json +0 -46
- package/dist/extensions/searxng/package.json +0 -12
- package/dist/extensions/searxng/web-search-provider.js +0 -2
- package/dist/extensions/sglang/api.js +0 -4
- package/dist/extensions/sglang/defaults.js +0 -2
- package/dist/extensions/sglang/index.js +0 -77
- package/dist/extensions/sglang/models.js +0 -2
- package/dist/extensions/sglang/openclaw.plugin.json +0 -29
- package/dist/extensions/sglang/package.json +0 -12
- package/dist/extensions/signal/api.js +0 -7
- package/dist/extensions/signal/channel-config-api.js +0 -2
- package/dist/extensions/signal/index.js +0 -319
- package/dist/extensions/signal/openclaw.plugin.json +0 -11
- package/dist/extensions/signal/package.json +0 -24
- package/dist/extensions/signal/reaction-runtime-api.js +0 -2
- package/dist/extensions/signal/runtime-api.js +0 -24
- package/dist/extensions/signal/setup-entry.js +0 -13
- package/dist/extensions/signal/test-api.js +0 -111
- package/dist/extensions/slack/api.js +0 -10
- package/dist/extensions/slack/channel-config-api.js +0 -2
- package/dist/extensions/slack/index.js +0 -12
- package/dist/extensions/slack/openclaw.plugin.json +0 -11
- package/dist/extensions/slack/package.json +0 -31
- package/dist/extensions/slack/runtime-api.js +0 -110
- package/dist/extensions/slack/setup-entry.js +0 -12
- package/dist/extensions/slack/test-api.js +0 -47
- package/dist/extensions/stepfun/index.js +0 -163
- package/dist/extensions/stepfun/onboard.js +0 -3
- package/dist/extensions/stepfun/openclaw.plugin.json +0 -83
- package/dist/extensions/stepfun/package.json +0 -12
- package/dist/extensions/stepfun/provider-catalog.js +0 -2
- package/dist/extensions/synology-chat/index.js +0 -12
- package/dist/extensions/synology-chat/openclaw.plugin.json +0 -11
- package/dist/extensions/synology-chat/package.json +0 -26
- package/dist/extensions/synology-chat/setup-api.js +0 -2
- package/dist/extensions/synology-chat/setup-entry.js +0 -6
- package/dist/extensions/synthetic/api.js +0 -4
- package/dist/extensions/synthetic/index.js +0 -27
- package/dist/extensions/synthetic/models.js +0 -2
- package/dist/extensions/synthetic/onboard.js +0 -3
- package/dist/extensions/synthetic/openclaw.plugin.json +0 -32
- package/dist/extensions/synthetic/package.json +0 -12
- package/dist/extensions/synthetic/provider-catalog.js +0 -2
- package/dist/extensions/talk-voice/api.js +0 -3
- package/dist/extensions/talk-voice/index.js +0 -160
- package/dist/extensions/talk-voice/openclaw.plugin.json +0 -11
- package/dist/extensions/tavily/index.js +0 -128
- package/dist/extensions/tavily/openclaw.plugin.json +0 -53
- package/dist/extensions/tavily/package.json +0 -12
- package/dist/extensions/tavily/skills/tavily/SKILL.md +0 -94
- package/dist/extensions/tavily/web-search-provider.js +0 -2
- package/dist/extensions/telegram/allow-from.js +0 -2
- package/dist/extensions/telegram/api.js +0 -14
- package/dist/extensions/telegram/channel-config-api.js +0 -2
- package/dist/extensions/telegram/index.js +0 -12
- package/dist/extensions/telegram/openclaw.plugin.json +0 -11
- package/dist/extensions/telegram/package.json +0 -37
- package/dist/extensions/telegram/runtime-api.js +0 -25
- package/dist/extensions/telegram/session-key-api.js +0 -2
- package/dist/extensions/telegram/setup-entry.js +0 -13
- package/dist/extensions/telegram/test-api.js +0 -88
- package/dist/extensions/telegram/test-support.js +0 -46
- package/dist/extensions/telegram/update-offset-runtime-api.js +0 -2
- package/dist/extensions/thread-ownership/api.js +0 -5
- package/dist/extensions/thread-ownership/index.js +0 -82
- package/dist/extensions/thread-ownership/openclaw.plugin.json +0 -30
- package/dist/extensions/tlon/api.js +0 -14
- package/dist/extensions/tlon/index.js +0 -150
- package/dist/extensions/tlon/openclaw.plugin.json +0 -12
- package/dist/extensions/tlon/package.json +0 -44
- package/dist/extensions/tlon/runtime-api.js +0 -14
- package/dist/extensions/tlon/setup-api.js +0 -3
- package/dist/extensions/tlon/setup-entry.js +0 -6
- package/dist/extensions/tlon/test-api.js +0 -2
- package/dist/extensions/together/api.js +0 -3
- package/dist/extensions/together/index.js +0 -26
- package/dist/extensions/together/models.js +0 -2
- package/dist/extensions/together/onboard.js +0 -2
- package/dist/extensions/together/openclaw.plugin.json +0 -32
- package/dist/extensions/together/package.json +0 -12
- package/dist/extensions/together/provider-catalog.js +0 -2
- package/dist/extensions/twitch/api.js +0 -9
- package/dist/extensions/twitch/index.js +0 -1090
- package/dist/extensions/twitch/openclaw.plugin.json +0 -11
- package/dist/extensions/twitch/package.json +0 -29
- package/dist/extensions/twitch/runtime-api.js +0 -9
- package/dist/extensions/venice/api.js +0 -3
- package/dist/extensions/venice/index.js +0 -55
- package/dist/extensions/venice/models.js +0 -2
- package/dist/extensions/venice/onboard.js +0 -3
- package/dist/extensions/venice/openclaw.plugin.json +0 -32
- package/dist/extensions/venice/package.json +0 -12
- package/dist/extensions/venice/provider-catalog.js +0 -2
- package/dist/extensions/vercel-ai-gateway/api.js +0 -4
- package/dist/extensions/vercel-ai-gateway/index.js +0 -30
- package/dist/extensions/vercel-ai-gateway/models.js +0 -2
- package/dist/extensions/vercel-ai-gateway/onboard.js +0 -2
- package/dist/extensions/vercel-ai-gateway/openclaw.plugin.json +0 -32
- package/dist/extensions/vercel-ai-gateway/package.json +0 -12
- package/dist/extensions/vercel-ai-gateway/provider-catalog.js +0 -2
- package/dist/extensions/vllm/api.js +0 -4
- package/dist/extensions/vllm/defaults.js +0 -2
- package/dist/extensions/vllm/index.js +0 -78
- package/dist/extensions/vllm/models.js +0 -2
- package/dist/extensions/vllm/openclaw.plugin.json +0 -29
- package/dist/extensions/vllm/package.json +0 -12
- package/dist/extensions/voice-call/api.js +0 -7
- package/dist/extensions/voice-call/index.js +0 -698
- package/dist/extensions/voice-call/openclaw.plugin.json +0 -700
- package/dist/extensions/voice-call/package.json +0 -33
- package/dist/extensions/voice-call/runtime-api.js +0 -7
- package/dist/extensions/voice-call/runtime-entry.js +0 -2
- package/dist/extensions/volcengine/api.js +0 -3
- package/dist/extensions/volcengine/index.js +0 -63
- package/dist/extensions/volcengine/models.js +0 -2
- package/dist/extensions/volcengine/openclaw.plugin.json +0 -33
- package/dist/extensions/volcengine/package.json +0 -12
- package/dist/extensions/volcengine/provider-catalog.js +0 -2
- package/dist/extensions/whatsapp/action-runtime-api.js +0 -2
- package/dist/extensions/whatsapp/action-runtime.runtime.js +0 -2
- package/dist/extensions/whatsapp/api.js +0 -8
- package/dist/extensions/whatsapp/auth-presence.js +0 -2
- package/dist/extensions/whatsapp/channel-config-api.js +0 -2
- package/dist/extensions/whatsapp/constants.js +0 -2
- package/dist/extensions/whatsapp/index.js +0 -12
- package/dist/extensions/whatsapp/light-runtime-api.js +0 -5
- package/dist/extensions/whatsapp/login-qr-api.js +0 -2
- package/dist/extensions/whatsapp/openclaw.plugin.json +0 -11
- package/dist/extensions/whatsapp/package.json +0 -45
- package/dist/extensions/whatsapp/runtime-api.js +0 -334
- package/dist/extensions/whatsapp/setup-entry.js +0 -23
- package/dist/extensions/whatsapp/test-api.js +0 -76
- package/dist/extensions/xai/api.js +0 -6
- package/dist/extensions/xai/code-execution.js +0 -2
- package/dist/extensions/xai/index.js +0 -122
- package/dist/extensions/xai/model-definitions.js +0 -2
- package/dist/extensions/xai/model-id.js +0 -2
- package/dist/extensions/xai/onboard.js +0 -2
- package/dist/extensions/xai/openclaw.plugin.json +0 -157
- package/dist/extensions/xai/package.json +0 -12
- package/dist/extensions/xai/provider-catalog.js +0 -2
- package/dist/extensions/xai/provider-models.js +0 -2
- package/dist/extensions/xai/stream.js +0 -2
- package/dist/extensions/xai/web-search.js +0 -2
- package/dist/extensions/xai/x-search.js +0 -2
- package/dist/extensions/xiaomi/api.js +0 -3
- package/dist/extensions/xiaomi/index.js +0 -37
- package/dist/extensions/xiaomi/onboard.js +0 -2
- package/dist/extensions/xiaomi/openclaw.plugin.json +0 -32
- package/dist/extensions/xiaomi/package.json +0 -12
- package/dist/extensions/xiaomi/provider-catalog.js +0 -2
- package/dist/extensions/zai/api.js +0 -3
- package/dist/extensions/zai/detect.js +0 -2
- package/dist/extensions/zai/index.js +0 -239
- package/dist/extensions/zai/media-understanding-provider.js +0 -2
- package/dist/extensions/zai/model-definitions.js +0 -2
- package/dist/extensions/zai/onboard.js +0 -2
- package/dist/extensions/zai/openclaw.plugin.json +0 -94
- package/dist/extensions/zai/package.json +0 -12
- package/dist/extensions/zai/runtime-api.js +0 -3
- package/dist/extensions/zalo/api.js +0 -3
- package/dist/extensions/zalo/index.js +0 -13
- package/dist/extensions/zalo/openclaw.plugin.json +0 -11
- package/dist/extensions/zalo/package.json +0 -47
- package/dist/extensions/zalo/runtime-api.js +0 -38
- package/dist/extensions/zalo/setup-entry.js +0 -6
- package/dist/extensions/zalo/test-api.js +0 -2
- package/dist/extensions/zalouser/api.js +0 -2
- package/dist/extensions/zalouser/index.js +0 -599
- package/dist/extensions/zalouser/openclaw.plugin.json +0 -11
- package/dist/extensions/zalouser/package.json +0 -48
- package/dist/extensions/zalouser/runtime-api.js +0 -30
- package/dist/extensions/zalouser/setup-entry.js +0 -13
- package/dist/extensions/zalouser/test-api.js +0 -5
- package/dist/external-content-DtoRY-d1.js +0 -242
- package/dist/facade-runtime-Bpi4Gy-u.js +0 -263
- package/dist/failover-error-BrdBIFg2.js +0 -180
- package/dist/feishu-81Iv8tqF.js +0 -18
- package/dist/feishu-conversation-NmEqAxSA.js +0 -17
- package/dist/feishu-setup-DXAK6GqE.js +0 -12
- package/dist/fetch-7dbKQPT5.js +0 -256
- package/dist/fetch-BjiGl865.js +0 -418
- package/dist/fetch-Bp23aO5S.js +0 -65
- package/dist/fetch-guard-BnhVFBtf.js +0 -150
- package/dist/fetch-mock-WghRRNpK.js +0 -6
- package/dist/fetch-runtime-DfFmkkZH.js +0 -4
- package/dist/fetch-timeout-BKMGkHu9.js +0 -58
- package/dist/file-identity-DPm-6kp0.js +0 -567
- package/dist/file-lock-CH0V9dhL.js +0 -141
- package/dist/file-lock-D292sbfa.js +0 -2
- package/dist/firecrawl-client-GOGPuEeg.js +0 -338
- package/dist/firecrawl-search-provider-ptp7GNAt.js +0 -47
- package/dist/format-BwzSM9vY.js +0 -24
- package/dist/format-D38w0aKT.js +0 -817
- package/dist/format-DCFsK8oa.js +0 -19
- package/dist/format-datetime-Bl6-b7G1.js +0 -73
- package/dist/format-duration-DqcpDYkZ.js +0 -57
- package/dist/format-relative-CYrRyrT7.js +0 -54
- package/dist/frontmatter-Ba2Hn11b.js +0 -45
- package/dist/frontmatter-Cjxy4vX8.js +0 -210
- package/dist/fs-safe-BQ59ttjX.js +0 -999
- package/dist/gateway-CWPyH-P7.js +0 -2575
- package/dist/gateway-cli-BmPBPCcJ.js +0 -1572
- package/dist/gateway-discovery-targets--oNzWOVw.js +0 -430
- package/dist/gateway-install-token-tyQyR2ED.js +0 -230
- package/dist/gateway-lock-BbUQuUet.js +0 -292
- package/dist/gateway-presence-BVCIm1hy.js +0 -15
- package/dist/gateway-registry-tQcIThkV.js +0 -74
- package/dist/gateway-rpc-BXdoSPN7.js +0 -26
- package/dist/gateway-runtime-C7EhkU_c.js +0 -12
- package/dist/gaxios-fetch-compat-D4gl5582.js +0 -180
- package/dist/gemini-auth-Dlpcd9MB.js +0 -29
- package/dist/gemini-web-search-provider-CkNEl2du.js +0 -162
- package/dist/get-reply-from-config.runtime-vBmBttxw.js +0 -2
- package/dist/get-reply-from-config.runtime.js +0 -1
- package/dist/git-commit-BS28SZVT.js +0 -2
- package/dist/git-commit-ChiOoWyK.js +0 -177
- package/dist/github-copilot-login-B8s4OVQ4.js +0 -11
- package/dist/github-copilot-token-BwXtH-ZJ.js +0 -2
- package/dist/github-copilot-token-D81Wvm8b.js +0 -2
- package/dist/github-copilot-token-beHjQGOp.js +0 -91
- package/dist/global-singleton-54zT3rCn.js +0 -13
- package/dist/global-singleton-iOq2_-p8.js +0 -1
- package/dist/global-state-DUuMGgts.js +0 -17
- package/dist/globals-CDtV0ht8.js +0 -25
- package/dist/gmail-setup-utils-CxXfU7cy.js +0 -421
- package/dist/google-Cx1_z3Q3.js +0 -24
- package/dist/googlechat-CoiMNDC2.js +0 -37
- package/dist/graph-users-BmZWavVH.js +0 -917
- package/dist/group-access-BZZ3FNmb.js +0 -32
- package/dist/group-access-BjveEAjz.js +0 -113
- package/dist/group-access-owHLoCWX.js +0 -119
- package/dist/group-activation-ClEb7qwj.js +0 -22
- package/dist/group-id-CcsUNOct.js +0 -11
- package/dist/group-policy-Bb8dxOpM.js +0 -25
- package/dist/group-policy-G9GcSyph.js +0 -201
- package/dist/group-policy-wS9F8Y_i.js +0 -51
- package/dist/group-policy-warnings-CL2gHsXM.js +0 -196
- package/dist/groups.runtime-K758xQFV.js +0 -6
- package/dist/groups.runtime.js +0 -1
- package/dist/handle-action-CE4vpa7G.js +0 -500
- package/dist/health-D_KQbqQY.js +0 -577
- package/dist/health-a1VPtSyV.js +0 -2
- package/dist/health-format-COR93f8W.js +0 -26
- package/dist/heartbeat-C_TrErgd.js +0 -122
- package/dist/heartbeat-reply-payload-C7Ac3fOZ.js +0 -13
- package/dist/heartbeat-summary-v5gPj5bd.js +0 -57
- package/dist/heartbeat-visibility-CHMO4pmJ.js +0 -102
- package/dist/help-CyR1Oo4X.js +0 -81
- package/dist/help-format-l1phKNA8.js +0 -15
- package/dist/helpers-COHnQbWX.js +0 -32
- package/dist/helpers-DNpD7VMo.js +0 -24
- package/dist/history-B4mW8GfY.js +0 -102
- package/dist/home-dir-n9onX5PG.js +0 -83
- package/dist/hook-runner-global-C9GhdBtf.js +0 -632
- package/dist/hook-runner-global-Cr_Pthp4.js +0 -2
- package/dist/hook-runtime-DK8QF-2x.js +0 -3
- package/dist/hooks-cli-XCo-7nz9.js +0 -353
- package/dist/hooks-policy-BmULXBcp.js +0 -20
- package/dist/hooks-status-D_ZxRD0H.js +0 -86
- package/dist/host-env-security-SlXI58bc.js +0 -290
- package/dist/host-runtime-BGHb06HN.js +0 -1
- package/dist/hostname-BRYLr_mh.js +0 -8
- package/dist/http-body-CfdQSEp0.js +0 -238
- package/dist/http-client-_3i4-nw5.js +0 -294
- package/dist/http-registry-ZGSBfYSe.js +0 -54
- package/dist/http-route-overlap-C8lbolN5.js +0 -101
- package/dist/identity-BoQQh6Y8.js +0 -26
- package/dist/identity-D64Wfv_s.js +0 -29
- package/dist/identity-DvwF6Yix.js +0 -84
- package/dist/identity-avatar-DPBgVwpU.js +0 -86
- package/dist/identity-file-BtIJI4dn.js +0 -60
- package/dist/image-C4V19x9x.js +0 -152
- package/dist/image-generation-BbOnazXi.js +0 -1
- package/dist/image-generation-provider-CQK8HA0O.js +0 -136
- package/dist/image-generation-provider-CWUvRxmv.js +0 -131
- package/dist/image-generation-provider-F2sfNjcr.js +0 -281
- package/dist/image-ops-BJKjhMAu.js +0 -476
- package/dist/image-runtime-DodXcK2e.js +0 -7
- package/dist/imessage-2ukkzufG.js +0 -19
- package/dist/inbound-context-Cxvd3JHZ.js +0 -59
- package/dist/inbound-context-Czd3FdNb.js +0 -52
- package/dist/inbound-debounce-CI7l3R36.js +0 -159
- package/dist/inbound-envelope-LyHTUTue.js +0 -61
- package/dist/inbound-reply-dispatch-BdeY6N-k.js +0 -73
- package/dist/inbound-text-CacimZtw.js +0 -14
- package/dist/inbound.runtime-CqX3n132.js +0 -3
- package/dist/inbound.runtime.js +0 -1
- package/dist/includes-Ccr-Q5DB.js +0 -188
- package/dist/includes-scan-DVvYLj4S.js +0 -55
- package/dist/index.js +0 -56
- package/dist/infra/warning-filter.js +0 -2
- package/dist/infra-runtime-Cl0iZpRS.js +0 -22
- package/dist/input-files-PZC6ZR4W.js +0 -251
- package/dist/input-provenance-8GBFuk0Q.js +0 -44
- package/dist/inspect-B8dw6NVJ.js +0 -286
- package/dist/install-Bk7XyvtC.js +0 -590
- package/dist/install-package-dir-C2ba2toB.js +0 -284
- package/dist/install-safe-path-CkCd0rWS.js +0 -69
- package/dist/install-security-scan-C02VaEU9.js +0 -22
- package/dist/install-security-scan.runtime-CDUuS6Dl.js +0 -299
- package/dist/install-security-scan.runtime.js +0 -1
- package/dist/install-source-utils-2tdWQmwI.js +0 -167
- package/dist/install-target-CBNysuiP.js +0 -175
- package/dist/install.runtime-D_zKCpnB.js +0 -11
- package/dist/install.runtime-DjQozvMe.js +0 -27
- package/dist/install.runtime.js +0 -1
- package/dist/installs-BnAbQ70v.js +0 -28
- package/dist/interactive-CEnsu1RT.js +0 -8
- package/dist/interactive-runtime-Bxq5ztle.js +0 -1
- package/dist/internal-Lk0wFTNq.js +0 -411
- package/dist/internal-hooks-C3ziA7w_.js +0 -155
- package/dist/io-BUxKr33U.js +0 -2236
- package/dist/io-BuMkfjp3.js +0 -4
- package/dist/ip-BZP18dDl.js +0 -208
- package/dist/ipv4-Xiyu1rvD.js +0 -82
- package/dist/irc-DXfYh-Sd.js +0 -14
- package/dist/irc-surface-Di-joPuc.js +0 -15
- package/dist/is-main-Bv5ej4lF.js +0 -27
- package/dist/issue-format-8Eylt-2O.js +0 -2
- package/dist/issue-format-DLZczJ0U.js +0 -31
- package/dist/json-file-5xJqyXrK.js +0 -23
- package/dist/json-files-C4lsZ_HR.js +0 -72
- package/dist/json-mode-4O1xL2fT.js +0 -34
- package/dist/json-pointer-C30cknnZ.js +0 -43
- package/dist/json-store-FUgu1pyj.js +0 -37
- package/dist/keyed-async-queue-BTOTBE8n.js +0 -32
- package/dist/kill-tree-CIfAbzdN.js +0 -2
- package/dist/kill-tree-CUPpLbeq.js +0 -82
- package/dist/kimi-web-search-provider-Cb3F9_Da.js +0 -224
- package/dist/known-users-DjerpGCB.js +0 -167
- package/dist/lancedb-runtime-DTb_mDUG.js +0 -201
- package/dist/launchd-cp98MUhz.js +0 -517
- package/dist/lazy-runtime-C6LCAM-L.js +0 -29
- package/dist/lazy-runtime-yh_WT4on.js +0 -1
- package/dist/lazy-service-module-CeifO9oo.js +0 -24
- package/dist/legacy-crypto-restore-CsHmLVjY.js +0 -85
- package/dist/legacy-names-CFo8Oe-2.js +0 -9
- package/dist/legacy-web-search-Bn8F2jrN.js +0 -140
- package/dist/legacy.shared-oZM32end.js +0 -45
- package/dist/level-overrides-gqc8xfh2.js +0 -36
- package/dist/library-ChjjeniJ.js +0 -44
- package/dist/lifecycle-core-Ce_ZEvjl.js +0 -402
- package/dist/line-Be0jY3CU.js +0 -4
- package/dist/line-runtime-B0ZGTK81.js +0 -60
- package/dist/line-surface-BTopinac.js +0 -27
- package/dist/links-D7o22Ygt.js +0 -17
- package/dist/listeners-_47QWN8-.js +0 -14
- package/dist/llm-slug-generator-Dv-sLOW9.js +0 -68
- package/dist/llm-slug-generator.js +0 -2
- package/dist/llm-task-BDA3i86A.js +0 -3
- package/dist/load-BXSzQ8YA.js +0 -28
- package/dist/load-options-BqszWkkN.js +0 -36
- package/dist/loader-DsZDoLQ6.js +0 -2519
- package/dist/local-file-access-PajXzDdK.js +0 -49
- package/dist/local-roots-DrpNBv4b.js +0 -46
- package/dist/location-CtMHXE-d.js +0 -42
- package/dist/logger-Bc2lC3X3.js +0 -79
- package/dist/logger-CIV9WBoa.js +0 -11
- package/dist/logger-DdGvppaE.js +0 -75
- package/dist/logger-MWEZrHUL.js +0 -582
- package/dist/logging-B1QD0DRq.js +0 -2
- package/dist/logging-CAfgK7sj.js +0 -3
- package/dist/logging-ColPHIDT.js +0 -16
- package/dist/logging-D4xyCEzZ.js +0 -85
- package/dist/logging-Dt_aiHur.js +0 -13
- package/dist/logging-Dywye6yZ.js +0 -2
- package/dist/logging-core-hw7Df6Hl.js +0 -3
- package/dist/login-BrqdQcNh.js +0 -108
- package/dist/login-DSqrZNW-.js +0 -2333
- package/dist/login-qr-Dm3iC25_.js +0 -212
- package/dist/login-qr-api-BxRDJKkp.js +0 -16
- package/dist/logs-cli-CxjV80As.js +0 -221
- package/dist/magic-string.es-CVHNyqW1.js +0 -1011
- package/dist/main-session-BbO0A-No.js +0 -38
- package/dist/manager-c_fEco8X.js +0 -2773
- package/dist/manager-runtime-Vy_F8ORR.js +0 -2
- package/dist/manager.runtime-Bm1Knq-3.js +0 -670
- package/dist/manager.runtime.js +0 -1
- package/dist/manifest-f_gihArl.js +0 -237
- package/dist/manifest-registry-Kx5Z2lJL.js +0 -1069
- package/dist/map-size-BBQq2RPq.js +0 -15
- package/dist/markdown-table-runtime-Dx12DQTq.js +0 -2
- package/dist/markdown-tables-CSlyhQVP.js +0 -31
- package/dist/mask-api-key-BYVFDQdo.js +0 -10
- package/dist/matrix-NDa-FoaE.js +0 -351
- package/dist/matrix-config-helpers-D0D-oL7I.js +0 -153
- package/dist/matrix-helper-DioFIiaO.js +0 -20
- package/dist/matrix-migration-snapshot-DAOFFSgM.js +0 -714
- package/dist/matrix-ouiFsVI1.js +0 -39
- package/dist/matrix-runtime-heavy-KUEg_MfD.js +0 -4
- package/dist/matrix-runtime-shared-B6aE5Uu6.js +0 -1
- package/dist/matrix-runtime-surface-R78Hde6Q.js +0 -12
- package/dist/matrix-surface-B-nU-e0B.js +0 -13
- package/dist/matrix-thread-bindings-B77Krs8r.js +0 -12
- package/dist/mattermost-Cg2PI71s.js +0 -18
- package/dist/mcp/plugin-tools-serve.js +0 -105
- package/dist/mcp-cli-BMNT4RIm.js +0 -768
- package/dist/mcp-config-3y1z3N2x.js +0 -118
- package/dist/media-CUdiVhEt.js +0 -1691
- package/dist/media-limits-DmcT5KnO.js +0 -14
- package/dist/media-runtime-8QR_uTs0.js +0 -295
- package/dist/media-understanding-CpMkSmKj.js +0 -51
- package/dist/media-understanding-provider-C0xVBaas.js +0 -11
- package/dist/media-understanding-provider-C8RSrdEy.js +0 -16
- package/dist/media-understanding-provider-CCB6_bwc2.js +0 -9
- package/dist/media-understanding-provider-CZ83ep6L.js +0 -16
- package/dist/media-understanding-provider-Cmcg82YY.js +0 -28
- package/dist/media-understanding-provider-D1_z5Kwx.js +0 -11
- package/dist/media-understanding-provider-DC9bhcFj.js +0 -11
- package/dist/media-understanding-provider-DbMV-bHu.js +0 -17
- package/dist/media-understanding-provider-Drg3Vyoe.js +0 -86
- package/dist/media-understanding-runtime-JIhXSD7e.js +0 -15
- package/dist/media-understanding.runtime-2Muvvak4.js +0 -7
- package/dist/media-understanding.runtime.js +0 -1
- package/dist/memory-DPYsR3Cn.js +0 -228
- package/dist/memory-core-engine-runtime-DP_nzKMm.js +0 -14
- package/dist/memory-core-host-engine-embeddings-BhsmnP-6.js +0 -1370
- package/dist/memory-core-host-engine-foundation-CtFD8jpc.js +0 -10
- package/dist/memory-core-host-engine-qmd-DCvmid82.js +0 -375
- package/dist/memory-core-host-engine-storage-N3YflxjF.js +0 -109
- package/dist/memory-core-host-multimodal-BVd6eEE3.js +0 -1
- package/dist/memory-core-host-query-Bxzu0mAD.js +0 -2
- package/dist/memory-core-host-runtime-cli-nz5fxbbn.js +0 -10
- package/dist/memory-core-host-runtime-core-BcGQFQUw.js +0 -8
- package/dist/memory-core-host-runtime-files-DO5A0pY5.js +0 -3
- package/dist/memory-core-host-secret-CQAiTACg.js +0 -1
- package/dist/memory-core-host-status-0g2XexDn.js +0 -44
- package/dist/memory-embedding-providers-BOMS0u3X.js +0 -34
- package/dist/memory-lancedb-kZBcB07O.js +0 -2
- package/dist/memory-runtime-BIGGpmaC.js +0 -2
- package/dist/memory-runtime-XyiDon5w.js +0 -34
- package/dist/memory-search-CQFSugEg.js +0 -2
- package/dist/memory-search-DpAYXyjc.js +0 -202
- package/dist/memory-state-DDJh6L4-.js +0 -41
- package/dist/mention-gating-_kzByrvM.js +0 -25
- package/dist/mentions-BCBF5Klg.js +0 -65
- package/dist/mentions-BKYgZd-C.js +0 -155
- package/dist/merge-patch-CtvE2OP0.js +0 -65
- package/dist/message-Dna6Vsdg.js +0 -205
- package/dist/message-action-discovery-CPTCAl8K.js +0 -133
- package/dist/message-action-runner-Byldnjex.js +0 -1703
- package/dist/message-channel-bEWdw4ul.js +0 -105
- package/dist/message-handler-C9TRy9hy.js +0 -1771
- package/dist/message-hook-mappers-CzwFvq_c.js +0 -255
- package/dist/messages-CQT2FDZ3.js +0 -270
- package/dist/method-scopes-B6e_KuRU.js +0 -2663
- package/dist/migrate-cli-C_iDle77.js +0 -500
- package/dist/migration-snapshot.runtime-DAzTUgU-.js +0 -3
- package/dist/migration-snapshot.runtime.js +0 -1
- package/dist/mime-DkaKoCVP.js +0 -156
- package/dist/min-host-version-CIhgRq0c.js +0 -349
- package/dist/minimax-vlm-Dh6g-MLh.js +0 -512
- package/dist/model-auth-DcCyGs_6.js +0 -377
- package/dist/model-auth-env-OT6ucjoP.js +0 -63
- package/dist/model-auth-label-fGtOs2u-.js +0 -45
- package/dist/model-auth-markers-D2z_AIuC.js +0 -70
- package/dist/model-auth-runtime-shared-DnhseQ_3.js +0 -18
- package/dist/model-buttons-zQ-cRhqo.js +0 -187
- package/dist/model-catalog-f9zO4b6C.js +0 -208
- package/dist/model-catalog.runtime-iRu_OMJS.js +0 -2
- package/dist/model-catalog.runtime.js +0 -1
- package/dist/model-definitions-BGWurJeM.js +0 -49
- package/dist/model-definitions-C-e07VgA.js +0 -255
- package/dist/model-definitions-DUANiLUG.js +0 -126
- package/dist/model-definitions-DrxdjAkB.js +0 -202
- package/dist/model-id-9W_sHLHy.js +0 -12
- package/dist/model-id-DEv7HEyl.js +0 -20
- package/dist/model-input-DwbpFRYm.js +0 -20
- package/dist/model-overrides-BaecXmMv.js +0 -84
- package/dist/model-overrides-UUODi1G1.js +0 -91
- package/dist/model-param-b-BHlbSl5R.js +0 -15
- package/dist/model-picker-BgVMnja3.js +0 -439
- package/dist/model-picker-D8elZqN_.js +0 -3
- package/dist/model-picker.runtime-BUfgRpvT.js +0 -15
- package/dist/model-picker.runtime.js +0 -1
- package/dist/model-runtime-CkjgxQmB.js +0 -1772
- package/dist/model-selection-DXY5nwui.js +0 -407
- package/dist/model-selection-Dx6Ag-ZE.js +0 -505
- package/dist/model-suppression-C8XSEnsv.js +0 -24
- package/dist/model-suppression.runtime-Dqra9AAF.js +0 -7
- package/dist/model-suppression.runtime.js +0 -1
- package/dist/models--Ze_o5z6.js +0 -193
- package/dist/models-7_w_ynp7.js +0 -35
- package/dist/models-BMmB_oQc.js +0 -130
- package/dist/models-B_TKM4gG.js +0 -18
- package/dist/models-B_UROL5b.js +0 -3
- package/dist/models-BmDGSZCK.js +0 -31
- package/dist/models-BywIyTzh.js +0 -126
- package/dist/models-C5GB-E7D.js +0 -154
- package/dist/models-DU3Lv10g.js +0 -754
- package/dist/models-VgpjMiqM.js +0 -138
- package/dist/models-_DZVZ2Na.js +0 -18
- package/dist/models-bBe0FFJe.js +0 -2550
- package/dist/models-cli-kZR11PgM.js +0 -197
- package/dist/models-config-D6j7jkCN.js +0 -2
- package/dist/models-config-lYKxSxLo.js +0 -1106
- package/dist/models-config.runtime-D2tdVUsi.js +0 -2
- package/dist/models-config.runtime.js +0 -1
- package/dist/models-emJUoDsF.js +0 -40
- package/dist/models-gPCm0Fco.js +0 -122
- package/dist/models-mi7nu17U.js +0 -99
- package/dist/models-nUP9ZPV8.js +0 -552
- package/dist/models-provider-runtime-DfIZ0cvV.js +0 -2
- package/dist/monitor-BEjwRY59.js +0 -3622
- package/dist/monitor-BiwufaF7.js +0 -718
- package/dist/monitor-BqwlHm94.js +0 -3660
- package/dist/monitor-Cj6Atk8I.js +0 -676
- package/dist/monitor-D2qBnOYz.js +0 -666
- package/dist/monitor-DZmBV1Nj2.js +0 -2
- package/dist/monitor-RMoB6sGQ.js +0 -4067
- package/dist/monitor-auth-EvlH1zbN.js +0 -192
- package/dist/monitor-lbUydC5_.js +0 -1525
- package/dist/monitor-polling.runtime-O6ZG6yYv.js +0 -307
- package/dist/monitor-polling.runtime.js +0 -1
- package/dist/monitor-provider-x4TUmYNN.js +0 -1782
- package/dist/monitor-vE0skDM1.js +0 -687
- package/dist/monitor-webhook.runtime-DoTv_oZv.js +0 -297
- package/dist/monitor-webhook.runtime.js +0 -1
- package/dist/moonshot-stream-wrappers-Csssd6kW.js +0 -24
- package/dist/moonshot-thinking-stream-wrappers-D3j6Q9Yk.js +0 -69
- package/dist/msteams-DsFLaFEV.js +0 -33
- package/dist/multimodal-DoXQtvBl.js +0 -66
- package/dist/mutable-allowlist-detectors-CbFK2eTK.js +0 -62
- package/dist/native-command-registry-B4BAqmAW.js +0 -2
- package/dist/native-command-session-targets-DfUCBY63.js +0 -10
- package/dist/net-DjzoSxQo.js +0 -265
- package/dist/network-discovery-display-h8MqTMCI.js +0 -48
- package/dist/network-mode-QjJNOXMa.js +0 -17
- package/dist/nextcloud-talk-COZ5YrPY.js +0 -18
- package/dist/node-cli-z8LHYl1w.js +0 -2323
- package/dist/node-command-policy-DoeXKD1V.js +0 -205
- package/dist/node-commands-ycnRypMq.js +0 -11
- package/dist/node-require-BgDD9bTi.js +0 -14
- package/dist/node-resolve-Drr1RIcN.js +0 -110
- package/dist/node-service-Nyf8eLc4.js +0 -68
- package/dist/node-startup-env-CVMjxAUF.js +0 -50
- package/dist/nodes-cli-BMyafV_R.js +0 -1044
- package/dist/nodes-screen-oyGHNlY5.js +0 -219
- package/dist/nodes.helpers-DKBA9twS.js +0 -203
- package/dist/normalize-C46CugdT.js +0 -35
- package/dist/normalize-reply-VrMa_PA2.js +0 -500
- package/dist/normalize-secret-input-CC9iFcnK.js +0 -32
- package/dist/nostr-DGfd-Skj.js +0 -19
- package/dist/note-B5R9zt2K.js +0 -109
- package/dist/notify-CKEt6MKY.js +0 -298
- package/dist/npm-registry-spec-dWUFCqDk.js +0 -100
- package/dist/oauth-BBIy_OBl.js +0 -152
- package/dist/oauth-DzMUt9ZO.js +0 -56
- package/dist/oauth.credentials-CKrXIXPf.js +0 -119
- package/dist/oauth.flow-Dd6MZcHS.js +0 -122
- package/dist/oauth.http-CZlbXoZD.js +0 -23
- package/dist/oauth.project-DAVNbct7.js +0 -125
- package/dist/oauth.shared-D1_wwlyt.js +0 -26
- package/dist/oauth.token-CnB-w_v2.js +0 -42
- package/dist/ollama-EE_SvO8P.js +0 -26
- package/dist/onboard-2otvb4-n.js +0 -307
- package/dist/onboard-72nGEzpd.js +0 -25
- package/dist/onboard-B14oDS4M.js +0 -23
- package/dist/onboard-BH5hcOyK.js +0 -39
- package/dist/onboard-BRkQIFt_.js +0 -25
- package/dist/onboard-BSArlkkq.js +0 -73
- package/dist/onboard-Bau_HSmO.js +0 -36
- package/dist/onboard-BsqpQhXj.js +0 -591
- package/dist/onboard-CBa7u1iZ.js +0 -25
- package/dist/onboard-CLKZrJow.js +0 -29
- package/dist/onboard-COaMJ5wS.js +0 -28
- package/dist/onboard-CbTQZti9.js +0 -48
- package/dist/onboard-Ce3rcBNR.js +0 -29
- package/dist/onboard-CiMzgSvO.js +0 -67
- package/dist/onboard-DNuWjUOg.js +0 -17
- package/dist/onboard-DY3JtOcX.js +0 -47
- package/dist/onboard-Dd_eFJ7g.js +0 -25
- package/dist/onboard-DgMI-C3P.js +0 -24
- package/dist/onboard-Dj3Kkl9C.js +0 -49
- package/dist/onboard-Djne8OY8.js +0 -34
- package/dist/onboard-DnNU28xK.js +0 -48
- package/dist/onboard-MFS79j1I.js +0 -23
- package/dist/onboard-REHqRyQm.js +0 -26
- package/dist/onboard-VVnzyvuh.js +0 -46
- package/dist/onboard-channels-B8UocRdo.js +0 -705
- package/dist/onboard-channels-Ci5QQyQ0.js +0 -2
- package/dist/onboard-config-7edS4yYd.js +0 -2
- package/dist/onboard-config-C-6p2HNL.js +0 -29
- package/dist/onboard-custom-BREC7K0s.js +0 -2
- package/dist/onboard-custom-D7oXiV6u.js +0 -646
- package/dist/onboard-helpers-BCIfy96O.js +0 -4
- package/dist/onboard-helpers-CLedS83g.js +0 -227
- package/dist/onboard-hooks-DW0gav3i.js +0 -52
- package/dist/onboard-lh38uUOa.js +0 -25
- package/dist/onboard-rH_HA9v-.js +0 -34
- package/dist/onboard-remote-DG5Rb2y7.js +0 -2
- package/dist/onboard-remote-DgDwHLCW.js +0 -193
- package/dist/onboard-search-Bz78SAON.js +0 -339
- package/dist/onboard-skills-BK1iF6NI.js +0 -2
- package/dist/onboard-skills-Cfs4Gz-d.js +0 -134
- package/dist/openai-B3atWWiZ.js +0 -21
- package/dist/openai-codex-auth-identity-blYgqX5I.js +0 -40
- package/dist/openai-codex-catalog-DQoW5ntP.js +0 -11
- package/dist/openai-codex-provider-BeX3_fQL.js +0 -254
- package/dist/openai-provider-DfSRc815.js +0 -272
- package/dist/openai-stream-wrappers-Cmn9nSYj.js +0 -338
- package/dist/openclaw-exec-env-DnTrPIdx.js +0 -17
- package/dist/openclaw-root-F1SOdmJ0.js +0 -88
- package/dist/openclaw-tools.runtime-Dx73yE1V.js +0 -2
- package/dist/openclaw-tools.runtime.js +0 -1
- package/dist/operator-approvals-client-NQtGN5k_.js +0 -33
- package/dist/order-DNBhjW6F.js +0 -744
- package/dist/origin-routing-BC2EzQqM.js +0 -15
- package/dist/origin-routing-BVUTLJGu.js +0 -2
- package/dist/os-summary-CdlXkpL1.js +0 -26
- package/dist/outbound-adapter-D6WGzS7P.js +0 -183
- package/dist/outbound-ek4CqhT2.js +0 -2
- package/dist/outbound-hgMEZIU9.js +0 -2739
- package/dist/outbound-media-B2ZrkOxl.js +0 -15
- package/dist/outbound-runtime-CtDmQy3z.js +0 -2
- package/dist/outbound-send-deps-COPf3lwV.js +0 -7
- package/dist/outbound-session-DHKvttsz.js +0 -41
- package/dist/pairing-challenge-O7jo1Q5R.js +0 -33
- package/dist/pairing-cli-BEUxC5EH.js +0 -116
- package/dist/pairing-labels-Cj1fFxG9.js +0 -7
- package/dist/pairing-message-FaqHPEFk.js +0 -4
- package/dist/pairing-messages-DxLpe0GE.js +0 -23
- package/dist/pairing-pending-DGyUpmjC.js +0 -14
- package/dist/pairing-store-B171dUVa.js +0 -617
- package/dist/pairing-token-CnyXOU__.js +0 -88
- package/dist/param-readers-CqAoT2n2.js +0 -2
- package/dist/parse-duration-D9q1V0xx.js +0 -41
- package/dist/parse-finite-number-CzdLC_gQ.js +0 -30
- package/dist/parse-json-compat-DfjRYtKX.js +0 -11
- package/dist/parse-log-line-Cd0JHPGg.js +0 -43
- package/dist/parse-port-BFmNhrtE.js +0 -8
- package/dist/parse-timeout-bktz0495.js +0 -27
- package/dist/path-alias-guards-BeOn9PZR.js +0 -40
- package/dist/path-env-C2F1kvna.js +0 -87
- package/dist/path-safety-2mfHCe0n.js +0 -12
- package/dist/paths-Bw8Ci57u.js +0 -2
- package/dist/paths-GWMNxnBn.js +0 -201
- package/dist/paths-xpks599B.js +0 -180
- package/dist/payload-S8niBCaz.js +0 -90
- package/dist/pdf-extract-Cm83kt2M.js +0 -73
- package/dist/perplexity-web-search-provider-Cgr2BYVk.js +0 -423
- package/dist/persistent-bindings.lifecycle-CAOm8v8I.js +0 -159
- package/dist/persistent-dedupe-DoNHVMWs.js +0 -116
- package/dist/pi-embedded-DEAtCIdT.js +0 -40616
- package/dist/pi-embedded-helpers-BVjvCsor.js +0 -1733
- package/dist/pi-embedded.runtime-Ctj3QFs-.js +0 -4
- package/dist/pi-embedded.runtime.js +0 -1
- package/dist/pi-model-discovery-KjI5xf8m.js +0 -188
- package/dist/pi-settings-BJzoHYF9.js +0 -57
- package/dist/pi-tools.before-tool-call.runtime-DJ6s0GDV.js +0 -354
- package/dist/pi-tools.before-tool-call.runtime.js +0 -1
- package/dist/plugin-auto-enable-BZvicayR.js +0 -400
- package/dist/plugin-entry-D0vhddM4.js +0 -25
- package/dist/plugin-entry.runtime-Xd644UDA.js +0 -112
- package/dist/plugin-entry.runtime.js +0 -1
- package/dist/plugin-error-boundary-RI4ByQoA.js +0 -55
- package/dist/plugin-error-handler-DWUTf_UF.js +0 -109
- package/dist/plugin-health-checker-2c6LyJwr.js +0 -125
- package/dist/plugin-hot-reload-CA3__dZN.js +0 -215
- package/dist/plugin-install-BjVLwj7-.js +0 -230
- package/dist/plugin-install-CjwMt13j.js +0 -2
- package/dist/plugin-install-config-policy-MApev-w-.js +0 -93
- package/dist/plugin-install-path-warnings-BkBH-k4n.js +0 -40
- package/dist/plugin-install-plan-0fWhyVBN.js +0 -50
- package/dist/plugin-registry-CORVyKHv.js +0 -74
- package/dist/plugin-registry-Dl1iIh7W.js +0 -2
- package/dist/plugin-runtime-Dd1YN95W.js +0 -6
- package/dist/plugin-sdk/account-core.js +0 -8
- package/dist/plugin-sdk/account-helpers.js +0 -4
- package/dist/plugin-sdk/account-id.js +0 -3
- package/dist/plugin-sdk/account-resolution.js +0 -12
- package/dist/plugin-sdk/acp-runtime.js +0 -3
- package/dist/plugin-sdk/agent-config-primitives.js +0 -3
- package/dist/plugin-sdk/agent-runtime.js +0 -29
- package/dist/plugin-sdk/allow-from.js +0 -5
- package/dist/plugin-sdk/allowlist-config-edit.js +0 -2
- package/dist/plugin-sdk/amazon-bedrock.js +0 -15
- package/dist/plugin-sdk/anthropic-vertex.js +0 -2
- package/dist/plugin-sdk/approval-runtime.js +0 -8
- package/dist/plugin-sdk/bluebubbles-policy.js +0 -2
- package/dist/plugin-sdk/bluebubbles.js +0 -39
- package/dist/plugin-sdk/boolean-param.js +0 -2
- package/dist/plugin-sdk/browser-runtime.js +0 -3
- package/dist/plugin-sdk/browser-support.js +0 -44
- package/dist/plugin-sdk/browser.js +0 -15
- package/dist/plugin-sdk/byteplus.js +0 -17
- package/dist/plugin-sdk/channel-actions.js +0 -3
- package/dist/plugin-sdk/channel-config-helpers.js +0 -2
- package/dist/plugin-sdk/channel-config-primitives.js +0 -4
- package/dist/plugin-sdk/channel-config-schema.js +0 -7
- package/dist/plugin-sdk/channel-config-writes.js +0 -3
- package/dist/plugin-sdk/channel-contract.js +0 -1
- package/dist/plugin-sdk/channel-feedback.js +0 -5
- package/dist/plugin-sdk/channel-inbound.js +0 -10
- package/dist/plugin-sdk/channel-lifecycle.js +0 -3
- package/dist/plugin-sdk/channel-pairing.js +0 -2
- package/dist/plugin-sdk/channel-policy.js +0 -6
- package/dist/plugin-sdk/channel-reply-pipeline.js +0 -2
- package/dist/plugin-sdk/channel-runtime.js +0 -16
- package/dist/plugin-sdk/channel-send-result.js +0 -2
- package/dist/plugin-sdk/channel-setup.js +0 -5
- package/dist/plugin-sdk/channel-status.js +0 -5
- package/dist/plugin-sdk/channel-targets.js +0 -5
- package/dist/plugin-sdk/chutes.js +0 -20
- package/dist/plugin-sdk/cli-backend.js +0 -3
- package/dist/plugin-sdk/cli-runtime.js +0 -7
- package/dist/plugin-sdk/cloudflare-ai-gateway.js +0 -18
- package/dist/plugin-sdk/collection-runtime.js +0 -3
- package/dist/plugin-sdk/command-auth-native.js +0 -6
- package/dist/plugin-sdk/command-auth.js +0 -14
- package/dist/plugin-sdk/command-detection.js +0 -3
- package/dist/plugin-sdk/command-surface.js +0 -3
- package/dist/plugin-sdk/compat.js +0 -35
- package/dist/plugin-sdk/config-runtime.js +0 -25
- package/dist/plugin-sdk/conversation-runtime.js +0 -15
- package/dist/plugin-sdk/core.js +0 -22
- package/dist/plugin-sdk/dangerous-name-runtime.js +0 -3
- package/dist/plugin-sdk/deepseek.js +0 -14
- package/dist/plugin-sdk/device-bootstrap.js +0 -4
- package/dist/plugin-sdk/diagnostic-runtime.js +0 -4
- package/dist/plugin-sdk/diagnostics-otel.js +0 -6
- package/dist/plugin-sdk/diffs.js +0 -4
- package/dist/plugin-sdk/direct-dm.js +0 -2
- package/dist/plugin-sdk/directory-runtime.js +0 -5
- package/dist/plugin-sdk/discord-account.js +0 -2
- package/dist/plugin-sdk/discord-core.js +0 -9
- package/dist/plugin-sdk/discord-runtime-surface.js +0 -2
- package/dist/plugin-sdk/discord-session-key.js +0 -2
- package/dist/plugin-sdk/discord-surface.js +0 -2
- package/dist/plugin-sdk/discord-thread-bindings.js +0 -2
- package/dist/plugin-sdk/discord-timeouts.js +0 -2
- package/dist/plugin-sdk/discord.js +0 -21
- package/dist/plugin-sdk/error-runtime.js +0 -3
- package/dist/plugin-sdk/extension-shared.js +0 -3
- package/dist/plugin-sdk/feishu-conversation.js +0 -2
- package/dist/plugin-sdk/feishu-setup.js +0 -2
- package/dist/plugin-sdk/feishu.js +0 -34
- package/dist/plugin-sdk/fetch-runtime.js +0 -7
- package/dist/plugin-sdk/file-lock.js +0 -2
- package/dist/plugin-sdk/gateway-runtime.js +0 -4
- package/dist/plugin-sdk/github-copilot-login.js +0 -2
- package/dist/plugin-sdk/github-copilot-token.js +0 -3
- package/dist/plugin-sdk/global-singleton.js +0 -4
- package/dist/plugin-sdk/google.js +0 -2
- package/dist/plugin-sdk/googlechat.js +0 -38
- package/dist/plugin-sdk/group-access.js +0 -2
- package/dist/plugin-sdk/hook-runtime.js +0 -4
- package/dist/plugin-sdk/host-runtime.js +0 -4
- package/dist/plugin-sdk/huggingface.js +0 -18
- package/dist/plugin-sdk/image-generation-core.js +0 -63
- package/dist/plugin-sdk/image-generation.js +0 -2
- package/dist/plugin-sdk/index.js +0 -5
- package/dist/plugin-sdk/infra-runtime.js +0 -45
- package/dist/plugin-sdk/interactive-runtime.js +0 -4
- package/dist/plugin-sdk/irc-surface.js +0 -2
- package/dist/plugin-sdk/irc.js +0 -30
- package/dist/plugin-sdk/json-store.js +0 -3
- package/dist/plugin-sdk/keyed-async-queue.js +0 -2
- package/dist/plugin-sdk/kilocode.js +0 -23
- package/dist/plugin-sdk/kimi-coding.js +0 -11
- package/dist/plugin-sdk/lazy-runtime.js +0 -3
- package/dist/plugin-sdk/line-core.js +0 -6
- package/dist/plugin-sdk/line-runtime.js +0 -2
- package/dist/plugin-sdk/line-surface.js +0 -2
- package/dist/plugin-sdk/line.js +0 -9
- package/dist/plugin-sdk/llm-task.js +0 -6
- package/dist/plugin-sdk/logging-core.js +0 -5
- package/dist/plugin-sdk/markdown-table-runtime.js +0 -3
- package/dist/plugin-sdk/matrix-helper.js +0 -2
- package/dist/plugin-sdk/matrix-runtime-heavy.js +0 -5
- package/dist/plugin-sdk/matrix-runtime-shared.js +0 -3
- package/dist/plugin-sdk/matrix-runtime-surface.js +0 -2
- package/dist/plugin-sdk/matrix-surface.js +0 -2
- package/dist/plugin-sdk/matrix-thread-bindings.js +0 -2
- package/dist/plugin-sdk/matrix.js +0 -53
- package/dist/plugin-sdk/mattermost-policy.js +0 -11
- package/dist/plugin-sdk/mattermost.js +0 -41
- package/dist/plugin-sdk/media-runtime.js +0 -17
- package/dist/plugin-sdk/media-understanding-runtime.js +0 -2
- package/dist/plugin-sdk/media-understanding.js +0 -3
- package/dist/plugin-sdk/memory-core-engine-runtime.js +0 -2
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +0 -6
- package/dist/plugin-sdk/memory-core-host-engine-foundation.js +0 -17
- package/dist/plugin-sdk/memory-core-host-engine-qmd.js +0 -3
- package/dist/plugin-sdk/memory-core-host-engine-storage.js +0 -4
- package/dist/plugin-sdk/memory-core-host-multimodal.js +0 -3
- package/dist/plugin-sdk/memory-core-host-query.js +0 -3
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +0 -12
- package/dist/plugin-sdk/memory-core-host-runtime-core.js +0 -14
- package/dist/plugin-sdk/memory-core-host-runtime-files.js +0 -4
- package/dist/plugin-sdk/memory-core-host-secret.js +0 -3
- package/dist/plugin-sdk/memory-core-host-status.js +0 -2
- package/dist/plugin-sdk/memory-core.js +0 -29
- package/dist/plugin-sdk/memory-lancedb.js +0 -4
- package/dist/plugin-sdk/minimax.js +0 -24
- package/dist/plugin-sdk/mistral.js +0 -17
- package/dist/plugin-sdk/models-provider-runtime.js +0 -3
- package/dist/plugin-sdk/modelstudio-definitions.js +0 -19
- package/dist/plugin-sdk/modelstudio.js +0 -24
- package/dist/plugin-sdk/moonshot.js +0 -17
- package/dist/plugin-sdk/msteams.js +0 -46
- package/dist/plugin-sdk/native-command-registry.js +0 -3
- package/dist/plugin-sdk/nextcloud-talk.js +0 -35
- package/dist/plugin-sdk/nostr.js +0 -14
- package/dist/plugin-sdk/nvidia.js +0 -11
- package/dist/plugin-sdk/ollama-surface.js +0 -24
- package/dist/plugin-sdk/ollama.js +0 -2
- package/dist/plugin-sdk/openai.js +0 -2
- package/dist/plugin-sdk/opencode-go.js +0 -14
- package/dist/plugin-sdk/opencode.js +0 -15
- package/dist/plugin-sdk/outbound-runtime.js +0 -5
- package/dist/plugin-sdk/param-readers.js +0 -3
- package/dist/plugin-sdk/plugin-entry.js +0 -3
- package/dist/plugin-sdk/plugin-runtime.js +0 -8
- package/dist/plugin-sdk/process-runtime.js +0 -3
- package/dist/plugin-sdk/provider-auth-api-key.js +0 -9
- package/dist/plugin-sdk/provider-auth-login.js +0 -2
- package/dist/plugin-sdk/provider-auth-result.js +0 -2
- package/dist/plugin-sdk/provider-auth-runtime.js +0 -5
- package/dist/plugin-sdk/provider-auth.js +0 -17
- package/dist/plugin-sdk/provider-catalog-shared.js +0 -2
- package/dist/plugin-sdk/provider-entry.js +0 -2
- package/dist/plugin-sdk/provider-env-vars.js +0 -3
- package/dist/plugin-sdk/provider-http.js +0 -6
- package/dist/plugin-sdk/provider-model-shared.js +0 -5
- package/dist/plugin-sdk/provider-moonshot.js +0 -3
- package/dist/plugin-sdk/provider-onboard.js +0 -3
- package/dist/plugin-sdk/provider-setup.js +0 -3
- package/dist/plugin-sdk/provider-stream.js +0 -4
- package/dist/plugin-sdk/provider-tools.js +0 -2
- package/dist/plugin-sdk/provider-usage.js +0 -3
- package/dist/plugin-sdk/provider-web-fetch.js +0 -6
- package/dist/plugin-sdk/provider-web-search.js +0 -7
- package/dist/plugin-sdk/provider-zai-endpoint.js +0 -2
- package/dist/plugin-sdk/qianfan.js +0 -13
- package/dist/plugin-sdk/reply-chunking.js +0 -4
- package/dist/plugin-sdk/reply-dispatch-runtime.js +0 -5
- package/dist/plugin-sdk/reply-history.js +0 -3
- package/dist/plugin-sdk/reply-payload.js +0 -2
- package/dist/plugin-sdk/reply-runtime.js +0 -14
- package/dist/plugin-sdk/request-url.js +0 -2
- package/dist/plugin-sdk/retry-runtime.js +0 -4
- package/dist/plugin-sdk/root-alias.cjs +0 -347
- package/dist/plugin-sdk/routing.js +0 -9
- package/dist/plugin-sdk/runtime-config-snapshot.js +0 -3
- package/dist/plugin-sdk/runtime-env.js +0 -17
- package/dist/plugin-sdk/runtime-group-policy.js +0 -3
- package/dist/plugin-sdk/runtime-store.js +0 -2
- package/dist/plugin-sdk/runtime.js +0 -9
- package/dist/plugin-sdk/sandbox.js +0 -6
- package/dist/plugin-sdk/secret-input.js +0 -4
- package/dist/plugin-sdk/security-runtime.js +0 -6
- package/dist/plugin-sdk/self-hosted-provider-setup.js +0 -2
- package/dist/plugin-sdk/session-store-runtime.js +0 -4
- package/dist/plugin-sdk/setup-adapter-runtime.js +0 -3
- package/dist/plugin-sdk/setup-runtime.js +0 -6
- package/dist/plugin-sdk/setup-tools.js +0 -6
- package/dist/plugin-sdk/setup.js +0 -13
- package/dist/plugin-sdk/sglang.js +0 -15
- package/dist/plugin-sdk/signal-account.js +0 -2
- package/dist/plugin-sdk/signal-surface.js +0 -2
- package/dist/plugin-sdk/signal.js +0 -24
- package/dist/plugin-sdk/skill-commands-runtime.js +0 -3
- package/dist/plugin-sdk/slack-account.js +0 -2
- package/dist/plugin-sdk/slack-core.js +0 -7
- package/dist/plugin-sdk/slack-runtime-surface.js +0 -2
- package/dist/plugin-sdk/slack-surface.js +0 -2
- package/dist/plugin-sdk/slack-target-parser.js +0 -2
- package/dist/plugin-sdk/slack-targets.js +0 -3
- package/dist/plugin-sdk/slack.js +0 -20
- package/dist/plugin-sdk/speech-core.js +0 -4
- package/dist/plugin-sdk/speech-runtime.js +0 -2
- package/dist/plugin-sdk/speech.js +0 -5
- package/dist/plugin-sdk/ssrf-runtime.js +0 -6
- package/dist/plugin-sdk/state-paths.js +0 -3
- package/dist/plugin-sdk/status-helpers.js +0 -4
- package/dist/plugin-sdk/string-normalization-runtime.js +0 -3
- package/dist/plugin-sdk/synthetic.js +0 -17
- package/dist/plugin-sdk/telegram-account.js +0 -2
- package/dist/plugin-sdk/telegram-allow-from.js +0 -12
- package/dist/plugin-sdk/telegram-command-config.js +0 -3
- package/dist/plugin-sdk/telegram-core.js +0 -18
- package/dist/plugin-sdk/telegram-surface.js +0 -42
- package/dist/plugin-sdk/temp-path.js +0 -4
- package/dist/plugin-sdk/testing.js +0 -11
- package/dist/plugin-sdk/text-runtime.js +0 -19
- package/dist/plugin-sdk/thread-bindings-runtime.js +0 -4
- package/dist/plugin-sdk/thread-ownership.js +0 -5
- package/dist/plugin-sdk/tlon.js +0 -13
- package/dist/plugin-sdk/together.js +0 -16
- package/dist/plugin-sdk/tool-send.js +0 -2
- package/dist/plugin-sdk/twitch.js +0 -8
- package/dist/plugin-sdk/venice.js +0 -16
- package/dist/plugin-sdk/vllm.js +0 -15
- package/dist/plugin-sdk/voice-call.js +0 -7
- package/dist/plugin-sdk/volcengine.js +0 -17
- package/dist/plugin-sdk/web-media.js +0 -4
- package/dist/plugin-sdk/webhook-ingress.js +0 -9
- package/dist/plugin-sdk/webhook-path.js +0 -2
- package/dist/plugin-sdk/webhook-request-guards.js +0 -3
- package/dist/plugin-sdk/whatsapp-auth-presence.js +0 -2
- package/dist/plugin-sdk/whatsapp-core.js +0 -11
- package/dist/plugin-sdk/whatsapp-shared.js +0 -5
- package/dist/plugin-sdk/whatsapp-surface.js +0 -2
- package/dist/plugin-sdk/whatsapp-targets.js +0 -2
- package/dist/plugin-sdk/windows-spawn.js +0 -2
- package/dist/plugin-sdk/xai.js +0 -27
- package/dist/plugin-sdk/zalo-setup.js +0 -2
- package/dist/plugin-sdk/zalo.js +0 -38
- package/dist/plugin-sdk/zalouser.js +0 -29
- package/dist/plugin-sdk/zod.js +0 -3
- package/dist/plugins/build-smoke-entry.js +0 -4
- package/dist/plugins/provider-runtime.runtime.js +0 -2
- package/dist/plugins/runtime/index.js +0 -2
- package/dist/plugins/runtime/runtime-line.contract.js +0 -23
- package/dist/plugins-DcjzAZWt.js +0 -5
- package/dist/plugins-allowlist-DoZlIC4p.js +0 -14
- package/dist/plugins-cli-G6GhHHD0.js +0 -561
- package/dist/plugins-command-helpers-CIYzoC65.js +0 -116
- package/dist/plugins-install-persist-C5-bJdRb.js +0 -121
- package/dist/plugins-update-command-CsT_saJm.js +0 -974
- package/dist/plugins-w6xUzHby.js +0 -40
- package/dist/pluralkit-B_DWQnc5.js +0 -21
- package/dist/pluralkit-Bez5QVFC.js +0 -2
- package/dist/policy-D6OQdw73.js +0 -173
- package/dist/policy-DXeeH8B2.js +0 -147
- package/dist/poll-params-DTVSSuok.js +0 -52
- package/dist/polls-CMmT0F_y.js +0 -35
- package/dist/port-defaults-Dajs4Obu.js +0 -30
- package/dist/ports-DuU-A86K.js +0 -262
- package/dist/ports-ZA1n2It7.js +0 -432
- package/dist/ports-lsof-Cw_6T7ru.js +0 -25
- package/dist/ports-probe-DeuK48Pq.js +0 -14
- package/dist/preflight-audio-DTSBExi8.js +0 -48
- package/dist/preflight-audio.runtime-BJRLyBvf.js +0 -7
- package/dist/preflight-audio.runtime.js +0 -1
- package/dist/prepare-BQBndJUC.js +0 -1301
- package/dist/probe-BO4hbHvs.js +0 -435
- package/dist/probe-DPv2pfj5.js +0 -1868
- package/dist/probe-DlO2Q9rN.js +0 -170
- package/dist/probe-RbbTQOHx.js +0 -178
- package/dist/probe-auth-Bl9MHtlP.js +0 -2
- package/dist/probe-auth-CUfEH7di.js +0 -63
- package/dist/probe-eYLpFww_.js +0 -137
- package/dist/probe-kfBMuOWF.js +0 -2
- package/dist/probe-wktb4WTP.js +0 -349
- package/dist/probe.runtime-BhbUesak.js +0 -2
- package/dist/probe.runtime.js +0 -1
- package/dist/process-runtime-CBFMzhIk.js +0 -2
- package/dist/process-scoped-map-C7IoOrV-.js +0 -61
- package/dist/profile-B5n9yLlB.js +0 -2
- package/dist/profile-CmsqnPsu.js +0 -107
- package/dist/profile-update-D6f10CZk.js +0 -67
- package/dist/profile-utils-C7uzTwgJ.js +0 -15
- package/dist/profiles-BoNergZo.js +0 -79
- package/dist/program-BuKG0Ntx.js +0 -158
- package/dist/program-context-DDmlbmbl.js +0 -2
- package/dist/program-context-DQOnR5c_.js +0 -10
- package/dist/progress-DQvXYKne.js +0 -132
- package/dist/prompt-COzf5LIJ.js +0 -2
- package/dist/prompt-OSmU-o7R.js +0 -20
- package/dist/prompt-select-styled-yYL3el77.js +0 -6432
- package/dist/prompt-style-DekFM6h7.js +0 -7
- package/dist/prompts-MtRTsZpw.js +0 -9
- package/dist/prototype-keys-DrjhYNcz.js +0 -11
- package/dist/provider-BWTXmDq3.js +0 -3685
- package/dist/provider-BrmcrkEe.js +0 -70
- package/dist/provider-ByBRbhW5.js +0 -7216
- package/dist/provider-api-key-auth-BcyipSdy.js +0 -109
- package/dist/provider-api-key-auth.runtime-BRu_8L4m.js +0 -14
- package/dist/provider-api-key-auth.runtime.js +0 -1
- package/dist/provider-attribution-DMVujx9B.js +0 -285
- package/dist/provider-auth-DK2UmYsZ.js +0 -43
- package/dist/provider-auth-api-key-99KxscjW.js +0 -5
- package/dist/provider-auth-choice-GbHta8Bp.js +0 -134
- package/dist/provider-auth-choice-helpers-CO2MnSGR.js +0 -58
- package/dist/provider-auth-choice-preference-DvAqSMGK.js +0 -44
- package/dist/provider-auth-choice.runtime-B8R63sLq.js +0 -14
- package/dist/provider-auth-choice.runtime-DypTKgMQ.js +0 -2
- package/dist/provider-auth-choice.runtime.js +0 -1
- package/dist/provider-auth-choices-n-JV1XgU.js +0 -65
- package/dist/provider-auth-guidance-DAB9sGGR.js +0 -35
- package/dist/provider-auth-helpers-gmTAji1W.js +0 -92
- package/dist/provider-auth-input-GgY_tjJh.js +0 -116
- package/dist/provider-auth-login-BYbccnB1.js +0 -8
- package/dist/provider-auth-login.runtime-DnSxCwqU.js +0 -196
- package/dist/provider-auth-login.runtime.js +0 -1
- package/dist/provider-auth-mode-Dbja5LLX.js +0 -20
- package/dist/provider-auth-ref-BErMfwCd.js +0 -171
- package/dist/provider-auth-ref-DEF_hE2R.js +0 -2
- package/dist/provider-auth-result-DiUxDF1G.js +0 -31
- package/dist/provider-auth-runtime-BwMq9oMD.js +0 -32
- package/dist/provider-catalog--Qc0q0I-.js +0 -26
- package/dist/provider-catalog-A_s8JQaq.js +0 -18
- package/dist/provider-catalog-B-EcLvBI.js +0 -11
- package/dist/provider-catalog-Bte-HucL.js +0 -44
- package/dist/provider-catalog-C63Rfat7.js +0 -11
- package/dist/provider-catalog-C7q0Vb3S.js +0 -95
- package/dist/provider-catalog-CCnuf8d3.js +0 -49
- package/dist/provider-catalog-CYQ7k_Db.js +0 -48
- package/dist/provider-catalog-CnlB2mMZ.js +0 -11
- package/dist/provider-catalog-CoyAbDZX.js +0 -56
- package/dist/provider-catalog-CtqhFopw.js +0 -48
- package/dist/provider-catalog-CyGxB_aR.js +0 -18
- package/dist/provider-catalog-D1pmWiDQ.js +0 -48
- package/dist/provider-catalog-DGgsalJv.js +0 -12
- package/dist/provider-catalog-DLdTTMmW.js +0 -11
- package/dist/provider-catalog-DZzX7Vwk.js +0 -54
- package/dist/provider-catalog-J2dZciKS.js +0 -11
- package/dist/provider-catalog-LVrcrz-W.js +0 -36
- package/dist/provider-catalog-aIN0QojF.js +0 -11
- package/dist/provider-catalog-shared-Db9nbr1B.js +0 -28
- package/dist/provider-discovery.runtime-BCUAsMMz.js +0 -10
- package/dist/provider-discovery.runtime.js +0 -1
- package/dist/provider-dispatcher-COxXbow_.js +0 -22
- package/dist/provider-entry-CT_YeII_.js +0 -86
- package/dist/provider-env-vars-4Bon7Y2X.js +0 -121
- package/dist/provider-env-vars-Np7qkDjC.js +0 -2
- package/dist/provider-flow-Dlg1GcXQ.js +0 -93
- package/dist/provider-http-DQQ317hc.js +0 -3
- package/dist/provider-id-CHzLB538.js +0 -30
- package/dist/provider-model-defaults-dSPzPas0.js +0 -5
- package/dist/provider-model-primary-D8SgLcOd.js +0 -26
- package/dist/provider-model-shared-GO1WT2fY.js +0 -104
- package/dist/provider-models-BG8YwJaY.js +0 -117
- package/dist/provider-models-BVVCdM8F.js +0 -22
- package/dist/provider-models-D2UZvTo3.js +0 -46
- package/dist/provider-moonshot-Cl8urWHL.js +0 -2
- package/dist/provider-oauth-flow-Bu2gIeX6.js +0 -33
- package/dist/provider-onboard-CTEHTjfw.js +0 -264
- package/dist/provider-openai-codex-oauth-tls-DdLUDuIM.js +0 -101
- package/dist/provider-registry-Ljtt6CKE.js +0 -49
- package/dist/provider-request-config-CIrbwAnR.js +0 -209
- package/dist/provider-runtime-BBFXlsU0.js +0 -2
- package/dist/provider-runtime-D_itmv9t.js +0 -291
- package/dist/provider-runtime.runtime-B_oC992d.js +0 -26
- package/dist/provider-runtime.runtime.js +0 -1
- package/dist/provider-self-hosted-setup-BlNrSREL.js +0 -272
- package/dist/provider-session.runtime-DQyRV-t3.js +0 -7
- package/dist/provider-session.runtime.js +0 -1
- package/dist/provider-setup-CSrOyU04.js +0 -2
- package/dist/provider-stream-m5D8QZPz.js +0 -289
- package/dist/provider-tools-NuJzTqa1.js +0 -37
- package/dist/provider-usage-BB5mQ8Fg.js +0 -3
- package/dist/provider-usage-CbPs3eFQ.js +0 -2
- package/dist/provider-usage-DG1gff_M.js +0 -375
- package/dist/provider-usage.fetch-DHWQ4YZu.js +0 -633
- package/dist/provider-web-fetch-QzED2vth.js +0 -5
- package/dist/provider-web-search-CVMEZcl8.js +0 -306
- package/dist/provider-wizard-B0ocsg3q.js +0 -209
- package/dist/provider-zai-endpoint-DoIy5HQf.js +0 -116
- package/dist/provider.runtime-jHt6447e.js +0 -2
- package/dist/provider.runtime.js +0 -1
- package/dist/providers-DUy2TaM-.js +0 -59
- package/dist/providers.runtime-Bz0X8DZ2.js +0 -60
- package/dist/providers.runtime.js +0 -1
- package/dist/proxy-env-D4H9qI5l.js +0 -40
- package/dist/proxy-fetch-DiyTLcAR.js +0 -55
- package/dist/proxy-hcRRmsDd.js +0 -121
- package/dist/pw-ai-Cp64-UGh.js +0 -2037
- package/dist/qmd-manager-D2rMomsU.js +0 -1740
- package/dist/qr-cli-DuANCi-n.js +0 -2
- package/dist/qr-cli-lr5CcLr8.js +0 -367
- package/dist/qr-image-DOcoqAUw.js +0 -2
- package/dist/query-expansion-85HlYbKD.js +0 -633
- package/dist/queue-CtO0M_P1.js +0 -663
- package/dist/reaction-runtime-api-B4KmfKtJ.js +0 -114
- package/dist/reactions-5N2KSGJ2.js +0 -258
- package/dist/read-only-account-inspect-Y_ijOKJ3.js +0 -9
- package/dist/read-only-account-inspect.telegram-BSjjDWnM.js +0 -202
- package/dist/reasoning-tags-CAmbBXLr.js +0 -77
- package/dist/recovery-key-store-DqgdfMc7.js +0 -283
- package/dist/redact-BDinS1q9.js +0 -102
- package/dist/redact-identifier-S69DDJn1.js +0 -13
- package/dist/redact-sensitive-url-CAJSZ_7g.js +0 -50
- package/dist/redirect-headers-CGxONG_L.js +0 -25
- package/dist/ref-contract-CC5BLDoS.js +0 -53
- package/dist/region-BFGEM88n.js +0 -62
- package/dist/register-lazy-command-D6EEI-zz.js +0 -43
- package/dist/register.agent-D1eKwVU7.js +0 -239
- package/dist/register.backup-S8hwHpZL.js +0 -236
- package/dist/register.configure-CJrQ3u9y.js +0 -15
- package/dist/register.maintenance-BrKWl7_D.js +0 -449
- package/dist/register.message-BCWJfH2h.js +0 -642
- package/dist/register.onboard-zzNq0pJS.js +0 -79
- package/dist/register.setup-BLQwDKzc.js +0 -104
- package/dist/register.status-health-sessions-B4TUEudf.js +0 -1206
- package/dist/register.subclis-B0pG22H2.js +0 -295
- package/dist/register.subclis-BEM0mzJb.js +0 -3
- package/dist/registry-ByjnKj3u.js +0 -219
- package/dist/registry-CuFNdbH5.js +0 -60
- package/dist/registry-DvqOrcbF.js +0 -675
- package/dist/registry-mVzzlPf7.js +0 -50
- package/dist/repair-IMBZnz-L.js +0 -112
- package/dist/replies-BCoZ2HxY.js +0 -118
- package/dist/reply-D8bUQd-Q.js +0 -3176
- package/dist/reply-blocks-CjCUTZru.js +0 -103
- package/dist/reply-chunking-CxFd5izq.js +0 -3
- package/dist/reply-dispatch-runtime-Bk9RDzB9.js +0 -3
- package/dist/reply-history-DtTaPEgt.js +0 -2
- package/dist/reply-payload-CRYI4jIB.js +0 -232
- package/dist/reply-payloads-CQXH7ury.js +0 -116
- package/dist/reply-payloads-dedupe-BKObDjVe.js +0 -135
- package/dist/reply-payloads-dedupe.runtime-SbVNMvEs.js +0 -2
- package/dist/reply-payloads-dedupe.runtime.js +0 -1
- package/dist/reply-prefix-Eema_xXG.js +0 -39
- package/dist/reply-runtime-DUrpJTzu.js +0 -123
- package/dist/reply.runtime-Cdb_6NI1.js +0 -2
- package/dist/reply.runtime.js +0 -1
- package/dist/request-url-B8k-YRRH.js +0 -10
- package/dist/resolve-C3pJ2gj_.js +0 -174
- package/dist/resolve-C_pCWwC0.js +0 -619
- package/dist/resolve-allowlist-HrJ_3icS.js +0 -147
- package/dist/resolve-cbCi7mbs.js +0 -2
- package/dist/resolve-channels-BTyErRev.js +0 -226
- package/dist/resolve-channels-DvV-fUQv.js +0 -263
- package/dist/resolve-configured-secret-input-string-BasQGOd9.js +0 -112
- package/dist/resolve-route-EE8E7OAF.js +0 -486
- package/dist/resolve-system-bin-TC907QYo.js +0 -120
- package/dist/resolve-targets-B1MvBWpT.js +0 -280
- package/dist/resolve-users-BfVoBZG_.js +0 -145
- package/dist/resolve-utils-ClmKSkEQ.js +0 -102
- package/dist/response-generator-ACP21F1j.js +0 -153
- package/dist/response-prefix-template-Cp4tg6Qw.js +0 -50
- package/dist/restart-sentinel-B3EigRIb.js +0 -70
- package/dist/restart-stale-pids-dsB3eE6_.js +0 -187
- package/dist/retry-CIAqcw7C.js +0 -76
- package/dist/retry-policy-BJ5Q68It.js +0 -58
- package/dist/retry-runtime-Cbu5zDnX.js +0 -3
- package/dist/rooms-B1IyUfuR.js +0 -325
- package/dist/root-help-Bwa-vlhy.js +0 -53
- package/dist/route-reply-bC07YRDb.js +0 -133
- package/dist/route-reply.runtime-dS2XMwkv.js +0 -2
- package/dist/route-reply.runtime.js +0 -1
- package/dist/route-resolution-DQHmIfWN.js +0 -461
- package/dist/routes-CWXihJFR.js +0 -6884
- package/dist/routing-BVt9nMN-.js +0 -16
- package/dist/rpc-5eaI-FsF.js +0 -67
- package/dist/rpc-context-Dimdo4io.js +0 -155
- package/dist/run-command-2jxKF1a6.js +0 -32
- package/dist/run-main-BKeNUaXq.js +0 -425
- package/dist/run-with-concurrency-DGLkItan.js +0 -41
- package/dist/runner-COmi-bB0.js +0 -1479
- package/dist/runs-CX-70k4f.js +0 -616
- package/dist/runtime-1phb9iVo.js +0 -6
- package/dist/runtime-B8hqEtu6.js +0 -181
- package/dist/runtime-BpHrcXgA.js +0 -5
- package/dist/runtime-BscSIjIL.js +0 -126
- package/dist/runtime-C8qvwPYG.js +0 -286
- package/dist/runtime-CBX_rq4O.js +0 -18
- package/dist/runtime-CC1YDOst.js +0 -5
- package/dist/runtime-CIE7xJwu.js +0 -5
- package/dist/runtime-CNZi_czi.js +0 -42
- package/dist/runtime-CPw-0dWW.js +0 -5
- package/dist/runtime-DXdxDbJm.js +0 -102
- package/dist/runtime-DofOSZ5U.js +0 -2153
- package/dist/runtime-api-B4Zb5p1_.js +0 -2
- package/dist/runtime-api-BB2RZPnq.js +0 -2
- package/dist/runtime-api-BJnw1_pK.js +0 -2
- package/dist/runtime-api-BTf2rLCn.js +0 -2
- package/dist/runtime-api-BTgAUySz.js +0 -2
- package/dist/runtime-api-BVftCkYc.js +0 -2484
- package/dist/runtime-api-BWaVsvsK.js +0 -14
- package/dist/runtime-api-BXlE282E.js +0 -2
- package/dist/runtime-api-Ba7wWBWO.js +0 -1
- package/dist/runtime-api-BfZqvwkY.js +0 -2
- package/dist/runtime-api-Bja3afzd.js +0 -3676
- package/dist/runtime-api-C7cX3f2r.js +0 -2
- package/dist/runtime-api-CCKblcQO.js +0 -81
- package/dist/runtime-api-CEmQSooZ.js +0 -2
- package/dist/runtime-api-CWQMIahu.js +0 -241
- package/dist/runtime-api-Ch1E1gvT.js +0 -2
- package/dist/runtime-api-CjgyJEjn.js +0 -2
- package/dist/runtime-api-CuqnElJG.js +0 -3
- package/dist/runtime-api-DOyNJNHi.js +0 -2
- package/dist/runtime-api-DUbp7oPz.js +0 -2
- package/dist/runtime-api-DZDDizAj.js +0 -1
- package/dist/runtime-api-DZcQIyI0.js +0 -1
- package/dist/runtime-api-Di-XE7J4.js +0 -3
- package/dist/runtime-api-Dq7rdsm6.js +0 -2
- package/dist/runtime-api-DxO7sIvA.js +0 -120
- package/dist/runtime-api-Dzz1aWyq.js +0 -29
- package/dist/runtime-api-_dg5Me1l.js +0 -2
- package/dist/runtime-config-snapshot-DqWNFIej.js +0 -2
- package/dist/runtime-d8L2hZ57.js +0 -5
- package/dist/runtime-discord-ops.runtime-C2o0995d.js +0 -25
- package/dist/runtime-discord-ops.runtime.js +0 -1
- package/dist/runtime-embedded-pi.runtime-Bk8vHdbc.js +0 -2
- package/dist/runtime-embedded-pi.runtime.js +0 -1
- package/dist/runtime-entry-BypP0hpR.js +0 -4925
- package/dist/runtime-env-SHKgcATc.js +0 -9
- package/dist/runtime-forwarders-ev8FdVyV.js +0 -44
- package/dist/runtime-group-policy-DXJJCWpk.js +0 -1
- package/dist/runtime-group-policy-zTp8fKRK.js +0 -59
- package/dist/runtime-guard-78ESz4Qy.js +0 -70
- package/dist/runtime-kS8e4c6-.js +0 -125
- package/dist/runtime-media-understanding.runtime-CpPWzWdQ.js +0 -2
- package/dist/runtime-media-understanding.runtime.js +0 -1
- package/dist/runtime-model-auth.runtime-1Gsp1j1n.js +0 -2
- package/dist/runtime-model-auth.runtime.js +0 -1
- package/dist/runtime-parse-vvG9x7Ps.js +0 -83
- package/dist/runtime-paths-NiQSNveu.js +0 -305
- package/dist/runtime-plugin-boundary-CzRNh2jW.js +0 -65
- package/dist/runtime-schema-uKXWjWrD.js +0 -14440
- package/dist/runtime-slack-ops.runtime-MQwSRdp3.js +0 -15
- package/dist/runtime-slack-ops.runtime.js +0 -1
- package/dist/runtime-status-2omGgKaM.js +0 -109
- package/dist/runtime-status-Cc383GkB.js +0 -15
- package/dist/runtime-store-CT3yRBe_.js +0 -22
- package/dist/runtime-tts.runtime-DTfPYn3H.js +0 -2
- package/dist/runtime-tts.runtime.js +0 -1
- package/dist/runtime-uvckmk15.js +0 -68
- package/dist/runtime-web-tools-Cf6BXnCm.js +0 -2042
- package/dist/runtime-whatsapp-boundary-Bs8RrKxP.js +0 -139
- package/dist/runtime-whatsapp-boundary-C5mx67ac.js +0 -2
- package/dist/safe-regex-tLlDZYfM.js +0 -244
- package/dist/safe-text-DhIQbZid.js +0 -16
- package/dist/sandbox-DkZ4-LBj.js +0 -4
- package/dist/sandbox-cli-Cho_k3dA.js +0 -443
- package/dist/sandbox-f4-hZNCj.js +0 -2710
- package/dist/sandbox-paths-Br54mtAJ.js +0 -146
- package/dist/sanitize-env-vars-BpNLWkzd.js +0 -82
- package/dist/scan-paths-Bln7l19-.js +0 -28
- package/dist/schema-validator-DofqBvJi.js +0 -176
- package/dist/scoped-expiring-id-cache-C8wyKEV-.js +0 -35
- package/dist/scp-host-B9NPcVwn.js +0 -62
- package/dist/sdk-Ba91_ru8.js +0 -1108
- package/dist/searxng-search-provider-CUEJoeaQ.js +0 -220
- package/dist/secret-equal-fMR1DjSl.js +0 -9
- package/dist/secret-file-BNKBIds0.js +0 -11
- package/dist/secret-file-DwDmPLSX.js +0 -92
- package/dist/secret-input-4MqmO__N.js +0 -13
- package/dist/secret-input-Bqf5ho4v.js +0 -38
- package/dist/secret-input-DyzcNLLY.js +0 -2
- package/dist/secrets-cli-DAP4hi4r.js +0 -2112
- package/dist/secure-random-Diy9rj1m.js +0 -20
- package/dist/security-cli-2WQVKZ3w.js +0 -477
- package/dist/security-runtime-BSQDlFPi.js +0 -55
- package/dist/semver-compare-DkYCMcwG.js +0 -53
- package/dist/send--GwzHbbI.js +0 -100
- package/dist/send-4ZItW1GB.js +0 -3
- package/dist/send-B1YVZR_q.js +0 -1076
- package/dist/send-B6AgLKhw.js +0 -178
- package/dist/send-CAosrV3E.js +0 -2
- package/dist/send-CTHiX-WN.js +0 -442
- package/dist/send-CywIIzow.js +0 -318
- package/dist/send-DZ2VaVTD.js +0 -856
- package/dist/send-deps-Cuc-dTy5.js +0 -19
- package/dist/send-policy-Dz5lteoO.js +0 -60
- package/dist/send-q09VUMe3.js +0 -532
- package/dist/send.components-Cbi5ixnJ.js +0 -844
- package/dist/send.components-dLe6ppiS.js +0 -2
- package/dist/server-BRW1HQ2M.js +0 -67
- package/dist/server-Clq20rV8.js +0 -27990
- package/dist/server-middleware-Ubw3OFd1.js +0 -108
- package/dist/server-node-events-kgWhdE2I.js +0 -454
- package/dist/server-startup-matrix-migration-DJZgJiUa.js +0 -1348
- package/dist/service-2O78fADl.js +0 -867
- package/dist/service-BCUDr0mF.js +0 -2
- package/dist/session-BIwHn1FL.js +0 -137
- package/dist/session-BJudz6Rb.js +0 -50
- package/dist/session-archive.runtime-8FrIp7MP.js +0 -2
- package/dist/session-archive.runtime.js +0 -1
- package/dist/session-binding-service-D7bUc7mS.js +0 -421
- package/dist/session-context-DbS6R7x0.js +0 -23
- package/dist/session-conversation-5Z-WApq_.js +0 -15
- package/dist/session-conversation-BC-SPGma.js +0 -135
- package/dist/session-conversation-D-Olnomz.js +0 -27
- package/dist/session-cost-usage-5iS5N1Rs.js +0 -651
- package/dist/session-cost-usage-ibiGeH7Z.js +0 -2
- package/dist/session-envelope-RE_1D3fZ.js +0 -18
- package/dist/session-errors-CoC2qhLC.js +0 -63
- package/dist/session-file-CnTnoAyl.js +0 -120
- package/dist/session-fork.runtime-Bb9nNLwX.js +0 -50
- package/dist/session-fork.runtime.js +0 -1
- package/dist/session-hooks-D4zcaOKV.js +0 -109
- package/dist/session-key-CQMUjsSp.js +0 -52
- package/dist/session-key-Do__tq1E.js +0 -279
- package/dist/session-key-normalization-BamCBtxj.js +0 -22
- package/dist/session-override-CHm5auQy.js +0 -100
- package/dist/session-reset-model.runtime-DD5SooaH.js +0 -119
- package/dist/session-reset-model.runtime.js +0 -1
- package/dist/session-route-O1Pb7Oid.js +0 -91
- package/dist/session-store-runtime-ePmbOWO1.js +0 -2
- package/dist/session-subagent-reactivation.runtime-BwUDVflj.js +0 -2
- package/dist/session-subagent-reactivation.runtime.js +0 -1
- package/dist/session-transcript-files.fs-CyBs2u56.js +0 -149
- package/dist/session-updates-C33bkLCm.js +0 -222
- package/dist/session-updates.runtime-BHLQJ71D.js +0 -2
- package/dist/session-updates.runtime.js +0 -1
- package/dist/session-utils-C0HJP9m_.js +0 -1743
- package/dist/session-write-lock-C7svKLqX.js +0 -343
- package/dist/sessions-CkaONOVi.js +0 -224
- package/dist/sessions-Dqj9fL_x.js +0 -2
- package/dist/sessions-j2hbBGOS.js +0 -443
- package/dist/setup-0GrDtpRN.js +0 -427
- package/dist/setup-BrOJEPVN.js +0 -15
- package/dist/setup-adapter-runtime-CyIIvoms.js +0 -2
- package/dist/setup-api-1P88M5pV.js +0 -2
- package/dist/setup-binary-CXmsVXWb.js +0 -2
- package/dist/setup-bootstrap-QdrIAyis.js +0 -54
- package/dist/setup-core-BqPbreVF.js +0 -256
- package/dist/setup-core-CFzSqpD7.js +0 -256
- package/dist/setup-core-DJHWTJKX.js +0 -383
- package/dist/setup-core-DT1fK9yD.js +0 -146
- package/dist/setup-core-kjYyNYvv.js +0 -48
- package/dist/setup-core-t03VZdcn.js +0 -160
- package/dist/setup-group-access-BQbnTk8B.js +0 -70
- package/dist/setup-helpers-0yWIq2cW.js +0 -390
- package/dist/setup-runtime-BChXvJOO.js +0 -4
- package/dist/setup-surface-B8loJ-nJ.js +0 -272
- package/dist/setup-surface-BKizDP2g.js +0 -237
- package/dist/setup-surface-BOd4V0w5.js +0 -261
- package/dist/setup-surface-BaLQtvFW.js +0 -353
- package/dist/setup-surface-Bha7U86Z.js +0 -72
- package/dist/setup-surface-BkHkduRm.js +0 -450
- package/dist/setup-surface-CDfudYpT2.js +0 -261
- package/dist/setup-surface-CT-Erp53.js +0 -346
- package/dist/setup-surface-Co1jSLDk.js +0 -656
- package/dist/setup-surface-D0joW4q1.js +0 -333
- package/dist/setup-surface-D9rWJb4Z.js +0 -1447
- package/dist/setup-surface-D_CJfyJ1.js +0 -381
- package/dist/setup-surface-DbVJ8CAj.js +0 -484
- package/dist/setup-surface-Di1q12ha.js +0 -97
- package/dist/setup-surface-LWupQ_eL.js +0 -304
- package/dist/setup-tools-Cb6PLN3L.js +0 -4
- package/dist/setup-wizard-helpers-CA5yiprq.js +0 -841
- package/dist/setup-wizard-proxy-bmMo6OPA.js +0 -127
- package/dist/setup.finalize-DvGlwfbU.js +0 -443
- package/dist/setup.gateway-config-D_eSo_Jz.js +0 -246
- package/dist/setup.secret-input-BAQnay16.js +0 -25
- package/dist/shared-1nXP7RAM.js +0 -78
- package/dist/shared-6u4-kP5J.js +0 -221
- package/dist/shared-BnSR7joQ.js +0 -144
- package/dist/shared-BsLpgVLV.js +0 -37
- package/dist/shared-C-PSF7Rv.js +0 -64
- package/dist/shared-C1MrVu4M.js +0 -180
- package/dist/shared-CA8QQ_O5.js +0 -94
- package/dist/shared-CCV62W5K.js +0 -2
- package/dist/shared-CHJjz6Zz.js +0 -72
- package/dist/shared-CK49TKED.js +0 -50
- package/dist/shared-CL7I4ij0.js +0 -160
- package/dist/shared-Cr7ijuS4.js +0 -198
- package/dist/shared-D61IX915.js +0 -10
- package/dist/shared-Dr9OQu4c.js +0 -64
- package/dist/shared-DwxV-O-g.js +0 -136
- package/dist/shared-dWHdeoyy.js +0 -126
- package/dist/shared-runtime-yV5uP0IO.js +0 -7
- package/dist/shell-argv-B9p91CMW.js +0 -72
- package/dist/shell-env-BTztt4a1.js +0 -181
- package/dist/signal-B1kD3iF3.js +0 -46
- package/dist/signal-DP8FUJOa.js +0 -6
- package/dist/signal-Dvmeol77.js +0 -13
- package/dist/signal-account-CYKnyxZK.js +0 -11
- package/dist/signal-cli-install-DcmsRDbB.js +0 -188
- package/dist/signal-surface-AbofIH7s.js +0 -21
- package/dist/simple-completion-transport-Dl5DzRWP.js +0 -24
- package/dist/skill-commands-CH4lfyW8.js +0 -77
- package/dist/skill-commands-base-CvVjZByy.js +0 -60
- package/dist/skill-commands-runtime-zpWkVBay.js +0 -2
- package/dist/skill-commands.runtime-BKa5oyH-.js +0 -2
- package/dist/skill-commands.runtime.js +0 -1
- package/dist/skill-scanner-bqroDZTs.js +0 -354
- package/dist/skills-D0K7gu2V.js +0 -972
- package/dist/skills-DFTLIGCd.js +0 -4
- package/dist/skills-clawhub-KJGw0uGT.js +0 -274
- package/dist/skills-cli-DziAPxba.js +0 -369
- package/dist/skills-install-CQeO3Sll.js +0 -819
- package/dist/skills-remote-BojLLDxp.js +0 -584
- package/dist/skills-status-BINZ_svK.js +0 -2
- package/dist/skills-status-CdQUttuP.js +0 -170
- package/dist/slack-BuMSbx3k.js +0 -6
- package/dist/slack-DMg3O5YT.js +0 -9
- package/dist/slack-account-LEbfbXys.js +0 -11
- package/dist/slack-core-oqCiyGw8.js +0 -4
- package/dist/slack-runtime-surface-CyaeT7yk.js +0 -18
- package/dist/slack-surface-1yTIS5Q8.js +0 -44
- package/dist/slack-target-parser-CruIJ5w5.js +0 -12
- package/dist/slack-targets-ukxuKR1I.js +0 -45
- package/dist/slash-commands-CRuXC74L.js +0 -672
- package/dist/slash-commands.runtime-F6b9KUnh.js +0 -20
- package/dist/slash-commands.runtime.js +0 -1
- package/dist/slash-dispatch.runtime-CItGyoBF.js +0 -38
- package/dist/slash-dispatch.runtime.js +0 -1
- package/dist/slash-skill-commands.runtime-Caw0oNvV.js +0 -8
- package/dist/slash-skill-commands.runtime.js +0 -1
- package/dist/slots-Dq-2eIRb.js +0 -93
- package/dist/speech-Ceb4ISD4.js +0 -46
- package/dist/speech-provider-BHjDbut-.js +0 -190
- package/dist/speech-provider-D45m9grJ.js +0 -154
- package/dist/speech-provider-DM1ZXsz2.js +0 -385
- package/dist/speech-runtime-CNvOkPw4.js +0 -34
- package/dist/src-Dn1TYXp6.js +0 -2739
- package/dist/ssh-config-C1ipLHgq.js +0 -77
- package/dist/ssh-tunnel-BwMCLc2e.js +0 -159
- package/dist/ssh-tunnel-D5YdH2SQ.js +0 -2
- package/dist/ssrf-Duye12M_.js +0 -246
- package/dist/ssrf-policy-5L7qS2kK.js +0 -69
- package/dist/ssrf-runtime-bpDM5Bgo.js +0 -5
- package/dist/stable-node-path-n7TARbHZ.js +0 -32
- package/dist/stage-sandbox-media.runtime-Tlgx4F6M.js +0 -229
- package/dist/stage-sandbox-media.runtime.js +0 -1
- package/dist/stagger-Cs-6sySM.js +0 -54
- package/dist/startup-verification-DS8Rlwfj.js +0 -131
- package/dist/state-migrations-ssGF0Trg.js +0 -845
- package/dist/state-paths-LoYjHd5L.js +0 -2
- package/dist/status-B7yRr4OV.js +0 -3
- package/dist/status-BM1Lyqo6.js +0 -261
- package/dist/status-BekOC_tW.js +0 -650
- package/dist/status-CxodlqzZ.js +0 -2
- package/dist/status-DHbl5eIj.js +0 -608
- package/dist/status-PsQV2sfU.js +0 -44
- package/dist/status-all-C53a3881.js +0 -798
- package/dist/status-helpers-CCJSSrVJ.js +0 -170
- package/dist/status-issues-M-RUxHvm.js +0 -336
- package/dist/status-issues-qWKbW6r2.js +0 -187
- package/dist/status-json-B66tF12J.js +0 -86
- package/dist/status.agent-local-B8Sw_p6M.js +0 -59
- package/dist/status.command.text-runtime-csZS5yHm.js +0 -18
- package/dist/status.daemon-D0GzvHft.js +0 -25
- package/dist/status.format-C1VNrTBi.js +0 -44
- package/dist/status.gateway-probe-4INUEsUo.js +0 -15
- package/dist/status.link-channel-CJtR5UX6.js +0 -35
- package/dist/status.node-mode-Bva3wbBI.js +0 -2
- package/dist/status.node-mode-CneoXHPW.js +0 -32
- package/dist/status.scan-t1kfm4e0.js +0 -264
- package/dist/status.scan.deps.runtime-CCaTJlzV.js +0 -18
- package/dist/status.scan.deps.runtime.js +0 -1
- package/dist/status.scan.fast-json-DmzN3HuU.js +0 -97
- package/dist/status.scan.fast-json-gu6uL_BR.js +0 -2
- package/dist/status.scan.json-core-JjMIy9YZ.js +0 -254
- package/dist/status.scan.runtime-r_5mTC8f.js +0 -9
- package/dist/status.scan.runtime.js +0 -1
- package/dist/status.service-summary-DnbDBXMs.js +0 -32
- package/dist/status.summary-CbEhZE0h.js +0 -210
- package/dist/status.summary-SLm6uT22.js +0 -2
- package/dist/status.update-Bw9CvcCc.js +0 -2
- package/dist/status.update-CLnevxJb.js +0 -79
- package/dist/sticker-cache-C_FrWgaA.js +0 -1573
- package/dist/sticker-vision.runtime-DR7e08nD.js +0 -16
- package/dist/sticker-vision.runtime.js +0 -1
- package/dist/storage-CPQLpmgN.js +0 -234
- package/dist/storage-paths-DvC4vQo1.js +0 -51
- package/dist/store-8ONMiMTI.js +0 -365
- package/dist/store-DQJZr0Yf.js +0 -767
- package/dist/store-Dxcm2vsw.js +0 -140
- package/dist/store-_OZh8RrM.js +0 -1343
- package/dist/store-read-JHUhrL0Z.js +0 -16
- package/dist/store.runtime-Dmqv-8M7.js +0 -2
- package/dist/store.runtime.js +0 -1
- package/dist/stream-CGrFe0j0.js +0 -123
- package/dist/stream-D9HOuZmn.js +0 -633
- package/dist/stream-Di_JOWoE.js +0 -180
- package/dist/stream-wrappers-D-DlMIYG.js +0 -136
- package/dist/string-normalization-Ddc4JXRe.js +0 -19
- package/dist/string-normalization-runtime-CCsvs1ds.js +0 -1
- package/dist/string-sample-BIWt11jp.js +0 -11
- package/dist/strip-inbound-meta-DvHTlpJG.js +0 -155
- package/dist/subagent-orphan-recovery-Do8Az2RD.js +0 -206
- package/dist/subagent-registry-runtime-D5PNyCsh.js +0 -2
- package/dist/subcli-descriptors-Dasenv4J.js +0 -151
- package/dist/subsystem-C9VSlEcV.js +0 -582
- package/dist/supervisor-log.runtime-CZe76kAj.js +0 -8
- package/dist/supervisor-log.runtime.js +0 -1
- package/dist/system-cli-2-HDh_Ev.js +0 -58
- package/dist/system-events-5SDw3lix.js +0 -93
- package/dist/system-events-BuGmSpuG.js +0 -34
- package/dist/system-message-0oem5MWV.js +0 -16
- package/dist/system-run-command-BmlO5dn2.js +0 -301
- package/dist/systemd-B2HBHMpF.js +0 -588
- package/dist/systemd-hints-DkRlAuPR.js +0 -325
- package/dist/systemd-linger-BBPBJSm0.js +0 -68
- package/dist/systemd-linger-DiWO9n2E.js +0 -2
- package/dist/table-CY2XIg3l.js +0 -305
- package/dist/tables-D6qL6k4d.js +0 -832
- package/dist/tailnet-CZMxMuGK.js +0 -76
- package/dist/tailscale-mpS_cTve.js +0 -238
- package/dist/tailscale-status-Dg2Iov5f.js +0 -71
- package/dist/target-errors-ThNFqo8X.js +0 -26
- package/dist/target-ids-O3O6piTN.js +0 -76
- package/dist/target-parsing-Boyj_2v0.js +0 -41
- package/dist/target-registry-BHJcVSo1.js +0 -1269
- package/dist/targets-C7I_wjs2.js +0 -283
- package/dist/targets-CZA632lq.js +0 -39
- package/dist/targets-Dz1dx4G8.js +0 -78
- package/dist/targets-Zd0-pJu7.js +0 -748
- package/dist/targets-krmeAAxz.js +0 -70
- package/dist/task-registry-delivery-runtime-BnkUa6Mp.js +0 -2
- package/dist/task-registry.audit-DbCRt5MR.js +0 -320
- package/dist/task-registry.audit.shared-SH4MOLKM.js +0 -18
- package/dist/task-registry.maintenance-DfZmDWog.js +0 -2
- package/dist/task-registry.summary-SoFiECCc.js +0 -44
- package/dist/tavily-search-provider-BCY1kfQB.js +0 -227
- package/dist/telegram/audit.js +0 -2
- package/dist/telegram/token.js +0 -2
- package/dist/telegram-Cq20PSxw.js +0 -23
- package/dist/telegram-account-vRRwyfuA.js +0 -11
- package/dist/telegram-command-config-BiHhXScJ.js +0 -1
- package/dist/telegram-core-DTJayyAj.js +0 -6
- package/dist/telegram-custom-commands-C-nv8yoB.js +0 -75
- package/dist/temp-download-Ccatr7zI.js +0 -62
- package/dist/temp-path-JU2kkd64.js +0 -2
- package/dist/templating-Bu436Euy.js +0 -24
- package/dist/testing-BrrgubIp.js +0 -690
- package/dist/text-chunking-BTs2yTSd.js +0 -12
- package/dist/text-chunking-ByXwyFNP.js +0 -20
- package/dist/text-format-lEYRGxj5.js +0 -8
- package/dist/text-runtime-D9ApM_8O.js +0 -398
- package/dist/theme-Bb-qluq6.js +0 -2
- package/dist/theme-wBMZmJzz.js +0 -34
- package/dist/thinking-Dga2zdtd.js +0 -68
- package/dist/thinking.shared-D6IkoLJU.js +0 -243
- package/dist/thread-bindings-BMnz7w-V.js +0 -219
- package/dist/thread-bindings-BbQWOcMr.js +0 -352
- package/dist/thread-bindings-Bv0I9sBY.js +0 -534
- package/dist/thread-bindings-C3jMrVvp.js +0 -778
- package/dist/thread-bindings-policy-Br8s4hQ6.js +0 -172
- package/dist/thread-bindings-runtime-CbG63N4N.js +0 -2
- package/dist/thread-bindings-shared-DjSYaoHi.js +0 -95
- package/dist/thread-bindings.discord-api-NFR5qsWt.js +0 -487
- package/dist/thread-ownership-DG810AQi.js +0 -3
- package/dist/threading-1Z_3y_Dp.js +0 -2
- package/dist/threading-Hl8nWez6.js +0 -832
- package/dist/threading-helpers-BpqyeyAU.js +0 -14
- package/dist/threading-tool-context-DxV30qIW.js +0 -157
- package/dist/timeouts-B1NiHSGi.js +0 -74
- package/dist/tlon-C54Qojl0.js +0 -20
- package/dist/tmp-openclaw-dir-B44_vmJv.js +0 -102
- package/dist/token-BlUJQi_X.js +0 -2
- package/dist/token-CDYFJvj8.js +0 -82
- package/dist/token-kCjtGElJ.js +0 -45
- package/dist/tokens-C2f9Klbt.js +0 -66
- package/dist/tool-actions.runtime-aB0DgLk7.js +0 -532
- package/dist/tool-actions.runtime.js +0 -1
- package/dist/tool-display-C7h9IZa_.js +0 -1607
- package/dist/tool-images-BDUvc_pd.js +0 -270
- package/dist/tool-mutation-DIBpIegg.js +0 -140
- package/dist/tool-policy-FUm_F19C.js +0 -515
- package/dist/tool-policy-match-CCFHTsu9.js +0 -49
- package/dist/tool-send-DClM4vsZ.js +0 -16
- package/dist/tools-54j1hYBv.js +0 -123
- package/dist/tools-effective-inventory-C09suj6-.js +0 -148
- package/dist/tools.runtime-VBFxIXC8.js +0 -4
- package/dist/tools.runtime.js +0 -1
- package/dist/transcript-events-Dc7U5QmQ.js +0 -29
- package/dist/transport-ready-Cje3USX4.js +0 -36
- package/dist/tts-CTM9C09A.js +0 -2
- package/dist/tts-Ck_K3tIi.js +0 -84
- package/dist/tts-auto-mode-bD-u2biE.js +0 -14
- package/dist/tts-bTuorllO.js +0 -102
- package/dist/tts-eOLiJF6d.js +0 -29
- package/dist/tts.runtime-ChTwy0yH.js +0 -3
- package/dist/tts.runtime.js +0 -1
- package/dist/tui-CrM-Bz3i.js +0 -3899
- package/dist/tui-cli-aVL5aPGw.js +0 -31
- package/dist/twitch-CFFlkhYG.js +0 -15
- package/dist/typebox-DmerPHaM.js +0 -22
- package/dist/types-BzNSmNk3.js +0 -12
- package/dist/types-DAzqpvqD.js +0 -83
- package/dist/types-DVJVELY7.js +0 -471
- package/dist/types-DqNppUoh.js +0 -15
- package/dist/types.secrets-BpcqHPAv.js +0 -80
- package/dist/types.tools-BTQL6INB.js +0 -22
- package/dist/typing-BnCchGtL.js +0 -8
- package/dist/typing-Bugg5LPP.js +0 -68
- package/dist/typing-J_ktpWeA.js +0 -2
- package/dist/typing-mode-DDYL_0TG.js +0 -75
- package/dist/typing-policy-CaZhrM-F.js +0 -11
- package/dist/typing-start-guard-Cgjgzy5e.js +0 -73
- package/dist/ui-BLDY9-7R.js +0 -212
- package/dist/undici-global-dispatcher-CcNdQ7Dt.js +0 -99
- package/dist/unhandled-rejections-CA_e1R-O.js +0 -2
- package/dist/unhandled-rejections-V7U9keRG.js +0 -241
- package/dist/update-CcALvtl_.js +0 -1253
- package/dist/update-channels-Dn1F57Kf.js +0 -78
- package/dist/update-check-CoDVxy35.js +0 -354
- package/dist/update-cli-BWOYy_Mp.js +0 -1447
- package/dist/update-offset-store-BLZmshZE.js +0 -75
- package/dist/usage-CC7-wLUi.js +0 -39
- package/dist/usage-format-C7nMV1jc.js +0 -513
- package/dist/utils-CN_F_3Qg.js +0 -243
- package/dist/utils-Cgw9Y0-Q.js +0 -2
- package/dist/validation-BNNAUmDO.js +0 -18521
- package/dist/verification-B4ogZ29M.js +0 -130
- package/dist/verification-B99uVIxo.js +0 -2
- package/dist/version-BNzJ37Re.js +0 -79
- package/dist/version-Dw0eJ-1F.js +0 -2
- package/dist/voice-call-Dt6m6oA3.js +0 -4
- package/dist/wait-YXJvtMmp.js +0 -7
- package/dist/warning-filter-GX8LpGKz.js +0 -57
- package/dist/web-fetch-utils-CoVia2ez.js +0 -413
- package/dist/web-media-D9opLz21.js +0 -2
- package/dist/web-media-DHlguFej.js +0 -339
- package/dist/web-search-BcSDWJK9.js +0 -169
- package/dist/web-search-providers-CqY6CVp3.js +0 -21
- package/dist/web-search-providers.runtime-BHjzPQW-.js +0 -113
- package/dist/web-search-providers.runtime.js +0 -1
- package/dist/web-search-providers.shared-CMeQec8y.js +0 -421
- package/dist/web-search-shared-B5mHm7QD.js +0 -87
- package/dist/webhook-ingress-CTl81NUR.js +0 -164
- package/dist/webhook-memory-guards-B6k3g-po.js +0 -129
- package/dist/webhook-path-CklCw5kp.js +0 -22
- package/dist/webhook-request-guards-CxDPmU9e.js +0 -178
- package/dist/webhook-shared-Bw9wLe6L.js +0 -370
- package/dist/webhooks-cli-DPRITERU.js +0 -326
- package/dist/whatsapp-CSzf1Nu0.js +0 -5
- package/dist/whatsapp-D18Otn45.js +0 -30
- package/dist/whatsapp-auth-presence-B5GZUgTA.js +0 -41
- package/dist/whatsapp-core-Be0P_p4R.js +0 -7
- package/dist/whatsapp-heartbeat-a2-OB01n.js +0 -85
- package/dist/whatsapp-shared-ChjLiMDw.js +0 -56
- package/dist/whatsapp-shared-FR_Jw-NH.js +0 -4
- package/dist/whatsapp-surface-Dwrfi_SD.js +0 -26
- package/dist/whatsapp-targets-59A3BDBi.js +0 -13
- package/dist/widearea-dns-CfQt6b3q.js +0 -125
- package/dist/windows-argv-DDAf3waz.js +0 -345
- package/dist/windows-install-roots-XI3CvO9O.js +0 -149
- package/dist/windows-spawn-DKvkg_66.js +0 -154
- package/dist/with-timeout-B2smrGj0.js +0 -214
- package/dist/with-timeout-BmJKiOMd.js +0 -13
- package/dist/workflow-summary-BMvffn8D.js +0 -2
- package/dist/workflow-summary-NvN5lUvK.js +0 -167
- package/dist/workspace-D5P9nuJd.js +0 -479
- package/dist/workspace-D5UiPYKk.js +0 -306
- package/dist/workspace-dirs-CRv8Jwfz.js +0 -13
- package/dist/ws-97FEIc7w.js +0 -11
- package/dist/ws-log-BaAOgG9m.js +0 -281
- package/dist/ws-logging-M92fgmyp.js +0 -10
- package/dist/wsl-ytdRZp54.js +0 -57
- package/dist/x-search-FsMNZ7d0.js +0 -166
- package/dist/x-search-shared-D0tVMJk9.js +0 -124
- package/dist/zalo-CNoa7XH7.js +0 -13
- package/dist/zalo-js-HktBGDbg.js +0 -1156
- package/dist/zalo-setup-BT-xGElf.js +0 -14
- package/dist/zalouser-TwyfhIYz.js +0 -22
- package/dist/zod-1Wegy5nx.js +0 -7
- package/dist/zod-parse-HlGwTZP3.js +0 -14
- package/dist/zod-schema.agent-runtime-DFC7a3eV.js +0 -602
- package/dist/zod-schema.core-C1Ewlj9j.js +0 -520
- package/dist/zod-schema.providers-core-Bmbs-R4l.js +0 -1541
- package/dist/zod-schema.providers-whatsapp-CanJPkvb.js +0 -132
- package/dist/zod-schema.sensitive-DEzKzMxI.js +0 -5
package/dist/manager-c_fEco8X.js
DELETED
|
@@ -1,2773 +0,0 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-C9VSlEcV.js";
|
|
2
|
-
import { n as resolveGlobalSingleton } from "./global-singleton-54zT3rCn.js";
|
|
3
|
-
import { T as truncateUtf16Safe, v as resolveUserPath } from "./utils-CN_F_3Qg.js";
|
|
4
|
-
import { a as resolveAgentDir, p as resolveAgentWorkspaceDir } from "./agent-scope-rWWUivuC.js";
|
|
5
|
-
import { c as resolveSessionTranscriptsDirForAgent } from "./paths-xpks599B.js";
|
|
6
|
-
import { n as onSessionTranscriptUpdate } from "./transcript-events-Dc7U5QmQ.js";
|
|
7
|
-
import { r as listMemoryEmbeddingProviders, t as getMemoryEmbeddingProvider } from "./memory-embedding-providers-BOMS0u3X.js";
|
|
8
|
-
import { n as getProviderEnvVars } from "./provider-env-vars-4Bon7Y2X.js";
|
|
9
|
-
import { i as getMemoryMultimodalExtensions, r as classifyMemoryMultimodalPath, t as buildCaseInsensitiveExtensionGlob } from "./multimodal-DoXQtvBl.js";
|
|
10
|
-
import { t as resolveMemorySearchConfig } from "./memory-search-DpAYXyjc.js";
|
|
11
|
-
import { t as extractKeywords } from "./query-expansion-85HlYbKD.js";
|
|
12
|
-
import { l as createOllamaEmbeddingProvider, t as DEFAULT_OLLAMA_EMBEDDING_MODEL } from "./ollama-EE_SvO8P.js";
|
|
13
|
-
import { _ as estimateUtf8Bytes, a as ensureDir, c as listMemoryFiles, d as remapChunkLines, f as runWithConcurrency, g as estimateStructuredEmbeddingInputBytes, h as hasNonTextEmbeddingParts, i as cosineSimilarity, l as normalizeExtraMemoryPaths, n as buildMultimodalChunkForIndexing, o as hashText, p as isFileMissingError, r as chunkMarkdown, t as buildFileEntry, u as parseEmbedding } from "./internal-Lk0wFTNq.js";
|
|
14
|
-
import { r as readMemoryFile } from "./backend-config-CNAjcjho.js";
|
|
15
|
-
import { a as runGeminiEmbeddingBatches, c as DEFAULT_VOYAGE_EMBEDDING_MODEL, d as createOpenAiEmbeddingProvider, f as DEFAULT_MISTRAL_EMBEDDING_MODEL, g as createGeminiEmbeddingProvider, h as buildGeminiEmbeddingRequest, i as runOpenAiEmbeddingBatches, l as createVoyageEmbeddingProvider, m as DEFAULT_GEMINI_EMBEDDING_MODEL, n as runVoyageEmbeddingBatches, o as DEFAULT_LOCAL_MODEL, p as createMistralEmbeddingProvider, r as OPENAI_BATCH_ENDPOINT, s as createLocalEmbeddingProvider, t as enforceEmbeddingMaxInputTokens, u as DEFAULT_OPENAI_EMBEDDING_MODEL } from "./memory-core-host-engine-embeddings-BhsmnP-6.js";
|
|
16
|
-
import "./memory-core-host-engine-foundation-CtFD8jpc.js";
|
|
17
|
-
import { c as buildSessionEntry, l as listSessionFilesForAgent, u as sessionPathForFile } from "./memory-core-host-engine-qmd-DCvmid82.js";
|
|
18
|
-
import { n as loadSqliteVecExtension, r as ensureMemoryIndexSchema, t as requireNodeSqlite } from "./memory-core-host-engine-storage-N3YflxjF.js";
|
|
19
|
-
import "./provider-env-vars-Np7qkDjC.js";
|
|
20
|
-
import fsSync from "node:fs";
|
|
21
|
-
import path from "node:path";
|
|
22
|
-
import fs from "node:fs/promises";
|
|
23
|
-
import { randomUUID } from "node:crypto";
|
|
24
|
-
import chokidar from "chokidar";
|
|
25
|
-
//#region extensions/memory-core/src/memory/provider-adapters.ts
|
|
26
|
-
function formatErrorMessage$1(err) {
|
|
27
|
-
return err instanceof Error ? err.message : String(err);
|
|
28
|
-
}
|
|
29
|
-
function isMissingApiKeyError(err) {
|
|
30
|
-
return formatErrorMessage$1(err).includes("No API key found for provider");
|
|
31
|
-
}
|
|
32
|
-
function sanitizeHeaders(headers, excludedHeaderNames) {
|
|
33
|
-
const excluded = new Set(excludedHeaderNames.map((name) => name.toLowerCase()));
|
|
34
|
-
return Object.entries(headers).filter(([key]) => !excluded.has(key.toLowerCase())).toSorted(([a], [b]) => a.localeCompare(b)).map(([key, value]) => [key, value]);
|
|
35
|
-
}
|
|
36
|
-
function mapBatchEmbeddingsByIndex(byCustomId, count) {
|
|
37
|
-
const embeddings = [];
|
|
38
|
-
for (let index = 0; index < count; index += 1) embeddings.push(byCustomId.get(String(index)) ?? []);
|
|
39
|
-
return embeddings;
|
|
40
|
-
}
|
|
41
|
-
function isNodeLlamaCppMissing(err) {
|
|
42
|
-
if (!(err instanceof Error)) return false;
|
|
43
|
-
return err.code === "ERR_MODULE_NOT_FOUND" && err.message.includes("node-llama-cpp");
|
|
44
|
-
}
|
|
45
|
-
function formatLocalSetupError(err) {
|
|
46
|
-
const detail = formatErrorMessage$1(err);
|
|
47
|
-
const missing = isNodeLlamaCppMissing(err);
|
|
48
|
-
return [
|
|
49
|
-
"Local embeddings unavailable.",
|
|
50
|
-
missing ? "Reason: optional dependency node-llama-cpp is missing (or failed to install)." : detail ? `Reason: ${detail}` : void 0,
|
|
51
|
-
missing && detail ? `Detail: ${detail}` : null,
|
|
52
|
-
"To enable local embeddings:",
|
|
53
|
-
"1) Use Node 24 (recommended for installs/updates; Node 22 LTS, currently 22.14+, remains supported)",
|
|
54
|
-
missing ? "2) Reinstall OpenClaw (this should install node-llama-cpp): npm i -g openclaw@latest" : null,
|
|
55
|
-
"3) If you use pnpm: pnpm approve-builds (select node-llama-cpp), then pnpm rebuild node-llama-cpp",
|
|
56
|
-
...[
|
|
57
|
-
"openai",
|
|
58
|
-
"gemini",
|
|
59
|
-
"voyage",
|
|
60
|
-
"mistral"
|
|
61
|
-
].map((provider) => `Or set agents.defaults.memorySearch.provider = "${provider}" (remote).`)
|
|
62
|
-
].filter(Boolean).join("\n");
|
|
63
|
-
}
|
|
64
|
-
function canAutoSelectLocal(modelPath) {
|
|
65
|
-
const trimmed = modelPath?.trim();
|
|
66
|
-
if (!trimmed) return false;
|
|
67
|
-
if (/^(hf:|https?:)/i.test(trimmed)) return false;
|
|
68
|
-
const resolved = resolveUserPath(trimmed);
|
|
69
|
-
try {
|
|
70
|
-
return fsSync.statSync(resolved).isFile();
|
|
71
|
-
} catch {
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function supportsGeminiMultimodalEmbeddings(model) {
|
|
76
|
-
return model.trim().replace(/^models\//, "").replace(/^(gemini|google)\//, "") === "gemini-embedding-2-preview";
|
|
77
|
-
}
|
|
78
|
-
function resolveMemoryEmbeddingAuthProviderId(providerId) {
|
|
79
|
-
return providerId === "gemini" ? "google" : providerId;
|
|
80
|
-
}
|
|
81
|
-
const builtinMemoryEmbeddingProviderAdapters = [
|
|
82
|
-
{
|
|
83
|
-
id: "local",
|
|
84
|
-
defaultModel: DEFAULT_LOCAL_MODEL,
|
|
85
|
-
transport: "local",
|
|
86
|
-
autoSelectPriority: 10,
|
|
87
|
-
formatSetupError: formatLocalSetupError,
|
|
88
|
-
shouldContinueAutoSelection: () => true,
|
|
89
|
-
create: async (options) => {
|
|
90
|
-
const provider = await createLocalEmbeddingProvider({
|
|
91
|
-
...options,
|
|
92
|
-
provider: "local",
|
|
93
|
-
fallback: "none"
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
provider,
|
|
97
|
-
runtime: {
|
|
98
|
-
id: "local",
|
|
99
|
-
cacheKeyData: {
|
|
100
|
-
provider: "local",
|
|
101
|
-
model: provider.model
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id: "openai",
|
|
109
|
-
defaultModel: DEFAULT_OPENAI_EMBEDDING_MODEL,
|
|
110
|
-
transport: "remote",
|
|
111
|
-
autoSelectPriority: 20,
|
|
112
|
-
allowExplicitWhenConfiguredAuto: true,
|
|
113
|
-
shouldContinueAutoSelection: isMissingApiKeyError,
|
|
114
|
-
create: async (options) => {
|
|
115
|
-
const { provider, client } = await createOpenAiEmbeddingProvider({
|
|
116
|
-
...options,
|
|
117
|
-
provider: "openai",
|
|
118
|
-
fallback: "none"
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
provider,
|
|
122
|
-
runtime: {
|
|
123
|
-
id: "openai",
|
|
124
|
-
cacheKeyData: {
|
|
125
|
-
provider: "openai",
|
|
126
|
-
baseUrl: client.baseUrl,
|
|
127
|
-
model: client.model,
|
|
128
|
-
headers: sanitizeHeaders(client.headers, ["authorization"])
|
|
129
|
-
},
|
|
130
|
-
batchEmbed: async (batch) => {
|
|
131
|
-
return mapBatchEmbeddingsByIndex(await runOpenAiEmbeddingBatches({
|
|
132
|
-
openAi: client,
|
|
133
|
-
agentId: batch.agentId,
|
|
134
|
-
requests: batch.chunks.map((chunk, index) => ({
|
|
135
|
-
custom_id: String(index),
|
|
136
|
-
method: "POST",
|
|
137
|
-
url: OPENAI_BATCH_ENDPOINT,
|
|
138
|
-
body: {
|
|
139
|
-
model: client.model,
|
|
140
|
-
input: chunk.text
|
|
141
|
-
}
|
|
142
|
-
})),
|
|
143
|
-
wait: batch.wait,
|
|
144
|
-
concurrency: batch.concurrency,
|
|
145
|
-
pollIntervalMs: batch.pollIntervalMs,
|
|
146
|
-
timeoutMs: batch.timeoutMs,
|
|
147
|
-
debug: batch.debug
|
|
148
|
-
}), batch.chunks.length);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
id: "gemini",
|
|
156
|
-
defaultModel: DEFAULT_GEMINI_EMBEDDING_MODEL,
|
|
157
|
-
transport: "remote",
|
|
158
|
-
autoSelectPriority: 30,
|
|
159
|
-
allowExplicitWhenConfiguredAuto: true,
|
|
160
|
-
supportsMultimodalEmbeddings: ({ model }) => supportsGeminiMultimodalEmbeddings(model),
|
|
161
|
-
shouldContinueAutoSelection: isMissingApiKeyError,
|
|
162
|
-
create: async (options) => {
|
|
163
|
-
const { provider, client } = await createGeminiEmbeddingProvider({
|
|
164
|
-
...options,
|
|
165
|
-
provider: "gemini",
|
|
166
|
-
fallback: "none"
|
|
167
|
-
});
|
|
168
|
-
return {
|
|
169
|
-
provider,
|
|
170
|
-
runtime: {
|
|
171
|
-
id: "gemini",
|
|
172
|
-
cacheKeyData: {
|
|
173
|
-
provider: "gemini",
|
|
174
|
-
baseUrl: client.baseUrl,
|
|
175
|
-
model: client.model,
|
|
176
|
-
outputDimensionality: client.outputDimensionality,
|
|
177
|
-
headers: sanitizeHeaders(client.headers, ["authorization", "x-goog-api-key"])
|
|
178
|
-
},
|
|
179
|
-
batchEmbed: async (batch) => {
|
|
180
|
-
if (batch.chunks.some((chunk) => hasNonTextEmbeddingParts(chunk.embeddingInput))) return null;
|
|
181
|
-
return mapBatchEmbeddingsByIndex(await runGeminiEmbeddingBatches({
|
|
182
|
-
gemini: client,
|
|
183
|
-
agentId: batch.agentId,
|
|
184
|
-
requests: batch.chunks.map((chunk, index) => ({
|
|
185
|
-
custom_id: String(index),
|
|
186
|
-
request: buildGeminiEmbeddingRequest({
|
|
187
|
-
input: chunk.embeddingInput ?? { text: chunk.text },
|
|
188
|
-
taskType: "RETRIEVAL_DOCUMENT",
|
|
189
|
-
modelPath: client.modelPath,
|
|
190
|
-
outputDimensionality: client.outputDimensionality
|
|
191
|
-
})
|
|
192
|
-
})),
|
|
193
|
-
wait: batch.wait,
|
|
194
|
-
concurrency: batch.concurrency,
|
|
195
|
-
pollIntervalMs: batch.pollIntervalMs,
|
|
196
|
-
timeoutMs: batch.timeoutMs,
|
|
197
|
-
debug: batch.debug
|
|
198
|
-
}), batch.chunks.length);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
id: "voyage",
|
|
206
|
-
defaultModel: DEFAULT_VOYAGE_EMBEDDING_MODEL,
|
|
207
|
-
transport: "remote",
|
|
208
|
-
autoSelectPriority: 40,
|
|
209
|
-
allowExplicitWhenConfiguredAuto: true,
|
|
210
|
-
shouldContinueAutoSelection: isMissingApiKeyError,
|
|
211
|
-
create: async (options) => {
|
|
212
|
-
const { provider, client } = await createVoyageEmbeddingProvider({
|
|
213
|
-
...options,
|
|
214
|
-
provider: "voyage",
|
|
215
|
-
fallback: "none"
|
|
216
|
-
});
|
|
217
|
-
return {
|
|
218
|
-
provider,
|
|
219
|
-
runtime: {
|
|
220
|
-
id: "voyage",
|
|
221
|
-
batchEmbed: async (batch) => {
|
|
222
|
-
return mapBatchEmbeddingsByIndex(await runVoyageEmbeddingBatches({
|
|
223
|
-
client,
|
|
224
|
-
agentId: batch.agentId,
|
|
225
|
-
requests: batch.chunks.map((chunk, index) => ({
|
|
226
|
-
custom_id: String(index),
|
|
227
|
-
body: { input: chunk.text }
|
|
228
|
-
})),
|
|
229
|
-
wait: batch.wait,
|
|
230
|
-
concurrency: batch.concurrency,
|
|
231
|
-
pollIntervalMs: batch.pollIntervalMs,
|
|
232
|
-
timeoutMs: batch.timeoutMs,
|
|
233
|
-
debug: batch.debug
|
|
234
|
-
}), batch.chunks.length);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
id: "mistral",
|
|
242
|
-
defaultModel: DEFAULT_MISTRAL_EMBEDDING_MODEL,
|
|
243
|
-
transport: "remote",
|
|
244
|
-
autoSelectPriority: 50,
|
|
245
|
-
allowExplicitWhenConfiguredAuto: true,
|
|
246
|
-
shouldContinueAutoSelection: isMissingApiKeyError,
|
|
247
|
-
create: async (options) => {
|
|
248
|
-
const { provider, client } = await createMistralEmbeddingProvider({
|
|
249
|
-
...options,
|
|
250
|
-
provider: "mistral",
|
|
251
|
-
fallback: "none"
|
|
252
|
-
});
|
|
253
|
-
return {
|
|
254
|
-
provider,
|
|
255
|
-
runtime: {
|
|
256
|
-
id: "mistral",
|
|
257
|
-
cacheKeyData: {
|
|
258
|
-
provider: "mistral",
|
|
259
|
-
model: client.model
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: "ollama",
|
|
267
|
-
defaultModel: DEFAULT_OLLAMA_EMBEDDING_MODEL,
|
|
268
|
-
transport: "remote",
|
|
269
|
-
create: async (options) => {
|
|
270
|
-
const { provider, client } = await createOllamaEmbeddingProvider({
|
|
271
|
-
...options,
|
|
272
|
-
provider: "ollama",
|
|
273
|
-
fallback: "none"
|
|
274
|
-
});
|
|
275
|
-
return {
|
|
276
|
-
provider,
|
|
277
|
-
runtime: {
|
|
278
|
-
id: "ollama",
|
|
279
|
-
cacheKeyData: {
|
|
280
|
-
provider: "ollama",
|
|
281
|
-
model: client.model
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
};
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
];
|
|
288
|
-
const builtinMemoryEmbeddingProviderAdapterById = new Map(builtinMemoryEmbeddingProviderAdapters.map((adapter) => [adapter.id, adapter]));
|
|
289
|
-
function getBuiltinMemoryEmbeddingProviderAdapter(id) {
|
|
290
|
-
return builtinMemoryEmbeddingProviderAdapterById.get(id);
|
|
291
|
-
}
|
|
292
|
-
function registerBuiltInMemoryEmbeddingProviders(register) {
|
|
293
|
-
const existingIds = new Set(listMemoryEmbeddingProviders().map((adapter) => adapter.id));
|
|
294
|
-
for (const adapter of builtinMemoryEmbeddingProviderAdapters) {
|
|
295
|
-
if (existingIds.has(adapter.id)) continue;
|
|
296
|
-
register.registerMemoryEmbeddingProvider(adapter);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
function getBuiltinMemoryEmbeddingProviderDoctorMetadata(providerId) {
|
|
300
|
-
const adapter = getBuiltinMemoryEmbeddingProviderAdapter(providerId);
|
|
301
|
-
if (!adapter) return null;
|
|
302
|
-
const authProviderId = resolveMemoryEmbeddingAuthProviderId(adapter.id);
|
|
303
|
-
return {
|
|
304
|
-
providerId: adapter.id,
|
|
305
|
-
authProviderId,
|
|
306
|
-
envVars: getProviderEnvVars(authProviderId),
|
|
307
|
-
transport: adapter.transport === "local" ? "local" : "remote",
|
|
308
|
-
autoSelectPriority: adapter.autoSelectPriority
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
function listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata() {
|
|
312
|
-
return builtinMemoryEmbeddingProviderAdapters.filter((adapter) => typeof adapter.autoSelectPriority === "number").toSorted((a, b) => (a.autoSelectPriority ?? 0) - (b.autoSelectPriority ?? 0)).map((adapter) => ({
|
|
313
|
-
providerId: adapter.id,
|
|
314
|
-
authProviderId: resolveMemoryEmbeddingAuthProviderId(adapter.id),
|
|
315
|
-
envVars: getProviderEnvVars(resolveMemoryEmbeddingAuthProviderId(adapter.id)),
|
|
316
|
-
transport: adapter.transport === "local" ? "local" : "remote",
|
|
317
|
-
autoSelectPriority: adapter.autoSelectPriority
|
|
318
|
-
}));
|
|
319
|
-
}
|
|
320
|
-
//#endregion
|
|
321
|
-
//#region extensions/memory-core/src/memory/embeddings.ts
|
|
322
|
-
function formatErrorMessage(err) {
|
|
323
|
-
return err instanceof Error ? err.message : String(err);
|
|
324
|
-
}
|
|
325
|
-
function formatProviderError(adapter, err) {
|
|
326
|
-
return adapter.formatSetupError?.(err) ?? formatErrorMessage(err);
|
|
327
|
-
}
|
|
328
|
-
function shouldContinueAutoSelection(adapter, err) {
|
|
329
|
-
return adapter.shouldContinueAutoSelection?.(err) ?? false;
|
|
330
|
-
}
|
|
331
|
-
function getAdapter(id) {
|
|
332
|
-
const adapter = getMemoryEmbeddingProvider(id);
|
|
333
|
-
if (!adapter) throw new Error(`Unknown memory embedding provider: ${id}`);
|
|
334
|
-
return adapter;
|
|
335
|
-
}
|
|
336
|
-
function listAutoSelectAdapters(options) {
|
|
337
|
-
return listMemoryEmbeddingProviders().filter((adapter) => typeof adapter.autoSelectPriority === "number").filter((adapter) => adapter.id === "local" ? canAutoSelectLocal(options.local?.modelPath) : true).toSorted((a, b) => (a.autoSelectPriority ?? Number.MAX_SAFE_INTEGER) - (b.autoSelectPriority ?? Number.MAX_SAFE_INTEGER));
|
|
338
|
-
}
|
|
339
|
-
function resolveProviderModel(adapter, requestedModel) {
|
|
340
|
-
const trimmed = requestedModel.trim();
|
|
341
|
-
if (trimmed) return trimmed;
|
|
342
|
-
return adapter.defaultModel ?? "";
|
|
343
|
-
}
|
|
344
|
-
function resolveEmbeddingProviderFallbackModel(providerId, fallbackSourceModel) {
|
|
345
|
-
return (getMemoryEmbeddingProvider(providerId) ?? getBuiltinMemoryEmbeddingProviderAdapter(providerId))?.defaultModel ?? fallbackSourceModel;
|
|
346
|
-
}
|
|
347
|
-
async function createWithAdapter(adapter, options) {
|
|
348
|
-
const result = await adapter.create({
|
|
349
|
-
...options,
|
|
350
|
-
model: resolveProviderModel(adapter, options.model)
|
|
351
|
-
});
|
|
352
|
-
return {
|
|
353
|
-
provider: result.provider,
|
|
354
|
-
requestedProvider: options.provider,
|
|
355
|
-
runtime: result.runtime
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
async function createEmbeddingProvider(options) {
|
|
359
|
-
if (options.provider === "auto") {
|
|
360
|
-
const reasons = [];
|
|
361
|
-
for (const adapter of listAutoSelectAdapters(options)) try {
|
|
362
|
-
return {
|
|
363
|
-
...await createWithAdapter(adapter, {
|
|
364
|
-
...options,
|
|
365
|
-
provider: adapter.id
|
|
366
|
-
}),
|
|
367
|
-
requestedProvider: "auto"
|
|
368
|
-
};
|
|
369
|
-
} catch (err) {
|
|
370
|
-
const message = formatProviderError(adapter, err);
|
|
371
|
-
if (shouldContinueAutoSelection(adapter, err)) {
|
|
372
|
-
reasons.push(message);
|
|
373
|
-
continue;
|
|
374
|
-
}
|
|
375
|
-
const wrapped = new Error(message);
|
|
376
|
-
wrapped.cause = err;
|
|
377
|
-
throw wrapped;
|
|
378
|
-
}
|
|
379
|
-
return {
|
|
380
|
-
provider: null,
|
|
381
|
-
requestedProvider: "auto",
|
|
382
|
-
providerUnavailableReason: reasons.length > 0 ? reasons.join("\n\n") : "No embeddings provider available."
|
|
383
|
-
};
|
|
384
|
-
}
|
|
385
|
-
const primaryAdapter = getAdapter(options.provider);
|
|
386
|
-
try {
|
|
387
|
-
return await createWithAdapter(primaryAdapter, options);
|
|
388
|
-
} catch (primaryErr) {
|
|
389
|
-
const reason = formatProviderError(primaryAdapter, primaryErr);
|
|
390
|
-
if (options.fallback && options.fallback !== "none" && options.fallback !== options.provider) {
|
|
391
|
-
const fallbackAdapter = getAdapter(options.fallback);
|
|
392
|
-
try {
|
|
393
|
-
return {
|
|
394
|
-
...await createWithAdapter(fallbackAdapter, {
|
|
395
|
-
...options,
|
|
396
|
-
provider: options.fallback
|
|
397
|
-
}),
|
|
398
|
-
requestedProvider: options.provider,
|
|
399
|
-
fallbackFrom: options.provider,
|
|
400
|
-
fallbackReason: reason
|
|
401
|
-
};
|
|
402
|
-
} catch (fallbackErr) {
|
|
403
|
-
const fallbackReason = formatProviderError(fallbackAdapter, fallbackErr);
|
|
404
|
-
const wrapped = /* @__PURE__ */ new Error(`${reason}\n\nFallback to ${options.fallback} failed: ${fallbackReason}`);
|
|
405
|
-
wrapped.cause = primaryErr;
|
|
406
|
-
throw wrapped;
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
const wrapped = new Error(reason);
|
|
410
|
-
wrapped.cause = primaryErr;
|
|
411
|
-
throw wrapped;
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region extensions/memory-core/src/memory/mmr.ts
|
|
416
|
-
const DEFAULT_MMR_CONFIG = {
|
|
417
|
-
enabled: false,
|
|
418
|
-
lambda: .7
|
|
419
|
-
};
|
|
420
|
-
/**
|
|
421
|
-
* Regex matching CJK-family characters that lack whitespace word boundaries:
|
|
422
|
-
* - CJK Unified Ideographs (Chinese hanzi, Japanese kanji, Korean hanja)
|
|
423
|
-
* - CJK Extension A
|
|
424
|
-
* - Hiragana & Katakana (Japanese)
|
|
425
|
-
* - Hangul Syllables & Jamo (Korean)
|
|
426
|
-
*/
|
|
427
|
-
const CJK_RE = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\u1100-\u11ff]/;
|
|
428
|
-
/**
|
|
429
|
-
* Tokenize text for Jaccard similarity computation.
|
|
430
|
-
* Extracts alphanumeric tokens, CJK-family characters (unigrams),
|
|
431
|
-
* and consecutive CJK character pairs (bigrams).
|
|
432
|
-
*
|
|
433
|
-
* Bigrams are only created from characters that are adjacent in the
|
|
434
|
-
* original text, so mixed content like "我喜欢hello你好" will NOT
|
|
435
|
-
* produce the spurious bigram "欢你".
|
|
436
|
-
*/
|
|
437
|
-
function tokenize(text) {
|
|
438
|
-
const lower = text.toLowerCase();
|
|
439
|
-
const ascii = lower.match(/[a-z0-9_]+/g) ?? [];
|
|
440
|
-
const chars = Array.from(lower);
|
|
441
|
-
const cjkData = [];
|
|
442
|
-
for (let i = 0; i < chars.length; i++) if (CJK_RE.test(chars[i])) cjkData.push({
|
|
443
|
-
char: chars[i],
|
|
444
|
-
index: i
|
|
445
|
-
});
|
|
446
|
-
const bigrams = [];
|
|
447
|
-
for (let i = 0; i < cjkData.length - 1; i++) if (cjkData[i + 1].index === cjkData[i].index + 1) bigrams.push(cjkData[i].char + cjkData[i + 1].char);
|
|
448
|
-
const unigrams = cjkData.map((d) => d.char);
|
|
449
|
-
return new Set([
|
|
450
|
-
...ascii,
|
|
451
|
-
...bigrams,
|
|
452
|
-
...unigrams
|
|
453
|
-
]);
|
|
454
|
-
}
|
|
455
|
-
/**
|
|
456
|
-
* Compute Jaccard similarity between two token sets.
|
|
457
|
-
* Returns a value in [0, 1] where 1 means identical sets.
|
|
458
|
-
*/
|
|
459
|
-
function jaccardSimilarity(setA, setB) {
|
|
460
|
-
if (setA.size === 0 && setB.size === 0) return 1;
|
|
461
|
-
if (setA.size === 0 || setB.size === 0) return 0;
|
|
462
|
-
let intersectionSize = 0;
|
|
463
|
-
const smaller = setA.size <= setB.size ? setA : setB;
|
|
464
|
-
const larger = setA.size <= setB.size ? setB : setA;
|
|
465
|
-
for (const token of smaller) if (larger.has(token)) intersectionSize++;
|
|
466
|
-
const unionSize = setA.size + setB.size - intersectionSize;
|
|
467
|
-
return unionSize === 0 ? 0 : intersectionSize / unionSize;
|
|
468
|
-
}
|
|
469
|
-
/**
|
|
470
|
-
* Compute the maximum similarity between an item and all selected items.
|
|
471
|
-
*/
|
|
472
|
-
function maxSimilarityToSelected(item, selectedItems, tokenCache) {
|
|
473
|
-
if (selectedItems.length === 0) return 0;
|
|
474
|
-
let maxSim = 0;
|
|
475
|
-
const itemTokens = tokenCache.get(item.id) ?? tokenize(item.content);
|
|
476
|
-
for (const selected of selectedItems) {
|
|
477
|
-
const sim = jaccardSimilarity(itemTokens, tokenCache.get(selected.id) ?? tokenize(selected.content));
|
|
478
|
-
if (sim > maxSim) maxSim = sim;
|
|
479
|
-
}
|
|
480
|
-
return maxSim;
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* Compute MMR score for a candidate item.
|
|
484
|
-
* MMR = λ * relevance - (1-λ) * max_similarity_to_selected
|
|
485
|
-
*/
|
|
486
|
-
function computeMMRScore(relevance, maxSimilarity, lambda) {
|
|
487
|
-
return lambda * relevance - (1 - lambda) * maxSimilarity;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Re-rank items using Maximal Marginal Relevance (MMR).
|
|
491
|
-
*
|
|
492
|
-
* The algorithm iteratively selects items that balance relevance with diversity:
|
|
493
|
-
* 1. Start with the highest-scoring item
|
|
494
|
-
* 2. For each remaining slot, select the item that maximizes the MMR score
|
|
495
|
-
* 3. MMR score = λ * relevance - (1-λ) * max_similarity_to_already_selected
|
|
496
|
-
*
|
|
497
|
-
* @param items - Items to re-rank, must have score and content
|
|
498
|
-
* @param config - MMR configuration (lambda, enabled)
|
|
499
|
-
* @returns Re-ranked items in MMR order
|
|
500
|
-
*/
|
|
501
|
-
function mmrRerank(items, config = {}) {
|
|
502
|
-
const { enabled = DEFAULT_MMR_CONFIG.enabled, lambda = DEFAULT_MMR_CONFIG.lambda } = config;
|
|
503
|
-
if (!enabled || items.length <= 1) return [...items];
|
|
504
|
-
const clampedLambda = Math.max(0, Math.min(1, lambda));
|
|
505
|
-
if (clampedLambda === 1) return [...items].toSorted((a, b) => b.score - a.score);
|
|
506
|
-
const tokenCache = /* @__PURE__ */ new Map();
|
|
507
|
-
for (const item of items) tokenCache.set(item.id, tokenize(item.content));
|
|
508
|
-
const maxScore = Math.max(...items.map((i) => i.score));
|
|
509
|
-
const minScore = Math.min(...items.map((i) => i.score));
|
|
510
|
-
const scoreRange = maxScore - minScore;
|
|
511
|
-
const normalizeScore = (score) => {
|
|
512
|
-
if (scoreRange === 0) return 1;
|
|
513
|
-
return (score - minScore) / scoreRange;
|
|
514
|
-
};
|
|
515
|
-
const selected = [];
|
|
516
|
-
const remaining = new Set(items);
|
|
517
|
-
while (remaining.size > 0) {
|
|
518
|
-
let bestItem = null;
|
|
519
|
-
let bestMMRScore = -Infinity;
|
|
520
|
-
for (const candidate of remaining) {
|
|
521
|
-
const mmrScore = computeMMRScore(normalizeScore(candidate.score), maxSimilarityToSelected(candidate, selected, tokenCache), clampedLambda);
|
|
522
|
-
if (mmrScore > bestMMRScore || mmrScore === bestMMRScore && candidate.score > (bestItem?.score ?? -Infinity)) {
|
|
523
|
-
bestMMRScore = mmrScore;
|
|
524
|
-
bestItem = candidate;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
if (bestItem) {
|
|
528
|
-
selected.push(bestItem);
|
|
529
|
-
remaining.delete(bestItem);
|
|
530
|
-
} else break;
|
|
531
|
-
}
|
|
532
|
-
return selected;
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Apply MMR re-ranking to hybrid search results.
|
|
536
|
-
* Adapts the generic MMR function to work with the hybrid search result format.
|
|
537
|
-
*/
|
|
538
|
-
function applyMMRToHybridResults(results, config = {}) {
|
|
539
|
-
if (results.length === 0) return results;
|
|
540
|
-
const itemById = /* @__PURE__ */ new Map();
|
|
541
|
-
return mmrRerank(results.map((r, index) => {
|
|
542
|
-
const id = `${r.path}:${r.startLine}:${index}`;
|
|
543
|
-
itemById.set(id, r);
|
|
544
|
-
return {
|
|
545
|
-
id,
|
|
546
|
-
score: r.score,
|
|
547
|
-
content: r.snippet
|
|
548
|
-
};
|
|
549
|
-
}), config).map((item) => itemById.get(item.id));
|
|
550
|
-
}
|
|
551
|
-
//#endregion
|
|
552
|
-
//#region extensions/memory-core/src/memory/temporal-decay.ts
|
|
553
|
-
const DEFAULT_TEMPORAL_DECAY_CONFIG = {
|
|
554
|
-
enabled: false,
|
|
555
|
-
halfLifeDays: 30
|
|
556
|
-
};
|
|
557
|
-
const DAY_MS = 1440 * 60 * 1e3;
|
|
558
|
-
const DATED_MEMORY_PATH_RE = /(?:^|\/)memory\/(\d{4})-(\d{2})-(\d{2})\.md$/;
|
|
559
|
-
function toDecayLambda(halfLifeDays) {
|
|
560
|
-
if (!Number.isFinite(halfLifeDays) || halfLifeDays <= 0) return 0;
|
|
561
|
-
return Math.LN2 / halfLifeDays;
|
|
562
|
-
}
|
|
563
|
-
function calculateTemporalDecayMultiplier(params) {
|
|
564
|
-
const lambda = toDecayLambda(params.halfLifeDays);
|
|
565
|
-
const clampedAge = Math.max(0, params.ageInDays);
|
|
566
|
-
if (lambda <= 0 || !Number.isFinite(clampedAge)) return 1;
|
|
567
|
-
return Math.exp(-lambda * clampedAge);
|
|
568
|
-
}
|
|
569
|
-
function applyTemporalDecayToScore(params) {
|
|
570
|
-
return params.score * calculateTemporalDecayMultiplier(params);
|
|
571
|
-
}
|
|
572
|
-
function parseMemoryDateFromPath(filePath) {
|
|
573
|
-
const normalized = filePath.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
574
|
-
const match = DATED_MEMORY_PATH_RE.exec(normalized);
|
|
575
|
-
if (!match) return null;
|
|
576
|
-
const year = Number(match[1]);
|
|
577
|
-
const month = Number(match[2]);
|
|
578
|
-
const day = Number(match[3]);
|
|
579
|
-
if (!Number.isInteger(year) || !Number.isInteger(month) || !Number.isInteger(day)) return null;
|
|
580
|
-
const timestamp = Date.UTC(year, month - 1, day);
|
|
581
|
-
const parsed = new Date(timestamp);
|
|
582
|
-
if (parsed.getUTCFullYear() !== year || parsed.getUTCMonth() !== month - 1 || parsed.getUTCDate() !== day) return null;
|
|
583
|
-
return parsed;
|
|
584
|
-
}
|
|
585
|
-
function isEvergreenMemoryPath(filePath) {
|
|
586
|
-
const normalized = filePath.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
587
|
-
if (normalized === "MEMORY.md" || normalized === "memory.md") return true;
|
|
588
|
-
if (!normalized.startsWith("memory/")) return false;
|
|
589
|
-
return !DATED_MEMORY_PATH_RE.test(normalized);
|
|
590
|
-
}
|
|
591
|
-
async function extractTimestamp(params) {
|
|
592
|
-
const fromPath = parseMemoryDateFromPath(params.filePath);
|
|
593
|
-
if (fromPath) return fromPath;
|
|
594
|
-
if (params.source === "memory" && isEvergreenMemoryPath(params.filePath)) return null;
|
|
595
|
-
if (!params.workspaceDir) return null;
|
|
596
|
-
const absolutePath = path.isAbsolute(params.filePath) ? params.filePath : path.resolve(params.workspaceDir, params.filePath);
|
|
597
|
-
try {
|
|
598
|
-
const stat = await fs.stat(absolutePath);
|
|
599
|
-
if (!Number.isFinite(stat.mtimeMs)) return null;
|
|
600
|
-
return new Date(stat.mtimeMs);
|
|
601
|
-
} catch {
|
|
602
|
-
return null;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
function ageInDaysFromTimestamp(timestamp, nowMs) {
|
|
606
|
-
return Math.max(0, nowMs - timestamp.getTime()) / DAY_MS;
|
|
607
|
-
}
|
|
608
|
-
async function applyTemporalDecayToHybridResults(params) {
|
|
609
|
-
const config = {
|
|
610
|
-
...DEFAULT_TEMPORAL_DECAY_CONFIG,
|
|
611
|
-
...params.temporalDecay
|
|
612
|
-
};
|
|
613
|
-
if (!config.enabled) return [...params.results];
|
|
614
|
-
const nowMs = params.nowMs ?? Date.now();
|
|
615
|
-
const timestampPromiseCache = /* @__PURE__ */ new Map();
|
|
616
|
-
return Promise.all(params.results.map(async (entry) => {
|
|
617
|
-
const cacheKey = `${entry.source}:${entry.path}`;
|
|
618
|
-
let timestampPromise = timestampPromiseCache.get(cacheKey);
|
|
619
|
-
if (!timestampPromise) {
|
|
620
|
-
timestampPromise = extractTimestamp({
|
|
621
|
-
filePath: entry.path,
|
|
622
|
-
source: entry.source,
|
|
623
|
-
workspaceDir: params.workspaceDir
|
|
624
|
-
});
|
|
625
|
-
timestampPromiseCache.set(cacheKey, timestampPromise);
|
|
626
|
-
}
|
|
627
|
-
const timestamp = await timestampPromise;
|
|
628
|
-
if (!timestamp) return entry;
|
|
629
|
-
const decayedScore = applyTemporalDecayToScore({
|
|
630
|
-
score: entry.score,
|
|
631
|
-
ageInDays: ageInDaysFromTimestamp(timestamp, nowMs),
|
|
632
|
-
halfLifeDays: config.halfLifeDays
|
|
633
|
-
});
|
|
634
|
-
return {
|
|
635
|
-
...entry,
|
|
636
|
-
score: decayedScore
|
|
637
|
-
};
|
|
638
|
-
}));
|
|
639
|
-
}
|
|
640
|
-
//#endregion
|
|
641
|
-
//#region extensions/memory-core/src/memory/hybrid.ts
|
|
642
|
-
function buildFtsQuery(raw) {
|
|
643
|
-
const tokens = raw.match(/[\p{L}\p{N}_]+/gu)?.map((t) => t.trim()).filter(Boolean) ?? [];
|
|
644
|
-
if (tokens.length === 0) return null;
|
|
645
|
-
return tokens.map((t) => `"${t.replaceAll("\"", "")}"`).join(" AND ");
|
|
646
|
-
}
|
|
647
|
-
function bm25RankToScore(rank) {
|
|
648
|
-
if (!Number.isFinite(rank)) return 1 / 1e3;
|
|
649
|
-
if (rank < 0) {
|
|
650
|
-
const relevance = -rank;
|
|
651
|
-
return relevance / (1 + relevance);
|
|
652
|
-
}
|
|
653
|
-
return 1 / (1 + rank);
|
|
654
|
-
}
|
|
655
|
-
async function mergeHybridResults(params) {
|
|
656
|
-
const byId = /* @__PURE__ */ new Map();
|
|
657
|
-
for (const r of params.vector) byId.set(r.id, {
|
|
658
|
-
id: r.id,
|
|
659
|
-
path: r.path,
|
|
660
|
-
startLine: r.startLine,
|
|
661
|
-
endLine: r.endLine,
|
|
662
|
-
source: r.source,
|
|
663
|
-
snippet: r.snippet,
|
|
664
|
-
vectorScore: r.vectorScore,
|
|
665
|
-
textScore: 0
|
|
666
|
-
});
|
|
667
|
-
for (const r of params.keyword) {
|
|
668
|
-
const existing = byId.get(r.id);
|
|
669
|
-
if (existing) {
|
|
670
|
-
existing.textScore = r.textScore;
|
|
671
|
-
if (r.snippet && r.snippet.length > 0) existing.snippet = r.snippet;
|
|
672
|
-
} else byId.set(r.id, {
|
|
673
|
-
id: r.id,
|
|
674
|
-
path: r.path,
|
|
675
|
-
startLine: r.startLine,
|
|
676
|
-
endLine: r.endLine,
|
|
677
|
-
source: r.source,
|
|
678
|
-
snippet: r.snippet,
|
|
679
|
-
vectorScore: 0,
|
|
680
|
-
textScore: r.textScore
|
|
681
|
-
});
|
|
682
|
-
}
|
|
683
|
-
const sorted = (await applyTemporalDecayToHybridResults({
|
|
684
|
-
results: Array.from(byId.values()).map((entry) => {
|
|
685
|
-
const score = params.vectorWeight * entry.vectorScore + params.textWeight * entry.textScore;
|
|
686
|
-
return {
|
|
687
|
-
path: entry.path,
|
|
688
|
-
startLine: entry.startLine,
|
|
689
|
-
endLine: entry.endLine,
|
|
690
|
-
score,
|
|
691
|
-
snippet: entry.snippet,
|
|
692
|
-
source: entry.source
|
|
693
|
-
};
|
|
694
|
-
}),
|
|
695
|
-
temporalDecay: {
|
|
696
|
-
...DEFAULT_TEMPORAL_DECAY_CONFIG,
|
|
697
|
-
...params.temporalDecay
|
|
698
|
-
},
|
|
699
|
-
workspaceDir: params.workspaceDir,
|
|
700
|
-
nowMs: params.nowMs
|
|
701
|
-
})).toSorted((a, b) => b.score - a.score);
|
|
702
|
-
const mmrConfig = {
|
|
703
|
-
...DEFAULT_MMR_CONFIG,
|
|
704
|
-
...params.mmr
|
|
705
|
-
};
|
|
706
|
-
if (mmrConfig.enabled) return applyMMRToHybridResults(sorted, mmrConfig);
|
|
707
|
-
return sorted;
|
|
708
|
-
}
|
|
709
|
-
//#endregion
|
|
710
|
-
//#region extensions/memory-core/src/memory/manager-sync-ops.ts
|
|
711
|
-
const META_KEY = "memory_index_meta_v1";
|
|
712
|
-
const VECTOR_TABLE$2 = "chunks_vec";
|
|
713
|
-
const FTS_TABLE$2 = "chunks_fts";
|
|
714
|
-
const EMBEDDING_CACHE_TABLE$2 = "embedding_cache";
|
|
715
|
-
const SESSION_DIRTY_DEBOUNCE_MS = 5e3;
|
|
716
|
-
const SESSION_DELTA_READ_CHUNK_BYTES = 64 * 1024;
|
|
717
|
-
const VECTOR_LOAD_TIMEOUT_MS = 3e4;
|
|
718
|
-
const IGNORED_MEMORY_WATCH_DIR_NAMES = new Set([
|
|
719
|
-
".git",
|
|
720
|
-
"node_modules",
|
|
721
|
-
".pnpm-store",
|
|
722
|
-
".venv",
|
|
723
|
-
"venv",
|
|
724
|
-
".tox",
|
|
725
|
-
"__pycache__"
|
|
726
|
-
]);
|
|
727
|
-
const log$2 = createSubsystemLogger("memory");
|
|
728
|
-
function openMemoryDatabaseAtPath(dbPath, allowExtension) {
|
|
729
|
-
ensureDir(path.dirname(dbPath));
|
|
730
|
-
const { DatabaseSync } = requireNodeSqlite();
|
|
731
|
-
const db = new DatabaseSync(dbPath, { allowExtension });
|
|
732
|
-
db.exec("PRAGMA busy_timeout = 5000");
|
|
733
|
-
return db;
|
|
734
|
-
}
|
|
735
|
-
function shouldIgnoreMemoryWatchPath(watchPath) {
|
|
736
|
-
return path.normalize(watchPath).split(path.sep).map((segment) => segment.trim().toLowerCase()).some((segment) => IGNORED_MEMORY_WATCH_DIR_NAMES.has(segment));
|
|
737
|
-
}
|
|
738
|
-
function runDetachedMemorySync(sync, reason) {
|
|
739
|
-
sync().catch((err) => {
|
|
740
|
-
log$2.warn(`memory sync failed (${reason}): ${String(err)}`);
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
var MemoryManagerSyncOps = class {
|
|
744
|
-
constructor() {
|
|
745
|
-
this.provider = null;
|
|
746
|
-
this.sources = /* @__PURE__ */ new Set();
|
|
747
|
-
this.providerKey = null;
|
|
748
|
-
this.fts = {
|
|
749
|
-
enabled: false,
|
|
750
|
-
available: false
|
|
751
|
-
};
|
|
752
|
-
this.vectorReady = null;
|
|
753
|
-
this.watcher = null;
|
|
754
|
-
this.watchTimer = null;
|
|
755
|
-
this.sessionWatchTimer = null;
|
|
756
|
-
this.sessionUnsubscribe = null;
|
|
757
|
-
this.intervalTimer = null;
|
|
758
|
-
this.closed = false;
|
|
759
|
-
this.dirty = false;
|
|
760
|
-
this.sessionsDirty = false;
|
|
761
|
-
this.sessionsDirtyFiles = /* @__PURE__ */ new Set();
|
|
762
|
-
this.sessionPendingFiles = /* @__PURE__ */ new Set();
|
|
763
|
-
this.sessionDeltas = /* @__PURE__ */ new Map();
|
|
764
|
-
this.lastMetaSerialized = null;
|
|
765
|
-
}
|
|
766
|
-
async ensureVectorReady(dimensions) {
|
|
767
|
-
if (!this.vector.enabled) return false;
|
|
768
|
-
if (!this.vectorReady) this.vectorReady = this.withTimeout(this.loadVectorExtension(), VECTOR_LOAD_TIMEOUT_MS, `sqlite-vec load timed out after ${Math.round(VECTOR_LOAD_TIMEOUT_MS / 1e3)}s`);
|
|
769
|
-
let ready = false;
|
|
770
|
-
try {
|
|
771
|
-
ready = await this.vectorReady || false;
|
|
772
|
-
} catch (err) {
|
|
773
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
774
|
-
this.vector.available = false;
|
|
775
|
-
this.vector.loadError = message;
|
|
776
|
-
this.vectorReady = null;
|
|
777
|
-
log$2.warn(`sqlite-vec unavailable: ${message}`);
|
|
778
|
-
return false;
|
|
779
|
-
}
|
|
780
|
-
if (ready && typeof dimensions === "number" && dimensions > 0) this.ensureVectorTable(dimensions);
|
|
781
|
-
return ready;
|
|
782
|
-
}
|
|
783
|
-
async loadVectorExtension() {
|
|
784
|
-
if (this.vector.available !== null) return this.vector.available;
|
|
785
|
-
if (!this.vector.enabled) {
|
|
786
|
-
this.vector.available = false;
|
|
787
|
-
return false;
|
|
788
|
-
}
|
|
789
|
-
try {
|
|
790
|
-
const resolvedPath = this.vector.extensionPath?.trim() ? resolveUserPath(this.vector.extensionPath) : void 0;
|
|
791
|
-
const loaded = await loadSqliteVecExtension({
|
|
792
|
-
db: this.db,
|
|
793
|
-
extensionPath: resolvedPath
|
|
794
|
-
});
|
|
795
|
-
if (!loaded.ok) throw new Error(loaded.error ?? "unknown sqlite-vec load error");
|
|
796
|
-
this.vector.extensionPath = loaded.extensionPath;
|
|
797
|
-
this.vector.available = true;
|
|
798
|
-
return true;
|
|
799
|
-
} catch (err) {
|
|
800
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
801
|
-
this.vector.available = false;
|
|
802
|
-
this.vector.loadError = message;
|
|
803
|
-
log$2.warn(`sqlite-vec unavailable: ${message}`);
|
|
804
|
-
return false;
|
|
805
|
-
}
|
|
806
|
-
}
|
|
807
|
-
ensureVectorTable(dimensions) {
|
|
808
|
-
if (this.vector.dims === dimensions) return;
|
|
809
|
-
if (this.vector.dims && this.vector.dims !== dimensions) this.dropVectorTable();
|
|
810
|
-
this.db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS ${VECTOR_TABLE$2} USING vec0(\n id TEXT PRIMARY KEY,\n embedding FLOAT[${dimensions}]\n)`);
|
|
811
|
-
this.vector.dims = dimensions;
|
|
812
|
-
}
|
|
813
|
-
dropVectorTable() {
|
|
814
|
-
try {
|
|
815
|
-
this.db.exec(`DROP TABLE IF EXISTS ${VECTOR_TABLE$2}`);
|
|
816
|
-
} catch (err) {
|
|
817
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
818
|
-
log$2.debug(`Failed to drop ${VECTOR_TABLE$2}: ${message}`);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
buildSourceFilter(alias) {
|
|
822
|
-
const sources = Array.from(this.sources);
|
|
823
|
-
if (sources.length === 0) return {
|
|
824
|
-
sql: "",
|
|
825
|
-
params: []
|
|
826
|
-
};
|
|
827
|
-
return {
|
|
828
|
-
sql: ` AND ${alias ? `${alias}.source` : "source"} IN (${sources.map(() => "?").join(", ")})`,
|
|
829
|
-
params: sources
|
|
830
|
-
};
|
|
831
|
-
}
|
|
832
|
-
openDatabase() {
|
|
833
|
-
return openMemoryDatabaseAtPath(resolveUserPath(this.settings.store.path), this.settings.store.vector.enabled);
|
|
834
|
-
}
|
|
835
|
-
seedEmbeddingCache(sourceDb) {
|
|
836
|
-
if (!this.cache.enabled) return;
|
|
837
|
-
try {
|
|
838
|
-
const rows = sourceDb.prepare(`SELECT provider, model, provider_key, hash, embedding, dims, updated_at FROM ${EMBEDDING_CACHE_TABLE$2}`).all();
|
|
839
|
-
if (!rows.length) return;
|
|
840
|
-
const insert = this.db.prepare(`INSERT INTO ${EMBEDDING_CACHE_TABLE$2} (provider, model, provider_key, hash, embedding, dims, updated_at)
|
|
841
|
-
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
842
|
-
ON CONFLICT(provider, model, provider_key, hash) DO UPDATE SET
|
|
843
|
-
embedding=excluded.embedding,
|
|
844
|
-
dims=excluded.dims,
|
|
845
|
-
updated_at=excluded.updated_at`);
|
|
846
|
-
this.db.exec("BEGIN");
|
|
847
|
-
for (const row of rows) insert.run(row.provider, row.model, row.provider_key, row.hash, row.embedding, row.dims, row.updated_at);
|
|
848
|
-
this.db.exec("COMMIT");
|
|
849
|
-
} catch (err) {
|
|
850
|
-
try {
|
|
851
|
-
this.db.exec("ROLLBACK");
|
|
852
|
-
} catch {}
|
|
853
|
-
throw err;
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
async swapIndexFiles(targetPath, tempPath) {
|
|
857
|
-
const backupPath = `${targetPath}.backup-${randomUUID()}`;
|
|
858
|
-
await this.moveIndexFiles(targetPath, backupPath);
|
|
859
|
-
try {
|
|
860
|
-
await this.moveIndexFiles(tempPath, targetPath);
|
|
861
|
-
} catch (err) {
|
|
862
|
-
await this.moveIndexFiles(backupPath, targetPath);
|
|
863
|
-
throw err;
|
|
864
|
-
}
|
|
865
|
-
await this.removeIndexFiles(backupPath);
|
|
866
|
-
}
|
|
867
|
-
async moveIndexFiles(sourceBase, targetBase) {
|
|
868
|
-
for (const suffix of [
|
|
869
|
-
"",
|
|
870
|
-
"-wal",
|
|
871
|
-
"-shm"
|
|
872
|
-
]) {
|
|
873
|
-
const source = `${sourceBase}${suffix}`;
|
|
874
|
-
const target = `${targetBase}${suffix}`;
|
|
875
|
-
try {
|
|
876
|
-
await fs.rename(source, target);
|
|
877
|
-
} catch (err) {
|
|
878
|
-
if (err.code !== "ENOENT") throw err;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
}
|
|
882
|
-
async removeIndexFiles(basePath) {
|
|
883
|
-
await Promise.all([
|
|
884
|
-
"",
|
|
885
|
-
"-wal",
|
|
886
|
-
"-shm"
|
|
887
|
-
].map((suffix) => fs.rm(`${basePath}${suffix}`, { force: true })));
|
|
888
|
-
}
|
|
889
|
-
ensureSchema() {
|
|
890
|
-
const result = ensureMemoryIndexSchema({
|
|
891
|
-
db: this.db,
|
|
892
|
-
embeddingCacheTable: EMBEDDING_CACHE_TABLE$2,
|
|
893
|
-
cacheEnabled: this.cache.enabled,
|
|
894
|
-
ftsTable: FTS_TABLE$2,
|
|
895
|
-
ftsEnabled: this.fts.enabled,
|
|
896
|
-
ftsTokenizer: this.settings.store.fts.tokenizer
|
|
897
|
-
});
|
|
898
|
-
this.fts.available = result.ftsAvailable;
|
|
899
|
-
if (result.ftsError) {
|
|
900
|
-
this.fts.loadError = result.ftsError;
|
|
901
|
-
if (this.fts.enabled) log$2.warn(`fts unavailable: ${result.ftsError}`);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
ensureWatcher() {
|
|
905
|
-
if (!this.sources.has("memory") || !this.settings.sync.watch || this.watcher) return;
|
|
906
|
-
const watchPaths = new Set([
|
|
907
|
-
path.join(this.workspaceDir, "MEMORY.md"),
|
|
908
|
-
path.join(this.workspaceDir, "memory.md"),
|
|
909
|
-
path.join(this.workspaceDir, "memory", "**", "*.md")
|
|
910
|
-
]);
|
|
911
|
-
const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
|
|
912
|
-
for (const entry of additionalPaths) try {
|
|
913
|
-
const stat = fsSync.lstatSync(entry);
|
|
914
|
-
if (stat.isSymbolicLink()) continue;
|
|
915
|
-
if (stat.isDirectory()) {
|
|
916
|
-
watchPaths.add(path.join(entry, "**", "*.md"));
|
|
917
|
-
if (this.settings.multimodal.enabled) for (const modality of this.settings.multimodal.modalities) for (const extension of getMemoryMultimodalExtensions(modality)) watchPaths.add(path.join(entry, "**", buildCaseInsensitiveExtensionGlob(extension)));
|
|
918
|
-
continue;
|
|
919
|
-
}
|
|
920
|
-
if (stat.isFile() && (entry.toLowerCase().endsWith(".md") || classifyMemoryMultimodalPath(entry, this.settings.multimodal) !== null)) watchPaths.add(entry);
|
|
921
|
-
} catch {}
|
|
922
|
-
this.watcher = chokidar.watch(Array.from(watchPaths), {
|
|
923
|
-
ignoreInitial: true,
|
|
924
|
-
ignored: (watchPath) => shouldIgnoreMemoryWatchPath(String(watchPath)),
|
|
925
|
-
awaitWriteFinish: {
|
|
926
|
-
stabilityThreshold: this.settings.sync.watchDebounceMs,
|
|
927
|
-
pollInterval: 100
|
|
928
|
-
}
|
|
929
|
-
});
|
|
930
|
-
const markDirty = () => {
|
|
931
|
-
this.dirty = true;
|
|
932
|
-
this.scheduleWatchSync();
|
|
933
|
-
};
|
|
934
|
-
this.watcher.on("add", markDirty);
|
|
935
|
-
this.watcher.on("change", markDirty);
|
|
936
|
-
this.watcher.on("unlink", markDirty);
|
|
937
|
-
}
|
|
938
|
-
ensureSessionListener() {
|
|
939
|
-
if (!this.sources.has("sessions") || this.sessionUnsubscribe) return;
|
|
940
|
-
this.sessionUnsubscribe = onSessionTranscriptUpdate((update) => {
|
|
941
|
-
if (this.closed) return;
|
|
942
|
-
const sessionFile = update.sessionFile;
|
|
943
|
-
if (!this.isSessionFileForAgent(sessionFile)) return;
|
|
944
|
-
this.scheduleSessionDirty(sessionFile);
|
|
945
|
-
});
|
|
946
|
-
}
|
|
947
|
-
scheduleSessionDirty(sessionFile) {
|
|
948
|
-
this.sessionPendingFiles.add(sessionFile);
|
|
949
|
-
if (this.sessionWatchTimer) return;
|
|
950
|
-
this.sessionWatchTimer = setTimeout(() => {
|
|
951
|
-
this.sessionWatchTimer = null;
|
|
952
|
-
this.processSessionDeltaBatch().catch((err) => {
|
|
953
|
-
log$2.warn(`memory session delta failed: ${String(err)}`);
|
|
954
|
-
});
|
|
955
|
-
}, SESSION_DIRTY_DEBOUNCE_MS);
|
|
956
|
-
}
|
|
957
|
-
async processSessionDeltaBatch() {
|
|
958
|
-
if (this.sessionPendingFiles.size === 0) return;
|
|
959
|
-
const pending = Array.from(this.sessionPendingFiles);
|
|
960
|
-
this.sessionPendingFiles.clear();
|
|
961
|
-
let shouldSync = false;
|
|
962
|
-
for (const sessionFile of pending) {
|
|
963
|
-
const delta = await this.updateSessionDelta(sessionFile);
|
|
964
|
-
if (!delta) continue;
|
|
965
|
-
const bytesThreshold = delta.deltaBytes;
|
|
966
|
-
const messagesThreshold = delta.deltaMessages;
|
|
967
|
-
const bytesHit = bytesThreshold <= 0 ? delta.pendingBytes > 0 : delta.pendingBytes >= bytesThreshold;
|
|
968
|
-
const messagesHit = messagesThreshold <= 0 ? delta.pendingMessages > 0 : delta.pendingMessages >= messagesThreshold;
|
|
969
|
-
if (!bytesHit && !messagesHit) continue;
|
|
970
|
-
this.sessionsDirtyFiles.add(sessionFile);
|
|
971
|
-
this.sessionsDirty = true;
|
|
972
|
-
delta.pendingBytes = bytesThreshold > 0 ? Math.max(0, delta.pendingBytes - bytesThreshold) : 0;
|
|
973
|
-
delta.pendingMessages = messagesThreshold > 0 ? Math.max(0, delta.pendingMessages - messagesThreshold) : 0;
|
|
974
|
-
shouldSync = true;
|
|
975
|
-
}
|
|
976
|
-
if (shouldSync) this.sync({ reason: "session-delta" }).catch((err) => {
|
|
977
|
-
log$2.warn(`memory sync failed (session-delta): ${String(err)}`);
|
|
978
|
-
});
|
|
979
|
-
}
|
|
980
|
-
async updateSessionDelta(sessionFile) {
|
|
981
|
-
const thresholds = this.settings.sync.sessions;
|
|
982
|
-
if (!thresholds) return null;
|
|
983
|
-
let stat;
|
|
984
|
-
try {
|
|
985
|
-
stat = await fs.stat(sessionFile);
|
|
986
|
-
} catch {
|
|
987
|
-
return null;
|
|
988
|
-
}
|
|
989
|
-
const size = stat.size;
|
|
990
|
-
let state = this.sessionDeltas.get(sessionFile);
|
|
991
|
-
if (!state) {
|
|
992
|
-
state = {
|
|
993
|
-
lastSize: 0,
|
|
994
|
-
pendingBytes: 0,
|
|
995
|
-
pendingMessages: 0
|
|
996
|
-
};
|
|
997
|
-
this.sessionDeltas.set(sessionFile, state);
|
|
998
|
-
}
|
|
999
|
-
const deltaBytes = Math.max(0, size - state.lastSize);
|
|
1000
|
-
if (deltaBytes === 0 && size === state.lastSize) return {
|
|
1001
|
-
deltaBytes: thresholds.deltaBytes,
|
|
1002
|
-
deltaMessages: thresholds.deltaMessages,
|
|
1003
|
-
pendingBytes: state.pendingBytes,
|
|
1004
|
-
pendingMessages: state.pendingMessages
|
|
1005
|
-
};
|
|
1006
|
-
if (size < state.lastSize) {
|
|
1007
|
-
state.lastSize = size;
|
|
1008
|
-
state.pendingBytes += size;
|
|
1009
|
-
if (thresholds.deltaMessages > 0 && (thresholds.deltaBytes <= 0 || state.pendingBytes < thresholds.deltaBytes)) state.pendingMessages += await this.countNewlines(sessionFile, 0, size);
|
|
1010
|
-
} else {
|
|
1011
|
-
state.pendingBytes += deltaBytes;
|
|
1012
|
-
if (thresholds.deltaMessages > 0 && (thresholds.deltaBytes <= 0 || state.pendingBytes < thresholds.deltaBytes)) state.pendingMessages += await this.countNewlines(sessionFile, state.lastSize, size);
|
|
1013
|
-
state.lastSize = size;
|
|
1014
|
-
}
|
|
1015
|
-
this.sessionDeltas.set(sessionFile, state);
|
|
1016
|
-
return {
|
|
1017
|
-
deltaBytes: thresholds.deltaBytes,
|
|
1018
|
-
deltaMessages: thresholds.deltaMessages,
|
|
1019
|
-
pendingBytes: state.pendingBytes,
|
|
1020
|
-
pendingMessages: state.pendingMessages
|
|
1021
|
-
};
|
|
1022
|
-
}
|
|
1023
|
-
async countNewlines(absPath, start, end) {
|
|
1024
|
-
if (end <= start) return 0;
|
|
1025
|
-
let handle;
|
|
1026
|
-
try {
|
|
1027
|
-
handle = await fs.open(absPath, "r");
|
|
1028
|
-
} catch (err) {
|
|
1029
|
-
if (isFileMissingError(err)) return 0;
|
|
1030
|
-
throw err;
|
|
1031
|
-
}
|
|
1032
|
-
try {
|
|
1033
|
-
let offset = start;
|
|
1034
|
-
let count = 0;
|
|
1035
|
-
const buffer = Buffer.alloc(SESSION_DELTA_READ_CHUNK_BYTES);
|
|
1036
|
-
while (offset < end) {
|
|
1037
|
-
const toRead = Math.min(buffer.length, end - offset);
|
|
1038
|
-
const { bytesRead } = await handle.read(buffer, 0, toRead, offset);
|
|
1039
|
-
if (bytesRead <= 0) break;
|
|
1040
|
-
for (let i = 0; i < bytesRead; i += 1) if (buffer[i] === 10) count += 1;
|
|
1041
|
-
offset += bytesRead;
|
|
1042
|
-
}
|
|
1043
|
-
return count;
|
|
1044
|
-
} finally {
|
|
1045
|
-
await handle.close();
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
resetSessionDelta(absPath, size) {
|
|
1049
|
-
const state = this.sessionDeltas.get(absPath);
|
|
1050
|
-
if (!state) return;
|
|
1051
|
-
state.lastSize = size;
|
|
1052
|
-
state.pendingBytes = 0;
|
|
1053
|
-
state.pendingMessages = 0;
|
|
1054
|
-
}
|
|
1055
|
-
isSessionFileForAgent(sessionFile) {
|
|
1056
|
-
if (!sessionFile) return false;
|
|
1057
|
-
const sessionsDir = resolveSessionTranscriptsDirForAgent(this.agentId);
|
|
1058
|
-
const resolvedFile = path.resolve(sessionFile);
|
|
1059
|
-
const resolvedDir = path.resolve(sessionsDir);
|
|
1060
|
-
return resolvedFile.startsWith(`${resolvedDir}${path.sep}`);
|
|
1061
|
-
}
|
|
1062
|
-
normalizeTargetSessionFiles(sessionFiles) {
|
|
1063
|
-
if (!sessionFiles || sessionFiles.length === 0) return null;
|
|
1064
|
-
const normalized = /* @__PURE__ */ new Set();
|
|
1065
|
-
for (const sessionFile of sessionFiles) {
|
|
1066
|
-
const trimmed = sessionFile.trim();
|
|
1067
|
-
if (!trimmed) continue;
|
|
1068
|
-
const resolved = path.resolve(trimmed);
|
|
1069
|
-
if (this.isSessionFileForAgent(resolved)) normalized.add(resolved);
|
|
1070
|
-
}
|
|
1071
|
-
return normalized.size > 0 ? normalized : null;
|
|
1072
|
-
}
|
|
1073
|
-
clearSyncedSessionFiles(targetSessionFiles) {
|
|
1074
|
-
if (!targetSessionFiles) this.sessionsDirtyFiles.clear();
|
|
1075
|
-
else for (const targetSessionFile of targetSessionFiles) this.sessionsDirtyFiles.delete(targetSessionFile);
|
|
1076
|
-
this.sessionsDirty = this.sessionsDirtyFiles.size > 0;
|
|
1077
|
-
}
|
|
1078
|
-
ensureIntervalSync() {
|
|
1079
|
-
const minutes = this.settings.sync.intervalMinutes;
|
|
1080
|
-
if (!minutes || minutes <= 0 || this.intervalTimer) return;
|
|
1081
|
-
const ms = minutes * 60 * 1e3;
|
|
1082
|
-
this.intervalTimer = setInterval(() => {
|
|
1083
|
-
runDetachedMemorySync(() => this.sync({ reason: "interval" }), "interval");
|
|
1084
|
-
}, ms);
|
|
1085
|
-
}
|
|
1086
|
-
scheduleWatchSync() {
|
|
1087
|
-
if (!this.sources.has("memory") || !this.settings.sync.watch) return;
|
|
1088
|
-
if (this.watchTimer) clearTimeout(this.watchTimer);
|
|
1089
|
-
this.watchTimer = setTimeout(() => {
|
|
1090
|
-
this.watchTimer = null;
|
|
1091
|
-
runDetachedMemorySync(() => this.sync({ reason: "watch" }), "watch");
|
|
1092
|
-
}, this.settings.sync.watchDebounceMs);
|
|
1093
|
-
}
|
|
1094
|
-
shouldSyncSessions(params, needsFullReindex = false) {
|
|
1095
|
-
if (!this.sources.has("sessions")) return false;
|
|
1096
|
-
if (params?.sessionFiles?.some((sessionFile) => sessionFile.trim().length > 0)) return true;
|
|
1097
|
-
if (params?.force) return true;
|
|
1098
|
-
if (needsFullReindex) return true;
|
|
1099
|
-
const reason = params?.reason;
|
|
1100
|
-
if (reason === "session-start" || reason === "watch") return false;
|
|
1101
|
-
return this.sessionsDirty && this.sessionsDirtyFiles.size > 0;
|
|
1102
|
-
}
|
|
1103
|
-
async syncMemoryFiles(params) {
|
|
1104
|
-
const selectSourceFileState = this.db.prepare(`SELECT path, hash FROM files WHERE source = ?`);
|
|
1105
|
-
const deleteFileByPathAndSource = this.db.prepare(`DELETE FROM files WHERE path = ? AND source = ?`);
|
|
1106
|
-
const deleteChunksByPathAndSource = this.db.prepare(`DELETE FROM chunks WHERE path = ? AND source = ?`);
|
|
1107
|
-
const deleteVectorRowsByPathAndSource = this.vector.enabled && this.vector.available ? this.db.prepare(`DELETE FROM ${VECTOR_TABLE$2} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`) : null;
|
|
1108
|
-
const deleteFtsRowsByPathAndSource = this.fts.enabled && this.fts.available ? this.db.prepare(`DELETE FROM ${FTS_TABLE$2} WHERE path = ? AND source = ?`) : null;
|
|
1109
|
-
const fileEntries = (await runWithConcurrency((await listMemoryFiles(this.workspaceDir, this.settings.extraPaths, this.settings.multimodal)).map((file) => async () => await buildFileEntry(file, this.workspaceDir, this.settings.multimodal)), this.getIndexConcurrency())).filter((entry) => entry !== null);
|
|
1110
|
-
log$2.debug("memory sync: indexing memory files", {
|
|
1111
|
-
files: fileEntries.length,
|
|
1112
|
-
needsFullReindex: params.needsFullReindex,
|
|
1113
|
-
batch: this.batch.enabled,
|
|
1114
|
-
concurrency: this.getIndexConcurrency()
|
|
1115
|
-
});
|
|
1116
|
-
const existingRows = selectSourceFileState.all("memory");
|
|
1117
|
-
const existingHashes = new Map(existingRows.map((row) => [row.path, row.hash]));
|
|
1118
|
-
const activePaths = new Set(fileEntries.map((entry) => entry.path));
|
|
1119
|
-
if (params.progress) {
|
|
1120
|
-
params.progress.total += fileEntries.length;
|
|
1121
|
-
params.progress.report({
|
|
1122
|
-
completed: params.progress.completed,
|
|
1123
|
-
total: params.progress.total,
|
|
1124
|
-
label: this.batch.enabled ? "Indexing memory files (batch)..." : "Indexing memory files…"
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
await runWithConcurrency(fileEntries.map((entry) => async () => {
|
|
1128
|
-
if (!params.needsFullReindex && existingHashes.get(entry.path) === entry.hash) {
|
|
1129
|
-
if (params.progress) {
|
|
1130
|
-
params.progress.completed += 1;
|
|
1131
|
-
params.progress.report({
|
|
1132
|
-
completed: params.progress.completed,
|
|
1133
|
-
total: params.progress.total
|
|
1134
|
-
});
|
|
1135
|
-
}
|
|
1136
|
-
return;
|
|
1137
|
-
}
|
|
1138
|
-
await this.indexFile(entry, { source: "memory" });
|
|
1139
|
-
if (params.progress) {
|
|
1140
|
-
params.progress.completed += 1;
|
|
1141
|
-
params.progress.report({
|
|
1142
|
-
completed: params.progress.completed,
|
|
1143
|
-
total: params.progress.total
|
|
1144
|
-
});
|
|
1145
|
-
}
|
|
1146
|
-
}), this.getIndexConcurrency());
|
|
1147
|
-
for (const stale of existingRows) {
|
|
1148
|
-
if (activePaths.has(stale.path)) continue;
|
|
1149
|
-
deleteFileByPathAndSource.run(stale.path, "memory");
|
|
1150
|
-
if (deleteVectorRowsByPathAndSource) try {
|
|
1151
|
-
deleteVectorRowsByPathAndSource.run(stale.path, "memory");
|
|
1152
|
-
} catch {}
|
|
1153
|
-
deleteChunksByPathAndSource.run(stale.path, "memory");
|
|
1154
|
-
if (deleteFtsRowsByPathAndSource) try {
|
|
1155
|
-
deleteFtsRowsByPathAndSource.run(stale.path, "memory");
|
|
1156
|
-
} catch {}
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
async syncSessionFiles(params) {
|
|
1160
|
-
const selectFileHash = this.db.prepare(`SELECT hash FROM files WHERE path = ? AND source = ?`);
|
|
1161
|
-
const selectSourceFileState = this.db.prepare(`SELECT path, hash FROM files WHERE source = ?`);
|
|
1162
|
-
const deleteFileByPathAndSource = this.db.prepare(`DELETE FROM files WHERE path = ? AND source = ?`);
|
|
1163
|
-
const deleteChunksByPathAndSource = this.db.prepare(`DELETE FROM chunks WHERE path = ? AND source = ?`);
|
|
1164
|
-
const deleteVectorRowsByPathAndSource = this.vector.enabled && this.vector.available ? this.db.prepare(`DELETE FROM ${VECTOR_TABLE$2} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`) : null;
|
|
1165
|
-
const deleteFtsRowsByPathSourceAndModel = this.fts.enabled && this.fts.available ? this.db.prepare(`DELETE FROM ${FTS_TABLE$2} WHERE path = ? AND source = ? AND model = ?`) : null;
|
|
1166
|
-
const targetSessionFiles = params.needsFullReindex ? null : this.normalizeTargetSessionFiles(params.targetSessionFiles);
|
|
1167
|
-
const files = targetSessionFiles ? Array.from(targetSessionFiles) : await listSessionFilesForAgent(this.agentId);
|
|
1168
|
-
const activePaths = targetSessionFiles ? null : new Set(files.map((file) => sessionPathForFile(file)));
|
|
1169
|
-
const existingRows = activePaths === null ? null : selectSourceFileState.all("sessions");
|
|
1170
|
-
const existingHashes = existingRows === null ? null : new Map(existingRows.map((row) => [row.path, row.hash]));
|
|
1171
|
-
const indexAll = params.needsFullReindex || Boolean(targetSessionFiles) || this.sessionsDirtyFiles.size === 0;
|
|
1172
|
-
log$2.debug("memory sync: indexing session files", {
|
|
1173
|
-
files: files.length,
|
|
1174
|
-
indexAll,
|
|
1175
|
-
dirtyFiles: this.sessionsDirtyFiles.size,
|
|
1176
|
-
targetedFiles: targetSessionFiles?.size ?? 0,
|
|
1177
|
-
batch: this.batch.enabled,
|
|
1178
|
-
concurrency: this.getIndexConcurrency()
|
|
1179
|
-
});
|
|
1180
|
-
if (params.progress) {
|
|
1181
|
-
params.progress.total += files.length;
|
|
1182
|
-
params.progress.report({
|
|
1183
|
-
completed: params.progress.completed,
|
|
1184
|
-
total: params.progress.total,
|
|
1185
|
-
label: this.batch.enabled ? "Indexing session files (batch)..." : "Indexing session files…"
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
await runWithConcurrency(files.map((absPath) => async () => {
|
|
1189
|
-
if (!indexAll && !this.sessionsDirtyFiles.has(absPath)) {
|
|
1190
|
-
if (params.progress) {
|
|
1191
|
-
params.progress.completed += 1;
|
|
1192
|
-
params.progress.report({
|
|
1193
|
-
completed: params.progress.completed,
|
|
1194
|
-
total: params.progress.total
|
|
1195
|
-
});
|
|
1196
|
-
}
|
|
1197
|
-
return;
|
|
1198
|
-
}
|
|
1199
|
-
const entry = await buildSessionEntry(absPath);
|
|
1200
|
-
if (!entry) {
|
|
1201
|
-
if (params.progress) {
|
|
1202
|
-
params.progress.completed += 1;
|
|
1203
|
-
params.progress.report({
|
|
1204
|
-
completed: params.progress.completed,
|
|
1205
|
-
total: params.progress.total
|
|
1206
|
-
});
|
|
1207
|
-
}
|
|
1208
|
-
return;
|
|
1209
|
-
}
|
|
1210
|
-
const existingHash = existingHashes?.get(entry.path) ?? selectFileHash.get(entry.path, "sessions")?.hash;
|
|
1211
|
-
if (!params.needsFullReindex && existingHash === entry.hash) {
|
|
1212
|
-
if (params.progress) {
|
|
1213
|
-
params.progress.completed += 1;
|
|
1214
|
-
params.progress.report({
|
|
1215
|
-
completed: params.progress.completed,
|
|
1216
|
-
total: params.progress.total
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
|
-
this.resetSessionDelta(absPath, entry.size);
|
|
1220
|
-
return;
|
|
1221
|
-
}
|
|
1222
|
-
await this.indexFile(entry, {
|
|
1223
|
-
source: "sessions",
|
|
1224
|
-
content: entry.content
|
|
1225
|
-
});
|
|
1226
|
-
this.resetSessionDelta(absPath, entry.size);
|
|
1227
|
-
if (params.progress) {
|
|
1228
|
-
params.progress.completed += 1;
|
|
1229
|
-
params.progress.report({
|
|
1230
|
-
completed: params.progress.completed,
|
|
1231
|
-
total: params.progress.total
|
|
1232
|
-
});
|
|
1233
|
-
}
|
|
1234
|
-
}), this.getIndexConcurrency());
|
|
1235
|
-
if (activePaths === null) return;
|
|
1236
|
-
for (const stale of existingRows ?? []) {
|
|
1237
|
-
if (activePaths.has(stale.path)) continue;
|
|
1238
|
-
deleteFileByPathAndSource.run(stale.path, "sessions");
|
|
1239
|
-
if (deleteVectorRowsByPathAndSource) try {
|
|
1240
|
-
deleteVectorRowsByPathAndSource.run(stale.path, "sessions");
|
|
1241
|
-
} catch {}
|
|
1242
|
-
deleteChunksByPathAndSource.run(stale.path, "sessions");
|
|
1243
|
-
if (deleteFtsRowsByPathSourceAndModel) try {
|
|
1244
|
-
deleteFtsRowsByPathSourceAndModel.run(stale.path, "sessions", this.provider?.model ?? "fts-only");
|
|
1245
|
-
} catch {}
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
createSyncProgress(onProgress) {
|
|
1249
|
-
const state = {
|
|
1250
|
-
completed: 0,
|
|
1251
|
-
total: 0,
|
|
1252
|
-
label: void 0,
|
|
1253
|
-
report: (update) => {
|
|
1254
|
-
if (update.label) state.label = update.label;
|
|
1255
|
-
const label = update.total > 0 && state.label ? `${state.label} ${update.completed}/${update.total}` : state.label;
|
|
1256
|
-
onProgress({
|
|
1257
|
-
completed: update.completed,
|
|
1258
|
-
total: update.total,
|
|
1259
|
-
label
|
|
1260
|
-
});
|
|
1261
|
-
}
|
|
1262
|
-
};
|
|
1263
|
-
return state;
|
|
1264
|
-
}
|
|
1265
|
-
async runSync(params) {
|
|
1266
|
-
const progress = params?.progress ? this.createSyncProgress(params.progress) : void 0;
|
|
1267
|
-
if (progress) progress.report({
|
|
1268
|
-
completed: progress.completed,
|
|
1269
|
-
total: progress.total,
|
|
1270
|
-
label: "Loading vector extension…"
|
|
1271
|
-
});
|
|
1272
|
-
const vectorReady = await this.ensureVectorReady();
|
|
1273
|
-
const meta = this.readMeta();
|
|
1274
|
-
const configuredSources = this.resolveConfiguredSourcesForMeta();
|
|
1275
|
-
const configuredScopeHash = this.resolveConfiguredScopeHash();
|
|
1276
|
-
const targetSessionFiles = this.normalizeTargetSessionFiles(params?.sessionFiles);
|
|
1277
|
-
const hasTargetSessionFiles = targetSessionFiles !== null;
|
|
1278
|
-
if (hasTargetSessionFiles && targetSessionFiles && this.sources.has("sessions")) {
|
|
1279
|
-
try {
|
|
1280
|
-
await this.syncSessionFiles({
|
|
1281
|
-
needsFullReindex: false,
|
|
1282
|
-
targetSessionFiles: Array.from(targetSessionFiles),
|
|
1283
|
-
progress: progress ?? void 0
|
|
1284
|
-
});
|
|
1285
|
-
this.clearSyncedSessionFiles(targetSessionFiles);
|
|
1286
|
-
} catch (err) {
|
|
1287
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
1288
|
-
if (this.shouldFallbackOnError(reason) && await this.activateFallbackProvider(reason)) {
|
|
1289
|
-
if (process.env.OPENCLAW_TEST_FAST === "1" && process.env.OPENCLAW_TEST_MEMORY_UNSAFE_REINDEX === "1") await this.runUnsafeReindex({
|
|
1290
|
-
reason: params?.reason,
|
|
1291
|
-
force: true,
|
|
1292
|
-
progress: progress ?? void 0
|
|
1293
|
-
});
|
|
1294
|
-
else await this.runSafeReindex({
|
|
1295
|
-
reason: params?.reason,
|
|
1296
|
-
force: true,
|
|
1297
|
-
progress: progress ?? void 0
|
|
1298
|
-
});
|
|
1299
|
-
return;
|
|
1300
|
-
}
|
|
1301
|
-
throw err;
|
|
1302
|
-
}
|
|
1303
|
-
return;
|
|
1304
|
-
}
|
|
1305
|
-
const needsFullReindex = params?.force && !hasTargetSessionFiles || !meta || (this.provider ? meta.model !== this.provider.model : meta.model !== "fts-only") || (this.provider ? meta.provider !== this.provider.id : meta.provider !== "none") || meta.providerKey !== this.providerKey || this.metaSourcesDiffer(meta, configuredSources) || meta.scopeHash !== configuredScopeHash || meta.chunkTokens !== this.settings.chunking.tokens || meta.chunkOverlap !== this.settings.chunking.overlap || vectorReady && !meta?.vectorDims || (meta.ftsTokenizer ?? "unicode61") !== this.settings.store.fts.tokenizer;
|
|
1306
|
-
try {
|
|
1307
|
-
if (needsFullReindex) {
|
|
1308
|
-
if (process.env.OPENCLAW_TEST_FAST === "1" && process.env.OPENCLAW_TEST_MEMORY_UNSAFE_REINDEX === "1") await this.runUnsafeReindex({
|
|
1309
|
-
reason: params?.reason,
|
|
1310
|
-
force: params?.force,
|
|
1311
|
-
progress: progress ?? void 0
|
|
1312
|
-
});
|
|
1313
|
-
else await this.runSafeReindex({
|
|
1314
|
-
reason: params?.reason,
|
|
1315
|
-
force: params?.force,
|
|
1316
|
-
progress: progress ?? void 0
|
|
1317
|
-
});
|
|
1318
|
-
return;
|
|
1319
|
-
}
|
|
1320
|
-
const shouldSyncMemory = this.sources.has("memory") && (!hasTargetSessionFiles && params?.force || needsFullReindex || this.dirty);
|
|
1321
|
-
const shouldSyncSessions = this.shouldSyncSessions(params, needsFullReindex);
|
|
1322
|
-
if (shouldSyncMemory) {
|
|
1323
|
-
await this.syncMemoryFiles({
|
|
1324
|
-
needsFullReindex,
|
|
1325
|
-
progress: progress ?? void 0
|
|
1326
|
-
});
|
|
1327
|
-
this.dirty = false;
|
|
1328
|
-
}
|
|
1329
|
-
if (shouldSyncSessions) {
|
|
1330
|
-
await this.syncSessionFiles({
|
|
1331
|
-
needsFullReindex,
|
|
1332
|
-
targetSessionFiles: targetSessionFiles ? Array.from(targetSessionFiles) : void 0,
|
|
1333
|
-
progress: progress ?? void 0
|
|
1334
|
-
});
|
|
1335
|
-
this.sessionsDirty = false;
|
|
1336
|
-
this.sessionsDirtyFiles.clear();
|
|
1337
|
-
} else if (this.sessionsDirtyFiles.size > 0) this.sessionsDirty = true;
|
|
1338
|
-
else this.sessionsDirty = false;
|
|
1339
|
-
} catch (err) {
|
|
1340
|
-
const reason = err instanceof Error ? err.message : String(err);
|
|
1341
|
-
if (this.shouldFallbackOnError(reason) && await this.activateFallbackProvider(reason)) {
|
|
1342
|
-
await this.runSafeReindex({
|
|
1343
|
-
reason: params?.reason ?? "fallback",
|
|
1344
|
-
force: true,
|
|
1345
|
-
progress: progress ?? void 0
|
|
1346
|
-
});
|
|
1347
|
-
return;
|
|
1348
|
-
}
|
|
1349
|
-
throw err;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
shouldFallbackOnError(message) {
|
|
1353
|
-
return /embedding|embeddings|batch/i.test(message);
|
|
1354
|
-
}
|
|
1355
|
-
resolveBatchConfig() {
|
|
1356
|
-
const batch = this.settings.remote?.batch;
|
|
1357
|
-
return {
|
|
1358
|
-
enabled: Boolean(batch?.enabled && this.provider && this.providerRuntime?.batchEmbed),
|
|
1359
|
-
wait: batch?.wait ?? true,
|
|
1360
|
-
concurrency: Math.max(1, batch?.concurrency ?? 2),
|
|
1361
|
-
pollIntervalMs: batch?.pollIntervalMs ?? 2e3,
|
|
1362
|
-
timeoutMs: (batch?.timeoutMinutes ?? 60) * 60 * 1e3
|
|
1363
|
-
};
|
|
1364
|
-
}
|
|
1365
|
-
async activateFallbackProvider(reason) {
|
|
1366
|
-
const fallback = this.settings.fallback;
|
|
1367
|
-
if (!fallback || fallback === "none" || !this.provider || fallback === this.provider.id) return false;
|
|
1368
|
-
if (this.fallbackFrom) return false;
|
|
1369
|
-
const fallbackFrom = this.provider.id;
|
|
1370
|
-
const fallbackModel = resolveEmbeddingProviderFallbackModel(fallback, this.settings.model);
|
|
1371
|
-
const fallbackResult = await createEmbeddingProvider({
|
|
1372
|
-
config: this.cfg,
|
|
1373
|
-
agentDir: resolveAgentDir(this.cfg, this.agentId),
|
|
1374
|
-
provider: fallback,
|
|
1375
|
-
remote: this.settings.remote,
|
|
1376
|
-
model: fallbackModel,
|
|
1377
|
-
outputDimensionality: this.settings.outputDimensionality,
|
|
1378
|
-
fallback: "none",
|
|
1379
|
-
local: this.settings.local
|
|
1380
|
-
});
|
|
1381
|
-
this.fallbackFrom = fallbackFrom;
|
|
1382
|
-
this.fallbackReason = reason;
|
|
1383
|
-
this.provider = fallbackResult.provider;
|
|
1384
|
-
this.providerRuntime = fallbackResult.runtime;
|
|
1385
|
-
this.providerKey = this.computeProviderKey();
|
|
1386
|
-
this.batch = this.resolveBatchConfig();
|
|
1387
|
-
log$2.warn(`memory embeddings: switched to fallback provider (${fallback})`, { reason });
|
|
1388
|
-
return true;
|
|
1389
|
-
}
|
|
1390
|
-
async runSafeReindex(params) {
|
|
1391
|
-
const dbPath = resolveUserPath(this.settings.store.path);
|
|
1392
|
-
const tempDbPath = `${dbPath}.tmp-${randomUUID()}`;
|
|
1393
|
-
const tempDb = openMemoryDatabaseAtPath(tempDbPath, this.settings.store.vector.enabled);
|
|
1394
|
-
const originalDb = this.db;
|
|
1395
|
-
let originalDbClosed = false;
|
|
1396
|
-
const originalState = {
|
|
1397
|
-
ftsAvailable: this.fts.available,
|
|
1398
|
-
ftsError: this.fts.loadError,
|
|
1399
|
-
vectorAvailable: this.vector.available,
|
|
1400
|
-
vectorLoadError: this.vector.loadError,
|
|
1401
|
-
vectorDims: this.vector.dims,
|
|
1402
|
-
vectorReady: this.vectorReady
|
|
1403
|
-
};
|
|
1404
|
-
const restoreOriginalState = () => {
|
|
1405
|
-
if (originalDbClosed) this.db = openMemoryDatabaseAtPath(dbPath, this.settings.store.vector.enabled);
|
|
1406
|
-
else this.db = originalDb;
|
|
1407
|
-
this.fts.available = originalState.ftsAvailable;
|
|
1408
|
-
this.fts.loadError = originalState.ftsError;
|
|
1409
|
-
this.vector.available = originalDbClosed ? null : originalState.vectorAvailable;
|
|
1410
|
-
this.vector.loadError = originalState.vectorLoadError;
|
|
1411
|
-
this.vector.dims = originalState.vectorDims;
|
|
1412
|
-
this.vectorReady = originalDbClosed ? null : originalState.vectorReady;
|
|
1413
|
-
};
|
|
1414
|
-
this.db = tempDb;
|
|
1415
|
-
this.vectorReady = null;
|
|
1416
|
-
this.vector.available = null;
|
|
1417
|
-
this.vector.loadError = void 0;
|
|
1418
|
-
this.vector.dims = void 0;
|
|
1419
|
-
this.fts.available = false;
|
|
1420
|
-
this.fts.loadError = void 0;
|
|
1421
|
-
this.ensureSchema();
|
|
1422
|
-
let nextMeta = null;
|
|
1423
|
-
try {
|
|
1424
|
-
this.seedEmbeddingCache(originalDb);
|
|
1425
|
-
const shouldSyncMemory = this.sources.has("memory");
|
|
1426
|
-
const shouldSyncSessions = this.shouldSyncSessions({
|
|
1427
|
-
reason: params.reason,
|
|
1428
|
-
force: params.force
|
|
1429
|
-
}, true);
|
|
1430
|
-
if (shouldSyncMemory) {
|
|
1431
|
-
await this.syncMemoryFiles({
|
|
1432
|
-
needsFullReindex: true,
|
|
1433
|
-
progress: params.progress
|
|
1434
|
-
});
|
|
1435
|
-
this.dirty = false;
|
|
1436
|
-
}
|
|
1437
|
-
if (shouldSyncSessions) {
|
|
1438
|
-
await this.syncSessionFiles({
|
|
1439
|
-
needsFullReindex: true,
|
|
1440
|
-
progress: params.progress
|
|
1441
|
-
});
|
|
1442
|
-
this.sessionsDirty = false;
|
|
1443
|
-
this.sessionsDirtyFiles.clear();
|
|
1444
|
-
} else if (this.sessionsDirtyFiles.size > 0) this.sessionsDirty = true;
|
|
1445
|
-
else this.sessionsDirty = false;
|
|
1446
|
-
nextMeta = {
|
|
1447
|
-
model: this.provider?.model ?? "fts-only",
|
|
1448
|
-
provider: this.provider?.id ?? "none",
|
|
1449
|
-
providerKey: this.providerKey,
|
|
1450
|
-
sources: this.resolveConfiguredSourcesForMeta(),
|
|
1451
|
-
scopeHash: this.resolveConfiguredScopeHash(),
|
|
1452
|
-
chunkTokens: this.settings.chunking.tokens,
|
|
1453
|
-
chunkOverlap: this.settings.chunking.overlap,
|
|
1454
|
-
ftsTokenizer: this.settings.store.fts.tokenizer
|
|
1455
|
-
};
|
|
1456
|
-
if (!nextMeta) throw new Error("Failed to compute memory index metadata for reindexing.");
|
|
1457
|
-
if (this.vector.available && this.vector.dims) nextMeta.vectorDims = this.vector.dims;
|
|
1458
|
-
this.writeMeta(nextMeta);
|
|
1459
|
-
this.pruneEmbeddingCacheIfNeeded?.();
|
|
1460
|
-
this.db.close();
|
|
1461
|
-
originalDb.close();
|
|
1462
|
-
originalDbClosed = true;
|
|
1463
|
-
await this.swapIndexFiles(dbPath, tempDbPath);
|
|
1464
|
-
this.db = openMemoryDatabaseAtPath(dbPath, this.settings.store.vector.enabled);
|
|
1465
|
-
this.vectorReady = null;
|
|
1466
|
-
this.vector.available = null;
|
|
1467
|
-
this.vector.loadError = void 0;
|
|
1468
|
-
this.ensureSchema();
|
|
1469
|
-
this.vector.dims = nextMeta?.vectorDims;
|
|
1470
|
-
} catch (err) {
|
|
1471
|
-
try {
|
|
1472
|
-
this.db.close();
|
|
1473
|
-
} catch {}
|
|
1474
|
-
await this.removeIndexFiles(tempDbPath);
|
|
1475
|
-
restoreOriginalState();
|
|
1476
|
-
throw err;
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
async runUnsafeReindex(params) {
|
|
1480
|
-
this.resetIndex();
|
|
1481
|
-
const shouldSyncMemory = this.sources.has("memory");
|
|
1482
|
-
const shouldSyncSessions = this.shouldSyncSessions({
|
|
1483
|
-
reason: params.reason,
|
|
1484
|
-
force: params.force
|
|
1485
|
-
}, true);
|
|
1486
|
-
if (shouldSyncMemory) {
|
|
1487
|
-
await this.syncMemoryFiles({
|
|
1488
|
-
needsFullReindex: true,
|
|
1489
|
-
progress: params.progress
|
|
1490
|
-
});
|
|
1491
|
-
this.dirty = false;
|
|
1492
|
-
}
|
|
1493
|
-
if (shouldSyncSessions) {
|
|
1494
|
-
await this.syncSessionFiles({
|
|
1495
|
-
needsFullReindex: true,
|
|
1496
|
-
progress: params.progress
|
|
1497
|
-
});
|
|
1498
|
-
this.sessionsDirty = false;
|
|
1499
|
-
this.sessionsDirtyFiles.clear();
|
|
1500
|
-
} else if (this.sessionsDirtyFiles.size > 0) this.sessionsDirty = true;
|
|
1501
|
-
else this.sessionsDirty = false;
|
|
1502
|
-
const nextMeta = {
|
|
1503
|
-
model: this.provider?.model ?? "fts-only",
|
|
1504
|
-
provider: this.provider?.id ?? "none",
|
|
1505
|
-
providerKey: this.providerKey,
|
|
1506
|
-
sources: this.resolveConfiguredSourcesForMeta(),
|
|
1507
|
-
scopeHash: this.resolveConfiguredScopeHash(),
|
|
1508
|
-
chunkTokens: this.settings.chunking.tokens,
|
|
1509
|
-
chunkOverlap: this.settings.chunking.overlap,
|
|
1510
|
-
ftsTokenizer: this.settings.store.fts.tokenizer
|
|
1511
|
-
};
|
|
1512
|
-
if (this.vector.available && this.vector.dims) nextMeta.vectorDims = this.vector.dims;
|
|
1513
|
-
this.writeMeta(nextMeta);
|
|
1514
|
-
this.pruneEmbeddingCacheIfNeeded?.();
|
|
1515
|
-
}
|
|
1516
|
-
resetIndex() {
|
|
1517
|
-
this.db.exec(`DELETE FROM files`);
|
|
1518
|
-
this.db.exec(`DELETE FROM chunks`);
|
|
1519
|
-
if (this.fts.enabled && this.fts.available) try {
|
|
1520
|
-
this.db.exec(`DROP TABLE IF EXISTS ${FTS_TABLE$2}`);
|
|
1521
|
-
} catch {}
|
|
1522
|
-
this.ensureSchema();
|
|
1523
|
-
this.dropVectorTable();
|
|
1524
|
-
this.vector.dims = void 0;
|
|
1525
|
-
this.sessionsDirtyFiles.clear();
|
|
1526
|
-
}
|
|
1527
|
-
readMeta() {
|
|
1528
|
-
const row = this.db.prepare(`SELECT value FROM meta WHERE key = ?`).get(META_KEY);
|
|
1529
|
-
if (!row?.value) {
|
|
1530
|
-
this.lastMetaSerialized = null;
|
|
1531
|
-
return null;
|
|
1532
|
-
}
|
|
1533
|
-
try {
|
|
1534
|
-
const parsed = JSON.parse(row.value);
|
|
1535
|
-
this.lastMetaSerialized = row.value;
|
|
1536
|
-
return parsed;
|
|
1537
|
-
} catch {
|
|
1538
|
-
this.lastMetaSerialized = null;
|
|
1539
|
-
return null;
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
writeMeta(meta) {
|
|
1543
|
-
const value = JSON.stringify(meta);
|
|
1544
|
-
if (this.lastMetaSerialized === value) return;
|
|
1545
|
-
this.db.prepare(`INSERT INTO meta (key, value) VALUES (?, ?) ON CONFLICT(key) DO UPDATE SET value=excluded.value`).run(META_KEY, value);
|
|
1546
|
-
this.lastMetaSerialized = value;
|
|
1547
|
-
}
|
|
1548
|
-
resolveConfiguredSourcesForMeta() {
|
|
1549
|
-
const normalized = Array.from(this.sources).filter((source) => source === "memory" || source === "sessions").toSorted();
|
|
1550
|
-
return normalized.length > 0 ? normalized : ["memory"];
|
|
1551
|
-
}
|
|
1552
|
-
normalizeMetaSources(meta) {
|
|
1553
|
-
if (!Array.isArray(meta.sources)) return ["memory"];
|
|
1554
|
-
const normalized = Array.from(new Set(meta.sources.filter((source) => source === "memory" || source === "sessions"))).toSorted();
|
|
1555
|
-
return normalized.length > 0 ? normalized : ["memory"];
|
|
1556
|
-
}
|
|
1557
|
-
resolveConfiguredScopeHash() {
|
|
1558
|
-
const extraPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths).map((value) => value.replace(/\\/g, "/")).toSorted();
|
|
1559
|
-
return hashText(JSON.stringify({
|
|
1560
|
-
extraPaths,
|
|
1561
|
-
multimodal: {
|
|
1562
|
-
enabled: this.settings.multimodal.enabled,
|
|
1563
|
-
modalities: [...this.settings.multimodal.modalities].toSorted(),
|
|
1564
|
-
maxFileBytes: this.settings.multimodal.maxFileBytes
|
|
1565
|
-
}
|
|
1566
|
-
}));
|
|
1567
|
-
}
|
|
1568
|
-
metaSourcesDiffer(meta, configuredSources) {
|
|
1569
|
-
const metaSources = this.normalizeMetaSources(meta);
|
|
1570
|
-
if (metaSources.length !== configuredSources.length) return true;
|
|
1571
|
-
return metaSources.some((source, index) => source !== configuredSources[index]);
|
|
1572
|
-
}
|
|
1573
|
-
};
|
|
1574
|
-
//#endregion
|
|
1575
|
-
//#region extensions/memory-core/src/memory/manager-embedding-ops.ts
|
|
1576
|
-
const VECTOR_TABLE$1 = "chunks_vec";
|
|
1577
|
-
const FTS_TABLE$1 = "chunks_fts";
|
|
1578
|
-
const EMBEDDING_CACHE_TABLE$1 = "embedding_cache";
|
|
1579
|
-
const EMBEDDING_BATCH_MAX_TOKENS = 8e3;
|
|
1580
|
-
const EMBEDDING_INDEX_CONCURRENCY = 4;
|
|
1581
|
-
const EMBEDDING_RETRY_MAX_ATTEMPTS = 3;
|
|
1582
|
-
const EMBEDDING_RETRY_BASE_DELAY_MS = 500;
|
|
1583
|
-
const EMBEDDING_RETRY_MAX_DELAY_MS = 8e3;
|
|
1584
|
-
const BATCH_FAILURE_LIMIT$1 = 2;
|
|
1585
|
-
const EMBEDDING_QUERY_TIMEOUT_REMOTE_MS = 6e4;
|
|
1586
|
-
const EMBEDDING_QUERY_TIMEOUT_LOCAL_MS = 5 * 6e4;
|
|
1587
|
-
const EMBEDDING_BATCH_TIMEOUT_REMOTE_MS = 2 * 6e4;
|
|
1588
|
-
const EMBEDDING_BATCH_TIMEOUT_LOCAL_MS = 10 * 6e4;
|
|
1589
|
-
const vectorToBlob$1 = (embedding) => Buffer.from(new Float32Array(embedding).buffer);
|
|
1590
|
-
const log$1 = createSubsystemLogger("memory");
|
|
1591
|
-
var MemoryManagerEmbeddingOps = class extends MemoryManagerSyncOps {
|
|
1592
|
-
buildEmbeddingBatches(chunks) {
|
|
1593
|
-
const batches = [];
|
|
1594
|
-
let current = [];
|
|
1595
|
-
let currentTokens = 0;
|
|
1596
|
-
for (const chunk of chunks) {
|
|
1597
|
-
const estimate = chunk.embeddingInput ? estimateStructuredEmbeddingInputBytes(chunk.embeddingInput) : estimateUtf8Bytes(chunk.text);
|
|
1598
|
-
if (current.length > 0 && currentTokens + estimate > EMBEDDING_BATCH_MAX_TOKENS) {
|
|
1599
|
-
batches.push(current);
|
|
1600
|
-
current = [];
|
|
1601
|
-
currentTokens = 0;
|
|
1602
|
-
}
|
|
1603
|
-
if (current.length === 0 && estimate > EMBEDDING_BATCH_MAX_TOKENS) {
|
|
1604
|
-
batches.push([chunk]);
|
|
1605
|
-
continue;
|
|
1606
|
-
}
|
|
1607
|
-
current.push(chunk);
|
|
1608
|
-
currentTokens += estimate;
|
|
1609
|
-
}
|
|
1610
|
-
if (current.length > 0) batches.push(current);
|
|
1611
|
-
return batches;
|
|
1612
|
-
}
|
|
1613
|
-
loadEmbeddingCache(hashes) {
|
|
1614
|
-
if (!this.cache.enabled || !this.provider) return /* @__PURE__ */ new Map();
|
|
1615
|
-
if (hashes.length === 0) return /* @__PURE__ */ new Map();
|
|
1616
|
-
const unique = [];
|
|
1617
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1618
|
-
for (const hash of hashes) {
|
|
1619
|
-
if (!hash) continue;
|
|
1620
|
-
if (seen.has(hash)) continue;
|
|
1621
|
-
seen.add(hash);
|
|
1622
|
-
unique.push(hash);
|
|
1623
|
-
}
|
|
1624
|
-
if (unique.length === 0) return /* @__PURE__ */ new Map();
|
|
1625
|
-
const out = /* @__PURE__ */ new Map();
|
|
1626
|
-
const baseParams = [
|
|
1627
|
-
this.provider.id,
|
|
1628
|
-
this.provider.model,
|
|
1629
|
-
this.providerKey
|
|
1630
|
-
];
|
|
1631
|
-
const batchSize = 400;
|
|
1632
|
-
for (let start = 0; start < unique.length; start += batchSize) {
|
|
1633
|
-
const batch = unique.slice(start, start + batchSize);
|
|
1634
|
-
const placeholders = batch.map(() => "?").join(", ");
|
|
1635
|
-
const rows = this.db.prepare(`SELECT hash, embedding FROM ${EMBEDDING_CACHE_TABLE$1}\n WHERE provider = ? AND model = ? AND provider_key = ? AND hash IN (${placeholders})`).all(...baseParams, ...batch);
|
|
1636
|
-
for (const row of rows) out.set(row.hash, parseEmbedding(row.embedding));
|
|
1637
|
-
}
|
|
1638
|
-
return out;
|
|
1639
|
-
}
|
|
1640
|
-
upsertEmbeddingCache(entries) {
|
|
1641
|
-
if (!this.cache.enabled || !this.provider) return;
|
|
1642
|
-
if (entries.length === 0) return;
|
|
1643
|
-
const now = Date.now();
|
|
1644
|
-
const stmt = this.db.prepare(`INSERT INTO ${EMBEDDING_CACHE_TABLE$1} (provider, model, provider_key, hash, embedding, dims, updated_at)\n VALUES (?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT(provider, model, provider_key, hash) DO UPDATE SET\n embedding=excluded.embedding,\n dims=excluded.dims,\n updated_at=excluded.updated_at`);
|
|
1645
|
-
for (const entry of entries) {
|
|
1646
|
-
const embedding = entry.embedding ?? [];
|
|
1647
|
-
stmt.run(this.provider.id, this.provider.model, this.providerKey, entry.hash, JSON.stringify(embedding), embedding.length, now);
|
|
1648
|
-
}
|
|
1649
|
-
}
|
|
1650
|
-
pruneEmbeddingCacheIfNeeded() {
|
|
1651
|
-
if (!this.cache.enabled) return;
|
|
1652
|
-
const max = this.cache.maxEntries;
|
|
1653
|
-
if (!max || max <= 0) return;
|
|
1654
|
-
const count = this.db.prepare(`SELECT COUNT(*) as c FROM ${EMBEDDING_CACHE_TABLE$1}`).get()?.c ?? 0;
|
|
1655
|
-
if (count <= max) return;
|
|
1656
|
-
const excess = count - max;
|
|
1657
|
-
this.db.prepare(`DELETE FROM ${EMBEDDING_CACHE_TABLE$1}\n WHERE rowid IN (\n SELECT rowid FROM ${EMBEDDING_CACHE_TABLE$1}\n ORDER BY updated_at ASC\n LIMIT ?\n )`).run(excess);
|
|
1658
|
-
}
|
|
1659
|
-
async embedChunksInBatches(chunks) {
|
|
1660
|
-
if (chunks.length === 0) return [];
|
|
1661
|
-
const { embeddings, missing } = this.collectCachedEmbeddings(chunks);
|
|
1662
|
-
if (missing.length === 0) return embeddings;
|
|
1663
|
-
const missingChunks = missing.map((m) => m.chunk);
|
|
1664
|
-
const batches = this.buildEmbeddingBatches(missingChunks);
|
|
1665
|
-
const toCache = [];
|
|
1666
|
-
const provider = this.provider;
|
|
1667
|
-
if (!provider) throw new Error("Cannot embed batch in FTS-only mode (no embedding provider)");
|
|
1668
|
-
let cursor = 0;
|
|
1669
|
-
for (const batch of batches) {
|
|
1670
|
-
const inputs = batch.map((chunk) => chunk.embeddingInput ?? { text: chunk.text });
|
|
1671
|
-
const hasStructuredInputs = inputs.some((input) => hasNonTextEmbeddingParts(input));
|
|
1672
|
-
if (hasStructuredInputs && !provider.embedBatchInputs) throw new Error(`Embedding provider "${provider.id}" does not support multimodal memory inputs.`);
|
|
1673
|
-
const batchEmbeddings = hasStructuredInputs ? await this.embedBatchInputsWithRetry(inputs) : await this.embedBatchWithRetry(batch.map((chunk) => chunk.text));
|
|
1674
|
-
for (let i = 0; i < batch.length; i += 1) {
|
|
1675
|
-
const item = missing[cursor + i];
|
|
1676
|
-
const embedding = batchEmbeddings[i] ?? [];
|
|
1677
|
-
if (item) {
|
|
1678
|
-
embeddings[item.index] = embedding;
|
|
1679
|
-
toCache.push({
|
|
1680
|
-
hash: item.chunk.hash,
|
|
1681
|
-
embedding
|
|
1682
|
-
});
|
|
1683
|
-
}
|
|
1684
|
-
}
|
|
1685
|
-
cursor += batch.length;
|
|
1686
|
-
}
|
|
1687
|
-
this.upsertEmbeddingCache(toCache);
|
|
1688
|
-
return embeddings;
|
|
1689
|
-
}
|
|
1690
|
-
computeProviderKey() {
|
|
1691
|
-
if (!this.provider) return hashText(JSON.stringify({
|
|
1692
|
-
provider: "none",
|
|
1693
|
-
model: "fts-only"
|
|
1694
|
-
}));
|
|
1695
|
-
if (this.providerRuntime?.cacheKeyData) return hashText(JSON.stringify(this.providerRuntime.cacheKeyData));
|
|
1696
|
-
return hashText(JSON.stringify({
|
|
1697
|
-
provider: this.provider.id,
|
|
1698
|
-
model: this.provider.model
|
|
1699
|
-
}));
|
|
1700
|
-
}
|
|
1701
|
-
buildBatchDebug(source, chunks) {
|
|
1702
|
-
return (message, data) => log$1.debug(message, data ? {
|
|
1703
|
-
...data,
|
|
1704
|
-
source,
|
|
1705
|
-
chunks: chunks.length
|
|
1706
|
-
} : {
|
|
1707
|
-
source,
|
|
1708
|
-
chunks: chunks.length
|
|
1709
|
-
});
|
|
1710
|
-
}
|
|
1711
|
-
async embedChunksWithBatch(chunks, _entry, source) {
|
|
1712
|
-
const batchEmbed = this.providerRuntime?.batchEmbed;
|
|
1713
|
-
if (!this.provider || !batchEmbed) return this.embedChunksInBatches(chunks);
|
|
1714
|
-
if (chunks.length === 0) return [];
|
|
1715
|
-
const { embeddings, missing } = this.collectCachedEmbeddings(chunks);
|
|
1716
|
-
if (missing.length === 0) return embeddings;
|
|
1717
|
-
const missingChunks = missing.map((item) => item.chunk);
|
|
1718
|
-
const batchResult = await this.runBatchWithFallback({
|
|
1719
|
-
provider: this.provider.id,
|
|
1720
|
-
run: async () => await batchEmbed({
|
|
1721
|
-
agentId: this.agentId,
|
|
1722
|
-
chunks: missingChunks,
|
|
1723
|
-
wait: this.batch.wait,
|
|
1724
|
-
concurrency: this.batch.concurrency,
|
|
1725
|
-
pollIntervalMs: this.batch.pollIntervalMs,
|
|
1726
|
-
timeoutMs: this.batch.timeoutMs,
|
|
1727
|
-
debug: this.buildBatchDebug(source, chunks)
|
|
1728
|
-
}),
|
|
1729
|
-
fallback: async () => await this.embedChunksInBatches(chunks)
|
|
1730
|
-
});
|
|
1731
|
-
if (!batchResult) return this.embedChunksInBatches(chunks);
|
|
1732
|
-
const toCache = [];
|
|
1733
|
-
for (let index = 0; index < missing.length; index += 1) {
|
|
1734
|
-
const item = missing[index];
|
|
1735
|
-
const embedding = batchResult[index] ?? [];
|
|
1736
|
-
if (!item) continue;
|
|
1737
|
-
embeddings[item.index] = embedding;
|
|
1738
|
-
toCache.push({
|
|
1739
|
-
hash: item.chunk.hash,
|
|
1740
|
-
embedding
|
|
1741
|
-
});
|
|
1742
|
-
}
|
|
1743
|
-
this.upsertEmbeddingCache(toCache);
|
|
1744
|
-
return embeddings;
|
|
1745
|
-
}
|
|
1746
|
-
collectCachedEmbeddings(chunks) {
|
|
1747
|
-
const cached = this.loadEmbeddingCache(chunks.map((chunk) => chunk.hash));
|
|
1748
|
-
const embeddings = Array.from({ length: chunks.length }, () => []);
|
|
1749
|
-
const missing = [];
|
|
1750
|
-
for (let i = 0; i < chunks.length; i += 1) {
|
|
1751
|
-
const chunk = chunks[i];
|
|
1752
|
-
const hit = chunk?.hash ? cached.get(chunk.hash) : void 0;
|
|
1753
|
-
if (hit && hit.length > 0) embeddings[i] = hit;
|
|
1754
|
-
else if (chunk) missing.push({
|
|
1755
|
-
index: i,
|
|
1756
|
-
chunk
|
|
1757
|
-
});
|
|
1758
|
-
}
|
|
1759
|
-
return {
|
|
1760
|
-
embeddings,
|
|
1761
|
-
missing
|
|
1762
|
-
};
|
|
1763
|
-
}
|
|
1764
|
-
async embedBatchWithRetry(texts) {
|
|
1765
|
-
if (texts.length === 0) return [];
|
|
1766
|
-
if (!this.provider) throw new Error("Cannot embed batch in FTS-only mode (no embedding provider)");
|
|
1767
|
-
let attempt = 0;
|
|
1768
|
-
let delayMs = EMBEDDING_RETRY_BASE_DELAY_MS;
|
|
1769
|
-
while (true) try {
|
|
1770
|
-
const timeoutMs = this.resolveEmbeddingTimeout("batch");
|
|
1771
|
-
log$1.debug("memory embeddings: batch start", {
|
|
1772
|
-
provider: this.provider.id,
|
|
1773
|
-
items: texts.length,
|
|
1774
|
-
timeoutMs
|
|
1775
|
-
});
|
|
1776
|
-
return await this.withTimeout(this.provider.embedBatch(texts), timeoutMs, `memory embeddings batch timed out after ${Math.round(timeoutMs / 1e3)}s`);
|
|
1777
|
-
} catch (err) {
|
|
1778
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1779
|
-
if (!this.isRetryableEmbeddingError(message) || attempt >= EMBEDDING_RETRY_MAX_ATTEMPTS) throw err;
|
|
1780
|
-
await this.waitForEmbeddingRetry(delayMs, "retrying");
|
|
1781
|
-
delayMs *= 2;
|
|
1782
|
-
attempt += 1;
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
async embedBatchInputsWithRetry(inputs) {
|
|
1786
|
-
if (inputs.length === 0) return [];
|
|
1787
|
-
if (!this.provider?.embedBatchInputs) return await this.embedBatchWithRetry(inputs.map((input) => input.text));
|
|
1788
|
-
let attempt = 0;
|
|
1789
|
-
let delayMs = EMBEDDING_RETRY_BASE_DELAY_MS;
|
|
1790
|
-
while (true) try {
|
|
1791
|
-
const timeoutMs = this.resolveEmbeddingTimeout("batch");
|
|
1792
|
-
log$1.debug("memory embeddings: structured batch start", {
|
|
1793
|
-
provider: this.provider.id,
|
|
1794
|
-
items: inputs.length,
|
|
1795
|
-
timeoutMs
|
|
1796
|
-
});
|
|
1797
|
-
return await this.withTimeout(this.provider.embedBatchInputs(inputs), timeoutMs, `memory embeddings batch timed out after ${Math.round(timeoutMs / 1e3)}s`);
|
|
1798
|
-
} catch (err) {
|
|
1799
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1800
|
-
if (!this.isRetryableEmbeddingError(message) || attempt >= EMBEDDING_RETRY_MAX_ATTEMPTS) throw err;
|
|
1801
|
-
await this.waitForEmbeddingRetry(delayMs, "retrying structured batch");
|
|
1802
|
-
delayMs *= 2;
|
|
1803
|
-
attempt += 1;
|
|
1804
|
-
}
|
|
1805
|
-
}
|
|
1806
|
-
async waitForEmbeddingRetry(delayMs, action) {
|
|
1807
|
-
const waitMs = Math.min(EMBEDDING_RETRY_MAX_DELAY_MS, Math.round(delayMs * (1 + Math.random() * .2)));
|
|
1808
|
-
log$1.warn(`memory embeddings rate limited; ${action} in ${waitMs}ms`);
|
|
1809
|
-
await new Promise((resolve) => setTimeout(resolve, waitMs));
|
|
1810
|
-
}
|
|
1811
|
-
isRetryableEmbeddingError(message) {
|
|
1812
|
-
return /(rate[_ ]limit|too many requests|429|resource has been exhausted|5\d\d|cloudflare|tokens per day)/i.test(message);
|
|
1813
|
-
}
|
|
1814
|
-
resolveEmbeddingTimeout(kind) {
|
|
1815
|
-
const isLocal = this.provider?.id === "local";
|
|
1816
|
-
if (kind === "query") return isLocal ? EMBEDDING_QUERY_TIMEOUT_LOCAL_MS : EMBEDDING_QUERY_TIMEOUT_REMOTE_MS;
|
|
1817
|
-
return isLocal ? EMBEDDING_BATCH_TIMEOUT_LOCAL_MS : EMBEDDING_BATCH_TIMEOUT_REMOTE_MS;
|
|
1818
|
-
}
|
|
1819
|
-
async embedQueryWithTimeout(text) {
|
|
1820
|
-
if (!this.provider) throw new Error("Cannot embed query in FTS-only mode (no embedding provider)");
|
|
1821
|
-
const timeoutMs = this.resolveEmbeddingTimeout("query");
|
|
1822
|
-
log$1.debug("memory embeddings: query start", {
|
|
1823
|
-
provider: this.provider.id,
|
|
1824
|
-
timeoutMs
|
|
1825
|
-
});
|
|
1826
|
-
return await this.withTimeout(this.provider.embedQuery(text), timeoutMs, `memory embeddings query timed out after ${Math.round(timeoutMs / 1e3)}s`);
|
|
1827
|
-
}
|
|
1828
|
-
async withTimeout(promise, timeoutMs, message) {
|
|
1829
|
-
if (!Number.isFinite(timeoutMs) || timeoutMs <= 0) return await promise;
|
|
1830
|
-
let timer = null;
|
|
1831
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
1832
|
-
timer = setTimeout(() => reject(new Error(message)), timeoutMs);
|
|
1833
|
-
});
|
|
1834
|
-
try {
|
|
1835
|
-
return await Promise.race([promise, timeoutPromise]);
|
|
1836
|
-
} finally {
|
|
1837
|
-
if (timer) clearTimeout(timer);
|
|
1838
|
-
}
|
|
1839
|
-
}
|
|
1840
|
-
async withBatchFailureLock(fn) {
|
|
1841
|
-
let release;
|
|
1842
|
-
const wait = this.batchFailureLock;
|
|
1843
|
-
this.batchFailureLock = new Promise((resolve) => {
|
|
1844
|
-
release = resolve;
|
|
1845
|
-
});
|
|
1846
|
-
await wait;
|
|
1847
|
-
try {
|
|
1848
|
-
return await fn();
|
|
1849
|
-
} finally {
|
|
1850
|
-
release();
|
|
1851
|
-
}
|
|
1852
|
-
}
|
|
1853
|
-
async resetBatchFailureCount() {
|
|
1854
|
-
await this.withBatchFailureLock(async () => {
|
|
1855
|
-
if (this.batchFailureCount > 0) log$1.debug("memory embeddings: batch recovered; resetting failure count");
|
|
1856
|
-
this.batchFailureCount = 0;
|
|
1857
|
-
this.batchFailureLastError = void 0;
|
|
1858
|
-
this.batchFailureLastProvider = void 0;
|
|
1859
|
-
});
|
|
1860
|
-
}
|
|
1861
|
-
async recordBatchFailure(params) {
|
|
1862
|
-
return await this.withBatchFailureLock(async () => {
|
|
1863
|
-
if (!this.batch.enabled) return {
|
|
1864
|
-
disabled: true,
|
|
1865
|
-
count: this.batchFailureCount
|
|
1866
|
-
};
|
|
1867
|
-
const increment = params.forceDisable ? BATCH_FAILURE_LIMIT$1 : Math.max(1, params.attempts ?? 1);
|
|
1868
|
-
this.batchFailureCount += increment;
|
|
1869
|
-
this.batchFailureLastError = params.message;
|
|
1870
|
-
this.batchFailureLastProvider = params.provider;
|
|
1871
|
-
const disabled = params.forceDisable || this.batchFailureCount >= BATCH_FAILURE_LIMIT$1;
|
|
1872
|
-
if (disabled) this.batch.enabled = false;
|
|
1873
|
-
return {
|
|
1874
|
-
disabled,
|
|
1875
|
-
count: this.batchFailureCount
|
|
1876
|
-
};
|
|
1877
|
-
});
|
|
1878
|
-
}
|
|
1879
|
-
isBatchTimeoutError(message) {
|
|
1880
|
-
return /timed out|timeout/i.test(message);
|
|
1881
|
-
}
|
|
1882
|
-
async runBatchWithTimeoutRetry(params) {
|
|
1883
|
-
try {
|
|
1884
|
-
return await params.run();
|
|
1885
|
-
} catch (err) {
|
|
1886
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1887
|
-
if (this.isBatchTimeoutError(message)) {
|
|
1888
|
-
log$1.warn(`memory embeddings: ${params.provider} batch timed out; retrying once`);
|
|
1889
|
-
try {
|
|
1890
|
-
return await params.run();
|
|
1891
|
-
} catch (retryErr) {
|
|
1892
|
-
retryErr.batchAttempts = 2;
|
|
1893
|
-
throw retryErr;
|
|
1894
|
-
}
|
|
1895
|
-
}
|
|
1896
|
-
throw err;
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
async runBatchWithFallback(params) {
|
|
1900
|
-
if (!this.batch.enabled) return await params.fallback();
|
|
1901
|
-
try {
|
|
1902
|
-
const result = await this.runBatchWithTimeoutRetry({
|
|
1903
|
-
provider: params.provider,
|
|
1904
|
-
run: params.run
|
|
1905
|
-
});
|
|
1906
|
-
await this.resetBatchFailureCount();
|
|
1907
|
-
return result;
|
|
1908
|
-
} catch (err) {
|
|
1909
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
1910
|
-
const attempts = err.batchAttempts ?? 1;
|
|
1911
|
-
const forceDisable = /asyncBatchEmbedContent not available/i.test(message);
|
|
1912
|
-
const failure = await this.recordBatchFailure({
|
|
1913
|
-
provider: params.provider,
|
|
1914
|
-
message,
|
|
1915
|
-
attempts,
|
|
1916
|
-
forceDisable
|
|
1917
|
-
});
|
|
1918
|
-
const suffix = failure.disabled ? "disabling batch" : "keeping batch enabled";
|
|
1919
|
-
log$1.warn(`memory embeddings: ${params.provider} batch failed (${failure.count}/${BATCH_FAILURE_LIMIT$1}); ${suffix}; falling back to non-batch embeddings: ${message}`);
|
|
1920
|
-
return await params.fallback();
|
|
1921
|
-
}
|
|
1922
|
-
}
|
|
1923
|
-
getIndexConcurrency() {
|
|
1924
|
-
return this.batch.enabled ? this.batch.concurrency : EMBEDDING_INDEX_CONCURRENCY;
|
|
1925
|
-
}
|
|
1926
|
-
clearIndexedFileData(pathname, source) {
|
|
1927
|
-
if (this.vector.enabled) try {
|
|
1928
|
-
this.db.prepare(`DELETE FROM ${VECTOR_TABLE$1} WHERE id IN (SELECT id FROM chunks WHERE path = ? AND source = ?)`).run(pathname, source);
|
|
1929
|
-
} catch {}
|
|
1930
|
-
if (this.fts.enabled && this.fts.available) try {
|
|
1931
|
-
if (this.provider) this.db.prepare(`DELETE FROM ${FTS_TABLE$1} WHERE path = ? AND source = ? AND model = ?`).run(pathname, source, this.provider.model);
|
|
1932
|
-
else this.db.prepare(`DELETE FROM ${FTS_TABLE$1} WHERE path = ? AND source = ?`).run(pathname, source);
|
|
1933
|
-
} catch {}
|
|
1934
|
-
this.db.prepare(`DELETE FROM chunks WHERE path = ? AND source = ?`).run(pathname, source);
|
|
1935
|
-
}
|
|
1936
|
-
upsertFileRecord(entry, source) {
|
|
1937
|
-
this.db.prepare(`INSERT INTO files (path, source, hash, mtime, size) VALUES (?, ?, ?, ?, ?)
|
|
1938
|
-
ON CONFLICT(path) DO UPDATE SET
|
|
1939
|
-
source=excluded.source,
|
|
1940
|
-
hash=excluded.hash,
|
|
1941
|
-
mtime=excluded.mtime,
|
|
1942
|
-
size=excluded.size`).run(entry.path, source, entry.hash, entry.mtimeMs, entry.size);
|
|
1943
|
-
}
|
|
1944
|
-
deleteFileRecord(pathname, source) {
|
|
1945
|
-
this.db.prepare(`DELETE FROM files WHERE path = ? AND source = ?`).run(pathname, source);
|
|
1946
|
-
}
|
|
1947
|
-
isStructuredInputTooLargeError(message) {
|
|
1948
|
-
return /(413|payload too large|request too large|input too large|too many tokens|input limit|request size)/i.test(message);
|
|
1949
|
-
}
|
|
1950
|
-
/**
|
|
1951
|
-
* Write chunks (and optional embeddings) for a file into the index.
|
|
1952
|
-
* Handles both the chunks table, the vector table, and the FTS table.
|
|
1953
|
-
* Pass an empty embeddings array to skip vector writes (FTS-only mode).
|
|
1954
|
-
*/
|
|
1955
|
-
writeChunks(entry, source, model, chunks, embeddings, vectorReady) {
|
|
1956
|
-
const now = Date.now();
|
|
1957
|
-
this.clearIndexedFileData(entry.path, source);
|
|
1958
|
-
for (let i = 0; i < chunks.length; i++) {
|
|
1959
|
-
const chunk = chunks[i];
|
|
1960
|
-
const embedding = embeddings[i] ?? [];
|
|
1961
|
-
const id = hashText(`${source}:${entry.path}:${chunk.startLine}:${chunk.endLine}:${chunk.hash}:${model}`);
|
|
1962
|
-
this.db.prepare(`INSERT INTO chunks (id, path, source, start_line, end_line, hash, model, text, embedding, updated_at)
|
|
1963
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
1964
|
-
ON CONFLICT(id) DO UPDATE SET
|
|
1965
|
-
hash=excluded.hash,
|
|
1966
|
-
model=excluded.model,
|
|
1967
|
-
text=excluded.text,
|
|
1968
|
-
embedding=excluded.embedding,
|
|
1969
|
-
updated_at=excluded.updated_at`).run(id, entry.path, source, chunk.startLine, chunk.endLine, chunk.hash, model, chunk.text, JSON.stringify(embedding), now);
|
|
1970
|
-
if (vectorReady && embedding.length > 0) {
|
|
1971
|
-
try {
|
|
1972
|
-
this.db.prepare(`DELETE FROM ${VECTOR_TABLE$1} WHERE id = ?`).run(id);
|
|
1973
|
-
} catch {}
|
|
1974
|
-
this.db.prepare(`INSERT INTO ${VECTOR_TABLE$1} (id, embedding) VALUES (?, ?)`).run(id, vectorToBlob$1(embedding));
|
|
1975
|
-
}
|
|
1976
|
-
if (this.fts.enabled && this.fts.available) this.db.prepare(`INSERT INTO ${FTS_TABLE$1} (text, id, path, source, model, start_line, end_line)\n VALUES (?, ?, ?, ?, ?, ?, ?)`).run(chunk.text, id, entry.path, source, model, chunk.startLine, chunk.endLine);
|
|
1977
|
-
}
|
|
1978
|
-
this.upsertFileRecord(entry, source);
|
|
1979
|
-
}
|
|
1980
|
-
async indexFile(entry, options) {
|
|
1981
|
-
if (!this.provider) {
|
|
1982
|
-
if ("kind" in entry && entry.kind === "multimodal") return;
|
|
1983
|
-
const chunks = chunkMarkdown(options.content ?? await fs.readFile(entry.absPath, "utf-8"), this.settings.chunking).filter((chunk) => chunk.text.trim().length > 0);
|
|
1984
|
-
if (options.source === "sessions" && "lineMap" in entry) remapChunkLines(chunks, entry.lineMap);
|
|
1985
|
-
this.writeChunks(entry, options.source, "fts-only", chunks, [], false);
|
|
1986
|
-
return;
|
|
1987
|
-
}
|
|
1988
|
-
let chunks;
|
|
1989
|
-
let structuredInputBytes;
|
|
1990
|
-
if ("kind" in entry && entry.kind === "multimodal") {
|
|
1991
|
-
if (!this.provider) {
|
|
1992
|
-
log$1.debug("Skipping multimodal indexing in FTS-only mode", {
|
|
1993
|
-
path: entry.path,
|
|
1994
|
-
source: options.source
|
|
1995
|
-
});
|
|
1996
|
-
this.clearIndexedFileData(entry.path, options.source);
|
|
1997
|
-
this.upsertFileRecord(entry, options.source);
|
|
1998
|
-
return;
|
|
1999
|
-
}
|
|
2000
|
-
const multimodalChunk = await buildMultimodalChunkForIndexing(entry);
|
|
2001
|
-
if (!multimodalChunk) {
|
|
2002
|
-
this.clearIndexedFileData(entry.path, options.source);
|
|
2003
|
-
this.deleteFileRecord(entry.path, options.source);
|
|
2004
|
-
return;
|
|
2005
|
-
}
|
|
2006
|
-
structuredInputBytes = multimodalChunk.structuredInputBytes;
|
|
2007
|
-
chunks = [multimodalChunk.chunk];
|
|
2008
|
-
} else {
|
|
2009
|
-
const baseChunks = chunkMarkdown(options.content ?? await fs.readFile(entry.absPath, "utf-8"), this.settings.chunking).filter((chunk) => chunk.text.trim().length > 0);
|
|
2010
|
-
chunks = this.provider ? enforceEmbeddingMaxInputTokens(this.provider, baseChunks, EMBEDDING_BATCH_MAX_TOKENS) : baseChunks;
|
|
2011
|
-
if (options.source === "sessions" && "lineMap" in entry) remapChunkLines(chunks, entry.lineMap);
|
|
2012
|
-
}
|
|
2013
|
-
if (!this.provider) {
|
|
2014
|
-
this.writeChunks(entry, options.source, "fts-only", chunks, [], false);
|
|
2015
|
-
return;
|
|
2016
|
-
}
|
|
2017
|
-
let embeddings;
|
|
2018
|
-
try {
|
|
2019
|
-
embeddings = this.batch.enabled ? await this.embedChunksWithBatch(chunks, entry, options.source) : await this.embedChunksInBatches(chunks);
|
|
2020
|
-
} catch (err) {
|
|
2021
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
2022
|
-
if ("kind" in entry && entry.kind === "multimodal" && this.isStructuredInputTooLargeError(message)) {
|
|
2023
|
-
log$1.warn("memory embeddings: skipping multimodal file rejected as too large", {
|
|
2024
|
-
path: entry.path,
|
|
2025
|
-
bytes: structuredInputBytes,
|
|
2026
|
-
provider: this.provider.id,
|
|
2027
|
-
model: this.provider.model,
|
|
2028
|
-
error: message
|
|
2029
|
-
});
|
|
2030
|
-
this.clearIndexedFileData(entry.path, options.source);
|
|
2031
|
-
this.upsertFileRecord(entry, options.source);
|
|
2032
|
-
return;
|
|
2033
|
-
}
|
|
2034
|
-
throw err;
|
|
2035
|
-
}
|
|
2036
|
-
const sample = embeddings.find((embedding) => embedding.length > 0);
|
|
2037
|
-
const vectorReady = sample ? await this.ensureVectorReady(sample.length) : false;
|
|
2038
|
-
this.writeChunks(entry, options.source, this.provider.model, chunks, embeddings, vectorReady);
|
|
2039
|
-
}
|
|
2040
|
-
};
|
|
2041
|
-
//#endregion
|
|
2042
|
-
//#region extensions/memory-core/src/memory/manager-search.ts
|
|
2043
|
-
const vectorToBlob = (embedding) => Buffer.from(new Float32Array(embedding).buffer);
|
|
2044
|
-
const FTS_QUERY_TOKEN_RE = /[\p{L}\p{N}_]+/gu;
|
|
2045
|
-
const SHORT_CJK_TRIGRAM_RE = /[\u3040-\u30ff\u3400-\u9fff\uac00-\ud7af\u3131-\u3163]/u;
|
|
2046
|
-
function escapeLikePattern(term) {
|
|
2047
|
-
return term.replaceAll("\\", "\\\\").replaceAll("%", "\\%").replaceAll("_", "\\_");
|
|
2048
|
-
}
|
|
2049
|
-
function buildMatchQueryFromTerms(terms) {
|
|
2050
|
-
if (terms.length === 0) return null;
|
|
2051
|
-
return terms.map((term) => `"${term.replaceAll("\"", "")}"`).join(" AND ");
|
|
2052
|
-
}
|
|
2053
|
-
function planKeywordSearch(params) {
|
|
2054
|
-
if (params.ftsTokenizer !== "trigram") return {
|
|
2055
|
-
matchQuery: params.buildFtsQuery(params.query),
|
|
2056
|
-
substringTerms: []
|
|
2057
|
-
};
|
|
2058
|
-
const tokens = params.query.match(FTS_QUERY_TOKEN_RE)?.map((token) => token.trim()).filter(Boolean) ?? [];
|
|
2059
|
-
if (tokens.length === 0) return {
|
|
2060
|
-
matchQuery: null,
|
|
2061
|
-
substringTerms: []
|
|
2062
|
-
};
|
|
2063
|
-
const matchTerms = [];
|
|
2064
|
-
const substringTerms = [];
|
|
2065
|
-
for (const token of tokens) {
|
|
2066
|
-
if (SHORT_CJK_TRIGRAM_RE.test(token) && Array.from(token).length < 3) {
|
|
2067
|
-
substringTerms.push(token);
|
|
2068
|
-
continue;
|
|
2069
|
-
}
|
|
2070
|
-
matchTerms.push(token);
|
|
2071
|
-
}
|
|
2072
|
-
return {
|
|
2073
|
-
matchQuery: buildMatchQueryFromTerms(matchTerms),
|
|
2074
|
-
substringTerms
|
|
2075
|
-
};
|
|
2076
|
-
}
|
|
2077
|
-
async function searchVector(params) {
|
|
2078
|
-
if (params.queryVec.length === 0 || params.limit <= 0) return [];
|
|
2079
|
-
if (await params.ensureVectorReady(params.queryVec.length)) return params.db.prepare(`SELECT c.id, c.path, c.start_line, c.end_line, c.text,
|
|
2080
|
-
c.source,
|
|
2081
|
-
vec_distance_cosine(v.embedding, ?) AS dist
|
|
2082
|
-
FROM ${params.vectorTable} v\n JOIN chunks c ON c.id = v.id\n WHERE c.model = ?${params.sourceFilterVec.sql}\n ORDER BY dist ASC\n LIMIT ?`).all(vectorToBlob(params.queryVec), params.providerModel, ...params.sourceFilterVec.params, params.limit).map((row) => ({
|
|
2083
|
-
id: row.id,
|
|
2084
|
-
path: row.path,
|
|
2085
|
-
startLine: row.start_line,
|
|
2086
|
-
endLine: row.end_line,
|
|
2087
|
-
score: 1 - row.dist,
|
|
2088
|
-
snippet: truncateUtf16Safe(row.text, params.snippetMaxChars),
|
|
2089
|
-
source: row.source
|
|
2090
|
-
}));
|
|
2091
|
-
return listChunks({
|
|
2092
|
-
db: params.db,
|
|
2093
|
-
providerModel: params.providerModel,
|
|
2094
|
-
sourceFilter: params.sourceFilterChunks
|
|
2095
|
-
}).map((chunk) => ({
|
|
2096
|
-
chunk,
|
|
2097
|
-
score: cosineSimilarity(params.queryVec, chunk.embedding)
|
|
2098
|
-
})).filter((entry) => Number.isFinite(entry.score)).toSorted((a, b) => b.score - a.score).slice(0, params.limit).map((entry) => ({
|
|
2099
|
-
id: entry.chunk.id,
|
|
2100
|
-
path: entry.chunk.path,
|
|
2101
|
-
startLine: entry.chunk.startLine,
|
|
2102
|
-
endLine: entry.chunk.endLine,
|
|
2103
|
-
score: entry.score,
|
|
2104
|
-
snippet: truncateUtf16Safe(entry.chunk.text, params.snippetMaxChars),
|
|
2105
|
-
source: entry.chunk.source
|
|
2106
|
-
}));
|
|
2107
|
-
}
|
|
2108
|
-
function listChunks(params) {
|
|
2109
|
-
return params.db.prepare(`SELECT id, path, start_line, end_line, text, embedding, source
|
|
2110
|
-
FROM chunks
|
|
2111
|
-
WHERE model = ?${params.sourceFilter.sql}`).all(params.providerModel, ...params.sourceFilter.params).map((row) => ({
|
|
2112
|
-
id: row.id,
|
|
2113
|
-
path: row.path,
|
|
2114
|
-
startLine: row.start_line,
|
|
2115
|
-
endLine: row.end_line,
|
|
2116
|
-
text: row.text,
|
|
2117
|
-
embedding: parseEmbedding(row.embedding),
|
|
2118
|
-
source: row.source
|
|
2119
|
-
}));
|
|
2120
|
-
}
|
|
2121
|
-
async function searchKeyword(params) {
|
|
2122
|
-
if (params.limit <= 0) return [];
|
|
2123
|
-
const plan = planKeywordSearch({
|
|
2124
|
-
query: params.query,
|
|
2125
|
-
ftsTokenizer: params.ftsTokenizer,
|
|
2126
|
-
buildFtsQuery: params.buildFtsQuery
|
|
2127
|
-
});
|
|
2128
|
-
if (!plan.matchQuery && plan.substringTerms.length === 0) return [];
|
|
2129
|
-
const modelClause = params.providerModel ? " AND model = ?" : "";
|
|
2130
|
-
const modelParams = params.providerModel ? [params.providerModel] : [];
|
|
2131
|
-
const substringClause = plan.substringTerms.map(() => " AND text LIKE ? ESCAPE '\\'").join("");
|
|
2132
|
-
const substringParams = plan.substringTerms.map((term) => `%${escapeLikePattern(term)}%`);
|
|
2133
|
-
const whereClause = plan.matchQuery ? `${params.ftsTable} MATCH ?${substringClause}${modelClause}${params.sourceFilter.sql}` : `1=1${substringClause}${modelClause}${params.sourceFilter.sql}`;
|
|
2134
|
-
const queryParams = [
|
|
2135
|
-
...plan.matchQuery ? [plan.matchQuery] : [],
|
|
2136
|
-
...substringParams,
|
|
2137
|
-
...modelParams,
|
|
2138
|
-
...params.sourceFilter.params,
|
|
2139
|
-
params.limit
|
|
2140
|
-
];
|
|
2141
|
-
const rankExpression = plan.matchQuery ? `bm25(${params.ftsTable})` : "0";
|
|
2142
|
-
return params.db.prepare(`SELECT id, path, source, start_line, end_line, text,\n ${rankExpression} AS rank\n FROM ${params.ftsTable}\n WHERE ${whereClause}\n ORDER BY rank ASC\n LIMIT ?`).all(...queryParams).map((row) => {
|
|
2143
|
-
const textScore = plan.matchQuery ? params.bm25RankToScore(row.rank) : 1;
|
|
2144
|
-
return {
|
|
2145
|
-
id: row.id,
|
|
2146
|
-
path: row.path,
|
|
2147
|
-
startLine: row.start_line,
|
|
2148
|
-
endLine: row.end_line,
|
|
2149
|
-
score: textScore,
|
|
2150
|
-
textScore,
|
|
2151
|
-
snippet: truncateUtf16Safe(row.text, params.snippetMaxChars),
|
|
2152
|
-
source: row.source
|
|
2153
|
-
};
|
|
2154
|
-
});
|
|
2155
|
-
}
|
|
2156
|
-
//#endregion
|
|
2157
|
-
//#region extensions/memory-core/src/memory/manager.ts
|
|
2158
|
-
const SNIPPET_MAX_CHARS = 700;
|
|
2159
|
-
const VECTOR_TABLE = "chunks_vec";
|
|
2160
|
-
const FTS_TABLE = "chunks_fts";
|
|
2161
|
-
const EMBEDDING_CACHE_TABLE = "embedding_cache";
|
|
2162
|
-
const BATCH_FAILURE_LIMIT = 2;
|
|
2163
|
-
const MEMORY_INDEX_MANAGER_CACHE_KEY = Symbol.for("openclaw.memoryIndexManagerCache");
|
|
2164
|
-
function getMemoryIndexManagerCacheStore() {
|
|
2165
|
-
return resolveGlobalSingleton(MEMORY_INDEX_MANAGER_CACHE_KEY, () => ({
|
|
2166
|
-
indexCache: /* @__PURE__ */ new Map(),
|
|
2167
|
-
indexCachePending: /* @__PURE__ */ new Map()
|
|
2168
|
-
}));
|
|
2169
|
-
}
|
|
2170
|
-
const log = createSubsystemLogger("memory");
|
|
2171
|
-
const { indexCache: INDEX_CACHE, indexCachePending: INDEX_CACHE_PENDING } = getMemoryIndexManagerCacheStore();
|
|
2172
|
-
function isMemoryReadonlyDbError(err) {
|
|
2173
|
-
const readonlyPattern = /attempt to write a readonly database|database is read-only|SQLITE_READONLY/i;
|
|
2174
|
-
const messages = /* @__PURE__ */ new Set();
|
|
2175
|
-
const pushValue = (value) => {
|
|
2176
|
-
if (typeof value !== "string") return;
|
|
2177
|
-
const normalized = value.trim();
|
|
2178
|
-
if (!normalized) return;
|
|
2179
|
-
messages.add(normalized);
|
|
2180
|
-
};
|
|
2181
|
-
pushValue(err instanceof Error ? err.message : String(err));
|
|
2182
|
-
if (err && typeof err === "object") {
|
|
2183
|
-
const record = err;
|
|
2184
|
-
pushValue(record.message);
|
|
2185
|
-
pushValue(record.code);
|
|
2186
|
-
pushValue(record.name);
|
|
2187
|
-
if (record.cause && typeof record.cause === "object") {
|
|
2188
|
-
const cause = record.cause;
|
|
2189
|
-
pushValue(cause.message);
|
|
2190
|
-
pushValue(cause.code);
|
|
2191
|
-
pushValue(cause.name);
|
|
2192
|
-
}
|
|
2193
|
-
}
|
|
2194
|
-
return [...messages].some((value) => readonlyPattern.test(value));
|
|
2195
|
-
}
|
|
2196
|
-
function extractMemoryErrorReason(err) {
|
|
2197
|
-
if (err instanceof Error && err.message.trim()) return err.message;
|
|
2198
|
-
if (err && typeof err === "object") {
|
|
2199
|
-
const record = err;
|
|
2200
|
-
if (typeof record.message === "string" && record.message.trim()) return record.message;
|
|
2201
|
-
if (typeof record.code === "string" && record.code.trim()) return record.code;
|
|
2202
|
-
}
|
|
2203
|
-
return String(err);
|
|
2204
|
-
}
|
|
2205
|
-
async function runMemorySyncWithReadonlyRecovery(state, params) {
|
|
2206
|
-
try {
|
|
2207
|
-
await state.runSync(params);
|
|
2208
|
-
return;
|
|
2209
|
-
} catch (err) {
|
|
2210
|
-
if (!isMemoryReadonlyDbError(err) || state.closed) throw err;
|
|
2211
|
-
const reason = extractMemoryErrorReason(err);
|
|
2212
|
-
state.readonlyRecoveryAttempts += 1;
|
|
2213
|
-
state.readonlyRecoveryLastError = reason;
|
|
2214
|
-
log.warn(`memory sync readonly handle detected; reopening sqlite connection`, { reason });
|
|
2215
|
-
try {
|
|
2216
|
-
state.db.close();
|
|
2217
|
-
} catch {}
|
|
2218
|
-
state.db = state.openDatabase();
|
|
2219
|
-
state.vectorReady = null;
|
|
2220
|
-
state.vector.available = null;
|
|
2221
|
-
state.vector.loadError = void 0;
|
|
2222
|
-
state.ensureSchema();
|
|
2223
|
-
const meta = state.readMeta();
|
|
2224
|
-
state.vector.dims = meta?.vectorDims;
|
|
2225
|
-
try {
|
|
2226
|
-
await state.runSync(params);
|
|
2227
|
-
state.readonlyRecoverySuccesses += 1;
|
|
2228
|
-
} catch (retryErr) {
|
|
2229
|
-
state.readonlyRecoveryFailures += 1;
|
|
2230
|
-
throw retryErr;
|
|
2231
|
-
}
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
async function closeAllMemoryIndexManagers() {
|
|
2235
|
-
const pending = Array.from(INDEX_CACHE_PENDING.values());
|
|
2236
|
-
if (pending.length > 0) await Promise.allSettled(pending);
|
|
2237
|
-
const managers = Array.from(INDEX_CACHE.values());
|
|
2238
|
-
INDEX_CACHE.clear();
|
|
2239
|
-
for (const manager of managers) try {
|
|
2240
|
-
await manager.close();
|
|
2241
|
-
} catch (err) {
|
|
2242
|
-
log.warn(`failed to close memory index manager: ${String(err)}`);
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbeddingOps {
|
|
2246
|
-
static async loadProviderResult(params) {
|
|
2247
|
-
return await createEmbeddingProvider({
|
|
2248
|
-
config: params.cfg,
|
|
2249
|
-
agentDir: resolveAgentDir(params.cfg, params.agentId),
|
|
2250
|
-
provider: params.settings.provider,
|
|
2251
|
-
remote: params.settings.remote,
|
|
2252
|
-
model: params.settings.model,
|
|
2253
|
-
outputDimensionality: params.settings.outputDimensionality,
|
|
2254
|
-
fallback: params.settings.fallback,
|
|
2255
|
-
local: params.settings.local
|
|
2256
|
-
});
|
|
2257
|
-
}
|
|
2258
|
-
static async get(params) {
|
|
2259
|
-
const { cfg, agentId } = params;
|
|
2260
|
-
const settings = resolveMemorySearchConfig(cfg, agentId);
|
|
2261
|
-
if (!settings) return null;
|
|
2262
|
-
const workspaceDir = resolveAgentWorkspaceDir(cfg, agentId);
|
|
2263
|
-
const purpose = params.purpose === "status" ? "status" : "default";
|
|
2264
|
-
const key = `${agentId}:${workspaceDir}:${JSON.stringify(settings)}:${purpose}`;
|
|
2265
|
-
if (params.purpose === "status") return new MemoryIndexManager({
|
|
2266
|
-
cacheKey: key,
|
|
2267
|
-
cfg,
|
|
2268
|
-
agentId,
|
|
2269
|
-
workspaceDir,
|
|
2270
|
-
settings,
|
|
2271
|
-
purpose: params.purpose
|
|
2272
|
-
});
|
|
2273
|
-
const existing = INDEX_CACHE.get(key);
|
|
2274
|
-
if (existing) return existing;
|
|
2275
|
-
const pending = INDEX_CACHE_PENDING.get(key);
|
|
2276
|
-
if (pending) return pending;
|
|
2277
|
-
const createPromise = (async () => {
|
|
2278
|
-
const refreshed = INDEX_CACHE.get(key);
|
|
2279
|
-
if (refreshed) return refreshed;
|
|
2280
|
-
const manager = new MemoryIndexManager({
|
|
2281
|
-
cacheKey: key,
|
|
2282
|
-
cfg,
|
|
2283
|
-
agentId,
|
|
2284
|
-
workspaceDir,
|
|
2285
|
-
settings,
|
|
2286
|
-
purpose: params.purpose
|
|
2287
|
-
});
|
|
2288
|
-
INDEX_CACHE.set(key, manager);
|
|
2289
|
-
return manager;
|
|
2290
|
-
})();
|
|
2291
|
-
INDEX_CACHE_PENDING.set(key, createPromise);
|
|
2292
|
-
try {
|
|
2293
|
-
return await createPromise;
|
|
2294
|
-
} finally {
|
|
2295
|
-
if (INDEX_CACHE_PENDING.get(key) === createPromise) INDEX_CACHE_PENDING.delete(key);
|
|
2296
|
-
}
|
|
2297
|
-
}
|
|
2298
|
-
constructor(params) {
|
|
2299
|
-
super();
|
|
2300
|
-
this.providerInitPromise = null;
|
|
2301
|
-
this.providerInitialized = false;
|
|
2302
|
-
this.batchFailureCount = 0;
|
|
2303
|
-
this.batchFailureLock = Promise.resolve();
|
|
2304
|
-
this.vectorReady = null;
|
|
2305
|
-
this.watcher = null;
|
|
2306
|
-
this.watchTimer = null;
|
|
2307
|
-
this.sessionWatchTimer = null;
|
|
2308
|
-
this.sessionUnsubscribe = null;
|
|
2309
|
-
this.intervalTimer = null;
|
|
2310
|
-
this.closed = false;
|
|
2311
|
-
this.dirty = false;
|
|
2312
|
-
this.sessionsDirty = false;
|
|
2313
|
-
this.sessionsDirtyFiles = /* @__PURE__ */ new Set();
|
|
2314
|
-
this.sessionPendingFiles = /* @__PURE__ */ new Set();
|
|
2315
|
-
this.sessionDeltas = /* @__PURE__ */ new Map();
|
|
2316
|
-
this.sessionWarm = /* @__PURE__ */ new Set();
|
|
2317
|
-
this.syncing = null;
|
|
2318
|
-
this.queuedSessionFiles = /* @__PURE__ */ new Set();
|
|
2319
|
-
this.queuedSessionSync = null;
|
|
2320
|
-
this.readonlyRecoveryAttempts = 0;
|
|
2321
|
-
this.readonlyRecoverySuccesses = 0;
|
|
2322
|
-
this.readonlyRecoveryFailures = 0;
|
|
2323
|
-
this.cacheKey = params.cacheKey;
|
|
2324
|
-
this.cfg = params.cfg;
|
|
2325
|
-
this.agentId = params.agentId;
|
|
2326
|
-
this.workspaceDir = params.workspaceDir;
|
|
2327
|
-
this.settings = params.settings;
|
|
2328
|
-
this.provider = null;
|
|
2329
|
-
this.requestedProvider = params.settings.provider;
|
|
2330
|
-
if (params.providerResult) this.applyProviderResult(params.providerResult);
|
|
2331
|
-
this.sources = new Set(params.settings.sources);
|
|
2332
|
-
this.db = this.openDatabase();
|
|
2333
|
-
this.providerKey = this.computeProviderKey();
|
|
2334
|
-
this.cache = {
|
|
2335
|
-
enabled: params.settings.cache.enabled,
|
|
2336
|
-
maxEntries: params.settings.cache.maxEntries
|
|
2337
|
-
};
|
|
2338
|
-
this.fts = {
|
|
2339
|
-
enabled: params.settings.query.hybrid.enabled,
|
|
2340
|
-
available: false
|
|
2341
|
-
};
|
|
2342
|
-
this.ensureSchema();
|
|
2343
|
-
this.vector = {
|
|
2344
|
-
enabled: params.settings.store.vector.enabled,
|
|
2345
|
-
available: null,
|
|
2346
|
-
extensionPath: params.settings.store.vector.extensionPath
|
|
2347
|
-
};
|
|
2348
|
-
const meta = this.readMeta();
|
|
2349
|
-
if (meta?.vectorDims) this.vector.dims = meta.vectorDims;
|
|
2350
|
-
const statusOnly = params.purpose === "status";
|
|
2351
|
-
if (!statusOnly) {
|
|
2352
|
-
this.ensureWatcher();
|
|
2353
|
-
this.ensureSessionListener();
|
|
2354
|
-
this.ensureIntervalSync();
|
|
2355
|
-
}
|
|
2356
|
-
this.dirty = this.sources.has("memory") && (statusOnly ? !meta : true);
|
|
2357
|
-
this.batch = this.resolveBatchConfig();
|
|
2358
|
-
}
|
|
2359
|
-
applyProviderResult(providerResult) {
|
|
2360
|
-
this.provider = providerResult.provider;
|
|
2361
|
-
this.fallbackFrom = providerResult.fallbackFrom;
|
|
2362
|
-
this.fallbackReason = providerResult.fallbackReason;
|
|
2363
|
-
this.providerUnavailableReason = providerResult.providerUnavailableReason;
|
|
2364
|
-
this.providerRuntime = providerResult.runtime;
|
|
2365
|
-
this.providerInitialized = true;
|
|
2366
|
-
}
|
|
2367
|
-
async ensureProviderInitialized() {
|
|
2368
|
-
if (this.providerInitialized) return;
|
|
2369
|
-
if (!this.providerInitPromise) this.providerInitPromise = (async () => {
|
|
2370
|
-
const providerResult = await MemoryIndexManager.loadProviderResult({
|
|
2371
|
-
cfg: this.cfg,
|
|
2372
|
-
agentId: this.agentId,
|
|
2373
|
-
settings: this.settings
|
|
2374
|
-
});
|
|
2375
|
-
this.applyProviderResult(providerResult);
|
|
2376
|
-
this.providerKey = this.computeProviderKey();
|
|
2377
|
-
this.batch = this.resolveBatchConfig();
|
|
2378
|
-
})();
|
|
2379
|
-
try {
|
|
2380
|
-
await this.providerInitPromise;
|
|
2381
|
-
} finally {
|
|
2382
|
-
if (this.providerInitialized) this.providerInitPromise = null;
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
async warmSession(sessionKey) {
|
|
2386
|
-
if (!this.settings.sync.onSessionStart) return;
|
|
2387
|
-
const key = sessionKey?.trim() || "";
|
|
2388
|
-
if (key && this.sessionWarm.has(key)) return;
|
|
2389
|
-
this.sync({ reason: "session-start" }).catch((err) => {
|
|
2390
|
-
log.warn(`memory sync failed (session-start): ${String(err)}`);
|
|
2391
|
-
});
|
|
2392
|
-
if (key) this.sessionWarm.add(key);
|
|
2393
|
-
}
|
|
2394
|
-
async search(query, opts) {
|
|
2395
|
-
const cleaned = query.trim();
|
|
2396
|
-
if (!cleaned) return [];
|
|
2397
|
-
this.warmSession(opts?.sessionKey);
|
|
2398
|
-
if (this.settings.sync.onSearch && (this.dirty || this.sessionsDirty)) this.sync({ reason: "search" }).catch((err) => {
|
|
2399
|
-
log.warn(`memory sync failed (search): ${String(err)}`);
|
|
2400
|
-
});
|
|
2401
|
-
if (!this.hasIndexedContent()) return [];
|
|
2402
|
-
await this.ensureProviderInitialized();
|
|
2403
|
-
const minScore = opts?.minScore ?? this.settings.query.minScore;
|
|
2404
|
-
const maxResults = opts?.maxResults ?? this.settings.query.maxResults;
|
|
2405
|
-
const hybrid = this.settings.query.hybrid;
|
|
2406
|
-
const candidates = Math.min(200, Math.max(1, Math.floor(maxResults * hybrid.candidateMultiplier)));
|
|
2407
|
-
if (!this.provider) {
|
|
2408
|
-
if (!this.fts.enabled || !this.fts.available) {
|
|
2409
|
-
log.warn("memory search: no provider and FTS unavailable");
|
|
2410
|
-
return [];
|
|
2411
|
-
}
|
|
2412
|
-
const keywords = extractKeywords(cleaned, { ftsTokenizer: this.settings.store.fts.tokenizer });
|
|
2413
|
-
const searchTerms = keywords.length > 0 ? keywords : [cleaned];
|
|
2414
|
-
const resultSets = await Promise.all(searchTerms.map((term) => this.searchKeyword(term, candidates).catch(() => [])));
|
|
2415
|
-
const seenIds = /* @__PURE__ */ new Map();
|
|
2416
|
-
for (const results of resultSets) for (const result of results) {
|
|
2417
|
-
const existing = seenIds.get(result.id);
|
|
2418
|
-
if (!existing || result.score > existing.score) seenIds.set(result.id, result);
|
|
2419
|
-
}
|
|
2420
|
-
const merged = [...seenIds.values()].toSorted((a, b) => b.score - a.score);
|
|
2421
|
-
return this.selectScoredResults(merged, maxResults, minScore, 0);
|
|
2422
|
-
}
|
|
2423
|
-
const keywordResults = hybrid.enabled && this.fts.enabled && this.fts.available ? await this.searchKeyword(cleaned, candidates).catch(() => []) : [];
|
|
2424
|
-
const queryVec = await this.embedQueryWithTimeout(cleaned);
|
|
2425
|
-
const vectorResults = queryVec.some((v) => v !== 0) ? await this.searchVector(queryVec, candidates).catch(() => []) : [];
|
|
2426
|
-
if (!hybrid.enabled || !this.fts.enabled || !this.fts.available) return vectorResults.filter((entry) => entry.score >= minScore).slice(0, maxResults);
|
|
2427
|
-
const merged = await this.mergeHybridResults({
|
|
2428
|
-
vector: vectorResults,
|
|
2429
|
-
keyword: keywordResults,
|
|
2430
|
-
vectorWeight: hybrid.vectorWeight,
|
|
2431
|
-
textWeight: hybrid.textWeight,
|
|
2432
|
-
mmr: hybrid.mmr,
|
|
2433
|
-
temporalDecay: hybrid.temporalDecay
|
|
2434
|
-
});
|
|
2435
|
-
const strict = merged.filter((entry) => entry.score >= minScore);
|
|
2436
|
-
if (strict.length > 0 || keywordResults.length === 0) return strict.slice(0, maxResults);
|
|
2437
|
-
const relaxedMinScore = Math.min(minScore, hybrid.textWeight);
|
|
2438
|
-
const keywordKeys = new Set(keywordResults.map((entry) => `${entry.source}:${entry.path}:${entry.startLine}:${entry.endLine}`));
|
|
2439
|
-
return this.selectScoredResults(merged.filter((entry) => keywordKeys.has(`${entry.source}:${entry.path}:${entry.startLine}:${entry.endLine}`)), maxResults, minScore, relaxedMinScore);
|
|
2440
|
-
}
|
|
2441
|
-
selectScoredResults(results, maxResults, minScore, relaxedMinScore = minScore) {
|
|
2442
|
-
const strict = results.filter((entry) => entry.score >= minScore);
|
|
2443
|
-
if (strict.length > 0) return strict.slice(0, maxResults);
|
|
2444
|
-
return results.filter((entry) => entry.score >= relaxedMinScore).slice(0, maxResults);
|
|
2445
|
-
}
|
|
2446
|
-
hasIndexedContent() {
|
|
2447
|
-
if (this.db.prepare(`SELECT 1 as found FROM chunks LIMIT 1`).get()?.found === 1) return true;
|
|
2448
|
-
if (!this.fts.enabled || !this.fts.available) return false;
|
|
2449
|
-
return this.db.prepare(`SELECT 1 as found FROM ${FTS_TABLE} LIMIT 1`).get()?.found === 1;
|
|
2450
|
-
}
|
|
2451
|
-
async searchVector(queryVec, limit) {
|
|
2452
|
-
if (!this.provider) return [];
|
|
2453
|
-
return (await searchVector({
|
|
2454
|
-
db: this.db,
|
|
2455
|
-
vectorTable: VECTOR_TABLE,
|
|
2456
|
-
providerModel: this.provider.model,
|
|
2457
|
-
queryVec,
|
|
2458
|
-
limit,
|
|
2459
|
-
snippetMaxChars: SNIPPET_MAX_CHARS,
|
|
2460
|
-
ensureVectorReady: async (dimensions) => await this.ensureVectorReady(dimensions),
|
|
2461
|
-
sourceFilterVec: this.buildSourceFilter("c"),
|
|
2462
|
-
sourceFilterChunks: this.buildSourceFilter()
|
|
2463
|
-
})).map((entry) => entry);
|
|
2464
|
-
}
|
|
2465
|
-
buildFtsQuery(raw) {
|
|
2466
|
-
return buildFtsQuery(raw);
|
|
2467
|
-
}
|
|
2468
|
-
async searchKeyword(query, limit) {
|
|
2469
|
-
if (!this.fts.enabled || !this.fts.available) return [];
|
|
2470
|
-
const sourceFilter = this.buildSourceFilter();
|
|
2471
|
-
const providerModel = this.provider?.model;
|
|
2472
|
-
return (await searchKeyword({
|
|
2473
|
-
db: this.db,
|
|
2474
|
-
ftsTable: FTS_TABLE,
|
|
2475
|
-
providerModel,
|
|
2476
|
-
query,
|
|
2477
|
-
ftsTokenizer: this.settings.store.fts.tokenizer,
|
|
2478
|
-
limit,
|
|
2479
|
-
snippetMaxChars: SNIPPET_MAX_CHARS,
|
|
2480
|
-
sourceFilter,
|
|
2481
|
-
buildFtsQuery: (raw) => this.buildFtsQuery(raw),
|
|
2482
|
-
bm25RankToScore
|
|
2483
|
-
})).map((entry) => entry);
|
|
2484
|
-
}
|
|
2485
|
-
mergeHybridResults(params) {
|
|
2486
|
-
return mergeHybridResults({
|
|
2487
|
-
vector: params.vector.map((r) => ({
|
|
2488
|
-
id: r.id,
|
|
2489
|
-
path: r.path,
|
|
2490
|
-
startLine: r.startLine,
|
|
2491
|
-
endLine: r.endLine,
|
|
2492
|
-
source: r.source,
|
|
2493
|
-
snippet: r.snippet,
|
|
2494
|
-
vectorScore: r.score
|
|
2495
|
-
})),
|
|
2496
|
-
keyword: params.keyword.map((r) => ({
|
|
2497
|
-
id: r.id,
|
|
2498
|
-
path: r.path,
|
|
2499
|
-
startLine: r.startLine,
|
|
2500
|
-
endLine: r.endLine,
|
|
2501
|
-
source: r.source,
|
|
2502
|
-
snippet: r.snippet,
|
|
2503
|
-
textScore: r.textScore
|
|
2504
|
-
})),
|
|
2505
|
-
vectorWeight: params.vectorWeight,
|
|
2506
|
-
textWeight: params.textWeight,
|
|
2507
|
-
mmr: params.mmr,
|
|
2508
|
-
temporalDecay: params.temporalDecay,
|
|
2509
|
-
workspaceDir: this.workspaceDir
|
|
2510
|
-
}).then((entries) => entries.map((entry) => entry));
|
|
2511
|
-
}
|
|
2512
|
-
async sync(params) {
|
|
2513
|
-
if (this.closed) return;
|
|
2514
|
-
await this.ensureProviderInitialized();
|
|
2515
|
-
if (this.syncing) {
|
|
2516
|
-
if (params?.sessionFiles?.some((sessionFile) => sessionFile.trim().length > 0)) return this.enqueueTargetedSessionSync(params.sessionFiles);
|
|
2517
|
-
return this.syncing;
|
|
2518
|
-
}
|
|
2519
|
-
this.syncing = this.runSyncWithReadonlyRecovery(params).finally(() => {
|
|
2520
|
-
this.syncing = null;
|
|
2521
|
-
});
|
|
2522
|
-
return this.syncing ?? Promise.resolve();
|
|
2523
|
-
}
|
|
2524
|
-
enqueueTargetedSessionSync(sessionFiles) {
|
|
2525
|
-
for (const sessionFile of sessionFiles ?? []) {
|
|
2526
|
-
const trimmed = sessionFile.trim();
|
|
2527
|
-
if (trimmed) this.queuedSessionFiles.add(trimmed);
|
|
2528
|
-
}
|
|
2529
|
-
if (this.queuedSessionFiles.size === 0) return this.syncing ?? Promise.resolve();
|
|
2530
|
-
if (!this.queuedSessionSync) this.queuedSessionSync = (async () => {
|
|
2531
|
-
try {
|
|
2532
|
-
await this.syncing?.catch(() => void 0);
|
|
2533
|
-
while (!this.closed && this.queuedSessionFiles.size > 0) {
|
|
2534
|
-
const queuedSessionFiles = Array.from(this.queuedSessionFiles);
|
|
2535
|
-
this.queuedSessionFiles.clear();
|
|
2536
|
-
await this.sync({
|
|
2537
|
-
reason: "queued-session-files",
|
|
2538
|
-
sessionFiles: queuedSessionFiles
|
|
2539
|
-
});
|
|
2540
|
-
}
|
|
2541
|
-
} finally {
|
|
2542
|
-
this.queuedSessionSync = null;
|
|
2543
|
-
}
|
|
2544
|
-
})();
|
|
2545
|
-
return this.queuedSessionSync;
|
|
2546
|
-
}
|
|
2547
|
-
isReadonlyDbError(err) {
|
|
2548
|
-
return isMemoryReadonlyDbError(err);
|
|
2549
|
-
}
|
|
2550
|
-
extractErrorReason(err) {
|
|
2551
|
-
return extractMemoryErrorReason(err);
|
|
2552
|
-
}
|
|
2553
|
-
async runSyncWithReadonlyRecovery(params) {
|
|
2554
|
-
const thisManager = this;
|
|
2555
|
-
await runMemorySyncWithReadonlyRecovery({
|
|
2556
|
-
get closed() {
|
|
2557
|
-
return thisManager.closed;
|
|
2558
|
-
},
|
|
2559
|
-
get db() {
|
|
2560
|
-
return thisManager.db;
|
|
2561
|
-
},
|
|
2562
|
-
set db(value) {
|
|
2563
|
-
thisManager.db = value;
|
|
2564
|
-
},
|
|
2565
|
-
get vectorReady() {
|
|
2566
|
-
return thisManager.vectorReady;
|
|
2567
|
-
},
|
|
2568
|
-
set vectorReady(value) {
|
|
2569
|
-
thisManager.vectorReady = value;
|
|
2570
|
-
},
|
|
2571
|
-
vector: this.vector,
|
|
2572
|
-
get readonlyRecoveryAttempts() {
|
|
2573
|
-
return thisManager.readonlyRecoveryAttempts;
|
|
2574
|
-
},
|
|
2575
|
-
set readonlyRecoveryAttempts(value) {
|
|
2576
|
-
thisManager.readonlyRecoveryAttempts = value;
|
|
2577
|
-
},
|
|
2578
|
-
get readonlyRecoverySuccesses() {
|
|
2579
|
-
return thisManager.readonlyRecoverySuccesses;
|
|
2580
|
-
},
|
|
2581
|
-
set readonlyRecoverySuccesses(value) {
|
|
2582
|
-
thisManager.readonlyRecoverySuccesses = value;
|
|
2583
|
-
},
|
|
2584
|
-
get readonlyRecoveryFailures() {
|
|
2585
|
-
return thisManager.readonlyRecoveryFailures;
|
|
2586
|
-
},
|
|
2587
|
-
set readonlyRecoveryFailures(value) {
|
|
2588
|
-
thisManager.readonlyRecoveryFailures = value;
|
|
2589
|
-
},
|
|
2590
|
-
get readonlyRecoveryLastError() {
|
|
2591
|
-
return thisManager.readonlyRecoveryLastError;
|
|
2592
|
-
},
|
|
2593
|
-
set readonlyRecoveryLastError(value) {
|
|
2594
|
-
thisManager.readonlyRecoveryLastError = value;
|
|
2595
|
-
},
|
|
2596
|
-
runSync: (nextParams) => this.runSync(nextParams),
|
|
2597
|
-
openDatabase: () => this.openDatabase(),
|
|
2598
|
-
ensureSchema: () => this.ensureSchema(),
|
|
2599
|
-
readMeta: () => this.readMeta() ?? void 0
|
|
2600
|
-
}, params);
|
|
2601
|
-
}
|
|
2602
|
-
async readFile(params) {
|
|
2603
|
-
return await readMemoryFile({
|
|
2604
|
-
workspaceDir: this.workspaceDir,
|
|
2605
|
-
extraPaths: this.settings.extraPaths,
|
|
2606
|
-
relPath: params.relPath,
|
|
2607
|
-
from: params.from,
|
|
2608
|
-
lines: params.lines
|
|
2609
|
-
});
|
|
2610
|
-
}
|
|
2611
|
-
status() {
|
|
2612
|
-
const sourceFilter = this.buildSourceFilter();
|
|
2613
|
-
const aggregateRows = this.db.prepare(`SELECT 'files' AS kind, source, COUNT(*) as c FROM files WHERE 1=1${sourceFilter.sql} GROUP BY source\nUNION ALL\nSELECT 'chunks' AS kind, source, COUNT(*) as c FROM chunks WHERE 1=1${sourceFilter.sql} GROUP BY source`).all(...sourceFilter.params, ...sourceFilter.params);
|
|
2614
|
-
const aggregateState = (() => {
|
|
2615
|
-
const sources = Array.from(this.sources);
|
|
2616
|
-
const bySource = /* @__PURE__ */ new Map();
|
|
2617
|
-
for (const source of sources) bySource.set(source, {
|
|
2618
|
-
files: 0,
|
|
2619
|
-
chunks: 0
|
|
2620
|
-
});
|
|
2621
|
-
let files = 0;
|
|
2622
|
-
let chunks = 0;
|
|
2623
|
-
for (const row of aggregateRows) {
|
|
2624
|
-
const count = row.c ?? 0;
|
|
2625
|
-
const entry = bySource.get(row.source) ?? {
|
|
2626
|
-
files: 0,
|
|
2627
|
-
chunks: 0
|
|
2628
|
-
};
|
|
2629
|
-
if (row.kind === "files") {
|
|
2630
|
-
entry.files = count;
|
|
2631
|
-
files += count;
|
|
2632
|
-
} else {
|
|
2633
|
-
entry.chunks = count;
|
|
2634
|
-
chunks += count;
|
|
2635
|
-
}
|
|
2636
|
-
bySource.set(row.source, entry);
|
|
2637
|
-
}
|
|
2638
|
-
return {
|
|
2639
|
-
files,
|
|
2640
|
-
chunks,
|
|
2641
|
-
sourceCounts: sources.map((source) => Object.assign({ source }, bySource.get(source)))
|
|
2642
|
-
};
|
|
2643
|
-
})();
|
|
2644
|
-
const searchMode = this.provider || !this.providerInitialized ? "hybrid" : "fts-only";
|
|
2645
|
-
const providerInfo = this.provider ? {
|
|
2646
|
-
provider: this.provider.id,
|
|
2647
|
-
model: this.provider.model
|
|
2648
|
-
} : this.providerInitialized ? {
|
|
2649
|
-
provider: "none",
|
|
2650
|
-
model: void 0
|
|
2651
|
-
} : {
|
|
2652
|
-
provider: this.requestedProvider,
|
|
2653
|
-
model: this.settings.model || void 0
|
|
2654
|
-
};
|
|
2655
|
-
return {
|
|
2656
|
-
backend: "builtin",
|
|
2657
|
-
files: aggregateState.files,
|
|
2658
|
-
chunks: aggregateState.chunks,
|
|
2659
|
-
dirty: this.dirty || this.sessionsDirty,
|
|
2660
|
-
workspaceDir: this.workspaceDir,
|
|
2661
|
-
dbPath: this.settings.store.path,
|
|
2662
|
-
provider: providerInfo.provider,
|
|
2663
|
-
model: providerInfo.model,
|
|
2664
|
-
requestedProvider: this.requestedProvider,
|
|
2665
|
-
sources: Array.from(this.sources),
|
|
2666
|
-
extraPaths: this.settings.extraPaths,
|
|
2667
|
-
sourceCounts: aggregateState.sourceCounts,
|
|
2668
|
-
cache: this.cache.enabled ? {
|
|
2669
|
-
enabled: true,
|
|
2670
|
-
entries: this.db.prepare(`SELECT COUNT(*) as c FROM ${EMBEDDING_CACHE_TABLE}`).get()?.c ?? 0,
|
|
2671
|
-
maxEntries: this.cache.maxEntries
|
|
2672
|
-
} : {
|
|
2673
|
-
enabled: false,
|
|
2674
|
-
maxEntries: this.cache.maxEntries
|
|
2675
|
-
},
|
|
2676
|
-
fts: {
|
|
2677
|
-
enabled: this.fts.enabled,
|
|
2678
|
-
available: this.fts.available,
|
|
2679
|
-
error: this.fts.loadError
|
|
2680
|
-
},
|
|
2681
|
-
fallback: this.fallbackReason ? {
|
|
2682
|
-
from: this.fallbackFrom ?? "local",
|
|
2683
|
-
reason: this.fallbackReason
|
|
2684
|
-
} : void 0,
|
|
2685
|
-
vector: {
|
|
2686
|
-
enabled: this.vector.enabled,
|
|
2687
|
-
available: this.vector.available ?? void 0,
|
|
2688
|
-
extensionPath: this.vector.extensionPath,
|
|
2689
|
-
loadError: this.vector.loadError,
|
|
2690
|
-
dims: this.vector.dims
|
|
2691
|
-
},
|
|
2692
|
-
batch: {
|
|
2693
|
-
enabled: this.batch.enabled,
|
|
2694
|
-
failures: this.batchFailureCount,
|
|
2695
|
-
limit: BATCH_FAILURE_LIMIT,
|
|
2696
|
-
wait: this.batch.wait,
|
|
2697
|
-
concurrency: this.batch.concurrency,
|
|
2698
|
-
pollIntervalMs: this.batch.pollIntervalMs,
|
|
2699
|
-
timeoutMs: this.batch.timeoutMs,
|
|
2700
|
-
lastError: this.batchFailureLastError,
|
|
2701
|
-
lastProvider: this.batchFailureLastProvider
|
|
2702
|
-
},
|
|
2703
|
-
custom: {
|
|
2704
|
-
searchMode,
|
|
2705
|
-
providerUnavailableReason: this.providerUnavailableReason,
|
|
2706
|
-
readonlyRecovery: {
|
|
2707
|
-
attempts: this.readonlyRecoveryAttempts,
|
|
2708
|
-
successes: this.readonlyRecoverySuccesses,
|
|
2709
|
-
failures: this.readonlyRecoveryFailures,
|
|
2710
|
-
lastError: this.readonlyRecoveryLastError
|
|
2711
|
-
}
|
|
2712
|
-
}
|
|
2713
|
-
};
|
|
2714
|
-
}
|
|
2715
|
-
async probeVectorAvailability() {
|
|
2716
|
-
if (!this.vector.enabled) return false;
|
|
2717
|
-
await this.ensureProviderInitialized();
|
|
2718
|
-
if (!this.provider) return false;
|
|
2719
|
-
return this.ensureVectorReady();
|
|
2720
|
-
}
|
|
2721
|
-
async probeEmbeddingAvailability() {
|
|
2722
|
-
await this.ensureProviderInitialized();
|
|
2723
|
-
if (!this.provider) return {
|
|
2724
|
-
ok: false,
|
|
2725
|
-
error: this.providerUnavailableReason ?? "No embedding provider available (FTS-only mode)"
|
|
2726
|
-
};
|
|
2727
|
-
try {
|
|
2728
|
-
await this.embedBatchWithRetry(["ping"]);
|
|
2729
|
-
return { ok: true };
|
|
2730
|
-
} catch (err) {
|
|
2731
|
-
return {
|
|
2732
|
-
ok: false,
|
|
2733
|
-
error: err instanceof Error ? err.message : String(err)
|
|
2734
|
-
};
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
async close() {
|
|
2738
|
-
if (this.closed) return;
|
|
2739
|
-
this.closed = true;
|
|
2740
|
-
const pendingSync = this.syncing;
|
|
2741
|
-
const pendingProviderInit = this.providerInitPromise;
|
|
2742
|
-
if (this.watchTimer) {
|
|
2743
|
-
clearTimeout(this.watchTimer);
|
|
2744
|
-
this.watchTimer = null;
|
|
2745
|
-
}
|
|
2746
|
-
if (this.sessionWatchTimer) {
|
|
2747
|
-
clearTimeout(this.sessionWatchTimer);
|
|
2748
|
-
this.sessionWatchTimer = null;
|
|
2749
|
-
}
|
|
2750
|
-
if (this.intervalTimer) {
|
|
2751
|
-
clearInterval(this.intervalTimer);
|
|
2752
|
-
this.intervalTimer = null;
|
|
2753
|
-
}
|
|
2754
|
-
if (this.watcher) {
|
|
2755
|
-
await this.watcher.close();
|
|
2756
|
-
this.watcher = null;
|
|
2757
|
-
}
|
|
2758
|
-
if (this.sessionUnsubscribe) {
|
|
2759
|
-
this.sessionUnsubscribe();
|
|
2760
|
-
this.sessionUnsubscribe = null;
|
|
2761
|
-
}
|
|
2762
|
-
if (pendingSync) try {
|
|
2763
|
-
await pendingSync;
|
|
2764
|
-
} catch {}
|
|
2765
|
-
if (pendingProviderInit) try {
|
|
2766
|
-
await pendingProviderInit;
|
|
2767
|
-
} catch {}
|
|
2768
|
-
this.db.close();
|
|
2769
|
-
INDEX_CACHE.delete(this.cacheKey);
|
|
2770
|
-
}
|
|
2771
|
-
};
|
|
2772
|
-
//#endregion
|
|
2773
|
-
export { registerBuiltInMemoryEmbeddingProviders as a, listBuiltinAutoSelectMemoryEmbeddingProviderDoctorMetadata as i, closeAllMemoryIndexManagers as n, getBuiltinMemoryEmbeddingProviderDoctorMetadata as r, MemoryIndexManager as t };
|