@wirecat/zoom-cli 0.67.0 → 0.68.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/dist/answer-entities.d.ts +18 -0
- package/dist/answer-entities.d.ts.map +1 -1
- package/dist/answer-entities.js +12 -0
- package/dist/answer-entities.js.map +1 -1
- package/dist/answer-policy.d.ts.map +1 -1
- package/dist/answer-policy.js +2 -1
- package/dist/answer-policy.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-SEW2VL76.js → all-profiles-R66UM3HM.js} +12 -12
- package/dist/bundle/answer-policy-UCGUO53A.js +104 -0
- package/dist/bundle/{anthropic-FSNASJML.js → anthropic-4ZI2BPLG.js} +7 -7
- package/dist/bundle/{app-server-EVSRYJ3H.js → app-server-64O5IQI5.js} +61 -58
- package/dist/bundle/{bun-DACL5SVO.js → bun-HUHQD76Z.js} +2 -2
- package/dist/bundle/{bun-sqlite-HQ2KOXSI.js → bun-sqlite-VOVHPTIF.js} +6 -6
- package/dist/bundle/{chunk-SMVO5R3T.js → chunk-2OSBCYJT.js} +39 -26
- package/dist/bundle/{chunk-TBRG2DPE.js → chunk-2T6XHWDX.js} +2 -2
- package/dist/bundle/{chunk-6AJDVJVZ.js → chunk-32FPA7P2.js} +2 -2
- package/dist/bundle/{chunk-7LLUUXJB.js → chunk-355PHJYX.js} +1 -1
- package/dist/bundle/{chunk-3GO3KME7.js → chunk-3BRV2YU2.js} +3 -3
- package/dist/bundle/{chunk-I7SOXH64.js → chunk-474WF55M.js} +53 -39
- package/dist/bundle/{chunk-L643D4RJ.js → chunk-4TLPOY22.js} +12 -12
- package/dist/bundle/{chunk-D6OXI2NV.js → chunk-4YFJYSSK.js} +205 -59
- package/dist/bundle/chunk-5JAYUG3X.js +261 -0
- package/dist/bundle/{chunk-VNIBTNV4.js → chunk-65T3PU75.js} +2 -2
- package/dist/bundle/{chunk-6TZF2JP7.js → chunk-6CJ7NHIP.js} +13 -13
- package/dist/bundle/{chunk-MWEOVTIF.js → chunk-6T3P226D.js} +4 -4
- package/dist/bundle/{chunk-EPDRF66S.js → chunk-6TJ62LZQ.js} +22 -14
- package/dist/bundle/{chunk-ZRMZBMOF.js → chunk-6XO7RTJY.js} +66 -6
- package/dist/bundle/{chunk-VFIEYRYD.js → chunk-77I67HWF.js} +8 -8
- package/dist/bundle/{chunk-QX2MAT6I.js → chunk-77KFLU5F.js} +3 -3
- package/dist/bundle/{chunk-4GCKDO2H.js → chunk-7AUP2WT3.js} +3 -3
- package/dist/bundle/{chunk-7VU5UGRR.js → chunk-7DUYFITC.js} +16 -16
- package/dist/bundle/{chunk-ASCHAVNW.js → chunk-7QNJICKZ.js} +27 -27
- package/dist/bundle/{chunk-KWRSC6O6.js → chunk-A63ZFOQJ.js} +18 -4
- package/dist/bundle/{chunk-SSXCOUP3.js → chunk-AJ7CMUGD.js} +464 -220
- package/dist/bundle/{chunk-SCFFCIIP.js → chunk-AVEIQMHZ.js} +2 -2
- package/dist/bundle/chunk-AYEVBAGO.js +178 -0
- package/dist/bundle/{chunk-AAZFLJSH.js → chunk-B6JMVB6R.js} +10 -10
- package/dist/bundle/{chunk-CRLBTNC4.js → chunk-BL36NSV5.js} +3 -3
- package/dist/bundle/{chunk-4UVT2QCO.js → chunk-BOAMDYLY.js} +4 -4
- package/dist/bundle/chunk-BSM43OMN.js +31 -0
- package/dist/bundle/{chunk-QEI55M2F.js → chunk-DGNPJGD3.js} +16 -10
- package/dist/bundle/{chunk-SOZVC3SV.js → chunk-DVA6MQWK.js} +1 -1
- package/dist/bundle/{chunk-YRNZT4GQ.js → chunk-DWSUSWAX.js} +98 -13
- package/dist/bundle/{chunk-LFQ73UFK.js → chunk-EH5QGQFR.js} +3 -3
- package/dist/bundle/{chunk-OZEYFJX2.js → chunk-EJDV5IIF.js} +1 -1
- package/dist/bundle/{chunk-VQTAU4DV.js → chunk-EWIBLDQQ.js} +8 -8
- package/dist/bundle/{chunk-4ZR5DJ26.js → chunk-EZRPSZJS.js} +3 -3
- package/dist/bundle/{chunk-KIJLM5UL.js → chunk-FBLUKCIR.js} +1 -1
- package/dist/bundle/{chunk-WZ5XK74U.js → chunk-FEM2JQN2.js} +1 -1
- package/dist/bundle/{chunk-GP4NSYDU.js → chunk-FMQS7HCC.js} +12 -12
- package/dist/bundle/{chunk-B5Z4XPVS.js → chunk-FNQASORM.js} +2 -2
- package/dist/bundle/{chunk-FWU3ZYHE.js → chunk-GOXDBCDM.js} +728 -130
- package/dist/bundle/{chunk-CLEZE65P.js → chunk-HXOAPH47.js} +1 -1
- package/dist/bundle/{chunk-7K5TDTZY.js → chunk-JO4YADNV.js} +7 -7
- package/dist/bundle/{chunk-4U2555EQ.js → chunk-JRCYFCPL.js} +30 -28
- package/dist/bundle/{chunk-L6CAUVMU.js → chunk-K67V24AT.js} +5 -5
- package/dist/bundle/{chunk-B3KWAULD.js → chunk-KAPJQGHE.js} +2 -2
- package/dist/bundle/{chunk-T6CZWSHF.js → chunk-KNE6VFHZ.js} +21 -21
- package/dist/bundle/{chunk-LM26DJOK.js → chunk-KUB2U5NT.js} +6 -6
- package/dist/bundle/{chunk-EUPZSR2G.js → chunk-L4WVLRXM.js} +4 -4
- package/dist/bundle/{chunk-BKY4XVB4.js → chunk-LBOSTBAY.js} +1248 -617
- package/dist/bundle/{chunk-C6UKW7JO.js → chunk-LV7QRR5S.js} +6 -6
- package/dist/bundle/{chunk-FGTPREAZ.js → chunk-LYWUG43B.js} +33 -33
- package/dist/bundle/{chunk-NTZDM5SJ.js → chunk-NRRI37NJ.js} +9 -9
- package/dist/bundle/{chunk-J3ZBEWQY.js → chunk-NUJMJQXV.js} +54 -147
- package/dist/bundle/{chunk-6IBM4Z3V.js → chunk-OE7EIP5L.js} +1 -1
- package/dist/bundle/{chunk-ZMPTO2WB.js → chunk-P2TISY3R.js} +1 -1
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-V33VGWT3.js → chunk-PIHBD3YS.js} +16 -6
- package/dist/bundle/{chunk-RYKG6AEH.js → chunk-PUTGTW6W.js} +4 -2
- package/dist/bundle/{chunk-L6WUAGPN.js → chunk-QXTREL2M.js} +3 -3
- package/dist/bundle/{chunk-X67YD3QI.js → chunk-R7LFGEDE.js} +2 -2
- package/dist/bundle/{chunk-2UW533HQ.js → chunk-RGJ7OWHU.js} +4 -4
- package/dist/bundle/{chunk-LKJXTACE.js → chunk-RP3U3J53.js} +7 -7
- package/dist/bundle/{chunk-DG4DWAU7.js → chunk-RRYUD2EF.js} +3 -3
- package/dist/bundle/{chunk-Q65SDEFN.js → chunk-SRP6SFFD.js} +2 -2
- package/dist/bundle/{chunk-4KDZ22RA.js → chunk-SSPSNSC5.js} +1 -1
- package/dist/bundle/{chunk-DFUPETW7.js → chunk-TDGZMC6K.js} +130 -75
- package/dist/bundle/{chunk-EQ7XRRKV.js → chunk-TN3FH2GQ.js} +11 -11
- package/dist/bundle/chunk-TUNQ6NE2.js +64 -0
- package/dist/bundle/{chunk-FXQPK742.js → chunk-TZUKDM72.js} +29 -15
- package/dist/bundle/{chunk-IFDO3YPJ.js → chunk-UDJTRFRV.js} +1 -1
- package/dist/bundle/{chunk-ESFMHBHH.js → chunk-US5C3WAY.js} +60 -51
- package/dist/bundle/{chunk-KANH7GBB.js → chunk-UU5PLDRA.js} +2 -2
- package/dist/bundle/{chunk-OTMGAKUM.js → chunk-VLD7Y4SY.js} +7 -7
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-JVCHGI7W.js → chunk-W42BJ65M.js} +1 -1
- package/dist/bundle/{chunk-RAMPYIO2.js → chunk-Y5LP5SHV.js} +11 -11
- package/dist/bundle/{chunk-WHQ4ZCJI.js → chunk-YJY3W2ZT.js} +210 -85
- package/dist/bundle/{chunk-3ZIHUSMM.js → chunk-YOAEZSDG.js} +2 -2
- package/dist/bundle/{chunk-M43MBWJX.js → chunk-YQRNFG2E.js} +13471 -1289
- package/dist/bundle/{chunk-7HAIM7GV.js → chunk-YTF2WPV4.js} +601 -443
- package/dist/bundle/{chunk-6UFWFKFH.js → chunk-ZRD3NDOX.js} +2 -2
- package/dist/bundle/{cli-YUATSOLA.js → cli-VQJ7ZRYR.js} +89 -61
- package/dist/bundle/command-contract-JPUWWYIV.js +41 -0
- package/dist/bundle/config-YGLLR77A.js +90 -0
- package/dist/bundle/{decode-IL44LNC3.js → decode-L3ENO2XH.js} +6 -6
- package/dist/bundle/{dispatch-3BGIXSJR.js → dispatch-5MGDLOK4.js} +9 -9
- package/dist/bundle/{dist-3W27UQ2S.js → dist-WQLS7U23.js} +47 -27
- package/dist/bundle/{echarts-CO4D26JF.js → echarts-5LLJ6JXC.js} +2 -2
- package/dist/bundle/{embed-XH2X4DFM.js → embed-37MYTCU7.js} +7 -7
- package/dist/bundle/{embedder-WTFWDXBJ.js → embedder-GNGHVJAO.js} +10 -10
- package/dist/bundle/{failure-HTIS3NLS.js → failure-CR64C4XA.js} +3 -3
- package/dist/bundle/{first-run-5RBH7FDO.js → first-run-NR5JKYP3.js} +12 -12
- package/dist/bundle/first-screen-RCR7ATO2.js +39 -0
- package/dist/bundle/{folders-F4DNQPIY.js → folders-VU4IN35Y.js} +5 -5
- package/dist/bundle/{instructions-EPPBL6TT.js → instructions-P72XX4AK.js} +1 -1
- package/dist/bundle/{main-LVQTCDZS.js → main-QYFCYSTW.js} +21 -23
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{meetings-BMELXRTR.js → meetings-66UQINKI.js} +13 -7
- package/dist/bundle/{node-CQVMWVIG.js → node-ZB4RNICS.js} +2 -2
- package/dist/bundle/{node-sqlite-QQEX7LZT.js → node-sqlite-XPRKBDF3.js} +7 -7
- package/dist/bundle/{oauth-AYGX7CQS.js → oauth-WJRDUU5J.js} +8 -8
- package/dist/bundle/{open-MIL2TOT6.js → open-S2YSIEOW.js} +6 -6
- package/dist/bundle/openai-CRNZFNZD.js +25 -0
- package/dist/bundle/{output-file-4XADZPYH.js → output-file-6COFGPUL.js} +6 -6
- package/dist/bundle/{process-NJVQK6GB.js → process-XNN4WG6N.js} +1 -1
- package/dist/bundle/{program-WUYRS6H7.js → program-BRPJKRCX.js} +115 -187
- package/dist/bundle/{prompt-J4QPFLEA.js → prompt-7RQOL25I.js} +6 -6
- package/dist/bundle/{recognize-OLJZVNWW.js → recognize-N5WADGQB.js} +5 -5
- package/dist/bundle/{remote-JPUXNYLV.js → remote-WHYV35IF.js} +8 -8
- package/dist/bundle/{rerank-XVV3X5TT.js → rerank-FBMZVWSH.js} +8 -8
- package/dist/bundle/{run-log-DJXBEVS5.js → run-log-TOCHREH2.js} +59 -59
- package/dist/bundle/{serve-NYYUO3MR.js → serve-4BABX4WS.js} +10 -10
- package/dist/bundle/{server-4Z5E4YTT.js → server-CDVI6LOB.js} +47 -47
- package/dist/bundle/server-XOFQKFVO.js +72 -0
- package/dist/bundle/{services-EKWM76HP.js → services-PIY33I7R.js} +43 -33
- package/dist/bundle/{speech-WFJ44ACJ.js → speech-LS5Q4FL2.js} +14 -14
- package/dist/bundle/{state-VIRCT4VW.js → state-YUX5R2R7.js} +7 -7
- package/dist/bundle/{store-ZTDZ6UY5.js → store-BD7HAXAA.js} +20 -18
- package/dist/bundle/{store-2Q4GEZJS.js → store-ERMGBF2B.js} +49 -29
- package/dist/bundle/store-connection-JBR6CMTJ.js +83 -0
- package/dist/bundle/store-maintenance-command-I5DUSO2C.js +62 -0
- package/dist/bundle/{streaming-7BPKIGAS.js → streaming-O53PIORL.js} +7 -7
- package/dist/bundle/{tokens-CQHMMKNX.js → tokens-QKNEP2GJ.js} +7 -7
- package/dist/bundle/zm.js +9 -10
- package/dist/bundle/zoom-app-XJXZ4ZBX.js +41 -0
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +1 -0
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -3
- package/dist/config.js.map +1 -1
- package/dist/identity.d.ts +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +11 -0
- package/dist/identity.js.map +1 -1
- package/dist/program-bindings.d.ts.map +1 -1
- package/dist/program-bindings.js +7 -2
- package/dist/program-bindings.js.map +1 -1
- package/dist/setup-commands.d.ts +6 -0
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +24 -9
- package/dist/setup-commands.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/zoom-app.d.ts +32 -0
- package/dist/zoom-app.d.ts.map +1 -1
- package/dist/zoom-app.js +61 -0
- package/dist/zoom-app.js.map +1 -1
- package/package.json +3 -3
- package/dist/bundle/answer-policy-5OYUL6UF.js +0 -103
- package/dist/bundle/chunk-54RTMQL6.js +0 -132
- package/dist/bundle/chunk-6VFORXL3.js +0 -101
- package/dist/bundle/chunk-D4KBD63W.js +0 -19
- package/dist/bundle/chunk-SXFODCYK.js +0 -9
- package/dist/bundle/chunk-Z3WXI4DK.js +0 -31
- package/dist/bundle/command-contract-UWHY55UE.js +0 -41
- package/dist/bundle/config-TGF6E6ZD.js +0 -89
- package/dist/bundle/first-screen-PGFIXJAX.js +0 -39
- package/dist/bundle/openai-7QZZXQW5.js +0 -25
- package/dist/bundle/server-VW5UVCH7.js +0 -72
- package/dist/bundle/store-connection-FKVVQLEF.js +0 -83
- package/dist/bundle/store-maintenance-command-AU73UVUQ.js +0 -62
- package/dist/bundle/zoom-app-OEKFMJS6.js +0 -25
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6CJ7NHIP.js";
|
|
12
12
|
import {
|
|
13
13
|
isNewer,
|
|
14
14
|
updateCommand
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BOAMDYLY.js";
|
|
16
16
|
import {
|
|
17
17
|
MAX_ACTIONS,
|
|
18
18
|
ModerationRules,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
someUndone,
|
|
31
31
|
validateFormattedText,
|
|
32
32
|
visibleFormattedText
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-FMQS7HCC.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_IMAGE_MODEL,
|
|
36
36
|
DEFAULT_RERANK_MODEL,
|
|
@@ -58,10 +58,10 @@ import {
|
|
|
58
58
|
typedCommand,
|
|
59
59
|
vectorModelKey,
|
|
60
60
|
withAttempt
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-JRCYFCPL.js";
|
|
62
62
|
import {
|
|
63
63
|
isCliFailure
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-YOAEZSDG.js";
|
|
65
65
|
import {
|
|
66
66
|
AGENDA_COLUMNS,
|
|
67
67
|
CHAT_COLUMNS,
|
|
@@ -126,6 +126,7 @@ import {
|
|
|
126
126
|
normalizeVocabularyName,
|
|
127
127
|
outOfTime,
|
|
128
128
|
pdfPreviewLimits,
|
|
129
|
+
plainQuery,
|
|
129
130
|
proposerOfAction,
|
|
130
131
|
queryFilter,
|
|
131
132
|
rankingContextRange,
|
|
@@ -135,13 +136,13 @@ import {
|
|
|
135
136
|
validateAst,
|
|
136
137
|
validateFields,
|
|
137
138
|
withoutField
|
|
138
|
-
} from "./chunk-
|
|
139
|
+
} from "./chunk-YQRNFG2E.js";
|
|
139
140
|
import {
|
|
140
141
|
DEFAULT_STEMMERS,
|
|
141
142
|
createStemmer,
|
|
142
143
|
fold,
|
|
143
144
|
normalize
|
|
144
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-77I67HWF.js";
|
|
145
146
|
import {
|
|
146
147
|
COUNTER_FIELDS,
|
|
147
148
|
INTERNAL_NOTES,
|
|
@@ -164,30 +165,30 @@ import {
|
|
|
164
165
|
rankingOptions,
|
|
165
166
|
rankingQuestion,
|
|
166
167
|
recordErrors
|
|
167
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-NUJMJQXV.js";
|
|
168
169
|
import {
|
|
169
170
|
TASK_KINDS,
|
|
170
171
|
TASK_ORIGINS,
|
|
171
172
|
TASK_STATES,
|
|
172
173
|
createTaskService,
|
|
173
174
|
isClosedState
|
|
174
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-DWSUSWAX.js";
|
|
175
176
|
import {
|
|
176
177
|
DEFAULT_TASK_CATEGORIES,
|
|
177
178
|
FALLBACK_CATEGORY
|
|
178
|
-
} from "./chunk-
|
|
179
|
+
} from "./chunk-VLD7Y4SY.js";
|
|
179
180
|
import {
|
|
180
181
|
normalizeTag
|
|
181
|
-
} from "./chunk-
|
|
182
|
+
} from "./chunk-AYEVBAGO.js";
|
|
182
183
|
import {
|
|
183
184
|
MAX_MODEL_IMAGE_BYTES
|
|
184
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-ZRD3NDOX.js";
|
|
185
186
|
import {
|
|
186
187
|
OPENAI_URL,
|
|
187
188
|
openRemote,
|
|
188
189
|
remoteKey,
|
|
189
190
|
remoteModel
|
|
190
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-3BRV2YU2.js";
|
|
191
192
|
import {
|
|
192
193
|
Unzip,
|
|
193
194
|
UnzipInflate,
|
|
@@ -198,16 +199,17 @@ import {
|
|
|
198
199
|
placedText,
|
|
199
200
|
runEmbedders,
|
|
200
201
|
textModelsDirectory
|
|
201
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-KUB2U5NT.js";
|
|
202
203
|
import {
|
|
203
204
|
installFiles,
|
|
204
205
|
megabytes
|
|
205
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-6TJ62LZQ.js";
|
|
206
207
|
import {
|
|
207
208
|
storePath,
|
|
208
209
|
wirecatDirectory
|
|
209
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-32FPA7P2.js";
|
|
210
211
|
import {
|
|
212
|
+
MEETING_FIELD_NAMES,
|
|
211
213
|
MEETING_FINDINGS_KIND,
|
|
212
214
|
canonicalMeetingReference,
|
|
213
215
|
createMeetingContext,
|
|
@@ -225,7 +227,7 @@ import {
|
|
|
225
227
|
validateMeetingHitSearch,
|
|
226
228
|
validateMeetingPassage,
|
|
227
229
|
validateMeetingSeriesHistory
|
|
228
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-TDGZMC6K.js";
|
|
229
231
|
import {
|
|
230
232
|
OPERATORS_BY_TYPE,
|
|
231
233
|
dateRange,
|
|
@@ -236,10 +238,10 @@ import {
|
|
|
236
238
|
timezoneOf,
|
|
237
239
|
validateQuery,
|
|
238
240
|
walkQuery
|
|
239
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-B6JMVB6R.js";
|
|
240
242
|
import {
|
|
241
243
|
resolvePaths
|
|
242
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-KNE6VFHZ.js";
|
|
243
245
|
import {
|
|
244
246
|
array,
|
|
245
247
|
maxLength,
|
|
@@ -253,7 +255,7 @@ import {
|
|
|
253
255
|
safeParse,
|
|
254
256
|
strictObject,
|
|
255
257
|
string
|
|
256
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-NRRI37NJ.js";
|
|
257
259
|
import {
|
|
258
260
|
importFrom,
|
|
259
261
|
resolveFrom
|
|
@@ -261,10 +263,10 @@ import {
|
|
|
261
263
|
import {
|
|
262
264
|
CliError,
|
|
263
265
|
isCliError
|
|
264
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-FEM2JQN2.js";
|
|
265
267
|
import {
|
|
266
268
|
singleLine
|
|
267
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-OE7EIP5L.js";
|
|
268
270
|
import {
|
|
269
271
|
__commonJS,
|
|
270
272
|
__name,
|
|
@@ -16880,7 +16882,7 @@ var require_lib3 = __commonJS({
|
|
|
16880
16882
|
}
|
|
16881
16883
|
});
|
|
16882
16884
|
|
|
16883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
16884
16886
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
16885
16887
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
16886
16888
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -16957,7 +16959,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
16957
16959
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
16958
16960
|
}, "storeOnlyDeps");
|
|
16959
16961
|
|
|
16960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
16961
16963
|
var DAY_MS = 864e5;
|
|
16962
16964
|
var NEW_DAYS = 30;
|
|
16963
16965
|
var SAME_TEXT_MIN = 20;
|
|
@@ -17034,7 +17036,23 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
17034
17036
|
};
|
|
17035
17037
|
}, "scorePerson");
|
|
17036
17038
|
|
|
17037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
17040
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
17041
|
+
const controller = new AbortController();
|
|
17042
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
17043
|
+
timer.unref();
|
|
17044
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
17045
|
+
}, "timeLimit");
|
|
17046
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
17047
|
+
const limit = timeLimit(ms);
|
|
17048
|
+
try {
|
|
17049
|
+
return await run(limit.signal);
|
|
17050
|
+
} finally {
|
|
17051
|
+
limit.clear();
|
|
17052
|
+
}
|
|
17053
|
+
}, "withTimeLimit");
|
|
17054
|
+
|
|
17055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
17038
17056
|
var REGISTRIES = {
|
|
17039
17057
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
17040
17058
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -17043,16 +17061,18 @@ var TIMEOUT_MS = 1e4;
|
|
|
17043
17061
|
var askRegistries = /* @__PURE__ */ __name(async (id2, options = {}) => Promise.all([askCas(id2, options), askLols(id2, options)]), "askRegistries");
|
|
17044
17062
|
var getJson = /* @__PURE__ */ __name(async (url, headers, { fetch: fetchFn = fetch, timeoutMs = TIMEOUT_MS }) => {
|
|
17045
17063
|
try {
|
|
17046
|
-
const
|
|
17047
|
-
|
|
17048
|
-
|
|
17049
|
-
|
|
17064
|
+
const { status, text: text2 } = await withTimeLimit(timeoutMs, async (signal) => {
|
|
17065
|
+
const response = await fetchFn(url, {
|
|
17066
|
+
headers: { accept: "application/json", ...headers },
|
|
17067
|
+
signal,
|
|
17068
|
+
redirect: "error"
|
|
17069
|
+
});
|
|
17070
|
+
return { status: response.status, text: await response.text() };
|
|
17050
17071
|
});
|
|
17051
|
-
const text2 = await response.text();
|
|
17052
17072
|
try {
|
|
17053
|
-
return { status
|
|
17073
|
+
return { status, body: JSON.parse(text2) };
|
|
17054
17074
|
} catch {
|
|
17055
|
-
return { failed: `answered ${
|
|
17075
|
+
return { failed: `answered ${status} with something that is not JSON` };
|
|
17056
17076
|
}
|
|
17057
17077
|
} catch (error) {
|
|
17058
17078
|
return {
|
|
@@ -17119,7 +17139,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
17119
17139
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
17120
17140
|
})), "notCovered");
|
|
17121
17141
|
|
|
17122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
17123
17143
|
var ACTIVITY_MESSAGES = 1e3;
|
|
17124
17144
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
17125
17145
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -17207,7 +17227,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
17207
17227
|
};
|
|
17208
17228
|
}, "botCheckService");
|
|
17209
17229
|
|
|
17210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17230
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
17211
17231
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
17212
17232
|
if (newest === null)
|
|
17213
17233
|
return null;
|
|
@@ -17216,7 +17236,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
17216
17236
|
return newest.addressed ? "owed" : null;
|
|
17217
17237
|
}, "mailTurn");
|
|
17218
17238
|
|
|
17219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
17220
17240
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
17221
17241
|
if (error instanceof CliError && error.code === "not_found")
|
|
17222
17242
|
return void 0;
|
|
@@ -17274,7 +17294,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account2, since, chats)
|
|
|
17274
17294
|
};
|
|
17275
17295
|
}, "mailActivity");
|
|
17276
17296
|
|
|
17277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
17278
17298
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
17279
17299
|
const ids = [...new Set(chatIds)];
|
|
17280
17300
|
if (ids.length === 0)
|
|
@@ -17300,7 +17320,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
17300
17320
|
}));
|
|
17301
17321
|
}, "chatCoverage");
|
|
17302
17322
|
|
|
17303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17323
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
17304
17324
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
17305
17325
|
if (value === void 0)
|
|
17306
17326
|
return void 0;
|
|
@@ -17310,7 +17330,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
17310
17330
|
return id2;
|
|
17311
17331
|
}, "threadIdOf");
|
|
17312
17332
|
|
|
17313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17314
17334
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17315
17335
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17316
17336
|
if (key in own)
|
|
@@ -17327,15 +17347,15 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17327
17347
|
return found.bind(adapter);
|
|
17328
17348
|
}, "capability");
|
|
17329
17349
|
|
|
17330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17331
17351
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17332
17352
|
|
|
17333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17334
17354
|
import { randomBytes } from "node:crypto";
|
|
17335
17355
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17336
17356
|
var newOperationId = newSendId;
|
|
17337
17357
|
|
|
17338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17339
17359
|
var LINKS = /https?:\/\/\S+/g;
|
|
17340
17360
|
var unanswered = /* @__PURE__ */ __name((messages, { answerers: answerers2, before: before2 }) => questions(messages, { answerers: answerers2 }).filter(({ question, answer }) => answer === void 0 && Date.parse(question.timestamp) < before2).map(({ question }) => question), "unanswered");
|
|
17341
17361
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -17365,7 +17385,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
17365
17385
|
});
|
|
17366
17386
|
}, "questions");
|
|
17367
17387
|
|
|
17368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
17369
17389
|
var TOP_POSTS = 5;
|
|
17370
17390
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
17371
17391
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -17482,7 +17502,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
17482
17502
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
17483
17503
|
}, "median");
|
|
17484
17504
|
|
|
17485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
17486
17506
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
17487
17507
|
const events = [];
|
|
17488
17508
|
for (const stay of stays) {
|
|
@@ -17514,7 +17534,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
17514
17534
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
17515
17535
|
}, "memberEvents");
|
|
17516
17536
|
|
|
17517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17518
17538
|
var AUDIT_PAGE = 200;
|
|
17519
17539
|
var AUDIT_BUDGET = 10;
|
|
17520
17540
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17594,7 +17614,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17594
17614
|
return found;
|
|
17595
17615
|
}, "burstJoins");
|
|
17596
17616
|
|
|
17597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
17598
17618
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
17599
17619
|
if (deps.reads !== "store")
|
|
17600
17620
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -17753,7 +17773,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
17753
17773
|
}
|
|
17754
17774
|
}, "senderAmong");
|
|
17755
17775
|
|
|
17756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
17757
17777
|
var EVENTS_DAYS = 7;
|
|
17758
17778
|
var TRACKED_DAYS = 30;
|
|
17759
17779
|
var STATS_PAGE = 1e3;
|
|
@@ -17871,8 +17891,8 @@ var chatsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
17871
17891
|
});
|
|
17872
17892
|
const counts = await store.roster.memberCounts(chatId, { since: new Date(from).toISOString().slice(0, 10) });
|
|
17873
17893
|
const known2 = unrecorded ? { ...stats, complete: false, membersUnrecorded: true } : stats;
|
|
17874
|
-
const
|
|
17875
|
-
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ?
|
|
17894
|
+
const counted2 = counts.length > 0 ? { ...known2, memberCounts: counts } : known2;
|
|
17895
|
+
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ? counted2 : { ...counted2, fetch: typedCommand(deps.messenger.app.command, `messages sync ${chatId}`) };
|
|
17876
17896
|
}, "stats"),
|
|
17877
17897
|
sendAs: /* @__PURE__ */ __name(async (chat) => {
|
|
17878
17898
|
if (deps.offline) {
|
|
@@ -18048,7 +18068,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
18048
18068
|
return members.length === 0 ? null : members;
|
|
18049
18069
|
}, "storedMembers");
|
|
18050
18070
|
|
|
18051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
18052
18072
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
18053
18073
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
18054
18074
|
const name = typed.trim().toLowerCase();
|
|
@@ -18072,7 +18092,7 @@ var triggerStems = /* @__PURE__ */ __name((categories) => {
|
|
|
18072
18092
|
const { english, spanish } = stemmersOf();
|
|
18073
18093
|
const built = categories.map(({ name, triggers }) => ({
|
|
18074
18094
|
name,
|
|
18075
|
-
english: new Set(Object.values(triggers).flatMap((
|
|
18095
|
+
english: new Set(Object.values(triggers).flatMap((words4) => words4.flatMap((word) => english.stemTokens(word)))),
|
|
18076
18096
|
spanish: new Set(triggers.es.flatMap((word) => spanish.stemTokens(word)))
|
|
18077
18097
|
}));
|
|
18078
18098
|
stemsByList.set(categories, built);
|
|
@@ -18082,7 +18102,7 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
18082
18102
|
const stem = stemmersOf();
|
|
18083
18103
|
const english = stem.english.stemTokens(text2);
|
|
18084
18104
|
const spanish = readsSpanish(text2) ? stem.spanish.stemTokens(text2) : [];
|
|
18085
|
-
const
|
|
18105
|
+
const counted2 = [];
|
|
18086
18106
|
for (const triggers of triggerStems(categories)) {
|
|
18087
18107
|
const hit = /* @__PURE__ */ new Set();
|
|
18088
18108
|
english.forEach((word, at) => {
|
|
@@ -18092,20 +18112,20 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
18092
18112
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
18093
18113
|
hit.add(other);
|
|
18094
18114
|
});
|
|
18095
|
-
|
|
18115
|
+
counted2.push({ name: triggers.name, hits: hit.size });
|
|
18096
18116
|
}
|
|
18097
|
-
return
|
|
18117
|
+
return counted2;
|
|
18098
18118
|
}, "hitsByList");
|
|
18099
18119
|
var listsHit = /* @__PURE__ */ __name((text2, categories) => hitsByList(text2, categories).filter(({ hits }) => hits > 0).map(({ name }) => name), "listsHit");
|
|
18100
18120
|
var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGORIES) => {
|
|
18101
18121
|
let best = { name: FALLBACK_CATEGORY, hits: 0 };
|
|
18102
|
-
for (const
|
|
18103
|
-
if (
|
|
18104
|
-
best =
|
|
18122
|
+
for (const counted2 of hitsByList(text2, categories))
|
|
18123
|
+
if (counted2.hits > best.hits)
|
|
18124
|
+
best = counted2;
|
|
18105
18125
|
return best.name;
|
|
18106
18126
|
}, "categorize");
|
|
18107
18127
|
|
|
18108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
18109
18129
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
18110
18130
|
var RULES_IN = {
|
|
18111
18131
|
dialog: "all",
|
|
@@ -18311,7 +18331,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
18311
18331
|
return passes;
|
|
18312
18332
|
}, "applyTaskRulesToChats");
|
|
18313
18333
|
|
|
18314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
18315
18335
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
18316
18336
|
const tags = /* @__PURE__ */ new Map();
|
|
18317
18337
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -18320,7 +18340,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
18320
18340
|
return tags;
|
|
18321
18341
|
}, "taskTagFilters");
|
|
18322
18342
|
|
|
18323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
18324
18344
|
var DAY = 864e5;
|
|
18325
18345
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
18326
18346
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -18567,7 +18587,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
18567
18587
|
};
|
|
18568
18588
|
}, "agendaItem");
|
|
18569
18589
|
|
|
18570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
18571
18591
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
18572
18592
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
18573
18593
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -18631,7 +18651,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
18631
18651
|
}
|
|
18632
18652
|
}, "validateContextEvidencePage");
|
|
18633
18653
|
|
|
18634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
18635
18655
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
18636
18656
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
18637
18657
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -18684,7 +18704,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
18684
18704
|
};
|
|
18685
18705
|
}, "contextReadBudget");
|
|
18686
18706
|
|
|
18687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
18688
18708
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
18689
18709
|
if (!port || typeof port.read !== "function")
|
|
18690
18710
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -18728,7 +18748,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
18728
18748
|
};
|
|
18729
18749
|
}, "createContextEvidenceReader");
|
|
18730
18750
|
|
|
18731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
18732
18752
|
var queryWords = /* @__PURE__ */ __name((query) => query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[\p{L}_]+:/u, "").replace(/~\d+$/u, "").replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word)), "queryWords");
|
|
18733
18753
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
18734
18754
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -18744,7 +18764,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
18744
18764
|
}, "excerpt");
|
|
18745
18765
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
18746
18766
|
|
|
18747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
18748
18768
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
18749
18769
|
dryRun,
|
|
18750
18770
|
source: null,
|
|
@@ -18819,7 +18839,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account: account2,
|
|
|
18819
18839
|
return receipt;
|
|
18820
18840
|
}, "ingest");
|
|
18821
18841
|
|
|
18822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
18823
18843
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
18824
18844
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
18825
18845
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -18858,7 +18878,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
18858
18878
|
return found;
|
|
18859
18879
|
}, "identitiesIn");
|
|
18860
18880
|
|
|
18861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
18862
18882
|
var SEARCH_LIMIT = 500;
|
|
18863
18883
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
18864
18884
|
var aliasHits = {
|
|
@@ -18907,7 +18927,7 @@ var aliasHits = {
|
|
|
18907
18927
|
}, "candidates")
|
|
18908
18928
|
};
|
|
18909
18929
|
|
|
18910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
18911
18931
|
var WEIGHT = 0.5;
|
|
18912
18932
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
18913
18933
|
var LARGE_GROUP = 30;
|
|
@@ -18959,7 +18979,7 @@ var chatSenders = {
|
|
|
18959
18979
|
}, "candidates")
|
|
18960
18980
|
};
|
|
18961
18981
|
|
|
18962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
18963
18983
|
var WEIGHT2 = 0.7;
|
|
18964
18984
|
var chatTitle = {
|
|
18965
18985
|
id: "chat-title",
|
|
@@ -18998,7 +19018,7 @@ var chatTitle = {
|
|
|
18998
19018
|
}, "candidates")
|
|
18999
19019
|
};
|
|
19000
19020
|
|
|
19001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
19002
19022
|
var WEIGHT3 = 0.3;
|
|
19003
19023
|
var CONTACTS = 500;
|
|
19004
19024
|
var MOST_PAIRS = 200;
|
|
@@ -19059,7 +19079,7 @@ var emailDomain = {
|
|
|
19059
19079
|
}, "candidates")
|
|
19060
19080
|
};
|
|
19061
19081
|
|
|
19062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
19063
19083
|
var NAMED = 0.7;
|
|
19064
19084
|
var MEMBER_ONLY = 0.3;
|
|
19065
19085
|
var READ_LIMIT2 = 500;
|
|
@@ -19132,7 +19152,7 @@ var mailThread = {
|
|
|
19132
19152
|
}, "candidates")
|
|
19133
19153
|
};
|
|
19134
19154
|
|
|
19135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
19136
19156
|
var WEIGHT4 = 0.5;
|
|
19137
19157
|
var memberChats = {
|
|
19138
19158
|
id: "member-chats",
|
|
@@ -19172,7 +19192,7 @@ var memberChats = {
|
|
|
19172
19192
|
}, "candidates")
|
|
19173
19193
|
};
|
|
19174
19194
|
|
|
19175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
19176
19196
|
var WEIGHT5 = 0.6;
|
|
19177
19197
|
var memberDialog = {
|
|
19178
19198
|
id: "member-dialog",
|
|
@@ -19206,7 +19226,7 @@ var memberDialog = {
|
|
|
19206
19226
|
}, "candidates")
|
|
19207
19227
|
};
|
|
19208
19228
|
|
|
19209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19229
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
19210
19230
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
19211
19231
|
var DEFAULT_PURPOSES = ["work"];
|
|
19212
19232
|
var LINK_PURPOSE = "work";
|
|
@@ -19217,15 +19237,15 @@ var unknown = /* @__PURE__ */ __name((asked, config) => {
|
|
|
19217
19237
|
throw new CliError("validation_error", `unknown purpose ${wrong.join(", ")}; the configured ones are ${config.purposes.join(", ")}, or all`, { param: "purpose", purposes: [...config.purposes] });
|
|
19218
19238
|
}, "unknown");
|
|
19219
19239
|
var purposesOf = /* @__PURE__ */ __name((asked, config = BUILT_IN_PURPOSE_CONFIG, project) => {
|
|
19220
|
-
const
|
|
19221
|
-
if (
|
|
19222
|
-
if (
|
|
19240
|
+
const words4 = (asked ?? []).map((one2) => one2.trim()).filter(Boolean);
|
|
19241
|
+
if (words4.includes("all")) {
|
|
19242
|
+
if (words4.length > 1)
|
|
19223
19243
|
throw new CliError("validation_error", "--purpose all reads every purpose; give it alone");
|
|
19224
19244
|
return "all";
|
|
19225
19245
|
}
|
|
19226
|
-
if (
|
|
19227
|
-
unknown(
|
|
19228
|
-
return new Set(
|
|
19246
|
+
if (words4.length) {
|
|
19247
|
+
unknown(words4, config);
|
|
19248
|
+
return new Set(words4);
|
|
19229
19249
|
}
|
|
19230
19250
|
const own = (project?.key ? config.projects?.[project.key] : void 0) ?? (project?.ref ? config.projects?.[project.ref] : void 0);
|
|
19231
19251
|
return new Set(own ?? config.defaults);
|
|
@@ -19236,7 +19256,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
19236
19256
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
19237
19257
|
], "purposeList");
|
|
19238
19258
|
|
|
19239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
19240
19260
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
19241
19261
|
async around(ref, window2) {
|
|
19242
19262
|
const at = parseLocator(ref);
|
|
@@ -19255,8 +19275,8 @@ var wordsOf = /* @__PURE__ */ __name((text2) => (text2.match(/[\p{L}\p{N}\p{M}]+
|
|
|
19255
19275
|
var documentMatches = /* @__PURE__ */ __name((text2, queries, window2) => {
|
|
19256
19276
|
const paragraphs = text2.split(/\n\s*\n/).map((part) => part.replace(/\s+/g, " ").trim()).filter(Boolean);
|
|
19257
19277
|
const query = queries.join(" ");
|
|
19258
|
-
const
|
|
19259
|
-
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) =>
|
|
19278
|
+
const words4 = new Set(wordsOf(query));
|
|
19279
|
+
const matching2 = paragraphs.flatMap((part, index) => wordsOf(part).some((word) => words4.has(word)) ? [index] : []);
|
|
19260
19280
|
const hit = matching2[0];
|
|
19261
19281
|
if (hit === void 0 || paragraphs.length < 2)
|
|
19262
19282
|
return { around: [], moreMatches: 0 };
|
|
@@ -19332,7 +19352,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
19332
19352
|
};
|
|
19333
19353
|
}, "storedNeighbours");
|
|
19334
19354
|
|
|
19335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
19336
19356
|
import { createHash } from "node:crypto";
|
|
19337
19357
|
var DAY2 = 864e5;
|
|
19338
19358
|
var MAX_TIME = 864e13;
|
|
@@ -19366,10 +19386,10 @@ var text = /* @__PURE__ */ __name((value, name, max) => typeof value === "string
|
|
|
19366
19386
|
var whole = /* @__PURE__ */ __name((value, name, low, high) => Number.isSafeInteger(value) && value >= low && value <= high ? value : fail(`${name} must be a whole number from ${low} to ${high}`, name), "whole");
|
|
19367
19387
|
var laneQuery = /* @__PURE__ */ __name((value, name) => {
|
|
19368
19388
|
const query = text(value, name, 2048);
|
|
19369
|
-
const
|
|
19370
|
-
if (!
|
|
19389
|
+
const words4 = query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
19390
|
+
if (!words4.length || words4.length > 16)
|
|
19371
19391
|
fail(`${name} needs 1\u201316 literal words`, name);
|
|
19372
|
-
return
|
|
19392
|
+
return words4.join(" ");
|
|
19373
19393
|
}, "laneQuery");
|
|
19374
19394
|
var list = /* @__PURE__ */ __name((value, name, max) => {
|
|
19375
19395
|
if (value === void 0)
|
|
@@ -19648,7 +19668,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
19648
19668
|
return value;
|
|
19649
19669
|
}, "decodeCheckpoint");
|
|
19650
19670
|
|
|
19651
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
19652
19672
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
19653
19673
|
var PAGE = 20;
|
|
19654
19674
|
var PEOPLE = 20;
|
|
@@ -20052,7 +20072,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
20052
20072
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
20053
20073
|
}, "peopleOf");
|
|
20054
20074
|
|
|
20055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
20056
20076
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
20057
20077
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
20058
20078
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -20117,7 +20137,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
20117
20137
|
omittedMatches: omitted
|
|
20118
20138
|
})), "matchProjectCandidates");
|
|
20119
20139
|
|
|
20120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
20121
20141
|
var KINDS = ["project", "tag", "topic"];
|
|
20122
20142
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
20123
20143
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -20172,7 +20192,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
20172
20192
|
};
|
|
20173
20193
|
}, "findEvidenceMentions");
|
|
20174
20194
|
|
|
20175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
20176
20196
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account2, chatId, { since, until }) => {
|
|
20177
20197
|
const window2 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
20178
20198
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -20440,7 +20460,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20440
20460
|
const leftOut = [];
|
|
20441
20461
|
for (const one2 of all.filter((chat) => !purposeRead(purposes, chat.purpose))) {
|
|
20442
20462
|
const account2 = { provider: one2.provider, account: one2.account };
|
|
20443
|
-
const [
|
|
20463
|
+
const [counted2, [held]] = await Promise.all([
|
|
20444
20464
|
count3(account2, one2.chat, { since: gathered.window.after, until: gathered.window.before }),
|
|
20445
20465
|
chatCoverage(store, account2, [one2.chat])
|
|
20446
20466
|
]);
|
|
@@ -20453,7 +20473,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
20453
20473
|
purpose: one2.purpose ?? LINK_PURPOSE,
|
|
20454
20474
|
relationship: one2.relationship,
|
|
20455
20475
|
...one2.proposed ? { proposed: one2.proposed } : {},
|
|
20456
|
-
...
|
|
20476
|
+
...counted2
|
|
20457
20477
|
});
|
|
20458
20478
|
}
|
|
20459
20479
|
return {
|
|
@@ -20478,7 +20498,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
20478
20498
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
20479
20499
|
}, "purposeHintOf");
|
|
20480
20500
|
|
|
20481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
20482
20502
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
20483
20503
|
var PERSON_SCORERS = [emailDomain];
|
|
20484
20504
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -20686,18 +20706,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
20686
20706
|
}, "referenceOf");
|
|
20687
20707
|
var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
|
|
20688
20708
|
|
|
20689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
20690
20710
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
20691
20711
|
|
|
20692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
20693
20713
|
import { lstat } from "node:fs/promises";
|
|
20694
20714
|
|
|
20695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20696
20716
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
20697
20717
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
20698
20718
|
import { join as join2 } from "node:path";
|
|
20699
20719
|
|
|
20700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
20701
20721
|
import { createHash as createHash2 } from "node:crypto";
|
|
20702
20722
|
var metadataLimit = 16384;
|
|
20703
20723
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -20757,7 +20777,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
20757
20777
|
}
|
|
20758
20778
|
}, "readPartialMetadata");
|
|
20759
20779
|
|
|
20760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
20761
20781
|
import { randomUUID } from "node:crypto";
|
|
20762
20782
|
import { open, rename, unlink } from "node:fs/promises";
|
|
20763
20783
|
import { join } from "node:path";
|
|
@@ -20849,7 +20869,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
20849
20869
|
};
|
|
20850
20870
|
}, "partialWriter");
|
|
20851
20871
|
|
|
20852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20853
20873
|
var NativeRecordingPartialStore = class {
|
|
20854
20874
|
static {
|
|
20855
20875
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -20956,12 +20976,12 @@ var NativeRecordingPartialStore = class {
|
|
|
20956
20976
|
}
|
|
20957
20977
|
};
|
|
20958
20978
|
|
|
20959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
20960
20980
|
import { createHash as createHash4 } from "node:crypto";
|
|
20961
20981
|
import { link } from "node:fs/promises";
|
|
20962
20982
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
20963
20983
|
|
|
20964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
20965
20985
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
20966
20986
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
20967
20987
|
signal?.throwIfAborted();
|
|
@@ -20996,7 +21016,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
20996
21016
|
signal?.throwIfAborted();
|
|
20997
21017
|
}, "commitPublication");
|
|
20998
21018
|
|
|
20999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21000
21020
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21001
21021
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21002
21022
|
import { join as join3 } from "node:path";
|
|
@@ -21069,7 +21089,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21069
21089
|
}
|
|
21070
21090
|
}, "writePublicationJournal");
|
|
21071
21091
|
|
|
21072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21073
21093
|
var NativeRecordingPublication = class {
|
|
21074
21094
|
static {
|
|
21075
21095
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21142,7 +21162,7 @@ var NativeRecordingPublication = class {
|
|
|
21142
21162
|
}
|
|
21143
21163
|
};
|
|
21144
21164
|
|
|
21145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21146
21166
|
import { createHash as createHash5 } from "node:crypto";
|
|
21147
21167
|
import { readdir } from "node:fs/promises";
|
|
21148
21168
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -21229,7 +21249,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
21229
21249
|
beforePublish
|
|
21230
21250
|
}), "commitMediaEntry");
|
|
21231
21251
|
|
|
21232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21233
21253
|
var validator = '"media-completed-v1"';
|
|
21234
21254
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21235
21255
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21330,7 +21350,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
21330
21350
|
return entry;
|
|
21331
21351
|
}, "archiveMediaFile");
|
|
21332
21352
|
|
|
21333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21334
21354
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21335
21355
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
21336
21356
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -21397,7 +21417,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21397
21417
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21398
21418
|
}, "withMediaArchiveLocks");
|
|
21399
21419
|
|
|
21400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21401
21421
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
21402
21422
|
if (value === void 0)
|
|
21403
21423
|
return void 0;
|
|
@@ -21550,7 +21570,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
21550
21570
|
}, { create: true });
|
|
21551
21571
|
}, "archiveMedia");
|
|
21552
21572
|
|
|
21553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
21554
21574
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
21555
21575
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
21556
21576
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -21703,7 +21723,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
21703
21723
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
21704
21724
|
}, "moveMediaArchive");
|
|
21705
21725
|
|
|
21706
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21726
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
21707
21727
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
21708
21728
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
21709
21729
|
}, "progress") }) => {
|
|
@@ -21714,7 +21734,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
21714
21734
|
}
|
|
21715
21735
|
}, "nativeRuntime");
|
|
21716
21736
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21717
|
-
}, "progress"), acceptTerms = false }) => {
|
|
21737
|
+
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
21718
21738
|
const model = textModel(id2);
|
|
21719
21739
|
if (model.terms && !acceptTerms) {
|
|
21720
21740
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
@@ -21722,11 +21742,11 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21722
21742
|
const directory2 = textModelsDirectory(env);
|
|
21723
21743
|
if (!isTextModelInstalled(model, directory2)) {
|
|
21724
21744
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21725
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
21745
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21726
21746
|
}
|
|
21727
21747
|
await nativeRuntime({ env, progress });
|
|
21728
21748
|
progress(`${model.id}: loading it once to check it works`);
|
|
21729
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
21749
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-37MYTCU7.js");
|
|
21730
21750
|
const embedder = await openEmbedder2(model, directory2);
|
|
21731
21751
|
try {
|
|
21732
21752
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -21738,16 +21758,16 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21738
21758
|
return { model, directory: directory2 };
|
|
21739
21759
|
}, "downloadTextModel");
|
|
21740
21760
|
var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21741
|
-
}, "progress") }) => {
|
|
21761
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
21742
21762
|
const model = rerankModel(id2);
|
|
21743
21763
|
const directory2 = textModelsDirectory(env);
|
|
21744
21764
|
if (!isTextModelInstalled(model, directory2)) {
|
|
21745
21765
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21746
|
-
await installFiles(placedText(model, directory2), { progress });
|
|
21766
|
+
await installFiles(placedText(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21747
21767
|
}
|
|
21748
21768
|
await nativeRuntime({ env, progress });
|
|
21749
21769
|
progress(`${model.id}: loading it once to check it works`);
|
|
21750
|
-
const { openReranker } = await import("./rerank-
|
|
21770
|
+
const { openReranker } = await import("./rerank-FBMZVWSH.js");
|
|
21751
21771
|
const reranker = await openReranker(model, directory2);
|
|
21752
21772
|
try {
|
|
21753
21773
|
await reranker.score("check", ["check"]);
|
|
@@ -21757,15 +21777,15 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
21757
21777
|
return { model, directory: directory2 };
|
|
21758
21778
|
}, "downloadRerankModel");
|
|
21759
21779
|
var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
21760
|
-
}, "progress") }) => {
|
|
21780
|
+
}, "progress"), bytes: bytes2 }) => {
|
|
21761
21781
|
const model = imageModel(id2);
|
|
21762
21782
|
const directory2 = imageModelsDirectory(env);
|
|
21763
21783
|
if (!isImageModelInstalled(model, directory2)) {
|
|
21764
21784
|
progress(`${model.id}: ${megabytes(bytesOf(model))} from Hugging Face`);
|
|
21765
|
-
await installFiles(placedImage(model, directory2), { progress });
|
|
21785
|
+
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
21766
21786
|
}
|
|
21767
21787
|
progress(`${model.id}: loading it once to check it works`);
|
|
21768
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
21788
|
+
const { openPictureEmbedder } = await import("./embedder-GNGHVJAO.js");
|
|
21769
21789
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
21770
21790
|
try {
|
|
21771
21791
|
const vector = await embedder.embedQuery("check");
|
|
@@ -21777,7 +21797,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
21777
21797
|
return { model, directory: directory2 };
|
|
21778
21798
|
}, "downloadImageModel");
|
|
21779
21799
|
|
|
21780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
21781
21801
|
var MONEY_REQUEST = "money-request";
|
|
21782
21802
|
var MONEY_DONE = "money-done";
|
|
21783
21803
|
var PROMISE = "promise";
|
|
@@ -21811,10 +21831,10 @@ var MONEY_WORDS = [
|
|
|
21811
21831
|
}
|
|
21812
21832
|
];
|
|
21813
21833
|
|
|
21814
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
21815
21835
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
21816
21836
|
|
|
21817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
21818
21838
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
21819
21839
|
var MONEY_DONE_FORMS = words([
|
|
21820
21840
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -21854,7 +21874,7 @@ var PROMISE_FORMS = words([
|
|
|
21854
21874
|
"estar\xE1 listo"
|
|
21855
21875
|
]);
|
|
21856
21876
|
|
|
21857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
21858
21878
|
var EXCERPT_CHARS = 80;
|
|
21859
21879
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
21860
21880
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -21876,7 +21896,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
21876
21896
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
21877
21897
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
21878
21898
|
|
|
21879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
21880
21900
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
21881
21901
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
21882
21902
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -21916,10 +21936,10 @@ var rowsOf = /* @__PURE__ */ __name((chat) => chat.messages.flatMap((message) =>
|
|
|
21916
21936
|
var centsText = /* @__PURE__ */ __name((cents) => `${Math.floor(cents / 100)}.${String(cents % 100).padStart(2, "0")}`, "centsText");
|
|
21917
21937
|
var amounts = {
|
|
21918
21938
|
id: "amounts",
|
|
21919
|
-
version:
|
|
21939
|
+
version: 3,
|
|
21920
21940
|
scope: "chat",
|
|
21921
|
-
read: /* @__PURE__ */ __name(async (
|
|
21922
|
-
if (!chat)
|
|
21941
|
+
read: /* @__PURE__ */ __name(async (context2, chat) => {
|
|
21942
|
+
if (!chat || context2.books)
|
|
21923
21943
|
return [];
|
|
21924
21944
|
const groups = /* @__PURE__ */ new Map();
|
|
21925
21945
|
for (const row of rowsOf(chat)) {
|
|
@@ -21932,7 +21952,8 @@ var amounts = {
|
|
|
21932
21952
|
const lastAsk = asks.at(-1);
|
|
21933
21953
|
const first2 = asks[0] ?? done2[0] ?? rows[0];
|
|
21934
21954
|
const paidAfter = done2.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
|
|
21935
|
-
const
|
|
21955
|
+
const paid2 = asks.length ? paidAfter : done2.length > 0;
|
|
21956
|
+
const state = paid2 ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
|
|
21936
21957
|
const cited2 = asks.length ? [...asks, ...paidAfter ? done2.slice(-1) : []] : rows;
|
|
21937
21958
|
return {
|
|
21938
21959
|
signal: "amounts",
|
|
@@ -21953,10 +21974,10 @@ var amounts = {
|
|
|
21953
21974
|
};
|
|
21954
21975
|
});
|
|
21955
21976
|
}, "read"),
|
|
21956
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "
|
|
21977
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
21957
21978
|
};
|
|
21958
21979
|
|
|
21959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
21960
21981
|
var children = {
|
|
21961
21982
|
id: "children",
|
|
21962
21983
|
version: 1,
|
|
@@ -21985,7 +22006,7 @@ var children = {
|
|
|
21985
22006
|
}, "read")
|
|
21986
22007
|
};
|
|
21987
22008
|
|
|
21988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
21989
22010
|
var coverage = {
|
|
21990
22011
|
id: "coverage",
|
|
21991
22012
|
version: 1,
|
|
@@ -22014,29 +22035,7 @@ var coverage = {
|
|
|
22014
22035
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
|
|
22015
22036
|
};
|
|
22016
22037
|
|
|
22017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22018
|
-
var lastMessage = {
|
|
22019
|
-
id: "last-message",
|
|
22020
|
-
version: 1,
|
|
22021
|
-
scope: "chat",
|
|
22022
|
-
read: /* @__PURE__ */ __name(async (_context, chat) => {
|
|
22023
|
-
const last = chat?.messages.at(-1);
|
|
22024
|
-
if (!chat || !last)
|
|
22025
|
-
return [];
|
|
22026
|
-
const item2 = {
|
|
22027
|
-
signal: "last-message",
|
|
22028
|
-
chat: chat.ref,
|
|
22029
|
-
at: last.timestamp,
|
|
22030
|
-
who: whoOf(last),
|
|
22031
|
-
evidence: evidenceOf(chat, last),
|
|
22032
|
-
basis: "store",
|
|
22033
|
-
data: {}
|
|
22034
|
-
};
|
|
22035
|
-
return [item2];
|
|
22036
|
-
}, "read")
|
|
22037
|
-
};
|
|
22038
|
-
|
|
22039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.570.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_093219d088c44dcb3d8868e1fe992f3e/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
22038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
22040
22039
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
22041
22040
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
22042
22041
|
signal: "payments",
|
|
@@ -22086,7 +22085,7 @@ var payments = {
|
|
|
22086
22085
|
}, "read")
|
|
22087
22086
|
};
|
|
22088
22087
|
|
|
22089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
22090
22089
|
var PATTERNS_PER_CHAT = 3;
|
|
22091
22090
|
var DAY3 = 864e5;
|
|
22092
22091
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -22175,7 +22174,7 @@ var promises = {
|
|
|
22175
22174
|
}, "read")
|
|
22176
22175
|
};
|
|
22177
22176
|
|
|
22178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
22179
22178
|
var PER_SIDE = 5;
|
|
22180
22179
|
var WEEK = 7 * 864e5;
|
|
22181
22180
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -22206,7 +22205,7 @@ var questions2 = {
|
|
|
22206
22205
|
}, "attention")
|
|
22207
22206
|
};
|
|
22208
22207
|
|
|
22209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
22210
22209
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
22211
22210
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
22212
22211
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -22274,14 +22273,14 @@ var replyNext = {
|
|
|
22274
22273
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
22275
22274
|
};
|
|
22276
22275
|
|
|
22277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
22278
22277
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
22279
22278
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
22280
22279
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
22281
|
-
const
|
|
22280
|
+
const words4 = normalize(query).split(" ").filter(Boolean).map(wholeWord);
|
|
22282
22281
|
return (text2) => {
|
|
22283
22282
|
const folded2 = normalize(text2);
|
|
22284
|
-
return
|
|
22283
|
+
return words4.length > 0 && words4.every((word) => word.test(folded2));
|
|
22285
22284
|
};
|
|
22286
22285
|
}, "matcherOf");
|
|
22287
22286
|
var topics = {
|
|
@@ -22320,9 +22319,8 @@ var topics = {
|
|
|
22320
22319
|
}, "read")
|
|
22321
22320
|
};
|
|
22322
22321
|
|
|
22323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
22324
22323
|
var STATUS_SIGNALS = [
|
|
22325
|
-
lastMessage,
|
|
22326
22324
|
replyNext,
|
|
22327
22325
|
questions2,
|
|
22328
22326
|
promises,
|
|
@@ -22333,7 +22331,7 @@ var STATUS_SIGNALS = [
|
|
|
22333
22331
|
children
|
|
22334
22332
|
];
|
|
22335
22333
|
|
|
22336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
22337
22335
|
var DAY4 = 864e5;
|
|
22338
22336
|
var STATUS_WINDOW = 300;
|
|
22339
22337
|
var STATUS_CHATS = 16;
|
|
@@ -22378,17 +22376,23 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
22378
22376
|
}, "childrenOf");
|
|
22379
22377
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account2) => accounts === void 0 || accounts.some((one2) => one2.provider === provider && one2.account === account2), "inAccounts");
|
|
22380
22378
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
22381
|
-
var
|
|
22382
|
-
const
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22379
|
+
var owed = /* @__PURE__ */ __name((item2) => {
|
|
22380
|
+
const data = item2.data;
|
|
22381
|
+
return item2.signal === "payments" && data.state === "expected" && data.status === "confirmed";
|
|
22382
|
+
}, "owed");
|
|
22383
|
+
var keepsBooks = /* @__PURE__ */ __name(async (store, projects) => {
|
|
22384
|
+
for (const project of projects) {
|
|
22385
|
+
const filter = { project, review: "confirmed", limit: 1 };
|
|
22386
|
+
if ((await store.finance.invoices(filter)).length || (await store.finance.payments(filter)).length)
|
|
22387
|
+
return true;
|
|
22388
|
+
}
|
|
22389
|
+
return false;
|
|
22390
|
+
}, "keepsBooks");
|
|
22386
22391
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
22387
22392
|
const totals = /* @__PURE__ */ new Map();
|
|
22388
|
-
const open7 = counted2(items);
|
|
22389
22393
|
for (const item2 of items) {
|
|
22390
22394
|
const data = item2.data;
|
|
22391
|
-
if (!
|
|
22395
|
+
if (!owed(item2) || data.amount === void 0)
|
|
22392
22396
|
continue;
|
|
22393
22397
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
22394
22398
|
const total = totals.get(key) ?? {
|
|
@@ -22471,6 +22475,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22471
22475
|
chats,
|
|
22472
22476
|
project: { ...root, children: children2, cut },
|
|
22473
22477
|
store,
|
|
22478
|
+
books: await keepsBooks(store, [root.ref, ...children2.map((child) => child.ref)]),
|
|
22474
22479
|
contextQueries: input.contextQueries ?? []
|
|
22475
22480
|
};
|
|
22476
22481
|
const items = [];
|
|
@@ -22515,7 +22520,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
22515
22520
|
};
|
|
22516
22521
|
}, "projectStatus");
|
|
22517
22522
|
|
|
22518
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22523
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
22519
22524
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
22520
22525
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
22521
22526
|
if (deps.offline)
|
|
@@ -22587,7 +22592,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
22587
22592
|
};
|
|
22588
22593
|
}, "accountService");
|
|
22589
22594
|
|
|
22590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
22591
22596
|
var MINUTE = 6e4;
|
|
22592
22597
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
22593
22598
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -22606,7 +22611,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
22606
22611
|
return new Date(at - at % MINUTE).toISOString();
|
|
22607
22612
|
}, "sendTime");
|
|
22608
22613
|
|
|
22609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
22610
22615
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
22611
22616
|
try {
|
|
22612
22617
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -22752,21 +22757,21 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
22752
22757
|
const answerAll = capability(connection, "answerAllJoinRequests", "answer every join request at once");
|
|
22753
22758
|
const { id: chatId } = await connection.resolve(chat);
|
|
22754
22759
|
const page = await list2(chatId, { limit: 100, ...link4 === void 0 ? {} : { link: link4 } });
|
|
22755
|
-
const
|
|
22760
|
+
const counted2 = page.total ?? page.items.length;
|
|
22756
22761
|
if (page.total === void 0 && page.hasMore)
|
|
22757
22762
|
throw new CliError("validation_error", "too many requests to count; answer them by person, or by --link");
|
|
22758
|
-
if (
|
|
22759
|
-
return { chatId, accepted: accept, counted:
|
|
22763
|
+
if (counted2 === 0)
|
|
22764
|
+
return { chatId, accepted: accept, counted: counted2 };
|
|
22760
22765
|
const operationId = newOperationId();
|
|
22761
22766
|
await guardedWrite(deps.guard, {
|
|
22762
22767
|
operationId,
|
|
22763
22768
|
chatId,
|
|
22764
22769
|
kind: "chat",
|
|
22765
22770
|
action: accept ? "requests.accept" : "requests.decline",
|
|
22766
|
-
count:
|
|
22767
|
-
people:
|
|
22771
|
+
count: counted2,
|
|
22772
|
+
people: counted2
|
|
22768
22773
|
}, () => answerAll(chatId, accept, link4));
|
|
22769
|
-
return { operationId, chatId, accepted: accept, counted:
|
|
22774
|
+
return { operationId, chatId, accepted: accept, counted: counted2 };
|
|
22770
22775
|
}, "answerAllRequests"),
|
|
22771
22776
|
links: /* @__PURE__ */ __name(async (chat, window2) => {
|
|
22772
22777
|
if (deps.offline)
|
|
@@ -22853,7 +22858,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
22853
22858
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
22854
22859
|
}, "linkLimits");
|
|
22855
22860
|
|
|
22856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
22857
22862
|
var THREADS_PAGE = 500;
|
|
22858
22863
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
22859
22864
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -22932,7 +22937,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
22932
22937
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
22933
22938
|
}, "readMail");
|
|
22934
22939
|
|
|
22935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
22936
22941
|
var NO_MAIL = "no_mail";
|
|
22937
22942
|
var MAIL = "email";
|
|
22938
22943
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -22979,7 +22984,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
22979
22984
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
22980
22985
|
}, "accountsOfKind");
|
|
22981
22986
|
|
|
22982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
22983
22988
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
22984
22989
|
var positiveSources = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? node.field === "in" ? [node.value.toLowerCase()] : [] : node.clauses.filter(({ occur }) => occur !== "must_not").flatMap(({ node: node2 }) => positiveSources(node2)), "positiveSources");
|
|
22985
22990
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -23327,7 +23332,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
23327
23332
|
};
|
|
23328
23333
|
}, "statsLucene");
|
|
23329
23334
|
|
|
23330
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23335
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
23331
23336
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
23332
23337
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
23333
23338
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -23367,7 +23372,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
23367
23372
|
};
|
|
23368
23373
|
}, "dateWindow");
|
|
23369
23374
|
|
|
23370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
23371
23376
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
23372
23377
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
23373
23378
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -23536,7 +23541,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23536
23541
|
};
|
|
23537
23542
|
}, "readRankingSelection");
|
|
23538
23543
|
|
|
23539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
23540
23545
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
|
|
23541
23546
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
23542
23547
|
command,
|
|
@@ -23546,7 +23551,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
23546
23551
|
fieldsVersion: FIELD_VERSION
|
|
23547
23552
|
}), "searchRecordOf");
|
|
23548
23553
|
|
|
23549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
23550
23555
|
function invalid2(message) {
|
|
23551
23556
|
throw new CliError("validation_error", message);
|
|
23552
23557
|
}
|
|
@@ -23840,10 +23845,10 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
23840
23845
|
}, "evidence")
|
|
23841
23846
|
}), "adminStatisticsService");
|
|
23842
23847
|
|
|
23843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
23844
23849
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
23845
23850
|
|
|
23846
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
23847
23852
|
var REQUEST_MS = 400;
|
|
23848
23853
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
23849
23854
|
const lowest = ranges[0];
|
|
@@ -23866,13 +23871,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
23866
23871
|
};
|
|
23867
23872
|
}, "estimateBackfill");
|
|
23868
23873
|
|
|
23869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
23870
23875
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
23871
23876
|
...error,
|
|
23872
23877
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
23873
23878
|
}), "withRecovery");
|
|
23874
23879
|
|
|
23875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
23876
23881
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
23877
23882
|
if (isCliFailure(error))
|
|
23878
23883
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -23955,7 +23960,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
23955
23960
|
};
|
|
23956
23961
|
}, "mergeBatches");
|
|
23957
23962
|
|
|
23958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
23959
23964
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
23960
23965
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
23961
23966
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -23978,7 +23983,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
23978
23983
|
}
|
|
23979
23984
|
}, "patiently");
|
|
23980
23985
|
|
|
23981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
23982
23987
|
var RULES_VERSION = 5;
|
|
23983
23988
|
var LOOK_BACK = 50;
|
|
23984
23989
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -24068,7 +24073,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
24068
24073
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
24069
24074
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
24070
24075
|
|
|
24071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
24072
24077
|
var CONTEXT_MESSAGES = 3;
|
|
24073
24078
|
var CONTEXT_MINUTES = 10;
|
|
24074
24079
|
var MAX_CHARS = 1200;
|
|
@@ -24092,12 +24097,12 @@ var context = {
|
|
|
24092
24097
|
}, "describe")
|
|
24093
24098
|
};
|
|
24094
24099
|
|
|
24095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24100
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
24096
24101
|
var BUILT_INS = [context];
|
|
24097
24102
|
var providers = [...BUILT_INS];
|
|
24098
24103
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
24099
24104
|
|
|
24100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
24101
24106
|
var READ_PAGE = 5e3;
|
|
24102
24107
|
var CHAIN = 50;
|
|
24103
24108
|
var CONVERSATION_QUERY = {
|
|
@@ -24249,7 +24254,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
24249
24254
|
return size4;
|
|
24250
24255
|
}, "sized");
|
|
24251
24256
|
|
|
24252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
24253
24258
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
24254
24259
|
var MESSAGE_PAGE = 5e3;
|
|
24255
24260
|
var PER_SESSION = 8;
|
|
@@ -24268,7 +24273,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24268
24273
|
price: remote.price,
|
|
24269
24274
|
installed: true,
|
|
24270
24275
|
perBatch: PER_REQUEST * concurrency,
|
|
24271
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
24276
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-WHYV35IF.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
24272
24277
|
};
|
|
24273
24278
|
}
|
|
24274
24279
|
const model = textModel(choice);
|
|
@@ -24285,7 +24290,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24285
24290
|
if (!isTextModelInstalled(model, directory2))
|
|
24286
24291
|
throw notDownloaded(model.id);
|
|
24287
24292
|
if (apart) {
|
|
24288
|
-
const { openProcess } = await import("./process-
|
|
24293
|
+
const { openProcess } = await import("./process-XNN4WG6N.js");
|
|
24289
24294
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
24290
24295
|
}
|
|
24291
24296
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -24574,7 +24579,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
24574
24579
|
return { ...one2, state };
|
|
24575
24580
|
}, "shaped");
|
|
24576
24581
|
|
|
24577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
24578
24583
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
24579
24584
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
24580
24585
|
for (const [key, value, maximum] of [
|
|
@@ -24627,7 +24632,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
24627
24632
|
}
|
|
24628
24633
|
}, "catchUpSearch");
|
|
24629
24634
|
|
|
24630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24631
24636
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
24632
24637
|
if (deps.reads === "store") {
|
|
24633
24638
|
throw new CliError("validation_error", `${what} asks for older history, and this messenger pushes its history instead \u2014 keep \`${typedCommand(deps.messenger.app.command, "serve")}\` running`);
|
|
@@ -24993,7 +24998,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
24993
24998
|
return message?.timestamp ?? fallback;
|
|
24994
24999
|
}, "timeOfKey");
|
|
24995
25000
|
|
|
24996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
24997
25002
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
24998
25003
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
24999
25004
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -25130,16 +25135,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
25130
25135
|
return { plan, repair };
|
|
25131
25136
|
}, "gapsService");
|
|
25132
25137
|
|
|
25133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
25134
25139
|
import { createHash as createHash8 } from "node:crypto";
|
|
25135
25140
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
25136
25141
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
25137
25142
|
|
|
25138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25139
25144
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
25140
25145
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
25141
25146
|
|
|
25142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
25143
25148
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
25144
25149
|
import { open as open4, stat } from "node:fs/promises";
|
|
25145
25150
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -25341,7 +25346,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
25341
25346
|
return { name, source };
|
|
25342
25347
|
}, "readStickerFile");
|
|
25343
25348
|
|
|
25344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25345
25350
|
var MAX_FILES = 1e4;
|
|
25346
25351
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
25347
25352
|
if (refusedPlace(directory2, app, env))
|
|
@@ -25410,15 +25415,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
25410
25415
|
return choices;
|
|
25411
25416
|
}, "directoryPaths");
|
|
25412
25417
|
|
|
25413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25414
25419
|
import { posix } from "node:path";
|
|
25415
25420
|
|
|
25416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25417
25422
|
import { setImmediate as tick } from "node:timers/promises";
|
|
25418
25423
|
import { crc32 } from "node:zlib";
|
|
25419
25424
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
25420
25425
|
|
|
25421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
25422
25427
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
25423
25428
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
25424
25429
|
var SAMPLE = 65536;
|
|
@@ -25520,7 +25525,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
25520
25525
|
return result.text;
|
|
25521
25526
|
}, "decodeXml");
|
|
25522
25527
|
|
|
25523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25524
25529
|
var MAX_PART = 10 * 1024 * 1024;
|
|
25525
25530
|
var MAX_ENTRIES = 1e3;
|
|
25526
25531
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -25735,7 +25740,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
25735
25740
|
return found;
|
|
25736
25741
|
}, "elements");
|
|
25737
25742
|
|
|
25738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
25739
25744
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
25740
25745
|
let name = "";
|
|
25741
25746
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -25790,7 +25795,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
25790
25795
|
return { text: parts.join("").trim(), truncated: false };
|
|
25791
25796
|
}, "sheetText");
|
|
25792
25797
|
|
|
25793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25794
25799
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
25795
25800
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
25796
25801
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26190,10 +26195,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26190
26195
|
}
|
|
26191
26196
|
}, "readDocument");
|
|
26192
26197
|
|
|
26193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26194
26199
|
import { extname as extname3 } from "node:path";
|
|
26195
26200
|
|
|
26196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26197
26202
|
import { readFileSync } from "node:fs";
|
|
26198
26203
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
26199
26204
|
import { fileURLToPath } from "node:url";
|
|
@@ -26254,7 +26259,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26254
26259
|
}
|
|
26255
26260
|
}, "derived");
|
|
26256
26261
|
|
|
26257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26258
26263
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26259
26264
|
var image2 = {
|
|
26260
26265
|
id: "image",
|
|
@@ -26263,7 +26268,7 @@ var image2 = {
|
|
|
26263
26268
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26264
26269
|
};
|
|
26265
26270
|
|
|
26266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26267
26272
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26268
26273
|
var doc = {
|
|
26269
26274
|
id: "doc",
|
|
@@ -26275,7 +26280,7 @@ var doc = {
|
|
|
26275
26280
|
}), "read")
|
|
26276
26281
|
};
|
|
26277
26282
|
|
|
26278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26279
26284
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26280
26285
|
var docx = {
|
|
26281
26286
|
id: "docx",
|
|
@@ -26288,7 +26293,7 @@ var docx = {
|
|
|
26288
26293
|
}), "read")
|
|
26289
26294
|
};
|
|
26290
26295
|
|
|
26291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26292
26297
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26293
26298
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26294
26299
|
"fonttbl",
|
|
@@ -26464,7 +26469,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
26464
26469
|
}, "htmlText");
|
|
26465
26470
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
26466
26471
|
|
|
26467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
26468
26473
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
26469
26474
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
26470
26475
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -26520,7 +26525,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
26520
26525
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
26521
26526
|
}, "markdownSections");
|
|
26522
26527
|
|
|
26523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
26524
26529
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
26525
26530
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
26526
26531
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -26591,7 +26596,7 @@ var html = {
|
|
|
26591
26596
|
}, "read")
|
|
26592
26597
|
};
|
|
26593
26598
|
|
|
26594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
26595
26600
|
var office = {
|
|
26596
26601
|
id: "office",
|
|
26597
26602
|
version: documentExtractor("odt"),
|
|
@@ -26602,7 +26607,7 @@ var office = {
|
|
|
26602
26607
|
}, "read")
|
|
26603
26608
|
};
|
|
26604
26609
|
|
|
26605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
26606
26611
|
var pdf = {
|
|
26607
26612
|
id: "pdf",
|
|
26608
26613
|
version: "unpdf",
|
|
@@ -26669,7 +26674,7 @@ var pdf = {
|
|
|
26669
26674
|
}), "read")
|
|
26670
26675
|
};
|
|
26671
26676
|
|
|
26672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
26673
26678
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
26674
26679
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
26675
26680
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -26689,7 +26694,7 @@ var plain = {
|
|
|
26689
26694
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
26690
26695
|
};
|
|
26691
26696
|
|
|
26692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
26693
26698
|
var rtf = {
|
|
26694
26699
|
id: "rtf",
|
|
26695
26700
|
version: "v1",
|
|
@@ -26697,10 +26702,10 @@ var rtf = {
|
|
|
26697
26702
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
26698
26703
|
};
|
|
26699
26704
|
|
|
26700
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26701
26706
|
import { basename as basename5 } from "node:path";
|
|
26702
26707
|
|
|
26703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
26704
26709
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
26705
26710
|
const cells = [];
|
|
26706
26711
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -26738,7 +26743,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
26738
26743
|
return { cells, truncated };
|
|
26739
26744
|
}, "delimitedSpans");
|
|
26740
26745
|
|
|
26741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26742
26747
|
var DELIMITED = {
|
|
26743
26748
|
".csv": ",",
|
|
26744
26749
|
".tsv": " ",
|
|
@@ -26777,7 +26782,7 @@ var sheets = {
|
|
|
26777
26782
|
}, "read")
|
|
26778
26783
|
};
|
|
26779
26784
|
|
|
26780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
26781
26786
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
26782
26787
|
var HEAD_BYTES = 1024;
|
|
26783
26788
|
var readers = [...BUILT_INS2];
|
|
@@ -26787,7 +26792,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
26787
26792
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
26788
26793
|
}, "readWithRegistry");
|
|
26789
26794
|
|
|
26790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26791
26796
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
26792
26797
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
26793
26798
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -27866,7 +27871,7 @@ function imageSize(input) {
|
|
|
27866
27871
|
}
|
|
27867
27872
|
__name(imageSize, "imageSize");
|
|
27868
27873
|
|
|
27869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
27870
27875
|
var MAX_PAGES = 20;
|
|
27871
27876
|
var MAX_PIXELS = 2e7;
|
|
27872
27877
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28017,7 +28022,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28017
28022
|
}
|
|
28018
28023
|
}, "ocrPdf");
|
|
28019
28024
|
|
|
28020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28025
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28021
28026
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28022
28027
|
const limits = pdfPreviewLimits(env);
|
|
28023
28028
|
const cancelled5 = /* @__PURE__ */ __name(() => {
|
|
@@ -28094,7 +28099,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28094
28099
|
}
|
|
28095
28100
|
}, "pdfPreview");
|
|
28096
28101
|
|
|
28097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28098
28103
|
import { createHash as createHash7 } from "node:crypto";
|
|
28099
28104
|
import { constants } from "node:fs";
|
|
28100
28105
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28202,7 +28207,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28202
28207
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28203
28208
|
}, "transferMime");
|
|
28204
28209
|
|
|
28205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
28206
28211
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
28207
28212
|
import { link as link3, rm } from "node:fs/promises";
|
|
28208
28213
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -28316,7 +28321,7 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
28316
28321
|
}
|
|
28317
28322
|
}, "save");
|
|
28318
28323
|
|
|
28319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28320
28325
|
var ATTACHMENT_QUERY = {
|
|
28321
28326
|
entity: "attachment",
|
|
28322
28327
|
backend: "sql",
|
|
@@ -28739,7 +28744,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28739
28744
|
}, "setText")
|
|
28740
28745
|
}), "attachmentsService");
|
|
28741
28746
|
|
|
28742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
28743
28748
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
28744
28749
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
28745
28750
|
const store = await accountStore(deps);
|
|
@@ -28769,7 +28774,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28769
28774
|
}, "list")
|
|
28770
28775
|
}), "chatDocumentsService");
|
|
28771
28776
|
|
|
28772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
28773
28778
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
28774
28779
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
28775
28780
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -28856,7 +28861,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
28856
28861
|
}
|
|
28857
28862
|
}, "isRetentionSelection");
|
|
28858
28863
|
|
|
28859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
28860
28865
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
28861
28866
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
28862
28867
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -29063,7 +29068,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29063
29068
|
};
|
|
29064
29069
|
}, "countersService");
|
|
29065
29070
|
|
|
29066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29067
29072
|
var SYNC_KEY = "messages.sync-first";
|
|
29068
29073
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29069
29074
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29155,7 +29160,7 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
29155
29160
|
}
|
|
29156
29161
|
try {
|
|
29157
29162
|
const newest = (await store.messages.messages(account2, chatId, { limit: 1 })).items[0];
|
|
29158
|
-
let
|
|
29163
|
+
let counted2 = 0;
|
|
29159
29164
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
29160
29165
|
limit: options.maxMessages - result.messages,
|
|
29161
29166
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
@@ -29164,11 +29169,11 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
29164
29169
|
stop,
|
|
29165
29170
|
note,
|
|
29166
29171
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
29167
|
-
result.messages += fetched2 -
|
|
29168
|
-
|
|
29172
|
+
result.messages += fetched2 - counted2;
|
|
29173
|
+
counted2 = fetched2;
|
|
29169
29174
|
}, "onPage")
|
|
29170
29175
|
});
|
|
29171
|
-
result.messages += fetched.fetched -
|
|
29176
|
+
result.messages += fetched.fetched - counted2;
|
|
29172
29177
|
if (fetched.stopped || !fetched.complete && !fetched.reachedSince) {
|
|
29173
29178
|
result.complete = false;
|
|
29174
29179
|
result.failed.push({
|
|
@@ -29195,20 +29200,20 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29195
29200
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29196
29201
|
}), "withRefresh");
|
|
29197
29202
|
|
|
29198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29199
29204
|
var CANDIDATES = 50;
|
|
29200
29205
|
var WORD_HITS = 200;
|
|
29201
29206
|
var RRF_K = 60;
|
|
29202
29207
|
var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
29203
29208
|
const command = deps.messenger.app.command;
|
|
29204
29209
|
const byWords = /* @__PURE__ */ __name(async (query, prepared, conversations, since) => {
|
|
29205
|
-
const
|
|
29210
|
+
const words4 = [...new Set(query.toLowerCase().match(/[\p{L}\p{N}]+/gu) ?? [])];
|
|
29206
29211
|
const outside = /* @__PURE__ */ new Map();
|
|
29207
|
-
if (!
|
|
29212
|
+
if (!words4.length || !prepared.scopeAccounts.length)
|
|
29208
29213
|
return { hits: [], outside, sources: /* @__PURE__ */ new Map() };
|
|
29209
29214
|
const store = await deps.store();
|
|
29210
29215
|
const lexical = await prepareLucene(store, await deps.account(), {
|
|
29211
|
-
text:
|
|
29216
|
+
text: words4.map((word) => word.length >= 3 ? `${word}*` : `"${word}"`).join(" OR "),
|
|
29212
29217
|
accounts: prepared.scopeAccounts,
|
|
29213
29218
|
limit: WORD_HITS
|
|
29214
29219
|
}, deps.messenger);
|
|
@@ -29314,9 +29319,9 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29314
29319
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
29315
29320
|
const selected = prepared.selectedChat;
|
|
29316
29321
|
const scopeOf4 = /* @__PURE__ */ __name((one2) => selected ? selected.account.provider === one2.provider && selected.account.account === one2.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
29317
|
-
const
|
|
29322
|
+
const words4 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
29318
29323
|
const meaning = [];
|
|
29319
|
-
const sources =
|
|
29324
|
+
const sources = words4.sources;
|
|
29320
29325
|
if (target2.installed && prepared.scopeAccounts.length && eligibility?.conversations.length !== 0) {
|
|
29321
29326
|
await withEmbedder(deps, target2, choice, {}, async (embedder) => {
|
|
29322
29327
|
const [vector] = await embedder.embed([query], "query");
|
|
@@ -29360,7 +29365,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29360
29365
|
continue;
|
|
29361
29366
|
const eligibleChats = eligibility?.chats.filter(({ account: account3 }) => account3.provider === one2.provider && account3.account === one2.account).map(({ chat: chat2 }) => chat2);
|
|
29362
29367
|
const rows = eligibleChats === void 0 ? await store.vectors.readiness(one2, { ...scope, model: target2.key, searchableOnly: true }) : (await Promise.all(eligibleChats.map((chatId) => store.vectors.readiness(one2, { chatId, model: target2.key })))).flat();
|
|
29363
|
-
const readiness2 = searchReadiness(rows.map(shaped), target2.installed,
|
|
29368
|
+
const readiness2 = searchReadiness(rows.map(shaped), target2.installed, words4.outside.get(JSON.stringify(one2))?.chats ?? /* @__PURE__ */ new Set());
|
|
29364
29369
|
scoped.push({ source: one2, readiness: readiness2 });
|
|
29365
29370
|
const other = await store.vectors.embeddedOnlyElsewhere(one2, { ...scope, model: target2.key });
|
|
29366
29371
|
elsewhere.push(...other.filter((id2) => eligibleChats === void 0 || eligibleChats.includes(id2)).map((id2) => prepared.scopeAccounts.length > 1 ? [one2.provider, one2.account, id2].map(encodeURIComponent).join("/") : id2));
|
|
@@ -29376,7 +29381,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29376
29381
|
accounts: prepared.scopeAccounts,
|
|
29377
29382
|
model: target2.id,
|
|
29378
29383
|
meaning: target2.installed ? "searched" : "unavailable",
|
|
29379
|
-
hits: fused(meaning,
|
|
29384
|
+
hits: fused(meaning, words4.hits, meaningFloor(target2.key)).slice(0, limit).map((hit) => {
|
|
29380
29385
|
const source2 = sources.get(hit.summary.id);
|
|
29381
29386
|
return {
|
|
29382
29387
|
...hit,
|
|
@@ -29422,7 +29427,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
29422
29427
|
}, "related")
|
|
29423
29428
|
};
|
|
29424
29429
|
}, "embeddingsSearch");
|
|
29425
|
-
var fused = /* @__PURE__ */ __name((meaning,
|
|
29430
|
+
var fused = /* @__PURE__ */ __name((meaning, words4, minimumCosine) => {
|
|
29426
29431
|
const merged = /* @__PURE__ */ new Map();
|
|
29427
29432
|
meaning.filter(({ score }) => score > minimumCosine).forEach(({ summary, chunk, score, stale, matchedIn }, index) => {
|
|
29428
29433
|
merged.set(matchedIn ? `${summary.id}#${chunk.firstMessageId}` : summary.id, {
|
|
@@ -29435,7 +29440,7 @@ var fused = /* @__PURE__ */ __name((meaning, words3, minimumCosine) => {
|
|
|
29435
29440
|
fused: 1 / (RRF_K + index + 1)
|
|
29436
29441
|
});
|
|
29437
29442
|
});
|
|
29438
|
-
|
|
29443
|
+
words4.forEach(({ summary, chunk }, index) => {
|
|
29439
29444
|
const share = 1 / (RRF_K + index + 1);
|
|
29440
29445
|
const held = merged.get(summary.id);
|
|
29441
29446
|
if (held) {
|
|
@@ -29470,13 +29475,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
29470
29475
|
return mean2.map((value) => value / length);
|
|
29471
29476
|
}, "meanOf");
|
|
29472
29477
|
|
|
29473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
29474
29479
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
29475
29480
|
...embeddingsMaintenance(deps),
|
|
29476
29481
|
...embeddingsSearch(deps)
|
|
29477
29482
|
}), "embeddingsService");
|
|
29478
29483
|
|
|
29479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
29480
29485
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
29481
29486
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
29482
29487
|
if (deps.offline)
|
|
@@ -29617,7 +29622,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29617
29622
|
};
|
|
29618
29623
|
}, "foldersService");
|
|
29619
29624
|
|
|
29620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
29621
29626
|
var INBOX_CHATS = 20;
|
|
29622
29627
|
var REVIEW_DAYS = 3;
|
|
29623
29628
|
var UNANSWERED_HOURS = 24;
|
|
@@ -29825,7 +29830,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
29825
29830
|
};
|
|
29826
29831
|
}, "inboxService");
|
|
29827
29832
|
|
|
29828
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
29829
29834
|
var REVIEW_COUNT = 500;
|
|
29830
29835
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
29831
29836
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -29904,7 +29909,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29904
29909
|
};
|
|
29905
29910
|
}, "mentionsService");
|
|
29906
29911
|
|
|
29907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
29908
29913
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
29909
29914
|
position,
|
|
29910
29915
|
kind,
|
|
@@ -29953,7 +29958,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
29953
29958
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
29954
29959
|
}, "validatePermalink");
|
|
29955
29960
|
|
|
29956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
29957
29962
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
29958
29963
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
29959
29964
|
return `${seconds / 86400}d`;
|
|
@@ -29964,8 +29969,8 @@ var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
|
29964
29969
|
return `${seconds}s`;
|
|
29965
29970
|
}, "spokenSeconds");
|
|
29966
29971
|
var pinDurationsText = /* @__PURE__ */ __name((allowed) => {
|
|
29967
|
-
const
|
|
29968
|
-
return
|
|
29972
|
+
const words4 = allowed.map(spokenSeconds);
|
|
29973
|
+
return words4.length > 1 ? `${words4.slice(0, -1).join(", ")} or ${words4.at(-1)}` : words4[0] ?? "";
|
|
29969
29974
|
}, "pinDurationsText");
|
|
29970
29975
|
var pinLengthHelp = /* @__PURE__ */ __name((allowed, fallback) => `how long the pin lasts: ${pinDurationsText(allowed)}` + (fallback === void 0 ? "" : `; ${spokenSeconds(fallback)} by default`), "pinLengthHelp");
|
|
29971
29976
|
var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-time") => {
|
|
@@ -29985,7 +29990,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
29985
29990
|
return seconds;
|
|
29986
29991
|
}, "pinDurationOf");
|
|
29987
29992
|
|
|
29988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
29989
29994
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
29990
29995
|
if (sendAs === void 0) {
|
|
29991
29996
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30010,7 +30015,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30010
30015
|
return sendAs;
|
|
30011
30016
|
}, "typedSendAs");
|
|
30012
30017
|
|
|
30013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
30014
30019
|
var TOTAL_CAP = 1e4;
|
|
30015
30020
|
var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
30016
30021
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -30021,7 +30026,7 @@ var totalOf = /* @__PURE__ */ __name((count3, shown, hasMore, exact = true) => {
|
|
|
30021
30026
|
return { value: count3, relation: exact ? "eq" : "gte" };
|
|
30022
30027
|
}, "totalOf");
|
|
30023
30028
|
|
|
30024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
30025
30030
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
30026
30031
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
30027
30032
|
let narrows = false;
|
|
@@ -30050,7 +30055,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
30050
30055
|
return wanted(root).join(" ").trim();
|
|
30051
30056
|
}, "meaningWords");
|
|
30052
30057
|
|
|
30053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
30054
30059
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
30055
30060
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
30056
30061
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -30183,7 +30188,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
30183
30188
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
30184
30189
|
}, "questionLookup");
|
|
30185
30190
|
|
|
30186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30187
30192
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30188
30193
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30189
30194
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30376,7 +30381,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30376
30381
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
30377
30382
|
}, "signals");
|
|
30378
30383
|
|
|
30379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30384
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30380
30385
|
var MEANING_DEPTH = 100;
|
|
30381
30386
|
var RRF_K2 = 60;
|
|
30382
30387
|
var RERANK_DEPTH = 50;
|
|
@@ -30661,10 +30666,10 @@ var nearEligible = /* @__PURE__ */ __name(async (store, account2, request, messe
|
|
|
30661
30666
|
return hit ? [{ ...hit, cosine: m.score }] : [];
|
|
30662
30667
|
});
|
|
30663
30668
|
}, "nearEligible");
|
|
30664
|
-
var fusedWithMeaning = /* @__PURE__ */ __name((
|
|
30669
|
+
var fusedWithMeaning = /* @__PURE__ */ __name((words4, near2, described) => {
|
|
30665
30670
|
const merged = /* @__PURE__ */ new Map();
|
|
30666
30671
|
const by = /* @__PURE__ */ __name((hit, foundBy) => hit.discovery ? { ...hit, discovery: { ...hit.discovery, foundBy } } : hit, "by");
|
|
30667
|
-
|
|
30672
|
+
words4.forEach((hit, rank) => {
|
|
30668
30673
|
merged.set(hit.locator, { hit: by(hit, ["words"]), rrf: 1 / (RRF_K2 + rank + 1) });
|
|
30669
30674
|
});
|
|
30670
30675
|
near2.forEach(({ cosine: _, ...m }, rank) => {
|
|
@@ -30701,7 +30706,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
30701
30706
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
30702
30707
|
}, "mixedWithReranker");
|
|
30703
30708
|
|
|
30704
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
30705
30710
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
30706
30711
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
30707
30712
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -30900,7 +30905,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
30900
30905
|
return result;
|
|
30901
30906
|
}, "readThreadContext");
|
|
30902
30907
|
|
|
30903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
30904
30909
|
var SEARCH_FILL_MS = 200;
|
|
30905
30910
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
30906
30911
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -30931,6 +30936,8 @@ var topUp = /* @__PURE__ */ __name(async (store) => {
|
|
|
30931
30936
|
}, "topUp");
|
|
30932
30937
|
var MAX_SEARCH_OFFSET = 1e3;
|
|
30933
30938
|
var searchStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, meaning, rerank) => {
|
|
30939
|
+
if (request.text !== void 0)
|
|
30940
|
+
request = { ...request, text: plainQuery(request.text) };
|
|
30934
30941
|
const offset = request.offset ?? 0;
|
|
30935
30942
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
30936
30943
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -30967,12 +30974,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
30967
30974
|
}, "accountOf");
|
|
30968
30975
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
30969
30976
|
|
|
30970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30971
30978
|
import { createHash as createHash9 } from "node:crypto";
|
|
30972
30979
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
30973
30980
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
30974
30981
|
|
|
30975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
30976
30983
|
var GROUP_SETTINGS = [
|
|
30977
30984
|
"allCanPin",
|
|
30978
30985
|
"onlyAdminsAdd",
|
|
@@ -30986,7 +30993,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
30986
30993
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
30987
30994
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
30988
30995
|
|
|
30989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30990
30997
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
30991
30998
|
var PICTURE_FLOOR = 0.25;
|
|
30992
30999
|
var PAGE4 = 50;
|
|
@@ -31003,7 +31010,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31003
31010
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31004
31011
|
if (!isImageModelInstalled(model2, directory2))
|
|
31005
31012
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31006
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31013
|
+
const { openPictureEmbedder } = await import("./embedder-GNGHVJAO.js");
|
|
31007
31014
|
return openPictureEmbedder(model2, directory2);
|
|
31008
31015
|
}, "open");
|
|
31009
31016
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31134,8 +31141,8 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31134
31141
|
lane: /* @__PURE__ */ __name(async (query, { chat, since, limit = 5 } = {}) => {
|
|
31135
31142
|
if (!deps.pictures)
|
|
31136
31143
|
return {};
|
|
31137
|
-
const
|
|
31138
|
-
if (
|
|
31144
|
+
const words4 = plainWords(query);
|
|
31145
|
+
if (words4 === "")
|
|
31139
31146
|
return {};
|
|
31140
31147
|
const store = await deps.store();
|
|
31141
31148
|
const account2 = await deps.account();
|
|
@@ -31143,7 +31150,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31143
31150
|
let vector;
|
|
31144
31151
|
try {
|
|
31145
31152
|
const use = await embedder();
|
|
31146
|
-
vector = await use.embedQuery(
|
|
31153
|
+
vector = await use.embedQuery(words4);
|
|
31147
31154
|
} catch (error) {
|
|
31148
31155
|
if (error instanceof CliError && error.code === "not_found")
|
|
31149
31156
|
return { picturesSkipped: error.message, picturesModel: model.id };
|
|
@@ -31200,7 +31207,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31200
31207
|
}, "search")
|
|
31201
31208
|
}), "withPictures");
|
|
31202
31209
|
|
|
31203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31204
31211
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
31205
31212
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
31206
31213
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31222,13 +31229,13 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31222
31229
|
}
|
|
31223
31230
|
if (ready.length === 0 && mail.size === 0)
|
|
31224
31231
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
31225
|
-
const
|
|
31232
|
+
const words4 = plainWords(question);
|
|
31226
31233
|
try {
|
|
31227
31234
|
const ranked = [];
|
|
31228
|
-
if (
|
|
31235
|
+
if (words4) {
|
|
31229
31236
|
const pks = await within?.();
|
|
31230
31237
|
const lookUp = /* @__PURE__ */ __name(async (embedder) => {
|
|
31231
|
-
const [query] = await embedder.embed([
|
|
31238
|
+
const [query] = await embedder.embed([words4], "query");
|
|
31232
31239
|
for (const one2 of ready) {
|
|
31233
31240
|
const near2 = pks ? await store.vectors.scoreMessages(one2, { model: target2.key, query, pks }) : await store.vectors.nearestMessages(one2, {
|
|
31234
31241
|
model: target2.key,
|
|
@@ -31268,7 +31275,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31268
31275
|
}
|
|
31269
31276
|
}, "meaningLane");
|
|
31270
31277
|
|
|
31271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31272
31279
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31273
31280
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31274
31281
|
if (choice === "off")
|
|
@@ -31280,9 +31287,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31280
31287
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31281
31288
|
try {
|
|
31282
31289
|
const warm = deps.embedders;
|
|
31283
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31290
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-XNN4WG6N.js")).openRerankerProcess(model, directory2, {
|
|
31284
31291
|
threads: defaultThreads()
|
|
31285
|
-
})) : await (await import("./rerank-
|
|
31292
|
+
})) : await (await import("./rerank-FBMZVWSH.js")).openReranker(model, directory2);
|
|
31286
31293
|
return {
|
|
31287
31294
|
model: model.id,
|
|
31288
31295
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31302,7 +31309,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31302
31309
|
};
|
|
31303
31310
|
}, "rerankLane");
|
|
31304
31311
|
|
|
31305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31306
31313
|
import { createHash as createHash10 } from "node:crypto";
|
|
31307
31314
|
var refOf = /* @__PURE__ */ __name((target2) => target2.ref ?? `document:${target2.documentId}`, "refOf");
|
|
31308
31315
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -31310,7 +31317,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
31310
31317
|
const directory2 = imageModelsDirectory(env);
|
|
31311
31318
|
if (!isImageModelInstalled(model, directory2))
|
|
31312
31319
|
throw new CliError("not_found", `the picture model is not downloaded \u2014 ${command === void 0 ? "install it with a WireCat CLI that has `images models download` (tg, max or wa); they share the model folder" : `\`${command} images models download ${model.id}\` fetches it`}`, { reason: "model.not-downloaded", model: model.id });
|
|
31313
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31320
|
+
const { openPictureEmbedder } = await import("./embedder-GNGHVJAO.js");
|
|
31314
31321
|
return openPictureEmbedder(model, directory2);
|
|
31315
31322
|
}, "openPictureEmbedderFor");
|
|
31316
31323
|
var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options = {}) => {
|
|
@@ -31331,7 +31338,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target2, bytes2, options
|
|
|
31331
31338
|
}, "savePicture");
|
|
31332
31339
|
var removePicture = /* @__PURE__ */ __name((store, target2) => store.notes.removePicture(refOf(target2)), "removePicture");
|
|
31333
31340
|
|
|
31334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31335
31342
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
31336
31343
|
const metadata = note.frontMatter;
|
|
31337
31344
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31346,7 +31353,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
31346
31353
|
};
|
|
31347
31354
|
}, "documentSource");
|
|
31348
31355
|
|
|
31349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31350
31357
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31351
31358
|
let root;
|
|
31352
31359
|
try {
|
|
@@ -31361,19 +31368,19 @@ var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
|
31361
31368
|
return void 0;
|
|
31362
31369
|
values.push(leaf.value);
|
|
31363
31370
|
}
|
|
31364
|
-
const
|
|
31365
|
-
return
|
|
31371
|
+
const words4 = normalize(values.join(" "));
|
|
31372
|
+
return words4 === "" || /["\\]/u.test(words4) ? void 0 : words4;
|
|
31366
31373
|
}, "plainQueryWords");
|
|
31367
|
-
var titleQuery = /* @__PURE__ */ __name((
|
|
31368
|
-
var titleTiers = /* @__PURE__ */ __name((hits,
|
|
31374
|
+
var titleQuery = /* @__PURE__ */ __name((words4) => words4.split(" ").map((word) => `title:"${word}"`).join(" AND "), "titleQuery");
|
|
31375
|
+
var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
31369
31376
|
const rank = /* @__PURE__ */ __name(({ note }) => {
|
|
31370
31377
|
const title = normalize(note.title ?? "");
|
|
31371
|
-
return title ===
|
|
31378
|
+
return title === words4 ? 0 : title.includes(words4) ? 1 : 2;
|
|
31372
31379
|
}, "rank");
|
|
31373
31380
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31374
31381
|
}, "titleTiers");
|
|
31375
31382
|
|
|
31376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31377
31384
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
31378
31385
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
31379
31386
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -31496,14 +31503,14 @@ var MAX_NOTES_OFFSET = 1e3;
|
|
|
31496
31503
|
var CANDIDATES2 = 50;
|
|
31497
31504
|
var RRF_K3 = 60;
|
|
31498
31505
|
var firstLine = /* @__PURE__ */ __name((text2, query) => {
|
|
31499
|
-
const
|
|
31506
|
+
const words4 = query.toLowerCase().split(/\s+/).map((word) => word.replace(/^[^\p{L}\p{N}]+|[^\p{L}\p{N}]+$/gu, "")).filter((word) => word.length > 2 && !["and", "or", "not"].includes(word));
|
|
31500
31507
|
const lines = text2.split("\n");
|
|
31501
|
-
const found = lines.find((line2) =>
|
|
31508
|
+
const found = lines.find((line2) => words4.some((word) => line2.toLowerCase().includes(word)));
|
|
31502
31509
|
return (found ?? lines.find((line2) => line2.trim() !== "") ?? "").trim().slice(0, MAX_LINE);
|
|
31503
31510
|
}, "firstLine");
|
|
31504
31511
|
var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, source, limit, env, command, embedder }) => {
|
|
31505
|
-
const
|
|
31506
|
-
if (
|
|
31512
|
+
const words4 = plainWords(query);
|
|
31513
|
+
if (words4 === "" || source === "internal")
|
|
31507
31514
|
return {};
|
|
31508
31515
|
let vector;
|
|
31509
31516
|
try {
|
|
@@ -31512,7 +31519,7 @@ var pictureLane = /* @__PURE__ */ __name(async (store, query, { folderIds, sourc
|
|
|
31512
31519
|
...command === void 0 ? {} : { command }
|
|
31513
31520
|
});
|
|
31514
31521
|
try {
|
|
31515
|
-
vector = await use.embedQuery(
|
|
31522
|
+
vector = await use.embedQuery(words4);
|
|
31516
31523
|
} finally {
|
|
31517
31524
|
if (!embedder)
|
|
31518
31525
|
await use.close();
|
|
@@ -31593,13 +31600,13 @@ var filterRefs = /* @__PURE__ */ __name(async (store, narrowing, scope) => {
|
|
|
31593
31600
|
}
|
|
31594
31601
|
}, "filterRefs");
|
|
31595
31602
|
var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, shown, hasMore }, others, othersComplete) => {
|
|
31596
|
-
let
|
|
31603
|
+
let words4;
|
|
31597
31604
|
try {
|
|
31598
31605
|
const { root, stemmer } = await storeQuery(store, text2, {
|
|
31599
31606
|
exact,
|
|
31600
31607
|
...scope.timezone ? { timezone: scope.timezone } : {}
|
|
31601
31608
|
});
|
|
31602
|
-
|
|
31609
|
+
words4 = await store.notes.matchingRefs({
|
|
31603
31610
|
root,
|
|
31604
31611
|
limit: TOTAL_CAP,
|
|
31605
31612
|
...scope.folderIds ? { folderIds: scope.folderIds } : {},
|
|
@@ -31612,10 +31619,11 @@ var notesTotal = /* @__PURE__ */ __name(async (store, text2, { exact, scope, sho
|
|
|
31612
31619
|
return totalOf(void 0, shown, hasMore);
|
|
31613
31620
|
throw error;
|
|
31614
31621
|
}
|
|
31615
|
-
const count3 = (/* @__PURE__ */ new Set([...
|
|
31622
|
+
const count3 = (/* @__PURE__ */ new Set([...words4.refs, ...others])).size + (words4.hasMore ? 1 : 0);
|
|
31616
31623
|
return totalOf(count3, shown, hasMore, othersComplete);
|
|
31617
31624
|
}, "notesTotal");
|
|
31618
31625
|
var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, tag, filter: expression, folderIds, withInternal, source: given, exact = false, discover = false, timezone, env, command, embedders, pictures: withPictures2 = false, pictureLimit = 5, pictureEmbedder } = {}) => {
|
|
31626
|
+
query = plainQuery(query);
|
|
31619
31627
|
const typed = noteSourceOfQuery(query);
|
|
31620
31628
|
const source = given ?? typed.source;
|
|
31621
31629
|
const rest = typed.source !== void 0 && typed.source === source ? typed.rest : query;
|
|
@@ -31623,7 +31631,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31623
31631
|
const filter = [expression ? `(${expression})` : "", label === void 0 ? "" : `tag:${label}`].filter(Boolean).join(" AND ") || void 0;
|
|
31624
31632
|
const lookup = discover && !exact ? questionLookup(query) : void 0;
|
|
31625
31633
|
const parsed = query.trim() ? parsedQuery(lookup === void 0 ? query : questionText(query), exact) : void 0;
|
|
31626
|
-
const
|
|
31634
|
+
const words4 = parsed === void 0 ? "" : meaningWords(parsed);
|
|
31627
31635
|
const narrowing = allOf([
|
|
31628
31636
|
...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
|
|
31629
31637
|
...filter === void 0 ? [] : [parsedQuery(filter)]
|
|
@@ -31644,7 +31652,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31644
31652
|
let meaningComplete = true;
|
|
31645
31653
|
if (exact)
|
|
31646
31654
|
meaningSkipped = "--exact searches words as written";
|
|
31647
|
-
else if (
|
|
31655
|
+
else if (words4) {
|
|
31648
31656
|
const lane2 = {
|
|
31649
31657
|
command,
|
|
31650
31658
|
...env === void 0 ? {} : { env },
|
|
@@ -31658,10 +31666,10 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31658
31666
|
const within = narrowing === void 0 ? void 0 : await filterRefs(store, narrowing, scope);
|
|
31659
31667
|
let nearest;
|
|
31660
31668
|
if (within === void 0) {
|
|
31661
|
-
nearest = await nearestNotes(store,
|
|
31669
|
+
nearest = await nearestNotes(store, words4, { ...lane2, limit: depth });
|
|
31662
31670
|
meaningComplete = nearest.length < depth;
|
|
31663
31671
|
} else {
|
|
31664
|
-
const ranked2 = within.length ? await nearestAmong(store,
|
|
31672
|
+
const ranked2 = within.length ? await nearestAmong(store, words4, within, lane2) : [];
|
|
31665
31673
|
meaningRefs = new Set(ranked2.map(({ ref }) => ref));
|
|
31666
31674
|
nearest = ranked2.slice(0, depth);
|
|
31667
31675
|
}
|
|
@@ -31679,13 +31687,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31679
31687
|
meaningSkipped = error.message;
|
|
31680
31688
|
}
|
|
31681
31689
|
}
|
|
31682
|
-
const
|
|
31683
|
-
const titled =
|
|
31684
|
-
text: [titleQuery(
|
|
31690
|
+
const titleWords2 = plainQueryWords(rest);
|
|
31691
|
+
const titled = titleWords2 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
31692
|
+
text: [titleQuery(titleWords2), filter ?? ""].filter(Boolean).join(" AND "),
|
|
31685
31693
|
limit: Math.max(window2, CANDIDATES2),
|
|
31686
31694
|
...scope
|
|
31687
31695
|
});
|
|
31688
|
-
const tier =
|
|
31696
|
+
const tier = titleWords2 === void 0 ? [] : titleTiers(titled.items, titleWords2);
|
|
31689
31697
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
31690
31698
|
const slice = meaning === void 0 && tier.length === 0;
|
|
31691
31699
|
const matched = await searchNotesQuery(store, {
|
|
@@ -31702,9 +31710,11 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31702
31710
|
const held = ranked.get(ref) ?? { note, at, score: 0, foundBy: [] };
|
|
31703
31711
|
held.foundBy.push(by);
|
|
31704
31712
|
ranked.set(ref, held);
|
|
31713
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
31705
31714
|
if (by === "meaning" && lookup !== void 0 && held.foundBy.includes("words"))
|
|
31706
|
-
|
|
31707
|
-
|
|
31715
|
+
held.score = Math.max(held.score, vote);
|
|
31716
|
+
else
|
|
31717
|
+
held.score += vote;
|
|
31708
31718
|
}), "add");
|
|
31709
31719
|
add(matched.items, "words");
|
|
31710
31720
|
if (meaning !== void 0)
|
|
@@ -31735,7 +31745,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31735
31745
|
title: note.title,
|
|
31736
31746
|
...documentSource(note, accounts, profiles, note.source === "file" ? (await store.files.ofDocument(note.ref))[0] : void 0),
|
|
31737
31747
|
updated_at: at,
|
|
31738
|
-
excerpt: firstLine(note.text,
|
|
31748
|
+
excerpt: firstLine(note.text, words4),
|
|
31739
31749
|
links,
|
|
31740
31750
|
found_by: foundBy,
|
|
31741
31751
|
...cosines.has(ref) ? { meaning_score: cosines.get(ref) } : {}
|
|
@@ -31759,7 +31769,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
31759
31769
|
if (record.ref?.startsWith("note:") || record.ref?.startsWith("document:"))
|
|
31760
31770
|
record.name = (await store.notes.note(record.ref).catch(() => void 0))?.title ?? record.name;
|
|
31761
31771
|
}
|
|
31762
|
-
const lane = withPictures2 ? await pictureLane(store,
|
|
31772
|
+
const lane = withPictures2 ? await pictureLane(store, words4, {
|
|
31763
31773
|
folderIds,
|
|
31764
31774
|
source,
|
|
31765
31775
|
limit: pictureLimit,
|
|
@@ -31792,6 +31802,7 @@ var notesScopeOf = /* @__PURE__ */ __name((accounts) => {
|
|
|
31792
31802
|
return { folderIds, ...accounts.length > folderIds.length ? { withInternal: true } : {} };
|
|
31793
31803
|
}, "notesScopeOf");
|
|
31794
31804
|
var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { accounts: list2, app, ...query }) => {
|
|
31805
|
+
text2 = plainQuery(text2);
|
|
31795
31806
|
const own = app?.command ?? query.command;
|
|
31796
31807
|
const what = `${own === void 0 ? "" : `${own} `}search notes`;
|
|
31797
31808
|
const held = [
|
|
@@ -31817,7 +31828,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
31817
31828
|
};
|
|
31818
31829
|
}, "searchNotesOf");
|
|
31819
31830
|
|
|
31820
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
31821
31832
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
31822
31833
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
31823
31834
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -31842,11 +31853,11 @@ var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
|
31842
31853
|
found_by: foundBy
|
|
31843
31854
|
}), "foundEvent");
|
|
31844
31855
|
var CANDIDATES3 = 50;
|
|
31845
|
-
var nearestEvents = /* @__PURE__ */ __name(async (store,
|
|
31856
|
+
var nearestEvents = /* @__PURE__ */ __name(async (store, words4, { limit, accountIds, env, command, embedders }) => {
|
|
31846
31857
|
const { model, directory: directory2, key } = localModel(void 0, env, command);
|
|
31847
31858
|
if (!await store.calendar.embedded(key, accountIds ? { accountIds } : {}))
|
|
31848
31859
|
throw new CliError("not_found", `no event has vectors of ${model.id} yet, so only words were matched`);
|
|
31849
|
-
const [vector] = await withLocal(model, directory2, void 0, (embedder) => embedder.embed([
|
|
31860
|
+
const [vector] = await withLocal(model, directory2, void 0, (embedder) => embedder.embed([words4], "query"), embedders);
|
|
31850
31861
|
const floor = meaningFloor(key);
|
|
31851
31862
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
31852
31863
|
}, "nearestEvents");
|
|
@@ -31854,6 +31865,7 @@ var keyOf4 = /* @__PURE__ */ __name(({ event }) => event.eventSeriesId === null
|
|
|
31854
31865
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
31855
31866
|
if (!query.trim())
|
|
31856
31867
|
throw new CliError("validation_error", "say what to find in the events");
|
|
31868
|
+
query = plainQuery(query);
|
|
31857
31869
|
const asked = discover && !exact && !newest ? questionLookup(query) : void 0;
|
|
31858
31870
|
const { root, stemmer } = await storeQuery(store, asked ?? query, {
|
|
31859
31871
|
...exact ? { exact: true } : {},
|
|
@@ -31862,7 +31874,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31862
31874
|
const accountIds = accounts === void 0 ? void 0 : await accountIdsOf(store, accounts);
|
|
31863
31875
|
if (accountIds?.length === 0)
|
|
31864
31876
|
return { query, by: "words", hits: [], has_more: false };
|
|
31865
|
-
const
|
|
31877
|
+
const words4 = plainQueryWords(asked === void 0 ? query : questionText(query));
|
|
31866
31878
|
const window2 = offset + limit;
|
|
31867
31879
|
let meaningSkipped;
|
|
31868
31880
|
let meaning;
|
|
@@ -31870,11 +31882,11 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31870
31882
|
meaningSkipped = "--exact searches words as written";
|
|
31871
31883
|
else if (newest)
|
|
31872
31884
|
meaningSkipped = "newest first orders by time";
|
|
31873
|
-
else if (
|
|
31885
|
+
else if (words4 === void 0)
|
|
31874
31886
|
meaningSkipped = "the query has fields or operators, which meaning cannot follow";
|
|
31875
31887
|
else
|
|
31876
31888
|
try {
|
|
31877
|
-
meaning = await nearestEvents(store,
|
|
31889
|
+
meaning = await nearestEvents(store, words4, {
|
|
31878
31890
|
limit: Math.max(window2, CANDIDATES3),
|
|
31879
31891
|
...accountIds ? { accountIds } : {},
|
|
31880
31892
|
...env === void 0 ? {} : { env },
|
|
@@ -31934,8 +31946,14 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31934
31946
|
};
|
|
31935
31947
|
}, "searchEvents");
|
|
31936
31948
|
|
|
31937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31938
|
-
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
31949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
31950
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
31951
|
+
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
31952
|
+
const { reason, span } = error.details ?? {};
|
|
31953
|
+
const why = typeof reason === "string" ? reason : void 0;
|
|
31954
|
+
const token = span && Number.isInteger(span.start) && Number.isInteger(span.end) ? text2.slice(span.start, span.end).trim() : "";
|
|
31955
|
+
return { ...why ? { why } : {}, ...token ? { token } : {} };
|
|
31956
|
+
}, "refusal");
|
|
31939
31957
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
31940
31958
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
31941
31959
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -31943,9 +31961,22 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
31943
31961
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
31944
31962
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
31945
31963
|
}, "filtersBeside");
|
|
31946
|
-
var
|
|
31947
|
-
|
|
31964
|
+
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
31965
|
+
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
31966
|
+
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
31967
|
+
const words4 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
31968
|
+
// A title holds "invoice", not the question mark of "invoice?".
|
|
31969
|
+
node.value.replace(/\?+$/u, "") || node.value
|
|
31970
|
+
) : (() => {
|
|
31971
|
+
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
31972
|
+
})());
|
|
31973
|
+
return { words: words4, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
31974
|
+
}, "titleWords");
|
|
31975
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => kindIn(provider) === "crm"), "crmAccounts");
|
|
31976
|
+
var searchAll = /* @__PURE__ */ __name(async (store, account2, asked, messenger = {}, searchMessages = (query) => searchStore(store, account2, query, messenger), meaning) => {
|
|
31977
|
+
if (!asked.text.trim())
|
|
31948
31978
|
throw new CliError("validation_error", "say what to find");
|
|
31979
|
+
const request = { ...asked, text: plainQuery(asked.text) };
|
|
31949
31980
|
const offset = request.offset ?? 0;
|
|
31950
31981
|
if (!Number.isInteger(offset) || offset < 0 || offset > MAX_SEARCH_OFFSET)
|
|
31951
31982
|
throw new CliError("validation_error", `offset takes a whole number from 0 to ${MAX_SEARCH_OFFSET}`);
|
|
@@ -32036,12 +32067,11 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32036
32067
|
const held = fused2.get(hit.locator);
|
|
32037
32068
|
if (held)
|
|
32038
32069
|
held.item.foundBy = ["words", "meaning"];
|
|
32070
|
+
const vote = 1 / (RRF_K3 + rank + 1);
|
|
32039
32071
|
if (held && discovers)
|
|
32040
|
-
|
|
32041
|
-
|
|
32042
|
-
item: held?.item ?? itemOf2(hit, ["meaning"]),
|
|
32043
|
-
score: (held?.score ?? 0) + 1 / (RRF_K3 + rank + 1)
|
|
32044
|
-
});
|
|
32072
|
+
held.score = Math.max(held.score, vote);
|
|
32073
|
+
else
|
|
32074
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf2(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
32045
32075
|
});
|
|
32046
32076
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
32047
32077
|
}, "messagesOf");
|
|
@@ -32121,13 +32151,37 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32121
32151
|
foundBy: hit.found_by
|
|
32122
32152
|
})));
|
|
32123
32153
|
accounts.push(...read.map(({ provider, account: account3 }) => ({ resource, provider, account: account3 })));
|
|
32154
|
+
} else if (resource === "crm") {
|
|
32155
|
+
const { words: words4, anyWord } = titleWords(request.text);
|
|
32156
|
+
const chosen = request.scope?.crm;
|
|
32157
|
+
const found = await store.deals.find({
|
|
32158
|
+
words: words4,
|
|
32159
|
+
anyWord: anyWord || discover,
|
|
32160
|
+
...request.crmKinds === void 0 ? {} : { kinds: request.crmKinds },
|
|
32161
|
+
limit: Math.min(window2 + 1, 500),
|
|
32162
|
+
...chosen === void 0 ? {} : { accounts: chosen }
|
|
32163
|
+
});
|
|
32164
|
+
hasMore ||= found.length > window2;
|
|
32165
|
+
lists.push(found.slice(0, window2).map((deal) => ({
|
|
32166
|
+
kind: deal.kind,
|
|
32167
|
+
ref: deal.ref,
|
|
32168
|
+
provider: deal.account?.provider ?? "crm",
|
|
32169
|
+
account: deal.account?.account ?? INTERNAL_NOTES,
|
|
32170
|
+
title: deal.title,
|
|
32171
|
+
timestamp: deal.updatedAt,
|
|
32172
|
+
text: deal.summary,
|
|
32173
|
+
foundBy: ["title"]
|
|
32174
|
+
})));
|
|
32175
|
+
const read = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
32176
|
+
for (const { provider, account: account3 } of read)
|
|
32177
|
+
accounts.push({ resource, provider, account: account3 });
|
|
32124
32178
|
} else
|
|
32125
32179
|
lists.push(await messagesOf(resource));
|
|
32126
32180
|
searched.push(resource);
|
|
32127
32181
|
} catch (error) {
|
|
32128
32182
|
if (!skippable(error))
|
|
32129
32183
|
throw error;
|
|
32130
|
-
skipped.push({ resource, code: error.code, reason: error.message });
|
|
32184
|
+
skipped.push({ resource, code: error.code, reason: error.message, ...refusal(error, request.text) });
|
|
32131
32185
|
}
|
|
32132
32186
|
}
|
|
32133
32187
|
} finally {
|
|
@@ -32136,7 +32190,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
32136
32190
|
const ordered = oneList(lists, cosines);
|
|
32137
32191
|
const more = hasMore || ordered.length > window2;
|
|
32138
32192
|
return {
|
|
32139
|
-
query:
|
|
32193
|
+
query: asked.text,
|
|
32140
32194
|
items: ordered.slice(offset, window2),
|
|
32141
32195
|
hasMore: more,
|
|
32142
32196
|
...more && window2 <= MAX_SEARCH_OFFSET ? { nextOffset: window2 } : {},
|
|
@@ -32163,7 +32217,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
32163
32217
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
32164
32218
|
}, "oneList");
|
|
32165
32219
|
|
|
32166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
32167
32221
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
32168
32222
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
32169
32223
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32408,7 +32462,8 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
32408
32462
|
messages: named2("messages"),
|
|
32409
32463
|
mail: named2("mail"),
|
|
32410
32464
|
notes: named2("notes"),
|
|
32411
|
-
events: named2("events")
|
|
32465
|
+
events: named2("events"),
|
|
32466
|
+
crm: named2("crm")
|
|
32412
32467
|
},
|
|
32413
32468
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
32414
32469
|
}, messenger, searchMessages, meaning);
|
|
@@ -32416,7 +32471,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
32416
32471
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32417
32472
|
}, "searchAllOfSource");
|
|
32418
32473
|
|
|
32419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32420
32475
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32421
32476
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
32422
32477
|
var DEFAULT_BACKEND = "both";
|
|
@@ -32464,12 +32519,12 @@ var branchesOf = /* @__PURE__ */ __name((node, account2) => {
|
|
|
32464
32519
|
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
32465
32520
|
return should.length ? should.flatMap(({ node: node2 }) => branchesOf(node2, account2)) : [{ words: [] }];
|
|
32466
32521
|
}, "branchesOf");
|
|
32467
|
-
var asQuery = /* @__PURE__ */ __name(({ words:
|
|
32468
|
-
text:
|
|
32522
|
+
var asQuery = /* @__PURE__ */ __name(({ words: words4, from, ...rest }) => ({
|
|
32523
|
+
text: words4.join(" "),
|
|
32469
32524
|
...rest,
|
|
32470
32525
|
...from !== void 0 && rest.chat !== void 0 ? { from } : {}
|
|
32471
32526
|
}), "asQuery");
|
|
32472
|
-
var
|
|
32527
|
+
var refusal2 = {
|
|
32473
32528
|
unsupported: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
32474
32529
|
pushed_history: "this messenger's server cannot search messages \u2014 use --backend archive",
|
|
32475
32530
|
offline: "--backend server needs the network \u2014 not with --offline",
|
|
@@ -32493,7 +32548,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32493
32548
|
if (quiet2)
|
|
32494
32549
|
return void 0;
|
|
32495
32550
|
if (backend === "server")
|
|
32496
|
-
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error",
|
|
32551
|
+
throw new CliError(reason === "not_allowed" ? "permission_error" : "validation_error", refusal2[reason], {
|
|
32497
32552
|
reason
|
|
32498
32553
|
});
|
|
32499
32554
|
return { report: { ...report, skipped: reason, complete: false }, sources };
|
|
@@ -32522,7 +32577,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32522
32577
|
return skip("other_accounts");
|
|
32523
32578
|
const all = branchesOf(execution.root, account2).flatMap((branch) => merge(scoped, branch) ?? []);
|
|
32524
32579
|
const unique = [
|
|
32525
|
-
...new Map(all.filter(({ words:
|
|
32580
|
+
...new Map(all.filter(({ words: words4 }) => words4.length).map((branch) => [JSON.stringify(branch), branch])).values()
|
|
32526
32581
|
];
|
|
32527
32582
|
if (!unique.length)
|
|
32528
32583
|
return skip("no_words");
|
|
@@ -32605,7 +32660,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32605
32660
|
return { report, sources };
|
|
32606
32661
|
}, "searchServer");
|
|
32607
32662
|
|
|
32608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32609
32664
|
var DELETE_AT_ONCE = 10;
|
|
32610
32665
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
32611
32666
|
const files = fileLinks(attachments);
|
|
@@ -33046,7 +33101,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
33046
33101
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
33047
33102
|
}, "checkMediaOptions");
|
|
33048
33103
|
|
|
33049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
33050
33105
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
33051
33106
|
var RULES = {
|
|
33052
33107
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -33061,7 +33116,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
33061
33116
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
33062
33117
|
}), "classifyChannel");
|
|
33063
33118
|
|
|
33064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
33065
33120
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
33066
33121
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
33067
33122
|
const store = await deps.store();
|
|
@@ -33147,7 +33202,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
33147
33202
|
};
|
|
33148
33203
|
}, "metadataService");
|
|
33149
33204
|
|
|
33150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
33151
33206
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
33152
33207
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
33153
33208
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -33184,7 +33239,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
33184
33239
|
return { chatId, rows, notes };
|
|
33185
33240
|
}, "moderateWith");
|
|
33186
33241
|
|
|
33187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
33188
33243
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
33189
33244
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
33190
33245
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -33262,7 +33317,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
33262
33317
|
}, "removePerson")
|
|
33263
33318
|
}), "moderatorOf");
|
|
33264
33319
|
|
|
33265
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
33266
33321
|
var CONTEXT_MESSAGES2 = 10;
|
|
33267
33322
|
var CONTEXT_BYTES = 64 * 1024;
|
|
33268
33323
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -33523,10 +33578,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
33523
33578
|
};
|
|
33524
33579
|
}, "personMessages");
|
|
33525
33580
|
|
|
33526
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
33527
33582
|
import { createHash as createHash11 } from "node:crypto";
|
|
33528
33583
|
|
|
33529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
33530
33585
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
33531
33586
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
33532
33587
|
const parsed = parseMeetingReference(reference);
|
|
@@ -33574,7 +33629,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
33574
33629
|
};
|
|
33575
33630
|
}, "resolveMeetingReference");
|
|
33576
33631
|
|
|
33577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
33578
33633
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
33579
33634
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
33580
33635
|
if (signal?.aborted)
|
|
@@ -33773,7 +33828,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
33773
33828
|
return { ...packet, fingerprint: hash(packet) };
|
|
33774
33829
|
}, "readMeetingEvidence");
|
|
33775
33830
|
|
|
33776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
33777
33832
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
33778
33833
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
33779
33834
|
const requestedAccounts = options.accountIds;
|
|
@@ -33872,7 +33927,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
33872
33927
|
};
|
|
33873
33928
|
}, "personMeetingContext");
|
|
33874
33929
|
|
|
33875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
33876
33931
|
var PREPARE_BYTES = 96 * 1024;
|
|
33877
33932
|
var MEETINGS = 5;
|
|
33878
33933
|
var CUES = 3;
|
|
@@ -33989,7 +34044,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
33989
34044
|
}
|
|
33990
34045
|
}, "meetingsOf");
|
|
33991
34046
|
|
|
33992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
33993
34048
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
33994
34049
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
33995
34050
|
const held = await storeIfOpen(deps);
|
|
@@ -34059,7 +34114,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
34059
34114
|
complete: false
|
|
34060
34115
|
})), "quiet");
|
|
34061
34116
|
|
|
34062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
34063
34118
|
var TIMELINE_ITEMS = 50;
|
|
34064
34119
|
var TIMELINE_MAX = 500;
|
|
34065
34120
|
var SCOPES = ["personal", "work"];
|
|
@@ -34114,7 +34169,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
34114
34169
|
};
|
|
34115
34170
|
}, "personTimeline");
|
|
34116
34171
|
|
|
34117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
34118
34173
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
34119
34174
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
34120
34175
|
const held = await storeIfOpen(deps);
|
|
@@ -34341,7 +34396,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
34341
34396
|
return rest;
|
|
34342
34397
|
}, "withoutPhone");
|
|
34343
34398
|
|
|
34344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
34345
34400
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
34346
34401
|
id: note.id,
|
|
34347
34402
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -34385,7 +34440,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
34385
34440
|
};
|
|
34386
34441
|
}, "privatePeopleService");
|
|
34387
34442
|
|
|
34388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
34389
34444
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
34390
34445
|
total: 0,
|
|
34391
34446
|
population: 0,
|
|
@@ -34641,7 +34696,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
34641
34696
|
}, "evidence")
|
|
34642
34697
|
}), "rankingsService");
|
|
34643
34698
|
|
|
34644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
34645
34700
|
var FIELDS = ["date", "chat", "kind"];
|
|
34646
34701
|
var WAITING_TAIL = 100;
|
|
34647
34702
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -34768,7 +34823,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34768
34823
|
};
|
|
34769
34824
|
}, "replyStatsService");
|
|
34770
34825
|
|
|
34771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
34772
34827
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
34773
34828
|
id: one2.id,
|
|
34774
34829
|
name: one2.name,
|
|
@@ -34814,14 +34869,14 @@ var named = /* @__PURE__ */ __name((search, check) => {
|
|
|
34814
34869
|
throw new CliError(error.code, `${label}: ${error.message}`, error.details);
|
|
34815
34870
|
}
|
|
34816
34871
|
}, "named");
|
|
34817
|
-
var both = /* @__PURE__ */ __name((stored,
|
|
34872
|
+
var both = /* @__PURE__ */ __name((stored, words4) => ({
|
|
34818
34873
|
version: 1,
|
|
34819
34874
|
language: "lucene-v1",
|
|
34820
34875
|
root: {
|
|
34821
34876
|
kind: "boolean",
|
|
34822
34877
|
clauses: [
|
|
34823
34878
|
{ occur: "must", node: stored.root },
|
|
34824
|
-
{ occur: "must", node: parseLucene(
|
|
34879
|
+
{ occur: "must", node: parseLucene(words4, MESSAGE_PARSING).root }
|
|
34825
34880
|
],
|
|
34826
34881
|
span: { start: 0, end: 0 }
|
|
34827
34882
|
}
|
|
@@ -34862,7 +34917,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34862
34917
|
}), "history"),
|
|
34863
34918
|
delete: /* @__PURE__ */ __name((reference) => inStore(async (store) => store.searches.deleteSearch((await found(store, reference)).id)), "delete"),
|
|
34864
34919
|
clear: /* @__PURE__ */ __name(() => inStore(async (store) => ({ cleared: await store.searches.clearSearchHistory(MESSAGE_SEARCH_COMMANDS) })), "clear"),
|
|
34865
|
-
resolve: /* @__PURE__ */ __name((reference, { text:
|
|
34920
|
+
resolve: /* @__PURE__ */ __name((reference, { text: words4, ...typed }) => inStore(async (store) => {
|
|
34866
34921
|
const search = await found(store, reference);
|
|
34867
34922
|
const stored = search.params;
|
|
34868
34923
|
const inherited = { ...stored };
|
|
@@ -34883,7 +34938,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34883
34938
|
throw new CliError("validation_error", "the legacy search and --regex are gone; save it again as Lucene");
|
|
34884
34939
|
checked(stored);
|
|
34885
34940
|
});
|
|
34886
|
-
const extra =
|
|
34941
|
+
const extra = words4?.trim() ? words4.trim() : void 0;
|
|
34887
34942
|
if (extra !== void 0) {
|
|
34888
34943
|
if (params.ast !== void 0)
|
|
34889
34944
|
params.ast = both(validateAst(params.ast), extra);
|
|
@@ -34897,7 +34952,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34897
34952
|
};
|
|
34898
34953
|
}, "searchesService");
|
|
34899
34954
|
|
|
34900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
34901
34956
|
var TAGGING_QUERY = {
|
|
34902
34957
|
entity: "tagging",
|
|
34903
34958
|
backend: "sql",
|
|
@@ -34981,7 +35036,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34981
35036
|
};
|
|
34982
35037
|
}, "tagsService");
|
|
34983
35038
|
|
|
34984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
34985
35040
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
34986
35041
|
var PERIOD_FIELD = "created";
|
|
34987
35042
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -35084,7 +35139,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
35084
35139
|
}));
|
|
35085
35140
|
}, "meetingNames");
|
|
35086
35141
|
|
|
35087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
35088
35143
|
var TASK_QUERY = {
|
|
35089
35144
|
entity: "task",
|
|
35090
35145
|
backend: "sql",
|
|
@@ -35576,7 +35631,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
35576
35631
|
};
|
|
35577
35632
|
}, "taskView");
|
|
35578
35633
|
|
|
35579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
35580
35635
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
35581
35636
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
35582
35637
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -35775,7 +35830,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35775
35830
|
};
|
|
35776
35831
|
}, "topicsService");
|
|
35777
35832
|
|
|
35778
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
35779
35834
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
35780
35835
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
35781
35836
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -35849,7 +35904,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
35849
35904
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
35850
35905
|
}, "prepareEvidencePacket");
|
|
35851
35906
|
|
|
35852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
35853
35908
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
35854
35909
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
35855
35910
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -35869,7 +35924,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
35869
35924
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
35870
35925
|
}, "readEvidencePacket");
|
|
35871
35926
|
|
|
35872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
35873
35928
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
35874
35929
|
let before2 = Number.POSITIVE_INFINITY;
|
|
35875
35930
|
for (; ; ) {
|
|
@@ -35922,7 +35977,7 @@ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35922
35977
|
return { input, selection };
|
|
35923
35978
|
}, "resolveMeetingSelection");
|
|
35924
35979
|
var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, options = {}) => {
|
|
35925
|
-
const lifted = liftMeetingFields(query, request);
|
|
35980
|
+
const lifted = liftMeetingFields(plainQuery(query, MEETING_FIELD_NAMES), request);
|
|
35926
35981
|
const { input, selection } = await resolveMeetingSelection(store, lifted.request);
|
|
35927
35982
|
if (options.refreshIndex !== false)
|
|
35928
35983
|
await refreshMeetingIndex(store.meetings, input.accountId, input.signal);
|
|
@@ -35931,7 +35986,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
35931
35986
|
return { ...result, selection };
|
|
35932
35987
|
}, "searchMeetingHits");
|
|
35933
35988
|
|
|
35934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
35935
35990
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
35936
35991
|
const { maxMessages, url, ...selecting } = request;
|
|
35937
35992
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -35970,10 +36025,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35970
36025
|
};
|
|
35971
36026
|
}, "readMeetingLinks");
|
|
35972
36027
|
|
|
35973
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
35974
36029
|
import { createHash as createHash13 } from "node:crypto";
|
|
35975
36030
|
|
|
35976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
35977
36032
|
function invalid3(field, response = false) {
|
|
35978
36033
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
35979
36034
|
}
|
|
@@ -36092,7 +36147,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
36092
36147
|
}
|
|
36093
36148
|
}, "candidateCatalog");
|
|
36094
36149
|
|
|
36095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
36096
36151
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
36097
36152
|
const fixed = snapshotMeetingScope(scope);
|
|
36098
36153
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -36145,7 +36200,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
36145
36200
|
};
|
|
36146
36201
|
}, "createMeetingProjectCandidateReader");
|
|
36147
36202
|
|
|
36148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36149
36204
|
import { createHash as createHash14 } from "node:crypto";
|
|
36150
36205
|
var scopeKeys = [
|
|
36151
36206
|
"accountId",
|
|
@@ -36280,7 +36335,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
36280
36335
|
};
|
|
36281
36336
|
}, "readMeetingProjectDiscovery");
|
|
36282
36337
|
|
|
36283
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
36284
36339
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
36285
36340
|
const { limit, ...selecting } = request;
|
|
36286
36341
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -36288,7 +36343,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
36288
36343
|
return { ...review, selection };
|
|
36289
36344
|
}, "readMeetingReview");
|
|
36290
36345
|
|
|
36291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
36292
36347
|
var KIND = ["meetings-search"];
|
|
36293
36348
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
36294
36349
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -36318,7 +36373,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
36318
36373
|
};
|
|
36319
36374
|
}, "meetingSearchesService");
|
|
36320
36375
|
|
|
36321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
36322
36377
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
36323
36378
|
const { timeZone, maxRows, ...selecting } = request;
|
|
36324
36379
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -36341,7 +36396,7 @@ var readMeetingCounts = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
36341
36396
|
return { ...counts, selection };
|
|
36342
36397
|
}, "readMeetingCounts");
|
|
36343
36398
|
|
|
36344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
36345
36400
|
import { createHash as createHash15 } from "node:crypto";
|
|
36346
36401
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
36347
36402
|
ref: cue.reference,
|
|
@@ -36459,7 +36514,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
36459
36514
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
36460
36515
|
}, "readMeetingHitContext");
|
|
36461
36516
|
|
|
36462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
36463
36518
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
36464
36519
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
36465
36520
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -36536,7 +36591,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
36536
36591
|
return { packet, content };
|
|
36537
36592
|
}, "readMeetingPassage");
|
|
36538
36593
|
|
|
36539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
36540
36595
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
36541
36596
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
36542
36597
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -36550,10 +36605,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
36550
36605
|
};
|
|
36551
36606
|
}, "createMeetingBatchReader");
|
|
36552
36607
|
|
|
36553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
36554
36609
|
import { createHash as createHash16 } from "node:crypto";
|
|
36555
36610
|
|
|
36556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
36557
36612
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
36558
36613
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
36559
36614
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -36705,7 +36760,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
36705
36760
|
};
|
|
36706
36761
|
}, "applyMeetingEmbedding");
|
|
36707
36762
|
|
|
36708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
36709
36764
|
var DEPTH = 200;
|
|
36710
36765
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
36711
36766
|
if (value === void 0)
|
|
@@ -36722,8 +36777,8 @@ var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
|
36722
36777
|
}, "cursorOf");
|
|
36723
36778
|
var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, typed, request) => {
|
|
36724
36779
|
const { maxChunks, maxRows, maxTextBytes, ...chosen } = request;
|
|
36725
|
-
const { query, request:
|
|
36726
|
-
const { input, selection } = await resolveMeetingSelection(store,
|
|
36780
|
+
const { query, request: words4 } = liftMeetingFields(typed, chosen);
|
|
36781
|
+
const { input, selection } = await resolveMeetingSelection(store, words4);
|
|
36727
36782
|
const { after, limit = 20, maxReadBytes, ...filters } = input;
|
|
36728
36783
|
const terms = questionTerms(query);
|
|
36729
36784
|
const wordQuery = terms === null ? query : terms.join(" ");
|
|
@@ -36842,7 +36897,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
36842
36897
|
};
|
|
36843
36898
|
}, "searchMeetingsCombined");
|
|
36844
36899
|
|
|
36845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
36846
36901
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
36847
36902
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
36848
36903
|
if (!signal?.aborted)
|
|
@@ -36947,7 +37002,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
36947
37002
|
};
|
|
36948
37003
|
}, "createMeetingContextService");
|
|
36949
37004
|
|
|
36950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
36951
37006
|
var integer = /* @__PURE__ */ __name((value, name, max) => {
|
|
36952
37007
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
36953
37008
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -37174,7 +37229,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
37174
37229
|
};
|
|
37175
37230
|
}, "openMeetingEmbedder");
|
|
37176
37231
|
|
|
37177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
37178
37233
|
var communicationFields = {
|
|
37179
37234
|
sources: pipe(array(strictObject({
|
|
37180
37235
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -37194,8 +37249,8 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
37194
37249
|
throw new CliError("validation_error", `invalid communications.${field}`);
|
|
37195
37250
|
}
|
|
37196
37251
|
const input = parsed.output;
|
|
37197
|
-
const
|
|
37198
|
-
if (Buffer.byteLength(input.query) > 2048 || !
|
|
37252
|
+
const words4 = input.query.match(/[\p{L}\p{N}]+/gu) ?? [];
|
|
37253
|
+
if (Buffer.byteLength(input.query) > 2048 || !words4.length || words4.length > 16)
|
|
37199
37254
|
throw new CliError("validation_error", "communications.query needs 1\u201316 literal words within 2048 UTF-8 bytes");
|
|
37200
37255
|
const before2 = input.before ?? preparationAfter;
|
|
37201
37256
|
const after = input.after ?? Math.max(0, before2 - 14 * 864e5);
|
|
@@ -37206,7 +37261,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
37206
37261
|
return { ...input, after, before: before2 };
|
|
37207
37262
|
}, "communicationRequest");
|
|
37208
37263
|
|
|
37209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
37210
37265
|
var MEETING_PREPARATION_LIMITS = {
|
|
37211
37266
|
meetings: { min: 1, max: 20, default: 5 },
|
|
37212
37267
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -37292,7 +37347,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
37292
37347
|
return { ...input, history };
|
|
37293
37348
|
}, "preparationRequest");
|
|
37294
37349
|
|
|
37295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
37296
37351
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
37297
37352
|
const section = {
|
|
37298
37353
|
readUsage: plan.reader.usage(),
|
|
@@ -37397,7 +37452,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
37397
37452
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
37398
37453
|
}, "appendPreparationCommunications");
|
|
37399
37454
|
|
|
37400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
37401
37456
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
37402
37457
|
if (port === void 0)
|
|
37403
37458
|
return void 0;
|
|
@@ -37502,7 +37557,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
37502
37557
|
}
|
|
37503
37558
|
}, "validatePreparationCommunications");
|
|
37504
37559
|
|
|
37505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
37506
37561
|
var invalid4 = /* @__PURE__ */ __name(() => {
|
|
37507
37562
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
37508
37563
|
}, "invalid");
|
|
@@ -37571,7 +37626,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
37571
37626
|
}
|
|
37572
37627
|
}, "appendKnowledgePreparation");
|
|
37573
37628
|
|
|
37574
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
37575
37630
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
37576
37631
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
37577
37632
|
}, "invalid");
|
|
@@ -37645,7 +37700,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
37645
37700
|
}
|
|
37646
37701
|
}, "appendNotesPreparation");
|
|
37647
37702
|
|
|
37648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
37649
37704
|
var PAGE_LIMIT = 4;
|
|
37650
37705
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37651
37706
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -37695,7 +37750,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
37695
37750
|
}
|
|
37696
37751
|
}, "appendProjectPreparation");
|
|
37697
37752
|
|
|
37698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
37699
37754
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
37700
37755
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
37701
37756
|
return;
|
|
@@ -37767,7 +37822,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
37767
37822
|
}
|
|
37768
37823
|
}, "appendRelatedPreparation");
|
|
37769
37824
|
|
|
37770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37825
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
37771
37826
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37772
37827
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
37773
37828
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -37905,7 +37960,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
37905
37960
|
};
|
|
37906
37961
|
}, "createMeetingPreparationService");
|
|
37907
37962
|
|
|
37908
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
37909
37964
|
import { createHash as createHash17 } from "node:crypto";
|
|
37910
37965
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
37911
37966
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -37925,7 +37980,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
37925
37980
|
};
|
|
37926
37981
|
}, "proposeMeetingTask");
|
|
37927
37982
|
|
|
37928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
37929
37984
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
37930
37985
|
const { provider, account: account2, scope } = key;
|
|
37931
37986
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -37988,7 +38043,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
37988
38043
|
}
|
|
37989
38044
|
}, "readMeetingTask");
|
|
37990
38045
|
|
|
37991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
37992
38047
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
37993
38048
|
const installer = ports.installer();
|
|
37994
38049
|
const argv = updateCommand(installer, packageName);
|
|
@@ -38053,7 +38108,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
38053
38108
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
38054
38109
|
}, "dayAfter");
|
|
38055
38110
|
|
|
38056
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
38057
38112
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
38058
38113
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
38059
38114
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -38076,7 +38131,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
38076
38131
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
38077
38132
|
}, "approveAsTask");
|
|
38078
38133
|
|
|
38079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
38080
38135
|
var MAX_IDS = 500;
|
|
38081
38136
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
38082
38137
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -38118,7 +38173,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
38118
38173
|
return ids;
|
|
38119
38174
|
}, "parseProposalIds");
|
|
38120
38175
|
|
|
38121
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
38122
38177
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
38123
38178
|
if (author.type === "person")
|
|
38124
38179
|
return { type: "person", id: author.id };
|
|
@@ -38160,7 +38215,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
38160
38215
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
38161
38216
|
}, "storedStatus");
|
|
38162
38217
|
|
|
38163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
38164
38219
|
var FACT_SUMMARIES = {
|
|
38165
38220
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
38166
38221
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -38232,8 +38287,64 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38232
38287
|
};
|
|
38233
38288
|
}, "findingsKind");
|
|
38234
38289
|
|
|
38235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38236
|
-
var
|
|
38290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
38291
|
+
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
38292
|
+
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
38293
|
+
var rowOf2 = /* @__PURE__ */ __name((action) => {
|
|
38294
|
+
const renamed2 = action.kind === ORGANIZATION_RENAME_KIND;
|
|
38295
|
+
const { name, kind } = action.payload;
|
|
38296
|
+
const { organization } = action.payload;
|
|
38297
|
+
return {
|
|
38298
|
+
id: action.id,
|
|
38299
|
+
kind: "organization",
|
|
38300
|
+
status: actionStatus(action.status),
|
|
38301
|
+
project: null,
|
|
38302
|
+
subject: renamed2 ? organization : "organization:new",
|
|
38303
|
+
object: null,
|
|
38304
|
+
summary: renamed2 ? `rename ${organization} to ${name}` : `add ${kind} ${name}`,
|
|
38305
|
+
proposedBy: proposerOfAction(action),
|
|
38306
|
+
reason: action.reason,
|
|
38307
|
+
evidence: [],
|
|
38308
|
+
score: null,
|
|
38309
|
+
signals: null,
|
|
38310
|
+
parts: null,
|
|
38311
|
+
createdAt: action.createdAt
|
|
38312
|
+
};
|
|
38313
|
+
}, "rowOf");
|
|
38314
|
+
var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
38315
|
+
kind: "organization",
|
|
38316
|
+
stored: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
38317
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
38318
|
+
const status = storedStatus(filter);
|
|
38319
|
+
const actions = await store.proposedActions.list({
|
|
38320
|
+
kinds: [ORGANIZATION_ADD_KIND, ORGANIZATION_RENAME_KIND],
|
|
38321
|
+
...status === void 0 ? {} : { status },
|
|
38322
|
+
...pushed2(filter)
|
|
38323
|
+
});
|
|
38324
|
+
return kept(actions.map(rowOf2), filter);
|
|
38325
|
+
}, "list"),
|
|
38326
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf2(await store.proposedActions.get(id2)), "get"),
|
|
38327
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38328
|
+
if (!confirm) {
|
|
38329
|
+
await store.proposedActions.reject(id2, by, reason);
|
|
38330
|
+
return { id: id2, kind: "organization", status: "rejected", made: [] };
|
|
38331
|
+
}
|
|
38332
|
+
const action = await store.proposedActions.get(id2);
|
|
38333
|
+
if (action.kind === ORGANIZATION_RENAME_KIND) {
|
|
38334
|
+
const { organization, name: name2 } = action.payload;
|
|
38335
|
+
const renamed2 = await store.knowledge.updateOrganization(organization, { name: name2 });
|
|
38336
|
+
await store.proposedActions.approve(id2, by, { organization: renamed2.ref });
|
|
38337
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [] };
|
|
38338
|
+
}
|
|
38339
|
+
const { name, kind, scope } = action.payload;
|
|
38340
|
+
const made = await store.knowledge.addOrganization({ name, kind, ...scope === void 0 ? {} : { scope } });
|
|
38341
|
+
await store.proposedActions.approve(id2, by, { organization: made.ref });
|
|
38342
|
+
return { id: id2, kind: "organization", status: "confirmed", made: [made.ref] };
|
|
38343
|
+
}, "decide")
|
|
38344
|
+
}), "organizationKind");
|
|
38345
|
+
|
|
38346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
38347
|
+
var rowOf3 = /* @__PURE__ */ __name((action) => ({
|
|
38237
38348
|
id: action.id,
|
|
38238
38349
|
kind: "action",
|
|
38239
38350
|
status: actionStatus(action.status),
|
|
@@ -38259,9 +38370,9 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
38259
38370
|
...status === void 0 ? {} : { status },
|
|
38260
38371
|
...pushed2(filter)
|
|
38261
38372
|
});
|
|
38262
|
-
return kept(actions.map(
|
|
38373
|
+
return kept(actions.map(rowOf3), filter);
|
|
38263
38374
|
}, "list"),
|
|
38264
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38375
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf3(await store.proposedActions.get(id2)), "get"),
|
|
38265
38376
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38266
38377
|
if (!confirm) {
|
|
38267
38378
|
await store.proposedActions.reject(id2, by, reason);
|
|
@@ -38272,7 +38383,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
38272
38383
|
}, "decide")
|
|
38273
38384
|
}), "actionKind");
|
|
38274
38385
|
|
|
38275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
38276
38387
|
var STATUS = {
|
|
38277
38388
|
proposed: "proposed",
|
|
38278
38389
|
accepted: "confirmed",
|
|
@@ -38280,7 +38391,7 @@ var STATUS = {
|
|
|
38280
38391
|
reversed: "confirmed",
|
|
38281
38392
|
rejected: "rejected"
|
|
38282
38393
|
};
|
|
38283
|
-
var
|
|
38394
|
+
var rowOf4 = /* @__PURE__ */ __name((fact) => ({
|
|
38284
38395
|
id: fact.ref,
|
|
38285
38396
|
kind: "fact",
|
|
38286
38397
|
status: STATUS[fact.status],
|
|
@@ -38306,17 +38417,17 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38306
38417
|
...status === "all" ? {} : { status: status === "confirmed" ? "accepted" : status },
|
|
38307
38418
|
order: "created"
|
|
38308
38419
|
});
|
|
38309
|
-
return kept(facts.map(
|
|
38420
|
+
return kept(facts.map(rowOf4), filter);
|
|
38310
38421
|
}, "list"),
|
|
38311
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38422
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf4(await store.facts.get(id2)), "get"),
|
|
38312
38423
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38313
38424
|
const fact = confirm ? await store.facts.accept(id2, by, reason) : await store.facts.reject(id2, by, reason);
|
|
38314
38425
|
return { id: id2, kind: "fact", status: confirm ? "confirmed" : "rejected", made: confirm ? [fact.ref] : [] };
|
|
38315
38426
|
}, "decide")
|
|
38316
38427
|
}), "factKind");
|
|
38317
38428
|
|
|
38318
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38319
|
-
var
|
|
38429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
38430
|
+
var rowOf5 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
38320
38431
|
id: entry.ref,
|
|
38321
38432
|
kind,
|
|
38322
38433
|
status: entry.review,
|
|
@@ -38339,9 +38450,9 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
38339
38450
|
const status = filter.status ?? "proposed";
|
|
38340
38451
|
const options = { ...pushed2(filter), ...status === "all" ? {} : { review: status } };
|
|
38341
38452
|
const entries = kind === "invoice" ? await store.finance.invoices(options) : await store.finance.payments(options);
|
|
38342
|
-
return kept(entries.map((entry) =>
|
|
38453
|
+
return kept(entries.map((entry) => rowOf5(kind, entry)), filter);
|
|
38343
38454
|
}, "list"),
|
|
38344
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38455
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf5(kind, kind === "invoice" ? await store.finance.invoice(id2) : await store.finance.payment(id2)), "get"),
|
|
38345
38456
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38346
38457
|
const entry = confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason);
|
|
38347
38458
|
return { id: id2, kind, status: confirm ? "confirmed" : "rejected", made: confirm ? [entry.ref] : [] };
|
|
@@ -38350,7 +38461,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
38350
38461
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
38351
38462
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
38352
38463
|
|
|
38353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
38354
38465
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
38355
38466
|
id: `key:${link4.id}`,
|
|
38356
38467
|
kind: "key_document",
|
|
@@ -38418,7 +38529,8 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
38418
38529
|
};
|
|
38419
38530
|
}, "keyDocumentKind");
|
|
38420
38531
|
|
|
38421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
38533
|
+
var words3 = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
38422
38534
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
38423
38535
|
switch (finding.kind) {
|
|
38424
38536
|
case "task":
|
|
@@ -38433,9 +38545,17 @@ var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
|
38433
38545
|
return `${finding.from} \u2192 ${finding.to}`;
|
|
38434
38546
|
case "new_contact":
|
|
38435
38547
|
return `${finding.name} <${finding.address}>`;
|
|
38548
|
+
case "invoice":
|
|
38549
|
+
return words3("invoice", finding.number, finding.total, finding.currency, finding.counterpartyName, `\xB7 ${finding.reason}`);
|
|
38550
|
+
case "payment":
|
|
38551
|
+
return words3("payment", finding.amount, finding.currency, finding.date, `\xB7 ${finding.reason}`);
|
|
38552
|
+
case "order":
|
|
38553
|
+
return words3("order", finding.number, finding.supplierName, finding.status ?? "placed", `\xB7 ${finding.reason}`);
|
|
38554
|
+
case "order_update":
|
|
38555
|
+
return words3("order", finding.number, finding.supplierName, finding.status, `\xB7 ${finding.reason}`);
|
|
38436
38556
|
}
|
|
38437
38557
|
}, "summaryOf");
|
|
38438
|
-
var
|
|
38558
|
+
var rowOf6 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
38439
38559
|
const findings = batch.input.findings;
|
|
38440
38560
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
38441
38561
|
const project = findings.flatMap((finding) => "project" in finding && finding.project ? [finding.project] : [])[0] ?? null;
|
|
@@ -38462,7 +38582,7 @@ var rowOf5 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
|
38462
38582
|
};
|
|
38463
38583
|
}, "rowOf");
|
|
38464
38584
|
var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
38465
|
-
const created = /* @__PURE__ */ __name(async (batch) =>
|
|
38585
|
+
const created = /* @__PURE__ */ __name(async (batch) => rowOf6(batch, (await store.proposedActions.get(batch.id)).createdAt), "created");
|
|
38466
38586
|
return {
|
|
38467
38587
|
kind: "mail_findings",
|
|
38468
38588
|
stored: [MAIL_FINDINGS_KIND],
|
|
@@ -38497,8 +38617,8 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38497
38617
|
};
|
|
38498
38618
|
}, "mailFindingsKind");
|
|
38499
38619
|
|
|
38500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38501
|
-
var
|
|
38620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
38621
|
+
var rowOf7 = /* @__PURE__ */ __name((action, batch) => {
|
|
38502
38622
|
const findings = batch.input.findings;
|
|
38503
38623
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
38504
38624
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
@@ -38543,12 +38663,12 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38543
38663
|
...filter.by === void 0 ? {} : { proposedBy: filter.by },
|
|
38544
38664
|
limit: Math.min(filter.offset + filter.limit, 500)
|
|
38545
38665
|
});
|
|
38546
|
-
const rows = await Promise.all(actions.map(async (action) =>
|
|
38666
|
+
const rows = await Promise.all(actions.map(async (action) => rowOf7(action, (await batchOf(action)).batch)));
|
|
38547
38667
|
return kept(rows, { ...filter, limit: filter.offset + filter.limit });
|
|
38548
38668
|
}, "list"),
|
|
38549
38669
|
get: /* @__PURE__ */ __name(async (id2) => {
|
|
38550
38670
|
const action = await store.proposedActions.get(id2);
|
|
38551
|
-
return
|
|
38671
|
+
return rowOf7(action, (await batchOf(action)).batch);
|
|
38552
38672
|
}, "get"),
|
|
38553
38673
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
|
|
38554
38674
|
const { account: account2, batch } = await batchOf(await store.proposedActions.get(id2));
|
|
@@ -38561,14 +38681,14 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
38561
38681
|
};
|
|
38562
38682
|
}, "meetingFindingsKind");
|
|
38563
38683
|
|
|
38564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
38565
38685
|
var STATUS2 = {
|
|
38566
38686
|
proposed: "proposed",
|
|
38567
38687
|
confirmed: "confirmed",
|
|
38568
38688
|
superseded: "confirmed",
|
|
38569
38689
|
stale: "rejected"
|
|
38570
38690
|
};
|
|
38571
|
-
var
|
|
38691
|
+
var rowOf8 = /* @__PURE__ */ __name((memory) => ({
|
|
38572
38692
|
id: memory.ref,
|
|
38573
38693
|
kind: "memory",
|
|
38574
38694
|
status: STATUS2[memory.status],
|
|
@@ -38593,16 +38713,48 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38593
38713
|
...pushed2(filter),
|
|
38594
38714
|
...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
|
|
38595
38715
|
});
|
|
38596
|
-
return kept(memories.map(
|
|
38716
|
+
return kept(memories.map(rowOf8), filter);
|
|
38597
38717
|
}, "list"),
|
|
38598
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38718
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.memories.get(id2)), "get"),
|
|
38599
38719
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
|
|
38600
38720
|
const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
|
|
38601
38721
|
return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
|
|
38602
38722
|
}, "decide")
|
|
38603
38723
|
}), "memoryKind");
|
|
38604
38724
|
|
|
38605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
38726
|
+
var rowOf9 = /* @__PURE__ */ __name((order) => ({
|
|
38727
|
+
id: order.ref,
|
|
38728
|
+
kind: "order",
|
|
38729
|
+
status: order.review,
|
|
38730
|
+
project: order.project,
|
|
38731
|
+
subject: order.ref,
|
|
38732
|
+
object: order.supplier?.ref ?? null,
|
|
38733
|
+
summary: order.title,
|
|
38734
|
+
proposedBy: proposerOfAuthor(order.author),
|
|
38735
|
+
reason: order.reason,
|
|
38736
|
+
evidence: [],
|
|
38737
|
+
score: null,
|
|
38738
|
+
signals: null,
|
|
38739
|
+
parts: null,
|
|
38740
|
+
createdAt: order.createdAt
|
|
38741
|
+
}), "rowOf");
|
|
38742
|
+
var orderKind = /* @__PURE__ */ __name((store) => ({
|
|
38743
|
+
kind: "order",
|
|
38744
|
+
prefix: "order",
|
|
38745
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
38746
|
+
const status = filter.status ?? "proposed";
|
|
38747
|
+
const orders = await store.orders.list({ ...pushed2(filter), ...status === "all" ? {} : { review: status } });
|
|
38748
|
+
return kept(orders.map(rowOf9), filter);
|
|
38749
|
+
}, "list"),
|
|
38750
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf9(await store.orders.get(id2)), "get"),
|
|
38751
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38752
|
+
const order = confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason);
|
|
38753
|
+
return { id: id2, kind: "order", status: confirm ? "confirmed" : "rejected", made: confirm ? [order.ref] : [] };
|
|
38754
|
+
}, "decide")
|
|
38755
|
+
}), "orderKind");
|
|
38756
|
+
|
|
38757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
38606
38758
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
38607
38759
|
id: `link:${link4.id}`,
|
|
38608
38760
|
kind: "relationship",
|
|
@@ -38676,10 +38828,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
38676
38828
|
};
|
|
38677
38829
|
}, "relationshipKind");
|
|
38678
38830
|
|
|
38679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
38680
38832
|
var KIND2 = "relationship_update";
|
|
38681
38833
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
38682
|
-
var
|
|
38834
|
+
var rowOf10 = /* @__PURE__ */ __name((action) => {
|
|
38683
38835
|
const payload = action.payload;
|
|
38684
38836
|
return {
|
|
38685
38837
|
id: action.id,
|
|
@@ -38708,9 +38860,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38708
38860
|
...status === void 0 ? {} : { status },
|
|
38709
38861
|
...pushed2(filter)
|
|
38710
38862
|
});
|
|
38711
|
-
return kept(stored.map(
|
|
38863
|
+
return kept(stored.map(rowOf10), filter);
|
|
38712
38864
|
}, "list"),
|
|
38713
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
38865
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf10(await store.proposedActions.get(id2)), "get"),
|
|
38714
38866
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
38715
38867
|
const { relation } = await store.knowledge.decideRelationUpdate(id2, {
|
|
38716
38868
|
confirm,
|
|
@@ -38726,8 +38878,8 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
38726
38878
|
}, "decide")
|
|
38727
38879
|
}), "relationshipUpdateKind");
|
|
38728
38880
|
|
|
38729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38730
|
-
var
|
|
38881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
38882
|
+
var rowOf11 = /* @__PURE__ */ __name((task2) => {
|
|
38731
38883
|
const suggestion = task2.closeSuggestion;
|
|
38732
38884
|
if (suggestion === null)
|
|
38733
38885
|
return void 0;
|
|
@@ -38752,7 +38904,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38752
38904
|
const taskOf = /* @__PURE__ */ __name(async (id2) => {
|
|
38753
38905
|
const key = id2.slice("close:".length);
|
|
38754
38906
|
const task2 = await store.tasks.details(key).catch(() => void 0);
|
|
38755
|
-
const row = task2 &&
|
|
38907
|
+
const row = task2 && rowOf11(task2);
|
|
38756
38908
|
if (!task2 || !row)
|
|
38757
38909
|
throw new CliError("not_found", `no close waits on task ${key}`);
|
|
38758
38910
|
return { task: task2, row };
|
|
@@ -38769,7 +38921,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38769
38921
|
where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
|
|
38770
38922
|
limit: filter.offset + filter.limit
|
|
38771
38923
|
});
|
|
38772
|
-
return kept(tasks.flatMap((task2) =>
|
|
38924
|
+
return kept(tasks.flatMap((task2) => rowOf11(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
|
|
38773
38925
|
}, "list"),
|
|
38774
38926
|
get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
|
|
38775
38927
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
@@ -38794,7 +38946,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
38794
38946
|
};
|
|
38795
38947
|
}, "taskCloseKind");
|
|
38796
38948
|
|
|
38797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38949
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
38798
38950
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
38799
38951
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
38800
38952
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -38885,9 +39037,9 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38885
39037
|
});
|
|
38886
39038
|
continue;
|
|
38887
39039
|
}
|
|
38888
|
-
const
|
|
38889
|
-
if (
|
|
38890
|
-
refused.push(
|
|
39040
|
+
const refusal3 = mayDecide(row, decision.by, policy);
|
|
39041
|
+
if (refusal3) {
|
|
39042
|
+
refused.push(refusal3);
|
|
38891
39043
|
continue;
|
|
38892
39044
|
}
|
|
38893
39045
|
decided.push(await kind.decide(id2, chosen.length ? { ...decision, parts: chosen } : decision));
|
|
@@ -38909,6 +39061,8 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38909
39061
|
factKind(store),
|
|
38910
39062
|
invoiceKind(store),
|
|
38911
39063
|
paymentKind(store),
|
|
39064
|
+
orderKind(store),
|
|
39065
|
+
organizationKind(store),
|
|
38912
39066
|
memoryKind(store),
|
|
38913
39067
|
findingsKind(store),
|
|
38914
39068
|
mailFindingsKind(store),
|
|
@@ -38920,7 +39074,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
38920
39074
|
return registry;
|
|
38921
39075
|
}, "proposalRegistry");
|
|
38922
39076
|
|
|
38923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
38924
39078
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
38925
39079
|
const invalid6 = /* @__PURE__ */ __name((field) => {
|
|
38926
39080
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -38962,7 +39116,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
38962
39116
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
38963
39117
|
}, "storedCandidateRequest");
|
|
38964
39118
|
|
|
38965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
38966
39120
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
38967
39121
|
const fixed = snapshotMeetingScope(scope);
|
|
38968
39122
|
const store = ports?.meetings;
|
|
@@ -39054,7 +39208,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
39054
39208
|
};
|
|
39055
39209
|
}, "createStoredMeetingProjectCandidateReader");
|
|
39056
39210
|
|
|
39057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.604.0_@wirecat+cli-base@0.80.8_commander@15.0.0_esbuild@0.28.2_type_90db47d7f41d7a563eea7bc9cc13c345/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39058
39212
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39059
39213
|
const pictures = picturesService(deps);
|
|
39060
39214
|
const base = {
|
|
@@ -39096,6 +39250,7 @@ export {
|
|
|
39096
39250
|
syncsOneChat,
|
|
39097
39251
|
throughWrapper,
|
|
39098
39252
|
capability,
|
|
39253
|
+
withTimeLimit,
|
|
39099
39254
|
newSendId,
|
|
39100
39255
|
newOperationId,
|
|
39101
39256
|
batchProgress,
|
|
@@ -39253,6 +39408,7 @@ export {
|
|
|
39253
39408
|
sendAsCheck,
|
|
39254
39409
|
typedSendAs,
|
|
39255
39410
|
TOTAL_CAP,
|
|
39411
|
+
questionLookup,
|
|
39256
39412
|
THREAD_BOUNDS,
|
|
39257
39413
|
readThreadContext,
|
|
39258
39414
|
MAX_SEARCH_OFFSET,
|
|
@@ -39364,6 +39520,8 @@ export {
|
|
|
39364
39520
|
approveAsTask,
|
|
39365
39521
|
parseProposalIds,
|
|
39366
39522
|
FACT_SUMMARIES,
|
|
39523
|
+
ORGANIZATION_ADD_KIND,
|
|
39524
|
+
ORGANIZATION_RENAME_KIND,
|
|
39367
39525
|
emptyProposalRegistry,
|
|
39368
39526
|
proposalRegistry,
|
|
39369
39527
|
createStoredMeetingProjectCandidateReader,
|