@wirecat/drive-cli 0.70.0 → 0.72.0
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 +150 -70
- package/contracts/wirecat.json +77 -8
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/agent-23OB2NZP.js +46 -0
- package/dist/bundle/{all-profiles-FW3GK3QO.js → all-profiles-GXGDVNQJ.js} +67 -25
- package/dist/bundle/{anthropic-QVKJT3II.js → anthropic-H5C4GQHC.js} +9 -9
- package/dist/bundle/{app-server-QU73RD5R.js → app-server-EQ3UK4C7.js} +97 -79
- package/dist/bundle/{bun-5XCD5CBB.js → bun-DTJVSRY3.js} +2 -2
- package/dist/bundle/{bun-sqlite-TIGSVNSV.js → bun-sqlite-JIFY7MAE.js} +9 -9
- package/dist/bundle/chunk-2Q325BBD.js +353 -0
- package/dist/bundle/chunk-35FIJGTT.js +52 -0
- package/dist/bundle/{chunk-7C5KENNU.js → chunk-3FRQ6V4T.js} +3 -3
- package/dist/bundle/chunk-47L262VI.js +340 -0
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-4HPXWYTE.js} +1 -1
- package/dist/bundle/{chunk-HYXXMSVD.js → chunk-4IUNYYYL.js} +4473 -2685
- package/dist/bundle/{chunk-FYPW7NMH.js → chunk-4JS32SRX.js} +64 -4
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-SONPLYV7.js → chunk-55FH6IEL.js} +5 -5
- package/dist/bundle/{chunk-VVN6GHAZ.js → chunk-5BNMWSU2.js} +659 -255
- package/dist/bundle/{chunk-FVTKFIQH.js → chunk-5H747A76.js} +5496 -3195
- package/dist/bundle/{chunk-PR7XD2DI.js → chunk-5KWCO56H.js} +2 -2
- package/dist/bundle/{chunk-3AHBZP33.js → chunk-5U3NCE5R.js} +35 -12
- package/dist/bundle/{chunk-HRATXUFH.js → chunk-6CCO3JCM.js} +31 -22
- package/dist/bundle/{chunk-RLNZ7NX5.js → chunk-6ZW2ZJYC.js} +2 -2
- package/dist/bundle/{chunk-RQNRYF6D.js → chunk-75DAHQOV.js} +3 -3
- package/dist/bundle/{chunk-7QSRODXM.js → chunk-77OBW43F.js} +6 -6
- package/dist/bundle/{chunk-GV5DGHSA.js → chunk-7EFM6AW3.js} +4 -4
- package/dist/bundle/{chunk-BXPC5TFG.js → chunk-A3S7QM5L.js} +3 -3
- package/dist/bundle/{chunk-IGNIUDI3.js → chunk-AA4LKC6W.js} +251 -565
- package/dist/bundle/chunk-ASTKHB6B.js +3233 -0
- package/dist/bundle/{chunk-3TCMANIM.js → chunk-BM6V7456.js} +8 -227
- package/dist/bundle/chunk-BO6EDBYJ.js +50 -0
- package/dist/bundle/{chunk-F5KJWRF5.js → chunk-BPA3R4KN.js} +2 -100
- package/dist/bundle/chunk-CIFE4KPX.js +2159 -0
- package/dist/bundle/chunk-CKB4XZZJ.js +730 -0
- package/dist/bundle/{chunk-YCL3SK4T.js → chunk-COJTCEZP.js} +113 -860
- package/dist/bundle/{chunk-BD2K2ONK.js → chunk-CWPYDT73.js} +6 -6
- package/dist/bundle/{chunk-6BMTW5A6.js → chunk-D4JNCXS7.js} +9 -9
- package/dist/bundle/chunk-DCPWZIOV.js +696 -0
- package/dist/bundle/{chunk-P7PLKNPX.js → chunk-DHMNCOQI.js} +415 -272
- package/dist/bundle/chunk-DOQMH4DC.js +280 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/{chunk-ML3R2UHV.js → chunk-DWRUOLBF.js} +4 -4
- package/dist/bundle/{chunk-5JTB4URG.js → chunk-E3VWZC3K.js} +14 -13
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-7IBENBCK.js → chunk-EVG3AA5M.js} +2 -2
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-FCSHWUMW.js → chunk-FBEZSA76.js} +5 -5
- package/dist/bundle/{chunk-RHSBXOQM.js → chunk-FBQJN74J.js} +1 -1
- package/dist/bundle/{chunk-4WK26MPY.js → chunk-FIZOPJYY.js} +1 -1
- package/dist/bundle/chunk-FNAYSZWK.js +783 -0
- package/dist/bundle/{chunk-LINBDWJK.js → chunk-FRCJHGZM.js} +2 -2
- package/dist/bundle/{chunk-RCTOWLCD.js → chunk-FTG5QBSD.js} +41 -33
- package/dist/bundle/{chunk-ABZ2NYDT.js → chunk-FUDUXIVG.js} +1 -1
- package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
- package/dist/bundle/{chunk-PAPY6Q6H.js → chunk-GIEZYBRC.js} +1 -1
- package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
- package/dist/bundle/chunk-GU6ICH53.js +108 -0
- package/dist/bundle/{chunk-REM5WHHQ.js → chunk-GUMKKRE6.js} +107 -71
- package/dist/bundle/{chunk-QBAOIMVB.js → chunk-GWCDOYSC.js} +1 -1
- package/dist/bundle/{chunk-HHAZ6DCY.js → chunk-GXGSC622.js} +69 -7
- package/dist/bundle/chunk-HAGXTGJC.js +188 -0
- package/dist/bundle/{chunk-TNKQDS5A.js → chunk-IMAWQC5K.js} +6 -6
- package/dist/bundle/{chunk-ZHZYGY5R.js → chunk-IVGVVSPW.js} +4 -4
- package/dist/bundle/{chunk-EDO5LZVF.js → chunk-J4NUHSM7.js} +1 -1
- package/dist/bundle/{chunk-DVVUJ254.js → chunk-K652FYCO.js} +6 -6
- package/dist/bundle/chunk-K6ZWNTXY.js +561 -0
- package/dist/bundle/{chunk-FONIFRYI.js → chunk-KF3ZBQJV.js} +4 -4
- package/dist/bundle/chunk-KFZCHJRT.js +80 -0
- package/dist/bundle/chunk-KLPFDFLI.js +221 -0
- package/dist/bundle/{chunk-LMJBQFW6.js → chunk-KP2XMCNT.js} +13 -13
- package/dist/bundle/{chunk-FADAOLGB.js → chunk-KWDZ3KVH.js} +4 -4
- package/dist/bundle/{chunk-MXNQZAJQ.js → chunk-KX4C32WD.js} +2 -2
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-ILAQIBEO.js → chunk-M2ZWYVWO.js} +1 -1
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-ZCXWV4XO.js → chunk-ML2QIWX2.js} +4 -4
- package/dist/bundle/{chunk-XOL346TJ.js → chunk-MUFF2YTH.js} +2 -2
- package/dist/bundle/{chunk-GAHIHE4K.js → chunk-N24YSLED.js} +9166 -9751
- package/dist/bundle/chunk-N4GTCPML.js +7 -0
- package/dist/bundle/{chunk-DVI72ZQG.js → chunk-NBMGDRP4.js} +1 -1
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-I7YSHUPW.js → chunk-NNGA4QDR.js} +13 -26
- package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
- package/dist/bundle/chunk-O7CZZ36M.js +80 -0
- package/dist/bundle/{chunk-HWUPU6WX.js → chunk-OAONP6KI.js} +13 -9
- package/dist/bundle/{chunk-3CHW7JGR.js → chunk-OESP4PHB.js} +17 -17
- package/dist/bundle/chunk-OHR6IZNH.js +116 -0
- package/dist/bundle/{chunk-54NDYVZA.js → chunk-OLCU7Q2B.js} +1 -1
- package/dist/bundle/{chunk-FN3RXBO7.js → chunk-OLDQLEPA.js} +6 -6
- package/dist/bundle/{chunk-7DJNURKV.js → chunk-OPIPG6AP.js} +16 -9
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/chunk-PRYMT3OG.js +30 -0
- package/dist/bundle/chunk-QDUIVMEW.js +36 -0
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-QKBPCX7Y.js} +1 -1
- package/dist/bundle/{chunk-PN4JYURZ.js → chunk-QSLOACDT.js} +201 -423
- package/dist/bundle/{chunk-3UWRAIWA.js → chunk-QUZFDU4K.js} +4 -4
- package/dist/bundle/{chunk-KSJAFMU5.js → chunk-R32DHS6J.js} +211 -380
- package/dist/bundle/{chunk-2SBC4DVV.js → chunk-R57QUYBG.js} +6 -28
- package/dist/bundle/{chunk-IFTX7AQU.js → chunk-R64OSDOD.js} +45 -66
- package/dist/bundle/{chunk-WJK6KTCS.js → chunk-RSPBVKOC.js} +8 -8
- package/dist/bundle/{chunk-GPDPEHYX.js → chunk-SPNPJ3FZ.js} +3 -4
- package/dist/bundle/chunk-SQHDSIFL.js +388 -0
- package/dist/bundle/{chunk-XZBA6FVH.js → chunk-ST35FIUG.js} +3 -3
- package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
- package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-OY7TNUEC.js → chunk-TTPWKTVR.js} +1 -1
- package/dist/bundle/{chunk-3UZ4OH22.js → chunk-U7VEJ3CW.js} +49 -129
- package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
- package/dist/bundle/{chunk-HK225DAG.js → chunk-UIQ35CA5.js} +1 -1
- package/dist/bundle/{chunk-GK3BJMGK.js → chunk-UJY26HW4.js} +1 -1
- package/dist/bundle/{chunk-EG62WVR2.js → chunk-UWG3PRY7.js} +9 -60
- package/dist/bundle/{chunk-BBRMDMIR.js → chunk-VAR3MJU6.js} +3 -3
- package/dist/bundle/{chunk-GJZSVSV3.js → chunk-VPQSI5IU.js} +4 -4
- package/dist/bundle/{chunk-YZPE72GE.js → chunk-VQPT3Y7W.js} +12 -12
- package/dist/bundle/{chunk-T5D4OGDC.js → chunk-WMG3H2VK.js} +2 -2
- package/dist/bundle/{chunk-6DPOWBKA.js → chunk-X5BGAZC5.js} +6 -6
- package/dist/bundle/{chunk-DHX27E5M.js → chunk-XC6TRWLZ.js} +3 -3
- package/dist/bundle/{chunk-Q5C6YKAY.js → chunk-XQZEMRCU.js} +402 -402
- package/dist/bundle/{chunk-54BQWRJL.js → chunk-XZ7MO6EU.js} +7 -7
- package/dist/bundle/{chunk-TGS5VPJD.js → chunk-YAIOEPKU.js} +341 -433
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-WWE5GO6G.js → chunk-YWOLQEDV.js} +16 -3
- package/dist/bundle/{chunk-DR57KDAY.js → chunk-ZFDSJ5YJ.js} +38 -8
- package/dist/bundle/{chunk-BBFXQPKD.js → chunk-ZFUZEFU6.js} +3 -3
- package/dist/bundle/{chunk-YRUR3E3E.js → chunk-ZJKXSMXK.js} +72 -59
- package/dist/bundle/{chunk-BFKFKDPC.js → chunk-ZKWT6HXT.js} +1 -1
- package/dist/bundle/chunk-ZPUY3COZ.js +250 -0
- package/dist/bundle/{cli-K4D4DIGQ.js → cli-2P5FW2RL.js} +201 -98
- package/dist/bundle/command-contract-BMQT2G5X.js +45 -0
- package/dist/bundle/{command-server-entry-WREK3QBB.js → command-server-entry-KP2UDGLA.js} +36 -34
- package/dist/bundle/{decode-SEETPKBH.js → decode-K2JZ5D6V.js} +10 -10
- package/dist/bundle/{dispatch-SQCEURVK.js → dispatch-KOQZA74A.js} +10 -10
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-WZ5RKFCX.js → echarts-URO3QGCG.js} +2 -2
- package/dist/bundle/{embed-B2UCRZZR.js → embed-JLIPWTNN.js} +10 -10
- package/dist/bundle/{embedder-4R6Z7G7L.js → embedder-LUTDO3HS.js} +15 -15
- package/dist/bundle/entry-AVF6LMG7.js +25 -0
- package/dist/bundle/{failure-CYNXH3RQ.js → failure-GJMQLM7O.js} +4 -4
- package/dist/bundle/first-run-VYTIEUDA.js +31 -0
- package/dist/bundle/first-screen-QVZPF7KL.js +45 -0
- package/dist/bundle/google-VX7IPACN.js +46 -0
- package/dist/bundle/{google-api-SAND2F7L.js → google-api-RFXKRLL4.js} +88 -73
- package/dist/bundle/grants-4XWJFVD6.js +133 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
- package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
- package/dist/bundle/{identity-JVVGS4U6.js → identity-FXPB5EMT.js} +7 -6
- package/dist/bundle/{instructions-JSMTSB22.js → instructions-IROIUVZI.js} +1 -1
- package/dist/bundle/{login-6WG3YBDU.js → login-WIY5VQU7.js} +96 -81
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-NJIOKW3E.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
- package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
- package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
- package/dist/bundle/meeting-combined-JUNV35GM.js +28 -0
- package/dist/bundle/meeting-model-XY4UNWWK.js +29 -0
- package/dist/bundle/{meeting-semantic-5U7JQCFF.js → meeting-semantic-62QNQMOM.js} +10 -10
- package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
- package/dist/bundle/{node-VJMVHOWD.js → node-IACCI2CW.js} +2 -2
- package/dist/bundle/{node-sqlite-DCNT3HVE.js → node-sqlite-WYIRC7C7.js} +10 -10
- package/dist/bundle/notes-search-DEDUJKSN.js +70 -0
- package/dist/bundle/oauth-HXBXF4VI.js +22 -0
- package/dist/bundle/{open-NFOEHVW7.js → open-H32B6BCT.js} +8 -8
- package/dist/bundle/{openai-D47WY7EC.js → openai-VHMPJJUG.js} +22 -21
- package/dist/bundle/{process-Q2FRU5VA.js → process-RNHPF5OK.js} +1 -1
- package/dist/bundle/{program-T2AJJQEM.js → program-GYMJ3DDH.js} +276 -1132
- package/dist/bundle/{prompt-YJSDABXN.js → prompt-TOG2CRCE.js} +8 -8
- package/dist/bundle/{reasons-WEHPCSJX.js → reasons-TLFQ45YX.js} +6 -5
- package/dist/bundle/{recognize-6OBEIEB3.js → recognize-GYGY45EY.js} +7 -7
- package/dist/bundle/remote-6XN2QLI5.js +35 -0
- package/dist/bundle/{rerank-L6F5SLIB.js → rerank-HJO3O4TW.js} +11 -11
- package/dist/bundle/{serve-GYSWIWH4.js → serve-XPCNLHCR.js} +19 -19
- package/dist/bundle/server-UBJZ66XE.js +97 -0
- package/dist/bundle/{server-GWWP3RIT.js → server-WPT3NC5B.js} +89 -70
- package/dist/bundle/{services-BDQBRXT5.js → services-253KKKVU.js} +109 -89
- package/dist/bundle/{sqlite-runtime-ZSZGAUYB.js → sqlite-runtime-EZASGJXW.js} +9 -9
- package/dist/bundle/{start-BJ275RUK.js → start-UHI35JFL.js} +7 -7
- package/dist/bundle/{state-HLNGFI2T.js → state-KJTSPFGK.js} +9 -9
- package/dist/bundle/{store-I43KZNJW.js → store-62J2H2A3.js} +36 -25
- package/dist/bundle/{store-OSRTGYGI.js → store-G5B7T7M7.js} +38 -23
- package/dist/bundle/store-maintenance-command-C6T4YLVF.js +85 -0
- package/dist/bundle/surface-3OT64BHS.js +83 -0
- package/dist/bundle/tokens-EHYO6D2X.js +133 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +11 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +8 -22
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +14 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +2 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/generated/manifest.d.ts +2 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +782 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/types.d.ts +262 -58
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +5 -5
- package/dist/google.js.map +1 -1
- package/dist/model.d.ts +5 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/policy-keys.js +1 -1
- package/dist/policy-keys.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +9 -4
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +6 -1
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +2 -7
- package/dist/store.js.map +1 -1
- package/dist/supported.d.ts +2 -2
- package/dist/supported.d.ts.map +1 -1
- package/dist/supported.js +2 -3
- package/dist/supported.js.map +1 -1
- package/dist/sync.d.ts +2 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +6 -4
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/scenarios/find-decision.md +1 -1
- package/skills/drive-cli/SKILL.md +4 -2
- package/dist/bundle/chunk-AV5UKJZM.js +0 -729
- package/dist/bundle/chunk-NP7LJATI.js +0 -598
- package/dist/bundle/chunk-P77FL6RY.js +0 -896
- package/dist/bundle/chunk-ZI3YTXSF.js +0 -2
- package/dist/bundle/command-contract-V3F452QI.js +0 -43
- package/dist/bundle/entry-ORZYRJ5N.js +0 -25
- package/dist/bundle/first-run-KAKA6KBY.js +0 -31
- package/dist/bundle/first-screen-R645UHRH.js +0 -41
- package/dist/bundle/google-BSO3YB7N.js +0 -45
- package/dist/bundle/grants-PLNFYARD.js +0 -118
- package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
- package/dist/bundle/meeting-combined-SUKMFK3F.js +0 -27
- package/dist/bundle/meeting-model-S4YGKIFI.js +0 -29
- package/dist/bundle/oauth-KCMNQ3ZP.js +0 -22
- package/dist/bundle/remote-3SL2QJ7T.js +0 -35
- package/dist/bundle/server-BI46BSRE.js +0 -80
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +0 -72
- package/dist/bundle/tokens-DB7O7QNB.js +0 -118
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CLIENT_INFO_META_KEY
|
|
5
|
+
} from "./chunk-PL5P7UKW.js";
|
|
6
|
+
import {
|
|
7
|
+
agentOf,
|
|
8
|
+
clientHash,
|
|
9
|
+
currentCaller
|
|
10
|
+
} from "./chunk-XZ7MO6EU.js";
|
|
11
|
+
import {
|
|
12
|
+
__name
|
|
13
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
14
|
+
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
16
|
+
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
17
|
+
const client = caller?.agent?.client?.name;
|
|
18
|
+
if (client && client !== "unknown")
|
|
19
|
+
return client;
|
|
20
|
+
const kind = caller?.agent?.kind;
|
|
21
|
+
return kind && kind !== "mcp-client" ? kind : fallback;
|
|
22
|
+
}, "callingAgent");
|
|
23
|
+
var CALLER_META_KEY = "wirecat.dev/caller";
|
|
24
|
+
var PROXY_CLIENT_NAME = "all-profiles";
|
|
25
|
+
var NAME = /^[\w .@()/+-]{1,64}$/;
|
|
26
|
+
var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
|
|
27
|
+
var clientFrom = /* @__PURE__ */ __name((value) => {
|
|
28
|
+
if (!value || typeof value !== "object")
|
|
29
|
+
return void 0;
|
|
30
|
+
const { name, version } = value;
|
|
31
|
+
const named = plain(name);
|
|
32
|
+
if (!named)
|
|
33
|
+
return void 0;
|
|
34
|
+
const versioned = plain(version);
|
|
35
|
+
return { name: named, ...versioned ? { version: versioned } : {} };
|
|
36
|
+
}, "clientFrom");
|
|
37
|
+
var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
|
|
38
|
+
const meta = ctx?.mcpReq?._meta;
|
|
39
|
+
const requestId = ctx?.mcpReq?.id;
|
|
40
|
+
const initialized = source.client?.();
|
|
41
|
+
const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
|
|
42
|
+
if (proxied)
|
|
43
|
+
return proxied;
|
|
44
|
+
const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
|
|
45
|
+
const mcp = /* @__PURE__ */ __name((connection) => ({
|
|
46
|
+
tool,
|
|
47
|
+
...requestId === void 0 ? {} : { request_id: String(requestId) },
|
|
48
|
+
...connection ? { connection_id: connection } : {}
|
|
49
|
+
}), "mcp");
|
|
50
|
+
const auth = ctx?.http?.authInfo;
|
|
51
|
+
if (auth) {
|
|
52
|
+
const registered = plain(auth.extra?.clientName);
|
|
53
|
+
return {
|
|
54
|
+
via: "mcp-http",
|
|
55
|
+
agent: {
|
|
56
|
+
kind: "mcp-client",
|
|
57
|
+
session_id: ctx?.sessionId ?? null,
|
|
58
|
+
client: {
|
|
59
|
+
name: registered ?? client?.name ?? "unknown",
|
|
60
|
+
...client?.version ? { version: client.version } : {},
|
|
61
|
+
id: clientHash(auth.clientId)
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
mcp: mcp(ctx?.sessionId)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
|
|
68
|
+
return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
|
|
69
|
+
}, "callerOf");
|
|
70
|
+
var passedOn = /* @__PURE__ */ __name((value, tool) => {
|
|
71
|
+
if (!value || typeof value !== "object")
|
|
72
|
+
return void 0;
|
|
73
|
+
const { via, agent, mcp } = value;
|
|
74
|
+
if (via !== "mcp-stdio" && via !== "mcp-http")
|
|
75
|
+
return void 0;
|
|
76
|
+
const a = agent && typeof agent === "object" ? agent : void 0;
|
|
77
|
+
const kind = plain(a?.kind);
|
|
78
|
+
const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
|
|
79
|
+
const client = clientFrom(a?.client);
|
|
80
|
+
const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
|
|
81
|
+
const m = mcp && typeof mcp === "object" ? mcp : {};
|
|
82
|
+
const request = plain(m.request_id);
|
|
83
|
+
const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
|
|
84
|
+
return {
|
|
85
|
+
via,
|
|
86
|
+
...kind ? {
|
|
87
|
+
agent: {
|
|
88
|
+
kind,
|
|
89
|
+
session_id: session,
|
|
90
|
+
...a?.from_chat === true ? { from_chat: true } : {},
|
|
91
|
+
...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
|
|
92
|
+
}
|
|
93
|
+
} : {},
|
|
94
|
+
mcp: {
|
|
95
|
+
tool,
|
|
96
|
+
...request ? { request_id: request } : {},
|
|
97
|
+
...connection ? { connection_id: connection } : {},
|
|
98
|
+
proxied: true
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, "passedOn");
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
callingAgent,
|
|
105
|
+
CALLER_META_KEY,
|
|
106
|
+
PROXY_CLIENT_NAME,
|
|
107
|
+
callerOf
|
|
108
|
+
};
|
|
@@ -2,47 +2,56 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
sharedModel
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-OAONP6KI.js";
|
|
6
6
|
import {
|
|
7
7
|
answerOf,
|
|
8
8
|
messengerContext
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U7VEJ3CW.js";
|
|
10
10
|
import {
|
|
11
11
|
chatEventAnswer,
|
|
12
12
|
memberAnswer,
|
|
13
|
-
pollVoteAnswer
|
|
14
|
-
|
|
15
|
-
} from "./chunk-AV5UKJZM.js";
|
|
13
|
+
pollVoteAnswer
|
|
14
|
+
} from "./chunk-2Q325BBD.js";
|
|
16
15
|
import {
|
|
17
16
|
holdLock,
|
|
18
17
|
lockPath,
|
|
18
|
+
markCurrent,
|
|
19
19
|
releaseLock,
|
|
20
20
|
servingProfiles,
|
|
21
21
|
takeLock
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YWOLQEDV.js";
|
|
23
|
+
import {
|
|
24
|
+
serveRelay
|
|
25
|
+
} from "./chunk-47L262VI.js";
|
|
23
26
|
import {
|
|
24
27
|
FETCHING,
|
|
25
28
|
RULES_VERSION,
|
|
26
29
|
applyTaskRulesOnArrival,
|
|
27
|
-
capability,
|
|
28
30
|
newSendId,
|
|
29
|
-
onlineDeps,
|
|
30
31
|
openRequestTask,
|
|
31
32
|
patiently,
|
|
32
|
-
queryTerms,
|
|
33
33
|
refuseLockedOutput,
|
|
34
|
-
senderIsMe,
|
|
35
34
|
servicesFor,
|
|
36
|
-
syncsOneChat
|
|
35
|
+
syncsOneChat
|
|
36
|
+
} from "./chunk-N24YSLED.js";
|
|
37
|
+
import {
|
|
38
|
+
queryTerms,
|
|
37
39
|
typedQuery,
|
|
38
40
|
withQuery
|
|
39
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CKB4XZZJ.js";
|
|
42
|
+
import {
|
|
43
|
+
onlineDeps,
|
|
44
|
+
senderIsMe
|
|
45
|
+
} from "./chunk-CIFE4KPX.js";
|
|
40
46
|
import {
|
|
41
47
|
embeddingKeys,
|
|
42
48
|
endpointKeyName,
|
|
43
49
|
modelGateway,
|
|
44
50
|
withTimeLimit
|
|
45
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-ZPUY3COZ.js";
|
|
52
|
+
import {
|
|
53
|
+
capability
|
|
54
|
+
} from "./chunk-PRYMT3OG.js";
|
|
46
55
|
import {
|
|
47
56
|
stringWidth,
|
|
48
57
|
wrapAnsi
|
|
@@ -54,7 +63,7 @@ import {
|
|
|
54
63
|
lossUnknown,
|
|
55
64
|
storeDamageReport,
|
|
56
65
|
storeHealth
|
|
57
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-OESP4PHB.js";
|
|
58
67
|
import {
|
|
59
68
|
Command,
|
|
60
69
|
LOCAL_READ,
|
|
@@ -62,7 +71,6 @@ import {
|
|
|
62
71
|
REMOTE_READ,
|
|
63
72
|
REMOTE_WRITE,
|
|
64
73
|
annotate,
|
|
65
|
-
codeOf,
|
|
66
74
|
commandAt,
|
|
67
75
|
destroysNothing,
|
|
68
76
|
environmentOf,
|
|
@@ -81,16 +89,19 @@ import {
|
|
|
81
89
|
snakeKeys,
|
|
82
90
|
storeTable,
|
|
83
91
|
withoutProviderRefs
|
|
84
|
-
} from "./chunk-
|
|
85
|
-
import {
|
|
86
|
-
modelTarget
|
|
87
|
-
} from "./chunk-FYPW7NMH.js";
|
|
92
|
+
} from "./chunk-YAIOEPKU.js";
|
|
88
93
|
import {
|
|
89
94
|
holdersOf
|
|
90
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-FIZOPJYY.js";
|
|
96
|
+
import {
|
|
97
|
+
codeOf
|
|
98
|
+
} from "./chunk-HAGXTGJC.js";
|
|
99
|
+
import {
|
|
100
|
+
modelTarget
|
|
101
|
+
} from "./chunk-4JS32SRX.js";
|
|
91
102
|
import {
|
|
92
103
|
readSecret
|
|
93
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-ST35FIUG.js";
|
|
94
105
|
import {
|
|
95
106
|
CORPORA,
|
|
96
107
|
MIGRATIONS,
|
|
@@ -114,9 +125,12 @@ import {
|
|
|
114
125
|
readStoreTables,
|
|
115
126
|
rebuildMentions,
|
|
116
127
|
resetAttachmentWords,
|
|
128
|
+
resetContentPostWords,
|
|
129
|
+
resetCrmFileWords,
|
|
117
130
|
resetNoteIndex,
|
|
118
131
|
resetSearchIndex,
|
|
119
132
|
resetStems,
|
|
133
|
+
resetTrackerItemWords,
|
|
120
134
|
rollBack,
|
|
121
135
|
rowCounts,
|
|
122
136
|
searchIndexState,
|
|
@@ -125,37 +139,39 @@ import {
|
|
|
125
139
|
storeClients,
|
|
126
140
|
storeContents,
|
|
127
141
|
vectorIndexCounts
|
|
128
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-4IUNYYYL.js";
|
|
129
143
|
import {
|
|
130
144
|
openCache
|
|
131
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-X5BGAZC5.js";
|
|
132
146
|
import {
|
|
133
|
-
currentRun,
|
|
134
|
-
formatLocator,
|
|
135
|
-
parseLocator,
|
|
136
147
|
readDamageMark,
|
|
137
148
|
readHealthMark,
|
|
138
149
|
readJournalMark,
|
|
139
150
|
recordDeepCheck
|
|
140
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-FNAYSZWK.js";
|
|
152
|
+
import {
|
|
153
|
+
currentRun,
|
|
154
|
+
formatLocator,
|
|
155
|
+
parseLocator
|
|
156
|
+
} from "./chunk-COJTCEZP.js";
|
|
141
157
|
import {
|
|
142
158
|
failureKey,
|
|
143
159
|
isStoreDamage
|
|
144
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-6ZW2ZJYC.js";
|
|
145
161
|
import {
|
|
146
162
|
queryFieldsOf
|
|
147
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-XQZEMRCU.js";
|
|
148
164
|
import {
|
|
149
165
|
storePath
|
|
150
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-WMG3H2VK.js";
|
|
151
167
|
import {
|
|
152
168
|
resolvePaths,
|
|
153
169
|
writeSecurely
|
|
154
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-6CCO3JCM.js";
|
|
155
171
|
import {
|
|
156
172
|
singleLine,
|
|
157
173
|
visibleControls
|
|
158
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-FUDUXIVG.js";
|
|
159
175
|
import {
|
|
160
176
|
array,
|
|
161
177
|
boolean,
|
|
@@ -176,10 +192,10 @@ import {
|
|
|
176
192
|
string,
|
|
177
193
|
transform,
|
|
178
194
|
trim
|
|
179
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-GXGSC622.js";
|
|
180
196
|
import {
|
|
181
197
|
CliError
|
|
182
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-OLCU7Q2B.js";
|
|
183
199
|
import {
|
|
184
200
|
__commonJS,
|
|
185
201
|
__name,
|
|
@@ -5519,11 +5535,11 @@ var require_liquid_node = __commonJS({
|
|
|
5519
5535
|
}
|
|
5520
5536
|
});
|
|
5521
5537
|
|
|
5522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5523
5539
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync10, mkdirSync, realpathSync as realpathSync3, renameSync as renameSync3, rmSync as rmSync3, statfsSync as statfsSync2, statSync as statSync4, writeFileSync as writeFileSync2 } from "node:fs";
|
|
5524
5540
|
import { dirname as dirname3, resolve } from "node:path";
|
|
5525
5541
|
|
|
5526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5527
5543
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5528
5544
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5529
5545
|
import { Transform } from "node:stream";
|
|
@@ -5630,7 +5646,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5630
5646
|
renameSync(pending, to);
|
|
5631
5647
|
}, "unsealFile");
|
|
5632
5648
|
|
|
5633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5634
5650
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5635
5651
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5636
5652
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5654,7 +5670,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5654
5670
|
};
|
|
5655
5671
|
}, "compatibilityOf");
|
|
5656
5672
|
|
|
5657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5673
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5658
5674
|
import { createHash as createHash2 } from "node:crypto";
|
|
5659
5675
|
var COPY_MARK = "__repair_";
|
|
5660
5676
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5908,19 +5924,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5908
5924
|
return found;
|
|
5909
5925
|
}, "deleteCopy");
|
|
5910
5926
|
|
|
5911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5912
5928
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5913
5929
|
|
|
5914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5915
5931
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5916
5932
|
|
|
5917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5918
5934
|
import { execFileSync, spawn } from "node:child_process";
|
|
5919
5935
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5920
5936
|
import { basename, dirname, join } from "node:path";
|
|
5921
5937
|
import { Transform as Transform2 } from "node:stream";
|
|
5922
5938
|
|
|
5923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5924
5940
|
var REFILL_MARGIN_MS = 864e5;
|
|
5925
5941
|
var TIME_KEYS = 1e12;
|
|
5926
5942
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -6000,7 +6016,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
6000
6016
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6001
6017
|
}, "forgetMail");
|
|
6002
6018
|
|
|
6003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
6004
6020
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6005
6021
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6006
6022
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6277,6 +6293,9 @@ var FILLERS = {
|
|
|
6277
6293
|
fillStems(database, { now });
|
|
6278
6294
|
}, "message_stems"),
|
|
6279
6295
|
attachment_words: /* @__PURE__ */ __name((database) => void resetAttachmentWords(database), "attachment_words"),
|
|
6296
|
+
crm_file_words: /* @__PURE__ */ __name((database) => void resetCrmFileWords(database), "crm_file_words"),
|
|
6297
|
+
tracker_item_words: /* @__PURE__ */ __name((database) => void resetTrackerItemWords(database), "tracker_item_words"),
|
|
6298
|
+
content_post_words: /* @__PURE__ */ __name((database) => void resetContentPostWords(database), "content_post_words"),
|
|
6280
6299
|
attachment_name_words: /* @__PURE__ */ __name((database) => (
|
|
6281
6300
|
// As migration 20 filled it: й and ё fold as the triggers fold them.
|
|
6282
6301
|
database.exec("INSERT INTO attachment_name_words (rowid, name) SELECT id, replace(replace(replace(replace(name, '\u0439', '\u0438'), '\u0419', '\u0418'), '\u0451', '\u0435'), '\u0401', '\u0415') FROM attachments WHERE name IS NOT NULL")
|
|
@@ -6528,7 +6547,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6528
6547
|
}
|
|
6529
6548
|
}, "recoverLocked");
|
|
6530
6549
|
|
|
6531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6532
6551
|
var COUNTED = [
|
|
6533
6552
|
"accounts",
|
|
6534
6553
|
"chats",
|
|
@@ -6684,7 +6703,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6684
6703
|
return recover;
|
|
6685
6704
|
}, "storeRecoverCommand");
|
|
6686
6705
|
|
|
6687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6688
6707
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6689
6708
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6690
6709
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6734,7 +6753,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
|
|
|
6734
6753
|
return app ? store.addCommand(storeRecoverCommand(app)) : store;
|
|
6735
6754
|
}, "sharedStoreCommand");
|
|
6736
6755
|
|
|
6737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6738
6757
|
var ENCRYPT_OPTION = [
|
|
6739
6758
|
"--encrypt",
|
|
6740
6759
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -6753,7 +6772,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6753
6772
|
return password;
|
|
6754
6773
|
}, "passwordOf");
|
|
6755
6774
|
|
|
6756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6757
6776
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6758
6777
|
import { join as join2 } from "node:path";
|
|
6759
6778
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6924,7 +6943,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6924
6943
|
}, "problem");
|
|
6925
6944
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6926
6945
|
|
|
6927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6946
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6928
6947
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6929
6948
|
import { join as join3 } from "node:path";
|
|
6930
6949
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6977,7 +6996,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6977
6996
|
}, "recordReply");
|
|
6978
6997
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6979
6998
|
|
|
6980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6981
7000
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6982
7001
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6983
7002
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7083,10 +7102,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7083
7102
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7084
7103
|
}, "filled");
|
|
7085
7104
|
|
|
7086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7087
7106
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7088
7107
|
|
|
7089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7090
7109
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7091
7110
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7092
7111
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7113,7 +7132,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7113
7132
|
return engine;
|
|
7114
7133
|
}, "safeLiquid");
|
|
7115
7134
|
|
|
7116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7135
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7117
7136
|
var TEMPLATE_LIMITS = {
|
|
7118
7137
|
parse: 32768,
|
|
7119
7138
|
renders: 2e3,
|
|
@@ -7252,7 +7271,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7252
7271
|
}
|
|
7253
7272
|
}, "renderReplyTemplate");
|
|
7254
7273
|
|
|
7255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7256
7275
|
var DRY_RUN_DAYS = 7;
|
|
7257
7276
|
var PAGE = 500;
|
|
7258
7277
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7366,7 +7385,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7366
7385
|
}
|
|
7367
7386
|
}, "storedSince");
|
|
7368
7387
|
|
|
7369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/models/purpose.js
|
|
7370
7389
|
var HOSTED = {
|
|
7371
7390
|
openai: "https://api.openai.com/v1",
|
|
7372
7391
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7387,7 +7406,7 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7387
7406
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7388
7407
|
}, "purposeModel");
|
|
7389
7408
|
|
|
7390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7391
7410
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7392
7411
|
import { join as join4 } from "node:path";
|
|
7393
7412
|
var shape = strictObject({
|
|
@@ -7412,7 +7431,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7412
7431
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7413
7432
|
}, "mayModelReply");
|
|
7414
7433
|
|
|
7415
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7416
7435
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7417
7436
|
ai: true
|
|
7418
7437
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7460,7 +7479,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7460
7479
|
return result2;
|
|
7461
7480
|
}, "replyRenderer");
|
|
7462
7481
|
|
|
7463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7464
7483
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7465
7484
|
var NO_RULES = "no rules";
|
|
7466
7485
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7553,7 +7572,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7553
7572
|
return { skip: why };
|
|
7554
7573
|
}, "replyTo");
|
|
7555
7574
|
|
|
7556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7557
7576
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7558
7577
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7559
7578
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7630,7 +7649,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7630
7649
|
};
|
|
7631
7650
|
}, "startSync");
|
|
7632
7651
|
|
|
7633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7634
7653
|
var FIRST_FETCH_MS = 6e4;
|
|
7635
7654
|
var DAY_MS = 864e5;
|
|
7636
7655
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7684,7 +7703,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7684
7703
|
};
|
|
7685
7704
|
}, "memberFetches");
|
|
7686
7705
|
|
|
7687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7688
7707
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7689
7708
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7690
7709
|
if (context.format === "pretty") {
|
|
@@ -7717,7 +7736,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7717
7736
|
return context;
|
|
7718
7737
|
}, "recordDiagnostics");
|
|
7719
7738
|
|
|
7720
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7721
7740
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7722
7741
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
7723
7742
|
var OUTDATED_CHECK_MS = 6e4;
|
|
@@ -7803,7 +7822,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7803
7822
|
};
|
|
7804
7823
|
}, "watchOutdated");
|
|
7805
7824
|
|
|
7806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7807
7826
|
var STEMS_EVERY_MS = 3e4;
|
|
7808
7827
|
var STEMS_SLICE_MS = 2e3;
|
|
7809
7828
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7843,7 +7862,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7843
7862
|
};
|
|
7844
7863
|
}, "stemFills");
|
|
7845
7864
|
|
|
7846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
7847
7866
|
import { styleText } from "node:util";
|
|
7848
7867
|
var TIME_WIDTH = 8;
|
|
7849
7868
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -8019,7 +8038,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
|
|
|
8019
8038
|
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
8020
8039
|
}, "editedAt");
|
|
8021
8040
|
|
|
8022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
8023
8042
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
8024
8043
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
8025
8044
|
kind: attachment.kind,
|
|
@@ -8115,7 +8134,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8115
8134
|
locale: messenger.app.locale
|
|
8116
8135
|
}), "viewOf");
|
|
8117
8136
|
|
|
8118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8119
8138
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8120
8139
|
value: value.value,
|
|
8121
8140
|
observed_at: value.observedAt,
|
|
@@ -8182,7 +8201,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8182
8201
|
}
|
|
8183
8202
|
}, "watchEventItem");
|
|
8184
8203
|
|
|
8185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8186
8205
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8187
8206
|
output: { entity: "watch_item" },
|
|
8188
8207
|
effects: REMOTE_READ,
|
|
@@ -8337,7 +8356,8 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8337
8356
|
}
|
|
8338
8357
|
}, "describe");
|
|
8339
8358
|
|
|
8340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8360
|
+
var CURRENT_EVERY_MS = 6e4;
|
|
8341
8361
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8342
8362
|
const command = annotate(new Command("serve"), {
|
|
8343
8363
|
output: { entity: "serve_summary" },
|
|
@@ -8360,9 +8380,18 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8360
8380
|
throw new CliError("validation_error", `${messenger.app.command} serve is already running for profile ${context.profile} (PID ${held.pid}, since ${held.startedAt})`);
|
|
8361
8381
|
}
|
|
8362
8382
|
let relaying;
|
|
8383
|
+
let current;
|
|
8384
|
+
const stamp = /* @__PURE__ */ __name(() => {
|
|
8385
|
+
try {
|
|
8386
|
+
markCurrent(path);
|
|
8387
|
+
} catch {
|
|
8388
|
+
}
|
|
8389
|
+
}, "stamp");
|
|
8363
8390
|
const onReady = /* @__PURE__ */ __name(() => {
|
|
8364
8391
|
const listening2 = { pid: process.pid, startedAt, version, listeningAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
8365
8392
|
holdLock(path, listening2);
|
|
8393
|
+
stamp();
|
|
8394
|
+
current ??= setInterval(stamp, CURRENT_EVERY_MS).unref();
|
|
8366
8395
|
note({
|
|
8367
8396
|
code: "listening",
|
|
8368
8397
|
text: `listening for profile ${context.profile}, catching up on what arrived while it was down`
|
|
@@ -8483,6 +8512,10 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8483
8512
|
}, "connected")
|
|
8484
8513
|
});
|
|
8485
8514
|
} finally {
|
|
8515
|
+
if (current) {
|
|
8516
|
+
clearInterval(current);
|
|
8517
|
+
stamp();
|
|
8518
|
+
}
|
|
8486
8519
|
watch.stop();
|
|
8487
8520
|
await relaying;
|
|
8488
8521
|
await relay?.close();
|
|
@@ -8623,7 +8656,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8623
8656
|
};
|
|
8624
8657
|
}, "tasking");
|
|
8625
8658
|
|
|
8626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8627
8660
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8628
8661
|
var PATH = "store tables list";
|
|
8629
8662
|
var STORE_TABLES_QUERY = {
|
|
@@ -8666,7 +8699,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8666
8699
|
return tables;
|
|
8667
8700
|
}, "storeTablesCommand");
|
|
8668
8701
|
|
|
8669
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.722.0_@wirecat+cli-base@0.128.0_commander@15.0.0_esbuild@0.28.2_typ_a55806ccf2eb39d6be3eaf4c54d1a60a/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8670
8703
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8671
8704
|
var WORD_INDEX = "message_words";
|
|
8672
8705
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8908,7 +8941,10 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
|
|
|
8908
8941
|
...schema.version > 0 ? SEARCH_INDEXES.map((index) => [index, indexIntegrity(database, index)]) : [],
|
|
8909
8942
|
...wordIndex ? [[WORD_INDEX, indexIntegrity(database, WORD_INDEX, 0)]] : [],
|
|
8910
8943
|
...stems ? [["message_stems", indexIntegrity(database, "message_stems", 0)]] : [],
|
|
8911
|
-
...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : []
|
|
8944
|
+
...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : [],
|
|
8945
|
+
...schema.version >= 68 ? [["crm_file_words", indexIntegrity(database, "crm_file_words", 0)]] : [],
|
|
8946
|
+
...schema.version >= 70 ? [["tracker_item_words", indexIntegrity(database, "tracker_item_words", 0)]] : [],
|
|
8947
|
+
...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
|
|
8912
8948
|
]);
|
|
8913
8949
|
const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
|
|
8914
8950
|
const { bavail, bsize } = statfsSync2(dirname3(path));
|
|
@@ -9076,7 +9112,7 @@ var reindexCommand = /* @__PURE__ */ __name((owner) => destroysNothing(annotate(
|
|
|
9076
9112
|
throw new CliError("validation_error", `the store is behind this build \u2014 \`${lineOf(this, "store migrate")}\` first`);
|
|
9077
9113
|
}
|
|
9078
9114
|
resetSearchIndex(database);
|
|
9079
|
-
const fileTexts = resetAttachmentWords(database);
|
|
9115
|
+
const fileTexts = resetAttachmentWords(database) + resetCrmFileWords(database) + resetTrackerItemWords(database) + resetContentPostWords(database);
|
|
9080
9116
|
const words = buildWordIndex(database, (note) => renderer.note(note));
|
|
9081
9117
|
return {
|
|
9082
9118
|
path,
|