gerege-cli 0.26.5 → 0.26.6
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 +8 -8
- package/chunks/{MaxSizedBox-VMVLMS4X.js → MaxSizedBox-QCIXIS4P.js} +1 -1
- package/chunks/{StandaloneSessionPicker-UNORCVYY.js → StandaloneSessionPicker-BAFAIRT7.js} +1 -1
- package/chunks/{acp-subagent-executor-623ZUTJT.js → acp-subagent-executor-TPVXURLW.js} +1 -1
- package/chunks/{acpAgent-MTTDTK2C.js → acpAgent-67UN66PB.js} +3 -3
- package/chunks/{advisor-ANUGICJ5.js → advisor-SAXMI4QZ.js} +1 -1
- package/chunks/{agent-GNCQDICJ.js → agent-KV7BXY6C.js} +1 -1
- package/chunks/{agent-headless-OPUXAXQM.js → agent-headless-FQX3JGG6.js} +1 -1
- package/chunks/{agent-host-client-K6GRPTFD.js → agent-host-client-L5EHC4AC.js} +1 -1
- package/chunks/{agent-host-connections-MF3YBZU2.js → agent-host-connections-EDBMCVQF.js} +1 -1
- package/chunks/{anthropicContentGenerator-OK4PFE5Y.js → anthropicContentGenerator-V7TX2NXP.js} +1 -1
- package/chunks/{autofix-pr-MABTGEHZ.js → autofix-pr-WP34NYHL.js} +1 -1
- package/chunks/{batch-V2NJT3M5.js → batch-XFVQ4BLM.js} +1 -1
- package/chunks/{bridge-BJQ627CX.js → bridge-AE7AFEXB.js} +1 -1
- package/chunks/{channel-settings-store-4JMCI4UR.js → channel-settings-store-X63P5OVT.js} +1 -1
- package/chunks/{chunk-ZN57TOVA.js → chunk-2DU2WMTL.js} +1 -1
- package/chunks/{chunk-Z5XENA4A.js → chunk-2JGTWRZJ.js} +8 -7
- package/chunks/{chunk-MTW3A3KT.js → chunk-2LWJGXTW.js} +1 -1
- package/chunks/{chunk-OCBJCZC2.js → chunk-2N3NBTYJ.js} +1 -1
- package/chunks/{chunk-WI4UMN3Q.js → chunk-2TAJ5STJ.js} +1 -1
- package/chunks/{chunk-EIILQ6KT.js → chunk-32XHDDIA.js} +1 -1
- package/chunks/{chunk-FNXO5KWB.js → chunk-34HC2AXI.js} +2 -2
- package/chunks/{chunk-2X3UF2CF.js → chunk-3W32X2DH.js} +1 -1
- package/chunks/{chunk-CKZRJP4F.js → chunk-4ME3BUJK.js} +1 -1
- package/chunks/{chunk-NVSKOSFG.js → chunk-4NDJKNN6.js} +1 -1
- package/chunks/{chunk-BRPJ5EHA.js → chunk-5EXL4TKQ.js} +1 -1
- package/chunks/{chunk-3XBJYUWP.js → chunk-65ME4BOH.js} +1 -1
- package/chunks/{chunk-TQTIEK2W.js → chunk-7453BHJO.js} +1 -1
- package/chunks/{chunk-HSYBIGMS.js → chunk-76FSYQTG.js} +1 -1
- package/chunks/{chunk-FNB3DPQZ.js → chunk-7RNOS7R4.js} +1 -1
- package/chunks/{chunk-H57IX45A.js → chunk-AEKEZRIU.js} +1 -1
- package/chunks/{chunk-CXGGC4NO.js → chunk-AEZYXPFS.js} +1 -1
- package/chunks/{chunk-NGOIJH7K.js → chunk-AFO5ER23.js} +1 -1
- package/chunks/{chunk-UY2ET2AL.js → chunk-AYVCT5FF.js} +1 -1
- package/chunks/{chunk-QOYRDEXR.js → chunk-B37YY4XU.js} +1 -1
- package/chunks/{chunk-IDUGQMTP.js → chunk-BAUMVH4Q.js} +1 -1
- package/chunks/{chunk-CAPG7UVH.js → chunk-BCI62WSL.js} +1 -1
- package/chunks/{chunk-USJFJZ23.js → chunk-BGELKSQ4.js} +1 -1
- package/chunks/{chunk-6X73W4TL.js → chunk-BHIDG6VZ.js} +1 -1
- package/chunks/{chunk-26ISBUM7.js → chunk-BPFFRPWE.js} +6 -6
- package/chunks/{chunk-YGHM5CDT.js → chunk-BQZF3UKI.js} +1 -1
- package/chunks/{chunk-3NQESE5K.js → chunk-CBE6ZIHU.js} +1 -1
- package/chunks/{chunk-DEMXCA3K.js → chunk-CF6SZJNP.js} +1 -1
- package/chunks/{chunk-2VCDJ6UF.js → chunk-CGDFZEER.js} +1 -1
- package/chunks/{chunk-3WQPUP5U.js → chunk-CUP2TNJK.js} +1 -1
- package/chunks/{chunk-2IGE2K5V.js → chunk-DA6LOBSB.js} +1 -1
- package/chunks/{chunk-HFV6CQWE.js → chunk-EFIRES46.js} +1 -1
- package/chunks/{chunk-E5YRAQXM.js → chunk-EKRUF347.js} +1 -1
- package/chunks/{chunk-KN27BFXM.js → chunk-ELDZ4MNL.js} +1 -1
- package/chunks/{chunk-ADTFKUH2.js → chunk-ET5M5WFN.js} +1 -1
- package/chunks/{chunk-IBYFSHBB.js → chunk-EXIFPXMB.js} +1 -1
- package/chunks/{chunk-IA4K4PGK.js → chunk-EYPLBTMI.js} +1 -1
- package/chunks/{chunk-DTTC4ZKY.js → chunk-FEP6W4NJ.js} +1 -1
- package/chunks/{chunk-FHBGTZ4K.js → chunk-FKL3V5BO.js} +1 -1
- package/chunks/{chunk-Q5E5SOY2.js → chunk-FKZ46GKL.js} +1 -1
- package/chunks/{chunk-OPYGNTZP.js → chunk-FYBJGRX7.js} +1 -1
- package/chunks/{chunk-FPZPCZFS.js → chunk-G6DALGGS.js} +1 -1
- package/chunks/{chunk-3Y6LSWEW.js → chunk-GBSRWT7J.js} +1 -1
- package/chunks/{chunk-SMYBY353.js → chunk-GHIFIXNX.js} +1 -1
- package/chunks/{chunk-DE53B2R7.js → chunk-GRAECADD.js} +1 -1
- package/chunks/{chunk-UJYOILZR.js → chunk-GSPGIGO5.js} +3 -3
- package/chunks/{chunk-5UZT4SXG.js → chunk-H3IR3GIE.js} +1 -1
- package/chunks/{chunk-ADZI3OFT.js → chunk-HOG66S6K.js} +1 -1
- package/chunks/{chunk-WB34KMOT.js → chunk-HTAUIJB4.js} +1 -1
- package/chunks/{chunk-MPAR4JBP.js → chunk-I6PUY2T3.js} +1 -1
- package/chunks/{chunk-5ZQWQ3RK.js → chunk-IZ5MWA6E.js} +1 -1
- package/chunks/{chunk-7IERHQ63.js → chunk-JEDL4IKF.js} +1 -1
- package/chunks/{chunk-RVJJFDF3.js → chunk-JH3V5SPA.js} +1 -1
- package/chunks/{chunk-SELRSZFK.js → chunk-JRTOPEM3.js} +1 -1
- package/chunks/{chunk-SQQORHMS.js → chunk-JWNKPINR.js} +1 -1
- package/chunks/{chunk-55RVKT4O.js → chunk-KJGRCIVY.js} +1 -1
- package/chunks/{chunk-GSOBASYW.js → chunk-KZNYALFU.js} +1 -1
- package/chunks/{chunk-FDUXQAGW.js → chunk-LBLLWAKK.js} +1 -1
- package/chunks/{chunk-ZSVSRF4C.js → chunk-LT3J74BZ.js} +1 -1
- package/chunks/{chunk-AMTFJVDD.js → chunk-LTE4N6L3.js} +1 -1
- package/chunks/{chunk-F26LTWDZ.js → chunk-M6KB5RVD.js} +1 -1
- package/chunks/{chunk-2PY7R7GG.js → chunk-MGATL4OA.js} +1 -1
- package/chunks/{chunk-KGJ47CI5.js → chunk-MPVQDYPH.js} +1 -1
- package/chunks/{chunk-BBOJUFMW.js → chunk-MTDBCIDA.js} +1 -1
- package/chunks/{chunk-ZYTG6R7S.js → chunk-MYV7GY3H.js} +1 -1
- package/chunks/{chunk-4GC5HJZO.js → chunk-N7PWZBXV.js} +1 -1
- package/chunks/{chunk-2NOMOJWE.js → chunk-NA4ZF2FE.js} +2 -2
- package/chunks/{chunk-7MTBINFX.js → chunk-NEKPQLFY.js} +2 -2
- package/chunks/{chunk-ABJGFEES.js → chunk-NO7VTKRL.js} +1 -1
- package/chunks/{chunk-OHXQYU6S.js → chunk-NONBHCXP.js} +1 -1
- package/chunks/{chunk-ZOBX6C7E.js → chunk-NVOI6UDQ.js} +1 -1
- package/chunks/{chunk-YLAI26PX.js → chunk-OJ4K62S2.js} +1 -1
- package/chunks/{chunk-CCOUFBOY.js → chunk-OK7LBM5G.js} +1 -1
- package/chunks/{chunk-POA4NX4N.js → chunk-OOJ2AQT3.js} +1 -1
- package/chunks/{chunk-5WLKN3GD.js → chunk-OU7CEG7Q.js} +1 -1
- package/chunks/{chunk-4TYTJQWR.js → chunk-P3JEEDQZ.js} +1 -1
- package/chunks/{chunk-AQWHCRKY.js → chunk-P62S5JGM.js} +1 -1
- package/chunks/{chunk-B6D3KTUK.js → chunk-QDCUR3JB.js} +1 -1
- package/chunks/{chunk-XFLLE2J3.js → chunk-RSLTOIG5.js} +2 -2
- package/chunks/{chunk-ISGF3BVD.js → chunk-RXN7DUMP.js} +2 -2
- package/chunks/{chunk-PN62SUYK.js → chunk-SKGJ26HQ.js} +1 -1
- package/chunks/{chunk-62NLMVVT.js → chunk-SP6CQ3MO.js} +1 -1
- package/chunks/{chunk-4EQWJTJR.js → chunk-T2YTHAJW.js} +1 -1
- package/chunks/{chunk-NO26JN24.js → chunk-T53VMDXH.js} +1 -1
- package/chunks/{chunk-X4BFEDWU.js → chunk-T5DKF33F.js} +1 -1
- package/chunks/{chunk-KKBOCRPF.js → chunk-TB4AUC2L.js} +1 -1
- package/chunks/{chunk-Q6QS5JTK.js → chunk-U3Q72OGV.js} +1 -1
- package/chunks/{chunk-FLJLUMQF.js → chunk-UKLXKJKL.js} +1 -1
- package/chunks/{chunk-IH2PFVWO.js → chunk-VD2GSW64.js} +1 -1
- package/chunks/{chunk-VDRE7U3P.js → chunk-VRKYBH5G.js} +5 -5
- package/chunks/{chunk-MOPJNP5I.js → chunk-W2RQIZ6B.js} +1 -1
- package/chunks/{chunk-2LLPGSUK.js → chunk-W5Z4BWWA.js} +1 -1
- package/chunks/{chunk-CNFA5UUM.js → chunk-W66WWTOP.js} +1 -1
- package/chunks/{chunk-C56YJIEI.js → chunk-WGFX3EL3.js} +1 -1
- package/chunks/{chunk-6NI33TVK.js → chunk-X2TY7VTY.js} +1 -1
- package/chunks/{chunk-FIM7MM25.js → chunk-XISR37DQ.js} +1 -1
- package/chunks/{chunk-KDYUZBZC.js → chunk-YH2XRWRF.js} +1 -1
- package/chunks/{chunk-UBXLQ6TP.js → chunk-ZENMAISJ.js} +1 -1
- package/chunks/{codex-subagent-executor-EK3A2WBH.js → codex-subagent-executor-OLMGVPVS.js} +1 -1
- package/chunks/{config-utils-DLOK7OLM.js → config-utils-OWY5G5Y2.js} +1 -1
- package/chunks/{contextCommand-AVCUCHQC.js → contextCommand-IXFUZH65.js} +1 -1
- package/chunks/{core-runtime-QSS4ZTG6.js → core-runtime-O4LC4NY3.js} +1 -1
- package/chunks/{create-sub-session-PNF7QDKC.js → create-sub-session-6F7C3TMT.js} +1 -1
- package/chunks/{cron-create-C6JOFIU4.js → cron-create-2422NBSJ.js} +1 -1
- package/chunks/{daemon-git-worktree-guard-5XZAZ7D2.js → daemon-git-worktree-guard-EWPQA6NO.js} +1 -1
- package/chunks/{daemon-status-provider-MRNELSNJ.js → daemon-status-provider-FAHOXNFW.js} +1 -1
- package/chunks/{daemon-trust-policy-26CMW3WY.js → daemon-trust-policy-L3DM6AI5.js} +1 -1
- package/chunks/{daemon-trust-policy-monitor-3DWO6NQY.js → daemon-trust-policy-monitor-HNPY5KJ4.js} +1 -1
- package/chunks/{deferred-core-runtime-DEC3N46T.js → deferred-core-runtime-JF42NQJK.js} +1 -1
- package/chunks/{edit-3HMQPCHN.js → edit-E5LEI2LL.js} +1 -1
- package/chunks/{enterPlanMode-QHJF4JXZ.js → enterPlanMode-3COTUV5V.js} +1 -1
- package/chunks/{environment-NGIBJWOT.js → environment-XBBIB3VA.js} +1 -1
- package/chunks/{errors-MSTGCVGJ.js → errors-LNMQ7TUK.js} +1 -1
- package/chunks/{execution-tool-VR4TGOI4.js → execution-tool-QDDKJD2K.js} +1 -1
- package/chunks/{execution-worker-EJH7HIE2.js → execution-worker-TXGZRZXE.js} +1 -1
- package/chunks/{exitPlanMode-P25OHQJ6.js → exitPlanMode-Z7QEMWPE.js} +1 -1
- package/chunks/{fast-path-II433ZDP.js → fast-path-M6K2RACY.js} +1 -1
- package/chunks/{glob-4Q6DCT3F.js → glob-N2QT4U7U.js} +1 -1
- package/chunks/{goal-tools-FFMAJW6V.js → goal-tools-CUSQD3DG.js} +1 -1
- package/chunks/{handleAutoUpdate-QNM26NZK.js → handleAutoUpdate-QF2YQHF6.js} +1 -1
- package/chunks/{i18n-L5URVOBB.js → i18n-AGOA6MUI.js} +1 -1
- package/chunks/{initializer-NQ2NECYP.js → initializer-FRKYDUSX.js} +1 -1
- package/chunks/{installationInfo-BCTXASUM.js → installationInfo-OKA4WXAS.js} +1 -1
- package/chunks/{interactive-mod-session-PPTBI37E.js → interactive-mod-session-MWYN5IFK.js} +1 -1
- package/chunks/{list-7TE5TUZJ.js → list-DE7VUIR2.js} +1 -1
- package/chunks/{llm-BWWKUBBZ.js → llm-N3JGJHYC.js} +4 -4
- package/chunks/{llm-content-generator-QOTGPBYC.js → llm-content-generator-VMUBA7OJ.js} +1 -1
- package/chunks/{loadedSettingsAdapter-THAGI5M2.js → loadedSettingsAdapter-5C36OZ7N.js} +1 -1
- package/chunks/{local-7BTAGV4J.js → local-BE624O3A.js} +1 -1
- package/chunks/{local-execution-environment-S3OR4KSC.js → local-execution-environment-OPGM7Y6L.js} +1 -1
- package/chunks/{loggingContentGenerator-AXJ5E5RS.js → loggingContentGenerator-2MHAI6JR.js} +1 -1
- package/chunks/{loop-wakeup-AJTLMLRX.js → loop-wakeup-BDLATBXH.js} +1 -1
- package/chunks/{manage-memory-JHTUVMDJ.js → manage-memory-BBCEIIWB.js} +1 -1
- package/chunks/{managed-execution-engine-U6GNJ4U4.js → managed-execution-engine-SRFALTCX.js} +1 -1
- package/chunks/{managed-local-serve-P4ZXVRBU.js → managed-local-serve-ICNAS3E6.js} +1 -1
- package/chunks/{managed-npm-update-UDUILNR5.js → managed-npm-update-CTL6LH5Z.js} +1 -1
- package/chunks/{managed-runtime-attestation-worker-P34ZBNRG.js → managed-runtime-attestation-worker-ZRDWKXCI.js} +1 -1
- package/chunks/{managed-runtime-bootstrap-CLMYNPH5.js → managed-runtime-bootstrap-6NTGZXQL.js} +1 -1
- package/chunks/{managed-runtime-session-worker-7H7AZJBV.js → managed-runtime-session-worker-RKQBBFR6.js} +1 -1
- package/chunks/{managed-runtime-ssh-worker-5KEMC7FD.js → managed-runtime-ssh-worker-FCGV6FSW.js} +1 -1
- package/chunks/{managed-session-authority-CFUZ45HT.js → managed-session-authority-C7IW6TJX.js} +1 -1
- package/chunks/{mcp-YMG4RVMC.js → mcp-VC4CJPE5.js} +1 -1
- package/chunks/{memory-7STURUXK.js → memory-S6OJA3ZD.js} +1 -1
- package/chunks/mn-JMS6SWTO.js +8 -0
- package/chunks/{model-call-collection-WBWTO3EG.js → model-call-collection-MJZWRQSU.js} +1 -1
- package/chunks/{model-configuration-6KCZZSZD.js → model-configuration-SKU6L3QI.js} +1 -1
- package/chunks/{modelConfigUtils-Z2EKFSPN.js → modelConfigUtils-TJCB6NXT.js} +1 -1
- package/chunks/{monitor-U5E33JO6.js → monitor-M3PNLCYP.js} +1 -1
- package/chunks/{nonInteractiveCli-BVCL5I5R.js → nonInteractiveCli-MR7JLAWU.js} +1 -1
- package/chunks/{nonInteractiveToolExecutor-B4EUOMYF.js → nonInteractiveToolExecutor-YKA6JMTY.js} +1 -1
- package/chunks/{notebook-edit-MXKD5J2C.js → notebook-edit-ENTFB5D7.js} +1 -1
- package/chunks/{omni-I5YECZBW.js → omni-6YBX4R6K.js} +1 -1
- package/chunks/{openaiContentGenerator-Q5SINFJJ.js → openaiContentGenerator-XRXX33FY.js} +1 -1
- package/chunks/{openaiResponsesContentGenerator-R3XCZLZY.js → openaiResponsesContentGenerator-L6ONEHMR.js} +1 -1
- package/chunks/{pidfile-UOGUNUTK.js → pidfile-XR4JF2Z6.js} +1 -1
- package/chunks/{processUtils-QGQGZHBA.js → processUtils-GQYNJRBJ.js} +1 -1
- package/chunks/{prompt-terminal-ledger-L57JMVSR.js → prompt-terminal-ledger-7BM7YDLG.js} +1 -1
- package/chunks/{qwenContentGenerator-UKZ237LC.js → qwenContentGenerator-QSA32XEL.js} +1 -1
- package/chunks/{reactive-degrade-3OM3HWVA.js → reactive-degrade-TFNBAAPZ.js} +1 -1
- package/chunks/{read-file-63ZLWMOW.js → read-file-VD7OFO2E.js} +1 -1
- package/chunks/{resumeHistoryUtils-R5YQS4YQ.js → resumeHistoryUtils-2B4KPI7G.js} +1 -1
- package/chunks/{review-AT6OWVDO.js → review-C365WGCW.js} +1 -1
- package/chunks/{ripGrep-7KBZGTPV.js → ripGrep-D7WPMBXR.js} +1 -1
- package/chunks/{run-qwen-serve-CLBG7W6F.js → run-qwen-serve-NZWQHWQA.js} +1 -1
- package/chunks/{runtime-R3QIGB7U.js → runtime-J6SPBSCS.js} +1 -1
- package/chunks/{sandboxConfig-PM3ZRQYV.js → sandboxConfig-QS2XBPZG.js} +1 -1
- package/chunks/{scheduled-tasks-PUMNN5XV.js → scheduled-tasks-YNNIOOPM.js} +1 -1
- package/chunks/{scheduler-KTPM226B.js → scheduler-KCMSPHON.js} +1 -1
- package/chunks/{search-memory-7I5MGDNV.js → search-memory-EUBJ7IAV.js} +1 -1
- package/chunks/{send-message-J526AEBI.js → send-message-CWWZUPSK.js} +1 -1
- package/chunks/{serve-KLTMPK4W.js → serve-4CB4BWJ5.js} +1 -1
- package/chunks/{server-VLRNY6KG.js → server-JNANUIGC.js} +3 -3
- package/chunks/{session-2EB57NXY.js → session-3LQLXPUA.js} +1 -1
- package/chunks/{session-attachments-root-I7TESMWL.js → session-attachments-root-BWIVWFHJ.js} +1 -1
- package/chunks/{session-execution-engine-selector-5FAMSPSO.js → session-execution-engine-selector-5OLRX57L.js} +1 -1
- package/chunks/{session-pr-refresh-JCPVQPNJ.js → session-pr-refresh-RLF3EXS3.js} +1 -1
- package/chunks/{sessionService-YRW2IFPR.js → sessionService-U7ACD2HP.js} +1 -1
- package/chunks/{settings-KO2Q47JP.js → settings-FTGWYTUH.js} +1 -1
- package/chunks/{shell-OLZVNTQZ.js → shell-E4RENYQC.js} +1 -1
- package/chunks/{skill-XW2AQS7M.js → skill-OLNPHRWB.js} +1 -1
- package/chunks/{skill-settings-TKAVQ4XP.js → skill-settings-R2BV2GEK.js} +1 -1
- package/chunks/{spawnChannel-MBGCTK2J.js → spawnChannel-LOPAR5T2.js} +1 -1
- package/chunks/{standalone-update-A3YLLIAN.js → standalone-update-IGDX2RGN.js} +1 -1
- package/chunks/{start-opentui-ui-G5ROAR4V.js → start-opentui-ui-33QLBNRC.js} +1 -1
- package/chunks/{startInteractiveUI-PZQR4U53.js → startInteractiveUI-RQKHD7MM.js} +1 -1
- package/chunks/{team-create-S5ZY2UMF.js → team-create-HAVKHNU5.js} +1 -1
- package/chunks/{team-plan-approval-KX6RXEST.js → team-plan-approval-7MCQX67C.js} +1 -1
- package/chunks/{terminal-image-renderer-SCJREXE6.js → terminal-image-renderer-XT5JVEO6.js} +1 -1
- package/chunks/{theme-manager-DZSM4EBR.js → theme-manager-DR5EYGLT.js} +1 -1
- package/chunks/{tool-call-UK56SWCT.js → tool-call-LZHZ5RVH.js} +1 -1
- package/chunks/{tool-result-media-JLLSLGFL.js → tool-result-media-XCXCF4YC.js} +1 -1
- package/chunks/{tool-search-OWPFLVV5.js → tool-search-K6S3ON7M.js} +1 -1
- package/chunks/{total-session-admission-NQU4ACKH.js → total-session-admission-LGSS2VWS.js} +1 -1
- package/chunks/{trustedFolders-N7GXFYSF.js → trustedFolders-IIR2UZRL.js} +1 -1
- package/chunks/{update-relaunch-5SPXXHM2.js → update-relaunch-WVIFX5CN.js} +1 -1
- package/chunks/{updateCheck-VXUIX2XG.js → updateCheck-CMEWLLZJ.js} +1 -1
- package/chunks/{upload-config-OWLL4SRQ.js → upload-config-TCCFCNCD.js} +1 -1
- package/chunks/{useAutoAcceptIndicator-OUYRR56F.js → useAutoAcceptIndicator-5RTTH3OW.js} +1 -1
- package/chunks/{validateNonInterActiveAuth-PSVJO5HK.js → validateNonInterActiveAuth-AO336KDX.js} +1 -1
- package/chunks/{version-C26S7UAW.js → version-JYWKKMNP.js} +1 -1
- package/chunks/{web-fetch-AYOYV7R4.js → web-fetch-HWTAWXFM.js} +1 -1
- package/chunks/{web-search-DAREKD3Z.js → web-search-HAI5LW3G.js} +1 -1
- package/chunks/{workflow-WBGPKVO6.js → workflow-BZ2YFGF6.js} +1 -1
- package/chunks/{workflow-ancestor-trust-GEEB53TB.js → workflow-ancestor-trust-26TFXFPO.js} +1 -1
- package/chunks/{workspace-agents-IMAQME4W.js → workspace-agents-DLI4JQJZ.js} +1 -1
- package/chunks/{workspace-providers-status-VALHVEU2.js → workspace-providers-status-64C7DJZU.js} +1 -1
- package/chunks/{workspace-recovery-worker-AIAVRDGU.js → workspace-recovery-worker-IFRT3KKP.js} +1 -1
- package/chunks/{workspace-registration-store-FXEGZG3L.js → workspace-registration-store-MYKJM2SK.js} +1 -1
- package/chunks/{workspace-registry-GYFFHWCD.js → workspace-registry-GZJRONAY.js} +1 -1
- package/chunks/{workspace-runtime-coordinator-VZ462TLU.js → workspace-runtime-coordinator-44KW6HSN.js} +1 -1
- package/chunks/{workspace-service-5DIZM4IZ.js → workspace-service-YHTSZYYD.js} +1 -1
- package/chunks/{workspace-skills-status-DOOBVL5N.js → workspace-skills-status-NEB62X24.js} +1 -1
- package/chunks/{workspace-trust-reconciler-LOICVUVW.js → workspace-trust-reconciler-HZLOOZWM.js} +1 -1
- package/chunks/{write-file-EJNMAHQD.js → write-file-HD5LHXGL.js} +1 -1
- package/chunks/{zoom-image-S3OARMYP.js → zoom-image-W4BMRC5T.js} +1 -1
- package/cli.js +2 -2
- package/execution-worker.js +1 -1
- package/export-transcript-document.js +1 -1
- package/gerege.mjs +53 -15
- package/locales/mn.js +2702 -3774
- package/package.json +3 -3
- package/chunks/mn-YH2OTBWJ.js +0 -8
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{channelLoopPath,createChannel,daemonChannelLoopPath,daemonChannelStateDir,daemonObservedContactsPath,daemonSessionRoutesPath,loadChannelsConfig,loadChannelsFromExtensions,parseConfiguredChannels,registerBackgroundResponseRelay,registerPermissionRelay,registerSessionCleanup,registerToolCallDispatch,resolveChannelLocale,resolveExtensionChannelEntrySpecifier,selectFirstModel,sessionsPath}from"./chunk-
|
|
3
|
+
import{channelLoopPath,createChannel,daemonChannelLoopPath,daemonChannelStateDir,daemonObservedContactsPath,daemonSessionRoutesPath,loadChannelsConfig,loadChannelsFromExtensions,parseConfiguredChannels,registerBackgroundResponseRelay,registerPermissionRelay,registerSessionCleanup,registerToolCallDispatch,resolveChannelLocale,resolveExtensionChannelEntrySpecifier,selectFirstModel,sessionsPath}from"./chunk-SKGJ26HQ.js";import"./chunk-MMQY4FJL.js";import"./chunk-NY56CL2X.js";import"./chunk-TL6RUTMP.js";import"./chunk-W7V6J2VV.js";import"./chunk-AEZYXPFS.js";import"./chunk-D2NY7HVY.js";import"./chunk-QN7NYEE3.js";import"./chunk-WSOEJTOC.js";import"./chunk-2TAJ5STJ.js";import"./chunk-UWCF7JIF.js";import"./chunk-NONBHCXP.js";import"./chunk-LMUSSYJH.js";import"./chunk-NO7VTKRL.js";import"./chunk-U7HZUZKP.js";import"./chunk-MPVQDYPH.js";import"./chunk-PKK2D2W4.js";import"./chunk-N3AQAZ7D.js";import"./chunk-E5T4R2PM.js";import"./chunk-DOLUT3XC.js";import"./chunk-PTHIQ7ZN.js";import"./chunk-MTDBCIDA.js";import"./chunk-EIPLDYEY.js";import"./chunk-IDXJIDME.js";import"./chunk-OU7CEG7Q.js";import"./chunk-QS2ZMQIS.js";import"./chunk-S7IKHQ6I.js";import"./chunk-PAD5GPDY.js";import"./chunk-MD3ZEOBX.js";import"./chunk-SSYS5YN5.js";import"./chunk-X5QSFJVS.js";import"./chunk-OMDTFGTX.js";import"./chunk-32XHDDIA.js";import"./chunk-46VUDNCL.js";import"./chunk-MKH3EH7O.js";import"./chunk-FKZ46GKL.js";import"./chunk-SP6CQ3MO.js";import"./chunk-HW6SU6MX.js";import"./chunk-ZHHFNZ5J.js";import"./chunk-AKWYMQKU.js";import"./chunk-MZUOREFD.js";import"./chunk-CF6SZJNP.js";import"./chunk-7XZVMIY5.js";import"./chunk-CGDFZEER.js";import"./chunk-ZZJXFLVM.js";import"./chunk-RKDS7A4H.js";import"./chunk-KZNYALFU.js";import"./chunk-IV3HAIUN.js";import"./chunk-XFMPZINJ.js";import"./chunk-DECUAM3U.js";import"./chunk-QX7W2HY7.js";import"./chunk-HN5UYLPU.js";import"./chunk-PGRN3GZY.js";import"./chunk-HTW7PYHK.js";import"./chunk-AMGUAA4G.js";import"./chunk-YFTVFH2A.js";import"./chunk-ZBHL2CXR.js";import"./chunk-NIOS3B3V.js";import"./chunk-2JGTWRZJ.js";import"./chunk-R2EHHA2C.js";import"./chunk-YK7NDQKM.js";import"./chunk-ZLZF2ZDD.js";import"./chunk-OMSVOFTC.js";import"./chunk-PHIPLV2I.js";import"./chunk-ZOTKZI2P.js";import"./chunk-A6G5TAIF.js";import"./chunk-YVBHCSZD.js";import"./chunk-FIXDX63I.js";import"./chunk-T7CHK6C2.js";import"./chunk-PT7NZBDY.js";import"./chunk-TWP72VRH.js";import"./chunk-UYEWRLGD.js";import"./chunk-QVPT37XZ.js";import"./chunk-YVD4O5ZB.js";import"./chunk-T6W33SET.js";import"./chunk-WK2IBT6D.js";import"./chunk-QZV4PFQK.js";import"./chunk-ILECDNJX.js";import"./chunk-QXQGUM3Y.js";import"./chunk-UQ7IROJH.js";import"./chunk-SZCBUCNH.js";import"./chunk-BEKROCWN.js";import"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-XQJOZDV7.js";import"./chunk-CV2UAEZA.js";import"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-Q5IZXKUJ.js";import"./chunk-G5PYYZMM.js";import"./chunk-BG67XABA.js";import"./chunk-OBOU4ZZM.js";import"./chunk-D7XCQWP2.js";import"./chunk-AE5OMKRY.js";import"./chunk-OBV7RNHV.js";import"./chunk-7CQMWEMY.js";import"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4GP3PH7Z.js";import"./chunk-4QQKOW5M.js";import"./chunk-OV3EBH6J.js";import"./chunk-EBMCWXGZ.js";import"./chunk-XZTE4YTN.js";import"./chunk-LSASUDF2.js";import"./chunk-2V5EKGDK.js";import"./chunk-MOKVM4PT.js";import"./chunk-YIW3H46P.js";import"./chunk-EOMRLUNZ.js";import"./chunk-4ZRCV3JY.js";import"./chunk-TL6MLBXR.js";import"./chunk-NMY3PYNO.js";import"./chunk-YGLM5XPP.js";import"./chunk-WGNF7FPC.js";import"./chunk-4NPYOXJO.js";import"./chunk-MWGB5RCF.js";import"./chunk-SCD5TUBG.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-LMJPU2JM.js";import"./chunk-VFB6Q74I.js";import"./chunk-4JNHUZ7M.js";import"./chunk-SW54YEPK.js";import"./chunk-ZCRL73DT.js";import"./chunk-A6LT3FIJ.js";import"./chunk-S6RXVOY6.js";import"./chunk-YZFNBUKG.js";import"./chunk-AGEDDL7Z.js";import"./chunk-2NJJHZ52.js";import"./chunk-BN4FIQ77.js";import"./chunk-X64RXJQQ.js";import"./chunk-HETUGUHE.js";import"./chunk-ET2Z7ZGF.js";import"./chunk-XFPYXD2P.js";import"./chunk-3YWXKSOI.js";import"./chunk-5CWTKFI4.js";import"./chunk-C4MVD5OI.js";import"./chunk-Z2W7S4O4.js";import"./chunk-476F6QIM.js";import"./chunk-4R67LXKL.js";import"./chunk-FQRF6B65.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-GU22I6TY.js";import"./chunk-YEYW7PPR.js";import"./chunk-M4ECEHLX.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-2UOMCYQG.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import"./chunk-VKDAXTCZ.js";import"./chunk-KBWJGX7I.js";export{channelLoopPath,createChannel,daemonChannelLoopPath,daemonChannelStateDir,daemonObservedContactsPath,daemonSessionRoutesPath,loadChannelsConfig,loadChannelsFromExtensions,parseConfiguredChannels,registerBackgroundResponseRelay,registerPermissionRelay,registerSessionCleanup,registerToolCallDispatch,resolveChannelLocale,resolveExtensionChannelEntrySpecifier,selectFirstModel,sessionsPath};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{loadSandboxConfig,resetSandboxProbeCacheForTest}from"./chunk-WWRXBAW4.js";import"./chunk-DOLUT3XC.js";import"./chunk-PTHIQ7ZN.js";import"./chunk-
|
|
3
|
+
import{loadSandboxConfig,resetSandboxProbeCacheForTest}from"./chunk-WWRXBAW4.js";import"./chunk-DOLUT3XC.js";import"./chunk-PTHIQ7ZN.js";import"./chunk-OU7CEG7Q.js";import"./chunk-QS2ZMQIS.js";import"./chunk-S7IKHQ6I.js";import"./chunk-O4EDHV64.js";import"./chunk-PAD5GPDY.js";import"./chunk-MD3ZEOBX.js";import"./chunk-SSYS5YN5.js";import"./chunk-X5QSFJVS.js";import"./chunk-OMDTFGTX.js";import"./chunk-32XHDDIA.js";import"./chunk-46VUDNCL.js";import"./chunk-MKH3EH7O.js";import"./chunk-FKZ46GKL.js";import"./chunk-SP6CQ3MO.js";import"./chunk-HW6SU6MX.js";import"./chunk-ZHHFNZ5J.js";import"./chunk-AKWYMQKU.js";import"./chunk-MZUOREFD.js";import"./chunk-CF6SZJNP.js";import"./chunk-7XZVMIY5.js";import"./chunk-CGDFZEER.js";import"./chunk-ZZJXFLVM.js";import"./chunk-RKDS7A4H.js";import"./chunk-KZNYALFU.js";import"./chunk-IV3HAIUN.js";import"./chunk-XFMPZINJ.js";import"./chunk-DECUAM3U.js";import"./chunk-QX7W2HY7.js";import"./chunk-HN5UYLPU.js";import"./chunk-PGRN3GZY.js";import"./chunk-HTW7PYHK.js";import"./chunk-AMGUAA4G.js";import"./chunk-YFTVFH2A.js";import"./chunk-ZBHL2CXR.js";import"./chunk-NIOS3B3V.js";import"./chunk-2JGTWRZJ.js";import"./chunk-R2EHHA2C.js";import"./chunk-YK7NDQKM.js";import"./chunk-ZLZF2ZDD.js";import"./chunk-OMSVOFTC.js";import"./chunk-PHIPLV2I.js";import"./chunk-ZOTKZI2P.js";import"./chunk-A6G5TAIF.js";import"./chunk-YVBHCSZD.js";import"./chunk-FIXDX63I.js";import"./chunk-T7CHK6C2.js";import"./chunk-PT7NZBDY.js";import"./chunk-TWP72VRH.js";import"./chunk-UYEWRLGD.js";import"./chunk-QVPT37XZ.js";import"./chunk-YVD4O5ZB.js";import"./chunk-T6W33SET.js";import"./chunk-WK2IBT6D.js";import"./chunk-QZV4PFQK.js";import"./chunk-ILECDNJX.js";import"./chunk-QXQGUM3Y.js";import"./chunk-UQ7IROJH.js";import"./chunk-SZCBUCNH.js";import"./chunk-BEKROCWN.js";import"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-XQJOZDV7.js";import"./chunk-CV2UAEZA.js";import"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-Q5IZXKUJ.js";import"./chunk-G5PYYZMM.js";import"./chunk-BG67XABA.js";import"./chunk-OBOU4ZZM.js";import"./chunk-D7XCQWP2.js";import"./chunk-AE5OMKRY.js";import"./chunk-OBV7RNHV.js";import"./chunk-7CQMWEMY.js";import"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4GP3PH7Z.js";import"./chunk-4QQKOW5M.js";import"./chunk-OV3EBH6J.js";import"./chunk-EBMCWXGZ.js";import"./chunk-XZTE4YTN.js";import"./chunk-LSASUDF2.js";import"./chunk-2V5EKGDK.js";import"./chunk-MOKVM4PT.js";import"./chunk-YIW3H46P.js";import"./chunk-EOMRLUNZ.js";import"./chunk-4ZRCV3JY.js";import"./chunk-TL6MLBXR.js";import"./chunk-NMY3PYNO.js";import"./chunk-YGLM5XPP.js";import"./chunk-WGNF7FPC.js";import"./chunk-4NPYOXJO.js";import"./chunk-MWGB5RCF.js";import"./chunk-SCD5TUBG.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-LMJPU2JM.js";import"./chunk-VFB6Q74I.js";import"./chunk-4JNHUZ7M.js";import"./chunk-SW54YEPK.js";import"./chunk-ZCRL73DT.js";import"./chunk-A6LT3FIJ.js";import"./chunk-S6RXVOY6.js";import"./chunk-YZFNBUKG.js";import"./chunk-AGEDDL7Z.js";import"./chunk-2NJJHZ52.js";import"./chunk-BN4FIQ77.js";import"./chunk-X64RXJQQ.js";import"./chunk-HETUGUHE.js";import"./chunk-ET2Z7ZGF.js";import"./chunk-XFPYXD2P.js";import"./chunk-3YWXKSOI.js";import"./chunk-5CWTKFI4.js";import"./chunk-C4MVD5OI.js";import"./chunk-Z2W7S4O4.js";import"./chunk-476F6QIM.js";import"./chunk-4R67LXKL.js";import"./chunk-FQRF6B65.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-GU22I6TY.js";import"./chunk-YEYW7PPR.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-2UOMCYQG.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import"./chunk-VKDAXTCZ.js";import"./chunk-KBWJGX7I.js";export{loadSandboxConfig,resetSandboxProbeCacheForTest};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{ExistingSessionScheduledTaskCreateError,createScheduledTaskWithExistingSession,registerScheduledTasksRoutes,registerWorkspaceQualifiedScheduledTasksRoutes,scheduledTaskSessionName}from"./chunk-
|
|
3
|
+
import{ExistingSessionScheduledTaskCreateError,createScheduledTaskWithExistingSession,registerScheduledTasksRoutes,registerWorkspaceQualifiedScheduledTasksRoutes,scheduledTaskSessionName}from"./chunk-2N3NBTYJ.js";import"./chunk-EXIFPXMB.js";import"./chunk-5EXL4TKQ.js";import"./chunk-YBIENZ5E.js";import"./chunk-TB4AUC2L.js";import"./chunk-JWNKPINR.js";import"./chunk-LGFF5PJA.js";import"./chunk-M5KJJE2X.js";import"./chunk-OGFBP4OQ.js";import"./chunk-ASTRUET5.js";import"./chunk-BCI62WSL.js";import"./chunk-BWQ5AIEA.js";import"./chunk-WDR5XP3Y.js";import"./chunk-IFPLGH5C.js";import"./chunk-WBDNGVHU.js";import"./chunk-BC4C6F32.js";import"./chunk-2QYDBHYZ.js";import"./chunk-LUDNUVSA.js";import"./chunk-VTZZXEWA.js";import"./chunk-L5UULTGF.js";import"./chunk-O6ZQAVRG.js";import"./chunk-3KZHPZVZ.js";import"./chunk-CFTFKWPW.js";import"./chunk-NIEO2TBE.js";import"./chunk-WSOEJTOC.js";import"./chunk-IDXJIDME.js";import"./chunk-OU7CEG7Q.js";import"./chunk-QS2ZMQIS.js";import"./chunk-S7IKHQ6I.js";import"./chunk-PAD5GPDY.js";import"./chunk-MD3ZEOBX.js";import"./chunk-SSYS5YN5.js";import"./chunk-X5QSFJVS.js";import"./chunk-OMDTFGTX.js";import"./chunk-32XHDDIA.js";import"./chunk-46VUDNCL.js";import"./chunk-MKH3EH7O.js";import"./chunk-FKZ46GKL.js";import"./chunk-SP6CQ3MO.js";import"./chunk-HW6SU6MX.js";import"./chunk-ZHHFNZ5J.js";import"./chunk-AKWYMQKU.js";import"./chunk-MZUOREFD.js";import"./chunk-CF6SZJNP.js";import"./chunk-7XZVMIY5.js";import"./chunk-CGDFZEER.js";import"./chunk-ZZJXFLVM.js";import"./chunk-RKDS7A4H.js";import"./chunk-KZNYALFU.js";import"./chunk-IV3HAIUN.js";import"./chunk-XFMPZINJ.js";import"./chunk-DECUAM3U.js";import"./chunk-QX7W2HY7.js";import"./chunk-HN5UYLPU.js";import"./chunk-PGRN3GZY.js";import"./chunk-HTW7PYHK.js";import"./chunk-AMGUAA4G.js";import"./chunk-YFTVFH2A.js";import"./chunk-ZBHL2CXR.js";import"./chunk-NIOS3B3V.js";import"./chunk-2JGTWRZJ.js";import"./chunk-R2EHHA2C.js";import"./chunk-YK7NDQKM.js";import"./chunk-ZLZF2ZDD.js";import"./chunk-OMSVOFTC.js";import"./chunk-PHIPLV2I.js";import"./chunk-ZOTKZI2P.js";import"./chunk-A6G5TAIF.js";import"./chunk-YVBHCSZD.js";import"./chunk-FIXDX63I.js";import"./chunk-T7CHK6C2.js";import"./chunk-PT7NZBDY.js";import"./chunk-TWP72VRH.js";import"./chunk-UYEWRLGD.js";import"./chunk-QVPT37XZ.js";import"./chunk-YVD4O5ZB.js";import"./chunk-T6W33SET.js";import"./chunk-WK2IBT6D.js";import"./chunk-QZV4PFQK.js";import"./chunk-ILECDNJX.js";import"./chunk-QXQGUM3Y.js";import"./chunk-UQ7IROJH.js";import"./chunk-SZCBUCNH.js";import"./chunk-BEKROCWN.js";import"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-XQJOZDV7.js";import"./chunk-CV2UAEZA.js";import"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-Q5IZXKUJ.js";import"./chunk-G5PYYZMM.js";import"./chunk-BG67XABA.js";import"./chunk-OBOU4ZZM.js";import"./chunk-D7XCQWP2.js";import"./chunk-AE5OMKRY.js";import"./chunk-OBV7RNHV.js";import"./chunk-7CQMWEMY.js";import"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4GP3PH7Z.js";import"./chunk-4QQKOW5M.js";import"./chunk-OV3EBH6J.js";import"./chunk-EBMCWXGZ.js";import"./chunk-XZTE4YTN.js";import"./chunk-LSASUDF2.js";import"./chunk-2V5EKGDK.js";import"./chunk-MOKVM4PT.js";import"./chunk-YIW3H46P.js";import"./chunk-EOMRLUNZ.js";import"./chunk-4ZRCV3JY.js";import"./chunk-TL6MLBXR.js";import"./chunk-NMY3PYNO.js";import"./chunk-YGLM5XPP.js";import"./chunk-WGNF7FPC.js";import"./chunk-4NPYOXJO.js";import"./chunk-MWGB5RCF.js";import"./chunk-SCD5TUBG.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-LMJPU2JM.js";import"./chunk-VFB6Q74I.js";import"./chunk-4JNHUZ7M.js";import"./chunk-SW54YEPK.js";import"./chunk-ZCRL73DT.js";import"./chunk-A6LT3FIJ.js";import"./chunk-S6RXVOY6.js";import"./chunk-YZFNBUKG.js";import"./chunk-AGEDDL7Z.js";import"./chunk-2NJJHZ52.js";import"./chunk-BN4FIQ77.js";import"./chunk-X64RXJQQ.js";import"./chunk-HETUGUHE.js";import"./chunk-ET2Z7ZGF.js";import"./chunk-XFPYXD2P.js";import"./chunk-3YWXKSOI.js";import"./chunk-5CWTKFI4.js";import"./chunk-C4MVD5OI.js";import"./chunk-Z2W7S4O4.js";import"./chunk-476F6QIM.js";import"./chunk-4R67LXKL.js";import"./chunk-FQRF6B65.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-GU22I6TY.js";import"./chunk-YEYW7PPR.js";import"./chunk-M4ECEHLX.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-2UOMCYQG.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import"./chunk-VKDAXTCZ.js";import"./chunk-KBWJGX7I.js";export{ExistingSessionScheduledTaskCreateError,createScheduledTaskWithExistingSession,registerScheduledTasksRoutes,registerWorkspaceQualifiedScheduledTasksRoutes,scheduledTaskSessionName};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{_FILE_HISTORY_MARKER_FOR_TESTING,_getDebugLogsMarkerPathForTesting,_getFirstPassDelayForTesting,_getOpenAILogsMarkerPathForTesting,_getSubagentMarkerPathForTesting,_needsCatchUpForTesting,_resetForTesting,_resetNonInteractiveForTesting,_runHousekeepingForTesting,_runPassForTesting,startBackgroundHousekeeping,startNonInteractiveOpenAILogHousekeeping,stopNonInteractiveOpenAILogHousekeeping}from"./chunk-
|
|
3
|
+
import{_FILE_HISTORY_MARKER_FOR_TESTING,_getDebugLogsMarkerPathForTesting,_getFirstPassDelayForTesting,_getOpenAILogsMarkerPathForTesting,_getSubagentMarkerPathForTesting,_needsCatchUpForTesting,_resetForTesting,_resetNonInteractiveForTesting,_runHousekeepingForTesting,_runPassForTesting,startBackgroundHousekeeping,startNonInteractiveOpenAILogHousekeeping,stopNonInteractiveOpenAILogHousekeeping}from"./chunk-JRTOPEM3.js";import"./chunk-UGLQO5K7.js";import"./chunk-LGFF5PJA.js";import"./chunk-NONBHCXP.js";import"./chunk-U7HZUZKP.js";import"./chunk-OU7CEG7Q.js";import"./chunk-QS2ZMQIS.js";import"./chunk-S7IKHQ6I.js";import"./chunk-PAD5GPDY.js";import"./chunk-MD3ZEOBX.js";import"./chunk-SSYS5YN5.js";import"./chunk-X5QSFJVS.js";import"./chunk-OMDTFGTX.js";import"./chunk-32XHDDIA.js";import"./chunk-46VUDNCL.js";import"./chunk-MKH3EH7O.js";import"./chunk-FKZ46GKL.js";import"./chunk-SP6CQ3MO.js";import"./chunk-HW6SU6MX.js";import"./chunk-ZHHFNZ5J.js";import"./chunk-AKWYMQKU.js";import"./chunk-MZUOREFD.js";import"./chunk-CF6SZJNP.js";import"./chunk-7XZVMIY5.js";import"./chunk-CGDFZEER.js";import"./chunk-ZZJXFLVM.js";import"./chunk-RKDS7A4H.js";import"./chunk-KZNYALFU.js";import"./chunk-IV3HAIUN.js";import"./chunk-XFMPZINJ.js";import"./chunk-DECUAM3U.js";import"./chunk-QX7W2HY7.js";import"./chunk-HN5UYLPU.js";import"./chunk-PGRN3GZY.js";import"./chunk-HTW7PYHK.js";import"./chunk-AMGUAA4G.js";import"./chunk-YFTVFH2A.js";import"./chunk-ZBHL2CXR.js";import"./chunk-NIOS3B3V.js";import"./chunk-2JGTWRZJ.js";import"./chunk-R2EHHA2C.js";import"./chunk-YK7NDQKM.js";import"./chunk-ZLZF2ZDD.js";import"./chunk-OMSVOFTC.js";import"./chunk-PHIPLV2I.js";import"./chunk-ZOTKZI2P.js";import"./chunk-A6G5TAIF.js";import"./chunk-YVBHCSZD.js";import"./chunk-FIXDX63I.js";import"./chunk-T7CHK6C2.js";import"./chunk-PT7NZBDY.js";import"./chunk-TWP72VRH.js";import"./chunk-UYEWRLGD.js";import"./chunk-QVPT37XZ.js";import"./chunk-YVD4O5ZB.js";import"./chunk-T6W33SET.js";import"./chunk-WK2IBT6D.js";import"./chunk-QZV4PFQK.js";import"./chunk-ILECDNJX.js";import"./chunk-QXQGUM3Y.js";import"./chunk-UQ7IROJH.js";import"./chunk-SZCBUCNH.js";import"./chunk-BEKROCWN.js";import"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-XQJOZDV7.js";import"./chunk-CV2UAEZA.js";import"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-Q5IZXKUJ.js";import"./chunk-G5PYYZMM.js";import"./chunk-BG67XABA.js";import"./chunk-OBOU4ZZM.js";import"./chunk-D7XCQWP2.js";import"./chunk-AE5OMKRY.js";import"./chunk-OBV7RNHV.js";import"./chunk-7CQMWEMY.js";import"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4GP3PH7Z.js";import"./chunk-4QQKOW5M.js";import"./chunk-OV3EBH6J.js";import"./chunk-EBMCWXGZ.js";import"./chunk-XZTE4YTN.js";import"./chunk-LSASUDF2.js";import"./chunk-2V5EKGDK.js";import"./chunk-MOKVM4PT.js";import"./chunk-YIW3H46P.js";import"./chunk-EOMRLUNZ.js";import"./chunk-4ZRCV3JY.js";import"./chunk-TL6MLBXR.js";import"./chunk-NMY3PYNO.js";import"./chunk-YGLM5XPP.js";import"./chunk-WGNF7FPC.js";import"./chunk-4NPYOXJO.js";import"./chunk-MWGB5RCF.js";import"./chunk-SCD5TUBG.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-LMJPU2JM.js";import"./chunk-VFB6Q74I.js";import"./chunk-4JNHUZ7M.js";import"./chunk-SW54YEPK.js";import"./chunk-ZCRL73DT.js";import"./chunk-A6LT3FIJ.js";import"./chunk-S6RXVOY6.js";import"./chunk-YZFNBUKG.js";import"./chunk-AGEDDL7Z.js";import"./chunk-2NJJHZ52.js";import"./chunk-BN4FIQ77.js";import"./chunk-X64RXJQQ.js";import"./chunk-HETUGUHE.js";import"./chunk-ET2Z7ZGF.js";import"./chunk-XFPYXD2P.js";import"./chunk-3YWXKSOI.js";import"./chunk-5CWTKFI4.js";import"./chunk-C4MVD5OI.js";import"./chunk-Z2W7S4O4.js";import"./chunk-476F6QIM.js";import"./chunk-4R67LXKL.js";import"./chunk-FQRF6B65.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-GU22I6TY.js";import"./chunk-YEYW7PPR.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-2UOMCYQG.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import"./chunk-VKDAXTCZ.js";import"./chunk-KBWJGX7I.js";export{_FILE_HISTORY_MARKER_FOR_TESTING,_getDebugLogsMarkerPathForTesting,_getFirstPassDelayForTesting,_getOpenAILogsMarkerPathForTesting,_getSubagentMarkerPathForTesting,_needsCatchUpForTesting,_resetForTesting,_resetNonInteractiveForTesting,_runHousekeepingForTesting,_runPassForTesting,startBackgroundHousekeeping,startNonInteractiveOpenAILogHousekeeping,stopNonInteractiveOpenAILogHousekeeping};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{AUTO_MEMORY_SCOPES,AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED,buildAutoMemoryTree,normalizeAutoMemoryKeyword,rereadAutoMemoryDocument,sanitizeAutoMemoryPromptField,scanAutoMemorySnapshot,toAutoMemoryRef}from"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-S6RXVOY6.js";import"./chunk-FQRF6B65.js";import{MemorySearchEvent,logMemorySearch}from"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-NGOIJH7K.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-DBRQGEEI.js";import{BaseDeclarativeTool,BaseToolInvocation}from"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import{ToolDisplayNames,ToolNames}from"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();init_esbuild_shims();import{createHmac,randomBytes,timingSafeEqual}from"node:crypto";var SEARCH_BODY_WINDOW_CHARS=1200;var SEARCH_BODY_CONTEXT_BEFORE_CHARS=300;var SEARCH_DIVERSITY_BONUS_PER_KEYWORD=2;var SEARCH_DIVERSITY_BONUS_CAP=4;var FETCH_BODY_WINDOW_CHARS=8e3;var FETCH_TOTAL_BODY_CHARS=2e4;var SEARCH_TOTAL_BODY_CHARS=6e3;var READ_LIMIT_EXHAUSTED_MESSAGE="The per-ref fetch budget is exhausted before the end of this memory. Use the returned content or report the bounded-read limit; do not fetch or search this same ref again to continue reading.";var MAX_FETCH_REFS=5;var MAX_SEARCH_RESULTS=5;var MAX_EXPLORE_BRANCHES=3;var MAX_EXPLORE_LEAVES=20;var CURSOR_HMAC_KEY=randomBytes(32);var SEARCH_MATCH_WEIGHT={titleExact:12,keywordExact:10,titleContains:8,keywordContains:6,metadata:4,body:1};var SCOPE_ORDER=AUTO_MEMORY_SCOPES;var CATEGORY_KEYS=new Set([...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]);var SCOPE_KEYS=new Set(AUTO_MEMORY_SCOPES);function normalizeSearchText(value){return normalizeAutoMemoryKeyword(value).toLocaleLowerCase("en-US")}__name(normalizeSearchText,"normalizeSearchText");function normalizedOffsetToSourceOffset(source,normalizedOffset){if(normalizedOffset<=0)return 0;let low=0;let high=source.length;while(low<high){const middle=Math.floor((low+high)/2);if(normalizeSearchText(source.slice(0,middle)).length<normalizedOffset){low=middle+1}else{high=middle}}if(normalizeSearchText(source.slice(0,low)).length>normalizedOffset){low=Math.max(0,low-1)}return low}__name(normalizedOffsetToSourceOffset,"normalizedOffsetToSourceOffset");function memoryRef(doc){return toAutoMemoryRef(doc)}__name(memoryRef,"memoryRef");function encodeCursor(cursor){return Buffer.from(JSON.stringify({...cursor,mac:signCursor(cursor)}),"utf-8").toString("base64url")}__name(encodeCursor,"encodeCursor");function decodeCursor(cursor){try{const signed=JSON.parse(Buffer.from(cursor,"base64url").toString("utf-8"));const{mac:_mac,...parsed}=signed;if(typeof signed.mac!=="string"||!hasValidCursorMac(parsed,signed.mac)){throw new Error("Invalid cursor.")}if(parsed.kind==="memory"&&typeof parsed.ref==="string"&&typeof parsed.mtimeMs==="number"&&Number.isInteger(parsed.offset)&&parsed.offset>=0||parsed.kind==="branch"&&typeof parsed.category==="string"&&CATEGORY_KEYS.has(parsed.category)&&Array.isArray(parsed.scopes)&&parsed.scopes.every(scope=>SCOPE_KEYS.has(scope))&&Number.isInteger(parsed.offset)&&parsed.offset>=0){return parsed}}catch{}throw new Error("Invalid cursor.")}__name(decodeCursor,"decodeCursor");function signCursor(cursor){return createHmac("sha256",CURSOR_HMAC_KEY).update(JSON.stringify(cursor)).digest("base64url")}__name(signCursor,"signCursor");function hasValidCursorMac(cursor,mac){const expected=Buffer.from(signCursor(cursor),"utf8");const actual=Buffer.from(mac,"utf8");return expected.length===actual.length&&timingSafeEqual(expected,actual)}__name(hasValidCursorMac,"hasValidCursorMac");function parseMemoryCursor(cursor,ref,mtimeMs){if(!cursor)return{offset:0};const parsed=decodeCursor(cursor);if(parsed.kind!=="memory"||parsed.ref!==ref){throw new Error("Invalid cursor.")}if(parsed.mtimeMs!==mtimeMs){throw new Error("Memory changed since cursor was issued.")}return{offset:parsed.offset}}__name(parseMemoryCursor,"parseMemoryCursor");function parseBranchCursor(cursor,category,scopes){if(!cursor)return 0;const parsed=decodeCursor(cursor);if(parsed.kind!=="branch"||parsed.category!==category||parsed.scopes.join("\0")!==scopes.join("\0")){throw new Error("Invalid cursor.")}return parsed.offset}__name(parseBranchCursor,"parseBranchCursor");function makeMemoryCursor(ref,mtimeMs,offset){return offset===void 0?void 0:encodeCursor({kind:"memory",ref,mtimeMs,offset})}__name(makeMemoryCursor,"makeMemoryCursor");function makeBranchCursor(category,scopes,offset){return offset===void 0?void 0:encodeCursor({kind:"branch",category,scopes:[...scopes],offset})}__name(makeBranchCursor,"makeBranchCursor");function bodyWindow(body,ref,mtimeMs,cursor,preferredOffset=0,maxChars=FETCH_BODY_WINDOW_CHARS,maxTotalChars=FETCH_TOTAL_BODY_CHARS){const total=body.length;const readableTotal=Math.min(total,maxTotalChars);const parsedCursor=cursor?parseMemoryCursor(cursor,ref,mtimeMs):{offset:preferredOffset};const requestedOffset=parsedCursor.offset;const start=Math.max(0,Math.min(requestedOffset,readableTotal));const end=Math.min(readableTotal,start+maxChars);const nextCursor=end<readableTotal?makeMemoryCursor(ref,mtimeMs,end):void 0;return{content:body.slice(start,end),truncated:end<total,range:{start,end,total},previousCursor:start>0?makeMemoryCursor(ref,mtimeMs,Math.max(0,start-maxChars)):void 0,nextCursor,...nextCursor?{continuation:{mode:"fetch",refs:[ref],cursor:nextCursor}}:{}}}__name(bodyWindow,"bodyWindow");function validateScope(scope){if(!SCOPE_KEYS.has(scope)){throw new Error(`Invalid memory scope: ${scope}`)}}__name(validateScope,"validateScope");function validateCategory(category){if(!CATEGORY_KEYS.has(category)){throw new Error(`Invalid memory category: ${category}`)}}__name(validateCategory,"validateCategory");function normalizeValidSearchKeyword(keyword){const normalized=normalizeSearchText(keyword);const cjkCount=[...normalized].filter(char=>new RegExp("\\p{Script=Han}|\\p{Script=Hiragana}|\\p{Script=Katakana}|\\p{Script=Hangul}","u").test(char)).length;const letterOrNumberCount=(normalized.match(/[\p{L}\p{N}]/gu)??[]).length;if(cjkCount<2&&letterOrNumberCount<3){return null}return normalized}__name(normalizeValidSearchKeyword,"normalizeValidSearchKeyword");function normalizeSearchKeywords(keywords){const normalized=[];const seen=new Set;const ignored=[];for(const keyword of keywords){if(normalized.length>=5){ignored.push(keyword);continue}const valid=normalizeValidSearchKeyword(keyword);if(!valid){ignored.push(keyword);continue}if(!seen.has(valid)){seen.add(valid);normalized.push(valid)}}if(normalized.length===0){throw new Error("search requires at least one valid keyword.")}return{keywords:normalized,warnings:ignored.length>0?[`Ignored invalid or excess search keywords: ${ignored.join(", ")}`]:[]}}__name(normalizeSearchKeywords,"normalizeSearchKeywords");async function getSnapshot(options,scopes){if(options.snapshot){if(scopes===void 0)return options.snapshot;const requested=[...new Set(scopes)];const requestedSet=new Set(requested);const sourceStatus=options.snapshot.sourceStatus;return{docs:options.snapshot.docs.filter(doc=>requestedSet.has(doc.scope)),sourceStatus:{requestedScopes:requested,searchedScopes:sourceStatus.searchedScopes.filter(scope=>requestedSet.has(scope)),unavailableScopes:sourceStatus.unavailableScopes.filter(item=>requestedSet.has(item.scope)),complete:sourceStatus.incompleteScopes.every(item=>!requestedSet.has(item.scope)),incompleteScopes:sourceStatus.incompleteScopes.filter(item=>requestedSet.has(item.scope))}}}return scanAutoMemorySnapshot(options.projectRoot,{scopes:scopes??(options.teamMemoryEnabled&&options.trustedProject?SCOPE_ORDER:void 0),teamMemoryEnabled:options.teamMemoryEnabled,trustedProject:options.trustedProject,uncapped:true})}__name(getSnapshot,"getSnapshot");function scopeIndex(scope){const index=SCOPE_ORDER.indexOf(scope);return index===-1?SCOPE_ORDER.length:index}__name(scopeIndex,"scopeIndex");function exactOrContains(a,b){const escaped=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|[^\\p{L}\\p{N}])${escaped}(?:$|[^\\p{L}\\p{N}])`,"u").test(b)}__name(exactOrContains,"exactOrContains");function metadataMatchCount(score){return score.matches.filter(match=>match.source!=="body").length}__name(metadataMatchCount,"metadataMatchCount");function isQualifiedMetadataMatch(score,keywordCount){if(score.titleExact>0||score.keywordExact>0)return true;return metadataMatchCount(score)>=Math.min(2,keywordCount)}__name(isQualifiedMetadataMatch,"isQualifiedMetadataMatch");function scoreSearchDoc(doc,keywords){const title=normalizeSearchText(doc.title);const storedKeywords=doc.keywords.map(normalizeSearchText);const description=normalizeSearchText(doc.description);const usageScenarios=doc.usageScenarios.map(normalizeSearchText);const body=normalizeSearchText(doc.body.slice(0,FETCH_TOTAL_BODY_CHARS));const score={total:0,coverageCount:0,coverageRatio:0,rarityBonus:0,matchedKeywords:[],matches:[],titleExact:0,keywordExact:0,titleContains:0,keywordContains:0,metadata:0,body:0};const bodyHits=new Set;for(const keyword of keywords){let bestMatch;const consider=__name((weight,source,kind)=>{if(!bestMatch||weight>bestMatch.weight){bestMatch={weight,match:{keyword,source,kind}}}},"consider");if(title===keyword){score.titleExact+=1;consider(SEARCH_MATCH_WEIGHT.titleExact,"title","exact")}if(storedKeywords.some(stored=>stored===keyword)){score.keywordExact+=1;consider(SEARCH_MATCH_WEIGHT.keywordExact,"keyword","exact")}if(title.includes(keyword)){score.titleContains+=1;consider(SEARCH_MATCH_WEIGHT.titleContains,"title","contains")}if(storedKeywords.some(stored=>exactOrContains(stored,keyword))){score.keywordContains+=1;consider(SEARCH_MATCH_WEIGHT.keywordContains,"keyword","contains")}if(description.includes(keyword)){score.metadata+=1;consider(SEARCH_MATCH_WEIGHT.metadata,"description","contains")}else if(usageScenarios.some(item=>item.includes(keyword))){score.metadata+=1;consider(SEARCH_MATCH_WEIGHT.metadata,"usage_scenario","contains")}if(body.includes(keyword)){bodyHits.add(keyword);consider(SEARCH_MATCH_WEIGHT.body,"body","contains")}if(bestMatch){score.total+=bestMatch.weight;if(keyword.includes(" "))score.total+=2;if(isExactIdentifier(keyword))score.total+=2;score.matchedKeywords.push(keyword);score.matches.push(bestMatch.match)}}score.body=bodyHits.size;score.coverageCount=score.matchedKeywords.length;score.coverageRatio=score.coverageCount/keywords.length;if(score.total===0)return null;return score}__name(scoreSearchDoc,"scoreSearchDoc");function isExactIdentifier(keyword){return/[._:/#()[\]{}-]|\d/.test(keyword)&&!keyword.includes(" ")}__name(isExactIdentifier,"isExactIdentifier");function applyRarityBonus(candidates){const documentFrequency=new Map;for(const{score}of candidates){for(const keyword of score.matchedKeywords){documentFrequency.set(keyword,(documentFrequency.get(keyword)??0)+1)}}for(const{score}of candidates){score.rarityBonus=score.matchedKeywords.filter(keyword=>(documentFrequency.get(keyword)??0)<=2).length;score.total+=Math.min(2,score.rarityBonus)}}__name(applyRarityBonus,"applyRarityBonus");function compareSearchResult(a,b){return b.score.total-a.score.total||b.score.coverageRatio-a.score.coverageRatio||b.score.coverageCount-a.score.coverageCount||b.score.titleExact-a.score.titleExact||b.score.keywordExact-a.score.keywordExact||b.score.titleContains-a.score.titleContains||b.score.keywordContains-a.score.keywordContains||b.score.metadata-a.score.metadata||b.score.body-a.score.body||scopeIndex(a.doc.scope)-scopeIndex(b.doc.scope)||a.doc.relativePath.localeCompare(b.doc.relativePath)}__name(compareSearchResult,"compareSearchResult");function selectSearchResults(candidates,limit){const remaining=[...candidates].sort(compareSearchResult);const selected=[];const coveredKeywords=new Set;while(selected.length<limit&&remaining.length>0){let bestIndex=0;let bestUtility=Number.NEGATIVE_INFINITY;for(let index=0;index<remaining.length;index+=1){const candidate=remaining[index];const uncovered=candidate.score.matchedKeywords.filter(keyword=>!coveredKeywords.has(keyword)).length;const diversityBonus=Math.min(SEARCH_DIVERSITY_BONUS_CAP,uncovered*SEARCH_DIVERSITY_BONUS_PER_KEYWORD);const utility=candidate.score.total+diversityBonus;if(utility>bestUtility){bestIndex=index;bestUtility=utility}}const[best]=remaining.splice(bestIndex,1);if(!best)break;selected.push(best);for(const keyword of best.score.matchedKeywords){coveredKeywords.add(keyword)}}return selected}__name(selectSearchResults,"selectSearchResults");function selectBodyWindowOffset(body,keywords){const searchableBody=body.slice(0,FETCH_TOTAL_BODY_CHARS);const normalizedBody=normalizeSearchText(searchableBody);const hitsByKeyword=new Map;const starts=new Set;for(const keyword of keywords){const hits=[];let from=0;while(from<normalizedBody.length){const index=normalizedBody.indexOf(keyword,from);if(index<0)break;hits.push(index);starts.add(Math.max(0,index-SEARCH_BODY_CONTEXT_BEFORE_CHARS));from=index+Math.max(1,keyword.length)}if(hits.length>0)hitsByKeyword.set(keyword,hits)}if(hitsByKeyword.size===0){return{offset:0,maxChars:SEARCH_BODY_WINDOW_CHARS}}let bestStart=0;let best;for(const start of starts){const end2=start+SEARCH_BODY_WINDOW_CHARS;const visibleKeywords=new Set;for(const[keyword,hits]of hitsByKeyword){const firstPossible=start-keyword.length+1;let low=0;let high=hits.length;while(low<high){const middle=Math.floor((low+high)/2);if(hits[middle]<firstPossible)low=middle+1;else high=middle}if(hits[low]!==void 0&&hits[low]<end2){visibleKeywords.add(keyword)}}const score={identifiers:[...visibleKeywords].filter(isExactIdentifier).length,coverage:visibleKeywords.size,longestPhrase:Math.max(0,...[...visibleKeywords].map(item=>item.length)),matchedChars:[...visibleKeywords].reduce((total,item)=>total+item.length,0)};if(!best||score.identifiers>best.identifiers||score.identifiers===best.identifiers&&(score.coverage>best.coverage||score.coverage===best.coverage&&(score.longestPhrase>best.longestPhrase||score.longestPhrase===best.longestPhrase&&score.matchedChars>best.matchedChars))){best=score;bestStart=start}}const offset=normalizedOffsetToSourceOffset(searchableBody,bestStart);const normalizedEnd=Math.min(bestStart+SEARCH_BODY_WINDOW_CHARS,normalizedBody.length);const end=normalizedOffsetToSourceOffset(searchableBody,normalizedEnd);return{offset,maxChars:end-offset}}__name(selectBodyWindowOffset,"selectBodyWindowOffset");async function readContentResult(doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,cursor,preferredOffset=0,maxChars=FETCH_BODY_WINDOW_CHARS,maxTotalChars=FETCH_TOTAL_BODY_CHARS){const freshDoc=await rereadAutoMemoryDocument(doc);if(!freshDoc)return null;const ref=memoryRef(freshDoc);if(bodyPresentVersions.get(ref)===freshDoc.mtimeMs){return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),alreadyAvailable:true}}const window=bodyWindow(freshDoc.body,ref,freshDoc.mtimeMs,cursor,preferredOffset,maxChars,maxTotalChars);const previousCoverage=bodyCoverage.get(ref);if(window.range&&previousCoverage?.version===freshDoc.mtimeMs&&previousCoverage.total===window.range.total&&isRangeCovered(previousCoverage.ranges,window.range)){return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),alreadyAvailable:true,truncated:window.truncated,range:window.range,previousCursor:window.previousCursor,nextCursor:window.nextCursor,continuation:window.continuation,...exhaustedBodyRefs.has(ref)?{readLimitExhausted:true,readLimitMessage:READ_LIMIT_EXHAUSTED_MESSAGE}:{}}}let readLimitExhausted=false;if(window.content&&window.range){const previous=bodyCoverage.get(ref);const coverage=previous?.version===freshDoc.mtimeMs&&previous.total===window.range.total?previous:{version:freshDoc.mtimeMs,total:window.range.total,ranges:[]};coverage.ranges.push({start:window.range.start,end:window.range.end});coverage.ranges.sort((a,b)=>a.start-b.start);bodyCoverage.set(ref,coverage);let coveredChars=0;let coveredEnd=0;for(const range of coverage.ranges){if(range.end<=coveredEnd)continue;coveredChars+=range.end-Math.max(range.start,coveredEnd);coveredEnd=range.end}readLimitExhausted=freshDoc.body.length>maxTotalChars&&coveredChars>=maxTotalChars;if(readLimitExhausted)exhaustedBodyRefs.add(ref);let coveredUntil=0;for(const range of coverage.ranges){if(range.start>coveredUntil)break;coveredUntil=Math.max(coveredUntil,range.end)}if(coveredUntil>=coverage.total){bodyPresentVersions.set(ref,freshDoc.mtimeMs)}}return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),...window,...readLimitExhausted?{readLimitExhausted:true,readLimitMessage:READ_LIMIT_EXHAUSTED_MESSAGE}:{}}}__name(readContentResult,"readContentResult");function isRangeCovered(ranges,target){let coveredUntil=target.start;for(const range of ranges){if(range.end<=coveredUntil)continue;if(range.start>coveredUntil)return false;coveredUntil=Math.max(coveredUntil,range.end);if(coveredUntil>=target.end)return true}return false}__name(isRangeCovered,"isRangeCovered");function suggestMemoryRef(missingRef,availableRefs){const matches=availableRefs.filter(candidate=>candidate.endsWith(`:${missingRef}`)||candidate.endsWith(`/${missingRef}`));return matches.length===1?matches[0]:void 0}__name(suggestMemoryRef,"suggestMemoryRef");function scopesFromRefs(refs){const scopes=[];const seen=new Set;for(const ref of refs){const[scope]=ref.split(":",1);if(!scope||!SCOPE_KEYS.has(scope))continue;if(!seen.has(scope)){seen.add(scope);scopes.push(scope)}}return scopes}__name(scopesFromRefs,"scopesFromRefs");async function executeSearchMemory(params,options){options.abortSignal?.throwIfAborted();const startedAt=Date.now();const bodyPresentVersions=options.bodyPresentVersions??new Map;const bodyCoverage=options.bodyCoverage??new Map;const exhaustedBodyRefs=options.exhaustedBodyRefs??new Set;const complete=__name((result,docsScanned,resultsReturned)=>{options.onComplete?.({mode:params.mode,docsScanned,resultsReturned,durationMs:Date.now()-startedAt});return result},"complete");if(params.mode==="fetch"){if(params.refs.length===0||params.refs.length>MAX_FETCH_REFS){throw new Error("fetch requires 1-5 refs.")}if(params.cursor&¶ms.refs.length!==1){throw new Error("fetch cursor requires exactly one ref.")}const refScopes=scopesFromRefs(params.refs);const hasUnscopedRef=params.refs.some(ref=>{const[scope]=ref.split(":",1);return!scope||!SCOPE_KEYS.has(scope)});const snapshot2=await getSnapshot(options,hasUnscopedRef?void 0:refScopes);options.abortSignal?.throwIfAborted();const docsByRef=new Map(snapshot2.docs.map(doc=>[memoryRef(doc),doc]));const availableRefs=[...docsByRef.keys()];const seen=new Set;const results=[];const missingRefs=[];const warnings=[];let remaining=FETCH_TOTAL_BODY_CHARS;for(const ref of params.refs){options.abortSignal?.throwIfAborted();if(seen.has(ref))continue;seen.add(ref);const doc=docsByRef.get(ref);if(!doc){missingRefs.push(ref);const suggestion=suggestMemoryRef(ref,availableRefs);warnings.push(suggestion?`Unknown ref ${JSON.stringify(ref)}. Did you mean ${JSON.stringify(suggestion)}? Copy refs exactly from the memory tree or a search result.`:`Unknown ref ${JSON.stringify(ref)}. Copy the complete ref exactly from the memory tree or a search result.`);continue}if(remaining<=0){warnings.push(`Skipped ${ref}: the aggregate fetch body budget is exhausted.`);continue}if(!params.cursor&&exhaustedBodyRefs.has(ref)&&!bodyPresentVersions.has(ref)){warnings.push(`Skipped ${ref}: the per-ref fetch budget is already exhausted for this turn.`);continue}const result=await readContentResult(doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,params.cursor,0,Math.min(FETCH_BODY_WINDOW_CHARS,remaining));options.abortSignal?.throwIfAborted();if(result){const{title:_title,...fetchResult}=result;remaining-=fetchResult.content?.length??0;results.push(fetchResult)}else{missingRefs.push(ref);warnings.push(`Memory ref ${JSON.stringify(ref)} was unavailable or changed while being read. Search again to refresh the memory snapshot.`)}}return complete({mode:"fetch",sourceStatus:snapshot2.sourceStatus,results,...missingRefs.length>0?{missingRefs}:{},...warnings.length>0?{warnings}:{}},snapshot2.docs.length,results.length)}if(params.mode==="search"){if(params.limit!==void 0&&(params.limit<1||params.limit>5)){throw new Error("search limit must be between 1 and 5.")}if(params.keywords.length<1){throw new Error("search requires keywords.")}for(const scope of params.scopes??[])validateScope(scope);const scopes2=params.scopes?[...new Set(params.scopes)]:void 0;for(const category of params.categories??[])validateCategory(category);const{keywords,warnings}=normalizeSearchKeywords(params.keywords);const snapshot2=await getSnapshot(options,scopes2);options.abortSignal?.throwIfAborted();const categories=params.categories?new Set(params.categories):void 0;const scored=snapshot2.docs.filter(doc=>!categories||categories.has(doc.category)).filter(doc=>!exhaustedBodyRefs.has(memoryRef(doc))).map(doc=>{options.abortSignal?.throwIfAborted();const score=scoreSearchDoc(doc,keywords);return score?{doc,score}:null}).filter(item=>item!==null);applyRarityBonus(scored);const qualifiedMetadataCandidates=scored.filter(({score})=>isQualifiedMetadataMatch(score,keywords.length));const candidates=qualifiedMetadataCandidates.length>0?qualifiedMetadataCandidates:scored.filter(({score})=>score.body>=Math.min(2,keywords.length));const ranked=selectSearchResults(candidates,params.limit??MAX_SEARCH_RESULTS);let remaining=SEARCH_TOTAL_BODY_CHARS;const results=[];for(const item of ranked){options.abortSignal?.throwIfAborted();if(remaining<=0)break;const window=selectBodyWindowOffset(item.doc.body,keywords);const result=await readContentResult(item.doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,void 0,window.offset,Math.min(window.maxChars,remaining),FETCH_TOTAL_BODY_CHARS);options.abortSignal?.throwIfAborted();if(result){remaining-=result.content?.length??0;results.push({...result,matches:item.score.matches})}}return complete({mode:"search",sourceStatus:snapshot2.sourceStatus,results,...warnings.length>0?{warnings}:{}},snapshot2.docs.length,results.length)}for(const scope of params.scopes??[])validateScope(scope);const scopes=params.scopes?[...new Set(params.scopes)]:void 0;const limitPerBranch=params.limitPerBranch??MAX_EXPLORE_LEAVES;if(limitPerBranch<1||limitPerBranch>MAX_EXPLORE_LEAVES){throw new Error("explore limitPerBranch must be between 1 and 20.")}if((params.branches?.length??0)>MAX_EXPLORE_BRANCHES){throw new Error("explore accepts at most 3 branches.")}for(const branch of params.branches??[])validateCategory(branch.category);const snapshot=await getSnapshot(options,scopes);options.abortSignal?.throwIfAborted();const cursorScopes=snapshot.sourceStatus.searchedScopes;if(!params.branches||params.branches.length===0){const tree2=buildAutoMemoryTree(snapshot.docs);return complete({mode:"explore",sourceStatus:snapshot.sourceStatus,router:tree2.categories.map(category=>({category:category.category,total:category.total,keywords:category.keywords,hiddenKeywordCount:category.hiddenKeywordCount})),branches:[]},snapshot.docs.length,tree2.categories.length)}const tree=buildAutoMemoryTree(snapshot.docs);const byCategory=new Map(tree.categories.map(category=>[category.category,category]));const branches=params.branches.map(branch=>{const category=byCategory.get(branch.category);const start=parseBranchCursor(branch.cursor,branch.category,cursorScopes);const leaves=category?.leaves.slice(start,start+limitPerBranch)??[];const next=category&&start+limitPerBranch<category.leaves.length?makeBranchCursor(branch.category,cursorScopes,start+limitPerBranch):void 0;return{category:branch.category,total:category?.total??0,leaves,...next?{nextCursor:next}:{}}});return complete({mode:"explore",sourceStatus:snapshot.sourceStatus,branches},snapshot.docs.length,branches.reduce((total,branch)=>total+branch.leaves.length,0))}__name(executeSearchMemory,"executeSearchMemory");var SearchMemoryToolInvocation=class extends BaseToolInvocation{constructor(config,params){super(params);this.config=config}static{__name(this,"SearchMemoryToolInvocation")}getDescription(){return`Search memory (${this.params.mode})`}async execute(signal){if(this.config.getMemoryRecallMode()!=="structured"){const message="search_memory is unavailable while the legacy memory protocol is active.";return{llmContent:message,returnDisplay:message,error:{message,type:"execution_denied"}}}const memoryManager=this.config.getMemoryManager();const signature=searchMemoryRequestSignature(this.params);const claimed=this.params.mode!=="fetch"&&memoryManager.claimSearchMemoryRequestForCurrentTurn(signature);if(this.params.mode!=="fetch"&&!claimed){const content2=JSON.stringify({mode:this.params.mode,duplicateRequest:true,warning:"An identical search_memory request is in progress or was already attempted this turn. Check its result; if it failed, retry after that failure instead of assuming a previous result exists."},null,2);return{llmContent:content2,returnDisplay:content2}}const bodyPresentVersions=memoryManager.getBodyPresentVersionsInHistory();const bodyCoverage=memoryManager.getBodyCoverageInHistory();const exhaustedBodyRefs=memoryManager.getExhaustedBodyRefsForCurrentTurn();const callBodyPresentVersions=new Map(bodyPresentVersions);const callBodyCoverage=structuredClone(bodyCoverage);const callExhaustedBodyRefs=new Set(exhaustedBodyRefs);const preCallBodyPresentVersions=new Map(bodyPresentVersions);const preCallBodyCoverage=structuredClone(bodyCoverage);const preCallExhaustedBodyRefs=new Set(exhaustedBodyRefs);let result;try{result=await executeSearchMemory(this.params,{projectRoot:this.config.getProjectRoot(),abortSignal:signal,teamMemoryEnabled:this.config.getTeamMemoryEnabled?.()??false,trustedProject:this.config.isTrustedFolder?.()??false,bodyPresentVersions:callBodyPresentVersions,bodyCoverage:callBodyCoverage,exhaustedBodyRefs:callExhaustedBodyRefs,onComplete:__name(observation=>{logMemorySearch(this.config,new MemorySearchEvent({mode:observation.mode,docs_scanned:observation.docsScanned,results_returned:observation.resultsReturned,duration_ms:observation.durationMs}))},"onComplete")});signal.throwIfAborted()}catch(error){if(claimed){memoryManager.releaseSearchMemoryRequestForCurrentTurn(signature)}throw error}callBodyCoverage.forEach((coverage,ref)=>{const before=preCallBodyCoverage.get(ref);if(before!==void 0&&sameBodyCoverage(before,coverage))return;const live=bodyCoverage.get(ref);const addedRanges=before!==void 0&&before.version===coverage.version&&before.total===coverage.total?coverage.ranges.filter(range=>!before.ranges.some(b=>b.start===range.start&&b.end===range.end)):coverage.ranges;if(!live||live.version<coverage.version){bodyCoverage.set(ref,{...coverage,ranges:addedRanges});return}if(live.version>coverage.version){return}for(const range of addedRanges){if(!live.ranges.some(liveRange=>liveRange.start===range.start&&liveRange.end===range.end)){live.ranges.push(range)}}live.ranges.sort((a,b)=>a.start-b.start)});callBodyPresentVersions.forEach((version,ref)=>{if(preCallBodyPresentVersions.get(ref)===version)return;const merged=bodyCoverage.get(ref);if(!merged||merged.version!==version||!isRangeCovered(merged.ranges,{start:0,end:merged.total})){return}const live=bodyPresentVersions.get(ref);if(live===void 0||live<version){bodyPresentVersions.set(ref,version)}});callExhaustedBodyRefs.forEach(ref=>{const claimedCoverage=callBodyCoverage.get(ref);const merged=bodyCoverage.get(ref);if(!preCallExhaustedBodyRefs.has(ref)&&claimedCoverage&&merged&&merged.version===claimedCoverage.version&&claimedCoverage.ranges.every(range=>isRangeCovered(merged.ranges,range))){exhaustedBodyRefs.add(ref)}});const content=JSON.stringify(result,null,2);return{llmContent:content,returnDisplay:summarizeSearchMemoryResult(result)}}};function sameBodyCoverage(a,b){return a.version===b.version&&a.total===b.total&&a.ranges.length===b.ranges.length&&a.ranges.every((range,index)=>{const other=b.ranges[index];return other?.start===range.start&&other?.end===range.end})}__name(sameBodyCoverage,"sameBodyCoverage");function summarizeSearchMemoryResult(result){if(result.mode==="fetch"){const fetched=result.results.filter(entry=>entry.content!==void 0);const chars=fetched.reduce((total,entry)=>total+(entry.content?.length??0),0);const parts=[`Fetched ${result.results.length} memory ${result.results.length===1?"body":"bodies"}`];if(chars>0){parts.push(`${chars.toLocaleString("en-US")} chars`)}const alreadyAvailable=result.results.length-fetched.length;if(alreadyAvailable>0){parts.push(`${alreadyAvailable} already available`)}if(result.missingRefs&&result.missingRefs.length>0){parts.push(`${result.missingRefs.length} missing`)}return parts.join(", ")}if(result.mode==="search"){return`Found ${result.results.length} matching ${result.results.length===1?"memory":"memories"}`}if(result.branches.length===0){const router=result.router??[];const entries=router.reduce((total,category)=>total+category.total,0);return`Listed ${router.length} memory categories (${entries} entries)`}return`Listed ${result.branches.length} memory categories (${result.branches.reduce((total,branch)=>total+branch.leaves.length,0)} entries)`}__name(summarizeSearchMemoryResult,"summarizeSearchMemoryResult");function searchMemoryRequestSignature(params){if(params.mode==="fetch"){return JSON.stringify({mode:params.mode,refs:params.refs,cursor:params.cursor})}if(params.mode==="search"){return JSON.stringify({mode:params.mode,keywords:params.keywords,scopes:params.scopes,categories:params.categories,limit:params.limit})}return JSON.stringify({mode:params.mode,scopes:params.scopes,branches:params.branches?.map(branch=>({category:branch.category,cursor:branch.cursor})),limitPerBranch:params.limitPerBranch})}__name(searchMemoryRequestSignature,"searchMemoryRequestSignature");var SEARCH_MEMORY_SCHEMA={type:"object",properties:{mode:{type:"string",enum:["fetch","search","explore"],description:"mode"},refs:{type:"array",description:"fetch only: exact opaque refs copied from the tree/results, e.g. project:project/compaction-pipeline.md",items:{type:"string"},minItems:1,maxItems:5},cursor:{type:"string",description:"fetch only: cursor returned for the sole ref; copy the returned continuation"},keywords:{type:"array",description:"search only: 1-5 terms, phrases, or identifiers",items:{type:"string",maxLength:64},minItems:1,maxItems:5},scopes:{type:"array",description:"search/explore only: visible memory scopes",items:{type:"string",enum:[...AUTO_MEMORY_SCOPES]},minItems:1},categories:{type:"array",description:"search only: category filters",items:{type:"string",enum:[...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]},minItems:1},limit:{type:"integer",description:"search only: result limit",minimum:1,maximum:5},branches:{type:"array",description:"explore only: category branches",maxItems:3,items:{type:"object",properties:{category:{type:"string",enum:[...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]},cursor:{type:"string"}},required:["category"],additionalProperties:false}},limitPerBranch:{type:"integer",description:"explore only: leaf limit per branch",minimum:1,maximum:20}},required:["mode"],additionalProperties:false};var SEARCH_MEMORY_DESCRIPTION="Use visible memory metadata when sufficient. Fetch exact refs copied from the memory tree; search terms or phrases when the ref or relevant body section is unknown; explore categories for an overview. Continue a truncated body with fetch using its returned ref and cursor.";var SearchMemoryTool=class extends BaseDeclarativeTool{constructor(config){super(ToolNames.SEARCH_MEMORY,ToolDisplayNames.SEARCH_MEMORY,SEARCH_MEMORY_DESCRIPTION,"fetch",SEARCH_MEMORY_SCHEMA,true,false,false,false,"memory recall fetch search explore overview category");this.config=config}static{__name(this,"SearchMemoryTool")}get maxOutputChars(){return Number.POSITIVE_INFINITY}validateToolParamValues(params){if(params.mode==="fetch"){if(!Array.isArray(params.refs)||params.refs.length===0){return"fetch requires refs."}if(params.cursor&¶ms.refs.length!==1){return"fetch cursor requires exactly one ref."}if("query"in params||"keywords"in params||"scopes"in params||"categories"in params||"limit"in params||"branches"in params||"limitPerBranch"in params){return"fetch only accepts refs and optional cursor."}return null}if(params.mode==="search"){if(!Array.isArray(params.keywords)||params.keywords.length===0){return"search requires keywords."}if("query"in params||"refs"in params||"cursor"in params||"branches"in params||"limitPerBranch"in params){return"search accepts keywords, scopes, categories, and limit."}return null}if(params.mode==="explore"){if("refs"in params||"cursor"in params||"query"in params||"keywords"in params||"categories"in params||"limit"in params){return"explore accepts scopes, branches, and limitPerBranch."}return null}return"Invalid search_memory mode."}createInvocation(params){return new SearchMemoryToolInvocation(this.config,params)}};export{SearchMemoryTool};
|
|
3
|
+
import{AUTO_MEMORY_SCOPES,AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED,buildAutoMemoryTree,normalizeAutoMemoryKeyword,rereadAutoMemoryDocument,sanitizeAutoMemoryPromptField,scanAutoMemorySnapshot,toAutoMemoryRef}from"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-S6RXVOY6.js";import"./chunk-FQRF6B65.js";import{MemorySearchEvent,logMemorySearch}from"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-DBRQGEEI.js";import{BaseDeclarativeTool,BaseToolInvocation}from"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import{ToolDisplayNames,ToolNames}from"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();init_esbuild_shims();import{createHmac,randomBytes,timingSafeEqual}from"node:crypto";var SEARCH_BODY_WINDOW_CHARS=1200;var SEARCH_BODY_CONTEXT_BEFORE_CHARS=300;var SEARCH_DIVERSITY_BONUS_PER_KEYWORD=2;var SEARCH_DIVERSITY_BONUS_CAP=4;var FETCH_BODY_WINDOW_CHARS=8e3;var FETCH_TOTAL_BODY_CHARS=2e4;var SEARCH_TOTAL_BODY_CHARS=6e3;var READ_LIMIT_EXHAUSTED_MESSAGE="The per-ref fetch budget is exhausted before the end of this memory. Use the returned content or report the bounded-read limit; do not fetch or search this same ref again to continue reading.";var MAX_FETCH_REFS=5;var MAX_SEARCH_RESULTS=5;var MAX_EXPLORE_BRANCHES=3;var MAX_EXPLORE_LEAVES=20;var CURSOR_HMAC_KEY=randomBytes(32);var SEARCH_MATCH_WEIGHT={titleExact:12,keywordExact:10,titleContains:8,keywordContains:6,metadata:4,body:1};var SCOPE_ORDER=AUTO_MEMORY_SCOPES;var CATEGORY_KEYS=new Set([...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]);var SCOPE_KEYS=new Set(AUTO_MEMORY_SCOPES);function normalizeSearchText(value){return normalizeAutoMemoryKeyword(value).toLocaleLowerCase("en-US")}__name(normalizeSearchText,"normalizeSearchText");function normalizedOffsetToSourceOffset(source,normalizedOffset){if(normalizedOffset<=0)return 0;let low=0;let high=source.length;while(low<high){const middle=Math.floor((low+high)/2);if(normalizeSearchText(source.slice(0,middle)).length<normalizedOffset){low=middle+1}else{high=middle}}if(normalizeSearchText(source.slice(0,low)).length>normalizedOffset){low=Math.max(0,low-1)}return low}__name(normalizedOffsetToSourceOffset,"normalizedOffsetToSourceOffset");function memoryRef(doc){return toAutoMemoryRef(doc)}__name(memoryRef,"memoryRef");function encodeCursor(cursor){return Buffer.from(JSON.stringify({...cursor,mac:signCursor(cursor)}),"utf-8").toString("base64url")}__name(encodeCursor,"encodeCursor");function decodeCursor(cursor){try{const signed=JSON.parse(Buffer.from(cursor,"base64url").toString("utf-8"));const{mac:_mac,...parsed}=signed;if(typeof signed.mac!=="string"||!hasValidCursorMac(parsed,signed.mac)){throw new Error("Invalid cursor.")}if(parsed.kind==="memory"&&typeof parsed.ref==="string"&&typeof parsed.mtimeMs==="number"&&Number.isInteger(parsed.offset)&&parsed.offset>=0||parsed.kind==="branch"&&typeof parsed.category==="string"&&CATEGORY_KEYS.has(parsed.category)&&Array.isArray(parsed.scopes)&&parsed.scopes.every(scope=>SCOPE_KEYS.has(scope))&&Number.isInteger(parsed.offset)&&parsed.offset>=0){return parsed}}catch{}throw new Error("Invalid cursor.")}__name(decodeCursor,"decodeCursor");function signCursor(cursor){return createHmac("sha256",CURSOR_HMAC_KEY).update(JSON.stringify(cursor)).digest("base64url")}__name(signCursor,"signCursor");function hasValidCursorMac(cursor,mac){const expected=Buffer.from(signCursor(cursor),"utf8");const actual=Buffer.from(mac,"utf8");return expected.length===actual.length&&timingSafeEqual(expected,actual)}__name(hasValidCursorMac,"hasValidCursorMac");function parseMemoryCursor(cursor,ref,mtimeMs){if(!cursor)return{offset:0};const parsed=decodeCursor(cursor);if(parsed.kind!=="memory"||parsed.ref!==ref){throw new Error("Invalid cursor.")}if(parsed.mtimeMs!==mtimeMs){throw new Error("Memory changed since cursor was issued.")}return{offset:parsed.offset}}__name(parseMemoryCursor,"parseMemoryCursor");function parseBranchCursor(cursor,category,scopes){if(!cursor)return 0;const parsed=decodeCursor(cursor);if(parsed.kind!=="branch"||parsed.category!==category||parsed.scopes.join("\0")!==scopes.join("\0")){throw new Error("Invalid cursor.")}return parsed.offset}__name(parseBranchCursor,"parseBranchCursor");function makeMemoryCursor(ref,mtimeMs,offset){return offset===void 0?void 0:encodeCursor({kind:"memory",ref,mtimeMs,offset})}__name(makeMemoryCursor,"makeMemoryCursor");function makeBranchCursor(category,scopes,offset){return offset===void 0?void 0:encodeCursor({kind:"branch",category,scopes:[...scopes],offset})}__name(makeBranchCursor,"makeBranchCursor");function bodyWindow(body,ref,mtimeMs,cursor,preferredOffset=0,maxChars=FETCH_BODY_WINDOW_CHARS,maxTotalChars=FETCH_TOTAL_BODY_CHARS){const total=body.length;const readableTotal=Math.min(total,maxTotalChars);const parsedCursor=cursor?parseMemoryCursor(cursor,ref,mtimeMs):{offset:preferredOffset};const requestedOffset=parsedCursor.offset;const start=Math.max(0,Math.min(requestedOffset,readableTotal));const end=Math.min(readableTotal,start+maxChars);const nextCursor=end<readableTotal?makeMemoryCursor(ref,mtimeMs,end):void 0;return{content:body.slice(start,end),truncated:end<total,range:{start,end,total},previousCursor:start>0?makeMemoryCursor(ref,mtimeMs,Math.max(0,start-maxChars)):void 0,nextCursor,...nextCursor?{continuation:{mode:"fetch",refs:[ref],cursor:nextCursor}}:{}}}__name(bodyWindow,"bodyWindow");function validateScope(scope){if(!SCOPE_KEYS.has(scope)){throw new Error(`Invalid memory scope: ${scope}`)}}__name(validateScope,"validateScope");function validateCategory(category){if(!CATEGORY_KEYS.has(category)){throw new Error(`Invalid memory category: ${category}`)}}__name(validateCategory,"validateCategory");function normalizeValidSearchKeyword(keyword){const normalized=normalizeSearchText(keyword);const cjkCount=[...normalized].filter(char=>new RegExp("\\p{Script=Han}|\\p{Script=Hiragana}|\\p{Script=Katakana}|\\p{Script=Hangul}","u").test(char)).length;const letterOrNumberCount=(normalized.match(/[\p{L}\p{N}]/gu)??[]).length;if(cjkCount<2&&letterOrNumberCount<3){return null}return normalized}__name(normalizeValidSearchKeyword,"normalizeValidSearchKeyword");function normalizeSearchKeywords(keywords){const normalized=[];const seen=new Set;const ignored=[];for(const keyword of keywords){if(normalized.length>=5){ignored.push(keyword);continue}const valid=normalizeValidSearchKeyword(keyword);if(!valid){ignored.push(keyword);continue}if(!seen.has(valid)){seen.add(valid);normalized.push(valid)}}if(normalized.length===0){throw new Error("search requires at least one valid keyword.")}return{keywords:normalized,warnings:ignored.length>0?[`Ignored invalid or excess search keywords: ${ignored.join(", ")}`]:[]}}__name(normalizeSearchKeywords,"normalizeSearchKeywords");async function getSnapshot(options,scopes){if(options.snapshot){if(scopes===void 0)return options.snapshot;const requested=[...new Set(scopes)];const requestedSet=new Set(requested);const sourceStatus=options.snapshot.sourceStatus;return{docs:options.snapshot.docs.filter(doc=>requestedSet.has(doc.scope)),sourceStatus:{requestedScopes:requested,searchedScopes:sourceStatus.searchedScopes.filter(scope=>requestedSet.has(scope)),unavailableScopes:sourceStatus.unavailableScopes.filter(item=>requestedSet.has(item.scope)),complete:sourceStatus.incompleteScopes.every(item=>!requestedSet.has(item.scope)),incompleteScopes:sourceStatus.incompleteScopes.filter(item=>requestedSet.has(item.scope))}}}return scanAutoMemorySnapshot(options.projectRoot,{scopes:scopes??(options.teamMemoryEnabled&&options.trustedProject?SCOPE_ORDER:void 0),teamMemoryEnabled:options.teamMemoryEnabled,trustedProject:options.trustedProject,uncapped:true})}__name(getSnapshot,"getSnapshot");function scopeIndex(scope){const index=SCOPE_ORDER.indexOf(scope);return index===-1?SCOPE_ORDER.length:index}__name(scopeIndex,"scopeIndex");function exactOrContains(a,b){const escaped=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|[^\\p{L}\\p{N}])${escaped}(?:$|[^\\p{L}\\p{N}])`,"u").test(b)}__name(exactOrContains,"exactOrContains");function metadataMatchCount(score){return score.matches.filter(match=>match.source!=="body").length}__name(metadataMatchCount,"metadataMatchCount");function isQualifiedMetadataMatch(score,keywordCount){if(score.titleExact>0||score.keywordExact>0)return true;return metadataMatchCount(score)>=Math.min(2,keywordCount)}__name(isQualifiedMetadataMatch,"isQualifiedMetadataMatch");function scoreSearchDoc(doc,keywords){const title=normalizeSearchText(doc.title);const storedKeywords=doc.keywords.map(normalizeSearchText);const description=normalizeSearchText(doc.description);const usageScenarios=doc.usageScenarios.map(normalizeSearchText);const body=normalizeSearchText(doc.body.slice(0,FETCH_TOTAL_BODY_CHARS));const score={total:0,coverageCount:0,coverageRatio:0,rarityBonus:0,matchedKeywords:[],matches:[],titleExact:0,keywordExact:0,titleContains:0,keywordContains:0,metadata:0,body:0};const bodyHits=new Set;for(const keyword of keywords){let bestMatch;const consider=__name((weight,source,kind)=>{if(!bestMatch||weight>bestMatch.weight){bestMatch={weight,match:{keyword,source,kind}}}},"consider");if(title===keyword){score.titleExact+=1;consider(SEARCH_MATCH_WEIGHT.titleExact,"title","exact")}if(storedKeywords.some(stored=>stored===keyword)){score.keywordExact+=1;consider(SEARCH_MATCH_WEIGHT.keywordExact,"keyword","exact")}if(title.includes(keyword)){score.titleContains+=1;consider(SEARCH_MATCH_WEIGHT.titleContains,"title","contains")}if(storedKeywords.some(stored=>exactOrContains(stored,keyword))){score.keywordContains+=1;consider(SEARCH_MATCH_WEIGHT.keywordContains,"keyword","contains")}if(description.includes(keyword)){score.metadata+=1;consider(SEARCH_MATCH_WEIGHT.metadata,"description","contains")}else if(usageScenarios.some(item=>item.includes(keyword))){score.metadata+=1;consider(SEARCH_MATCH_WEIGHT.metadata,"usage_scenario","contains")}if(body.includes(keyword)){bodyHits.add(keyword);consider(SEARCH_MATCH_WEIGHT.body,"body","contains")}if(bestMatch){score.total+=bestMatch.weight;if(keyword.includes(" "))score.total+=2;if(isExactIdentifier(keyword))score.total+=2;score.matchedKeywords.push(keyword);score.matches.push(bestMatch.match)}}score.body=bodyHits.size;score.coverageCount=score.matchedKeywords.length;score.coverageRatio=score.coverageCount/keywords.length;if(score.total===0)return null;return score}__name(scoreSearchDoc,"scoreSearchDoc");function isExactIdentifier(keyword){return/[._:/#()[\]{}-]|\d/.test(keyword)&&!keyword.includes(" ")}__name(isExactIdentifier,"isExactIdentifier");function applyRarityBonus(candidates){const documentFrequency=new Map;for(const{score}of candidates){for(const keyword of score.matchedKeywords){documentFrequency.set(keyword,(documentFrequency.get(keyword)??0)+1)}}for(const{score}of candidates){score.rarityBonus=score.matchedKeywords.filter(keyword=>(documentFrequency.get(keyword)??0)<=2).length;score.total+=Math.min(2,score.rarityBonus)}}__name(applyRarityBonus,"applyRarityBonus");function compareSearchResult(a,b){return b.score.total-a.score.total||b.score.coverageRatio-a.score.coverageRatio||b.score.coverageCount-a.score.coverageCount||b.score.titleExact-a.score.titleExact||b.score.keywordExact-a.score.keywordExact||b.score.titleContains-a.score.titleContains||b.score.keywordContains-a.score.keywordContains||b.score.metadata-a.score.metadata||b.score.body-a.score.body||scopeIndex(a.doc.scope)-scopeIndex(b.doc.scope)||a.doc.relativePath.localeCompare(b.doc.relativePath)}__name(compareSearchResult,"compareSearchResult");function selectSearchResults(candidates,limit){const remaining=[...candidates].sort(compareSearchResult);const selected=[];const coveredKeywords=new Set;while(selected.length<limit&&remaining.length>0){let bestIndex=0;let bestUtility=Number.NEGATIVE_INFINITY;for(let index=0;index<remaining.length;index+=1){const candidate=remaining[index];const uncovered=candidate.score.matchedKeywords.filter(keyword=>!coveredKeywords.has(keyword)).length;const diversityBonus=Math.min(SEARCH_DIVERSITY_BONUS_CAP,uncovered*SEARCH_DIVERSITY_BONUS_PER_KEYWORD);const utility=candidate.score.total+diversityBonus;if(utility>bestUtility){bestIndex=index;bestUtility=utility}}const[best]=remaining.splice(bestIndex,1);if(!best)break;selected.push(best);for(const keyword of best.score.matchedKeywords){coveredKeywords.add(keyword)}}return selected}__name(selectSearchResults,"selectSearchResults");function selectBodyWindowOffset(body,keywords){const searchableBody=body.slice(0,FETCH_TOTAL_BODY_CHARS);const normalizedBody=normalizeSearchText(searchableBody);const hitsByKeyword=new Map;const starts=new Set;for(const keyword of keywords){const hits=[];let from=0;while(from<normalizedBody.length){const index=normalizedBody.indexOf(keyword,from);if(index<0)break;hits.push(index);starts.add(Math.max(0,index-SEARCH_BODY_CONTEXT_BEFORE_CHARS));from=index+Math.max(1,keyword.length)}if(hits.length>0)hitsByKeyword.set(keyword,hits)}if(hitsByKeyword.size===0){return{offset:0,maxChars:SEARCH_BODY_WINDOW_CHARS}}let bestStart=0;let best;for(const start of starts){const end2=start+SEARCH_BODY_WINDOW_CHARS;const visibleKeywords=new Set;for(const[keyword,hits]of hitsByKeyword){const firstPossible=start-keyword.length+1;let low=0;let high=hits.length;while(low<high){const middle=Math.floor((low+high)/2);if(hits[middle]<firstPossible)low=middle+1;else high=middle}if(hits[low]!==void 0&&hits[low]<end2){visibleKeywords.add(keyword)}}const score={identifiers:[...visibleKeywords].filter(isExactIdentifier).length,coverage:visibleKeywords.size,longestPhrase:Math.max(0,...[...visibleKeywords].map(item=>item.length)),matchedChars:[...visibleKeywords].reduce((total,item)=>total+item.length,0)};if(!best||score.identifiers>best.identifiers||score.identifiers===best.identifiers&&(score.coverage>best.coverage||score.coverage===best.coverage&&(score.longestPhrase>best.longestPhrase||score.longestPhrase===best.longestPhrase&&score.matchedChars>best.matchedChars))){best=score;bestStart=start}}const offset=normalizedOffsetToSourceOffset(searchableBody,bestStart);const normalizedEnd=Math.min(bestStart+SEARCH_BODY_WINDOW_CHARS,normalizedBody.length);const end=normalizedOffsetToSourceOffset(searchableBody,normalizedEnd);return{offset,maxChars:end-offset}}__name(selectBodyWindowOffset,"selectBodyWindowOffset");async function readContentResult(doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,cursor,preferredOffset=0,maxChars=FETCH_BODY_WINDOW_CHARS,maxTotalChars=FETCH_TOTAL_BODY_CHARS){const freshDoc=await rereadAutoMemoryDocument(doc);if(!freshDoc)return null;const ref=memoryRef(freshDoc);if(bodyPresentVersions.get(ref)===freshDoc.mtimeMs){return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),alreadyAvailable:true}}const window=bodyWindow(freshDoc.body,ref,freshDoc.mtimeMs,cursor,preferredOffset,maxChars,maxTotalChars);const previousCoverage=bodyCoverage.get(ref);if(window.range&&previousCoverage?.version===freshDoc.mtimeMs&&previousCoverage.total===window.range.total&&isRangeCovered(previousCoverage.ranges,window.range)){return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),alreadyAvailable:true,truncated:window.truncated,range:window.range,previousCursor:window.previousCursor,nextCursor:window.nextCursor,continuation:window.continuation,...exhaustedBodyRefs.has(ref)?{readLimitExhausted:true,readLimitMessage:READ_LIMIT_EXHAUSTED_MESSAGE}:{}}}let readLimitExhausted=false;if(window.content&&window.range){const previous=bodyCoverage.get(ref);const coverage=previous?.version===freshDoc.mtimeMs&&previous.total===window.range.total?previous:{version:freshDoc.mtimeMs,total:window.range.total,ranges:[]};coverage.ranges.push({start:window.range.start,end:window.range.end});coverage.ranges.sort((a,b)=>a.start-b.start);bodyCoverage.set(ref,coverage);let coveredChars=0;let coveredEnd=0;for(const range of coverage.ranges){if(range.end<=coveredEnd)continue;coveredChars+=range.end-Math.max(range.start,coveredEnd);coveredEnd=range.end}readLimitExhausted=freshDoc.body.length>maxTotalChars&&coveredChars>=maxTotalChars;if(readLimitExhausted)exhaustedBodyRefs.add(ref);let coveredUntil=0;for(const range of coverage.ranges){if(range.start>coveredUntil)break;coveredUntil=Math.max(coveredUntil,range.end)}if(coveredUntil>=coverage.total){bodyPresentVersions.set(ref,freshDoc.mtimeMs)}}return{ref,version:freshDoc.mtimeMs,title:sanitizeAutoMemoryPromptField(freshDoc.title,256),...window,...readLimitExhausted?{readLimitExhausted:true,readLimitMessage:READ_LIMIT_EXHAUSTED_MESSAGE}:{}}}__name(readContentResult,"readContentResult");function isRangeCovered(ranges,target){let coveredUntil=target.start;for(const range of ranges){if(range.end<=coveredUntil)continue;if(range.start>coveredUntil)return false;coveredUntil=Math.max(coveredUntil,range.end);if(coveredUntil>=target.end)return true}return false}__name(isRangeCovered,"isRangeCovered");function suggestMemoryRef(missingRef,availableRefs){const matches=availableRefs.filter(candidate=>candidate.endsWith(`:${missingRef}`)||candidate.endsWith(`/${missingRef}`));return matches.length===1?matches[0]:void 0}__name(suggestMemoryRef,"suggestMemoryRef");function scopesFromRefs(refs){const scopes=[];const seen=new Set;for(const ref of refs){const[scope]=ref.split(":",1);if(!scope||!SCOPE_KEYS.has(scope))continue;if(!seen.has(scope)){seen.add(scope);scopes.push(scope)}}return scopes}__name(scopesFromRefs,"scopesFromRefs");async function executeSearchMemory(params,options){options.abortSignal?.throwIfAborted();const startedAt=Date.now();const bodyPresentVersions=options.bodyPresentVersions??new Map;const bodyCoverage=options.bodyCoverage??new Map;const exhaustedBodyRefs=options.exhaustedBodyRefs??new Set;const complete=__name((result,docsScanned,resultsReturned)=>{options.onComplete?.({mode:params.mode,docsScanned,resultsReturned,durationMs:Date.now()-startedAt});return result},"complete");if(params.mode==="fetch"){if(params.refs.length===0||params.refs.length>MAX_FETCH_REFS){throw new Error("fetch requires 1-5 refs.")}if(params.cursor&¶ms.refs.length!==1){throw new Error("fetch cursor requires exactly one ref.")}const refScopes=scopesFromRefs(params.refs);const hasUnscopedRef=params.refs.some(ref=>{const[scope]=ref.split(":",1);return!scope||!SCOPE_KEYS.has(scope)});const snapshot2=await getSnapshot(options,hasUnscopedRef?void 0:refScopes);options.abortSignal?.throwIfAborted();const docsByRef=new Map(snapshot2.docs.map(doc=>[memoryRef(doc),doc]));const availableRefs=[...docsByRef.keys()];const seen=new Set;const results=[];const missingRefs=[];const warnings=[];let remaining=FETCH_TOTAL_BODY_CHARS;for(const ref of params.refs){options.abortSignal?.throwIfAborted();if(seen.has(ref))continue;seen.add(ref);const doc=docsByRef.get(ref);if(!doc){missingRefs.push(ref);const suggestion=suggestMemoryRef(ref,availableRefs);warnings.push(suggestion?`Unknown ref ${JSON.stringify(ref)}. Did you mean ${JSON.stringify(suggestion)}? Copy refs exactly from the memory tree or a search result.`:`Unknown ref ${JSON.stringify(ref)}. Copy the complete ref exactly from the memory tree or a search result.`);continue}if(remaining<=0){warnings.push(`Skipped ${ref}: the aggregate fetch body budget is exhausted.`);continue}if(!params.cursor&&exhaustedBodyRefs.has(ref)&&!bodyPresentVersions.has(ref)){warnings.push(`Skipped ${ref}: the per-ref fetch budget is already exhausted for this turn.`);continue}const result=await readContentResult(doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,params.cursor,0,Math.min(FETCH_BODY_WINDOW_CHARS,remaining));options.abortSignal?.throwIfAborted();if(result){const{title:_title,...fetchResult}=result;remaining-=fetchResult.content?.length??0;results.push(fetchResult)}else{missingRefs.push(ref);warnings.push(`Memory ref ${JSON.stringify(ref)} was unavailable or changed while being read. Search again to refresh the memory snapshot.`)}}return complete({mode:"fetch",sourceStatus:snapshot2.sourceStatus,results,...missingRefs.length>0?{missingRefs}:{},...warnings.length>0?{warnings}:{}},snapshot2.docs.length,results.length)}if(params.mode==="search"){if(params.limit!==void 0&&(params.limit<1||params.limit>5)){throw new Error("search limit must be between 1 and 5.")}if(params.keywords.length<1){throw new Error("search requires keywords.")}for(const scope of params.scopes??[])validateScope(scope);const scopes2=params.scopes?[...new Set(params.scopes)]:void 0;for(const category of params.categories??[])validateCategory(category);const{keywords,warnings}=normalizeSearchKeywords(params.keywords);const snapshot2=await getSnapshot(options,scopes2);options.abortSignal?.throwIfAborted();const categories=params.categories?new Set(params.categories):void 0;const scored=snapshot2.docs.filter(doc=>!categories||categories.has(doc.category)).filter(doc=>!exhaustedBodyRefs.has(memoryRef(doc))).map(doc=>{options.abortSignal?.throwIfAborted();const score=scoreSearchDoc(doc,keywords);return score?{doc,score}:null}).filter(item=>item!==null);applyRarityBonus(scored);const qualifiedMetadataCandidates=scored.filter(({score})=>isQualifiedMetadataMatch(score,keywords.length));const candidates=qualifiedMetadataCandidates.length>0?qualifiedMetadataCandidates:scored.filter(({score})=>score.body>=Math.min(2,keywords.length));const ranked=selectSearchResults(candidates,params.limit??MAX_SEARCH_RESULTS);let remaining=SEARCH_TOTAL_BODY_CHARS;const results=[];for(const item of ranked){options.abortSignal?.throwIfAborted();if(remaining<=0)break;const window=selectBodyWindowOffset(item.doc.body,keywords);const result=await readContentResult(item.doc,bodyPresentVersions,bodyCoverage,exhaustedBodyRefs,void 0,window.offset,Math.min(window.maxChars,remaining),FETCH_TOTAL_BODY_CHARS);options.abortSignal?.throwIfAborted();if(result){remaining-=result.content?.length??0;results.push({...result,matches:item.score.matches})}}return complete({mode:"search",sourceStatus:snapshot2.sourceStatus,results,...warnings.length>0?{warnings}:{}},snapshot2.docs.length,results.length)}for(const scope of params.scopes??[])validateScope(scope);const scopes=params.scopes?[...new Set(params.scopes)]:void 0;const limitPerBranch=params.limitPerBranch??MAX_EXPLORE_LEAVES;if(limitPerBranch<1||limitPerBranch>MAX_EXPLORE_LEAVES){throw new Error("explore limitPerBranch must be between 1 and 20.")}if((params.branches?.length??0)>MAX_EXPLORE_BRANCHES){throw new Error("explore accepts at most 3 branches.")}for(const branch of params.branches??[])validateCategory(branch.category);const snapshot=await getSnapshot(options,scopes);options.abortSignal?.throwIfAborted();const cursorScopes=snapshot.sourceStatus.searchedScopes;if(!params.branches||params.branches.length===0){const tree2=buildAutoMemoryTree(snapshot.docs);return complete({mode:"explore",sourceStatus:snapshot.sourceStatus,router:tree2.categories.map(category=>({category:category.category,total:category.total,keywords:category.keywords,hiddenKeywordCount:category.hiddenKeywordCount})),branches:[]},snapshot.docs.length,tree2.categories.length)}const tree=buildAutoMemoryTree(snapshot.docs);const byCategory=new Map(tree.categories.map(category=>[category.category,category]));const branches=params.branches.map(branch=>{const category=byCategory.get(branch.category);const start=parseBranchCursor(branch.cursor,branch.category,cursorScopes);const leaves=category?.leaves.slice(start,start+limitPerBranch)??[];const next=category&&start+limitPerBranch<category.leaves.length?makeBranchCursor(branch.category,cursorScopes,start+limitPerBranch):void 0;return{category:branch.category,total:category?.total??0,leaves,...next?{nextCursor:next}:{}}});return complete({mode:"explore",sourceStatus:snapshot.sourceStatus,branches},snapshot.docs.length,branches.reduce((total,branch)=>total+branch.leaves.length,0))}__name(executeSearchMemory,"executeSearchMemory");var SearchMemoryToolInvocation=class extends BaseToolInvocation{constructor(config,params){super(params);this.config=config}static{__name(this,"SearchMemoryToolInvocation")}getDescription(){return`Search memory (${this.params.mode})`}async execute(signal){if(this.config.getMemoryRecallMode()!=="structured"){const message="search_memory is unavailable while the legacy memory protocol is active.";return{llmContent:message,returnDisplay:message,error:{message,type:"execution_denied"}}}const memoryManager=this.config.getMemoryManager();const signature=searchMemoryRequestSignature(this.params);const claimed=this.params.mode!=="fetch"&&memoryManager.claimSearchMemoryRequestForCurrentTurn(signature);if(this.params.mode!=="fetch"&&!claimed){const content2=JSON.stringify({mode:this.params.mode,duplicateRequest:true,warning:"An identical search_memory request is in progress or was already attempted this turn. Check its result; if it failed, retry after that failure instead of assuming a previous result exists."},null,2);return{llmContent:content2,returnDisplay:content2}}const bodyPresentVersions=memoryManager.getBodyPresentVersionsInHistory();const bodyCoverage=memoryManager.getBodyCoverageInHistory();const exhaustedBodyRefs=memoryManager.getExhaustedBodyRefsForCurrentTurn();const callBodyPresentVersions=new Map(bodyPresentVersions);const callBodyCoverage=structuredClone(bodyCoverage);const callExhaustedBodyRefs=new Set(exhaustedBodyRefs);const preCallBodyPresentVersions=new Map(bodyPresentVersions);const preCallBodyCoverage=structuredClone(bodyCoverage);const preCallExhaustedBodyRefs=new Set(exhaustedBodyRefs);let result;try{result=await executeSearchMemory(this.params,{projectRoot:this.config.getProjectRoot(),abortSignal:signal,teamMemoryEnabled:this.config.getTeamMemoryEnabled?.()??false,trustedProject:this.config.isTrustedFolder?.()??false,bodyPresentVersions:callBodyPresentVersions,bodyCoverage:callBodyCoverage,exhaustedBodyRefs:callExhaustedBodyRefs,onComplete:__name(observation=>{logMemorySearch(this.config,new MemorySearchEvent({mode:observation.mode,docs_scanned:observation.docsScanned,results_returned:observation.resultsReturned,duration_ms:observation.durationMs}))},"onComplete")});signal.throwIfAborted()}catch(error){if(claimed){memoryManager.releaseSearchMemoryRequestForCurrentTurn(signature)}throw error}callBodyCoverage.forEach((coverage,ref)=>{const before=preCallBodyCoverage.get(ref);if(before!==void 0&&sameBodyCoverage(before,coverage))return;const live=bodyCoverage.get(ref);const addedRanges=before!==void 0&&before.version===coverage.version&&before.total===coverage.total?coverage.ranges.filter(range=>!before.ranges.some(b=>b.start===range.start&&b.end===range.end)):coverage.ranges;if(!live||live.version<coverage.version){bodyCoverage.set(ref,{...coverage,ranges:addedRanges});return}if(live.version>coverage.version){return}for(const range of addedRanges){if(!live.ranges.some(liveRange=>liveRange.start===range.start&&liveRange.end===range.end)){live.ranges.push(range)}}live.ranges.sort((a,b)=>a.start-b.start)});callBodyPresentVersions.forEach((version,ref)=>{if(preCallBodyPresentVersions.get(ref)===version)return;const merged=bodyCoverage.get(ref);if(!merged||merged.version!==version||!isRangeCovered(merged.ranges,{start:0,end:merged.total})){return}const live=bodyPresentVersions.get(ref);if(live===void 0||live<version){bodyPresentVersions.set(ref,version)}});callExhaustedBodyRefs.forEach(ref=>{const claimedCoverage=callBodyCoverage.get(ref);const merged=bodyCoverage.get(ref);if(!preCallExhaustedBodyRefs.has(ref)&&claimedCoverage&&merged&&merged.version===claimedCoverage.version&&claimedCoverage.ranges.every(range=>isRangeCovered(merged.ranges,range))){exhaustedBodyRefs.add(ref)}});const content=JSON.stringify(result,null,2);return{llmContent:content,returnDisplay:summarizeSearchMemoryResult(result)}}};function sameBodyCoverage(a,b){return a.version===b.version&&a.total===b.total&&a.ranges.length===b.ranges.length&&a.ranges.every((range,index)=>{const other=b.ranges[index];return other?.start===range.start&&other?.end===range.end})}__name(sameBodyCoverage,"sameBodyCoverage");function summarizeSearchMemoryResult(result){if(result.mode==="fetch"){const fetched=result.results.filter(entry=>entry.content!==void 0);const chars=fetched.reduce((total,entry)=>total+(entry.content?.length??0),0);const parts=[`Fetched ${result.results.length} memory ${result.results.length===1?"body":"bodies"}`];if(chars>0){parts.push(`${chars.toLocaleString("en-US")} chars`)}const alreadyAvailable=result.results.length-fetched.length;if(alreadyAvailable>0){parts.push(`${alreadyAvailable} already available`)}if(result.missingRefs&&result.missingRefs.length>0){parts.push(`${result.missingRefs.length} missing`)}return parts.join(", ")}if(result.mode==="search"){return`Found ${result.results.length} matching ${result.results.length===1?"memory":"memories"}`}if(result.branches.length===0){const router=result.router??[];const entries=router.reduce((total,category)=>total+category.total,0);return`Listed ${router.length} memory categories (${entries} entries)`}return`Listed ${result.branches.length} memory categories (${result.branches.reduce((total,branch)=>total+branch.leaves.length,0)} entries)`}__name(summarizeSearchMemoryResult,"summarizeSearchMemoryResult");function searchMemoryRequestSignature(params){if(params.mode==="fetch"){return JSON.stringify({mode:params.mode,refs:params.refs,cursor:params.cursor})}if(params.mode==="search"){return JSON.stringify({mode:params.mode,keywords:params.keywords,scopes:params.scopes,categories:params.categories,limit:params.limit})}return JSON.stringify({mode:params.mode,scopes:params.scopes,branches:params.branches?.map(branch=>({category:branch.category,cursor:branch.cursor})),limitPerBranch:params.limitPerBranch})}__name(searchMemoryRequestSignature,"searchMemoryRequestSignature");var SEARCH_MEMORY_SCHEMA={type:"object",properties:{mode:{type:"string",enum:["fetch","search","explore"],description:"mode"},refs:{type:"array",description:"fetch only: exact opaque refs copied from the tree/results, e.g. project:project/compaction-pipeline.md",items:{type:"string"},minItems:1,maxItems:5},cursor:{type:"string",description:"fetch only: cursor returned for the sole ref; copy the returned continuation"},keywords:{type:"array",description:"search only: 1-5 terms, phrases, or identifiers",items:{type:"string",maxLength:64},minItems:1,maxItems:5},scopes:{type:"array",description:"search/explore only: visible memory scopes",items:{type:"string",enum:[...AUTO_MEMORY_SCOPES]},minItems:1},categories:{type:"array",description:"search only: category filters",items:{type:"string",enum:[...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]},minItems:1},limit:{type:"integer",description:"search only: result limit",minimum:1,maximum:5},branches:{type:"array",description:"explore only: category branches",maxItems:3,items:{type:"object",properties:{category:{type:"string",enum:[...AUTO_MEMORY_TREE_CATEGORIES,AUTO_MEMORY_UNCATEGORIZED]},cursor:{type:"string"}},required:["category"],additionalProperties:false}},limitPerBranch:{type:"integer",description:"explore only: leaf limit per branch",minimum:1,maximum:20}},required:["mode"],additionalProperties:false};var SEARCH_MEMORY_DESCRIPTION="Use visible memory metadata when sufficient. Fetch exact refs copied from the memory tree; search terms or phrases when the ref or relevant body section is unknown; explore categories for an overview. Continue a truncated body with fetch using its returned ref and cursor.";var SearchMemoryTool=class extends BaseDeclarativeTool{constructor(config){super(ToolNames.SEARCH_MEMORY,ToolDisplayNames.SEARCH_MEMORY,SEARCH_MEMORY_DESCRIPTION,"fetch",SEARCH_MEMORY_SCHEMA,true,false,false,false,"memory recall fetch search explore overview category");this.config=config}static{__name(this,"SearchMemoryTool")}get maxOutputChars(){return Number.POSITIVE_INFINITY}validateToolParamValues(params){if(params.mode==="fetch"){if(!Array.isArray(params.refs)||params.refs.length===0){return"fetch requires refs."}if(params.cursor&¶ms.refs.length!==1){return"fetch cursor requires exactly one ref."}if("query"in params||"keywords"in params||"scopes"in params||"categories"in params||"limit"in params||"branches"in params||"limitPerBranch"in params){return"fetch only accepts refs and optional cursor."}return null}if(params.mode==="search"){if(!Array.isArray(params.keywords)||params.keywords.length===0){return"search requires keywords."}if("query"in params||"refs"in params||"cursor"in params||"branches"in params||"limitPerBranch"in params){return"search accepts keywords, scopes, categories, and limit."}return null}if(params.mode==="explore"){if("refs"in params||"cursor"in params||"query"in params||"keywords"in params||"categories"in params||"limit"in params){return"explore accepts scopes, branches, and limitPerBranch."}return null}return"Invalid search_memory mode."}createInvocation(params){return new SearchMemoryToolInvocation(this.config,params)}};export{SearchMemoryTool};
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2026 Qwen Team
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{peerMessagingOffReason}from"./chunk-EQE74QHS.js";import{isInProcessRecipient,sendToPeer}from"./chunk-MKH3EH7O.js";import{toolSearchBridgeSentence}from"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import{LEADER_NAME,findMemberByName}from"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-CV2UAEZA.js";import"./chunk-KLC3OD2M.js";import{isDirectToolBridgeAvailable}from"./chunk-7CQMWEMY.js";import{getPlanRequiredTeammatePreApprovalMessage,isPlanRequiredTeammateAwaitingApproval}from"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4NPYOXJO.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-YZFNBUKG.js";import{getAgentName,isTeammate}from"./chunk-AGEDDL7Z.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-
|
|
3
|
+
import{peerMessagingOffReason}from"./chunk-EQE74QHS.js";import{isInProcessRecipient,sendToPeer}from"./chunk-MKH3EH7O.js";import{toolSearchBridgeSentence}from"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import{LEADER_NAME,findMemberByName}from"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-CV2UAEZA.js";import"./chunk-KLC3OD2M.js";import{isDirectToolBridgeAvailable}from"./chunk-7CQMWEMY.js";import{getPlanRequiredTeammatePreApprovalMessage,isPlanRequiredTeammateAwaitingApproval}from"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4NPYOXJO.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-YZFNBUKG.js";import{getAgentName,isTeammate}from"./chunk-AGEDDL7Z.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import{BaseDeclarativeTool,BaseToolInvocation}from"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import{ToolDisplayNames,ToolNames}from"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();var SendMessageInvocation=class extends BaseToolInvocation{constructor(config,params){super(params);this.config=config}static{__name(this,"SendMessageInvocation")}getDescription(){if(this.params.task_id){return`Send message to task ${this.params.task_id}`}const preview=this.params.summary??this.params.message.slice(0,50);return`Send to ${this.params.to}: ${preview}`}async getDefaultPermission(){return"ask"}peerMessagingOff=false;async trySendToPeer(to,teamFile){const teamActive=teamFile!==void 0;let approvalMode;try{approvalMode=this.config.getApprovalMode()}catch{approvalMode=null}const outcome=await sendToPeer({target:to,message:this.params.message,approvalMode,isReserved:__name(address=>isInProcessRecipient(address,teamFile),"isReserved"),slot:this.config.getSessionRegistrySlot()});switch(outcome.kind){case"disabled":this.peerMessagingOff=true;return null;case"self":{const msg=`"${outcome.name}" is this session's own name \u2014 a session cannot message itself.`+(rosterReachable(this.config)?" Use list_agents to see the other sessions you can reach.":"");return{llmContent:msg,returnDisplay:"That is this session.",error:{message:msg,type:"send_message_not_found"}}}case"not-found":{if(outcome.suggestions.length===0)return null;const msg=`No reachable session${teamActive?" and no teammate":""} is named "${to}". Did you mean: ${outcome.suggestions.join(", ")}?`+(rosterReachable(this.config)?" Use list_agents to see who is reachable.":"");return{llmContent:msg,returnDisplay:"No such session.",error:{message:msg,type:"send_message_not_found"}}}case"ambiguous":{const msg=`"${to}" matches more than one live session:
|
|
4
4
|
`+outcome.matches.map(line=>` ${line}`).join("\n")+"\nRe-send with the full 'name [ref]' so it goes to the one you mean.";return{llmContent:msg,returnDisplay:"Ambiguous recipient.",error:{message:msg,type:"send_message_not_found"}}}case"failed":{const msg=`Failed to send to ${outcome.address}: ${outcome.reason}`;return{llmContent:msg,returnDisplay:"Send failed.",error:{message:msg,type:"send_message_not_running"}}}case"sent":{const preview=this.params.summary??this.params.message.slice(0,50);return{llmContent:`Sent to ${outcome.address} \u2014 another Qwen Code session on this machine, working in ${outcome.peer.cwd}. It arrives there as a marked cross-session message carrying none of your user's authority, and may be held for that session's user to review before it reaches that session's model. You will not be told whether it was delivered or held, so do not re-send; if that session replies, the reply arrives here as a <cross_session_message>.`,returnDisplay:`\u201C${preview}\u201D \u2192 ${outcome.address}`}}default:{const exhaustive=outcome;return exhaustive}}}async execute(signal){if(isPlanRequiredTeammateAwaitingApproval(this.config)){const msg=getPlanRequiredTeammatePreApprovalMessage(ToolNames.SEND_MESSAGE);return{llmContent:msg,returnDisplay:msg,error:{message:msg}}}if(this.params.task_id){const registry=this.config.getBackgroundTaskRegistry();const entry=registry.get(this.params.task_id);if(!entry){const teamFile2=this.config.getTeamManager()?.getTeamFile();const teammate=teamFile2?findMemberByName(teamFile2.members,this.params.task_id):void 0;const isLeaderDestination=!teammate&&teamFile2!==void 0&&(this.params.task_id.toLowerCase()===LEADER_NAME||this.params.task_id===teamFile2.leadAgentId);const destination=teammate?.name??this.params.task_id;const teammateHint=teammate||isLeaderDestination?` Did you mean to message teammate "${destination}"? If so, use \`to: "${destination}"\` instead of \`task_id\`.`:"";return{llmContent:`Error: No background task found with ID "${this.params.task_id}".${teammateHint}`,returnDisplay:teammateHint?`Task not found; use "to" for teammate "${destination}".`:"Task not found.",error:{message:`Task not found: ${this.params.task_id}${teammateHint?`.${teammateHint}`:""}`,type:"send_message_not_found"}}}const blocked=entry.resumeBlockedReason??entry.messagesBlockedReason;if(blocked){return{llmContent:`Error: Background task "${this.params.task_id}" cannot be continued: ${blocked}`,returnDisplay:"Task cannot be continued.",error:{message:`Task cannot be continued: ${this.params.task_id}`,type:"send_message_not_running"}}}if(entry.status==="paused"){const resumed=await this.config.resumeBackgroundAgent(this.params.task_id,this.params.message);if(!resumed){return{llmContent:`Error: Background task "${this.params.task_id}" could not be resumed.`,returnDisplay:"Task could not be resumed.",error:{message:`Task could not be resumed: ${this.params.task_id}`,type:"send_message_not_running"}}}return{llmContent:`Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,returnDisplay:`Resumed ${entry.description}`}}if(entry.status==="completed"){const continuation=registry.continueResidentAgent(this.params.task_id,this.params.message);if(continuation==="continued"){return{llmContent:`Background task "${this.params.task_id}" continued on its existing runtime with your message as the next instruction.`,returnDisplay:`Continued ${entry.description}`}}if(continuation==="capacity_wait"){return{llmContent:`Error: Background task "${this.params.task_id}" is waiting for background-agent capacity.`,returnDisplay:"Task is waiting for capacity.",error:{message:`Background-agent capacity unavailable: ${this.params.task_id}`,type:"send_message_not_running"}}}const revived=await this.config.reviveCompletedBackgroundAgent(this.params.task_id,this.params.message);if(!revived){return{llmContent:`Error: Background task "${this.params.task_id}" could not be revived.`,returnDisplay:"Task could not be revived.",error:{message:`Task could not be revived: ${this.params.task_id}`,type:"send_message_not_running"}}}return{llmContent:`Background task "${this.params.task_id}" had completed; revived it with your message as the next instruction.`,returnDisplay:`Revived ${entry.description}`}}if(entry.status!=="running"){return{llmContent:`Error: Background task "${this.params.task_id}" is not running (status: ${entry.status}). Cannot send messages to stopped tasks.`,returnDisplay:`Task not running (${entry.status}).`,error:{message:`Task is ${entry.status}: ${this.params.task_id}`,type:"send_message_not_running"}}}if(registry.isFinishing(this.params.task_id)||!registry.queueMessage(this.params.task_id,this.params.message)){const settled=await registry.waitForFinishing(this.params.task_id,signal);if(!settled){const message=`Message delivery to background task "${this.params.task_id}" was cancelled.`;return{llmContent:`Error: ${message}`,returnDisplay:message,error:{message,type:"send_message_not_running"}}}return this.execute(signal)}return{llmContent:`Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary. There is no inline reply: whatever it does with your message shows up in its completion notification for this task_id. Do not relaunch the task while waiting.`,returnDisplay:`Message queued for ${entry.description}`}}const to=this.params.to?.trim();if(!to){const msg='Recipient "to" is required.';return{llmContent:msg,returnDisplay:msg,error:{message:msg}}}const teamManager=this.config.getTeamManager();if(to==="*"){if(!teamManager){const msg="No active team to broadcast to. Broadcasting to other Qwen Code sessions is not supported \u2014 address each session by name"+(rosterReachable(this.config)?" from list_agents.":".");return{llmContent:msg,returnDisplay:"No active team for broadcast.",error:{message:msg}}}try{const sender=getAgentName()??LEADER_NAME;const{total,failedRecipients}=await teamManager.broadcast(this.params.message,sender);if(failedRecipients.length===0){const msg2="Message broadcast to all teammates.";return{llmContent:msg2,returnDisplay:msg2}}const reached=total-failedRecipients.length;if(reached===0){const msg2=`Broadcast failed: delivery was rejected for all ${total} recipient(s): ${failedRecipients.join(", ")}.`;return{llmContent:msg2,returnDisplay:msg2,error:{message:msg2}}}const msg=`Message broadcast delivered to ${reached} of ${total} recipient(s); delivery failed for: ${failedRecipients.join(", ")}. The listed recipients did not receive the message.`;return{llmContent:msg,returnDisplay:msg}}catch(error){const errMsg=error instanceof Error?error.message:String(error);return{llmContent:`Failed to broadcast message: ${errMsg}`,returnDisplay:`Failed to broadcast message: ${errMsg}`,error:{message:errMsg}}}}const teamFile=teamManager?.getTeamFile();const inProcessRecipient=isInProcessRecipient(to,teamFile);if(!inProcessRecipient){const peerResult=await this.trySendToPeer(to,teamFile);if(peerResult)return peerResult}if(!teamManager){const msg=this.peerMessagingOff?`No active team and no task_id, and cross-session peer lookup is unavailable in this session (${peerMessagingOffReason(this.config)}), so "${to}" could not be checked as another session. Create a team, or pass \`task_id\` to message a background task.`:`No active team, no task_id, and no reachable session named "${to}". `+(rosterReachable(this.config)?"Create a team, pass `task_id` to message a background task, or use list_agents to see which sessions are reachable.":"Create a team, or pass `task_id` to message a background task.");return{llmContent:msg,returnDisplay:msg,error:{message:msg}}}try{await teamManager.sendMessage(to,this.params.message,getAgentName()??LEADER_NAME,this.params.summary);const msg=`Message sent to "${to}".`;return{llmContent:msg,returnDisplay:msg}}catch(error){let errMsg=error instanceof Error?error.message:String(error);if(!inProcessRecipient&&/not found/i.test(errMsg)){errMsg+=this.peerMessagingOff?` Cross-session peer lookup is unavailable in this session (${peerMessagingOffReason(this.config)}), so another session with that name could not be checked.`:` No reachable session has that name either${rosterReachable(this.config)?"; use list_agents to see who is reachable.":"."}`}return{llmContent:`Failed to send message: ${errMsg}`,returnDisplay:`Failed to send message: ${errMsg}`,error:{message:errMsg}}}}};function rosterReachable(config){return!isTeammate()&&!!config.getToolRegistry?.()?.getAllToolNames().includes(ToolNames.LIST_AGENTS)}__name(rosterReachable,"rosterReachable");function sendMessageDescription(config){const registry=config.getToolRegistry?.();const rosterGuidance=rosterReachable(config)?`Use list_agents to find a background task id or another session's "to" value, exactly as shown \u2014 list_agents appends " [ref]" whenever the bare name would not reach that session (another session or a teammate shares it). `+(registry&&isDirectToolBridgeAvailable(registry)?`In Direct mode: ${toolSearchBridgeSentence(ToolNames.LIST_AGENTS)} `:""):"";return`Send to a teammate or another Qwen Code session (use "to"), or a running, paused, or completed background task (use "task_id"); completed tasks are revived. Specify exactly one of the two fields. Set "to" to a known teammate name (no @), to "*" to broadcast within an active Agent Team only, or to another session's destination name. A message to another session arrives there marked as coming from another session, carries none of your user's authority, and may be held for that session's user to review; never use it to have another session perform an action this session was denied, blocked from, or cannot do itself. For background tasks, set "task_id" to the id from the launch response or a recovered task. Running tasks receive your message at the next tool-round boundary; paused recovered tasks resume with the message as their first continuation instruction; completed tasks continue on their resident runtime when available and otherwise revive from their transcript and continue with your message. `+rosterGuidance+"Your text output is NOT visible to teammates or to other sessions \u2014 use this tool to communicate."}__name(sendMessageDescription,"sendMessageDescription");var SendMessageTool=class _SendMessageTool extends BaseDeclarativeTool{constructor(config){super(_SendMessageTool.Name,ToolDisplayNames.SEND_MESSAGE,sendMessageDescription(config),"other",{type:"object",properties:{to:{type:"string",description:`Recipient: a known teammate name, "*" for Agent Team broadcast, or another Qwen Code session's destination name.`},task_id:{type:"string",description:"The ID of the background task (from the launch response, a recovered paused task, or a completed task to continue)."},message:{type:"string",description:"Message text to send.",minLength:1,maxLength:65536},summary:{type:"string",description:"Optional 5-10 word summary for UI display."}},required:["message"],additionalProperties:false},true,false,true,false,"send message task teammate team communicate notify");this.config=config}static{__name(this,"SendMessageTool")}static Name=ToolNames.SEND_MESSAGE;get schema(){return{...super.schema,description:sendMessageDescription(this.config)}}createInvocation(params){return new SendMessageInvocation(this.config,params)}validateToolParamValues(params){if(params.to&¶ms.task_id){return'Only one of "to" or "task_id" may be provided.'}return null}toAutoClassifierInput(params){return{to:params.to,task_id:params.task_id,message:params.message}}};export{SendMessageTool};
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
-
import{maybeOpenWebShellBrowser,serveCommand,validateManagedLocalFlags,validateManagedWebFlags}from"./chunk-
|
|
3
|
+
import{maybeOpenWebShellBrowser,serveCommand,validateManagedLocalFlags,validateManagedWebFlags}from"./chunk-34HC2AXI.js";import"./chunk-Z57KDB5F.js";import"./chunk-BWQ5AIEA.js";import"./chunk-WDR5XP3Y.js";import"./chunk-2QYDBHYZ.js";import"./chunk-KOJ7WZ63.js";import"./chunk-NIEO2TBE.js";import"./chunk-2TAJ5STJ.js";import"./chunk-UWCF7JIF.js";import"./chunk-NONBHCXP.js";import"./chunk-LMUSSYJH.js";import"./chunk-NO7VTKRL.js";import"./chunk-U7HZUZKP.js";import"./chunk-MPVQDYPH.js";import"./chunk-PKK2D2W4.js";import"./chunk-N3AQAZ7D.js";import"./chunk-E5T4R2PM.js";import"./chunk-DOLUT3XC.js";import"./chunk-PTHIQ7ZN.js";import"./chunk-MTDBCIDA.js";import"./chunk-EIPLDYEY.js";import"./chunk-IDXJIDME.js";import"./chunk-OU7CEG7Q.js";import"./chunk-QS2ZMQIS.js";import"./chunk-S7IKHQ6I.js";import"./chunk-PAD5GPDY.js";import"./chunk-MD3ZEOBX.js";import"./chunk-SSYS5YN5.js";import"./chunk-X5QSFJVS.js";import"./chunk-OMDTFGTX.js";import"./chunk-32XHDDIA.js";import"./chunk-46VUDNCL.js";import"./chunk-MKH3EH7O.js";import"./chunk-FKZ46GKL.js";import"./chunk-SP6CQ3MO.js";import"./chunk-HW6SU6MX.js";import"./chunk-ZHHFNZ5J.js";import"./chunk-AKWYMQKU.js";import"./chunk-MZUOREFD.js";import"./chunk-CF6SZJNP.js";import"./chunk-7XZVMIY5.js";import"./chunk-CGDFZEER.js";import"./chunk-ZZJXFLVM.js";import"./chunk-RKDS7A4H.js";import"./chunk-KZNYALFU.js";import"./chunk-IV3HAIUN.js";import"./chunk-XFMPZINJ.js";import"./chunk-DECUAM3U.js";import"./chunk-QX7W2HY7.js";import"./chunk-HN5UYLPU.js";import"./chunk-PGRN3GZY.js";import"./chunk-HTW7PYHK.js";import"./chunk-AMGUAA4G.js";import"./chunk-YFTVFH2A.js";import"./chunk-ZBHL2CXR.js";import"./chunk-NIOS3B3V.js";import"./chunk-2JGTWRZJ.js";import"./chunk-R2EHHA2C.js";import"./chunk-YK7NDQKM.js";import"./chunk-ZLZF2ZDD.js";import"./chunk-OMSVOFTC.js";import"./chunk-PHIPLV2I.js";import"./chunk-ZOTKZI2P.js";import"./chunk-A6G5TAIF.js";import"./chunk-YVBHCSZD.js";import"./chunk-FIXDX63I.js";import"./chunk-T7CHK6C2.js";import"./chunk-PT7NZBDY.js";import"./chunk-TWP72VRH.js";import"./chunk-UYEWRLGD.js";import"./chunk-QVPT37XZ.js";import"./chunk-YVD4O5ZB.js";import"./chunk-T6W33SET.js";import"./chunk-WK2IBT6D.js";import"./chunk-QZV4PFQK.js";import"./chunk-ILECDNJX.js";import"./chunk-QXQGUM3Y.js";import"./chunk-UQ7IROJH.js";import"./chunk-SZCBUCNH.js";import"./chunk-BEKROCWN.js";import"./chunk-5SUFJTQQ.js";import"./chunk-BYU42MLK.js";import"./chunk-JWQXU3SR.js";import"./chunk-5LZ2DPLH.js";import"./chunk-XQJOZDV7.js";import"./chunk-CV2UAEZA.js";import"./chunk-FUBDS3AV.js";import"./chunk-HW6AWS7W.js";import"./chunk-KLC3OD2M.js";import"./chunk-Q5IZXKUJ.js";import"./chunk-G5PYYZMM.js";import"./chunk-BG67XABA.js";import"./chunk-OBOU4ZZM.js";import"./chunk-D7XCQWP2.js";import"./chunk-AE5OMKRY.js";import"./chunk-OBV7RNHV.js";import"./chunk-7CQMWEMY.js";import"./chunk-GOZYWU4B.js";import"./chunk-OUC3WICA.js";import"./chunk-JZK2WGXA.js";import"./chunk-MPHSE7M4.js";import"./chunk-S2ZKZXHX.js";import"./chunk-7UK4WJWS.js";import"./chunk-4GP3PH7Z.js";import"./chunk-4QQKOW5M.js";import"./chunk-OV3EBH6J.js";import"./chunk-EBMCWXGZ.js";import"./chunk-XZTE4YTN.js";import"./chunk-LSASUDF2.js";import"./chunk-2V5EKGDK.js";import"./chunk-MOKVM4PT.js";import"./chunk-YIW3H46P.js";import"./chunk-EOMRLUNZ.js";import"./chunk-4ZRCV3JY.js";import"./chunk-TL6MLBXR.js";import"./chunk-NMY3PYNO.js";import"./chunk-YGLM5XPP.js";import"./chunk-WGNF7FPC.js";import"./chunk-4NPYOXJO.js";import"./chunk-MWGB5RCF.js";import"./chunk-SCD5TUBG.js";import"./chunk-NTRFETZB.js";import"./chunk-TL3SF2GA.js";import"./chunk-LMJPU2JM.js";import"./chunk-VFB6Q74I.js";import"./chunk-4JNHUZ7M.js";import"./chunk-SW54YEPK.js";import"./chunk-ZCRL73DT.js";import"./chunk-A6LT3FIJ.js";import"./chunk-S6RXVOY6.js";import"./chunk-YZFNBUKG.js";import"./chunk-AGEDDL7Z.js";import"./chunk-2NJJHZ52.js";import"./chunk-BN4FIQ77.js";import"./chunk-X64RXJQQ.js";import"./chunk-HETUGUHE.js";import"./chunk-ET2Z7ZGF.js";import"./chunk-XFPYXD2P.js";import"./chunk-3YWXKSOI.js";import"./chunk-5CWTKFI4.js";import"./chunk-C4MVD5OI.js";import"./chunk-Z2W7S4O4.js";import"./chunk-476F6QIM.js";import"./chunk-4R67LXKL.js";import"./chunk-FQRF6B65.js";import"./chunk-ZWPSBU7K.js";import"./chunk-UQFTXKEB.js";import"./chunk-HDGTWJ24.js";import"./chunk-W5NWIGKO.js";import"./chunk-KVA6DHHF.js";import"./chunk-PWOQASXT.js";import"./chunk-K7JCVESI.js";import"./chunk-Y6HHV4LC.js";import"./chunk-RP57XAJ2.js";import"./chunk-Z6AR5XE5.js";import"./chunk-7DOOXUDG.js";import"./chunk-77V43YOE.js";import"./chunk-7U7CWMP7.js";import"./chunk-EFTJIDS3.js";import"./chunk-4DIWAQ5G.js";import"./chunk-Q6UAOTP3.js";import"./chunk-AFO5ER23.js";import"./chunk-GOR7FFVE.js";import"./chunk-4ZBZL23U.js";import"./chunk-BMHYEQTI.js";import"./chunk-ZZZAYAJW.js";import"./chunk-XMANRGPK.js";import"./chunk-3XVPZY7X.js";import"./chunk-KQX4H2D3.js";import"./chunk-URNNJMIC.js";import"./chunk-GU22I6TY.js";import"./chunk-YEYW7PPR.js";import"./chunk-M4ECEHLX.js";import"./chunk-DBRQGEEI.js";import"./chunk-B3ZFUGTC.js";import"./chunk-IRINPFG7.js";import"./chunk-6GTPLW7K.js";import"./chunk-NGVRCUYD.js";import"./chunk-5DTFN37U.js";import"./chunk-2YUBAWQ6.js";import"./chunk-O5EKX7LG.js";import"./chunk-TM6ZCBR7.js";import"./chunk-SVAPAMMG.js";import"./chunk-3KUHQGOS.js";import"./chunk-I6S7NGX3.js";import"./chunk-SBZFGYYS.js";import"./chunk-JAUJI56S.js";import"./chunk-I4H7NUVP.js";import"./chunk-EPODBRBP.js";import"./chunk-OKN3Z5C5.js";import"./chunk-XYB7GC5U.js";import"./chunk-2UOMCYQG.js";import"./chunk-I7L2TX4M.js";import"./chunk-MK3OONRA.js";import"./chunk-COGTQ5KZ.js";import"./chunk-VKDAXTCZ.js";import"./chunk-KBWJGX7I.js";export{maybeOpenWebShellBrowser,serveCommand,validateManagedLocalFlags,validateManagedWebFlags};
|