@wirecat/amo-cli 0.3.0 → 0.5.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/CHANGELOG.md +52 -0
- package/README.md +8 -4
- package/contracts/wirecat.json +15 -14
- package/dist/amo/allow-list.d.ts +1 -1
- package/dist/amo/allow-list.d.ts.map +1 -1
- package/dist/amo/operation.d.ts +1 -1
- package/dist/amo/operation.d.ts.map +1 -1
- package/dist/bin/amo.js +2 -2
- package/dist/bundle/agent-EFMUK732.js +41 -0
- package/dist/bundle/{all-profiles-PPUN52SP.js → all-profiles-PIWUQWBA.js} +11 -11
- package/dist/bundle/amo.js +28 -28
- package/dist/bundle/{anthropic-RDNDT6ZP.js → anthropic-47CMXBPQ.js} +5 -5
- package/dist/bundle/{app-server-MMALJDBP.js → app-server-QRBQODF2.js} +70 -69
- package/dist/bundle/areas-QVHVU57Z.js +63 -0
- package/dist/bundle/{bun-Y4FRPURU.js → bun-OPDGMZZQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-7NXJGZCO.js → bun-sqlite-7I4X7CZW.js} +6 -6
- package/dist/bundle/{chunk-OMH3WP7F.js → chunk-2JHVQMVC.js} +1 -1
- package/dist/bundle/{chunk-MPXKBF37.js → chunk-2XBDILVW.js} +1 -1
- package/dist/bundle/{chunk-XI75EKLG.js → chunk-3DEQUYEG.js} +9 -9
- package/dist/bundle/{chunk-TWZF7VO6.js → chunk-3GX6KM2E.js} +1666 -163
- package/dist/bundle/{chunk-E2DLRLJ5.js → chunk-3HC5F3P7.js} +1 -1
- package/dist/bundle/{chunk-D6UPCAPD.js → chunk-3PYE55JY.js} +1 -1
- package/dist/bundle/{chunk-UM6SDFB6.js → chunk-3YM4B2GT.js} +1 -1
- package/dist/bundle/{chunk-JTFAG3BX.js → chunk-43OW5NTG.js} +6 -6
- package/dist/bundle/{chunk-ZIFEIJRK.js → chunk-43PMSR33.js} +13 -9
- package/dist/bundle/{chunk-5DPMNYQT.js → chunk-4N7PP76S.js} +1 -1
- package/dist/bundle/{chunk-XM2G62YF.js → chunk-4VN7RI4I.js} +5 -7
- package/dist/bundle/{chunk-5POLHHDZ.js → chunk-57HFPNMF.js} +8 -8
- package/dist/bundle/{chunk-CQ472K6W.js → chunk-5UTB3ADZ.js} +11 -11
- package/dist/bundle/{chunk-3NDMVXGS.js → chunk-633NQY2R.js} +3 -3
- package/dist/bundle/{chunk-VPBSZ4HQ.js → chunk-63N46DJU.js} +220 -234
- package/dist/bundle/{chunk-SJZ52MZE.js → chunk-6D4VWSJD.js} +6 -6
- package/dist/bundle/{chunk-Q2YVY7IR.js → chunk-6JTHXWPE.js} +3 -3
- package/dist/bundle/{chunk-QQT7WUR4.js → chunk-6QGUK3H7.js} +4 -4
- package/dist/bundle/{chunk-AYR6FIXN.js → chunk-6WS6GJ4V.js} +2 -2
- package/dist/bundle/{chunk-N4A6E2LL.js → chunk-7IR2G5XY.js} +16 -16
- package/dist/bundle/{chunk-7Z6NYSAN.js → chunk-7IWIFVXH.js} +4 -4
- package/dist/bundle/{chunk-LOSOWTAZ.js → chunk-ABX7BBS4.js} +6 -6
- package/dist/bundle/{chunk-3YOZTGZ6.js → chunk-ADTI5RUO.js} +6 -6
- package/dist/bundle/{chunk-QHA33ZS6.js → chunk-AKRIUNYP.js} +7 -7
- package/dist/bundle/{chunk-KZDBO2FT.js → chunk-BIKOE2IW.js} +7 -7
- package/dist/bundle/{chunk-VY27K2SH.js → chunk-BVVMIAQ6.js} +769 -692
- package/dist/bundle/{chunk-SBQ5MFHM.js → chunk-CGW5R4UD.js} +7 -7
- package/dist/bundle/{chunk-UZLT6VSP.js → chunk-D4NE7EON.js} +3 -3
- package/dist/bundle/{chunk-L2ZQDTDU.js → chunk-DNCLQPOM.js} +1 -1
- package/dist/bundle/{chunk-VFU25P57.js → chunk-DPV53EZC.js} +4 -4
- package/dist/bundle/{chunk-KEOKH2OZ.js → chunk-DQ6S5TFZ.js} +185 -114
- package/dist/bundle/{chunk-5RXH35ZA.js → chunk-DSJ6EAOA.js} +61 -61
- package/dist/bundle/{chunk-HQH4YPO5.js → chunk-DVZ75WZJ.js} +157 -35
- package/dist/bundle/{chunk-VEGNZPQU.js → chunk-EHK73OSW.js} +38 -24
- package/dist/bundle/{chunk-IEAPNTHT.js → chunk-FNV5HLHX.js} +17 -17
- package/dist/bundle/{chunk-FPDTIQOK.js → chunk-FV4GQNIK.js} +2 -2
- package/dist/bundle/{chunk-7USADF2W.js → chunk-G2TU5RYY.js} +6 -6
- package/dist/bundle/{chunk-IDQ7BNCZ.js → chunk-GDK7ETSB.js} +12 -12
- package/dist/bundle/{chunk-B4ITT55D.js → chunk-GGMAIIVE.js} +1 -1
- package/dist/bundle/{chunk-NJ2LJKNH.js → chunk-GLYWZQY4.js} +3 -3
- package/dist/bundle/{chunk-XDT74W5P.js → chunk-H4AFNENN.js} +34 -29
- package/dist/bundle/{chunk-2YEDK2XV.js → chunk-HOF7GQWW.js} +4 -4
- package/dist/bundle/{chunk-H34RBRS3.js → chunk-HSPEU6S7.js} +8 -8
- package/dist/bundle/{chunk-VJHOBOJR.js → chunk-IA7LLLEI.js} +3 -3
- package/dist/bundle/{chunk-YSOGGUK3.js → chunk-IB55P46L.js} +6 -6
- package/dist/bundle/{chunk-PFZ7WG2B.js → chunk-IG2TJQJ7.js} +3 -3
- package/dist/bundle/{chunk-CUZISGWH.js → chunk-JG6LCSEX.js} +13 -13
- package/dist/bundle/{chunk-MMOEAH5G.js → chunk-JLXXUEAM.js} +2 -2
- package/dist/bundle/{chunk-3RP57VDS.js → chunk-JXT6GY4V.js} +174 -62
- package/dist/bundle/{chunk-7SBAHYZW.js → chunk-K7YY6SXR.js} +19 -15
- package/dist/bundle/{chunk-TCDER3G7.js → chunk-KEKXERBE.js} +14883 -11912
- package/dist/bundle/{chunk-JZ2AITOE.js → chunk-KZ2FIDI3.js} +3 -3
- package/dist/bundle/{chunk-ILUREFWJ.js → chunk-KZN2BG3P.js} +8 -8
- package/dist/bundle/{chunk-L3JDQNBC.js → chunk-LKH3UKLO.js} +4 -4
- package/dist/bundle/{chunk-UA7C57IB.js → chunk-LZPKBN3C.js} +2 -2
- package/dist/bundle/{chunk-FI2TP6TY.js → chunk-M6VZXAJC.js} +3 -3
- package/dist/bundle/{chunk-7VSYOMEH.js → chunk-MDEPJZYJ.js} +2 -2
- package/dist/bundle/{chunk-WBWVBEHH.js → chunk-NB7EOAUZ.js} +8 -1
- package/dist/bundle/{chunk-LYRICHEK.js → chunk-NISH4UXM.js} +2 -2
- package/dist/bundle/{chunk-VD7HD25M.js → chunk-NSKMNIY6.js} +9 -9
- package/dist/bundle/chunk-PPSAWFJD.js +1293 -0
- package/dist/bundle/{chunk-7E6QSIRQ.js → chunk-Q7ICVP25.js} +1 -1
- package/dist/bundle/{chunk-BKTLAXUK.js → chunk-QFOP3KUP.js} +8 -8
- package/dist/bundle/{chunk-ORFLQGWH.js → chunk-R53XXHEI.js} +4 -4
- package/dist/bundle/{chunk-UOPP6ORQ.js → chunk-RIMPFMZE.js} +28 -179
- package/dist/bundle/{chunk-MYMBPQPQ.js → chunk-RN6RT5CB.js} +4 -4
- package/dist/bundle/{chunk-BYVDMPLX.js → chunk-RRTMPSQR.js} +2 -2
- package/dist/bundle/{chunk-R23DRW2T.js → chunk-S4ZHQMNM.js} +5 -5
- package/dist/bundle/{chunk-GCUFGDKE.js → chunk-S6JG4YUH.js} +2 -2
- package/dist/bundle/{chunk-W4KY5JF5.js → chunk-TAVI73RW.js} +2 -2
- package/dist/bundle/{chunk-KTLCQ7GC.js → chunk-TLG6ECZ2.js} +2 -2
- package/dist/bundle/{chunk-V3ZWYMXT.js → chunk-TXDR6YSF.js} +1 -1
- package/dist/bundle/{chunk-KKXF6TSS.js → chunk-TY7NDMFY.js} +1 -1
- package/dist/bundle/{chunk-YVO2YGML.js → chunk-U5RJJ2EC.js} +8 -8
- package/dist/bundle/{chunk-I4QCJZW7.js → chunk-UDSL3MUU.js} +8 -8
- package/dist/bundle/{chunk-SJYVKR54.js → chunk-V2CNGXWX.js} +37 -37
- package/dist/bundle/{chunk-L72UALL5.js → chunk-VB7FZOYX.js} +1 -1
- package/dist/bundle/{chunk-T6D34X5S.js → chunk-VZ5PPYDG.js} +1 -1
- package/dist/bundle/{chunk-FPIUFSWK.js → chunk-W5JRXIG6.js} +826 -1619
- package/dist/bundle/{chunk-ELJGALVX.js → chunk-WIHN3ELW.js} +19 -19
- package/dist/bundle/chunk-WOPVBRPV.js +29 -0
- package/dist/bundle/{chunk-4MVTSMWP.js → chunk-WUFX4TKA.js} +2 -2
- package/dist/bundle/{chunk-GKP7CKW2.js → chunk-WXJYMMEL.js} +6 -6
- package/dist/bundle/{chunk-UT3ODJMI.js → chunk-XCCU2E3Z.js} +4 -4
- package/dist/bundle/{chunk-EHULZEXQ.js → chunk-XEQQJBBO.js} +1 -1
- package/dist/bundle/{chunk-EKNP326Q.js → chunk-XUT7DSM5.js} +2 -2
- package/dist/bundle/{chunk-4EYPFFTN.js → chunk-YWDFYQOU.js} +2 -2
- package/dist/bundle/{chunk-IYUWVMGP.js → chunk-ZLUIRFJX.js} +37 -18
- package/dist/bundle/{cli-GAO7LDDA.js → cli-3NXOSENF.js} +104 -105
- package/dist/bundle/command-contract-LNSAV5LA.js +39 -0
- package/dist/bundle/{command-server-entry-BCDJP7XE.js → command-server-entry-4ZQPNUL4.js} +28 -28
- package/dist/bundle/{decode-OY2GR442.js → decode-K7U7X5EL.js} +5 -5
- package/dist/bundle/{dispatch-JWEJCBTF.js → dispatch-56FECRCU.js} +8 -8
- package/dist/bundle/{echarts-AHEPEA5P.js → echarts-O3TNDAXJ.js} +2 -2
- package/dist/bundle/{embed-RVSUV54Z.js → embed-SWLVG73O.js} +6 -6
- package/dist/bundle/{embedder-GRZXZUXR.js → embedder-EJN75BPV.js} +9 -9
- package/dist/bundle/{failure-DDCSR54L.js → failure-WDSX6H3B.js} +2 -2
- package/dist/bundle/{first-run-G3WI4DH4.js → first-run-WPGUUC4Z.js} +12 -12
- package/dist/bundle/first-screen-JMNEUQ46.js +40 -0
- package/dist/bundle/{instructions-NWQC5IP4.js → instructions-AMH5RWVJ.js} +1 -1
- package/dist/bundle/{mcp-KGWT6TGO.js → mcp-5HFPWC3W.js} +2 -2
- package/dist/bundle/meeting-combined-5TKG2RYD.js +24 -0
- package/dist/bundle/{meeting-model-I6T5HIZ5.js → meeting-model-YXXNETKC.js} +11 -11
- package/dist/bundle/{meeting-semantic-47UA5JBF.js → meeting-semantic-U7EUB3ET.js} +6 -6
- package/dist/bundle/{node-7VXN7F4B.js → node-EGMCBAO7.js} +2 -2
- package/dist/bundle/{node-sqlite-BSEON57L.js → node-sqlite-YVOGMDSP.js} +7 -7
- package/dist/bundle/{oauth-V6UAT4YD.js → oauth-2SNRBIJM.js} +7 -7
- package/dist/bundle/{open-7LVAY7ZU.js → open-ABCPY5IH.js} +5 -5
- package/dist/bundle/{openai-OIEH342H.js → openai-4D6PXJR7.js} +15 -15
- package/dist/bundle/{process-PTUCNLZ7.js → process-SGHEN6MQ.js} +1 -1
- package/dist/bundle/{program-S5WY5IZP.js → program-CBDQBZZ3.js} +1319 -1079
- package/dist/bundle/{prompt-7XWTEQ62.js → prompt-2QUK5QST.js} +5 -5
- package/dist/bundle/{recognize-HGIAJXDR.js → recognize-QMQSJRIH.js} +4 -4
- package/dist/bundle/{remote-X4SVEMHS.js → remote-U7TC2BLZ.js} +9 -9
- package/dist/bundle/{rerank-QWM3DQMU.js → rerank-5UPVXGVV.js} +7 -7
- package/dist/bundle/{serve-VVG3TXYT.js → serve-VX6GUM6J.js} +9 -9
- package/dist/bundle/{server-EHYK62BJ.js → server-FOPC6DJ3.js} +62 -61
- package/dist/bundle/server-OIVNOMVK.js +87 -0
- package/dist/bundle/source-HWS5SJIV.js +46 -0
- package/dist/bundle/{sqlite-runtime-MCKXDNYC.js → sqlite-runtime-77NKDEXN.js} +6 -6
- package/dist/bundle/{state-MYNYQJCT.js → state-X2HU6GB2.js} +6 -6
- package/dist/bundle/{store-B7O3F3QB.js → store-2U4U6KL4.js} +22 -22
- package/dist/bundle/{store-FPIU2546.js → store-3CHPHFP7.js} +30 -24
- package/dist/bundle/store-Z3747L5F.js +34 -0
- package/dist/bundle/store-maintenance-command-UOSZJTVP.js +74 -0
- package/dist/bundle/surface-MUT72QON.js +73 -0
- package/dist/bundle/writer-RBKQ64ZM.js +48 -0
- package/dist/commands/account.d.ts +3 -2
- package/dist/commands/account.d.ts.map +1 -1
- package/dist/commands/account.js +38 -77
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/crm-shared.d.ts.map +1 -1
- package/dist/commands/crm-shared.js +3 -1
- package/dist/commands/crm-shared.js.map +1 -1
- package/dist/commands/session.d.ts +0 -6
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +9 -34
- package/dist/commands/session.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +0 -2
- package/dist/program.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -2
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/skills/amo-cli/SKILL.md +6 -0
- package/dist/bundle/agent-FDNP27SW.js +0 -40
- package/dist/bundle/chunk-77FP6AWC.js +0 -1266
- package/dist/bundle/command-contract-RLIBGIDT.js +0 -39
- package/dist/bundle/first-screen-6MLCMW2U.js +0 -39
- package/dist/bundle/meeting-combined-SVTFVZNJ.js +0 -24
- package/dist/bundle/server-WRPTBVNW.js +0 -86
- package/dist/bundle/source-YISMYLBQ.js +0 -44
- package/dist/bundle/store-A7R2SZVD.js +0 -34
- package/dist/bundle/store-maintenance-command-D55FRTIK.js +0 -73
- package/dist/bundle/surface-3EX6IGHW.js +0 -72
- package/dist/bundle/writer-XDHZ54JD.js +0 -46
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
answerOf,
|
|
5
4
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-RIMPFMZE.js";
|
|
7
6
|
import {
|
|
8
7
|
chatEventAnswer,
|
|
9
8
|
memberAnswer,
|
|
10
9
|
pollVoteAnswer
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-U5RJJ2EC.js";
|
|
12
11
|
import {
|
|
13
12
|
serveRelay
|
|
14
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-43OW5NTG.js";
|
|
15
14
|
import {
|
|
16
15
|
FETCHING,
|
|
17
16
|
RULES_VERSION,
|
|
@@ -22,23 +21,27 @@ import {
|
|
|
22
21
|
onlineDeps,
|
|
23
22
|
openRequestTask,
|
|
24
23
|
patiently,
|
|
25
|
-
refuseLockedOutput,
|
|
26
24
|
senderIsMe,
|
|
27
25
|
servicesFor,
|
|
28
26
|
syncsOneChat,
|
|
29
27
|
withTimeLimit
|
|
30
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BVVMIAQ6.js";
|
|
31
29
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
answerOf,
|
|
31
|
+
inside,
|
|
32
|
+
newSendId,
|
|
33
|
+
realPathOf,
|
|
34
|
+
refuseLockedOutput,
|
|
35
|
+
refusedPlace
|
|
36
|
+
} from "./chunk-3GX6KM2E.js";
|
|
34
37
|
import {
|
|
35
38
|
capability
|
|
36
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-6WS6GJ4V.js";
|
|
37
40
|
import {
|
|
38
41
|
queryTerms,
|
|
39
42
|
typedQuery,
|
|
40
43
|
withQuery
|
|
41
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-K7YY6SXR.js";
|
|
42
45
|
import {
|
|
43
46
|
holdLock,
|
|
44
47
|
lockPath,
|
|
@@ -46,7 +49,7 @@ import {
|
|
|
46
49
|
releaseLock,
|
|
47
50
|
servingProfiles,
|
|
48
51
|
takeLock
|
|
49
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-GLYWZQY4.js";
|
|
50
53
|
import {
|
|
51
54
|
Command,
|
|
52
55
|
LOCAL_READ,
|
|
@@ -73,10 +76,10 @@ import {
|
|
|
73
76
|
snakeKeys,
|
|
74
77
|
storeTable,
|
|
75
78
|
withoutProviderRefs
|
|
76
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-63N46DJU.js";
|
|
77
80
|
import {
|
|
78
81
|
holdersOf
|
|
79
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-3YM4B2GT.js";
|
|
80
83
|
import {
|
|
81
84
|
QUICK_HEALTH_CHECKS,
|
|
82
85
|
fts5Tables,
|
|
@@ -84,7 +87,7 @@ import {
|
|
|
84
87
|
lossUnknown,
|
|
85
88
|
storeDamageReport,
|
|
86
89
|
storeHealth
|
|
87
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-FNV5HLHX.js";
|
|
88
91
|
import {
|
|
89
92
|
CORPORA,
|
|
90
93
|
MIGRATIONS,
|
|
@@ -122,55 +125,55 @@ import {
|
|
|
122
125
|
storeClients,
|
|
123
126
|
storeContents,
|
|
124
127
|
vectorIndexCounts
|
|
125
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-KEKXERBE.js";
|
|
126
129
|
import {
|
|
127
130
|
currentRun,
|
|
128
131
|
readDamageMark,
|
|
129
132
|
readHealthMark,
|
|
130
133
|
readJournalMark,
|
|
131
134
|
recordDeepCheck
|
|
132
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-PPSAWFJD.js";
|
|
133
136
|
import {
|
|
134
137
|
failureKey,
|
|
135
138
|
isStoreDamage
|
|
136
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-JLXXUEAM.js";
|
|
137
140
|
import {
|
|
138
141
|
modelAddressAllowed,
|
|
139
142
|
onThisComputer
|
|
140
|
-
} from "./chunk-
|
|
143
|
+
} from "./chunk-G2TU5RYY.js";
|
|
141
144
|
import {
|
|
142
145
|
renderMessages
|
|
143
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-LZPKBN3C.js";
|
|
144
147
|
import {
|
|
145
148
|
levelFor
|
|
146
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-BIKOE2IW.js";
|
|
147
150
|
import {
|
|
148
151
|
formatLocator,
|
|
149
152
|
parseLocator
|
|
150
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-ZLUIRFJX.js";
|
|
151
154
|
import {
|
|
152
155
|
queryFieldsOf
|
|
153
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-DSJ6EAOA.js";
|
|
154
157
|
import {
|
|
155
158
|
readSharedSection,
|
|
156
159
|
sharedConfigPath,
|
|
157
160
|
writeSharedSection
|
|
158
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-AKRIUNYP.js";
|
|
159
162
|
import {
|
|
160
163
|
readSecret
|
|
161
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-IA7LLLEI.js";
|
|
162
165
|
import {
|
|
163
166
|
storePath
|
|
164
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-TLG6ECZ2.js";
|
|
165
168
|
import {
|
|
166
169
|
openCache
|
|
167
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-WXJYMMEL.js";
|
|
168
171
|
import {
|
|
169
172
|
Credentials,
|
|
170
173
|
isMovedRun,
|
|
171
174
|
resolvePaths,
|
|
172
175
|
writeSecurely
|
|
173
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-WIHN3ELW.js";
|
|
174
177
|
import {
|
|
175
178
|
array,
|
|
176
179
|
boolean,
|
|
@@ -192,10 +195,10 @@ import {
|
|
|
192
195
|
string,
|
|
193
196
|
transform,
|
|
194
197
|
trim
|
|
195
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-QFOP3KUP.js";
|
|
196
199
|
import {
|
|
197
200
|
CliError
|
|
198
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-S6JG4YUH.js";
|
|
199
202
|
import {
|
|
200
203
|
__commonJS,
|
|
201
204
|
__name,
|
|
@@ -270,9 +273,9 @@ var require_liquid_node = __commonJS({
|
|
|
270
273
|
__name(isIterator, "isIterator");
|
|
271
274
|
function promisify(fn) {
|
|
272
275
|
return function(...args) {
|
|
273
|
-
return new Promise((
|
|
276
|
+
return new Promise((resolve4, reject2) => {
|
|
274
277
|
fn(...args, (err, result2) => {
|
|
275
|
-
err ? reject2(err) :
|
|
278
|
+
err ? reject2(err) : resolve4(result2);
|
|
276
279
|
});
|
|
277
280
|
});
|
|
278
281
|
};
|
|
@@ -1862,12 +1865,12 @@ var require_liquid_node = __commonJS({
|
|
|
1862
1865
|
return fs$1.readFileSync(filepath, "utf8");
|
|
1863
1866
|
}
|
|
1864
1867
|
__name(readFileSync6, "readFileSync");
|
|
1865
|
-
function
|
|
1868
|
+
function resolve3(root, file2, ext) {
|
|
1866
1869
|
if (!path.extname(file2))
|
|
1867
1870
|
file2 += ext;
|
|
1868
1871
|
return path.resolve(root, file2);
|
|
1869
1872
|
}
|
|
1870
|
-
__name(
|
|
1873
|
+
__name(resolve3, "resolve");
|
|
1871
1874
|
function fallback(file2) {
|
|
1872
1875
|
try {
|
|
1873
1876
|
return requireResolve(file2);
|
|
@@ -1875,10 +1878,10 @@ var require_liquid_node = __commonJS({
|
|
|
1875
1878
|
}
|
|
1876
1879
|
}
|
|
1877
1880
|
__name(fallback, "fallback");
|
|
1878
|
-
function
|
|
1881
|
+
function dirname5(filepath) {
|
|
1879
1882
|
return path.dirname(filepath);
|
|
1880
1883
|
}
|
|
1881
|
-
__name(
|
|
1884
|
+
__name(dirname5, "dirname");
|
|
1882
1885
|
var realpathAsync = promisify(fs$1.realpath);
|
|
1883
1886
|
async function contains(root, file2) {
|
|
1884
1887
|
try {
|
|
@@ -1908,9 +1911,9 @@ var require_liquid_node = __commonJS({
|
|
|
1908
1911
|
readFile,
|
|
1909
1912
|
existsSync: existsSync11,
|
|
1910
1913
|
readFileSync: readFileSync6,
|
|
1911
|
-
resolve:
|
|
1914
|
+
resolve: resolve3,
|
|
1912
1915
|
fallback,
|
|
1913
|
-
dirname:
|
|
1916
|
+
dirname: dirname5,
|
|
1914
1917
|
contains,
|
|
1915
1918
|
containsSync,
|
|
1916
1919
|
sep: path.sep
|
|
@@ -3635,7 +3638,7 @@ var require_liquid_node = __commonJS({
|
|
|
3635
3638
|
uri_escape,
|
|
3636
3639
|
slugify
|
|
3637
3640
|
});
|
|
3638
|
-
var
|
|
3641
|
+
var join7 = argumentsToValue(function(v, arg) {
|
|
3639
3642
|
const array2 = toArray(v);
|
|
3640
3643
|
const sep = isNil(arg) ? " " : stringify(arg);
|
|
3641
3644
|
let outputSize = sep.length * Math.max(array2.length - 1, 0);
|
|
@@ -3911,7 +3914,7 @@ var require_liquid_node = __commonJS({
|
|
|
3911
3914
|
__name(sample, "sample");
|
|
3912
3915
|
var arrayFilters = /* @__PURE__ */ Object.freeze({
|
|
3913
3916
|
__proto__: null,
|
|
3914
|
-
join:
|
|
3917
|
+
join: join7,
|
|
3915
3918
|
last,
|
|
3916
3919
|
first,
|
|
3917
3920
|
reverse,
|
|
@@ -5535,11 +5538,11 @@ var require_liquid_node = __commonJS({
|
|
|
5535
5538
|
}
|
|
5536
5539
|
});
|
|
5537
5540
|
|
|
5538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5541
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5539
5542
|
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";
|
|
5540
|
-
import { dirname as
|
|
5543
|
+
import { dirname as dirname4, resolve as resolve2 } from "node:path";
|
|
5541
5544
|
|
|
5542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5545
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5543
5546
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5544
5547
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5545
5548
|
import { Transform } from "node:stream";
|
|
@@ -5551,7 +5554,7 @@ var NONCE = 12;
|
|
|
5551
5554
|
var TAG = 16;
|
|
5552
5555
|
var HEADER = MAGIC.length + 3 + SALT + NONCE;
|
|
5553
5556
|
var COST = { log2N: 17, r: 8, p: 1 };
|
|
5554
|
-
var keyOf = /* @__PURE__ */ __name((password, salt, { log2N, r, p }) => new Promise((
|
|
5557
|
+
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");
|
|
5555
5558
|
var checkFor = /* @__PURE__ */ __name(async (password, cost = COST) => {
|
|
5556
5559
|
refuseEmpty(password);
|
|
5557
5560
|
const salt = randomBytes(SALT);
|
|
@@ -5646,7 +5649,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5646
5649
|
renameSync(pending, to);
|
|
5647
5650
|
}, "unsealFile");
|
|
5648
5651
|
|
|
5649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5652
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5650
5653
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5651
5654
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5652
5655
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5670,7 +5673,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5670
5673
|
};
|
|
5671
5674
|
}, "compatibilityOf");
|
|
5672
5675
|
|
|
5673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5676
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5674
5677
|
import { createHash as createHash2 } from "node:crypto";
|
|
5675
5678
|
var COPY_MARK = "__repair_";
|
|
5676
5679
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5924,19 +5927,79 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5924
5927
|
return found;
|
|
5925
5928
|
}, "deleteCopy");
|
|
5926
5929
|
|
|
5927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5930
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/path-options.js
|
|
5931
|
+
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
5932
|
+
var PATH_NAME = /^([a-z]+-)*(file|path|dir|directory|folder)s?$/;
|
|
5933
|
+
var PATH_PLACEHOLDER = /[<[]([a-z]+-)*(file|path|dir|directory|folder)s?(\.\.\.)?[>\]]/;
|
|
5934
|
+
var NOT_LOCAL = /* @__PURE__ */ new WeakMap();
|
|
5935
|
+
var IN_BACKUPS = /* @__PURE__ */ new WeakMap();
|
|
5936
|
+
var mark = /* @__PURE__ */ __name((marks, command, names) => {
|
|
5937
|
+
marks.set(command, /* @__PURE__ */ new Set([...marks.get(command) ?? [], ...names]));
|
|
5938
|
+
return command;
|
|
5939
|
+
}, "mark");
|
|
5940
|
+
var notLocalPaths = /* @__PURE__ */ __name((command, ...names) => mark(NOT_LOCAL, command, names), "notLocalPaths");
|
|
5941
|
+
var inStoreBackups = /* @__PURE__ */ __name((command, ...names) => mark(IN_BACKUPS, command, names), "inStoreBackups");
|
|
5942
|
+
var marked = /* @__PURE__ */ __name((marks, command, name) => {
|
|
5943
|
+
for (let at = command; at; at = at.parent)
|
|
5944
|
+
if (marks.get(at)?.has(name))
|
|
5945
|
+
return true;
|
|
5946
|
+
return false;
|
|
5947
|
+
}, "marked");
|
|
5948
|
+
var isLocalPathOption = /* @__PURE__ */ __name((command, option) => PATH_PLACEHOLDER.test(option.flags) && !marked(NOT_LOCAL, command, option.attributeName()), "isLocalPathOption");
|
|
5949
|
+
var isLocalPathArgument = /* @__PURE__ */ __name((command, argument) => PATH_NAME.test(argument.name()) && !marked(NOT_LOCAL, command, argument.name()), "isLocalPathArgument");
|
|
5950
|
+
var isNamed = /* @__PURE__ */ __name((value) => value !== "" && value !== "-" && !value.includes("://"), "isNamed");
|
|
5951
|
+
var valuesOf = /* @__PURE__ */ __name((value) => (Array.isArray(value) ? value : [value]).filter((one) => typeof one === "string" && isNamed(one)), "valuesOf");
|
|
5952
|
+
var localPathsOf = /* @__PURE__ */ __name((action) => {
|
|
5953
|
+
const found = [];
|
|
5954
|
+
for (let at = action; at; at = at.parent) {
|
|
5955
|
+
for (const option of at.options) {
|
|
5956
|
+
const key = option.attributeName();
|
|
5957
|
+
if (!isLocalPathOption(at, option) || at.getOptionValueSource(key) !== "cli")
|
|
5958
|
+
continue;
|
|
5959
|
+
const flag = option.long ?? option.flags;
|
|
5960
|
+
for (const value of valuesOf(at.getOptionValue(key)))
|
|
5961
|
+
found.push({ flag, value, inBackups: marked(IN_BACKUPS, at, key) });
|
|
5962
|
+
}
|
|
5963
|
+
}
|
|
5964
|
+
action.registeredArguments.forEach((argument, index) => {
|
|
5965
|
+
const value = action.processedArgs[index];
|
|
5966
|
+
if (!isLocalPathArgument(action, argument) || value === argument.defaultValue)
|
|
5967
|
+
return;
|
|
5968
|
+
for (const one of valuesOf(value))
|
|
5969
|
+
found.push({ flag: `<${argument.name()}>`, value: one, inBackups: marked(IN_BACKUPS, action, argument.name()) });
|
|
5970
|
+
});
|
|
5971
|
+
return found;
|
|
5972
|
+
}, "localPathsOf");
|
|
5973
|
+
var refuseAgentPaths = /* @__PURE__ */ __name((action, app, env) => {
|
|
5974
|
+
const backups = join(dirname(resolve(storePath(env))), "backups");
|
|
5975
|
+
for (const { flag, value, inBackups } of localPathsOf(action)) {
|
|
5976
|
+
if (inBackups && inside(realPathOf(value), realPathOf(backups)))
|
|
5977
|
+
continue;
|
|
5978
|
+
if (refusedPlace(value, app, env))
|
|
5979
|
+
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 });
|
|
5980
|
+
}
|
|
5981
|
+
}, "refuseAgentPaths");
|
|
5982
|
+
var absoluteFrom = /* @__PURE__ */ __name((cwd, value) => {
|
|
5983
|
+
if (Array.isArray(value))
|
|
5984
|
+
return value.map((one) => absoluteFrom(cwd, one));
|
|
5985
|
+
if (typeof value !== "string" || !isNamed(value) || isAbsolute(value))
|
|
5986
|
+
return value;
|
|
5987
|
+
return resolve(cwd, value);
|
|
5988
|
+
}, "absoluteFrom");
|
|
5989
|
+
|
|
5990
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5928
5991
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5929
5992
|
|
|
5930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5993
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5931
5994
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5932
5995
|
|
|
5933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5996
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5934
5997
|
import { execFileSync, spawn } from "node:child_process";
|
|
5935
5998
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5936
|
-
import { basename, dirname, join } from "node:path";
|
|
5999
|
+
import { basename, dirname as dirname2, join as join2 } from "node:path";
|
|
5937
6000
|
import { Transform as Transform2 } from "node:stream";
|
|
5938
6001
|
|
|
5939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6002
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5940
6003
|
var REFILL_MARGIN_MS = 864e5;
|
|
5941
6004
|
var TIME_KEYS = 1e12;
|
|
5942
6005
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -6016,7 +6079,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
6016
6079
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6017
6080
|
}, "forgetMail");
|
|
6018
6081
|
|
|
6019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6082
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
6020
6083
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6021
6084
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6022
6085
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6092,8 +6155,8 @@ var takeRecoverLock = /* @__PURE__ */ __name((path) => {
|
|
|
6092
6155
|
return () => rmSync2(lock, { force: true });
|
|
6093
6156
|
}, "takeRecoverLock");
|
|
6094
6157
|
var storeHolders = /* @__PURE__ */ __name((path) => {
|
|
6095
|
-
const folder = realpathSync(
|
|
6096
|
-
const files = STORE_PARTS.map((suffix) =>
|
|
6158
|
+
const folder = realpathSync(dirname2(path));
|
|
6159
|
+
const files = STORE_PARTS.map((suffix) => join2(folder, `${basename(path)}${suffix}`));
|
|
6097
6160
|
const wanted = process.platform === "linux" ? files.flatMap((file2) => [file2, `${file2} (deleted)`]) : files.filter(existsSync2);
|
|
6098
6161
|
const recovering = runningRecovery(path);
|
|
6099
6162
|
const pids = holdersOf(wanted);
|
|
@@ -6236,7 +6299,7 @@ var placeLostRows = /* @__PURE__ */ __name((database) => {
|
|
|
6236
6299
|
}
|
|
6237
6300
|
return Object.fromEntries(Object.entries(placed).filter(([, rows2]) => rows2 > 0));
|
|
6238
6301
|
}, "placeLostRows");
|
|
6239
|
-
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((
|
|
6302
|
+
var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3") => new Promise((resolve3, reject) => {
|
|
6240
6303
|
const reader = spawn(program, ["-readonly", path, `.recover --ignore-freelist --lost-and-found ${LOST_AND_FOUND}`], {
|
|
6241
6304
|
stdio: ["ignore", "pipe", "pipe"]
|
|
6242
6305
|
});
|
|
@@ -6273,7 +6336,7 @@ var copyReadableRows = /* @__PURE__ */ __name((path, target, program = "sqlite3"
|
|
|
6273
6336
|
if (readerCode !== 0)
|
|
6274
6337
|
reject(new CliError("validation_error", `sqlite3 could not read the store: ${errors.join("; ")}`));
|
|
6275
6338
|
else
|
|
6276
|
-
|
|
6339
|
+
resolve3({ errors, read });
|
|
6277
6340
|
}, "exited");
|
|
6278
6341
|
reader.on("error", reject);
|
|
6279
6342
|
writer.on("error", reject);
|
|
@@ -6409,7 +6472,7 @@ var recoverStore = /* @__PURE__ */ __name(async ({ path, command, version, sqlit
|
|
|
6409
6472
|
try {
|
|
6410
6473
|
refuseInUse(path);
|
|
6411
6474
|
const bytes = STORE_PARTS.reduce((sum, suffix) => sum + (statSync2(`${path}${suffix}`, { throwIfNoEntry: false })?.size ?? 0), 0);
|
|
6412
|
-
const { bavail, bsize } = statfsSync(
|
|
6475
|
+
const { bavail, bsize } = statfsSync(dirname2(path));
|
|
6413
6476
|
if (Number(bavail) * Number(bsize) < bytes * 1.2)
|
|
6414
6477
|
throw new CliError("validation_error", `the recovery needs about ${Math.ceil(bytes * 1.2 / 1e9)} GB free beside the store`);
|
|
6415
6478
|
return await recoverLocked({ path, command, version, sqlite3, now, note, copy, started, program });
|
|
@@ -6547,7 +6610,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6547
6610
|
}
|
|
6548
6611
|
}, "recoverLocked");
|
|
6549
6612
|
|
|
6550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6613
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6551
6614
|
var COUNTED = [
|
|
6552
6615
|
"accounts",
|
|
6553
6616
|
"chats",
|
|
@@ -6582,7 +6645,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6582
6645
|
}
|
|
6583
6646
|
const journal = readJournalMark(path);
|
|
6584
6647
|
recordDeepCheck(path, health, { cli: command, ...version ? { version } : {}, schema });
|
|
6585
|
-
const
|
|
6648
|
+
const mark2 = readDamageMark(path);
|
|
6586
6649
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
6587
6650
|
const inUse = storeHolders(path) ?? null;
|
|
6588
6651
|
const timers = activeTimers() ?? null;
|
|
@@ -6590,7 +6653,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6590
6653
|
const report = storeDamageReport({
|
|
6591
6654
|
health,
|
|
6592
6655
|
command,
|
|
6593
|
-
mark,
|
|
6656
|
+
mark: mark2,
|
|
6594
6657
|
journal,
|
|
6595
6658
|
lastOkAt: lastKnownGood,
|
|
6596
6659
|
holders: inUse,
|
|
@@ -6608,7 +6671,7 @@ var storeRecoveryCheck = /* @__PURE__ */ __name(async (env, command, version) =>
|
|
|
6608
6671
|
invalidJson: health.invalidJson ?? [],
|
|
6609
6672
|
rows,
|
|
6610
6673
|
report,
|
|
6611
|
-
damageMark:
|
|
6674
|
+
damageMark: mark2 ? (({ inode: _, ...seen }) => seen)(mark2) : null,
|
|
6612
6675
|
lastKnownGood,
|
|
6613
6676
|
inUse,
|
|
6614
6677
|
timers,
|
|
@@ -6641,12 +6704,12 @@ var storeRecoveryRun = /* @__PURE__ */ __name(async (env, { command, version, no
|
|
|
6641
6704
|
}, "storeRecoveryRun");
|
|
6642
6705
|
var refetchNotes = /* @__PURE__ */ __name(({ since, chats, mail }) => {
|
|
6643
6706
|
const from = since === null ? "from the start" : `from ${since} on`;
|
|
6644
|
-
const
|
|
6707
|
+
const marked2 = [
|
|
6645
6708
|
...chats.map(({ provider, account, chats: chats2 }) => `${chats2} chats of ${provider} ${account}`),
|
|
6646
6709
|
...mail.map(({ account, folders }) => `${folders} mail folders of ${account}`)
|
|
6647
6710
|
];
|
|
6648
6711
|
return [
|
|
6649
|
-
|
|
6712
|
+
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`,
|
|
6650
6713
|
...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`),
|
|
6651
6714
|
"notes, memories, tags and whatever else only this store held cannot be fetched again"
|
|
6652
6715
|
];
|
|
@@ -6703,7 +6766,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6703
6766
|
return recover;
|
|
6704
6767
|
}, "storeRecoverCommand");
|
|
6705
6768
|
|
|
6706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6769
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6707
6770
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6708
6771
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6709
6772
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6753,7 +6816,7 @@ var sharedStoreCommand = /* @__PURE__ */ __name((app) => {
|
|
|
6753
6816
|
return app ? store.addCommand(storeRecoverCommand(app)) : store;
|
|
6754
6817
|
}, "sharedStoreCommand");
|
|
6755
6818
|
|
|
6756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6819
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6757
6820
|
var ENCRYPT_OPTION = [
|
|
6758
6821
|
"--encrypt",
|
|
6759
6822
|
"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"
|
|
@@ -6772,9 +6835,9 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6772
6835
|
return password;
|
|
6773
6836
|
}, "passwordOf");
|
|
6774
6837
|
|
|
6775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6838
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6776
6839
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6777
|
-
import { join as
|
|
6840
|
+
import { join as join3 } from "node:path";
|
|
6778
6841
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
6779
6842
|
var REPLY_MODELS = ["fill-only", "may-reword"];
|
|
6780
6843
|
var REPLY_KINDS = ["dialog", "group"];
|
|
@@ -6860,7 +6923,7 @@ var defaultRule = /* @__PURE__ */ __name((id) => ({
|
|
|
6860
6923
|
reply: { template: "", asReply: true },
|
|
6861
6924
|
limits: { perChat: "1/1d", perPerson: "1/1d" }
|
|
6862
6925
|
}), "defaultRule");
|
|
6863
|
-
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
6926
|
+
var repliesPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies.json`), "repliesPathFor");
|
|
6864
6927
|
var EVERYONE = { reply: "all", allow: { people: [], chats: [] }, deny: { people: [], chats: [] } };
|
|
6865
6928
|
var outsideAudience = /* @__PURE__ */ __name((audience, person, chat) => {
|
|
6866
6929
|
if (person !== null && audience.deny.people.includes(person))
|
|
@@ -6943,9 +7006,9 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6943
7006
|
}, "problem");
|
|
6944
7007
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6945
7008
|
|
|
6946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7009
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6947
7010
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6948
|
-
import { join as
|
|
7011
|
+
import { join as join4 } from "node:path";
|
|
6949
7012
|
var ANSWERED_KEPT = 1e3;
|
|
6950
7013
|
var times = record(string(), array(string()));
|
|
6951
7014
|
var stateFile = object({
|
|
@@ -6957,7 +7020,7 @@ var stateFile = object({
|
|
|
6957
7020
|
});
|
|
6958
7021
|
var emptyState = /* @__PURE__ */ __name(() => ({ paused: false, answered: [], sent: {} }), "emptyState");
|
|
6959
7022
|
var answeredKey = /* @__PURE__ */ __name((message) => `${message.chatId}:${message.id}`, "answeredKey");
|
|
6960
|
-
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7023
|
+
var repliesStatePathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join4(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, `${profile}.replies-state.json`), "repliesStatePathFor");
|
|
6961
7024
|
var readRepliesState = /* @__PURE__ */ __name((path) => {
|
|
6962
7025
|
if (!existsSync6(path))
|
|
6963
7026
|
return emptyState();
|
|
@@ -6996,7 +7059,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6996
7059
|
}, "recordReply");
|
|
6997
7060
|
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");
|
|
6998
7061
|
|
|
6999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7062
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
7000
7063
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
7001
7064
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
7002
7065
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7102,10 +7165,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7102
7165
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7103
7166
|
}, "filled");
|
|
7104
7167
|
|
|
7105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7168
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7106
7169
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7107
7170
|
|
|
7108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7171
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7109
7172
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7110
7173
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7111
7174
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7132,7 +7195,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7132
7195
|
return engine;
|
|
7133
7196
|
}, "safeLiquid");
|
|
7134
7197
|
|
|
7135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7198
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7136
7199
|
var TEMPLATE_LIMITS = {
|
|
7137
7200
|
parse: 32768,
|
|
7138
7201
|
renders: 2e3,
|
|
@@ -7271,7 +7334,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7271
7334
|
}
|
|
7272
7335
|
}, "renderReplyTemplate");
|
|
7273
7336
|
|
|
7274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7337
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7275
7338
|
var DRY_RUN_DAYS = 7;
|
|
7276
7339
|
var PAGE = 500;
|
|
7277
7340
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7385,7 +7448,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7385
7448
|
}
|
|
7386
7449
|
}, "storedSince");
|
|
7387
7450
|
|
|
7388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7451
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/models/ai.js
|
|
7389
7452
|
var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
|
|
7390
7453
|
var DEFAULT_BASE_URL = {
|
|
7391
7454
|
anthropic: "https://api.anthropic.com",
|
|
@@ -7553,7 +7616,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
|
|
|
7553
7616
|
}
|
|
7554
7617
|
}, "checkAi");
|
|
7555
7618
|
|
|
7556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7619
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/models/purpose.js
|
|
7557
7620
|
var HOSTED = {
|
|
7558
7621
|
openai: "https://api.openai.com/v1",
|
|
7559
7622
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7574,14 +7637,14 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7574
7637
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7575
7638
|
}, "purposeModel");
|
|
7576
7639
|
|
|
7577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7640
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7578
7641
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7579
|
-
import { join as
|
|
7642
|
+
import { join as join5 } from "node:path";
|
|
7580
7643
|
var shape = strictObject({
|
|
7581
7644
|
provider: nullable(pipe(string(), minLength(1))),
|
|
7582
7645
|
deniedChats: array(pipe(string(), minLength(1)))
|
|
7583
7646
|
});
|
|
7584
|
-
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) =>
|
|
7647
|
+
var replyConsentPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join5(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).config, `${profile}.replies-consents.json`), "replyConsentPathFor");
|
|
7585
7648
|
var readReplyConsent = /* @__PURE__ */ __name((path) => {
|
|
7586
7649
|
if (!existsSync7(path))
|
|
7587
7650
|
return { provider: null, deniedChats: [] };
|
|
@@ -7599,7 +7662,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7599
7662
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7600
7663
|
}, "mayModelReply");
|
|
7601
7664
|
|
|
7602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7665
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7603
7666
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7604
7667
|
ai: true
|
|
7605
7668
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7647,7 +7710,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7647
7710
|
return result2;
|
|
7648
7711
|
}, "replyRenderer");
|
|
7649
7712
|
|
|
7650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7713
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7651
7714
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7652
7715
|
var NO_RULES = "no rules";
|
|
7653
7716
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7740,7 +7803,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7740
7803
|
return { skip: why };
|
|
7741
7804
|
}, "replyTo");
|
|
7742
7805
|
|
|
7743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7806
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7744
7807
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7745
7808
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7746
7809
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7817,7 +7880,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7817
7880
|
};
|
|
7818
7881
|
}, "startSync");
|
|
7819
7882
|
|
|
7820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7883
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7821
7884
|
var FIRST_FETCH_MS = 6e4;
|
|
7822
7885
|
var DAY_MS = 864e5;
|
|
7823
7886
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7871,7 +7934,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7871
7934
|
};
|
|
7872
7935
|
}, "memberFetches");
|
|
7873
7936
|
|
|
7874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7937
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7875
7938
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7876
7939
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7877
7940
|
if (context.format === "pretty") {
|
|
@@ -7904,22 +7967,22 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7904
7967
|
return context;
|
|
7905
7968
|
}, "recordDiagnostics");
|
|
7906
7969
|
|
|
7907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7970
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7908
7971
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7909
|
-
import { dirname as
|
|
7972
|
+
import { dirname as dirname3, join as join6 } from "node:path";
|
|
7910
7973
|
var OUTDATED_CHECK_MS = 6e4;
|
|
7911
7974
|
var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1]) => {
|
|
7912
7975
|
let dir;
|
|
7913
7976
|
try {
|
|
7914
|
-
dir =
|
|
7977
|
+
dir = dirname3(realpathSync2(script ?? ""));
|
|
7915
7978
|
} catch {
|
|
7916
7979
|
return void 0;
|
|
7917
7980
|
}
|
|
7918
7981
|
for (let up = 0; up < 8; up++) {
|
|
7919
|
-
const manifest =
|
|
7982
|
+
const manifest = join6(dir, "package.json");
|
|
7920
7983
|
if (existsSync8(manifest))
|
|
7921
7984
|
return installedVersion(dir) === running ? dir : void 0;
|
|
7922
|
-
const parent =
|
|
7985
|
+
const parent = dirname3(dir);
|
|
7923
7986
|
if (parent === dir)
|
|
7924
7987
|
return void 0;
|
|
7925
7988
|
dir = parent;
|
|
@@ -7928,7 +7991,7 @@ var ownPackageRoot = /* @__PURE__ */ __name((running, script = process.argv[1])
|
|
|
7928
7991
|
}, "ownPackageRoot");
|
|
7929
7992
|
var installedVersion = /* @__PURE__ */ __name((root) => {
|
|
7930
7993
|
try {
|
|
7931
|
-
const { version } = JSON.parse(readFileSync5(
|
|
7994
|
+
const { version } = JSON.parse(readFileSync5(join6(root, "package.json"), "utf8"));
|
|
7932
7995
|
return typeof version === "string" ? version : void 0;
|
|
7933
7996
|
} catch {
|
|
7934
7997
|
return void 0;
|
|
@@ -7990,7 +8053,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7990
8053
|
};
|
|
7991
8054
|
}, "watchOutdated");
|
|
7992
8055
|
|
|
7993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8056
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7994
8057
|
var STEMS_EVERY_MS = 3e4;
|
|
7995
8058
|
var STEMS_SLICE_MS = 2e3;
|
|
7996
8059
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -8030,7 +8093,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
8030
8093
|
};
|
|
8031
8094
|
}, "stemFills");
|
|
8032
8095
|
|
|
8033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8096
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
8034
8097
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
8035
8098
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
8036
8099
|
kind: attachment.kind,
|
|
@@ -8126,7 +8189,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8126
8189
|
locale: messenger.app.locale
|
|
8127
8190
|
}), "viewOf");
|
|
8128
8191
|
|
|
8129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8192
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8130
8193
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8131
8194
|
value: value.value,
|
|
8132
8195
|
observed_at: value.observedAt,
|
|
@@ -8193,7 +8256,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8193
8256
|
}
|
|
8194
8257
|
}, "watchEventItem");
|
|
8195
8258
|
|
|
8196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8259
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8197
8260
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8198
8261
|
output: { entity: "watch_item" },
|
|
8199
8262
|
effects: REMOTE_READ,
|
|
@@ -8348,7 +8411,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8348
8411
|
}
|
|
8349
8412
|
}, "describe");
|
|
8350
8413
|
|
|
8351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8414
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8352
8415
|
var CURRENT_EVERY_MS = 6e4;
|
|
8353
8416
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8354
8417
|
const command = annotate(new Command("serve"), {
|
|
@@ -8648,7 +8711,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8648
8711
|
};
|
|
8649
8712
|
}, "tasking");
|
|
8650
8713
|
|
|
8651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8714
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8652
8715
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8653
8716
|
var PATH = "store tables list";
|
|
8654
8717
|
var STORE_TABLES_QUERY = {
|
|
@@ -8691,7 +8754,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8691
8754
|
return tables;
|
|
8692
8755
|
}, "storeTablesCommand");
|
|
8693
8756
|
|
|
8694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8757
|
+
// node_modules/.pnpm/@wirecat+cli-core@1.0.0_@wirecat+cli-base@1.0.0_commander@15.0.0_esbuild@0.28.2_typescr_dd5172c52281f8f1e2dd1d4e9555d5c3/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8695
8758
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8696
8759
|
var WORD_INDEX = "message_words";
|
|
8697
8760
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -8717,7 +8780,7 @@ var readingOnly = /* @__PURE__ */ __name(async (path, read) => {
|
|
|
8717
8780
|
database.close();
|
|
8718
8781
|
}
|
|
8719
8782
|
}, "readingOnly");
|
|
8720
|
-
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...
|
|
8783
|
+
var withoutInode = /* @__PURE__ */ __name(({ inode: _, ...mark2 }) => mark2, "withoutInode");
|
|
8721
8784
|
var fileSchema = /* @__PURE__ */ __name(async (path) => {
|
|
8722
8785
|
try {
|
|
8723
8786
|
return await readingOnly(path, (database) => fileSchemaOf(database).version);
|
|
@@ -8736,7 +8799,7 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8736
8799
|
...version ? { version } : {},
|
|
8737
8800
|
schema: await fileSchema(path)
|
|
8738
8801
|
}) : null;
|
|
8739
|
-
const
|
|
8802
|
+
const mark2 = readDamageMark(path);
|
|
8740
8803
|
const lastKnownGood = readHealthMark(path)?.last_ok_at ?? null;
|
|
8741
8804
|
const health = {
|
|
8742
8805
|
checked: checked.checked,
|
|
@@ -8748,11 +8811,11 @@ var storeSummary = /* @__PURE__ */ __name(async (env, { deep = false, command, v
|
|
|
8748
8811
|
...checked.invalidJson?.length ? { invalidJson: checked.invalidJson } : {},
|
|
8749
8812
|
...checked.searchIndexes?.some((index) => !index.ok) ? { damagedSearchIndexes: checked.searchIndexes.filter((index) => !index.ok).map((index) => index.name) } : {}
|
|
8750
8813
|
};
|
|
8751
|
-
const damage = command ? storeDamageReport({ health: checked, command, mark, journal, lastOkAt: lastKnownGood }) : null;
|
|
8814
|
+
const damage = command ? storeDamageReport({ health: checked, command, mark: mark2, journal, lastOkAt: lastKnownGood }) : null;
|
|
8752
8815
|
const healthOf = {
|
|
8753
8816
|
health,
|
|
8754
8817
|
lastKnownGood,
|
|
8755
|
-
...
|
|
8818
|
+
...mark2 ? { damageMark: withoutInode(mark2) } : {},
|
|
8756
8819
|
...journal ? { journalMark: journal } : {},
|
|
8757
8820
|
...recorded?.cleared ? { damageMarkCleared: withoutInode(recorded.cleared) } : {},
|
|
8758
8821
|
// `what` keeps memo's doctor, which reads it, compiling until it moves to `whatHappened`.
|
|
@@ -8939,7 +9002,7 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
|
|
|
8939
9002
|
...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
|
|
8940
9003
|
]);
|
|
8941
9004
|
const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
|
|
8942
|
-
const { bavail, bsize } = statfsSync2(
|
|
9005
|
+
const { bavail, bsize } = statfsSync2(dirname4(path));
|
|
8943
9006
|
const free = Number(bavail) * Number(bsize);
|
|
8944
9007
|
const behind = schema.version > 0 ? chatsBehind(database) : [];
|
|
8945
9008
|
const vectorIndexes = schema.version >= 34 ? vectorIndexCounts(database) : [];
|
|
@@ -9024,8 +9087,9 @@ var chatsBehind = /* @__PURE__ */ __name((database) => database.prepare(`SELECT
|
|
|
9024
9087
|
held: row.held === null ? null : isoOf(row.held),
|
|
9025
9088
|
refreshed: isoOf(row.refreshed)
|
|
9026
9089
|
})), "chatsBehind");
|
|
9027
|
-
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() {
|
|
9090
|
+
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() {
|
|
9028
9091
|
const { renderer } = outputFor(this);
|
|
9092
|
+
const { backup = true } = this.opts();
|
|
9029
9093
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9030
9094
|
if (!existsSync10(path)) {
|
|
9031
9095
|
result(this, { path, exists: false });
|
|
@@ -9034,11 +9098,13 @@ var migrateCommand = /* @__PURE__ */ __name((owner) => annotate(new Command("mig
|
|
|
9034
9098
|
}
|
|
9035
9099
|
const answer = await reading(path, (database) => {
|
|
9036
9100
|
const from = schemaOf(database).version;
|
|
9037
|
-
migrate(database, {
|
|
9101
|
+
const notice = migrate(database, {
|
|
9038
9102
|
command: owner.app.command,
|
|
9039
9103
|
version: owner.app.version,
|
|
9040
|
-
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn") }
|
|
9104
|
+
rollback: { store: path, warn: /* @__PURE__ */ __name((line) => renderer.warn(line), "warn"), withoutCopy: !backup }
|
|
9041
9105
|
});
|
|
9106
|
+
if (notice)
|
|
9107
|
+
renderer.warn(notice);
|
|
9042
9108
|
const { normalized, indexed, terms } = buildWordIndex(database, (note) => renderer.note(note));
|
|
9043
9109
|
const stemmed = buildStems(database, (note) => renderer.note(note));
|
|
9044
9110
|
const notes = buildNoteIndex(database, (note) => renderer.note(note));
|
|
@@ -9129,10 +9195,10 @@ var vacuumInto = /* @__PURE__ */ __name(async (path, target) => {
|
|
|
9129
9195
|
}
|
|
9130
9196
|
}, "vacuumInto");
|
|
9131
9197
|
var stampNow = /* @__PURE__ */ __name(() => (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-"), "stampNow");
|
|
9132
|
-
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) {
|
|
9198
|
+
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) {
|
|
9133
9199
|
const { encrypt } = this.opts();
|
|
9134
9200
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9135
|
-
const target =
|
|
9201
|
+
const target = resolve2(file2);
|
|
9136
9202
|
const { app, env } = environmentOf(this);
|
|
9137
9203
|
if (app)
|
|
9138
9204
|
refuseLockedOutput(target, app, env ?? process.env, "<file>");
|
|
@@ -9169,8 +9235,8 @@ var backupCommand = /* @__PURE__ */ __name(() => destroysNothing(annotate(new Co
|
|
|
9169
9235
|
}), "backupCommand");
|
|
9170
9236
|
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) {
|
|
9171
9237
|
const { output } = this.opts();
|
|
9172
|
-
const from =
|
|
9173
|
-
const to =
|
|
9238
|
+
const from = resolve2(file2);
|
|
9239
|
+
const to = resolve2(output);
|
|
9174
9240
|
if (!existsSync10(from))
|
|
9175
9241
|
throw new CliError("not_found", `no file at ${from}`);
|
|
9176
9242
|
if (!isSealed(from))
|
|
@@ -9180,16 +9246,16 @@ var decryptCommand = /* @__PURE__ */ __name(() => annotate(new Command("decrypt"
|
|
|
9180
9246
|
await unsealFile(from, to, await passwordOf(this, { twice: false }));
|
|
9181
9247
|
result(this, { path: to, from, bytes: bytesOf2(to) });
|
|
9182
9248
|
}), "decryptCommand");
|
|
9183
|
-
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) {
|
|
9249
|
+
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) {
|
|
9184
9250
|
const path = storePath(environmentOf(this).env ?? process.env);
|
|
9185
|
-
const given =
|
|
9251
|
+
const given = resolve2(file2);
|
|
9186
9252
|
if (!existsSync10(given))
|
|
9187
9253
|
throw new CliError("not_found", `no file at ${given}`);
|
|
9188
9254
|
refuseWhileServing(this, owner);
|
|
9189
9255
|
if (!isSealed(given))
|
|
9190
9256
|
return restoreFrom(this, owner, given, given);
|
|
9191
9257
|
const opened = `${path}.unsealing-${process.pid}`;
|
|
9192
|
-
mkdirSync(
|
|
9258
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9193
9259
|
try {
|
|
9194
9260
|
await unsealFile(given, opened, await passwordOf(this, { twice: false }));
|
|
9195
9261
|
await restoreFrom(this, owner, opened, given);
|
|
@@ -9212,7 +9278,7 @@ var restoreFrom = /* @__PURE__ */ __name(async (command, owner, backup, given) =
|
|
|
9212
9278
|
const waitMs = environmentOf(command).storeLockWaitMs;
|
|
9213
9279
|
await quiesce(path, owner, "restore", (message) => renderer.warn(message), waitMs);
|
|
9214
9280
|
} else
|
|
9215
|
-
mkdirSync(
|
|
9281
|
+
mkdirSync(dirname4(path), { recursive: true, mode: 448 });
|
|
9216
9282
|
const incoming = `${path}.restoring-${stamp}`;
|
|
9217
9283
|
copyFileSync(backup, incoming, constants.COPYFILE_EXCL);
|
|
9218
9284
|
chmodSync(incoming, 384);
|
|
@@ -9436,6 +9502,11 @@ export {
|
|
|
9436
9502
|
checkFor,
|
|
9437
9503
|
passes,
|
|
9438
9504
|
seal,
|
|
9505
|
+
notLocalPaths,
|
|
9506
|
+
isLocalPathOption,
|
|
9507
|
+
isLocalPathArgument,
|
|
9508
|
+
refuseAgentPaths,
|
|
9509
|
+
absoluteFrom,
|
|
9439
9510
|
storeRecoveryCheck,
|
|
9440
9511
|
storeRecoveryRun,
|
|
9441
9512
|
recoveryNotes,
|