@wirecat/tg-cli 0.133.0 → 0.135.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 -3
- package/contracts/wirecat.json +82 -2
- package/dist/bin/tg.js +2 -2
- package/dist/bot/generated/types.d.ts +188 -0
- package/dist/bot/generated/types.d.ts.map +1 -1
- package/dist/bundle/{adapter-GSGX3WBH.js → adapter-OHJF6PB5.js} +104 -69
- package/dist/bundle/agent-QPF2KU4I.js +37 -0
- package/dist/bundle/{all-profiles-VOCJ55YH.js → all-profiles-LQ73BIFB.js} +62 -20
- package/dist/bundle/{anthropic-J6CTLU3W.js → anthropic-YYBMT2HD.js} +5 -5
- package/dist/bundle/{app-server-GVFGA4TJ.js → app-server-HV4C4CSA.js} +72 -62
- package/dist/bundle/{bot-api-LWONPIGK.js → bot-api-URQXWMVR.js} +73 -92
- package/dist/bundle/{bot-history-XOW7Y2GC.js → bot-history-FRLCHPDQ.js} +23 -22
- package/dist/bundle/{bun-436CH6CP.js → bun-J3ML43BO.js} +2 -2
- package/dist/bundle/{bun-sqlite-ZLB5RK5Q.js → bun-sqlite-ZNB2B2DL.js} +6 -6
- package/dist/bundle/{chunk-UGS57TT5.js → chunk-24G3SEXH.js} +2 -2
- package/dist/bundle/chunk-27F6QBPY.js +555 -0
- package/dist/bundle/{chunk-6VCSOQFL.js → chunk-2OFCIF2W.js} +2 -2
- package/dist/bundle/{chunk-VGN5YXYI.js → chunk-2U7XA4IH.js} +2 -100
- package/dist/bundle/{chunk-LBZEZO32.js → chunk-4CLSIEWN.js} +65 -43
- package/dist/bundle/chunk-5CEKH6R6.js +340 -0
- package/dist/bundle/{chunk-SMI2EUH4.js → chunk-5WEEK65F.js} +1 -1
- package/dist/bundle/{chunk-OX73ERZW.js → chunk-6VWVYPH2.js} +3 -4
- package/dist/bundle/{chunk-5HKPQPD4.js → chunk-6WS474NQ.js} +6 -6
- package/dist/bundle/{chunk-IYAXLLGR.js → chunk-7GWOGEWJ.js} +6 -6
- package/dist/bundle/{chunk-TPD37ECC.js → chunk-AMRMU23L.js} +16 -3
- package/dist/bundle/{chunk-ZHO3TPHM.js → chunk-B2UXNYCD.js} +30 -15
- package/dist/bundle/{chunk-YY6FGKGD.js → chunk-B4ZMFU5I.js} +2 -2
- package/dist/bundle/{chunk-54WLIPIQ.js → chunk-BFKPMG5T.js} +1 -1
- package/dist/bundle/{chunk-KHUXDSXN.js → chunk-BQSODAU3.js} +1 -1
- package/dist/bundle/{chunk-N3JUHGKM.js → chunk-BXUMZWMN.js} +3786 -3364
- package/dist/bundle/{chunk-VTQMR3XG.js → chunk-E2VIO7RY.js} +3 -3
- package/dist/bundle/{chunk-UZ63ORMY.js → chunk-F5FOS64B.js} +4 -4
- package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-GCUFGDKE.js} +2 -2
- package/dist/bundle/chunk-GUERS64O.js +108 -0
- package/dist/bundle/{chunk-5LRTYBZW.js → chunk-HILS2UL7.js} +12 -12
- package/dist/bundle/{chunk-6S77EKZU.js → chunk-IOJOLV25.js} +17 -15
- package/dist/bundle/{chunk-IBCXEVNY.js → chunk-JBS4VPAX.js} +3 -3
- package/dist/bundle/{chunk-5L44DSHV.js → chunk-K5QGBYDL.js} +4 -4
- package/dist/bundle/{chunk-NO2LIHWA.js → chunk-KKXF6TSS.js} +1 -1
- package/dist/bundle/chunk-L2ZQDTDU.js +7 -0
- package/dist/bundle/{chunk-HB5DP6L5.js → chunk-LFPUW7DR.js} +18 -18
- package/dist/bundle/{chunk-QWO7L4UH.js → chunk-LGYATGQI.js} +7 -7
- package/dist/bundle/{chunk-IH4Z3KZU.js → chunk-MA27675E.js} +2 -2
- package/dist/bundle/{chunk-6H2NW6HK.js → chunk-MDI7554C.js} +3 -3
- package/dist/bundle/{chunk-KVFUH5IT.js → chunk-MMZ4QAKJ.js} +1 -1
- package/dist/bundle/{chunk-XOX4BX5A.js → chunk-MOPBEBVS.js} +4 -4
- package/dist/bundle/{chunk-XKOMP3HV.js → chunk-MPRXUTIK.js} +6 -6
- package/dist/bundle/{chunk-QYLZD4DS.js → chunk-N7F5KT6U.js} +1 -1
- package/dist/bundle/{chunk-KUA24HWG.js → chunk-NBP6LXSY.js} +2 -2
- package/dist/bundle/{chunk-UQYL6TJ7.js → chunk-NP46ZKQW.js} +4 -4
- package/dist/bundle/{chunk-QGWISM4W.js → chunk-NRSJXUUO.js} +34 -28
- package/dist/bundle/{chunk-7NYP4RBO.js → chunk-NVWZ7S3I.js} +2294 -1221
- package/dist/bundle/chunk-OBIMTRA7.js +80 -0
- package/dist/bundle/{chunk-VWJTYAIQ.js → chunk-OQJURSRL.js} +17 -17
- package/dist/bundle/chunk-OU3WN4YH.js +50 -0
- package/dist/bundle/{chunk-VCAOH45X.js → chunk-PBK2ECXT.js} +1 -1
- package/dist/bundle/{chunk-TTDZVWDU.js → chunk-PHAFT2BO.js} +1 -1
- package/dist/bundle/{chunk-NTWXL2QV.js → chunk-PKIGE4NE.js} +2 -2
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-NAXOT35J.js → chunk-QBRQLOZA.js} +3 -3
- package/dist/bundle/{chunk-RABUG4KA.js → chunk-QD4MTOI7.js} +511 -472
- package/dist/bundle/{chunk-LOS4D6ZB.js → chunk-QHQ52UMF.js} +159 -569
- package/dist/bundle/{chunk-6CHIGUCY.js → chunk-R2G3MWEF.js} +31 -20
- package/dist/bundle/{chunk-THYGLTRB.js → chunk-RCEP5OXD.js} +7 -7
- package/dist/bundle/chunk-RHJ2VGHV.js +353 -0
- package/dist/bundle/{chunk-QVGEL66U.js → chunk-RXBKVNOK.js} +53 -11
- package/dist/bundle/{chunk-ZYAHZKYF.js → chunk-RZ7POTFA.js} +3 -3
- package/dist/bundle/{chunk-KEN4B57V.js → chunk-S7PIM4GG.js} +2 -2
- package/dist/bundle/{chunk-BXVB42KJ.js → chunk-SIDGH56R.js} +2 -2
- package/dist/bundle/{chunk-XDQU5HBO.js → chunk-SRMELB6Q.js} +12 -12
- package/dist/bundle/{chunk-SMU6NA7F.js → chunk-SVPNU7PD.js} +4 -4
- package/dist/bundle/{chunk-JPNVEPS4.js → chunk-TB2MG6PE.js} +2351 -2028
- package/dist/bundle/{chunk-JGMXBAGH.js → chunk-UN5TH2CG.js} +156 -434
- package/dist/bundle/{chunk-YAPDU3SV.js → chunk-V3ZWYMXT.js} +1 -1
- package/dist/bundle/{chunk-7NF3V5L2.js → chunk-VFU25P57.js} +4 -4
- package/dist/bundle/{chunk-LQQSDGQ6.js → chunk-VJEMCJPL.js} +56 -46
- package/dist/bundle/{chunk-UIAKLELF.js → chunk-VK2NDTBS.js} +94 -64
- package/dist/bundle/{chunk-UKBK2VWZ.js → chunk-W6A2OZ3C.js} +232 -176
- package/dist/bundle/{chunk-IPPCQ7IK.js → chunk-WDI6LA4X.js} +2 -2
- package/dist/bundle/{chunk-N7QREPZW.js → chunk-WTGRQGQL.js} +16 -9
- package/dist/bundle/{chunk-57KJ3TRS.js → chunk-WUCTF2XE.js} +9 -9
- package/dist/bundle/{chunk-JKSD43L7.js → chunk-WZCRCCOZ.js} +6 -6
- package/dist/bundle/{chunk-H7ML7X3G.js → chunk-XB6O445X.js} +144 -10
- package/dist/bundle/{chunk-O6JUVATT.js → chunk-XKFES4EM.js} +35 -12
- package/dist/bundle/chunk-YBUX6EAK.js +388 -0
- package/dist/bundle/{chunk-WCYKVX3B.js → chunk-YMRL7MYS.js} +7 -7
- package/dist/bundle/{chunk-M6QOM6SL.js → chunk-Z6M6NZUX.js} +1 -1
- package/dist/bundle/chunk-ZCDRXKCR.js +727 -0
- package/dist/bundle/{chunk-6A44ZZFC.js → chunk-ZJ3S4S6H.js} +43 -64
- package/dist/bundle/{chunk-TCI7I6YF.js → chunk-ZL7TJXFL.js} +11 -25
- package/dist/bundle/{chunk-2KQDJHF3.js → chunk-ZMBVZWUW.js} +29 -1
- package/dist/bundle/{chunk-OWY52JBO.js → chunk-ZMTASSIB.js} +7 -7
- package/dist/bundle/{chunk-D2SJLZSH.js → chunk-ZQ5ERQHO.js} +2 -2
- package/dist/bundle/{chunk-CEJYNB3I.js → chunk-ZWVDXVG3.js} +4 -4
- package/dist/bundle/command-contract-K4MU32K6.js +37 -0
- package/dist/bundle/{command-server-entry-AE27QXTE.js → command-server-entry-XP6BVJIK.js} +27 -27
- package/dist/bundle/{decode-RQPPZ72F.js → decode-TUB45ALX.js} +5 -5
- package/dist/bundle/{dispatch-KQO2MCSH.js → dispatch-ICPUKMEG.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FZRIACN4.js → echarts-HJ7D7XTM.js} +2 -2
- package/dist/bundle/{embed-TOSWWMDL.js → embed-4QDN36YF.js} +6 -6
- package/dist/bundle/{embedder-JHIQSBGD.js → embedder-Q7ID2LEG.js} +9 -9
- package/dist/bundle/{entry-DU4KRXTG.js → entry-Z6VRZP7F.js} +9 -9
- package/dist/bundle/{failure-3YC3YGYO.js → failure-PEPNEEK7.js} +2 -2
- package/dist/bundle/{first-run-DQQT4FID.js → first-run-GKBEHAAX.js} +12 -12
- package/dist/bundle/first-screen-IA3ONZ75.js +37 -0
- package/dist/bundle/{instructions-WI64CJQ6.js → instructions-26ZXYYMY.js} +1 -1
- package/dist/bundle/{mcp-VMS6PBCU.js → mcp-KGWT6TGO.js} +2 -2
- package/dist/bundle/meeting-combined-KUV2HP52.js +23 -0
- package/dist/bundle/{meeting-model-XNRSREIK.js → meeting-model-JB7X4CA3.js} +11 -11
- package/dist/bundle/{meeting-semantic-OOSCHQMB.js → meeting-semantic-MQNUVG33.js} +6 -6
- package/dist/bundle/{node-JLKDNVKV.js → node-RIANITAT.js} +2 -2
- package/dist/bundle/{node-sqlite-YOGH26O2.js → node-sqlite-I2P26Z3S.js} +7 -7
- package/dist/bundle/{oauth-FOMXM5HP.js → oauth-GFMJL2ZZ.js} +8 -8
- package/dist/bundle/{open-SM2UXUKM.js → open-CWVYEFNN.js} +5 -5
- package/dist/bundle/{openai-J2H7S6ZF.js → openai-PQLK7YTJ.js} +15 -15
- package/dist/bundle/{process-HI7OZBOI.js → process-P4D4KFWE.js} +1 -1
- package/dist/bundle/{program-VY4HFU25.js → program-MF4QZJKH.js} +70 -64
- package/dist/bundle/{prompt-NUUVFMOF.js → prompt-JWIOYU53.js} +5 -5
- package/dist/bundle/{proxy-transport-AN4VMRRN.js → proxy-transport-DWY6ABVT.js} +5 -5
- package/dist/bundle/{recognize-MALJHPDI.js → recognize-IPJL4CQZ.js} +4 -4
- package/dist/bundle/{remote-QUDRSTS2.js → remote-DVY6F6YO.js} +9 -9
- package/dist/bundle/{rerank-2DSO3D3S.js → rerank-XSPWLBIO.js} +7 -7
- package/dist/bundle/{serve-NCJ52MY3.js → serve-AJAVEH2M.js} +15 -15
- package/dist/bundle/server-GGXUR5BZ.js +78 -0
- package/dist/bundle/{server-Y3M544AM.js → server-GII7NIKF.js} +65 -54
- package/dist/bundle/{sqlite-runtime-NJUSXVKK.js → sqlite-runtime-KFDYJTUO.js} +6 -6
- package/dist/bundle/{state-AVOWQVET.js → state-76OJSCQC.js} +6 -6
- package/dist/bundle/{store-MMIYOL4H.js → store-2KJS4YMH.js} +28 -17
- package/dist/bundle/{store-BZ5ICDRP.js → store-FBP2J23G.js} +20 -19
- package/dist/bundle/store-maintenance-command-NUWOUZ62.js +65 -0
- package/dist/bundle/surface-EGSHCISG.js +64 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/adapter.d.ts +9 -2
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/adapter.js +5 -6
- package/dist/telegram/adapter.js.map +1 -1
- package/dist/telegram/messages.d.ts +12 -0
- package/dist/telegram/messages.d.ts.map +1 -1
- package/dist/telegram/messages.js +40 -0
- package/dist/telegram/messages.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/tg-cli/SKILL.md +7 -4
- package/skills/tg-cli/references/messages.md +5 -1
- package/skills/tg-cli/references/search.md +2 -0
- package/dist/bundle/chunk-SHTHNBHG.js +0 -2
- package/dist/bundle/command-contract-TQIARAB4.js +0 -37
- package/dist/bundle/first-screen-7N4CTZSA.js +0 -37
- package/dist/bundle/meeting-combined-3RAOFQ7M.js +0 -23
- package/dist/bundle/server-CHGON5I2.js +0 -70
- package/dist/bundle/store-maintenance-command-VKZ4WHUB.js +0 -61
|
@@ -3,32 +3,29 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-IOJOLV25.js";
|
|
7
|
+
import {
|
|
8
|
+
chatEventAnswer,
|
|
9
|
+
memberAnswer,
|
|
10
|
+
pollVoteAnswer
|
|
11
|
+
} from "./chunk-RHJ2VGHV.js";
|
|
7
12
|
import {
|
|
8
13
|
FETCHING,
|
|
9
14
|
RULES_VERSION,
|
|
10
15
|
applyTaskRulesOnArrival,
|
|
11
|
-
capability,
|
|
12
|
-
chatEventAnswer,
|
|
13
16
|
embeddingKeys,
|
|
14
17
|
endpointKeyName,
|
|
15
|
-
memberAnswer,
|
|
16
18
|
modelGateway,
|
|
17
19
|
newSendId,
|
|
18
20
|
onlineDeps,
|
|
19
21
|
openRequestTask,
|
|
20
22
|
patiently,
|
|
21
|
-
pollVoteAnswer,
|
|
22
|
-
queryTerms,
|
|
23
23
|
refuseLockedOutput,
|
|
24
24
|
senderIsMe,
|
|
25
|
-
serveRelay,
|
|
26
25
|
servicesFor,
|
|
27
26
|
syncsOneChat,
|
|
28
|
-
typedQuery,
|
|
29
|
-
withQuery,
|
|
30
27
|
withTimeLimit
|
|
31
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-BXUMZWMN.js";
|
|
32
29
|
import {
|
|
33
30
|
stringWidth,
|
|
34
31
|
wrapAnsi
|
|
@@ -36,10 +33,20 @@ import {
|
|
|
36
33
|
import {
|
|
37
34
|
holdLock,
|
|
38
35
|
lockPath,
|
|
36
|
+
markCurrent,
|
|
39
37
|
releaseLock,
|
|
40
38
|
servingProfiles,
|
|
41
39
|
takeLock
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-AMRMU23L.js";
|
|
41
|
+
import {
|
|
42
|
+
serveRelay
|
|
43
|
+
} from "./chunk-5CEKH6R6.js";
|
|
44
|
+
import {
|
|
45
|
+
capability,
|
|
46
|
+
queryTerms,
|
|
47
|
+
typedQuery,
|
|
48
|
+
withQuery
|
|
49
|
+
} from "./chunk-ZCDRXKCR.js";
|
|
43
50
|
import {
|
|
44
51
|
QUICK_HEALTH_CHECKS,
|
|
45
52
|
fts5Tables,
|
|
@@ -47,10 +54,10 @@ import {
|
|
|
47
54
|
lossUnknown,
|
|
48
55
|
storeDamageReport,
|
|
49
56
|
storeHealth
|
|
50
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-OQJURSRL.js";
|
|
51
58
|
import {
|
|
52
59
|
readSecret
|
|
53
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-MDI7554C.js";
|
|
54
61
|
import {
|
|
55
62
|
CORPORA,
|
|
56
63
|
MIGRATIONS,
|
|
@@ -74,9 +81,12 @@ import {
|
|
|
74
81
|
readStoreTables,
|
|
75
82
|
rebuildMentions,
|
|
76
83
|
resetAttachmentWords,
|
|
84
|
+
resetContentPostWords,
|
|
85
|
+
resetCrmFileWords,
|
|
77
86
|
resetNoteIndex,
|
|
78
87
|
resetSearchIndex,
|
|
79
88
|
resetStems,
|
|
89
|
+
resetTrackerItemWords,
|
|
80
90
|
rollBack,
|
|
81
91
|
rowCounts,
|
|
82
92
|
searchIndexState,
|
|
@@ -85,10 +95,10 @@ import {
|
|
|
85
95
|
storeClients,
|
|
86
96
|
storeContents,
|
|
87
97
|
vectorIndexCounts
|
|
88
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-NVWZ7S3I.js";
|
|
89
99
|
import {
|
|
90
100
|
openCache
|
|
91
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-7GWOGEWJ.js";
|
|
92
102
|
import {
|
|
93
103
|
Command,
|
|
94
104
|
LOCAL_READ,
|
|
@@ -116,14 +126,14 @@ import {
|
|
|
116
126
|
snakeKeys,
|
|
117
127
|
storeTable,
|
|
118
128
|
withoutProviderRefs
|
|
119
|
-
} from "./chunk-
|
|
129
|
+
} from "./chunk-W6A2OZ3C.js";
|
|
120
130
|
import {
|
|
121
131
|
holdersOf
|
|
122
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-N7F5KT6U.js";
|
|
123
133
|
import {
|
|
124
134
|
modelAddressAllowed,
|
|
125
135
|
onThisComputer
|
|
126
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-XB6O445X.js";
|
|
127
137
|
import {
|
|
128
138
|
currentRun,
|
|
129
139
|
formatLocator,
|
|
@@ -132,28 +142,28 @@ import {
|
|
|
132
142
|
readHealthMark,
|
|
133
143
|
readJournalMark,
|
|
134
144
|
recordDeepCheck
|
|
135
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-4CLSIEWN.js";
|
|
136
146
|
import {
|
|
137
147
|
failureKey,
|
|
138
148
|
isStoreDamage
|
|
139
|
-
} from "./chunk-
|
|
149
|
+
} from "./chunk-RZ7POTFA.js";
|
|
140
150
|
import {
|
|
141
151
|
readSharedSection,
|
|
142
152
|
sharedConfigPath,
|
|
143
153
|
writeSharedSection
|
|
144
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-YMRL7MYS.js";
|
|
145
155
|
import {
|
|
146
156
|
queryFieldsOf
|
|
147
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-QD4MTOI7.js";
|
|
148
158
|
import {
|
|
149
159
|
storePath
|
|
150
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-2OFCIF2W.js";
|
|
151
161
|
import {
|
|
152
162
|
Credentials,
|
|
153
163
|
isMovedRun,
|
|
154
164
|
resolvePaths,
|
|
155
165
|
writeSecurely
|
|
156
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-R2G3MWEF.js";
|
|
157
167
|
import {
|
|
158
168
|
array,
|
|
159
169
|
boolean,
|
|
@@ -175,12 +185,12 @@ import {
|
|
|
175
185
|
string,
|
|
176
186
|
transform,
|
|
177
187
|
trim
|
|
178
|
-
} from "./chunk-
|
|
188
|
+
} from "./chunk-RXBKVNOK.js";
|
|
179
189
|
import {
|
|
180
190
|
CliError,
|
|
181
191
|
singleLine,
|
|
182
192
|
visibleControls
|
|
183
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-GCUFGDKE.js";
|
|
184
194
|
import {
|
|
185
195
|
__commonJS,
|
|
186
196
|
__name,
|
|
@@ -5520,11 +5530,11 @@ var require_liquid_node = __commonJS({
|
|
|
5520
5530
|
}
|
|
5521
5531
|
});
|
|
5522
5532
|
|
|
5523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5524
5534
|
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";
|
|
5525
5535
|
import { dirname as dirname3, resolve } from "node:path";
|
|
5526
5536
|
|
|
5527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5528
5538
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5529
5539
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5530
5540
|
import { Transform } from "node:stream";
|
|
@@ -5631,7 +5641,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5631
5641
|
renameSync(pending, to);
|
|
5632
5642
|
}, "unsealFile");
|
|
5633
5643
|
|
|
5634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5635
5645
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5636
5646
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5637
5647
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5655,7 +5665,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5655
5665
|
};
|
|
5656
5666
|
}, "compatibilityOf");
|
|
5657
5667
|
|
|
5658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5659
5669
|
import { createHash as createHash2 } from "node:crypto";
|
|
5660
5670
|
var COPY_MARK = "__repair_";
|
|
5661
5671
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5909,19 +5919,19 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5909
5919
|
return found;
|
|
5910
5920
|
}, "deleteCopy");
|
|
5911
5921
|
|
|
5912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5913
5923
|
import { existsSync as existsSync4, statSync as statSync3 } from "node:fs";
|
|
5914
5924
|
|
|
5915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
5916
5926
|
import { existsSync as existsSync3 } from "node:fs";
|
|
5917
5927
|
|
|
5918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
5919
5929
|
import { execFileSync, spawn } from "node:child_process";
|
|
5920
5930
|
import { existsSync as existsSync2, readFileSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
5921
5931
|
import { basename, dirname, join } from "node:path";
|
|
5922
5932
|
import { Transform as Transform2 } from "node:stream";
|
|
5923
5933
|
|
|
5924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/store/refill.js
|
|
5925
5935
|
var REFILL_MARGIN_MS = 864e5;
|
|
5926
5936
|
var TIME_KEYS = 1e12;
|
|
5927
5937
|
var integerId = `external_id GLOB '[0-9]*' AND NOT external_id GLOB '*[^0-9]*'`;
|
|
@@ -6001,7 +6011,7 @@ var forgetMail = /* @__PURE__ */ __name((database, cutoff, now) => {
|
|
|
6001
6011
|
return [...folders].map(([account, count3]) => ({ account, folders: count3 }));
|
|
6002
6012
|
}, "forgetMail");
|
|
6003
6013
|
|
|
6004
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/store/recover.js
|
|
6005
6015
|
var SQLITE3_MINIMUM = [3, 43, 0];
|
|
6006
6016
|
var STORE_PARTS = ["", "-wal", "-shm"];
|
|
6007
6017
|
var RECOVER_LOCK = ".recover-lock";
|
|
@@ -6278,6 +6288,9 @@ var FILLERS = {
|
|
|
6278
6288
|
fillStems(database, { now });
|
|
6279
6289
|
}, "message_stems"),
|
|
6280
6290
|
attachment_words: /* @__PURE__ */ __name((database) => void resetAttachmentWords(database), "attachment_words"),
|
|
6291
|
+
crm_file_words: /* @__PURE__ */ __name((database) => void resetCrmFileWords(database), "crm_file_words"),
|
|
6292
|
+
tracker_item_words: /* @__PURE__ */ __name((database) => void resetTrackerItemWords(database), "tracker_item_words"),
|
|
6293
|
+
content_post_words: /* @__PURE__ */ __name((database) => void resetContentPostWords(database), "content_post_words"),
|
|
6281
6294
|
attachment_name_words: /* @__PURE__ */ __name((database) => (
|
|
6282
6295
|
// As migration 20 filled it: й and ё fold as the triggers fold them.
|
|
6283
6296
|
database.exec("INSERT INTO attachment_name_words (rowid, name) SELECT id, replace(replace(replace(replace(name, '\u0439', '\u0438'), '\u0419', '\u0418'), '\u0451', '\u0435'), '\u0401', '\u0415') FROM attachments WHERE name IS NOT NULL")
|
|
@@ -6529,7 +6542,7 @@ var recoverLocked = /* @__PURE__ */ __name(async ({ path, command, version, sqli
|
|
|
6529
6542
|
}
|
|
6530
6543
|
}, "recoverLocked");
|
|
6531
6544
|
|
|
6532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/store-recover.js
|
|
6533
6546
|
var COUNTED = [
|
|
6534
6547
|
"accounts",
|
|
6535
6548
|
"chats",
|
|
@@ -6685,7 +6698,7 @@ var storeRecoverCommand = /* @__PURE__ */ __name(({ command, version }) => {
|
|
|
6685
6698
|
return recover;
|
|
6686
6699
|
}, "storeRecoverCommand");
|
|
6687
6700
|
|
|
6688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
6689
6702
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
6690
6703
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync4(path) ? statSync3(path).size : 0, "bytesOf");
|
|
6691
6704
|
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
@@ -6731,7 +6744,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
6731
6744
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
6732
6745
|
}), "storeInfoCommand");
|
|
6733
6746
|
|
|
6734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
6735
6748
|
var ENCRYPT_OPTION = [
|
|
6736
6749
|
"--encrypt",
|
|
6737
6750
|
"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"
|
|
@@ -6750,7 +6763,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
6750
6763
|
return password;
|
|
6751
6764
|
}, "passwordOf");
|
|
6752
6765
|
|
|
6753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
6754
6767
|
import { existsSync as existsSync5, readFileSync as readFileSync2 } from "node:fs";
|
|
6755
6768
|
import { join as join2 } from "node:path";
|
|
6756
6769
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6921,7 +6934,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6921
6934
|
}, "problem");
|
|
6922
6935
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6923
6936
|
|
|
6924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6925
6938
|
import { existsSync as existsSync6, readFileSync as readFileSync3 } from "node:fs";
|
|
6926
6939
|
import { join as join3 } from "node:path";
|
|
6927
6940
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6974,7 +6987,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6974
6987
|
}, "recordReply");
|
|
6975
6988
|
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");
|
|
6976
6989
|
|
|
6977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6978
6991
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6979
6992
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6980
6993
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -7080,10 +7093,10 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
7080
7093
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
7081
7094
|
}, "filled");
|
|
7082
7095
|
|
|
7083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7084
7097
|
var import_liquidjs2 = __toESM(require_liquid_node(), 1);
|
|
7085
7098
|
|
|
7086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/render/liquid.js
|
|
7087
7100
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
7088
7101
|
var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
7089
7102
|
const engine = new import_liquidjs.Liquid({
|
|
@@ -7110,7 +7123,7 @@ var safeLiquid = /* @__PURE__ */ __name((limits) => {
|
|
|
7110
7123
|
return engine;
|
|
7111
7124
|
}, "safeLiquid");
|
|
7112
7125
|
|
|
7113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
7114
7127
|
var TEMPLATE_LIMITS = {
|
|
7115
7128
|
parse: 32768,
|
|
7116
7129
|
renders: 2e3,
|
|
@@ -7249,7 +7262,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
7249
7262
|
}
|
|
7250
7263
|
}, "renderReplyTemplate");
|
|
7251
7264
|
|
|
7252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
7253
7266
|
var DRY_RUN_DAYS = 7;
|
|
7254
7267
|
var PAGE = 500;
|
|
7255
7268
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -7363,7 +7376,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
7363
7376
|
}
|
|
7364
7377
|
}, "storedSince");
|
|
7365
7378
|
|
|
7366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/models/ai.js
|
|
7367
7380
|
var AI_PROVIDERS = ["anthropic", "openai", "ollama"];
|
|
7368
7381
|
var DEFAULT_BASE_URL = {
|
|
7369
7382
|
anthropic: "https://api.anthropic.com",
|
|
@@ -7513,7 +7526,7 @@ var checkAi = /* @__PURE__ */ __name(async (deps) => {
|
|
|
7513
7526
|
}
|
|
7514
7527
|
}, "checkAi");
|
|
7515
7528
|
|
|
7516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/models/purpose.js
|
|
7517
7530
|
var HOSTED = {
|
|
7518
7531
|
openai: "https://api.openai.com/v1",
|
|
7519
7532
|
anthropic: "https://api.anthropic.com"
|
|
@@ -7534,7 +7547,7 @@ var purposeModel = /* @__PURE__ */ __name((settings, purpose, deps) => {
|
|
|
7534
7547
|
return shared ? { target: shared.target, key: /* @__PURE__ */ __name(() => shared.key, "key"), shared: shared.setting } : void 0;
|
|
7535
7548
|
}, "purposeModel");
|
|
7536
7549
|
|
|
7537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7550
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
7538
7551
|
import { existsSync as existsSync7, readFileSync as readFileSync4 } from "node:fs";
|
|
7539
7552
|
import { join as join4 } from "node:path";
|
|
7540
7553
|
var shape = strictObject({
|
|
@@ -7559,7 +7572,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
7559
7572
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
7560
7573
|
}, "mayModelReply");
|
|
7561
7574
|
|
|
7562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
7563
7576
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options = {
|
|
7564
7577
|
ai: true
|
|
7565
7578
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -7607,7 +7620,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
7607
7620
|
return result2;
|
|
7608
7621
|
}, "replyRenderer");
|
|
7609
7622
|
|
|
7610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
7611
7624
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
7612
7625
|
var NO_RULES = "no rules";
|
|
7613
7626
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -7700,7 +7713,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
7700
7713
|
return { skip: why };
|
|
7701
7714
|
}, "replyTo");
|
|
7702
7715
|
|
|
7703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
7704
7717
|
var START_SYNC_DELAY_MS = 3e4;
|
|
7705
7718
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
7706
7719
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -7777,7 +7790,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch, note, warn,
|
|
|
7777
7790
|
};
|
|
7778
7791
|
}, "startSync");
|
|
7779
7792
|
|
|
7780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
7781
7794
|
var FIRST_FETCH_MS = 6e4;
|
|
7782
7795
|
var DAY_MS = 864e5;
|
|
7783
7796
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -7831,7 +7844,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch, warn, firstMs =
|
|
|
7831
7844
|
};
|
|
7832
7845
|
}, "memberFetches");
|
|
7833
7846
|
|
|
7834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
7835
7848
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
7836
7849
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
7837
7850
|
if (context.format === "pretty") {
|
|
@@ -7864,7 +7877,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7864
7877
|
return context;
|
|
7865
7878
|
}, "recordDiagnostics");
|
|
7866
7879
|
|
|
7867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-outdated.js
|
|
7868
7881
|
import { existsSync as existsSync8, readFileSync as readFileSync5, realpathSync as realpathSync2 } from "node:fs";
|
|
7869
7882
|
import { dirname as dirname2, join as join5 } from "node:path";
|
|
7870
7883
|
var OUTDATED_CHECK_MS = 6e4;
|
|
@@ -7950,7 +7963,7 @@ var watchOutdated = /* @__PURE__ */ __name(({ check: check2, onOutdated, everyMs
|
|
|
7950
7963
|
};
|
|
7951
7964
|
}, "watchOutdated");
|
|
7952
7965
|
|
|
7953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7954
7967
|
var STEMS_EVERY_MS = 3e4;
|
|
7955
7968
|
var STEMS_SLICE_MS = 2e3;
|
|
7956
7969
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7990,7 +8003,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7990
8003
|
};
|
|
7991
8004
|
}, "stemFills");
|
|
7992
8005
|
|
|
7993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
7994
8007
|
import { styleText } from "node:util";
|
|
7995
8008
|
var TIME_WIDTH = 8;
|
|
7996
8009
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -8166,7 +8179,7 @@ var editedAt = /* @__PURE__ */ __name((message, options) => {
|
|
|
8166
8179
|
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
8167
8180
|
}, "editedAt");
|
|
8168
8181
|
|
|
8169
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
8170
8183
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
8171
8184
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
8172
8185
|
kind: attachment.kind,
|
|
@@ -8262,7 +8275,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
8262
8275
|
locale: messenger.app.locale
|
|
8263
8276
|
}), "viewOf");
|
|
8264
8277
|
|
|
8265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
8266
8279
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
8267
8280
|
value: value.value,
|
|
8268
8281
|
observed_at: value.observedAt,
|
|
@@ -8329,7 +8342,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
8329
8342
|
}
|
|
8330
8343
|
}, "watchEventItem");
|
|
8331
8344
|
|
|
8332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
8333
8346
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
8334
8347
|
output: { entity: "watch_item" },
|
|
8335
8348
|
effects: REMOTE_READ,
|
|
@@ -8484,7 +8497,8 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
8484
8497
|
}
|
|
8485
8498
|
}, "describe");
|
|
8486
8499
|
|
|
8487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
8501
|
+
var CURRENT_EVERY_MS = 6e4;
|
|
8488
8502
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
8489
8503
|
const command = annotate(new Command("serve"), {
|
|
8490
8504
|
output: { entity: "serve_summary" },
|
|
@@ -8507,9 +8521,18 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8507
8521
|
throw new CliError("validation_error", `${messenger.app.command} serve is already running for profile ${context.profile} (PID ${held.pid}, since ${held.startedAt})`);
|
|
8508
8522
|
}
|
|
8509
8523
|
let relaying;
|
|
8524
|
+
let current;
|
|
8525
|
+
const stamp = /* @__PURE__ */ __name(() => {
|
|
8526
|
+
try {
|
|
8527
|
+
markCurrent(path);
|
|
8528
|
+
} catch {
|
|
8529
|
+
}
|
|
8530
|
+
}, "stamp");
|
|
8510
8531
|
const onReady = /* @__PURE__ */ __name(() => {
|
|
8511
8532
|
const listening2 = { pid: process.pid, startedAt, version, listeningAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
8512
8533
|
holdLock(path, listening2);
|
|
8534
|
+
stamp();
|
|
8535
|
+
current ??= setInterval(stamp, CURRENT_EVERY_MS).unref();
|
|
8513
8536
|
note({
|
|
8514
8537
|
code: "listening",
|
|
8515
8538
|
text: `listening for profile ${context.profile}, catching up on what arrived while it was down`
|
|
@@ -8630,6 +8653,10 @@ var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
8630
8653
|
}, "connected")
|
|
8631
8654
|
});
|
|
8632
8655
|
} finally {
|
|
8656
|
+
if (current) {
|
|
8657
|
+
clearInterval(current);
|
|
8658
|
+
stamp();
|
|
8659
|
+
}
|
|
8633
8660
|
watch.stop();
|
|
8634
8661
|
await relaying;
|
|
8635
8662
|
await relay?.close();
|
|
@@ -8770,7 +8797,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
8770
8797
|
};
|
|
8771
8798
|
}, "tasking");
|
|
8772
8799
|
|
|
8773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
8774
8801
|
import { existsSync as existsSync9 } from "node:fs";
|
|
8775
8802
|
var PATH = "store tables list";
|
|
8776
8803
|
var STORE_TABLES_QUERY = {
|
|
@@ -8813,7 +8840,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((owner) => {
|
|
|
8813
8840
|
return tables;
|
|
8814
8841
|
}, "storeTablesCommand");
|
|
8815
8842
|
|
|
8816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
8817
8844
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
8818
8845
|
var WORD_INDEX = "message_words";
|
|
8819
8846
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -9055,7 +9082,10 @@ var inspect = /* @__PURE__ */ __name((path) => reading(path, (database) => {
|
|
|
9055
9082
|
...schema.version > 0 ? SEARCH_INDEXES.map((index) => [index, indexIntegrity(database, index)]) : [],
|
|
9056
9083
|
...wordIndex ? [[WORD_INDEX, indexIntegrity(database, WORD_INDEX, 0)]] : [],
|
|
9057
9084
|
...stems ? [["message_stems", indexIntegrity(database, "message_stems", 0)]] : [],
|
|
9058
|
-
...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : []
|
|
9085
|
+
...schema.version > 0 ? [["attachment_words", indexIntegrity(database, "attachment_words", 0)]] : [],
|
|
9086
|
+
...schema.version >= 68 ? [["crm_file_words", indexIntegrity(database, "crm_file_words", 0)]] : [],
|
|
9087
|
+
...schema.version >= 70 ? [["tracker_item_words", indexIntegrity(database, "tracker_item_words", 0)]] : [],
|
|
9088
|
+
...schema.version >= 71 ? [["content_post_words", indexIntegrity(database, "content_post_words", 0)]] : []
|
|
9059
9089
|
]);
|
|
9060
9090
|
const size = bytesOf2(path) + bytesOf2(`${path}-wal`);
|
|
9061
9091
|
const { bavail, bsize } = statfsSync2(dirname3(path));
|
|
@@ -9223,7 +9253,7 @@ var reindexCommand = /* @__PURE__ */ __name((owner) => destroysNothing(annotate(
|
|
|
9223
9253
|
throw new CliError("validation_error", `the store is behind this build \u2014 \`${lineOf(this, "store migrate")}\` first`);
|
|
9224
9254
|
}
|
|
9225
9255
|
resetSearchIndex(database);
|
|
9226
|
-
const fileTexts = resetAttachmentWords(database);
|
|
9256
|
+
const fileTexts = resetAttachmentWords(database) + resetCrmFileWords(database) + resetTrackerItemWords(database) + resetContentPostWords(database);
|
|
9227
9257
|
const words = buildWordIndex(database, (note) => renderer.note(note));
|
|
9228
9258
|
return {
|
|
9229
9259
|
path,
|