@wirecat/zoom-cli 0.81.0 → 0.83.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 +2 -2
- package/contracts/wirecat.json +54 -54
- package/dist/answers.d.ts +56 -0
- package/dist/answers.d.ts.map +1 -1
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +1 -1
- package/dist/api.js.map +1 -1
- package/dist/bin/main.js +2 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/agent-3HDWEZ5M.js +47 -0
- package/dist/bundle/{all-profiles-3ASMN35R.js → all-profiles-RY2OMSDL.js} +12 -12
- package/dist/bundle/answer-policy-IFVXPPGW.js +131 -0
- package/dist/bundle/{anthropic-XXI53VNI.js → anthropic-36VPSF7B.js} +6 -6
- package/dist/bundle/{app-server-B7WLNZNQ.js → app-server-ZVJVUGB7.js} +79 -76
- package/dist/bundle/{bun-2FLR4IV4.js → bun-F4M4KCNA.js} +2 -2
- package/dist/bundle/{bun-sqlite-3NNHTOGM.js → bun-sqlite-IOPYIUA7.js} +7 -7
- package/dist/bundle/{chunk-L54I45OX.js → chunk-26TW5RZ6.js} +33 -317
- package/dist/bundle/{chunk-JK24A3RP.js → chunk-2DK5BBFF.js} +3 -3
- package/dist/bundle/{chunk-4VOCXLMJ.js → chunk-2IBKKVVZ.js} +6 -6
- package/dist/bundle/{chunk-WKNYNK7W.js → chunk-2S54TM4N.js} +4 -4
- package/dist/bundle/{chunk-WHXYPLUE.js → chunk-3AQHKXVR.js} +4 -4
- package/dist/bundle/{chunk-YISJJNXT.js → chunk-3CW2C7ZA.js} +3 -3
- package/dist/bundle/{chunk-77TJ3AJH.js → chunk-3KUEZK5Z.js} +3 -3
- package/dist/bundle/{chunk-NQGGTO3B.js → chunk-3PXUQFHX.js} +8 -8
- package/dist/bundle/{chunk-N5ROXGY4.js → chunk-3QN5KDFZ.js} +167 -167
- package/dist/bundle/{chunk-AWJQ6FAX.js → chunk-434YFJAE.js} +2 -2
- package/dist/bundle/{chunk-4BU3LRTB.js → chunk-575JMTDR.js} +19 -18
- package/dist/bundle/{chunk-NM5XMKWO.js → chunk-5B2LV4MS.js} +2 -1
- package/dist/bundle/{chunk-3M436OO2.js → chunk-5WL5RHOO.js} +7 -102
- package/dist/bundle/{chunk-PS7HQ5LQ.js → chunk-6C7ESL5N.js} +3 -3
- package/dist/bundle/{chunk-SRUAUMBL.js → chunk-6E4KLYNP.js} +12 -12
- package/dist/bundle/chunk-7JDXR75Q.js +465 -0
- package/dist/bundle/{chunk-L2ERFXB7.js → chunk-AK3H2C65.js} +40 -31
- package/dist/bundle/{chunk-OEQNP56V.js → chunk-AQ5RIOUE.js} +1 -1
- package/dist/bundle/{chunk-35FVYRH5.js → chunk-AQLUAQXJ.js} +37 -180
- package/dist/bundle/{chunk-EPASOAEI.js → chunk-ASTLGFTR.js} +284 -184
- package/dist/bundle/{chunk-YNWBRDBX.js → chunk-ATHBB7OU.js} +2 -2
- package/dist/bundle/{chunk-ZFRYFDZN.js → chunk-B2NM65RD.js} +14 -6
- package/dist/bundle/{chunk-VQTYJ6XH.js → chunk-B4KHDXJE.js} +3 -3
- package/dist/bundle/{chunk-G3DWMG7Y.js → chunk-BAFC7WNI.js} +4 -4
- package/dist/bundle/{chunk-2GNGR265.js → chunk-BBGJQMRI.js} +1 -1
- package/dist/bundle/{chunk-C4BBCSGK.js → chunk-BTLZYRIW.js} +6 -6
- package/dist/bundle/{chunk-T2BHIC37.js → chunk-BZDS2X6Y.js} +65 -65
- package/dist/bundle/{chunk-3UX4VJWD.js → chunk-C7JPYWYQ.js} +3 -4
- package/dist/bundle/{chunk-R4CXFYQN.js → chunk-CDQUW25G.js} +180 -38
- package/dist/bundle/{chunk-YJKXCINQ.js → chunk-CJWGJBHW.js} +274 -60
- package/dist/bundle/{chunk-F2J2FQUB.js → chunk-D7RCUODT.js} +9 -9
- package/dist/bundle/{chunk-AV2ZJ4WX.js → chunk-DNCLQPOM.js} +1 -1
- package/dist/bundle/{chunk-LGESUPKO.js → chunk-DQJECJUE.js} +25 -90
- package/dist/bundle/{chunk-MA4UJNUI.js → chunk-E4JQ3MCW.js} +12 -12
- package/dist/bundle/{chunk-GW2A2FJH.js → chunk-E4ODYLEK.js} +8 -8
- package/dist/bundle/{chunk-Q26UFIH4.js → chunk-EE45N67Q.js} +16 -3
- package/dist/bundle/{chunk-5SEBLX6B.js → chunk-EEEU4MKK.js} +12 -12
- package/dist/bundle/{chunk-YRDQ54G5.js → chunk-ESN3W2MZ.js} +24 -11
- package/dist/bundle/{chunk-M7OYEMLI.js → chunk-ETIZGA4P.js} +7 -7
- package/dist/bundle/{chunk-IVZACJ6X.js → chunk-F44QK6CK.js} +4 -4
- package/dist/bundle/{chunk-JKEMW6E4.js → chunk-FH2UFNH6.js} +2 -2
- package/dist/bundle/{chunk-XYQVVW4R.js → chunk-FTH6WGYO.js} +1 -1
- package/dist/bundle/chunk-FWACRG4X.js +160 -0
- package/dist/bundle/chunk-G5SZL7G2.js +150 -0
- package/dist/bundle/{chunk-GDRFVBCB.js → chunk-G6CHEFAG.js} +2 -2
- package/dist/bundle/{chunk-2ELGSNX3.js → chunk-GHJD7PE6.js} +170 -170
- package/dist/bundle/{chunk-LECMHK2F.js → chunk-GZ7WBU5Y.js} +1 -1
- package/dist/bundle/{chunk-4ZXJ4AZW.js → chunk-H6A4NWYJ.js} +322 -45
- package/dist/bundle/{chunk-D26K6756.js → chunk-HKLRI2LB.js} +6 -6
- package/dist/bundle/{chunk-R6HP2XKD.js → chunk-HMD4FZYY.js} +5 -5
- package/dist/bundle/{chunk-2Z7UOXFC.js → chunk-HO4JGD4Q.js} +1 -1
- package/dist/bundle/chunk-HUAHLO6N.js +29 -0
- package/dist/bundle/{chunk-UHMJSSQO.js → chunk-IANKXHSE.js} +1 -1
- package/dist/bundle/{chunk-QFK52FG6.js → chunk-IQZXFWFI.js} +3 -3
- package/dist/bundle/{chunk-GPRJXJC7.js → chunk-ISQ23VKV.js} +22 -1
- package/dist/bundle/{chunk-ZLYICF6A.js → chunk-JEH33ZCD.js} +4 -4
- package/dist/bundle/{chunk-IDUKCXL7.js → chunk-JUNQYWQ2.js} +13 -9
- package/dist/bundle/{chunk-337ALCXQ.js → chunk-JUXMVQWJ.js} +312 -153
- package/dist/bundle/{chunk-5EWYDHBH.js → chunk-KHQDWYCG.js} +2 -2
- package/dist/bundle/{chunk-FMMYBVCH.js → chunk-KYRYD4CR.js} +1 -1
- package/dist/bundle/chunk-LBGT6W4R.js +377 -0
- package/dist/bundle/{chunk-UUVWAVKN.js → chunk-LN7HRYTH.js} +3 -3
- package/dist/bundle/{chunk-NS3JWBDR.js → chunk-MEB7HBTM.js} +6 -6
- package/dist/bundle/{chunk-K7CTCDYX.js → chunk-MEEFWYX3.js} +6 -6
- package/dist/bundle/{chunk-BQBC2WIG.js → chunk-MNOAMJ6H.js} +1 -1
- package/dist/bundle/{chunk-Y7XJA4EW.js → chunk-MYHPXJDG.js} +4 -4
- package/dist/bundle/{chunk-7JWVPJIP.js → chunk-NGI37RFW.js} +10 -10
- package/dist/bundle/{chunk-437DLSB3.js → chunk-NZMWD7Y3.js} +17227 -13055
- package/dist/bundle/chunk-O6IECJRM.js +54 -0
- package/dist/bundle/{chunk-LVCCZI5A.js → chunk-OBWL3BUV.js} +39 -39
- package/dist/bundle/{chunk-GCAJW4SR.js → chunk-OEEWVKJX.js} +1 -1
- package/dist/bundle/chunk-OGTN2KVG.js +147 -0
- package/dist/bundle/{chunk-B2WBWKYN.js → chunk-OQYZ3W4K.js} +12 -12
- package/dist/bundle/{chunk-IFM4G4MT.js → chunk-P3ZCTYGW.js} +4 -4
- package/dist/bundle/{chunk-VAW7QGJA.js → chunk-PVEBAHFU.js} +3 -3
- package/dist/bundle/{chunk-IYNICUCC.js → chunk-R2B6PUVI.js} +4 -4
- package/dist/bundle/{chunk-D7CDHBDX.js → chunk-R6IA5UQB.js} +1 -1
- package/dist/bundle/{chunk-T7QPZYRZ.js → chunk-RLOH7RDN.js} +7 -7
- package/dist/bundle/{chunk-V3ZTAAJ6.js → chunk-RQ4AXSCJ.js} +8 -8
- package/dist/bundle/{chunk-4BXLHSXY.js → chunk-RYGTCRFZ.js} +2 -2
- package/dist/bundle/{chunk-XWKUGAG6.js → chunk-S4PXWIE4.js} +85 -87
- package/dist/bundle/{chunk-ZMAPXIGC.js → chunk-SDZZYZLL.js} +2 -2
- package/dist/bundle/{chunk-ZNAX7GUV.js → chunk-SHQAYUK6.js} +8 -8
- package/dist/bundle/{chunk-YUDVRFXN.js → chunk-T3W4V4A6.js} +1 -1
- package/dist/bundle/{chunk-F5ZAN7OC.js → chunk-TCT5D2X2.js} +1 -1
- package/dist/bundle/{chunk-EEBSKMEA.js → chunk-TDWPOSPR.js} +12 -12
- package/dist/bundle/{chunk-WIX6BFRF.js → chunk-TER3N27H.js} +8 -8
- package/dist/bundle/{chunk-UMPUY77T.js → chunk-TMTNP7QN.js} +10 -10
- package/dist/bundle/{chunk-BZXHJKKI.js → chunk-TO5UEWXR.js} +2 -2
- package/dist/bundle/{chunk-HVXOA4FO.js → chunk-TXDR6YSF.js} +1 -1
- package/dist/bundle/{chunk-CFQQTDSA.js → chunk-TY7NDMFY.js} +1 -1
- package/dist/bundle/{chunk-YIIGF643.js → chunk-UAWSINMC.js} +10 -10
- package/dist/bundle/{chunk-RQFRXUI4.js → chunk-UBH7YF3C.js} +200 -112
- package/dist/bundle/{chunk-MBBR7QHI.js → chunk-UEAE3JUU.js} +2641 -1150
- package/dist/bundle/{chunk-2RFWRJFK.js → chunk-UHR363OD.js} +14 -10
- package/dist/bundle/{chunk-RRYHLP3A.js → chunk-UM52A76S.js} +6 -6
- package/dist/bundle/chunk-URP6BTHN.js +624 -0
- package/dist/bundle/{chunk-HHQROAJQ.js → chunk-UWQEAA6S.js} +1 -1
- package/dist/bundle/{chunk-DMJLJVD3.js → chunk-VR7QZGRU.js} +7 -7
- package/dist/bundle/{chunk-QNG27PGH.js → chunk-VRH5PBSL.js} +21 -17
- package/dist/bundle/chunk-VTLQTQKY.js +1756 -0
- package/dist/bundle/{chunk-NX3BLISW.js → chunk-VTYNLTDW.js} +6 -6
- package/dist/bundle/{chunk-HIFPHARA.js → chunk-WY7XG6TE.js} +4 -4
- package/dist/bundle/{chunk-IBYGNUO7.js → chunk-XEOZTA3H.js} +1 -1
- package/dist/bundle/{chunk-4FSH7K6N.js → chunk-XH23ML2V.js} +2 -2
- package/dist/bundle/{chunk-VXD65V67.js → chunk-XYF76A26.js} +2224 -2288
- package/dist/bundle/{chunk-J5EHZBO5.js → chunk-ZDYJAEVB.js} +19 -3
- package/dist/bundle/{chunk-FXZPAGHT.js → chunk-ZJ63HDBT.js} +2 -2
- package/dist/bundle/{chunk-N62P5FY4.js → chunk-ZT4ZPUIO.js} +12 -12
- package/dist/bundle/{cli-WTGAGSXV.js → cli-JK6PQSSN.js} +133 -116
- package/dist/bundle/command-contract-F3QNBKPX.js +46 -0
- package/dist/bundle/{command-server-entry-47CAYN3E.js → command-server-entry-DJLGN62J.js} +36 -35
- package/dist/bundle/config-TYYMV3HV.js +118 -0
- package/dist/bundle/{decode-2G7QS5IQ.js → decode-ZZICNNFF.js} +6 -6
- package/dist/bundle/{dispatch-ZAP3KBVJ.js → dispatch-FKMIPCPQ.js} +9 -9
- package/dist/bundle/{dist-WY6R3WH7.js → dist-NQPF25XI.js} +52 -49
- package/dist/bundle/{echarts-YRRVLEX3.js → echarts-QMAA7HH5.js} +2 -2
- package/dist/bundle/{embed-B5H3OW2O.js → embed-T64EUKUI.js} +7 -7
- package/dist/bundle/{embedder-3O73SP6Y.js → embedder-ZEKISZXI.js} +10 -10
- package/dist/bundle/{failure-EYGW7JMC.js → failure-XTWBYI2A.js} +3 -3
- package/dist/bundle/first-run-ZFNY4RRH.js +29 -0
- package/dist/bundle/first-screen-LPGCHRHZ.js +47 -0
- package/dist/bundle/{folders-4CGFWM6H.js → folders-ROKVKSCT.js} +5 -5
- package/dist/bundle/{instructions-AG7SRWTR.js → instructions-4H7UREH2.js} +1 -1
- package/dist/bundle/{main-DOGY6FJP.js → main-GCK3VYAA.js} +27 -37
- package/dist/bundle/{mcp-YGOAUNC3.js → mcp-5HFPWC3W.js} +2 -2
- package/dist/bundle/meeting-combined-7HDPOUPB.js +28 -0
- package/dist/bundle/meeting-model-MVUW7UPQ.js +26 -0
- package/dist/bundle/{meeting-semantic-FOEBWV3P.js → meeting-semantic-IF633WGX.js} +8 -8
- package/dist/bundle/{meetings-PVE4C2NF.js → meetings-RY2AAPHV.js} +7 -7
- package/dist/bundle/{node-GJQYN4FT.js → node-P3PUHKYH.js} +2 -2
- package/dist/bundle/{node-sqlite-MLRYKVCQ.js → node-sqlite-ASAZJNHE.js} +8 -8
- package/dist/bundle/{oauth-AC55C6SG.js → oauth-4U3OCK3W.js} +8 -8
- package/dist/bundle/oauth-AJARLPSY.js +46 -0
- package/dist/bundle/{open-3LGTYP6M.js → open-SEJRY2ZI.js} +6 -6
- package/dist/bundle/openai-FZDSC2AA.js +28 -0
- package/dist/bundle/{output-file-FXMTTLOI.js → output-file-RYIOIXMD.js} +6 -6
- package/dist/bundle/{process-MEKCZMX3.js → process-AFIXYXWL.js} +1 -1
- package/dist/bundle/{program-E5BSSIGY.js → program-OYLVYA4Z.js} +186 -247
- package/dist/bundle/{prompt-AIA6QSZK.js → prompt-BCRD64F4.js} +6 -6
- package/dist/bundle/public-SVJILCNI.js +206 -0
- package/dist/bundle/{recognize-M57VNTEV.js → recognize-25ITJWGX.js} +5 -5
- package/dist/bundle/{remote-3OTENZ7Z.js → remote-5FBAJX7O.js} +11 -11
- package/dist/bundle/{rerank-P5WHDFDU.js → rerank-2HGWWORY.js} +8 -8
- package/dist/bundle/run-log-7HRF4Y47.js +145 -0
- package/dist/bundle/{serve-BRLC2QVV.js → serve-RL35MSJD.js} +10 -10
- package/dist/bundle/{server-25NF7DMS.js → server-QUSBWACP.js} +71 -68
- package/dist/bundle/server-SCK2SRDK.js +96 -0
- package/dist/bundle/{services-MJE43OGD.js → services-BGRIQNDC.js} +66 -60
- package/dist/bundle/{speech-4AVCWTQH.js → speech-4W3ZMTFK.js} +25 -25
- package/dist/bundle/{sqlite-runtime-U4TQXWMC.js → sqlite-runtime-K3KLRZCV.js} +7 -7
- package/dist/bundle/{state-GNUGVMY7.js → state-GYL4C74G.js} +7 -7
- package/dist/bundle/{store-KBFZVQWF.js → store-27UQMNEO.js} +28 -26
- package/dist/bundle/{store-MHVBFUBB.js → store-NLYH5SQX.js} +64 -46
- package/dist/bundle/store-connection-CZILWRSR.js +112 -0
- package/dist/bundle/store-maintenance-command-Z3QLNSXJ.js +84 -0
- package/dist/bundle/{streaming-6F7AFEHD.js → streaming-73EKEGPF.js} +7 -7
- package/dist/bundle/surface-CV3C4RV2.js +82 -0
- package/dist/bundle/tokens-PY3S22LY.js +27 -0
- package/dist/bundle/zm.js +9 -9
- package/dist/bundle/{zoom-app-YTGOZ2FS.js → zoom-app-4F4YY4OI.js} +11 -9
- package/dist/commands.d.ts +1 -8
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +3 -33
- package/dist/commands.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +2 -12
- package/dist/program-bindings.js.map +1 -1
- package/dist/program.d.ts +3 -5
- package/dist/program.d.ts.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +6 -1
- package/dist/run.js.map +1 -1
- package/dist/setup-commands.d.ts +5 -14
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +7 -142
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +20 -44
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +95 -308
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.js +1 -1
- package/dist/zoom-app.js.map +1 -1
- package/dist/zoom-session.d.ts +6 -0
- package/dist/zoom-session.d.ts.map +1 -0
- package/dist/zoom-session.js +72 -0
- package/dist/zoom-session.js.map +1 -0
- package/package.json +3 -3
- package/skills/zoom-cli/references/setup.md +2 -2
- package/dist/bundle/agent-VYAJCJLE.js +0 -45
- package/dist/bundle/answer-policy-PTH4F2DW.js +0 -129
- package/dist/bundle/chunk-46EF6P2J.js +0 -72
- package/dist/bundle/chunk-4B335BCJ.js +0 -330
- package/dist/bundle/chunk-EWEQ7AXL.js +0 -719
- package/dist/bundle/chunk-FXCR4DGU.js +0 -37
- package/dist/bundle/chunk-KZ3B6HW5.js +0 -31
- package/dist/bundle/chunk-TI4WJOEX.js +0 -789
- package/dist/bundle/chunk-UPR2S5IE.js +0 -773
- package/dist/bundle/command-contract-3IKVWPDL.js +0 -45
- package/dist/bundle/config-ZOGOKGTU.js +0 -116
- package/dist/bundle/first-run-MPKMDEMA.js +0 -29
- package/dist/bundle/first-screen-AIAAC3KF.js +0 -45
- package/dist/bundle/meeting-combined-YKPKTKGA.js +0 -26
- package/dist/bundle/meeting-model-HTXSGHNM.js +0 -26
- package/dist/bundle/openai-E2MSLVIX.js +0 -28
- package/dist/bundle/run-log-EOQ4EQDS.js +0 -143
- package/dist/bundle/server-EW2RL2EL.js +0 -93
- package/dist/bundle/store-connection-SKRUAI4L.js +0 -109
- package/dist/bundle/store-maintenance-command-G6EXJSHJ.js +0 -81
- package/dist/bundle/surface-DWEWB5RG.js +0 -79
- package/dist/bundle/tokens-BB4MQBLH.js +0 -25
- package/dist/login.d.ts +0 -16
- package/dist/login.d.ts.map +0 -1
- package/dist/login.js +0 -98
- package/dist/login.js.map +0 -1
- /package/dist/bundle/{chunk-7O7XM37N.js → chunk-7ECP5ZQR.js} +0 -0
|
@@ -2,56 +2,60 @@ 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-JUNQYWQ2.js";
|
|
6
6
|
import {
|
|
7
|
-
answerOf,
|
|
8
7
|
messengerContext
|
|
9
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AQLUAQXJ.js";
|
|
10
9
|
import {
|
|
11
10
|
chatEventAnswer,
|
|
12
11
|
memberAnswer,
|
|
13
12
|
pollVoteAnswer
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TER3N27H.js";
|
|
15
14
|
import {
|
|
16
15
|
serveRelay
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ETIZGA4P.js";
|
|
18
17
|
import {
|
|
19
18
|
holdLock,
|
|
20
19
|
lockPath,
|
|
20
|
+
markCurrent,
|
|
21
21
|
releaseLock,
|
|
22
22
|
servingProfiles,
|
|
23
23
|
takeLock
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EE45N67Q.js";
|
|
25
25
|
import {
|
|
26
26
|
FETCHING,
|
|
27
27
|
RULES_VERSION,
|
|
28
|
+
answerOf,
|
|
28
29
|
applyTaskRulesOnArrival,
|
|
30
|
+
inside,
|
|
29
31
|
newSendId,
|
|
30
32
|
onlineDeps,
|
|
31
33
|
openRequestTask,
|
|
32
34
|
patiently,
|
|
35
|
+
realPathOf,
|
|
33
36
|
refuseLockedOutput,
|
|
37
|
+
refusedPlace,
|
|
34
38
|
senderIsMe,
|
|
35
39
|
servicesFor,
|
|
36
40
|
syncsOneChat
|
|
37
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-UEAE3JUU.js";
|
|
38
42
|
import {
|
|
39
43
|
embeddingKeys,
|
|
40
44
|
endpointKeyName,
|
|
41
45
|
modelGateway
|
|
42
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-6E4KLYNP.js";
|
|
43
47
|
import {
|
|
44
48
|
withTimeLimit
|
|
45
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-5B2LV4MS.js";
|
|
46
50
|
import {
|
|
47
51
|
capability,
|
|
48
52
|
queryTerms,
|
|
49
53
|
typedQuery,
|
|
50
54
|
withQuery
|
|
51
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-VRH5PBSL.js";
|
|
52
56
|
import {
|
|
53
57
|
renderMessages
|
|
54
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-XH23ML2V.js";
|
|
55
59
|
import {
|
|
56
60
|
QUICK_HEALTH_CHECKS,
|
|
57
61
|
fts5Tables,
|
|
@@ -59,7 +63,7 @@ import {
|
|
|
59
63
|
lossUnknown,
|
|
60
64
|
storeDamageReport,
|
|
61
65
|
storeHealth
|
|
62
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-GHJD7PE6.js";
|
|
63
67
|
import {
|
|
64
68
|
Command,
|
|
65
69
|
LOCAL_READ,
|
|
@@ -85,19 +89,19 @@ import {
|
|
|
85
89
|
snakeKeys,
|
|
86
90
|
storeTable,
|
|
87
91
|
withoutProviderRefs
|
|
88
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-ASTLGFTR.js";
|
|
89
93
|
import {
|
|
90
94
|
modelTarget
|
|
91
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-P3ZCTYGW.js";
|
|
92
96
|
import {
|
|
93
97
|
holdersOf
|
|
94
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-T3W4V4A6.js";
|
|
95
99
|
import {
|
|
96
100
|
levelFor
|
|
97
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-RQ4AXSCJ.js";
|
|
98
102
|
import {
|
|
99
103
|
readSecret
|
|
100
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-PVEBAHFU.js";
|
|
101
105
|
import {
|
|
102
106
|
CORPORA,
|
|
103
107
|
MIGRATIONS,
|
|
@@ -135,37 +139,37 @@ import {
|
|
|
135
139
|
storeClients,
|
|
136
140
|
storeContents,
|
|
137
141
|
vectorIndexCounts
|
|
138
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-NZMWD7Y3.js";
|
|
139
143
|
import {
|
|
140
144
|
readDamageMark,
|
|
141
145
|
readHealthMark,
|
|
142
146
|
readJournalMark,
|
|
143
147
|
recordDeepCheck
|
|
144
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-URP6BTHN.js";
|
|
145
149
|
import {
|
|
146
150
|
currentRun
|
|
147
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-HKLRI2LB.js";
|
|
148
152
|
import {
|
|
149
153
|
failureKey,
|
|
150
154
|
isStoreDamage
|
|
151
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-B2NM65RD.js";
|
|
152
156
|
import {
|
|
153
157
|
formatLocator,
|
|
154
158
|
parseLocator
|
|
155
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-7JDXR75Q.js";
|
|
156
160
|
import {
|
|
157
161
|
storePath
|
|
158
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-FH2UFNH6.js";
|
|
159
163
|
import {
|
|
160
164
|
openCache
|
|
161
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-MEB7HBTM.js";
|
|
162
166
|
import {
|
|
163
167
|
queryFieldsOf
|
|
164
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-UAWSINMC.js";
|
|
165
169
|
import {
|
|
166
170
|
resolvePaths,
|
|
167
171
|
writeSecurely
|
|
168
|
-
} from "./chunk-
|
|
172
|
+
} from "./chunk-3QN5KDFZ.js";
|
|
169
173
|
import {
|
|
170
174
|
array,
|
|
171
175
|
boolean,
|
|
@@ -186,10 +190,10 @@ import {
|
|
|
186
190
|
string,
|
|
187
191
|
transform,
|
|
188
192
|
trim
|
|
189
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-ESN3W2MZ.js";
|
|
190
194
|
import {
|
|
191
195
|
CliError
|
|
192
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-IANKXHSE.js";
|
|
193
197
|
import {
|
|
194
198
|
__commonJS,
|
|
195
199
|
__name,
|
|
@@ -264,9 +268,9 @@ var require_liquid_node = __commonJS({
|
|
|
264
268
|
__name(isIterator, "isIterator");
|
|
265
269
|
function promisify(fn) {
|
|
266
270
|
return function(...args) {
|
|
267
|
-
return new Promise((
|
|
271
|
+
return new Promise((resolve4, reject2) => {
|
|
268
272
|
fn(...args, (err, result2) => {
|
|
269
|
-
err ? reject2(err) :
|
|
273
|
+
err ? reject2(err) : resolve4(result2);
|
|
270
274
|
});
|
|
271
275
|
});
|
|
272
276
|
};
|
|
@@ -1856,12 +1860,12 @@ var require_liquid_node = __commonJS({
|
|
|
1856
1860
|
return fs$1.readFileSync(filepath, "utf8");
|
|
1857
1861
|
}
|
|
1858
1862
|
__name(readFileSync6, "readFileSync");
|
|
1859
|
-
function
|
|
1863
|
+
function resolve3(root, file2, ext) {
|
|
1860
1864
|
if (!path.extname(file2))
|
|
1861
1865
|
file2 += ext;
|
|
1862
1866
|
return path.resolve(root, file2);
|
|
1863
1867
|
}
|
|
1864
|
-
__name(
|
|
1868
|
+
__name(resolve3, "resolve");
|
|
1865
1869
|
function fallback(file2) {
|
|
1866
1870
|
try {
|
|
1867
1871
|
return requireResolve(file2);
|
|
@@ -1869,10 +1873,10 @@ var require_liquid_node = __commonJS({
|
|
|
1869
1873
|
}
|
|
1870
1874
|
}
|
|
1871
1875
|
__name(fallback, "fallback");
|
|
1872
|
-
function
|
|
1876
|
+
function dirname5(filepath) {
|
|
1873
1877
|
return path.dirname(filepath);
|
|
1874
1878
|
}
|
|
1875
|
-
__name(
|
|
1879
|
+
__name(dirname5, "dirname");
|
|
1876
1880
|
var realpathAsync = promisify(fs$1.realpath);
|
|
1877
1881
|
async function contains(root, file2) {
|
|
1878
1882
|
try {
|
|
@@ -1902,9 +1906,9 @@ var require_liquid_node = __commonJS({
|
|
|
1902
1906
|
readFile,
|
|
1903
1907
|
existsSync: existsSync11,
|
|
1904
1908
|
readFileSync: readFileSync6,
|
|
1905
|
-
resolve:
|
|
1909
|
+
resolve: resolve3,
|
|
1906
1910
|
fallback,
|
|
1907
|
-
dirname:
|
|
1911
|
+
dirname: dirname5,
|
|
1908
1912
|
contains,
|
|
1909
1913
|
containsSync,
|
|
1910
1914
|
sep: path.sep
|
|
@@ -3629,7 +3633,7 @@ var require_liquid_node = __commonJS({
|
|
|
3629
3633
|
uri_escape,
|
|
3630
3634
|
slugify
|
|
3631
3635
|
});
|
|
3632
|
-
var
|
|
3636
|
+
var join7 = argumentsToValue(function(v, arg) {
|
|
3633
3637
|
const array2 = toArray(v);
|
|
3634
3638
|
const sep = isNil(arg) ? " " : stringify(arg);
|
|
3635
3639
|
let outputSize = sep.length * Math.max(array2.length - 1, 0);
|
|
@@ -3905,7 +3909,7 @@ var require_liquid_node = __commonJS({
|
|
|
3905
3909
|
__name(sample, "sample");
|
|
3906
3910
|
var arrayFilters = /* @__PURE__ */ Object.freeze({
|
|
3907
3911
|
__proto__: null,
|
|
3908
|
-
join:
|
|
3912
|
+
join: join7,
|
|
3909
3913
|
last,
|
|
3910
3914
|
first,
|
|
3911
3915
|
reverse,
|
|
@@ -5529,11 +5533,11 @@ var require_liquid_node = __commonJS({
|
|
|
5529
5533
|
}
|
|
5530
5534
|
});
|
|
5531
5535
|
|
|
5532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5536
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5533
5537
|
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";
|
|
5534
|
-
import { dirname as
|
|
5538
|
+
import { dirname as dirname4, resolve as resolve2 } from "node:path";
|
|
5535
5539
|
|
|
5536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5540
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5537
5541
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5538
5542
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5539
5543
|
import { Transform } from "node:stream";
|
|
@@ -5545,7 +5549,7 @@ var NONCE = 12;
|
|
|
5545
5549
|
var TAG = 16;
|
|
5546
5550
|
var HEADER = MAGIC.length + 3 + SALT + NONCE;
|
|
5547
5551
|
var COST = { log2N: 17, r: 8, p: 1 };
|
|
5548
|
-
var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((
|
|
5552
|
+
var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((resolve3, reject) => scrypt(password, salt, 32, { N: 2 ** log2N, r, p, maxmem: 2 * 128 * r * 2 ** log2N }, (error, key) => error ? reject(error) : resolve3(key))), "keyOf");
|
|
5549
5553
|
var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
|
|
5550
5554
|
refuseEmpty(password);
|
|
5551
5555
|
const salt = randomBytes(SALT);
|
|
@@ -5640,7 +5644,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5640
5644
|
renameSync(pending, to);
|
|
5641
5645
|
}, "unsealFile");
|
|
5642
5646
|
|
|
5643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5647
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5644
5648
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5645
5649
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5646
5650
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5664,7 +5668,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5664
5668
|
};
|
|
5665
5669
|
}, "compatibilityOf");
|
|
5666
5670
|
|
|
5667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5671
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5668
5672
|
import { createHash as createHash2 } from "node:crypto";
|
|
5669
5673
|
var COPY_MARK = "__repair_";
|
|
5670
5674
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5918,19 +5922,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5918
5922
|
return found;
|
|
5919
5923
|
}, "deleteCopy");
|
|
5920
5924
|
|
|
5921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5925
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/path-options.js
|
|
5926
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
5927
|
+
var PATH_NAME = /^([a-z]+-)*(file|path|dir|directory|folder)s?$/;
|
|
5928
|
+
var PATH_PLACEHOLDER = /[<[]([a-z]+-)*(file|path|dir|directory|folder)s?(\.\.\.)?[>\]]/;
|
|
5929
|
+
var NOT_LOCAL = /* @__PURE__ */ new WeakMap();
|
|
5930
|
+
var IN_BACKUPS = /* @__PURE__ */ new WeakMap();
|
|
5931
|
+
var mark = /* @__PURE__ */ __name((marks, command, names) => {
|
|
5932
|
+
marks.set(command, /* @__PURE__ */ new Set([...marks.get(command) ?? [], ...names]));
|
|
5933
|
+
return command;
|
|
5934
|
+
}, "mark");
|
|
5935
|
+
var notLocalPaths = /* @__PURE__ */ __name((command, ...names) => mark(NOT_LOCAL, command, names), "notLocalPaths");
|
|
5936
|
+
var inStoreBackups = /* @__PURE__ */ __name((command, ...names) => mark(IN_BACKUPS, command, names), "inStoreBackups");
|
|
5937
|
+
var marked = /* @__PURE__ */ __name((marks, command, name) => {
|
|
5938
|
+
for (let at = command; at; at = at.parent)
|
|
5939
|
+
if (marks.get(at)?.has(name))
|
|
5940
|
+
return true;
|
|
5941
|
+
return false;
|
|
5942
|
+
}, "marked");
|
|
5943
|
+
var isLocalPathOption = /* @__PURE__ */ __name((command, option) => PATH_PLACEHOLDER.test(option.flags) && !marked(NOT_LOCAL, command, option.attributeName()), "isLocalPathOption");
|
|
5944
|
+
var isLocalPathArgument = /* @__PURE__ */ __name((command, argument) => PATH_NAME.test(argument.name()) && !marked(NOT_LOCAL, command, argument.name()), "isLocalPathArgument");
|
|
5945
|
+
var isNamed = /* @__PURE__ */ __name((value) => value !== "" && value !== "-" && !value.includes("://"), "isNamed");
|
|
5946
|
+
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one) => typeof one === "string" && isNamed(one)), "valuesOf");
|
|
5947
|
+
var localPathsOf = /* @__PURE__ */ __name((action) => {
|
|
5948
|
+
const found = [];
|
|
5949
|
+
for (let at = action; at; at = at.parent) {
|
|
5950
|
+
for (const option of at.options) {
|
|
5951
|
+
const key = option.attributeName();
|
|
5952
|
+
if (!isLocalPathOption(at, option) || at.getOptionValueSource(key) !== "cli")
|
|
5953
|
+
continue;
|
|
5954
|
+
const flag = option.long ?? option.flags;
|
|
5955
|
+
for (const value of valuesOf(at.getOptionValue(key)))
|
|
5956
|
+
found.push({ flag, value, inBackups: marked(IN_BACKUPS, at, key) });
|
|
5957
|
+
}
|
|
5958
|
+
}
|
|
5959
|
+
action.registeredArguments.forEach((argument, index) => {
|
|
5960
|
+
const value = action.processedArgs[index];
|
|
5961
|
+
if (!isLocalPathArgument(action, argument) || value === argument.defaultValue)
|
|
5962
|
+
return;
|
|
5963
|
+
for (const one of valuesOf(value))
|
|
5964
|
+
found.push({ flag: `<${argument.name()}>`, value: one, inBackups: marked(IN_BACKUPS, action, argument.name()) });
|
|
5965
|
+
});
|
|
5966
|
+
return found;
|
|
5967
|
+
}, "localPathsOf");
|
|
5968
|
+
var refuseAgentPaths = /* @__PURE__ */ __name((action, app, env) => {
|
|
5969
|
+
const backups = join(dirname(resolve(storePath(env))), "backups");
|
|
5970
|
+
for (const { flag, value, inBackups } of localPathsOf(action)) {
|
|
5971
|
+
if (inBackups && inside(realPathOf(value), realPathOf(backups)))
|
|
5972
|
+
continue;
|
|
5973
|
+
if (refusedPlace(value, app, env))
|
|
5974
|
+
throw new CliError("permission_error", `${flag} ${value}: an agent's call reads and writes no credential folder, no folder of a WireCat tool and not the message store \u2014 the owner runs it in a terminal`, { param: flag, sent: false });
|
|
5975
|
+
}
|
|
5976
|
+
}, "refuseAgentPaths");
|
|
5977
|
+
var absoluteFrom = /* @__PURE__ */ __name((cwd, value) => {
|
|
5978
|
+
if (Array.isArray(value))
|
|
5979
|
+
return value.map((one) => absoluteFrom(cwd, one));
|
|
5980
|
+
if (typeof value !== "string" || !isNamed(value) || isAbsolute(value))
|
|
5981
|
+
return value;
|
|
5982
|
+
return resolve(cwd, value);
|
|
5983
|
+
}, "absoluteFrom");
|
|
5984
|
+
|
|
5985
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5922
5986
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5923
5987
|
|
|
5924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5988
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5925
5989
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5926
5990
|
|
|
5927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5991
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5928
5992
|
import { execFileSync, spawn } from "node:child_process";
|
|
5929
5993
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5930
|
-
import { basename, dirname, join } from "node:path";
|
|
5994
|
+
import { basename, dirname as dirname2, join as join2 } from "node:path";
|
|
5931
5995
|
import { Transform as Transform2 } from "node:stream";
|
|
5932
5996
|
|
|
5933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5997
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5934
5998
|
var REFILL_MARGIN_MS = 864e5;
|
|
5935
5999
|
var TIME_KEYS = 1e12;
|
|
5936
6000
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -6010,7 +6074,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
6010
6074
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6011
6075
|
}, "forgetMail");
|
|
6012
6076
|
|
|
6013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6077
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
6014
6078
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6015
6079
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6016
6080
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6086,8 +6150,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
|
|
|
6086
6150
|
return () => rmSync2(lock, { force: true });
|
|
6087
6151
|
}, "takeRecoverLock");
|
|
6088
6152
|
var storeHolders = /* @__PURE__ */ __name((path) => {
|
|
6089
|
-
const folder = realpathSync(
|
|
6090
|
-
const files = STORE_PARTS.map((suffix) =>
|
|
6153
|
+
const folder = realpathSync(dirname2(path));
|
|
6154
|
+
const files = STORE_PARTS.map((suffix) => join2(folder, `${basename(path)}${suffix}`));
|
|
6091
6155
|
const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
|
|
6092
6156
|
const recovering = runningRecovery(path);
|
|
6093
6157
|
const pids = holdersOf(wanted);
|
|
@@ -6230,7 +6294,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
|
|
|
6230
6294
|
}
|
|
6231
6295
|
return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
|
|
6232
6296
|
}, "placeLostRows");
|
|
6233
|
-
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((
|
|
6297
|
+
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve3, reject) => {
|
|
6234
6298
|
const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
|
|
6235
6299
|
stdio: ["ignore", "pipe", "pipe"]
|
|
6236
6300
|
});
|
|
@@ -6267,7 +6331,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
|
|
|
6267
6331
|
if (readerCode !== 0)
|
|
6268
6332
|
reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
|
|
6269
6333
|
else
|
|
6270
|
-
|
|
6334
|
+
resolve3({ errors, read });
|
|
6271
6335
|
}, "exited");
|
|
6272
6336
|
reader.on("error", reject);
|
|
6273
6337
|
writer.on("error", reject);
|
|
@@ -6403,7 +6467,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
|
|
|
6403
6467
|
try {
|
|
6404
6468
|
refuseInUse(path);
|
|
6405
6469
|
const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
|
|
6406
|
-
const { bavail, bsize } = statfsSync(
|
|
6470
|
+
const { bavail, bsize } = statfsSync(dirname2(path));
|
|
6407
6471
|
if (Number(bavail) * Number(bsize) < bytes * 1.2)
|
|
6408
6472
|
throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
|
|
6409
6473
|
return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
|
|
@@ -6541,7 +6605,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6541
6605
|
}
|
|
6542
6606
|
}, "recoverLocked");
|
|
6543
6607
|
|
|
6544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6608
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6545
6609
|
var COUNTED = [
|
|
6546
6610
|
"accounts",
|
|
6547
6611
|
"chats",
|
|
@@ -6576,7 +6640,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6576
6640
|
}
|
|
6577
6641
|
const journal = readJournalMark(path);
|
|
6578
6642
|
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
|
|
6579
|
-
const
|
|
6643
|
+
const mark2 = readDamageMark(path);
|
|
6580
6644
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
6581
6645
|
const inUse = storeHolders(path) ?? null;
|
|
6582
6646
|
const timers = activeTimers() ?? null;
|
|
@@ -6584,7 +6648,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6584
6648
|
const report = storeDamageReport({
|
|
6585
6649
|
health,
|
|
6586
6650
|
command,
|
|
6587
|
-
mark,
|
|
6651
|
+
mark: mark2,
|
|
6588
6652
|
journal,
|
|
6589
6653
|
lastOkAt: lastKnownGood,
|
|
6590
6654
|
holders: inUse,
|
|
@@ -6602,7 +6666,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6602
6666
|
invalidJson: health.invalidJson ?? [],
|
|
6603
6667
|
rows,
|
|
6604
6668
|
report,
|
|
6605
|
-
damageMark:
|
|
6669
|
+
damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
|
|
6606
6670
|
lastKnownGood,
|
|
6607
6671
|
inUse,
|
|
6608
6672
|
timers,
|
|
@@ -6635,12 +6699,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
|
|
|
6635
6699
|
}, "storeRecoveryRun");
|
|
6636
6700
|
var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
|
|
6637
6701
|
const from = since === null ? "from the start" : `from ${since} on`;
|
|
6638
|
-
const
|
|
6702
|
+
const marked2 = [
|
|
6639
6703
|
...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
|
|
6640
6704
|
...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
|
|
6641
6705
|
];
|
|
6642
6706
|
return [
|
|
6643
|
-
|
|
6707
|
+
marked2.length > 0 ? `marked as not fetched ${from}, so the next sync or serve fetches it again: ${marked2.join(", ")}` : `nothing held ${from} was marked as fetched, so there is nothing to fetch again`,
|
|
6644
6708
|
...chats.filter(({ provider }) => provider === "whatsapp").map(({ account }) => `whatsapp ${account}: WhatsApp cannot be asked for its chats, so only what the phone pushes while serve runs comes back`),
|
|
6645
6709
|
"notes, memories, tags and whatever else only this store held cannot be fetched again"
|
|
6646
6710
|
];
|
|
@@ -6697,7 +6761,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6697
6761
|
return recover;
|
|
6698
6762
|
}, "storeRecoverCommand");
|
|
6699
6763
|
|
|
6700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6764
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6701
6765
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6702
6766
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6703
6767
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6747,7 +6811,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
|
|
|
6747
6811
|
return app ? store.addCommand(storeRecoverCommand(app)) : store;
|
|
6748
6812
|
}, "sharedStoreCommand");
|
|
6749
6813
|
|
|
6750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6814
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6751
6815
|
var ENCRYPT_OPTION = [
|
|
6752
6816
|
"--encrypt",
|
|
6753
6817
|
"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"
|
|
@@ -6766,9 +6830,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6766
6830
|
return password;
|
|
6767
6831
|
}, "passwordOf");
|
|
6768
6832
|
|
|
6769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6833
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6770
6834
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6771
|
-
import { join as
|
|
6835
|
+
import { join as join3 } from "node:path";
|
|
6772
6836
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
6773
6837
|
var REPLY_MODELS = ["fill-only", "may-reword"];
|
|
6774
6838
|
var REPLY_KINDS = ["dialog", "group"];
|
|
@@ -6854,7 +6918,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
|
|
|
6854
6918
|
reply: { template: "", asReply: true },
|
|
6855
6919
|
limits: { perChat: "1/1d", perPerson: "1/1d" }
|
|
6856
6920
|
}), "defaultRule");
|
|
6857
|
-
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
6921
|
+
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
|
|
6858
6922
|
var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
|
|
6859
6923
|
var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
|
|
6860
6924
|
if (person !== null && audience.deny.people.includes(person))
|
|
@@ -6937,9 +7001,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6937
7001
|
}, "problem");
|
|
6938
7002
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6939
7003
|
|
|
6940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7004
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6941
7005
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6942
|
-
import { join as
|
|
7006
|
+
import { join as join4 } from "node:path";
|
|
6943
7007
|
var ANSWERED_KEPT = 1e3;
|
|
6944
7008
|
var times = record(string(), array(string()));
|
|
6945
7009
|
var stateFile = object({
|
|
@@ -6951,7 +7015,7 @@ var stateFile = object({
|
|
|
6951
7015
|
});
|
|
6952
7016
|
var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
|
|
6953
7017
|
var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
|
|
6954
|
-
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7018
|
+
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
|
|
6955
7019
|
var readRepliesState = /* @__PURE__ */ __name((path) => {
|
|
6956
7020
|
if (!existsSync6(path))
|
|
6957
7021
|
return emptyState();
|
|
@@ -6990,7 +7054,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6990
7054
|
}, "recordReply");
|
|
6991
7055
|
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");
|
|
6992
7056
|
|
|
6993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7057
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6994
7058
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6995
7059
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6996
7060
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7096,10 +7160,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7096
7160
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7097
7161
|
}, "filled");
|
|
7098
7162
|
|
|
7099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7163
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7100
7164
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7101
7165
|
|
|
7102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7166
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7103
7167
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7104
7168
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7105
7169
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7126,7 +7190,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7126
7190
|
return engine;
|
|
7127
7191
|
}, "safeLiquid");
|
|
7128
7192
|
|
|
7129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7193
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7130
7194
|
var TEMPLATE_LIMITS = {
|
|
7131
7195
|
parse: 32768,
|
|
7132
7196
|
renders: 2e3,
|
|
@@ -7265,7 +7329,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7265
7329
|
}
|
|
7266
7330
|
}, "renderReplyTemplate");
|
|
7267
7331
|
|
|
7268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7332
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7269
7333
|
var DRY_RUN_DAYS = 7;
|
|
7270
7334
|
var PAGE = 500;
|
|
7271
7335
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7379,7 +7443,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7379
7443
|
}
|
|
7380
7444
|
}, "storedSince");
|
|
7381
7445
|
|
|
7382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7446
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/models/purpose.js
|
|
7383
7447
|
var HOSTED = {
|
|
7384
7448
|
openai: "https://api.openai.com/v1",
|
|
7385
7449
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7400,14 +7464,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7400
7464
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7401
7465
|
}, "purposeModel");
|
|
7402
7466
|
|
|
7403
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7467
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7404
7468
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7405
|
-
import { join as
|
|
7469
|
+
import { join as join5 } from "node:path";
|
|
7406
7470
|
var shape = strictObject({
|
|
7407
7471
|
provider: nullable(pipe(string(), minLength(1))),
|
|
7408
7472
|
deniedChats: array(pipe(string(), minLength(1)))
|
|
7409
7473
|
});
|
|
7410
|
-
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7474
|
+
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
|
|
7411
7475
|
var readReplyConsent = /* @__PURE__ */ __name((path) => {
|
|
7412
7476
|
if (!existsSync7(path))
|
|
7413
7477
|
return { provider: null, deniedChats: [] };
|
|
@@ -7425,7 +7489,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7425
7489
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7426
7490
|
}, "mayModelReply");
|
|
7427
7491
|
|
|
7428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7492
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7429
7493
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7430
7494
|
ai: true
|
|
7431
7495
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7473,7 +7537,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7473
7537
|
return result2;
|
|
7474
7538
|
}, "replyRenderer");
|
|
7475
7539
|
|
|
7476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7540
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7477
7541
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7478
7542
|
var NO_RULES = "no rules";
|
|
7479
7543
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7566,7 +7630,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7566
7630
|
return { skip: why };
|
|
7567
7631
|
}, "replyTo");
|
|
7568
7632
|
|
|
7569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7633
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7570
7634
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7571
7635
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7572
7636
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7643,7 +7707,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7643
7707
|
};
|
|
7644
7708
|
}, "startSync");
|
|
7645
7709
|
|
|
7646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7710
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7647
7711
|
var FIRST_FETCH_MS = 6e4;
|
|
7648
7712
|
var DAY_MS = 864e5;
|
|
7649
7713
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7697,7 +7761,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7697
7761
|
};
|
|
7698
7762
|
}, "memberFetches");
|
|
7699
7763
|
|
|
7700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7764
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7701
7765
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7702
7766
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7703
7767
|
if (context.format === "pretty") {
|
|
@@ -7730,22 +7794,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7730
7794
|
return context;
|
|
7731
7795
|
}, "recordDiagnostics");
|
|
7732
7796
|
|
|
7733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7797
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7734
7798
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7735
|
-
import { dirname as
|
|
7799
|
+
import { dirname as dirname3, join as join6 } from "node:path";
|
|
7736
7800
|
var OUTDATED_CHECK_MS = 6e4;
|
|
7737
7801
|
var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
|
|
7738
7802
|
let dir;
|
|
7739
7803
|
try {
|
|
7740
|
-
dir =
|
|
7804
|
+
dir = dirname3(realpathSync2(script ?? ""));
|
|
7741
7805
|
} catch {
|
|
7742
7806
|
return void 0;
|
|
7743
7807
|
}
|
|
7744
7808
|
for (let up = 0; up < 8; up++) {
|
|
7745
|
-
const manifest =
|
|
7809
|
+
const manifest = join6(dir, "package.json");
|
|
7746
7810
|
if (existsSync8(manifest))
|
|
7747
7811
|
return installedVersion(dir) === running ? dir : void 0;
|
|
7748
|
-
const parent =
|
|
7812
|
+
const parent = dirname3(dir);
|
|
7749
7813
|
if (parent === dir)
|
|
7750
7814
|
return void 0;
|
|
7751
7815
|
dir = parent;
|
|
@@ -7754,7 +7818,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
|
|
|
7754
7818
|
}, "ownPackageRoot");
|
|
7755
7819
|
var installedVersion = /* @__PURE__ */ __name((root) => {
|
|
7756
7820
|
try {
|
|
7757
|
-
const { version } = JSON.parse(readFileSync5(
|
|
7821
|
+
const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
|
|
7758
7822
|
return typeof version === "string" ? version : void 0;
|
|
7759
7823
|
} catch {
|
|
7760
7824
|
return void 0;
|
|
@@ -7816,7 +7880,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7816
7880
|
};
|
|
7817
7881
|
}, "watchOutdated");
|
|
7818
7882
|
|
|
7819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7883
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7820
7884
|
var STEMS_EVERY_MS = 3e4;
|
|
7821
7885
|
var STEMS_SLICE_MS = 2e3;
|
|
7822
7886
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7856,7 +7920,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7856
7920
|
};
|
|
7857
7921
|
}, "stemFills");
|
|
7858
7922
|
|
|
7859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7923
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7860
7924
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7861
7925
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7862
7926
|
kind: attachment.kind,
|
|
@@ -7931,6 +7995,8 @@ var messageItem = /* @__PURE__ */ __name((message, reader) => {
|
|
|
7931
7995
|
thread: message.email.thread,
|
|
7932
7996
|
read: message.email.read,
|
|
7933
7997
|
flagged: message.email.flagged,
|
|
7998
|
+
mail_type: message.email.mailType,
|
|
7999
|
+
reach: message.email.reach,
|
|
7934
8000
|
sender_score: message.email.senderScore
|
|
7935
8001
|
},
|
|
7936
8002
|
provider_metadata: message.providerMetadata
|
|
@@ -7952,7 +8018,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
7952
8018
|
locale: messenger.app.locale
|
|
7953
8019
|
}), "viewOf");
|
|
7954
8020
|
|
|
7955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8021
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
7956
8022
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
7957
8023
|
value: value.value,
|
|
7958
8024
|
observed_at: value.observedAt,
|
|
@@ -8019,7 +8085,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8019
8085
|
}
|
|
8020
8086
|
}, "watchEventItem");
|
|
8021
8087
|
|
|
8022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8088
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8023
8089
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8024
8090
|
output: { entity: "watch_item" },
|
|
8025
8091
|
effects: REMOTE_READ,
|
|
@@ -8174,7 +8240,8 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8174
8240
|
}
|
|
8175
8241
|
}, "describe");
|
|
8176
8242
|
|
|
8177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8243
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8244
|
+
var CURRENT_EVERY_MS = 6e4;
|
|
8178
8245
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8179
8246
|
const command = annotate(new Command("serve"), {
|
|
8180
8247
|
output: { entity: "serve_summary" },
|
|
@@ -8197,9 +8264,18 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8197
8264
|
throw new CliError("validation_error", `${messenger.app.command} serve is already running for profile ${context.profile} (PID ${held.pid}, since ${held.startedAt})`);
|
|
8198
8265
|
}
|
|
8199
8266
|
let relaying;
|
|
8267
|
+
let current;
|
|
8268
|
+
const stamp = /* @__PURE__ */ __name(() => {
|
|
8269
|
+
try {
|
|
8270
|
+
markCurrent(path);
|
|
8271
|
+
} catch {
|
|
8272
|
+
}
|
|
8273
|
+
}, "stamp");
|
|
8200
8274
|
const onReady = /* @__PURE__ */ __name(() => {
|
|
8201
8275
|
const listening2 = { pid: process.pid, startedAt, version, listeningAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
8202
8276
|
holdLock(path, listening2);
|
|
8277
|
+
stamp();
|
|
8278
|
+
current ??= setInterval(stamp, CURRENT_EVERY_MS).unref();
|
|
8203
8279
|
note({
|
|
8204
8280
|
code: "listening",
|
|
8205
8281
|
text: `listening for profile ${context.profile}, catching up on what arrived while it was down`
|
|
@@ -8320,6 +8396,10 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8320
8396
|
}, "connected")
|
|
8321
8397
|
});
|
|
8322
8398
|
} finally {
|
|
8399
|
+
if (current) {
|
|
8400
|
+
clearInterval(current);
|
|
8401
|
+
stamp();
|
|
8402
|
+
}
|
|
8323
8403
|
watch.stop();
|
|
8324
8404
|
await relaying;
|
|
8325
8405
|
await relay?.close();
|
|
@@ -8460,7 +8540,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8460
8540
|
};
|
|
8461
8541
|
}, "tasking");
|
|
8462
8542
|
|
|
8463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8543
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8464
8544
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8465
8545
|
var PATH = "store tables list";
|
|
8466
8546
|
var STORE_TABLES_QUERY = {
|
|
@@ -8503,7 +8583,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8503
8583
|
return tables;
|
|
8504
8584
|
}, "storeTablesCommand");
|
|
8505
8585
|
|
|
8506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8586
|
+
// node_modules/.pnpm/@wirecat+cli-core@2.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_a82f624c57005d53c3f072e45c3a3a86/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8507
8587
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8508
8588
|
var WORD_INDEX = "message_words";
|
|
8509
8589
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8529,7 +8609,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
|
|
|
8529
8609
|
database.close();
|
|
8530
8610
|
}
|
|
8531
8611
|
}, "readingOnly");
|
|
8532
|
-
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...
|
|
8612
|
+
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
|
|
8533
8613
|
var fileSchema = /* @__PURE__ */ __name(async (path) => {
|
|
8534
8614
|
try {
|
|
8535
8615
|
return await readingOnly(path, (database) => fileSchemaOf(database).version);
|
|
@@ -8548,7 +8628,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8548
8628
|
...version ? { version } : {},
|
|
8549
8629
|
schema: await fileSchema(path)
|
|
8550
8630
|
}) : null;
|
|
8551
|
-
const
|
|
8631
|
+
const mark2 = readDamageMark(path);
|
|
8552
8632
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
8553
8633
|
const health = {
|
|
8554
8634
|
checked: checked.checked,
|
|
@@ -8560,11 +8640,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8560
8640
|
...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
|
|
8561
8641
|
...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
|
|
8562
8642
|
};
|
|
8563
|
-
const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
|
|
8643
|
+
const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
|
|
8564
8644
|
const healthOf = {
|
|
8565
8645
|
health,
|
|
8566
8646
|
lastKnownGood,
|
|
8567
|
-
...
|
|
8647
|
+
...mark2 ? { damageMark: withoutInode(mark2) } : {},
|
|
8568
8648
|
...journal ? { journalMark: journal } : {},
|
|
8569
8649
|
...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
|
|
8570
8650
|
// `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
|
|
@@ -8751,7 +8831,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
|
|
|
8751
8831
|
...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
|
|
8752
8832
|
]);
|
|
8753
8833
|
const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
|
|
8754
|
-
const { bavail, bsize } = statfsSync2(
|
|
8834
|
+
const { bavail, bsize } = statfsSync2(dirname4(path));
|
|
8755
8835
|
const free = Number(bavail) * Number(bsize);
|
|
8756
8836
|
const behind = schema.version > 0 ? chatsBehind(database) : [];
|
|
8757
8837
|
const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
|
|
@@ -8836,8 +8916,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
|
|
|
8836
8916
|
held: row.held === null ? null : isoOf(row.held),
|
|
8837
8917
|
refreshed: isoOf(row.refreshed)
|
|
8838
8918
|
})), "chatsBehind");
|
|
8839
|
-
var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").action(async function() {
|
|
8919
|
+
var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("migrate"), { output: { entity: "store_migration" }, effects: LOCAL_WRITE }).summary(`migrate an older ${archive(owner)}`).description("bring the store up to this build's schema, then normalize, index and stem the messages and notes stored before it").option("--no-backup", "migrate even when no rollback copy can be written; older tools then cannot open the store again").action(async function() {
|
|
8840
8920
|
const { renderer } = outputFor(this);
|
|
8921
|
+
const { backup = true } = this.opts();
|
|
8841
8922
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
8842
8923
|
if (!existsSync10(path)) {
|
|
8843
8924
|
result(this, { path, exists: false });
|
|
@@ -8846,11 +8927,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
|
|
|
8846
8927
|
}
|
|
8847
8928
|
const answer = await reading(path, (database) => {
|
|
8848
8929
|
const from = schemaOf(database).version;
|
|
8849
|
-
migrate(database, {
|
|
8930
|
+
const notice = migrate(database, {
|
|
8850
8931
|
command: owner.app.command,
|
|
8851
8932
|
version: owner.app.version,
|
|
8852
|
-
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
|
|
8933
|
+
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
|
|
8853
8934
|
});
|
|
8935
|
+
if (notice)
|
|
8936
|
+
renderer.warn(notice);
|
|
8854
8937
|
const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
|
|
8855
8938
|
const stemmed = buildStems(database, (note) => renderer.note(note));
|
|
8856
8939
|
const notes = buildNoteIndex(database, (note) => renderer.note(note));
|
|
@@ -8941,10 +9024,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
|
|
|
8941
9024
|
}
|
|
8942
9025
|
}, "vacuumInto");
|
|
8943
9026
|
var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
|
|
8944
|
-
var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })).description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
|
|
9027
|
+
var backupCommand = /* @__PURE__ */ __name(() => inStoreBackups(destroysNothing(annotate(new Command("backup"), { output: { entity: "store_backup" }, effects: LOCAL_WRITE })), "file").description("copy the store into a new file, while it is in use; never overwrites a file").argument("<file>", "the new file").option(...ENCRYPT_OPTION).action(async function(file2) {
|
|
8945
9028
|
const { encrypt } = this.opts();
|
|
8946
9029
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
8947
|
-
const target =
|
|
9030
|
+
const target = resolve2(file2);
|
|
8948
9031
|
const { app, env } = environmentOf(this);
|
|
8949
9032
|
if (app)
|
|
8950
9033
|
refuseLockedOutput(target, app, env ?? process.env, "<file>");
|
|
@@ -8981,8 +9064,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
|
|
|
8981
9064
|
}), "backupCommand");
|
|
8982
9065
|
var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"), { output: { entity: "store_decrypt" }, effects: LOCAL_WRITE }).description("open a file written with --encrypt into a new file; asks for its password").argument("<file>", "a file `store backup --encrypt` or `store export --encrypt` wrote").requiredOption("--output <file>", "the new file, readable only by you").action(async function(file2) {
|
|
8983
9066
|
const { output } = this.opts();
|
|
8984
|
-
const from =
|
|
8985
|
-
const to =
|
|
9067
|
+
const from = resolve2(file2);
|
|
9068
|
+
const to = resolve2(output);
|
|
8986
9069
|
if (!existsSync10(from))
|
|
8987
9070
|
throw new CliError("not_found", `no file at ${from}`);
|
|
8988
9071
|
if (!isSealed(from))
|
|
@@ -8992,16 +9075,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
|
|
|
8992
9075
|
await unsealFile(from, to, await passwordOf(this, { twice: false }));
|
|
8993
9076
|
result(this, { path: to, from, bytes: bytesOf2(to) });
|
|
8994
9077
|
}), "decryptCommand");
|
|
8995
|
-
var restoreCommand = /* @__PURE__ */ __name((owner) => grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })).summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
9078
|
+
var restoreCommand = /* @__PURE__ */ __name((owner) => inStoreBackups(grantsAuthority(annotate(new Command("restore"), { output: { entity: "store_restore" }, effects: LOCAL_WRITE })), "file").summary("restore a backup and keep the current store, or roll back a breaking upgrade").description("put a backup in place of the store; the store it replaces is kept beside it, never deleted. Given a rollback copy (backups/<store>-rollback-schema-<version>-<time>.db, kept for a day before an upgrade older tools cannot open), put its tables back in the store and return it to that version instead").argument("<file>", "a file `store backup` wrote, or a rollback copy; one written with --encrypt asks for its password").action(async function(file2) {
|
|
8996
9079
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
8997
|
-
const given =
|
|
9080
|
+
const given = resolve2(file2);
|
|
8998
9081
|
if (!existsSync10(given))
|
|
8999
9082
|
throw new CliError("not_found", `no file at ${given}`);
|
|
9000
9083
|
refuseWhileServing(this, owner);
|
|
9001
9084
|
if (!isSealed(given))
|
|
9002
9085
|
return restoreFrom(this, owner, given, given);
|
|
9003
9086
|
const opened = `${path}.unsealing-${process.pid}`;
|
|
9004
|
-
mkdirSync(
|
|
9087
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9005
9088
|
try {
|
|
9006
9089
|
await unsealFile(given, opened, await passwordOf(this, { twice: false }));
|
|
9007
9090
|
await restoreFrom(this, owner, opened, given);
|
|
@@ -9024,7 +9107,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
|
|
|
9024
9107
|
const waitMs = environmentOf(command).storeLockWaitMs;
|
|
9025
9108
|
await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
|
|
9026
9109
|
} else
|
|
9027
|
-
mkdirSync(
|
|
9110
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9028
9111
|
const incoming = `${path}.restoring-${stamp}`;
|
|
9029
9112
|
copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
|
|
9030
9113
|
chmodSync(incoming, 384);
|
|
@@ -9206,6 +9289,11 @@ export {
|
|
|
9206
9289
|
checkFor,
|
|
9207
9290
|
passes,
|
|
9208
9291
|
seal,
|
|
9292
|
+
notLocalPaths,
|
|
9293
|
+
isLocalPathOption,
|
|
9294
|
+
isLocalPathArgument,
|
|
9295
|
+
refuseAgentPaths,
|
|
9296
|
+
absoluteFrom,
|
|
9209
9297
|
storeRecoveryCheck,
|
|
9210
9298
|
storeRecoveryRun,
|
|
9211
9299
|
recoveryNotes,
|