@wirecat/cli-memo 0.131.55 → 0.131.56
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/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-PJR2VHDP.js → all-profiles-XWRUFNP2.js} +7 -7
- package/dist/bundle/{anthropic-ZUDIWREK.js → anthropic-266QJJGV.js} +5 -5
- package/dist/bundle/{app-server-EYNQ4L2V.js → app-server-CS3FQXPR.js} +38 -38
- package/dist/bundle/auto-XHUADK6H.js +86 -0
- package/dist/bundle/{bun-W2ZP6I6Z.js → bun-22MM6T54.js} +2 -2
- package/dist/bundle/{bun-sqlite-T2CTJ6AR.js → bun-sqlite-V73FFF2C.js} +4 -4
- package/dist/bundle/{chunk-LWWJW5V7.js → chunk-2BVVXH5V.js} +6 -6
- package/dist/bundle/{chunk-MGDBKE7E.js → chunk-2CF2R7SA.js} +7 -7
- package/dist/bundle/{chunk-VQTU4ILC.js → chunk-2LPPNYOZ.js} +1 -1
- package/dist/bundle/{chunk-T5WGWLY2.js → chunk-2Q3O33AD.js} +11 -11
- package/dist/bundle/{chunk-6NJ5OI2S.js → chunk-3BWYMNWP.js} +1 -1
- package/dist/bundle/{chunk-2NVP4FZH.js → chunk-3N7LEJRT.js} +2 -2
- package/dist/bundle/{chunk-4335SGVD.js → chunk-4XKHXETB.js} +7007 -2683
- package/dist/bundle/{chunk-7ZO2LAFF.js → chunk-5FYDQEM7.js} +5 -5
- package/dist/bundle/{chunk-KK2ATSEC.js → chunk-5LFQPARU.js} +7 -7
- package/dist/bundle/{chunk-DIFRVXKQ.js → chunk-62DGJ757.js} +1124 -435
- package/dist/bundle/{chunk-IVDBHH3N.js → chunk-6FABO4WB.js} +1 -1
- package/dist/bundle/{chunk-OSPAMIIY.js → chunk-72ZEEKOJ.js} +3 -3
- package/dist/bundle/{chunk-MZMJALJT.js → chunk-ASWLM74P.js} +2 -2
- package/dist/bundle/{chunk-5UM2OEOR.js → chunk-ATEHG5O6.js} +2 -2
- package/dist/bundle/{chunk-JBQP2M7J.js → chunk-BLCYVRW3.js} +8 -8
- package/dist/bundle/{chunk-MMWIVZ7F.js → chunk-CKNH2HT6.js} +2 -2
- package/dist/bundle/{chunk-PSJB456T.js → chunk-CQPMBTB6.js} +1 -1
- package/dist/bundle/{chunk-O7CBAY6J.js → chunk-DQWHLOKG.js} +4 -4
- package/dist/bundle/{chunk-MU4MPJCU.js → chunk-DUBGCFRO.js} +3 -3
- package/dist/bundle/{chunk-WLKDS65F.js → chunk-EMNQPMZO.js} +1 -1
- package/dist/bundle/{chunk-LCE5LBZC.js → chunk-EQQIUVLP.js} +4 -4
- package/dist/bundle/{chunk-4VQ7FPNW.js → chunk-EUE76Q4D.js} +3 -3
- package/dist/bundle/{chunk-JGY2PJ3N.js → chunk-F5DOQOCK.js} +12 -12
- package/dist/bundle/{chunk-DDD3CXHR.js → chunk-FCWUSKUI.js} +31 -24
- package/dist/bundle/{chunk-OKERVM3M.js → chunk-FG7ZGEZ6.js} +4 -4
- package/dist/bundle/{chunk-26QKDK5P.js → chunk-FU3XDL34.js} +5 -5
- package/dist/bundle/{chunk-KTVYCPJW.js → chunk-HVHUHYNF.js} +1 -1
- package/dist/bundle/{chunk-WYZDNDQ5.js → chunk-IF3RIN4C.js} +734 -491
- package/dist/bundle/{chunk-P3MKPY7D.js → chunk-IFUB2B2A.js} +74 -15
- package/dist/bundle/{chunk-ACSHPLHQ.js → chunk-IX5KCS2V.js} +7 -7
- package/dist/bundle/{chunk-P5UTNYA7.js → chunk-IY7GB2SJ.js} +2 -2
- package/dist/bundle/{chunk-YHHR7NQ3.js → chunk-KKBA3FAY.js} +33 -33
- package/dist/bundle/{chunk-IR45YH4T.js → chunk-KO24NP3R.js} +5 -5
- package/dist/bundle/{chunk-MV5W4FLV.js → chunk-N2TGYTKE.js} +1 -1
- package/dist/bundle/{chunk-UBZN4EWJ.js → chunk-NDCURVJS.js} +5 -5
- package/dist/bundle/{chunk-VPCNLTME.js → chunk-NEWKSMXP.js} +2 -2
- package/dist/bundle/{chunk-AYY5CYJJ.js → chunk-ONJNZ2RJ.js} +1 -1
- package/dist/bundle/{chunk-RSBROHX4.js → chunk-OROO3KYQ.js} +2 -2
- package/dist/bundle/{chunk-PHP3T567.js → chunk-PBVG3KJR.js} +3 -3
- package/dist/bundle/{chunk-BEO6VJ2E.js → chunk-PWUR2XTO.js} +106 -96
- package/dist/bundle/{chunk-B5VQSSL2.js → chunk-QWZPIELU.js} +14 -14
- package/dist/bundle/{chunk-64JCY7XJ.js → chunk-RCGFSWZE.js} +44 -0
- package/dist/bundle/{chunk-BC7N6IQ6.js → chunk-RJWL3NEL.js} +1 -1
- package/dist/bundle/{chunk-GESLAB4N.js → chunk-RTROEIYE.js} +2 -2
- package/dist/bundle/{chunk-JB43Q2QL.js → chunk-RYDNM3K2.js} +1 -1
- package/dist/bundle/{chunk-AF2ZDP3M.js → chunk-TB4IRRAC.js} +1 -1
- package/dist/bundle/{chunk-BSA22I76.js → chunk-UCTUYZER.js} +5 -5
- package/dist/bundle/{chunk-CADGAURO.js → chunk-USZH2ELR.js} +29 -29
- package/dist/bundle/{chunk-SR3ZNX24.js → chunk-V4BKQWDS.js} +132 -114
- package/dist/bundle/{chunk-RX6JTLKD.js → chunk-VEDOHZEU.js} +7 -7
- package/dist/bundle/{chunk-VXZ7FWKU.js → chunk-VQKSJO45.js} +3 -3
- package/dist/bundle/{chunk-FUINFNUC.js → chunk-XEQPZBIH.js} +1 -1
- package/dist/bundle/{chunk-MFVZXEQN.js → chunk-XIS7K5HT.js} +22 -22
- package/dist/bundle/{chunk-643B3X4D.js → chunk-XLYMVYMU.js} +2 -2
- package/dist/bundle/{chunk-IRFHHNSX.js → chunk-XN5POYJL.js} +319 -182
- package/dist/bundle/{chunk-3MWNNJII.js → chunk-Y6PP45D4.js} +9 -9
- package/dist/bundle/{chunk-34GJQ4ZR.js → chunk-YTAQKOAW.js} +1 -1
- package/dist/bundle/{chunk-VBYV6XQI.js → chunk-Z6RSOFHK.js} +2 -2
- package/dist/bundle/{chunk-XD52BEML.js → chunk-ZA6ZKUGT.js} +5 -5
- package/dist/bundle/{chunk-ZTM4UUCP.js → chunk-ZGSAA2H5.js} +10 -10
- package/dist/bundle/{command-contract-EWPKHGAZ.js → command-contract-RST6OGMR.js} +13 -13
- package/dist/bundle/{decode-UWT3Y66W.js → decode-JHVAOF3N.js} +4 -4
- package/dist/bundle/{dispatch-W4ZVXTJT.js → dispatch-CRYB6Q2V.js} +1 -1
- package/dist/bundle/{echarts-7VGTR45R.js → echarts-KCOXA225.js} +2 -2
- package/dist/bundle/{embed-CM2QSTNK.js → embed-4NYYOVNS.js} +5 -5
- package/dist/bundle/{embedder-CDCAMVV7.js → embedder-SHPWEDIQ.js} +8 -8
- package/dist/bundle/{entry-WHEWBNJL.js → entry-4WKYFX5K.js} +6 -6
- package/dist/bundle/failure-BBE2DUGO.js +66 -0
- package/dist/bundle/{failure-GQHAQVGH.js → failure-ZMQJF3RO.js} +1 -1
- package/dist/bundle/{first-run-ZBIQO5RZ.js → first-run-2JHWQLHM.js} +8 -8
- package/dist/bundle/first-screen-AVSHZ6KK.js +30 -0
- package/dist/bundle/{instructions-LYKSTUGQ.js → instructions-ER3ONEOR.js} +1 -1
- package/dist/bundle/mcp-VBBKPKEG.js +90 -0
- package/dist/bundle/memo.js +9 -9
- package/dist/bundle/{node-LFRTSZBZ.js → node-DBZKVPDA.js} +2 -2
- package/dist/bundle/{node-sqlite-Y47T5FTT.js → node-sqlite-UZVU7EXS.js} +5 -5
- package/dist/bundle/{oauth-YM5C6VS3.js → oauth-VEFHKRWG.js} +6 -6
- package/dist/bundle/{open-WPA4DW5G.js → open-XNRAMLOK.js} +4 -4
- package/dist/bundle/{openai-RCPT23DA.js → openai-4XIX5RN2.js} +9 -9
- package/dist/bundle/{process-P2X2KFMR.js → process-EIGF77RB.js} +1 -1
- package/dist/bundle/{program-W35YGVVL.js → program-RWAKY3P6.js} +69 -59
- package/dist/bundle/{prompt-65WPTVYC.js → prompt-V7RFTWTA.js} +4 -4
- package/dist/bundle/{recognize-MEFMK7HT.js → recognize-7PWWI67V.js} +3 -3
- package/dist/bundle/{remote-4XIR3ZYK.js → remote-NOKKQ2U5.js} +6 -6
- package/dist/bundle/{rerank-YRLAXFFL.js → rerank-X7UWX2ZF.js} +6 -6
- package/dist/bundle/{serve-6SPZH6CY.js → serve-Z6YCLXXP.js} +8 -8
- package/dist/bundle/server-GWH7J45V.js +48 -0
- package/dist/bundle/{server-7VLGYAOI.js → server-PIJV3LG4.js} +53 -53
- package/dist/bundle/server-WDE4WIHG.js +61 -0
- package/dist/bundle/{state-G34NVZ7F.js → state-K5D3BMKT.js} +5 -5
- package/dist/bundle/{store-6U4SYK4Q.js → store-6SZBCSUF.js} +21 -11
- package/dist/bundle/store-maintenance-command-Q2ABF4CG.js +48 -0
- package/dist/bundle/update-EKDVFRAG.js +69 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +4 -0
- package/dist/examples.js.map +1 -1
- package/dist/search/answers.d.ts.map +1 -1
- package/dist/search/answers.js +8 -0
- package/dist/search/answers.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-K7FXWNR2.js +0 -86
- package/dist/bundle/failure-PFBL75CT.js +0 -66
- package/dist/bundle/first-screen-CUAY5N6E.js +0 -30
- package/dist/bundle/mcp-I72UY3QP.js +0 -90
- package/dist/bundle/server-FB75UHSF.js +0 -48
- package/dist/bundle/server-IELXA6S2.js +0 -61
- package/dist/bundle/store-maintenance-command-ONVPBZLT.js +0 -48
- package/dist/bundle/update-WJ2N47FV.js +0 -69
- /package/dist/bundle/{chunk-2H36DXV7.js → chunk-SO2HNIPX.js} +0 -0
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-F5DOQOCK.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
|
+
CustomTextModelShape,
|
|
14
15
|
DEFAULT_IMAGE_MODEL,
|
|
15
16
|
DEFAULT_RERANK_MODEL,
|
|
16
|
-
DEFAULT_TEXT_MODEL,
|
|
17
17
|
InvalidArgumentError,
|
|
18
18
|
LEVELS,
|
|
19
19
|
LINK,
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
annotate,
|
|
24
24
|
annotateOption,
|
|
25
25
|
attachment,
|
|
26
|
+
chosenTextModel,
|
|
26
27
|
codeOf,
|
|
27
28
|
conversation,
|
|
28
29
|
environmentOf,
|
|
@@ -38,6 +39,7 @@ import {
|
|
|
38
39
|
oddName,
|
|
39
40
|
parseDuration,
|
|
40
41
|
placedImage,
|
|
42
|
+
readTextModelsSection,
|
|
41
43
|
renderAnswer,
|
|
42
44
|
rerankModel,
|
|
43
45
|
sentIds,
|
|
@@ -46,17 +48,19 @@ import {
|
|
|
46
48
|
tagging,
|
|
47
49
|
task,
|
|
48
50
|
textModel,
|
|
51
|
+
textModels,
|
|
49
52
|
typedCommand,
|
|
50
53
|
vectorModelKey,
|
|
51
|
-
withAttempt
|
|
52
|
-
|
|
54
|
+
withAttempt,
|
|
55
|
+
writeTextModelsSection
|
|
56
|
+
} from "./chunk-XN5POYJL.js";
|
|
53
57
|
import {
|
|
54
58
|
isNewer,
|
|
55
59
|
updateCommand
|
|
56
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-ASWLM74P.js";
|
|
57
61
|
import {
|
|
58
62
|
readOnlyLockOf
|
|
59
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-3BWYMNWP.js";
|
|
60
64
|
import {
|
|
61
65
|
AGENDA_COLUMNS,
|
|
62
66
|
CHAT_COLUMNS,
|
|
@@ -80,11 +84,13 @@ import {
|
|
|
80
84
|
QUERY_VERSION,
|
|
81
85
|
RANKING_TOKENIZER_VERSION,
|
|
82
86
|
SEARCH_QUERY,
|
|
87
|
+
SOURCE_REVIEW_KIND,
|
|
83
88
|
SnapshotBudget,
|
|
84
89
|
TASK_CLOSE_KIND,
|
|
85
90
|
TASK_RELATION_KINDS,
|
|
86
91
|
TRACKED_CHAT_COLUMNS,
|
|
87
92
|
UNKNOWN_PROVIDER,
|
|
93
|
+
WORD_BODY,
|
|
88
94
|
amountsOf,
|
|
89
95
|
assertGenericAction,
|
|
90
96
|
assertMayDecide,
|
|
@@ -118,23 +124,27 @@ import {
|
|
|
118
124
|
hasText,
|
|
119
125
|
historyStartKey,
|
|
120
126
|
hitFiles,
|
|
127
|
+
holdsKind,
|
|
128
|
+
holdsKindOf,
|
|
121
129
|
inSource,
|
|
122
130
|
inboxKey,
|
|
123
131
|
isAccountList,
|
|
124
132
|
isFolderProvider,
|
|
133
|
+
isImportedProvider,
|
|
125
134
|
isKind,
|
|
126
135
|
isLocator,
|
|
127
136
|
isOwnerOnlyKind,
|
|
128
137
|
isQueryLimit,
|
|
129
138
|
isStemmed,
|
|
130
139
|
kindIn,
|
|
131
|
-
|
|
140
|
+
listedHolds,
|
|
132
141
|
looksLikeReference,
|
|
133
142
|
matchDownloads,
|
|
134
143
|
mayDecide,
|
|
135
144
|
messageOfEmail,
|
|
136
145
|
normalizeVocabularyName,
|
|
137
146
|
openSqlite,
|
|
147
|
+
openStore,
|
|
138
148
|
openStoreContext,
|
|
139
149
|
outOfTime,
|
|
140
150
|
parseLocator,
|
|
@@ -159,8 +169,9 @@ import {
|
|
|
159
169
|
threadConversation,
|
|
160
170
|
validateAst,
|
|
161
171
|
validateFields,
|
|
172
|
+
waitingPointer,
|
|
162
173
|
withoutField
|
|
163
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-4XKHXETB.js";
|
|
164
175
|
import {
|
|
165
176
|
EVENT_QUERY,
|
|
166
177
|
MEETING_FIELD_NAMES,
|
|
@@ -216,28 +227,28 @@ import {
|
|
|
216
227
|
validateQuery,
|
|
217
228
|
walkQuery,
|
|
218
229
|
zonedMoment
|
|
219
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-V4BKQWDS.js";
|
|
220
231
|
import {
|
|
221
232
|
damagedFile,
|
|
222
233
|
isCliFailure,
|
|
223
234
|
sqliteCode
|
|
224
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-IY7GB2SJ.js";
|
|
225
236
|
import {
|
|
226
237
|
DEFAULT_STEMMERS,
|
|
227
238
|
createStemmer,
|
|
228
239
|
fold,
|
|
229
240
|
normalize
|
|
230
|
-
} from "./chunk-
|
|
241
|
+
} from "./chunk-VEDOHZEU.js";
|
|
231
242
|
import {
|
|
232
243
|
DEFAULT_TASK_CATEGORIES,
|
|
233
244
|
FALLBACK_CATEGORY
|
|
234
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-NDCURVJS.js";
|
|
235
246
|
import {
|
|
236
247
|
MAX_MODEL_IMAGE_BYTES
|
|
237
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-HVHUHYNF.js";
|
|
238
249
|
import {
|
|
239
250
|
remoteKey
|
|
240
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-NEWKSMXP.js";
|
|
241
252
|
import {
|
|
242
253
|
Unzip,
|
|
243
254
|
UnzipInflate,
|
|
@@ -248,19 +259,19 @@ import {
|
|
|
248
259
|
placedText,
|
|
249
260
|
runEmbedders,
|
|
250
261
|
textModelsDirectory
|
|
251
|
-
} from "./chunk-
|
|
262
|
+
} from "./chunk-FU3XDL34.js";
|
|
252
263
|
import {
|
|
253
264
|
installFiles,
|
|
254
265
|
megabytes
|
|
255
|
-
} from "./chunk-
|
|
266
|
+
} from "./chunk-72ZEEKOJ.js";
|
|
256
267
|
import {
|
|
257
268
|
storePath,
|
|
258
269
|
wirecatDirectory
|
|
259
|
-
} from "./chunk-
|
|
270
|
+
} from "./chunk-OROO3KYQ.js";
|
|
260
271
|
import {
|
|
261
272
|
resolvePaths,
|
|
262
273
|
writeSecurely
|
|
263
|
-
} from "./chunk-
|
|
274
|
+
} from "./chunk-EMNQPMZO.js";
|
|
264
275
|
import {
|
|
265
276
|
array,
|
|
266
277
|
boolean,
|
|
@@ -272,6 +283,7 @@ import {
|
|
|
272
283
|
minValue,
|
|
273
284
|
nullable,
|
|
274
285
|
number,
|
|
286
|
+
object,
|
|
275
287
|
optional,
|
|
276
288
|
picklist,
|
|
277
289
|
pipe,
|
|
@@ -283,7 +295,7 @@ import {
|
|
|
283
295
|
string,
|
|
284
296
|
transform,
|
|
285
297
|
unknown
|
|
286
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-RCGFSWZE.js";
|
|
287
299
|
import {
|
|
288
300
|
importFrom,
|
|
289
301
|
resolveFrom
|
|
@@ -322,18 +334,18 @@ var require_conventions = __commonJS({
|
|
|
322
334
|
}
|
|
323
335
|
}
|
|
324
336
|
__name(find, "find");
|
|
325
|
-
function freeze(
|
|
337
|
+
function freeze(object3, oc) {
|
|
326
338
|
if (oc === void 0) {
|
|
327
339
|
oc = Object;
|
|
328
340
|
}
|
|
329
341
|
if (oc && typeof oc.getOwnPropertyDescriptors === "function") {
|
|
330
|
-
|
|
342
|
+
object3 = oc.create(null, oc.getOwnPropertyDescriptors(object3));
|
|
331
343
|
}
|
|
332
|
-
return oc && typeof oc.freeze === "function" ? oc.freeze(
|
|
344
|
+
return oc && typeof oc.freeze === "function" ? oc.freeze(object3) : object3;
|
|
333
345
|
}
|
|
334
346
|
__name(freeze, "freeze");
|
|
335
|
-
function hasOwn(
|
|
336
|
-
return Object.prototype.hasOwnProperty.call(
|
|
347
|
+
function hasOwn(object3, key) {
|
|
348
|
+
return Object.prototype.hasOwnProperty.call(object3, key);
|
|
337
349
|
}
|
|
338
350
|
__name(hasOwn, "hasOwn");
|
|
339
351
|
function assign2(target2, source) {
|
|
@@ -3507,8 +3519,8 @@ var require_dom = __commonJS({
|
|
|
3507
3519
|
return destRoot;
|
|
3508
3520
|
}
|
|
3509
3521
|
__name(cloneNode, "cloneNode");
|
|
3510
|
-
function __set__(
|
|
3511
|
-
|
|
3522
|
+
function __set__(object3, key, value) {
|
|
3523
|
+
object3[key] = value;
|
|
3512
3524
|
}
|
|
3513
3525
|
__name(__set__, "__set__");
|
|
3514
3526
|
function childrenRefresh(node) {
|
|
@@ -3602,8 +3614,8 @@ var require_dom = __commonJS({
|
|
|
3602
3614
|
return new LiveNodeList(this, childrenRefresh);
|
|
3603
3615
|
}, "get")
|
|
3604
3616
|
});
|
|
3605
|
-
__set__ = /* @__PURE__ */ __name(function(
|
|
3606
|
-
|
|
3617
|
+
__set__ = /* @__PURE__ */ __name(function(object3, key, value) {
|
|
3618
|
+
object3["$$" + key] = value;
|
|
3607
3619
|
}, "__set__");
|
|
3608
3620
|
}
|
|
3609
3621
|
} catch (e) {
|
|
@@ -13155,8 +13167,8 @@ var require_bom_handling = __commonJS({
|
|
|
13155
13167
|
"use strict";
|
|
13156
13168
|
var BOMChar = "\uFEFF";
|
|
13157
13169
|
exports.PrependBOM = PrependBOMWrapper;
|
|
13158
|
-
function PrependBOMWrapper(
|
|
13159
|
-
this.encoder =
|
|
13170
|
+
function PrependBOMWrapper(encoder2, options) {
|
|
13171
|
+
this.encoder = encoder2;
|
|
13160
13172
|
this.addBOM = true;
|
|
13161
13173
|
}
|
|
13162
13174
|
__name(PrependBOMWrapper, "PrependBOMWrapper");
|
|
@@ -16789,9 +16801,9 @@ var require_lib3 = __commonJS({
|
|
|
16789
16801
|
module.exports.defaultCharSingleByte = "?";
|
|
16790
16802
|
module.exports.encode = /* @__PURE__ */ __name(function encode(str, encoding, options) {
|
|
16791
16803
|
str = "" + (str || "");
|
|
16792
|
-
var
|
|
16793
|
-
var res =
|
|
16794
|
-
var trail =
|
|
16804
|
+
var encoder2 = module.exports.getEncoder(encoding, options);
|
|
16805
|
+
var res = encoder2.write(str);
|
|
16806
|
+
var trail = encoder2.end();
|
|
16795
16807
|
return trail && trail.length > 0 ? Buffer2.concat([res, trail]) : res;
|
|
16796
16808
|
}, "encode");
|
|
16797
16809
|
module.exports.decode = /* @__PURE__ */ __name(function decode2(buf, encoding, options) {
|
|
@@ -16862,11 +16874,11 @@ var require_lib3 = __commonJS({
|
|
|
16862
16874
|
};
|
|
16863
16875
|
module.exports.getEncoder = /* @__PURE__ */ __name(function getEncoder(encoding, options) {
|
|
16864
16876
|
var codec = module.exports.getCodec(encoding);
|
|
16865
|
-
var
|
|
16877
|
+
var encoder2 = new codec.encoder(options, codec);
|
|
16866
16878
|
if (codec.bomAware && options && options.addBOM) {
|
|
16867
|
-
|
|
16879
|
+
encoder2 = new bomHandling.PrependBOM(encoder2, options);
|
|
16868
16880
|
}
|
|
16869
|
-
return
|
|
16881
|
+
return encoder2;
|
|
16870
16882
|
}, "getEncoder");
|
|
16871
16883
|
module.exports.getDecoder = /* @__PURE__ */ __name(function getDecoder(encoding, options) {
|
|
16872
16884
|
var codec = module.exports.getCodec(encoding);
|
|
@@ -16909,7 +16921,7 @@ var require_lib3 = __commonJS({
|
|
|
16909
16921
|
}
|
|
16910
16922
|
});
|
|
16911
16923
|
|
|
16912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16913
16925
|
var RULES_VERSION = 5;
|
|
16914
16926
|
var LOOK_BACK = 50;
|
|
16915
16927
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16999,10 +17011,10 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16999
17011
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17000
17012
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17001
17013
|
|
|
17002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17003
17015
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17004
17016
|
|
|
17005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
17006
17018
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
17007
17019
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
17008
17020
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
@@ -17049,7 +17061,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
|
17049
17061
|
};
|
|
17050
17062
|
}, "explainDamage");
|
|
17051
17063
|
|
|
17052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
17053
17065
|
import { existsSync, statSync } from "node:fs";
|
|
17054
17066
|
var JSON_COLUMNS = {
|
|
17055
17067
|
accounts: ["settings"],
|
|
@@ -17191,10 +17203,10 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
17191
17203
|
}
|
|
17192
17204
|
}, "storeHealth");
|
|
17193
17205
|
|
|
17194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
17195
17207
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
17196
17208
|
|
|
17197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17198
17210
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
17199
17211
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17200
17212
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17220,7 +17232,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
17220
17232
|
});
|
|
17221
17233
|
}, "previewProjectAnnotationSnapshot");
|
|
17222
17234
|
|
|
17223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17224
17236
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
17225
17237
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17226
17238
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17241,7 +17253,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
17241
17253
|
}
|
|
17242
17254
|
}, "snapshotProjectAnnotations");
|
|
17243
17255
|
|
|
17244
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17245
17257
|
var COMMAND_NEEDS = {
|
|
17246
17258
|
"account update": ["updateProfile", "change the profile"],
|
|
17247
17259
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17291,7 +17303,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17291
17303
|
return group;
|
|
17292
17304
|
}, "hideNever");
|
|
17293
17305
|
|
|
17294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17295
17307
|
var AUDIT_PAGE = 200;
|
|
17296
17308
|
var AUDIT_BUDGET = 10;
|
|
17297
17309
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17371,7 +17383,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17371
17383
|
return found;
|
|
17372
17384
|
}, "burstJoins");
|
|
17373
17385
|
|
|
17374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17375
17387
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17376
17388
|
command.allowUnknownOption();
|
|
17377
17389
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17391,7 +17403,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17391
17403
|
return command;
|
|
17392
17404
|
}, "queryWordsAfterOptions");
|
|
17393
17405
|
|
|
17394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17395
17407
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17396
17408
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17397
17409
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17433,7 +17445,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17433
17445
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17434
17446
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17435
17447
|
|
|
17436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17437
17449
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17438
17450
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17439
17451
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17456,7 +17468,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17456
17468
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17457
17469
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17458
17470
|
|
|
17459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17460
17472
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17461
17473
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17462
17474
|
const zone = timezoneOf();
|
|
@@ -17542,7 +17554,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17542
17554
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17543
17555
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17544
17556
|
|
|
17545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17546
17558
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17547
17559
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17548
17560
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17686,7 +17698,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17686
17698
|
}, "addMeetingCommandsDefinition");
|
|
17687
17699
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17688
17700
|
|
|
17689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17690
17702
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17691
17703
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17692
17704
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17819,7 +17831,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17819
17831
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17820
17832
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17821
17833
|
|
|
17822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17834
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17823
17835
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17824
17836
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17825
17837
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17828,7 +17840,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17828
17840
|
var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
|
|
17829
17841
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17830
17842
|
|
|
17831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17843
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17832
17844
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17833
17845
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17834
17846
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18090,7 +18102,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18090
18102
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18091
18103
|
}), "sessionAnswer");
|
|
18092
18104
|
|
|
18093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18105
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18094
18106
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18095
18107
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18096
18108
|
if (key in own)
|
|
@@ -18107,12 +18119,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18107
18119
|
return found.bind(adapter);
|
|
18108
18120
|
}, "capability");
|
|
18109
18121
|
|
|
18110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18111
18123
|
import { randomBytes } from "node:crypto";
|
|
18112
18124
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18113
18125
|
var newOperationId = newSendId;
|
|
18114
18126
|
|
|
18115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18116
18128
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18117
18129
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18118
18130
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18187,7 +18199,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
18187
18199
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
18188
18200
|
}, "storeOnlyDeps");
|
|
18189
18201
|
|
|
18190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18191
18203
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18192
18204
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18193
18205
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -18210,10 +18222,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
18210
18222
|
}
|
|
18211
18223
|
}, "patiently");
|
|
18212
18224
|
|
|
18213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18214
18226
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18215
18227
|
|
|
18216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18228
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18217
18229
|
var REQUEST_MS = 400;
|
|
18218
18230
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18219
18231
|
const lowest = ranges[0];
|
|
@@ -18236,13 +18248,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18236
18248
|
};
|
|
18237
18249
|
}, "estimateBackfill");
|
|
18238
18250
|
|
|
18239
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18240
18252
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18241
18253
|
...error,
|
|
18242
18254
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18243
18255
|
}), "withRecovery");
|
|
18244
18256
|
|
|
18245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18246
18258
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18247
18259
|
if (isCliFailure(error))
|
|
18248
18260
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18325,7 +18337,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18325
18337
|
};
|
|
18326
18338
|
}, "mergeBatches");
|
|
18327
18339
|
|
|
18328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18329
18341
|
var TAKES = {
|
|
18330
18342
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18331
18343
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18385,7 +18397,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18385
18397
|
throw wrongAccount(reference, scope, profiles);
|
|
18386
18398
|
}, "ensureAccount");
|
|
18387
18399
|
|
|
18388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18389
18401
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18390
18402
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18391
18403
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18430,7 +18442,7 @@ ${lines3}`, { candidates });
|
|
|
18430
18442
|
}, "ambiguous");
|
|
18431
18443
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18432
18444
|
|
|
18433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18434
18446
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18435
18447
|
if (deps.reads !== "store")
|
|
18436
18448
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18589,7 +18601,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18589
18601
|
}
|
|
18590
18602
|
}, "senderAmong");
|
|
18591
18603
|
|
|
18592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18593
18605
|
var CONTEXT_MESSAGES = 3;
|
|
18594
18606
|
var CONTEXT_MINUTES = 10;
|
|
18595
18607
|
var MAX_CHARS = 1200;
|
|
@@ -18613,12 +18625,12 @@ var context = {
|
|
|
18613
18625
|
}, "describe")
|
|
18614
18626
|
};
|
|
18615
18627
|
|
|
18616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18617
18629
|
var BUILT_INS = [context];
|
|
18618
18630
|
var providers = [...BUILT_INS];
|
|
18619
18631
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18620
18632
|
|
|
18621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18622
18634
|
var READ_PAGE = 5e3;
|
|
18623
18635
|
var CHAIN = 50;
|
|
18624
18636
|
var CONVERSATION_QUERY = {
|
|
@@ -18770,7 +18782,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
18770
18782
|
return size4;
|
|
18771
18783
|
}, "sized");
|
|
18772
18784
|
|
|
18773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18774
18786
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18775
18787
|
var MESSAGE_PAGE = 5e3;
|
|
18776
18788
|
var PER_SESSION = 8;
|
|
@@ -18778,7 +18790,7 @@ var PER_REQUEST = 256;
|
|
|
18778
18790
|
var CHARS_PER_TOKEN_AT_LEAST = 3;
|
|
18779
18791
|
var notDownloaded = /* @__PURE__ */ __name((id2) => new CliError("not_found", `${id2} is not downloaded on this machine`, { reason: "model.not-downloaded", model: id2 }), "notDownloaded");
|
|
18780
18792
|
var notBuiltError = /* @__PURE__ */ __name((deps, chatId) => new CliError("not_found", `chat ${chatId} has no conversations yet \u2014 \`${typedCommand(deps.messenger.app.command, `conversations links rebuild --chat ${chatId}`)}\``), "notBuiltError");
|
|
18781
|
-
var embeddingTarget = /* @__PURE__ */ __name((deps, choice =
|
|
18793
|
+
var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(deps.env).id) => {
|
|
18782
18794
|
if (typeof choice !== "string") {
|
|
18783
18795
|
const { remote, apiKey, concurrency = 4 } = choice;
|
|
18784
18796
|
return {
|
|
@@ -18789,16 +18801,16 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18789
18801
|
price: remote.price,
|
|
18790
18802
|
installed: true,
|
|
18791
18803
|
perBatch: PER_REQUEST * concurrency,
|
|
18792
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18804
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-NOKKQ2U5.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18793
18805
|
};
|
|
18794
18806
|
}
|
|
18795
|
-
const model = textModel(choice);
|
|
18807
|
+
const model = textModel(choice, deps.env);
|
|
18796
18808
|
const directory2 = textModelsDirectory(deps.env);
|
|
18797
18809
|
return {
|
|
18798
18810
|
id: model.id,
|
|
18799
18811
|
key: vectorModelKey(model),
|
|
18800
18812
|
dims: model.dims,
|
|
18801
|
-
speed: model.chunksPerSecond,
|
|
18813
|
+
speed: model.chunksPerSecond ?? null,
|
|
18802
18814
|
price: void 0,
|
|
18803
18815
|
installed: isTextModelInstalled(model, directory2),
|
|
18804
18816
|
perBatch: PER_SESSION,
|
|
@@ -18806,7 +18818,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18806
18818
|
if (!isTextModelInstalled(model, directory2))
|
|
18807
18819
|
throw notDownloaded(model.id);
|
|
18808
18820
|
if (apart) {
|
|
18809
|
-
const { openProcess } = await import("./process-
|
|
18821
|
+
const { openProcess } = await import("./process-EIGF77RB.js");
|
|
18810
18822
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18811
18823
|
}
|
|
18812
18824
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -18999,7 +19011,7 @@ ${text2}`),
|
|
|
18999
19011
|
return { model: target2.id, chats };
|
|
19000
19012
|
return { model: target2.id, chats, unbuiltGroups: (await store.vectors.unbuiltGroups(account)).length };
|
|
19001
19013
|
}, "readiness"),
|
|
19002
|
-
refresh: /* @__PURE__ */ __name(async ({ chat, model: choice =
|
|
19014
|
+
refresh: /* @__PURE__ */ __name(async ({ chat, model: choice = chosenTextModel(deps.env).id, build = true, embed = true, maxChats = REFRESH_BOUNDS.maxChats, maxChunks = REFRESH_BOUNDS.maxChunks, threads, progress, maxMessages, check: check2, messages = true }) => {
|
|
19003
19015
|
check2?.();
|
|
19004
19016
|
const store = await deps.store();
|
|
19005
19017
|
const account = await deps.account();
|
|
@@ -19029,7 +19041,7 @@ ${text2}`),
|
|
|
19029
19041
|
}
|
|
19030
19042
|
}
|
|
19031
19043
|
const embedded = [];
|
|
19032
|
-
const wantsMessages = embed && messages && target2.installed && choice ===
|
|
19044
|
+
const wantsMessages = embed && messages && target2.installed && choice === chosenTextModel(deps.env).id;
|
|
19033
19045
|
const toEmbed = wantsMessages ? await messagesToEmbed(chatId, target2.key, maxChunks, check2) : void 0;
|
|
19034
19046
|
let messagesEmbedded = 0;
|
|
19035
19047
|
if (embed && target2.installed) {
|
|
@@ -19095,7 +19107,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19095
19107
|
return { ...one2, state };
|
|
19096
19108
|
}, "shaped");
|
|
19097
19109
|
|
|
19098
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19099
19111
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19100
19112
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19101
19113
|
for (const [key, value, maximum] of [
|
|
@@ -19148,7 +19160,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19148
19160
|
}
|
|
19149
19161
|
}, "catchUpSearch");
|
|
19150
19162
|
|
|
19151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19152
19164
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19153
19165
|
if (deps.reads === "store") {
|
|
19154
19166
|
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`);
|
|
@@ -19514,7 +19526,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19514
19526
|
return message?.timestamp ?? fallback;
|
|
19515
19527
|
}, "timeOfKey");
|
|
19516
19528
|
|
|
19517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19518
19530
|
var LINKS = /https?:\/\/\S+/g;
|
|
19519
19531
|
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");
|
|
19520
19532
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19544,7 +19556,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19544
19556
|
});
|
|
19545
19557
|
}, "questions");
|
|
19546
19558
|
|
|
19547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19548
19560
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19549
19561
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19550
19562
|
const name = typed.trim().toLowerCase();
|
|
@@ -19601,7 +19613,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19601
19613
|
return best.name;
|
|
19602
19614
|
}, "categorize");
|
|
19603
19615
|
|
|
19604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19605
19617
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19606
19618
|
var RULES_IN = {
|
|
19607
19619
|
dialog: "all",
|
|
@@ -19698,7 +19710,7 @@ var applyTaskRules = /* @__PURE__ */ __name(async (review, { store, account, now
|
|
|
19698
19710
|
return result;
|
|
19699
19711
|
}, "applyTaskRules");
|
|
19700
19712
|
var ARRIVAL_WINDOW = 50;
|
|
19701
|
-
var
|
|
19713
|
+
var kindOf = /* @__PURE__ */ __name(async (store, account, chat) => await store.chats.chatKind(account, chat) ?? "unknown", "kindOf");
|
|
19702
19714
|
var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, message) => {
|
|
19703
19715
|
const page = await store.messages.messages(account, message.chatId, { limit: ARRIVAL_WINDOW });
|
|
19704
19716
|
const messages = [...page.items.filter((one2) => one2.id !== message.id), message].sort((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp));
|
|
@@ -19707,7 +19719,7 @@ var applyTaskRulesOnArrival = /* @__PURE__ */ __name(async (store, account, mess
|
|
|
19707
19719
|
{
|
|
19708
19720
|
id: message.chatId,
|
|
19709
19721
|
messages,
|
|
19710
|
-
kind: await
|
|
19722
|
+
kind: await kindOf(store, account, message.chatId),
|
|
19711
19723
|
watched: (await watchedChats(store, account)).has(message.chatId)
|
|
19712
19724
|
}
|
|
19713
19725
|
]
|
|
@@ -19799,7 +19811,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19799
19811
|
const tasks = [];
|
|
19800
19812
|
const pass = await applyTaskRules({
|
|
19801
19813
|
chats: [
|
|
19802
|
-
{ id: chat, messages: page.items, kind: await
|
|
19814
|
+
{ id: chat, messages: page.items, kind: await kindOf(store, account, chat), watched: watched.has(chat) }
|
|
19803
19815
|
]
|
|
19804
19816
|
}, { store: store.tasks, account, categories, dryRun: !yes, onHeld: /* @__PURE__ */ __name((task2) => tasks.push(task2), "onHeld") });
|
|
19805
19817
|
passes.push({ chat, messages: page.items.length, ...pass, tasks });
|
|
@@ -19807,7 +19819,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19807
19819
|
return passes;
|
|
19808
19820
|
}, "applyTaskRulesToChats");
|
|
19809
19821
|
|
|
19810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19811
19823
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19812
19824
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19813
19825
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -19871,7 +19883,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19871
19883
|
}
|
|
19872
19884
|
}, "validateContextEvidencePage");
|
|
19873
19885
|
|
|
19874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19875
19887
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19876
19888
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19877
19889
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19924,7 +19936,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19924
19936
|
};
|
|
19925
19937
|
}, "contextReadBudget");
|
|
19926
19938
|
|
|
19927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
19928
19940
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19929
19941
|
if (!port || typeof port.read !== "function")
|
|
19930
19942
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19968,8 +19980,12 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19968
19980
|
};
|
|
19969
19981
|
}, "createContextEvidenceReader");
|
|
19970
19982
|
|
|
19971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19972
|
-
var
|
|
19983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
19984
|
+
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
19985
|
+
var encoder = new TextEncoder();
|
|
19986
|
+
|
|
19987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
19988
|
+
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
19973
19989
|
dryRun,
|
|
19974
19990
|
source: null,
|
|
19975
19991
|
created: 0,
|
|
@@ -19980,70 +19996,55 @@ var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
|
19980
19996
|
proposed: [],
|
|
19981
19997
|
waiting: [],
|
|
19982
19998
|
flagged: [],
|
|
19983
|
-
|
|
19999
|
+
unmatched: [],
|
|
20000
|
+
ignored: [],
|
|
20001
|
+
errors,
|
|
20002
|
+
truncated: false
|
|
19984
20003
|
}), "emptyReceipt");
|
|
19985
|
-
var
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19991
|
-
|
|
19992
|
-
|
|
19993
|
-
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
const valid = record2;
|
|
19998
|
-
if (errors.length === 0 && keys.has(valid.key))
|
|
19999
|
-
errors.push({
|
|
20000
|
-
pointer: pointerOf("records", index, "key"),
|
|
20001
|
-
code: "record.duplicate-key",
|
|
20002
|
-
message: "another record of this envelope has this key",
|
|
20003
|
-
key: valid.key
|
|
20004
|
-
});
|
|
20005
|
-
const identity = errors.length === 0 ? `${valid.type}\0${valid.external_id}` : "";
|
|
20006
|
-
if (errors.length === 0 && identities.has(identity))
|
|
20007
|
-
errors.push({
|
|
20008
|
-
pointer: pointerOf("records", index, "external_id"),
|
|
20009
|
-
code: "record.duplicate",
|
|
20010
|
-
message: `another record of this envelope is ${valid.type} ${valid.external_id}`,
|
|
20011
|
-
key: valid.key
|
|
20012
|
-
});
|
|
20013
|
-
if (errors.length > 0) {
|
|
20014
|
-
receipt.refused += 1;
|
|
20015
|
-
for (const error of errors)
|
|
20016
|
-
receipt.errors.push(error);
|
|
20017
|
-
continue;
|
|
20018
|
-
}
|
|
20019
|
-
keys.add(valid.key);
|
|
20020
|
-
identities.add(identity);
|
|
20021
|
-
taken.push({ index, record: valid });
|
|
20022
|
-
}
|
|
20023
|
-
const written = await store.records.write(source, taken, { dryRun, chunk });
|
|
20024
|
-
for (const outcome2 of written.outcomes) {
|
|
20025
|
-
receipt[outcome2.status] += 1;
|
|
20026
|
-
if (outcome2.error)
|
|
20027
|
-
receipt.errors.push(outcome2.error);
|
|
20028
|
-
}
|
|
20029
|
-
for (const error of written.laterErrors)
|
|
20030
|
-
receipt.errors.push(error);
|
|
20031
|
-
receipt.errors.sort((a, b) => a.pointer.localeCompare(b.pointer, "en", { numeric: true }));
|
|
20032
|
-
receipt.proposed = written.proposed;
|
|
20033
|
-
receipt.waiting = written.waiting.map(({ index, key, missing: missing4 }) => ({
|
|
20004
|
+
var receiptOf = /* @__PURE__ */ __name((dryRun, source, run) => ({
|
|
20005
|
+
dryRun,
|
|
20006
|
+
source: { provider: source.provider, account: source.account, batchId: source.batch_id },
|
|
20007
|
+
created: run.created,
|
|
20008
|
+
updated: run.updated,
|
|
20009
|
+
unchanged: run.unchanged,
|
|
20010
|
+
deleted: run.deleted,
|
|
20011
|
+
refused: run.refused,
|
|
20012
|
+
proposed: run.proposed,
|
|
20013
|
+
waiting: run.waiting.map(({ index, key, missing: missing4 }) => ({ key, pointer: waitingPointer(index, missing4), missing: missing4 })),
|
|
20014
|
+
flagged: run.flagged.map(({ index, ...flag }) => ({ ...flag, pointer: pointerOf("records", index) })),
|
|
20015
|
+
unmatched: run.unmatched.map(({ index, key, reason, candidates }) => ({
|
|
20034
20016
|
key,
|
|
20035
|
-
pointer: pointerOf("records", index, "
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
|
|
20017
|
+
pointer: pointerOf("records", index, "fields"),
|
|
20018
|
+
reason,
|
|
20019
|
+
candidates
|
|
20020
|
+
})),
|
|
20021
|
+
ignored: run.ignored.map(({ index, key, at, reason }) => ({
|
|
20039
20022
|
key,
|
|
20040
|
-
pointer: pointerOf("records", index),
|
|
20041
|
-
|
|
20042
|
-
}))
|
|
20043
|
-
|
|
20023
|
+
pointer: pointerOf("records", index, ...at),
|
|
20024
|
+
reason
|
|
20025
|
+
})),
|
|
20026
|
+
errors: run.errors,
|
|
20027
|
+
truncated: run.truncated
|
|
20028
|
+
}), "receiptOf");
|
|
20029
|
+
var itemOf2 = /* @__PURE__ */ __name((record2, index) => {
|
|
20030
|
+
const errors = recordErrors(record2, index);
|
|
20031
|
+
return { index, record: record2, ...errors.length > 0 ? { errors } : {} };
|
|
20032
|
+
}, "itemOf");
|
|
20033
|
+
var refusedAll = /* @__PURE__ */ __name((dryRun, errors, onIssue) => {
|
|
20034
|
+
for (const error of errors)
|
|
20035
|
+
onIssue?.(error);
|
|
20036
|
+
return emptyReceipt(dryRun, errors);
|
|
20037
|
+
}, "refusedAll");
|
|
20038
|
+
var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun = false, chunk = 1e3, onIssue }) => {
|
|
20039
|
+
const broken2 = envelopeErrors(envelope, account);
|
|
20040
|
+
if (broken2.length > 0)
|
|
20041
|
+
return refusedAll(dryRun, broken2, onIssue);
|
|
20042
|
+
const { source, records, options } = envelope;
|
|
20043
|
+
const items = records.map(itemOf2);
|
|
20044
|
+
return receiptOf(dryRun, source, await store.records.run(source, items, { dryRun, chunk, options, onIssue }));
|
|
20044
20045
|
}, "ingest");
|
|
20045
20046
|
|
|
20046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
20047
20048
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20048
20049
|
var DEFAULT_PURPOSES = ["work"];
|
|
20049
20050
|
var LINK_PURPOSE = "work";
|
|
@@ -20073,7 +20074,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
20073
20074
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
20074
20075
|
], "purposeList");
|
|
20075
20076
|
|
|
20076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
20077
20078
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
20078
20079
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
20079
20080
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -20113,7 +20114,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
20113
20114
|
};
|
|
20114
20115
|
}, "dateWindow");
|
|
20115
20116
|
|
|
20116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
20117
20118
|
var DAY_MS = 864e5;
|
|
20118
20119
|
var NEW_DAYS = 30;
|
|
20119
20120
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20190,7 +20191,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20190
20191
|
};
|
|
20191
20192
|
}, "scorePerson");
|
|
20192
20193
|
|
|
20193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
20194
20195
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
20195
20196
|
const controller = new AbortController();
|
|
20196
20197
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -20206,7 +20207,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
20206
20207
|
}
|
|
20207
20208
|
}, "withTimeLimit");
|
|
20208
20209
|
|
|
20209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20210
20211
|
var REGISTRIES = {
|
|
20211
20212
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20212
20213
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20293,7 +20294,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20293
20294
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20294
20295
|
})), "notCovered");
|
|
20295
20296
|
|
|
20296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20297
20298
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20298
20299
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20299
20300
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20381,7 +20382,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20381
20382
|
};
|
|
20382
20383
|
}, "botCheckService");
|
|
20383
20384
|
|
|
20384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20385
20386
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20386
20387
|
if (value === void 0)
|
|
20387
20388
|
return void 0;
|
|
@@ -20391,7 +20392,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20391
20392
|
return id2;
|
|
20392
20393
|
}, "threadIdOf");
|
|
20393
20394
|
|
|
20394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20395
20396
|
var TOP_POSTS = 5;
|
|
20396
20397
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20397
20398
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20508,7 +20509,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20508
20509
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20509
20510
|
}, "median");
|
|
20510
20511
|
|
|
20511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20512
20513
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20513
20514
|
const events = [];
|
|
20514
20515
|
for (const stay of stays) {
|
|
@@ -20540,7 +20541,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20540
20541
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20541
20542
|
}, "memberEvents");
|
|
20542
20543
|
|
|
20543
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20544
20545
|
var EVENTS_DAYS = 7;
|
|
20545
20546
|
var TRACKED_DAYS = 30;
|
|
20546
20547
|
var STATS_PAGE = 1e3;
|
|
@@ -20835,7 +20836,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20835
20836
|
return members.length === 0 ? null : members;
|
|
20836
20837
|
}, "storedMembers");
|
|
20837
20838
|
|
|
20838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20839
20840
|
var INBOX_CHATS = 20;
|
|
20840
20841
|
var REVIEW_DAYS = 3;
|
|
20841
20842
|
var UNANSWERED_HOURS = 24;
|
|
@@ -21043,7 +21044,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
21043
21044
|
};
|
|
21044
21045
|
}, "inboxService");
|
|
21045
21046
|
|
|
21046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21047
21048
|
var CONTEXT_MESSAGES2 = 10;
|
|
21048
21049
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21049
21050
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21306,7 +21307,7 @@ var lean = /* @__PURE__ */ __name((key, message, detail) => {
|
|
|
21306
21307
|
replyTo: message.replyTo?.id ?? message.replyToId ?? null
|
|
21307
21308
|
};
|
|
21308
21309
|
}, "lean");
|
|
21309
|
-
var
|
|
21310
|
+
var kindOf2 = /* @__PURE__ */ __name((chat, chatId, person) => chat && chat.kind !== "unknown" ? chat.kind : chatId === person ? "dialog" : chat?.kind ?? "unknown", "kindOf");
|
|
21310
21311
|
var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { chats, limit = CHAT_MESSAGES, detail = 0 }) => {
|
|
21311
21312
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21312
21313
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
@@ -21319,7 +21320,7 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21319
21320
|
const chat = stored.find((one2) => one2.id === chatId);
|
|
21320
21321
|
const page = await store.messages.find({ account: asked, senders: [found.id], chatId, limit });
|
|
21321
21322
|
answer.push({
|
|
21322
|
-
chat: { id: chatId, title: chat?.title ?? null, kind:
|
|
21323
|
+
chat: { id: chatId, title: chat?.title ?? null, kind: kindOf2(chat, chatId, found.id) },
|
|
21323
21324
|
messages: page.items.toSorted((a, b) => Date.parse(a.timestamp) - Date.parse(b.timestamp)).map((message) => lean(asked, message, detail)),
|
|
21324
21325
|
complete: held.get(chatId) === "complete",
|
|
21325
21326
|
more: page.hasMore
|
|
@@ -21332,10 +21333,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21332
21333
|
};
|
|
21333
21334
|
}, "personMessages");
|
|
21334
21335
|
|
|
21335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21336
21337
|
import { createHash } from "node:crypto";
|
|
21337
21338
|
|
|
21338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21339
21340
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21340
21341
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21341
21342
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21353,7 +21354,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21353
21354
|
return { parsed, meeting };
|
|
21354
21355
|
}, "authorizedMeetingMetadata");
|
|
21355
21356
|
|
|
21356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21357
21358
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21358
21359
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21359
21360
|
if (signal?.aborted)
|
|
@@ -21552,7 +21553,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21552
21553
|
return { ...packet, fingerprint: hash(packet) };
|
|
21553
21554
|
}, "readMeetingEvidence");
|
|
21554
21555
|
|
|
21555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21556
21557
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21557
21558
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21558
21559
|
const requestedAccounts = options.accountIds;
|
|
@@ -21651,7 +21652,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21651
21652
|
};
|
|
21652
21653
|
}, "personMeetingContext");
|
|
21653
21654
|
|
|
21654
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21655
21656
|
var PREPARE_BYTES = 96 * 1024;
|
|
21656
21657
|
var MEETINGS = 5;
|
|
21657
21658
|
var CUES = 3;
|
|
@@ -21767,7 +21768,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21767
21768
|
}
|
|
21768
21769
|
}, "meetingsOf");
|
|
21769
21770
|
|
|
21770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21771
21772
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21772
21773
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21773
21774
|
const held = await storeIfOpen(deps);
|
|
@@ -21837,7 +21838,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21837
21838
|
complete: false
|
|
21838
21839
|
})), "quiet");
|
|
21839
21840
|
|
|
21840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21841
21842
|
var TIMELINE_ITEMS = 50;
|
|
21842
21843
|
var TIMELINE_MAX = 500;
|
|
21843
21844
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -21892,7 +21893,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21892
21893
|
};
|
|
21893
21894
|
}, "personTimeline");
|
|
21894
21895
|
|
|
21895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21896
21897
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21897
21898
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21898
21899
|
const held = await storeIfOpen(deps);
|
|
@@ -22119,7 +22120,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22119
22120
|
return rest;
|
|
22120
22121
|
}, "withoutPhone");
|
|
22121
22122
|
|
|
22122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22123
22124
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22124
22125
|
var PERIOD_FIELD = "created";
|
|
22125
22126
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22222,7 +22223,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22222
22223
|
}));
|
|
22223
22224
|
}, "meetingNames");
|
|
22224
22225
|
|
|
22225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22226
22227
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22227
22228
|
const tags = /* @__PURE__ */ new Map();
|
|
22228
22229
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22231,7 +22232,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22231
22232
|
return tags;
|
|
22232
22233
|
}, "taskTagFilters");
|
|
22233
22234
|
|
|
22234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22235
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22235
22236
|
var TASK_QUERY = {
|
|
22236
22237
|
entity: "task",
|
|
22237
22238
|
backend: "sql",
|
|
@@ -22723,7 +22724,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22723
22724
|
};
|
|
22724
22725
|
}, "taskView");
|
|
22725
22726
|
|
|
22726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
22727
22728
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
22728
22729
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
22729
22730
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -22746,7 +22747,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
22746
22747
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
22747
22748
|
}, "approveAsTask");
|
|
22748
22749
|
|
|
22749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
22750
22751
|
var MAX_IDS = 500;
|
|
22751
22752
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
22752
22753
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -22788,7 +22789,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
22788
22789
|
return ids;
|
|
22789
22790
|
}, "parseProposalIds");
|
|
22790
22791
|
|
|
22791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
22792
22793
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
22793
22794
|
if (author.type === "person")
|
|
22794
22795
|
return { type: "person", id: author.id };
|
|
@@ -22829,8 +22830,38 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
22829
22830
|
const status = filter.status ?? "proposed";
|
|
22830
22831
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
22831
22832
|
}, "storedStatus");
|
|
22833
|
+
var reviewedRow = /* @__PURE__ */ __name((kind, entry, object3) => ({
|
|
22834
|
+
id: entry.ref,
|
|
22835
|
+
kind,
|
|
22836
|
+
status: entry.review,
|
|
22837
|
+
project: entry.project,
|
|
22838
|
+
subject: entry.ref,
|
|
22839
|
+
object: object3,
|
|
22840
|
+
summary: entry.title,
|
|
22841
|
+
proposedBy: proposerOfAuthor(entry.author),
|
|
22842
|
+
reason: entry.reason,
|
|
22843
|
+
evidence: [],
|
|
22844
|
+
score: null,
|
|
22845
|
+
signals: null,
|
|
22846
|
+
parts: null,
|
|
22847
|
+
createdAt: entry.createdAt
|
|
22848
|
+
}), "reviewedRow");
|
|
22849
|
+
var reviewedKind = /* @__PURE__ */ __name((spec) => ({
|
|
22850
|
+
kind: spec.type,
|
|
22851
|
+
prefix: spec.type,
|
|
22852
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
22853
|
+
const status = filter.status ?? "proposed";
|
|
22854
|
+
const entries = await spec.list({ ...pushed2(filter), ...status === "all" ? {} : { review: status } });
|
|
22855
|
+
return kept(entries.map(spec.row), filter);
|
|
22856
|
+
}, "list"),
|
|
22857
|
+
get: /* @__PURE__ */ __name(async (id2) => spec.row(await spec.get(id2)), "get"),
|
|
22858
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
22859
|
+
const made = await spec.decide(id2, confirm, { by, reason });
|
|
22860
|
+
return { id: id2, kind: spec.type, status: confirm ? "confirmed" : "rejected", made: confirm ? [made] : [] };
|
|
22861
|
+
}, "decide")
|
|
22862
|
+
}), "reviewedKind");
|
|
22832
22863
|
|
|
22833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
22834
22865
|
var rowOf = /* @__PURE__ */ __name((action2) => ({
|
|
22835
22866
|
id: action2.id,
|
|
22836
22867
|
kind: "action",
|
|
@@ -22870,7 +22901,16 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
22870
22901
|
}, "decide")
|
|
22871
22902
|
}), "actionKind");
|
|
22872
22903
|
|
|
22873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/contracts.js
|
|
22905
|
+
var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
22906
|
+
type: "contract",
|
|
22907
|
+
list: /* @__PURE__ */ __name((options) => store.contracts.list(options), "list"),
|
|
22908
|
+
get: /* @__PURE__ */ __name((id2) => store.contracts.get(id2), "get"),
|
|
22909
|
+
row: /* @__PURE__ */ __name((contract) => reviewedRow("contract", contract, contract.deal), "row"),
|
|
22910
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.contracts.confirm(id2, by, reason) : await store.contracts.reject(id2, by, reason)).ref, "decide")
|
|
22911
|
+
}), "contractKind");
|
|
22912
|
+
|
|
22913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
22874
22914
|
var STATUS = {
|
|
22875
22915
|
proposed: "proposed",
|
|
22876
22916
|
accepted: "confirmed",
|
|
@@ -22913,49 +22953,30 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22913
22953
|
}, "decide")
|
|
22914
22954
|
}), "factKind");
|
|
22915
22955
|
|
|
22916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22917
|
-
var
|
|
22918
|
-
|
|
22919
|
-
|
|
22920
|
-
|
|
22921
|
-
|
|
22922
|
-
|
|
22923
|
-
|
|
22924
|
-
|
|
22925
|
-
|
|
22926
|
-
|
|
22927
|
-
|
|
22928
|
-
|
|
22929
|
-
|
|
22930
|
-
|
|
22931
|
-
|
|
22932
|
-
|
|
22933
|
-
var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
22934
|
-
kind,
|
|
22935
|
-
prefix: kind,
|
|
22936
|
-
list: /* @__PURE__ */ __name(async (filter) => {
|
|
22937
|
-
const status = filter.status ?? "proposed";
|
|
22938
|
-
const options = { ...pushed2(filter), ...status === "all" ? {} : { review: status } };
|
|
22939
|
-
const entries = kind === "invoice" ? await store.finance.invoices(options) : await store.finance.payments(options);
|
|
22940
|
-
return kept(entries.map((entry) => rowOf3(kind, entry)), filter);
|
|
22941
|
-
}, "list"),
|
|
22942
|
-
get: /* @__PURE__ */ __name(async (id2) => rowOf3(kind, kind === "invoice" ? await store.finance.invoice(id2) : await store.finance.payment(id2)), "get"),
|
|
22943
|
-
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
22944
|
-
const entry = confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason);
|
|
22945
|
-
return { id: id2, kind, status: confirm ? "confirmed" : "rejected", made: confirm ? [entry.ref] : [] };
|
|
22946
|
-
}, "decide")
|
|
22947
|
-
}), "financeKind");
|
|
22948
|
-
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
22949
|
-
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
22950
|
-
|
|
22951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.606.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_66b8ac22c245eeaba8c329faa5b17078/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
22957
|
+
var invoiceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
22958
|
+
type: "invoice",
|
|
22959
|
+
list: /* @__PURE__ */ __name((options) => store.finance.invoices(options), "list"),
|
|
22960
|
+
get: /* @__PURE__ */ __name((id2) => store.finance.invoice(id2), "get"),
|
|
22961
|
+
row: /* @__PURE__ */ __name((invoice) => reviewedRow("invoice", invoice, invoice.counterparty.ref), "row"),
|
|
22962
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
22963
|
+
}), "invoiceKind");
|
|
22964
|
+
var paymentKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
22965
|
+
type: "payment",
|
|
22966
|
+
list: /* @__PURE__ */ __name((options) => store.finance.payments(options), "list"),
|
|
22967
|
+
get: /* @__PURE__ */ __name((id2) => store.finance.payment(id2), "get"),
|
|
22968
|
+
row: /* @__PURE__ */ __name((payment) => reviewedRow("payment", payment, (payment.direction === "in" ? payment.payer : payment.payee)?.ref ?? null), "row"),
|
|
22969
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
22970
|
+
}), "paymentKind");
|
|
22971
|
+
|
|
22972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22952
22973
|
var FACT_SUMMARIES = {
|
|
22953
22974
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
22954
22975
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
22955
22976
|
payment: /* @__PURE__ */ __name((finding) => paymentTitle(finding), "payment")
|
|
22956
22977
|
};
|
|
22957
22978
|
var statusOf = /* @__PURE__ */ __name((batch) => batch.status === "proposed" ? "proposed" : batch.receipt?.accepted.length ? "confirmed" : "rejected", "statusOf");
|
|
22958
|
-
var
|
|
22979
|
+
var rowOf3 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
22959
22980
|
const findings = batch.input.findings;
|
|
22960
22981
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
22961
22982
|
return {
|
|
@@ -22981,7 +23002,7 @@ var rowOf4 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
|
22981
23002
|
};
|
|
22982
23003
|
}, "rowOf");
|
|
22983
23004
|
var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
22984
|
-
const created = /* @__PURE__ */ __name(async (batch) =>
|
|
23005
|
+
const created = /* @__PURE__ */ __name(async (batch) => rowOf3(batch, (await store.proposedActions.get(batch.id)).createdAt), "created");
|
|
22985
23006
|
return {
|
|
22986
23007
|
kind: "findings",
|
|
22987
23008
|
stored: [EVIDENCE_FINDINGS_KIND],
|
|
@@ -23020,7 +23041,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23020
23041
|
};
|
|
23021
23042
|
}, "findingsKind");
|
|
23022
23043
|
|
|
23023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
23024
23045
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
23025
23046
|
id: `key:${link4.id}`,
|
|
23026
23047
|
kind: "key_document",
|
|
@@ -23088,7 +23109,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
23088
23109
|
};
|
|
23089
23110
|
}, "keyDocumentKind");
|
|
23090
23111
|
|
|
23091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
23092
23113
|
var words = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
23093
23114
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
23094
23115
|
switch (finding.kind) {
|
|
@@ -23114,7 +23135,7 @@ var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
|
23114
23135
|
return words("order", finding.number, finding.supplierName, finding.status, `\xB7 ${finding.reason}`);
|
|
23115
23136
|
}
|
|
23116
23137
|
}, "summaryOf");
|
|
23117
|
-
var
|
|
23138
|
+
var rowOf4 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
23118
23139
|
const findings = batch.input.findings;
|
|
23119
23140
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
23120
23141
|
const project2 = findings.flatMap((finding) => "project" in finding && finding.project ? [finding.project] : [])[0] ?? null;
|
|
@@ -23141,7 +23162,7 @@ var rowOf5 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
|
23141
23162
|
};
|
|
23142
23163
|
}, "rowOf");
|
|
23143
23164
|
var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
23144
|
-
const created = /* @__PURE__ */ __name(async (batch) =>
|
|
23165
|
+
const created = /* @__PURE__ */ __name(async (batch) => rowOf4(batch, (await store.proposedActions.get(batch.id)).createdAt), "created");
|
|
23145
23166
|
return {
|
|
23146
23167
|
kind: "mail_findings",
|
|
23147
23168
|
stored: [MAIL_FINDINGS_KIND],
|
|
@@ -23176,8 +23197,8 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23176
23197
|
};
|
|
23177
23198
|
}, "mailFindingsKind");
|
|
23178
23199
|
|
|
23179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23180
|
-
var
|
|
23200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
23201
|
+
var rowOf5 = /* @__PURE__ */ __name((action2, batch) => {
|
|
23181
23202
|
const findings = batch.input.findings;
|
|
23182
23203
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
23183
23204
|
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
@@ -23222,12 +23243,12 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23222
23243
|
...filter.by === void 0 ? {} : { proposedBy: filter.by },
|
|
23223
23244
|
limit: Math.min(filter.offset + filter.limit, 500)
|
|
23224
23245
|
});
|
|
23225
|
-
const rows = await Promise.all(actions.map(async (action2) =>
|
|
23246
|
+
const rows = await Promise.all(actions.map(async (action2) => rowOf5(action2, (await batchOf(action2)).batch)));
|
|
23226
23247
|
return kept(rows, { ...filter, limit: filter.offset + filter.limit });
|
|
23227
23248
|
}, "list"),
|
|
23228
23249
|
get: /* @__PURE__ */ __name(async (id2) => {
|
|
23229
23250
|
const action2 = await store.proposedActions.get(id2);
|
|
23230
|
-
return
|
|
23251
|
+
return rowOf5(action2, (await batchOf(action2)).batch);
|
|
23231
23252
|
}, "get"),
|
|
23232
23253
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
|
|
23233
23254
|
const { account, batch } = await batchOf(await store.proposedActions.get(id2));
|
|
@@ -23240,14 +23261,14 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23240
23261
|
};
|
|
23241
23262
|
}, "meetingFindingsKind");
|
|
23242
23263
|
|
|
23243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
23244
23265
|
var STATUS2 = {
|
|
23245
23266
|
proposed: "proposed",
|
|
23246
23267
|
confirmed: "confirmed",
|
|
23247
23268
|
superseded: "confirmed",
|
|
23248
23269
|
stale: "rejected"
|
|
23249
23270
|
};
|
|
23250
|
-
var
|
|
23271
|
+
var rowOf6 = /* @__PURE__ */ __name((memory) => ({
|
|
23251
23272
|
id: memory.ref,
|
|
23252
23273
|
kind: "memory",
|
|
23253
23274
|
status: STATUS2[memory.status],
|
|
@@ -23272,51 +23293,28 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23272
23293
|
...pushed2(filter),
|
|
23273
23294
|
...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
|
|
23274
23295
|
});
|
|
23275
|
-
return kept(memories.map(
|
|
23296
|
+
return kept(memories.map(rowOf6), filter);
|
|
23276
23297
|
}, "list"),
|
|
23277
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
23298
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf6(await store.memories.get(id2)), "get"),
|
|
23278
23299
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
|
|
23279
23300
|
const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
|
|
23280
23301
|
return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
|
|
23281
23302
|
}, "decide")
|
|
23282
23303
|
}), "memoryKind");
|
|
23283
23304
|
|
|
23284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23285
|
-
var
|
|
23286
|
-
|
|
23287
|
-
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
|
|
23291
|
-
object: order.supplier?.ref ?? null,
|
|
23292
|
-
summary: order.title,
|
|
23293
|
-
proposedBy: proposerOfAuthor(order.author),
|
|
23294
|
-
reason: order.reason,
|
|
23295
|
-
evidence: [],
|
|
23296
|
-
score: null,
|
|
23297
|
-
signals: null,
|
|
23298
|
-
parts: null,
|
|
23299
|
-
createdAt: order.createdAt
|
|
23300
|
-
}), "rowOf");
|
|
23301
|
-
var orderKind = /* @__PURE__ */ __name((store) => ({
|
|
23302
|
-
kind: "order",
|
|
23303
|
-
prefix: "order",
|
|
23304
|
-
list: /* @__PURE__ */ __name(async (filter) => {
|
|
23305
|
-
const status = filter.status ?? "proposed";
|
|
23306
|
-
const orders = await store.orders.list({ ...pushed2(filter), ...status === "all" ? {} : { review: status } });
|
|
23307
|
-
return kept(orders.map(rowOf8), filter);
|
|
23308
|
-
}, "list"),
|
|
23309
|
-
get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.orders.get(id2)), "get"),
|
|
23310
|
-
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
23311
|
-
const order = confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason);
|
|
23312
|
-
return { id: id2, kind: "order", status: confirm ? "confirmed" : "rejected", made: confirm ? [order.ref] : [] };
|
|
23313
|
-
}, "decide")
|
|
23305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
23306
|
+
var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23307
|
+
type: "order",
|
|
23308
|
+
list: /* @__PURE__ */ __name((options) => store.orders.list(options), "list"),
|
|
23309
|
+
get: /* @__PURE__ */ __name((id2) => store.orders.get(id2), "get"),
|
|
23310
|
+
row: /* @__PURE__ */ __name((order) => reviewedRow("order", order, order.supplier?.ref ?? null), "row"),
|
|
23311
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason)).ref, "decide")
|
|
23314
23312
|
}), "orderKind");
|
|
23315
23313
|
|
|
23316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
23317
23315
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
23318
23316
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
23319
|
-
var
|
|
23317
|
+
var rowOf7 = /* @__PURE__ */ __name((action2) => {
|
|
23320
23318
|
const renamed2 = action2.kind === ORGANIZATION_RENAME_KIND;
|
|
23321
23319
|
const { name, kind } = action2.payload;
|
|
23322
23320
|
const { organization: organization2 } = action2.payload;
|
|
@@ -23347,9 +23345,9 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23347
23345
|
...status === void 0 ? {} : { status },
|
|
23348
23346
|
...pushed2(filter)
|
|
23349
23347
|
});
|
|
23350
|
-
return kept(actions.map(
|
|
23348
|
+
return kept(actions.map(rowOf7), filter);
|
|
23351
23349
|
}, "list"),
|
|
23352
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
23350
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf7(await store.proposedActions.get(id2)), "get"),
|
|
23353
23351
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
23354
23352
|
if (!confirm) {
|
|
23355
23353
|
await store.proposedActions.reject(id2, by, reason);
|
|
@@ -23369,7 +23367,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23369
23367
|
}, "decide")
|
|
23370
23368
|
}), "organizationKind");
|
|
23371
23369
|
|
|
23372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
23373
23371
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
23374
23372
|
id: `link:${link4.id}`,
|
|
23375
23373
|
kind: "relationship",
|
|
@@ -23443,10 +23441,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
23443
23441
|
};
|
|
23444
23442
|
}, "relationshipKind");
|
|
23445
23443
|
|
|
23446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
23447
23445
|
var KIND = "relationship_update";
|
|
23448
23446
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
23449
|
-
var
|
|
23447
|
+
var rowOf8 = /* @__PURE__ */ __name((action2) => {
|
|
23450
23448
|
const payload = action2.payload;
|
|
23451
23449
|
return {
|
|
23452
23450
|
id: action2.id,
|
|
@@ -23475,9 +23473,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23475
23473
|
...status === void 0 ? {} : { status },
|
|
23476
23474
|
...pushed2(filter)
|
|
23477
23475
|
});
|
|
23478
|
-
return kept(stored.map(
|
|
23476
|
+
return kept(stored.map(rowOf8), filter);
|
|
23479
23477
|
}, "list"),
|
|
23480
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
23478
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf8(await store.proposedActions.get(id2)), "get"),
|
|
23481
23479
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
23482
23480
|
const { relation } = await store.knowledge.decideRelationUpdate(id2, {
|
|
23483
23481
|
confirm,
|
|
@@ -23493,8 +23491,70 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23493
23491
|
}, "decide")
|
|
23494
23492
|
}), "relationshipUpdateKind");
|
|
23495
23493
|
|
|
23496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23497
|
-
var
|
|
23494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/source-review.js
|
|
23495
|
+
var rowOf9 = /* @__PURE__ */ __name((action2) => {
|
|
23496
|
+
const payload = action2.payload;
|
|
23497
|
+
const sources = payload.sources.flatMap((source) => source.ref ?? []);
|
|
23498
|
+
const contradicting = payload.challenges.flatMap((challenge) => challenge.evidence);
|
|
23499
|
+
const replacement = payload.sources.find((source) => source.replacement !== void 0)?.replacement ?? null;
|
|
23500
|
+
return {
|
|
23501
|
+
id: action2.id,
|
|
23502
|
+
kind: SOURCE_REVIEW_KIND,
|
|
23503
|
+
status: actionStatus(action2.status),
|
|
23504
|
+
project: null,
|
|
23505
|
+
subject: action2.target ?? payload.target,
|
|
23506
|
+
object: replacement,
|
|
23507
|
+
summary: `${payload.cause}: ${payload.sources.length} source(s), ${payload.challenges.length} challenge(s)`,
|
|
23508
|
+
proposedBy: proposerOfAction(action2),
|
|
23509
|
+
reason: payload.challenges.at(-1)?.reason ?? action2.reason,
|
|
23510
|
+
evidence: [.../* @__PURE__ */ new Set([...sources, ...contradicting])].slice(0, 5),
|
|
23511
|
+
score: null,
|
|
23512
|
+
signals: null,
|
|
23513
|
+
parts: null,
|
|
23514
|
+
createdAt: payload.raisedAt
|
|
23515
|
+
};
|
|
23516
|
+
}, "rowOf");
|
|
23517
|
+
var sourceReviewKind = /* @__PURE__ */ __name((store) => ({
|
|
23518
|
+
kind: SOURCE_REVIEW_KIND,
|
|
23519
|
+
stored: [SOURCE_REVIEW_KIND],
|
|
23520
|
+
ownerOnly: true,
|
|
23521
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
23522
|
+
const status = storedStatus(filter);
|
|
23523
|
+
const stored = await store.proposedActions.list({
|
|
23524
|
+
kinds: [SOURCE_REVIEW_KIND],
|
|
23525
|
+
...status === void 0 ? {} : { status },
|
|
23526
|
+
...pushed2(filter)
|
|
23527
|
+
});
|
|
23528
|
+
return kept(stored.map(rowOf9), filter);
|
|
23529
|
+
}, "list"),
|
|
23530
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf9(await store.proposedActions.get(id2)), "get"),
|
|
23531
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
23532
|
+
await store.knowledge.decideSourceReview(id2, { confirm, by, ...reason === void 0 ? {} : { reason } });
|
|
23533
|
+
return { id: id2, kind: SOURCE_REVIEW_KIND, status: confirm ? "confirmed" : "rejected", made: [] };
|
|
23534
|
+
}, "decide")
|
|
23535
|
+
}), "sourceReviewKind");
|
|
23536
|
+
|
|
23537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/subscriptions.js
|
|
23538
|
+
var subscriptionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23539
|
+
type: "subscription",
|
|
23540
|
+
list: /* @__PURE__ */ __name((options) => store.subscriptions.list(options), "list"),
|
|
23541
|
+
get: /* @__PURE__ */ __name((id2) => store.subscriptions.get(id2), "get"),
|
|
23542
|
+
row: /* @__PURE__ */ __name((subscription) => reviewedRow("subscription", subscription, (subscription.direction === "receivable" ? subscription.customer : subscription.supplier).ref), "row"),
|
|
23543
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.subscriptions.confirm(id2, by, reason) : await store.subscriptions.reject(id2, by, reason)).ref, "decide")
|
|
23544
|
+
}), "subscriptionKind");
|
|
23545
|
+
var subscriptionPriceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23546
|
+
type: "subscription_price",
|
|
23547
|
+
list: /* @__PURE__ */ __name(({ review, proposedBy, limit }) => store.subscriptions.prices({ review, proposedBy, limit }), "list"),
|
|
23548
|
+
get: /* @__PURE__ */ __name((id2) => store.subscriptions.price(id2), "get"),
|
|
23549
|
+
row: /* @__PURE__ */ __name((price) => reviewedRow("subscription_price", price, price.subscription), "row"),
|
|
23550
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => {
|
|
23551
|
+
await (confirm ? store.subscriptions.confirm(id2, by, reason) : store.subscriptions.reject(id2, by, reason));
|
|
23552
|
+
return id2;
|
|
23553
|
+
}, "decide")
|
|
23554
|
+
}), "subscriptionPriceKind");
|
|
23555
|
+
|
|
23556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
23557
|
+
var rowOf10 = /* @__PURE__ */ __name((task2) => {
|
|
23498
23558
|
const suggestion = task2.closeSuggestion;
|
|
23499
23559
|
if (suggestion === null)
|
|
23500
23560
|
return void 0;
|
|
@@ -23519,7 +23579,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23519
23579
|
const taskOf = /* @__PURE__ */ __name(async (id2) => {
|
|
23520
23580
|
const key = id2.slice("close:".length);
|
|
23521
23581
|
const task2 = await store.tasks.details(key).catch(() => void 0);
|
|
23522
|
-
const row = task2 &&
|
|
23582
|
+
const row = task2 && rowOf10(task2);
|
|
23523
23583
|
if (!task2 || !row)
|
|
23524
23584
|
throw new CliError("not_found", `no close waits on task ${key}`);
|
|
23525
23585
|
return { task: task2, row };
|
|
@@ -23536,7 +23596,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23536
23596
|
where: { sql: "t.close_suggested_as IS NOT NULL", params: [] },
|
|
23537
23597
|
limit: filter.offset + filter.limit
|
|
23538
23598
|
});
|
|
23539
|
-
return kept(tasks.flatMap((task2) =>
|
|
23599
|
+
return kept(tasks.flatMap((task2) => rowOf10(task2) ?? []), { ...filter, limit: filter.offset + filter.limit });
|
|
23540
23600
|
}, "list"),
|
|
23541
23601
|
get: /* @__PURE__ */ __name(async (id2) => (await taskOf(id2)).row, "get"),
|
|
23542
23602
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
@@ -23561,7 +23621,16 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23561
23621
|
};
|
|
23562
23622
|
}, "taskCloseKind");
|
|
23563
23623
|
|
|
23564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/transactions.js
|
|
23625
|
+
var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23626
|
+
type: "transaction",
|
|
23627
|
+
list: /* @__PURE__ */ __name((options) => store.transactions.list(options), "list"),
|
|
23628
|
+
get: /* @__PURE__ */ __name((id2) => store.transactions.get(id2), "get"),
|
|
23629
|
+
row: /* @__PURE__ */ __name((transaction) => reviewedRow("transaction", transaction, transaction.counterparty?.ref ?? transaction.wallet), "row"),
|
|
23630
|
+
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.transactions.confirm(id2, by, reason) : await store.transactions.reject(id2, by, reason)).ref, "decide")
|
|
23631
|
+
}), "transactionKind");
|
|
23632
|
+
|
|
23633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
23565
23634
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
23566
23635
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
23567
23636
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -23575,7 +23644,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23575
23644
|
const policy = store.decisionPolicy;
|
|
23576
23645
|
const kinds = [];
|
|
23577
23646
|
const claimed = /* @__PURE__ */ __name(() => kinds.flatMap((kind) => kind.stored ?? []), "claimed");
|
|
23578
|
-
const
|
|
23647
|
+
const kindOf3 = /* @__PURE__ */ __name(async (id2) => {
|
|
23579
23648
|
const prefix = PREFIX.exec(id2)?.[1];
|
|
23580
23649
|
const found = prefix !== void 0 ? kinds.find((kind) => kind.prefix === prefix) : await (async () => {
|
|
23581
23650
|
const stored = (await store.proposedActions.get(id2)).kind;
|
|
@@ -23607,7 +23676,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23607
23676
|
return { items: page.slice(0, filter.limit), hasMore: page.length > filter.limit };
|
|
23608
23677
|
}, "list"),
|
|
23609
23678
|
get: /* @__PURE__ */ __name(async (id2) => {
|
|
23610
|
-
const kind = await
|
|
23679
|
+
const kind = await kindOf3(id2);
|
|
23611
23680
|
return marked(kind, await kind.get(id2));
|
|
23612
23681
|
}, "get"),
|
|
23613
23682
|
decide: /* @__PURE__ */ __name(async (ids, decision) => {
|
|
@@ -23637,7 +23706,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23637
23706
|
continue;
|
|
23638
23707
|
}
|
|
23639
23708
|
try {
|
|
23640
|
-
const kind = await
|
|
23709
|
+
const kind = await kindOf3(id2);
|
|
23641
23710
|
if (chosen.length && !kind.parts) {
|
|
23642
23711
|
refuseIds(id2, `a ${kind.kind} proposal has no parts; name ${id2} alone`);
|
|
23643
23712
|
continue;
|
|
@@ -23677,19 +23746,24 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23677
23746
|
invoiceKind(store),
|
|
23678
23747
|
paymentKind(store),
|
|
23679
23748
|
orderKind(store),
|
|
23749
|
+
contractKind(store),
|
|
23750
|
+
subscriptionKind(store),
|
|
23751
|
+
subscriptionPriceKind(store),
|
|
23752
|
+
transactionKind(store),
|
|
23680
23753
|
organizationKind(store),
|
|
23681
23754
|
memoryKind(store),
|
|
23682
23755
|
findingsKind(store),
|
|
23683
23756
|
mailFindingsKind(store),
|
|
23684
23757
|
meetingFindingsKind(store),
|
|
23685
|
-
taskCloseKind(store)
|
|
23758
|
+
taskCloseKind(store),
|
|
23759
|
+
sourceReviewKind(store)
|
|
23686
23760
|
])
|
|
23687
23761
|
registry.register(kind);
|
|
23688
23762
|
registry.register(actionKind(store, registry.claimed));
|
|
23689
23763
|
return registry;
|
|
23690
23764
|
}, "proposalRegistry");
|
|
23691
23765
|
|
|
23692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
23693
23767
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
23694
23768
|
if (newest === null)
|
|
23695
23769
|
return null;
|
|
@@ -23698,7 +23772,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
23698
23772
|
return newest.addressed ? "owed" : null;
|
|
23699
23773
|
}, "mailTurn");
|
|
23700
23774
|
|
|
23701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
23702
23776
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
23703
23777
|
if (error instanceof CliError && error.code === "not_found")
|
|
23704
23778
|
return void 0;
|
|
@@ -23756,7 +23830,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
23756
23830
|
};
|
|
23757
23831
|
}, "mailActivity");
|
|
23758
23832
|
|
|
23759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23833
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23760
23834
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23761
23835
|
const ids = [...new Set(chatIds)];
|
|
23762
23836
|
if (ids.length === 0)
|
|
@@ -23782,7 +23856,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23782
23856
|
}));
|
|
23783
23857
|
}, "chatCoverage");
|
|
23784
23858
|
|
|
23785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
23786
23860
|
var DAY = 864e5;
|
|
23787
23861
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
23788
23862
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -24029,7 +24103,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24029
24103
|
};
|
|
24030
24104
|
}, "agendaItem");
|
|
24031
24105
|
|
|
24032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
24033
24107
|
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");
|
|
24034
24108
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
24035
24109
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -24045,7 +24119,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
24045
24119
|
}, "excerpt");
|
|
24046
24120
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
24047
24121
|
|
|
24048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
24049
24123
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
24050
24124
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
24051
24125
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -24087,7 +24161,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
24087
24161
|
return found;
|
|
24088
24162
|
}, "identitiesIn");
|
|
24089
24163
|
|
|
24090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
24091
24165
|
var SEARCH_LIMIT = 500;
|
|
24092
24166
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
24093
24167
|
var aliasHits = {
|
|
@@ -24136,7 +24210,7 @@ var aliasHits = {
|
|
|
24136
24210
|
}, "candidates")
|
|
24137
24211
|
};
|
|
24138
24212
|
|
|
24139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
24140
24214
|
var WEIGHT = 0.5;
|
|
24141
24215
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
24142
24216
|
var LARGE_GROUP = 30;
|
|
@@ -24190,7 +24264,7 @@ var chatSenders = {
|
|
|
24190
24264
|
}, "candidates")
|
|
24191
24265
|
};
|
|
24192
24266
|
|
|
24193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
24194
24268
|
var WEIGHT2 = 0.7;
|
|
24195
24269
|
var chatTitle = {
|
|
24196
24270
|
id: "chat-title",
|
|
@@ -24229,7 +24303,7 @@ var chatTitle = {
|
|
|
24229
24303
|
}, "candidates")
|
|
24230
24304
|
};
|
|
24231
24305
|
|
|
24232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
24233
24307
|
var WEIGHT3 = 0.3;
|
|
24234
24308
|
var CONTACTS = 500;
|
|
24235
24309
|
var MOST_PAIRS = 200;
|
|
@@ -24290,7 +24364,7 @@ var emailDomain = {
|
|
|
24290
24364
|
}, "candidates")
|
|
24291
24365
|
};
|
|
24292
24366
|
|
|
24293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
24294
24368
|
var NAMED = 0.7;
|
|
24295
24369
|
var MEMBER_ONLY = 0.3;
|
|
24296
24370
|
var READ_LIMIT2 = 500;
|
|
@@ -24364,7 +24438,7 @@ var mailThread = {
|
|
|
24364
24438
|
}, "candidates")
|
|
24365
24439
|
};
|
|
24366
24440
|
|
|
24367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
24368
24442
|
var WEIGHT4 = 0.5;
|
|
24369
24443
|
var memberChats = {
|
|
24370
24444
|
id: "member-chats",
|
|
@@ -24405,7 +24479,7 @@ var memberChats = {
|
|
|
24405
24479
|
}, "candidates")
|
|
24406
24480
|
};
|
|
24407
24481
|
|
|
24408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
24409
24483
|
var WEIGHT5 = 0.6;
|
|
24410
24484
|
var memberDialog = {
|
|
24411
24485
|
id: "member-dialog",
|
|
@@ -24440,7 +24514,7 @@ var memberDialog = {
|
|
|
24440
24514
|
}, "candidates")
|
|
24441
24515
|
};
|
|
24442
24516
|
|
|
24443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
24444
24518
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
24445
24519
|
async around(ref, window3) {
|
|
24446
24520
|
const at = parseLocator(ref);
|
|
@@ -24536,7 +24610,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
24536
24610
|
};
|
|
24537
24611
|
}, "storedNeighbours");
|
|
24538
24612
|
|
|
24539
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
24540
24614
|
import { createHash as createHash2 } from "node:crypto";
|
|
24541
24615
|
var DAY2 = 864e5;
|
|
24542
24616
|
var MAX_TIME = 864e13;
|
|
@@ -24852,7 +24926,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
24852
24926
|
return value;
|
|
24853
24927
|
}, "decodeCheckpoint");
|
|
24854
24928
|
|
|
24855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
24856
24930
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
24857
24931
|
var PAGE2 = 20;
|
|
24858
24932
|
var PEOPLE = 20;
|
|
@@ -25256,7 +25330,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
25256
25330
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
25257
25331
|
}, "peopleOf");
|
|
25258
25332
|
|
|
25259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
25260
25334
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
25261
25335
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
25262
25336
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -25300,7 +25374,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
25300
25374
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
25301
25375
|
}, "matchVocabularyTerms");
|
|
25302
25376
|
|
|
25303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
25304
25378
|
var KINDS = ["project", "tag", "topic"];
|
|
25305
25379
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
25306
25380
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -25355,7 +25429,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
25355
25429
|
};
|
|
25356
25430
|
}, "findEvidenceMentions");
|
|
25357
25431
|
|
|
25358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
25359
25433
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
25360
25434
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
25361
25435
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -25661,7 +25735,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
25661
25735
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
25662
25736
|
}, "purposeHintOf");
|
|
25663
25737
|
|
|
25664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
25665
25739
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
25666
25740
|
var PERSON_SCORERS = [emailDomain];
|
|
25667
25741
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -25909,18 +25983,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
25909
25983
|
}, "referenceOf");
|
|
25910
25984
|
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");
|
|
25911
25985
|
|
|
25912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25986
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25913
25987
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25914
25988
|
|
|
25915
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25916
25990
|
import { lstat } from "node:fs/promises";
|
|
25917
25991
|
|
|
25918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25919
25993
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
25920
25994
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25921
25995
|
import { join as join2 } from "node:path";
|
|
25922
25996
|
|
|
25923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25924
25998
|
import { createHash as createHash3 } from "node:crypto";
|
|
25925
25999
|
var metadataLimit = 16384;
|
|
25926
26000
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -25980,7 +26054,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
25980
26054
|
}
|
|
25981
26055
|
}, "readPartialMetadata");
|
|
25982
26056
|
|
|
25983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
25984
26058
|
import { randomUUID } from "node:crypto";
|
|
25985
26059
|
import { open, rename, unlink } from "node:fs/promises";
|
|
25986
26060
|
import { join } from "node:path";
|
|
@@ -26072,7 +26146,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
26072
26146
|
};
|
|
26073
26147
|
}, "partialWriter");
|
|
26074
26148
|
|
|
26075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
26076
26150
|
var NativeRecordingPartialStore = class {
|
|
26077
26151
|
static {
|
|
26078
26152
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -26179,12 +26253,12 @@ var NativeRecordingPartialStore = class {
|
|
|
26179
26253
|
}
|
|
26180
26254
|
};
|
|
26181
26255
|
|
|
26182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26183
26257
|
import { createHash as createHash5 } from "node:crypto";
|
|
26184
26258
|
import { link as link2 } from "node:fs/promises";
|
|
26185
26259
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
26186
26260
|
|
|
26187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
26188
26262
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
26189
26263
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
26190
26264
|
signal?.throwIfAborted();
|
|
@@ -26219,7 +26293,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
26219
26293
|
signal?.throwIfAborted();
|
|
26220
26294
|
}, "commitPublication");
|
|
26221
26295
|
|
|
26222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
26223
26297
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
26224
26298
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
26225
26299
|
import { join as join3 } from "node:path";
|
|
@@ -26292,7 +26366,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
26292
26366
|
}
|
|
26293
26367
|
}, "writePublicationJournal");
|
|
26294
26368
|
|
|
26295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26296
26370
|
var NativeRecordingPublication = class {
|
|
26297
26371
|
static {
|
|
26298
26372
|
__name(this, "NativeRecordingPublication");
|
|
@@ -26365,7 +26439,7 @@ var NativeRecordingPublication = class {
|
|
|
26365
26439
|
}
|
|
26366
26440
|
};
|
|
26367
26441
|
|
|
26368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26369
26443
|
import { createHash as createHash6 } from "node:crypto";
|
|
26370
26444
|
import { readdir } from "node:fs/promises";
|
|
26371
26445
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -26452,7 +26526,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
26452
26526
|
beforePublish
|
|
26453
26527
|
}), "commitMediaEntry");
|
|
26454
26528
|
|
|
26455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26456
26530
|
var validator = '"media-completed-v1"';
|
|
26457
26531
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26458
26532
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -26553,7 +26627,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
26553
26627
|
return entry;
|
|
26554
26628
|
}, "archiveMediaFile");
|
|
26555
26629
|
|
|
26556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
26557
26631
|
import { mkdir, realpath } from "node:fs/promises";
|
|
26558
26632
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
26559
26633
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -26620,7 +26694,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
26620
26694
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
26621
26695
|
}, "withMediaArchiveLocks");
|
|
26622
26696
|
|
|
26623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26624
26698
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
26625
26699
|
if (value === void 0)
|
|
26626
26700
|
return void 0;
|
|
@@ -26773,7 +26847,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26773
26847
|
}, { create: true });
|
|
26774
26848
|
}, "archiveMedia");
|
|
26775
26849
|
|
|
26776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26850
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
26777
26851
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
26778
26852
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
26779
26853
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -26926,7 +27000,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
26926
27000
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
26927
27001
|
}, "moveMediaArchive");
|
|
26928
27002
|
|
|
26929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
26930
27004
|
var bytesOf2 = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
26931
27005
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
26932
27006
|
}, "progress") }) => {
|
|
@@ -26938,7 +27012,7 @@ var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__
|
|
|
26938
27012
|
}, "nativeRuntime");
|
|
26939
27013
|
var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /* @__PURE__ */ __name(() => {
|
|
26940
27014
|
}, "progress"), bytes: bytes2, acceptTerms = false }) => {
|
|
26941
|
-
const model = textModel(id2);
|
|
27015
|
+
const model = textModel(id2, env);
|
|
26942
27016
|
if (model.terms && !acceptTerms) {
|
|
26943
27017
|
throw new CliError("validation_error", `${model.id} comes under the ${model.licence} (${model.terms}): read them, then run this again with --accept-terms`);
|
|
26944
27018
|
}
|
|
@@ -26949,7 +27023,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26949
27023
|
}
|
|
26950
27024
|
await nativeRuntime({ env, progress });
|
|
26951
27025
|
progress(`${model.id}: loading it once to check it works`);
|
|
26952
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
27026
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-4NYYOVNS.js");
|
|
26953
27027
|
const embedder = await openEmbedder2(model, directory2);
|
|
26954
27028
|
try {
|
|
26955
27029
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -26970,7 +27044,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
26970
27044
|
}
|
|
26971
27045
|
await nativeRuntime({ env, progress });
|
|
26972
27046
|
progress(`${model.id}: loading it once to check it works`);
|
|
26973
|
-
const { openReranker } = await import("./rerank-
|
|
27047
|
+
const { openReranker } = await import("./rerank-X7UWX2ZF.js");
|
|
26974
27048
|
const reranker = await openReranker(model, directory2);
|
|
26975
27049
|
try {
|
|
26976
27050
|
await reranker.score("check", ["check"]);
|
|
@@ -26988,7 +27062,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26988
27062
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
26989
27063
|
}
|
|
26990
27064
|
progress(`${model.id}: loading it once to check it works`);
|
|
26991
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
27065
|
+
const { openPictureEmbedder } = await import("./embedder-SHPWEDIQ.js");
|
|
26992
27066
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
26993
27067
|
try {
|
|
26994
27068
|
const vector = await embedder.embedQuery("check");
|
|
@@ -27000,7 +27074,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
27000
27074
|
return { model, directory: directory2 };
|
|
27001
27075
|
}, "downloadImageModel");
|
|
27002
27076
|
|
|
27003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
27004
27078
|
var MONEY_REQUEST = "money-request";
|
|
27005
27079
|
var MONEY_DONE = "money-done";
|
|
27006
27080
|
var PROMISE = "promise";
|
|
@@ -27034,10 +27108,10 @@ var MONEY_WORDS = [
|
|
|
27034
27108
|
}
|
|
27035
27109
|
];
|
|
27036
27110
|
|
|
27037
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
27038
27112
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
27039
27113
|
|
|
27040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
27041
27115
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
27042
27116
|
var MONEY_DONE_FORMS = words2([
|
|
27043
27117
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -27077,7 +27151,7 @@ var PROMISE_FORMS = words2([
|
|
|
27077
27151
|
"estar\xE1 listo"
|
|
27078
27152
|
]);
|
|
27079
27153
|
|
|
27080
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
27081
27155
|
var EXCERPT_CHARS = 80;
|
|
27082
27156
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
27083
27157
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -27099,7 +27173,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
27099
27173
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
27100
27174
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
27101
27175
|
|
|
27102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
27103
27177
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
27104
27178
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
27105
27179
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -27180,7 +27254,7 @@ var amounts = {
|
|
|
27180
27254
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
27181
27255
|
};
|
|
27182
27256
|
|
|
27183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
27184
27258
|
var children = {
|
|
27185
27259
|
id: "children",
|
|
27186
27260
|
version: 1,
|
|
@@ -27209,7 +27283,7 @@ var children = {
|
|
|
27209
27283
|
}, "read")
|
|
27210
27284
|
};
|
|
27211
27285
|
|
|
27212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
27213
27287
|
var coverage = {
|
|
27214
27288
|
id: "coverage",
|
|
27215
27289
|
version: 1,
|
|
@@ -27238,7 +27312,7 @@ var coverage = {
|
|
|
27238
27312
|
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")
|
|
27239
27313
|
};
|
|
27240
27314
|
|
|
27241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
27242
27316
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
27243
27317
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
27244
27318
|
signal: "payments",
|
|
@@ -27288,7 +27362,7 @@ var payments = {
|
|
|
27288
27362
|
}, "read")
|
|
27289
27363
|
};
|
|
27290
27364
|
|
|
27291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
27292
27366
|
var PATTERNS_PER_CHAT = 3;
|
|
27293
27367
|
var DAY3 = 864e5;
|
|
27294
27368
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -27377,7 +27451,7 @@ var promises = {
|
|
|
27377
27451
|
}, "read")
|
|
27378
27452
|
};
|
|
27379
27453
|
|
|
27380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
27381
27455
|
var PER_SIDE = 5;
|
|
27382
27456
|
var WEEK = 7 * 864e5;
|
|
27383
27457
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -27408,7 +27482,7 @@ var questions2 = {
|
|
|
27408
27482
|
}, "attention")
|
|
27409
27483
|
};
|
|
27410
27484
|
|
|
27411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27485
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
27412
27486
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
27413
27487
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
27414
27488
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27476,7 +27550,7 @@ var replyNext = {
|
|
|
27476
27550
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27477
27551
|
};
|
|
27478
27552
|
|
|
27479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27480
27554
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27481
27555
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27482
27556
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27522,7 +27596,7 @@ var topics = {
|
|
|
27522
27596
|
}, "read")
|
|
27523
27597
|
};
|
|
27524
27598
|
|
|
27525
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27526
27600
|
var STATUS_SIGNALS = [
|
|
27527
27601
|
replyNext,
|
|
27528
27602
|
questions2,
|
|
@@ -27534,7 +27608,7 @@ var STATUS_SIGNALS = [
|
|
|
27534
27608
|
children
|
|
27535
27609
|
];
|
|
27536
27610
|
|
|
27537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27538
27612
|
var DAY4 = 864e5;
|
|
27539
27613
|
var STATUS_WINDOW = 300;
|
|
27540
27614
|
var STATUS_CHATS = 16;
|
|
@@ -27723,7 +27797,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27723
27797
|
};
|
|
27724
27798
|
}, "projectStatus");
|
|
27725
27799
|
|
|
27726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
27727
27801
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
27728
27802
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27729
27803
|
if (deps.offline)
|
|
@@ -27795,7 +27869,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
27795
27869
|
};
|
|
27796
27870
|
}, "accountService");
|
|
27797
27871
|
|
|
27798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
27799
27873
|
var MINUTE = 6e4;
|
|
27800
27874
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
27801
27875
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -27814,7 +27888,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
27814
27888
|
return new Date(at - at % MINUTE).toISOString();
|
|
27815
27889
|
}, "sendTime");
|
|
27816
27890
|
|
|
27817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
27818
27892
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
27819
27893
|
try {
|
|
27820
27894
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -28061,7 +28135,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
28061
28135
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
28062
28136
|
}, "linkLimits");
|
|
28063
28137
|
|
|
28064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
28065
28139
|
var THREADS_PAGE = 500;
|
|
28066
28140
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
28067
28141
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -28140,7 +28214,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
28140
28214
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
28141
28215
|
}, "readMail");
|
|
28142
28216
|
|
|
28143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
28144
28218
|
var NO_MAIL = "no_mail";
|
|
28145
28219
|
var MAIL = "email";
|
|
28146
28220
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -28171,11 +28245,11 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
28171
28245
|
if (kind === "messages") {
|
|
28172
28246
|
if (explicit === MAIL)
|
|
28173
28247
|
throw new CliError("validation_error", "mail is searched with `memo search mail`, not search messages");
|
|
28174
|
-
return chosen.filter(({ provider }) =>
|
|
28248
|
+
return chosen.filter(({ provider }) => holdsKindOf(provider, "messages"));
|
|
28175
28249
|
}
|
|
28176
28250
|
if (explicit !== void 0 && explicit !== MAIL && explicit !== "all")
|
|
28177
28251
|
throw new CliError("validation_error", `search mail reads mail only \u2014 \`${command === void 0 ? "" : `${command} `}search messages\` searches ${explicit}`);
|
|
28178
|
-
const mail = (listed2 ? chosen : held).filter(({ provider }) =>
|
|
28252
|
+
const mail = (listed2 ? chosen : held).filter(({ provider }) => holdsKindOf(provider, "mail"));
|
|
28179
28253
|
if (mail.length === 0)
|
|
28180
28254
|
throw new CliError("not_found", "no mail in the store yet \u2014 `memo sync --only mail --since-time <time>` imports it", {
|
|
28181
28255
|
reason: NO_MAIL
|
|
@@ -28187,7 +28261,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
28187
28261
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
28188
28262
|
}, "accountsOfKind");
|
|
28189
28263
|
|
|
28190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
28191
28265
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
28192
28266
|
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");
|
|
28193
28267
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -28370,7 +28444,7 @@ var coverageOf = /* @__PURE__ */ __name(async (store, { scopeAccounts, selectedC
|
|
|
28370
28444
|
const completeness = [];
|
|
28371
28445
|
const stats = /* @__PURE__ */ new Map();
|
|
28372
28446
|
let inventoryComplete = scopeAccounts.length > 0;
|
|
28373
|
-
for (const selected of scopeAccounts) {
|
|
28447
|
+
for (const selected of scopeAccounts.filter(({ provider }) => !isImportedProvider(provider))) {
|
|
28374
28448
|
if (!await store.sync.syncState(selected, CHAT_LIST_KEY)) {
|
|
28375
28449
|
inventoryComplete = false;
|
|
28376
28450
|
}
|
|
@@ -28535,16 +28609,16 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28535
28609
|
};
|
|
28536
28610
|
}, "statsLucene");
|
|
28537
28611
|
|
|
28538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28539
28613
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28540
|
-
var
|
|
28614
|
+
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28541
28615
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
28542
28616
|
throw new CliError("validation_error", message, { reason: "selection.invalid" });
|
|
28543
28617
|
}
|
|
28544
28618
|
__name(invalid, "invalid");
|
|
28545
28619
|
var id = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value.length <= 256 ? value : invalid(), "id");
|
|
28546
28620
|
var accountOf = /* @__PURE__ */ __name((value) => {
|
|
28547
|
-
const fields =
|
|
28621
|
+
const fields = object2(value);
|
|
28548
28622
|
return { provider: id(fields?.provider), account: id(fields?.account) };
|
|
28549
28623
|
}, "accountOf");
|
|
28550
28624
|
var same = /* @__PURE__ */ __name((a, b) => a.provider === b.provider && a.account === b.account, "same");
|
|
@@ -28580,10 +28654,10 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28580
28654
|
invalid();
|
|
28581
28655
|
}
|
|
28582
28656
|
}
|
|
28583
|
-
const fields =
|
|
28657
|
+
const fields = object2(raw);
|
|
28584
28658
|
if (fields?.version !== 1 || fields.fieldsVersion !== FIELD_VERSION || typeof fields.target !== "string" || !["messages", "contacts"].includes(fields.target))
|
|
28585
28659
|
invalid();
|
|
28586
|
-
const execution =
|
|
28660
|
+
const execution = object2(fields.execution);
|
|
28587
28661
|
if (!execution || !Array.isArray(execution.accounts) || execution.accounts.length === 0)
|
|
28588
28662
|
invalid();
|
|
28589
28663
|
const accounts = execution.accounts.map(accountOf);
|
|
@@ -28593,7 +28667,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28593
28667
|
reason: "selection.out-of-scope"
|
|
28594
28668
|
});
|
|
28595
28669
|
const scopedChat = /* @__PURE__ */ __name((value) => {
|
|
28596
|
-
const chat =
|
|
28670
|
+
const chat = object2(value);
|
|
28597
28671
|
const account = accountOf(chat?.account);
|
|
28598
28672
|
if (!accounts.some((candidate) => same(candidate, account)))
|
|
28599
28673
|
invalid();
|
|
@@ -28602,14 +28676,14 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28602
28676
|
const checkShape = /* @__PURE__ */ __name((value, depth = 0) => {
|
|
28603
28677
|
if (depth > 32)
|
|
28604
28678
|
invalid();
|
|
28605
|
-
const node =
|
|
28679
|
+
const node = object2(value);
|
|
28606
28680
|
if (!node)
|
|
28607
28681
|
invalid();
|
|
28608
28682
|
if (node.kind === "boolean") {
|
|
28609
28683
|
if (!Array.isArray(node.clauses))
|
|
28610
28684
|
invalid();
|
|
28611
28685
|
for (const clause of node.clauses) {
|
|
28612
|
-
const fields2 =
|
|
28686
|
+
const fields2 = object2(clause);
|
|
28613
28687
|
if (!fields2 || typeof fields2.occur !== "string")
|
|
28614
28688
|
invalid();
|
|
28615
28689
|
checkShape(fields2.node, depth + 1);
|
|
@@ -28620,7 +28694,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28620
28694
|
checkShape(execution.root);
|
|
28621
28695
|
const ast = validateAst({ version: 1, language: "lucene-v1", root: execution.root });
|
|
28622
28696
|
const bind = /* @__PURE__ */ __name((node, value) => {
|
|
28623
|
-
const rawNode =
|
|
28697
|
+
const rawNode = object2(value);
|
|
28624
28698
|
if (node.kind === "boolean") {
|
|
28625
28699
|
const clauses = rawNode?.clauses;
|
|
28626
28700
|
if (!Array.isArray(clauses))
|
|
@@ -28629,24 +28703,24 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28629
28703
|
...node,
|
|
28630
28704
|
clauses: node.clauses.map((clause, index) => ({
|
|
28631
28705
|
...clause,
|
|
28632
|
-
node: bind(clause.node,
|
|
28706
|
+
node: bind(clause.node, object2(clauses[index])?.node)
|
|
28633
28707
|
}))
|
|
28634
28708
|
};
|
|
28635
28709
|
}
|
|
28636
|
-
const resolution =
|
|
28710
|
+
const resolution = object2(rawNode?.resolution);
|
|
28637
28711
|
if (node.field === "chat")
|
|
28638
28712
|
return { ...node, resolution: { chat: scopedChat(resolution?.chat) } };
|
|
28639
28713
|
if (node.field === "from") {
|
|
28640
28714
|
if (resolution?.outgoing === true)
|
|
28641
28715
|
return { ...node, resolution: { outgoing: true } };
|
|
28642
|
-
const sender =
|
|
28716
|
+
const sender = object2(resolution?.sender);
|
|
28643
28717
|
const provider = id(sender?.provider);
|
|
28644
28718
|
if (!accounts.some((account) => account.provider === provider))
|
|
28645
28719
|
invalid();
|
|
28646
28720
|
return { ...node, resolution: { sender: { provider, id: id(sender?.id) } } };
|
|
28647
28721
|
}
|
|
28648
28722
|
if (node.field === "date") {
|
|
28649
|
-
const range2 =
|
|
28723
|
+
const range2 = object2(resolution?.date);
|
|
28650
28724
|
if (!range2 || typeof range2.lower_inclusive !== "boolean" || typeof range2.upper_inclusive !== "boolean")
|
|
28651
28725
|
invalid();
|
|
28652
28726
|
const lower = finiteTime(range2.lower), upper = finiteTime(range2.upper);
|
|
@@ -28664,12 +28738,12 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28664
28738
|
}
|
|
28665
28739
|
return node;
|
|
28666
28740
|
}, "bind");
|
|
28667
|
-
const entity =
|
|
28741
|
+
const entity = object2(fields.entity);
|
|
28668
28742
|
const entityAccount = accountOf(entity?.account);
|
|
28669
28743
|
if (!accounts.some((account) => same(account, entityAccount)))
|
|
28670
28744
|
invalid();
|
|
28671
28745
|
const target2 = fields.target;
|
|
28672
|
-
const supplied =
|
|
28746
|
+
const supplied = object2(fields.options);
|
|
28673
28747
|
if (!supplied || Object.keys(supplied).some((key) => !["measure", "score", "weights", "minMessages", "messageKind"].includes(key)))
|
|
28674
28748
|
invalid();
|
|
28675
28749
|
if (["measure", "score", "messageKind"].some((key) => supplied[key] !== void 0 && typeof supplied[key] !== "string"))
|
|
@@ -28704,7 +28778,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28704
28778
|
};
|
|
28705
28779
|
}, "readRankingSelection");
|
|
28706
28780
|
|
|
28707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
28708
28782
|
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");
|
|
28709
28783
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
28710
28784
|
command,
|
|
@@ -28714,7 +28788,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
28714
28788
|
fieldsVersion: FIELD_VERSION
|
|
28715
28789
|
}), "searchRecordOf");
|
|
28716
28790
|
|
|
28717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
28718
28792
|
function invalid2(message) {
|
|
28719
28793
|
throw new CliError("validation_error", message);
|
|
28720
28794
|
}
|
|
@@ -29008,7 +29082,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29008
29082
|
}, "evidence")
|
|
29009
29083
|
}), "adminStatisticsService");
|
|
29010
29084
|
|
|
29011
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29085
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
29012
29086
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
29013
29087
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
29014
29088
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -29145,16 +29219,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29145
29219
|
return { plan, repair };
|
|
29146
29220
|
}, "gapsService");
|
|
29147
29221
|
|
|
29148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29149
29223
|
import { createHash as createHash9 } from "node:crypto";
|
|
29150
29224
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
29151
29225
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
29152
29226
|
|
|
29153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29154
29228
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
29155
29229
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
29156
29230
|
|
|
29157
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
29158
29232
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
29159
29233
|
import { open as open4, stat } from "node:fs/promises";
|
|
29160
29234
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -29356,7 +29430,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
29356
29430
|
return { name, source };
|
|
29357
29431
|
}, "readStickerFile");
|
|
29358
29432
|
|
|
29359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29433
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29360
29434
|
var MAX_FILES = 1e4;
|
|
29361
29435
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
29362
29436
|
if (refusedPlace(directory2, app, env))
|
|
@@ -29425,15 +29499,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29425
29499
|
return choices;
|
|
29426
29500
|
}, "directoryPaths");
|
|
29427
29501
|
|
|
29428
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29429
29503
|
import { posix } from "node:path";
|
|
29430
29504
|
|
|
29431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29432
29506
|
import { setImmediate as tick } from "node:timers/promises";
|
|
29433
29507
|
import { crc32 } from "node:zlib";
|
|
29434
29508
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
29435
29509
|
|
|
29436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
29437
29511
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
29438
29512
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
29439
29513
|
var SAMPLE = 65536;
|
|
@@ -29535,7 +29609,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29535
29609
|
return result.text;
|
|
29536
29610
|
}, "decodeXml");
|
|
29537
29611
|
|
|
29538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29539
29613
|
var MAX_PART = 10 * 1024 * 1024;
|
|
29540
29614
|
var MAX_ENTRIES = 1e3;
|
|
29541
29615
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -29750,7 +29824,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29750
29824
|
return found;
|
|
29751
29825
|
}, "elements");
|
|
29752
29826
|
|
|
29753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29754
29828
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29755
29829
|
let name = "";
|
|
29756
29830
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -29805,7 +29879,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
29805
29879
|
return { text: parts.join("").trim(), truncated: false };
|
|
29806
29880
|
}, "sheetText");
|
|
29807
29881
|
|
|
29808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29809
29883
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
29810
29884
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
29811
29885
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -30205,10 +30279,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
30205
30279
|
}
|
|
30206
30280
|
}, "readDocument");
|
|
30207
30281
|
|
|
30208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30209
30283
|
import { extname as extname3 } from "node:path";
|
|
30210
30284
|
|
|
30211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
30212
30286
|
import { readFileSync } from "node:fs";
|
|
30213
30287
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
30214
30288
|
import { fileURLToPath } from "node:url";
|
|
@@ -30269,7 +30343,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
30269
30343
|
}
|
|
30270
30344
|
}, "derived");
|
|
30271
30345
|
|
|
30272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
30273
30347
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
30274
30348
|
var image2 = {
|
|
30275
30349
|
id: "image",
|
|
@@ -30278,7 +30352,7 @@ var image2 = {
|
|
|
30278
30352
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
30279
30353
|
};
|
|
30280
30354
|
|
|
30281
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
30282
30356
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
30283
30357
|
var doc = {
|
|
30284
30358
|
id: "doc",
|
|
@@ -30290,7 +30364,7 @@ var doc = {
|
|
|
30290
30364
|
}), "read")
|
|
30291
30365
|
};
|
|
30292
30366
|
|
|
30293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
30294
30368
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
30295
30369
|
var docx = {
|
|
30296
30370
|
id: "docx",
|
|
@@ -30303,7 +30377,7 @@ var docx = {
|
|
|
30303
30377
|
}), "read")
|
|
30304
30378
|
};
|
|
30305
30379
|
|
|
30306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30307
30381
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
30308
30382
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
30309
30383
|
"fonttbl",
|
|
@@ -30479,7 +30553,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
30479
30553
|
}, "htmlText");
|
|
30480
30554
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
30481
30555
|
|
|
30482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
30483
30557
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
30484
30558
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
30485
30559
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -30535,7 +30609,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
30535
30609
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
30536
30610
|
}, "markdownSections");
|
|
30537
30611
|
|
|
30538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
30539
30613
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
30540
30614
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
30541
30615
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -30606,7 +30680,7 @@ var html = {
|
|
|
30606
30680
|
}, "read")
|
|
30607
30681
|
};
|
|
30608
30682
|
|
|
30609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
30610
30684
|
var office = {
|
|
30611
30685
|
id: "office",
|
|
30612
30686
|
version: documentExtractor("odt"),
|
|
@@ -30617,7 +30691,7 @@ var office = {
|
|
|
30617
30691
|
}, "read")
|
|
30618
30692
|
};
|
|
30619
30693
|
|
|
30620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
30621
30695
|
var pdf = {
|
|
30622
30696
|
id: "pdf",
|
|
30623
30697
|
version: "unpdf",
|
|
@@ -30684,7 +30758,7 @@ var pdf = {
|
|
|
30684
30758
|
}), "read")
|
|
30685
30759
|
};
|
|
30686
30760
|
|
|
30687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30688
30762
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30689
30763
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30690
30764
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30704,7 +30778,7 @@ var plain = {
|
|
|
30704
30778
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30705
30779
|
};
|
|
30706
30780
|
|
|
30707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30708
30782
|
var rtf = {
|
|
30709
30783
|
id: "rtf",
|
|
30710
30784
|
version: "v1",
|
|
@@ -30712,10 +30786,10 @@ var rtf = {
|
|
|
30712
30786
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30713
30787
|
};
|
|
30714
30788
|
|
|
30715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30716
30790
|
import { basename as basename5 } from "node:path";
|
|
30717
30791
|
|
|
30718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30719
30793
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
30720
30794
|
const cells = [];
|
|
30721
30795
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -30753,7 +30827,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
30753
30827
|
return { cells, truncated };
|
|
30754
30828
|
}, "delimitedSpans");
|
|
30755
30829
|
|
|
30756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30757
30831
|
var DELIMITED = {
|
|
30758
30832
|
".csv": ",",
|
|
30759
30833
|
".tsv": " ",
|
|
@@ -30792,7 +30866,7 @@ var sheets = {
|
|
|
30792
30866
|
}, "read")
|
|
30793
30867
|
};
|
|
30794
30868
|
|
|
30795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
30796
30870
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
30797
30871
|
var HEAD_BYTES = 1024;
|
|
30798
30872
|
var readers = [...BUILT_INS2];
|
|
@@ -30802,7 +30876,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
30802
30876
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
30803
30877
|
}, "readWithRegistry");
|
|
30804
30878
|
|
|
30805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30806
30880
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
30807
30881
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
30808
30882
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -31881,7 +31955,7 @@ function imageSize(input) {
|
|
|
31881
31955
|
}
|
|
31882
31956
|
__name(imageSize, "imageSize");
|
|
31883
31957
|
|
|
31884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
31885
31959
|
var MAX_PAGES = 20;
|
|
31886
31960
|
var MAX_PIXELS = 2e7;
|
|
31887
31961
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -32032,7 +32106,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
32032
32106
|
}
|
|
32033
32107
|
}, "ocrPdf");
|
|
32034
32108
|
|
|
32035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
32036
32110
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
32037
32111
|
const limits = pdfPreviewLimits(env);
|
|
32038
32112
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -32109,7 +32183,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
32109
32183
|
}
|
|
32110
32184
|
}, "pdfPreview");
|
|
32111
32185
|
|
|
32112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
32113
32187
|
import { createHash as createHash8 } from "node:crypto";
|
|
32114
32188
|
import { constants } from "node:fs";
|
|
32115
32189
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -32217,7 +32291,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
32217
32291
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
32218
32292
|
}, "transferMime");
|
|
32219
32293
|
|
|
32220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
32221
32295
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
32222
32296
|
import { link as link3, rm } from "node:fs/promises";
|
|
32223
32297
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -32331,7 +32405,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
32331
32405
|
}
|
|
32332
32406
|
}, "save");
|
|
32333
32407
|
|
|
32334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
32335
32409
|
var ATTACHMENT_QUERY = {
|
|
32336
32410
|
entity: "attachment",
|
|
32337
32411
|
backend: "sql",
|
|
@@ -32420,7 +32494,7 @@ var keep = /* @__PURE__ */ __name(async (store, file2, extraction, bytes2, sha)
|
|
|
32420
32494
|
});
|
|
32421
32495
|
}
|
|
32422
32496
|
}, "keep");
|
|
32423
|
-
var
|
|
32497
|
+
var itemOf3 = /* @__PURE__ */ __name((account, view) => ({
|
|
32424
32498
|
message: formatLocator({ ...account, chat: view.chatId, message: view.messageId }),
|
|
32425
32499
|
kind: view.kind,
|
|
32426
32500
|
position: view.position + 1,
|
|
@@ -32632,7 +32706,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32632
32706
|
}
|
|
32633
32707
|
const where = query ? queryFilter(query, attachmentColumns(chats), { command: "attachments list" }) : void 0;
|
|
32634
32708
|
const views = await store.attachments.attachments({ ...where ? { where } : {}, offset, limit: limit + 1 });
|
|
32635
|
-
return { items: views.slice(0, limit).map((view) =>
|
|
32709
|
+
return { items: views.slice(0, limit).map((view) => itemOf3(account, view)), has_more: views.length > limit };
|
|
32636
32710
|
}, "list"),
|
|
32637
32711
|
show: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, page, load, ...window3 }) => {
|
|
32638
32712
|
validateWindow(window3);
|
|
@@ -32754,7 +32828,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32754
32828
|
}, "setText")
|
|
32755
32829
|
}), "attachmentsService");
|
|
32756
32830
|
|
|
32757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32758
32832
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32759
32833
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32760
32834
|
const store = await accountStore(deps);
|
|
@@ -32784,7 +32858,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32784
32858
|
}, "list")
|
|
32785
32859
|
}), "chatDocumentsService");
|
|
32786
32860
|
|
|
32787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32788
32862
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32789
32863
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32790
32864
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32871,7 +32945,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32871
32945
|
}
|
|
32872
32946
|
}, "isRetentionSelection");
|
|
32873
32947
|
|
|
32874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32875
32949
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32876
32950
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
32877
32951
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -33078,7 +33152,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33078
33152
|
};
|
|
33079
33153
|
}, "countersService");
|
|
33080
33154
|
|
|
33081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
33082
33156
|
var SYNC_KEY = "messages.sync-first";
|
|
33083
33157
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
33084
33158
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -33210,7 +33284,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
33210
33284
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
33211
33285
|
}), "withRefresh");
|
|
33212
33286
|
|
|
33213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
33214
33288
|
var CANDIDATES = 50;
|
|
33215
33289
|
var WORD_HITS = 200;
|
|
33216
33290
|
var RRF_K = 60;
|
|
@@ -33485,13 +33559,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33485
33559
|
return mean2.map((value) => value / length);
|
|
33486
33560
|
}, "meanOf");
|
|
33487
33561
|
|
|
33488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
33489
33563
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33490
33564
|
...embeddingsMaintenance(deps),
|
|
33491
33565
|
...embeddingsSearch(deps)
|
|
33492
33566
|
}), "embeddingsService");
|
|
33493
33567
|
|
|
33494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
33495
33569
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33496
33570
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33497
33571
|
if (deps.offline)
|
|
@@ -33632,7 +33706,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33632
33706
|
};
|
|
33633
33707
|
}, "foldersService");
|
|
33634
33708
|
|
|
33635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33709
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33636
33710
|
var REVIEW_COUNT = 500;
|
|
33637
33711
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33638
33712
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33711,7 +33785,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33711
33785
|
};
|
|
33712
33786
|
}, "mentionsService");
|
|
33713
33787
|
|
|
33714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
33715
33789
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
33716
33790
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
33717
33791
|
const { text: text2, spans } = formatted2;
|
|
@@ -33771,7 +33845,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
33771
33845
|
};
|
|
33772
33846
|
}, "visibleFormattedText");
|
|
33773
33847
|
|
|
33774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33775
33849
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33776
33850
|
position,
|
|
33777
33851
|
kind,
|
|
@@ -33820,7 +33894,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33820
33894
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33821
33895
|
}, "validatePermalink");
|
|
33822
33896
|
|
|
33823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33824
33898
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33825
33899
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33826
33900
|
return `${seconds / 86400}d`;
|
|
@@ -33852,7 +33926,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33852
33926
|
return seconds;
|
|
33853
33927
|
}, "pinDurationOf");
|
|
33854
33928
|
|
|
33855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33856
33930
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33857
33931
|
if (sendAs === void 0) {
|
|
33858
33932
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33877,7 +33951,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33877
33951
|
return sendAs;
|
|
33878
33952
|
}, "typedSendAs");
|
|
33879
33953
|
|
|
33880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33881
33955
|
var TOTAL_CAP = 1e4;
|
|
33882
33956
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33883
33957
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33888,7 +33962,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33888
33962
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33889
33963
|
}, "totalOf");
|
|
33890
33964
|
|
|
33891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33965
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33892
33966
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33893
33967
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33894
33968
|
let narrows = false;
|
|
@@ -33917,7 +33991,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33917
33991
|
return wanted(root).join(" ").trim();
|
|
33918
33992
|
}, "meaningWords");
|
|
33919
33993
|
|
|
33920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33921
33995
|
var words3 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33922
33996
|
var scaffolding = new Set(words3("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"));
|
|
33923
33997
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -33981,7 +34055,8 @@ function planQuestion(text2, strict = false) {
|
|
|
33981
34055
|
const raw = cleaned.slice(p.span.start, p.span.end);
|
|
33982
34056
|
return new RegExp(`^${p.field}[:=<>]`, "u").test(raw) ? raw : `${p.field}:${raw}`;
|
|
33983
34057
|
}).join(" ");
|
|
33984
|
-
const bypass = strict || !natural || implicitTextTerms(cleaned).size === 0 ||
|
|
34058
|
+
const bypass = strict || !natural || implicitTextTerms(cleaned).size === 0 || // A quoted single word is how `plainQuery` keeps `10:30` or `HH:MM` literal; it is no phrase the asker wrote.
|
|
34059
|
+
textual.some((p) => !(p.operator === "term" || p.operator === "phrase" && !/\s/u.test(p.value)) || p.field === "exact");
|
|
33985
34060
|
if (bypass)
|
|
33986
34061
|
return {
|
|
33987
34062
|
changed: false,
|
|
@@ -34049,7 +34124,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
34049
34124
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
34050
34125
|
}, "questionLookup");
|
|
34051
34126
|
|
|
34052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
34053
34128
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
34054
34129
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
34055
34130
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -34242,7 +34317,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
34242
34317
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
34243
34318
|
}, "signals");
|
|
34244
34319
|
|
|
34245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
34246
34321
|
var MEANING_DEPTH = 100;
|
|
34247
34322
|
var RRF_K2 = 60;
|
|
34248
34323
|
var RERANK_DEPTH = 50;
|
|
@@ -34567,7 +34642,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
34567
34642
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
34568
34643
|
}, "mixedWithReranker");
|
|
34569
34644
|
|
|
34570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
34571
34646
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
34572
34647
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
34573
34648
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -34766,7 +34841,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34766
34841
|
return result;
|
|
34767
34842
|
}, "readThreadContext");
|
|
34768
34843
|
|
|
34769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34770
34845
|
var SEARCH_FILL_MS = 200;
|
|
34771
34846
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34772
34847
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34835,12 +34910,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34835
34910
|
}, "accountOf");
|
|
34836
34911
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34837
34912
|
|
|
34838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34839
34914
|
import { createHash as createHash10 } from "node:crypto";
|
|
34840
34915
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
34841
34916
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
34842
34917
|
|
|
34843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
34844
34919
|
var GROUP_SETTINGS = [
|
|
34845
34920
|
"allCanPin",
|
|
34846
34921
|
"onlyAdminsAdd",
|
|
@@ -34854,7 +34929,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
34854
34929
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
34855
34930
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
34856
34931
|
|
|
34857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34858
34933
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
34859
34934
|
var PICTURE_FLOOR = 0.25;
|
|
34860
34935
|
var PAGE4 = 50;
|
|
@@ -34871,7 +34946,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34871
34946
|
const directory2 = imageModelsDirectory(deps.env);
|
|
34872
34947
|
if (!isImageModelInstalled(model2, directory2))
|
|
34873
34948
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
34874
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34949
|
+
const { openPictureEmbedder } = await import("./embedder-SHPWEDIQ.js");
|
|
34875
34950
|
return openPictureEmbedder(model2, directory2);
|
|
34876
34951
|
}, "open");
|
|
34877
34952
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -35068,9 +35143,21 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
35068
35143
|
}, "search")
|
|
35069
35144
|
}), "withPictures");
|
|
35070
35145
|
|
|
35071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
35147
|
+
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
35148
|
+
try {
|
|
35149
|
+
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
35150
|
+
const root = validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: "text" })).root;
|
|
35151
|
+
return meaningWords(root) || plainWords(question);
|
|
35152
|
+
} catch (error) {
|
|
35153
|
+
if (error instanceof CliError)
|
|
35154
|
+
return plainWords(question);
|
|
35155
|
+
throw error;
|
|
35156
|
+
}
|
|
35157
|
+
}, "meaningText");
|
|
35072
35158
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
35073
|
-
const
|
|
35159
|
+
const model = chosenTextModel(deps.env).id;
|
|
35160
|
+
const target2 = embeddingTarget(deps, model);
|
|
35074
35161
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
35075
35162
|
skipped: { reason, model: target2.id, ...step ? { step } : {} }
|
|
35076
35163
|
}), "skipped");
|
|
@@ -35090,7 +35177,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35090
35177
|
}
|
|
35091
35178
|
if (ready.length === 0 && mail.size === 0)
|
|
35092
35179
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
35093
|
-
const words4 =
|
|
35180
|
+
const words4 = meaningText(question);
|
|
35094
35181
|
try {
|
|
35095
35182
|
const ranked = [];
|
|
35096
35183
|
if (words4) {
|
|
@@ -35120,7 +35207,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35120
35207
|
if (shared && !deps.embedders)
|
|
35121
35208
|
await lookUp(await shared.get(target2.key, () => target2.open()));
|
|
35122
35209
|
else
|
|
35123
|
-
await withEmbedder(deps, target2,
|
|
35210
|
+
await withEmbedder(deps, target2, model, {}, lookUp);
|
|
35124
35211
|
}
|
|
35125
35212
|
if (ranked.length === 0 && without.length === accounts.length)
|
|
35126
35213
|
return skipped("no message has a vector yet", "conversations.rebuild");
|
|
@@ -35136,7 +35223,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35136
35223
|
}
|
|
35137
35224
|
}, "meaningLane");
|
|
35138
35225
|
|
|
35139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
35140
35227
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
35141
35228
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
35142
35229
|
if (choice === "off")
|
|
@@ -35148,9 +35235,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35148
35235
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
35149
35236
|
try {
|
|
35150
35237
|
const warm = deps.embedders;
|
|
35151
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
35238
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-EIGF77RB.js")).openRerankerProcess(model, directory2, {
|
|
35152
35239
|
threads: defaultThreads()
|
|
35153
|
-
})) : await (await import("./rerank-
|
|
35240
|
+
})) : await (await import("./rerank-X7UWX2ZF.js")).openReranker(model, directory2);
|
|
35154
35241
|
return {
|
|
35155
35242
|
model: model.id,
|
|
35156
35243
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -35170,17 +35257,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35170
35257
|
};
|
|
35171
35258
|
}, "rerankLane");
|
|
35172
35259
|
|
|
35173
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
35174
35261
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
35175
35262
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
35176
35263
|
const directory2 = imageModelsDirectory(env);
|
|
35177
35264
|
if (!isImageModelInstalled(model, directory2))
|
|
35178
35265
|
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 });
|
|
35179
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
35266
|
+
const { openPictureEmbedder } = await import("./embedder-SHPWEDIQ.js");
|
|
35180
35267
|
return openPictureEmbedder(model, directory2);
|
|
35181
35268
|
}, "openPictureEmbedderFor");
|
|
35182
35269
|
|
|
35183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
35184
35271
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
35185
35272
|
const metadata = note2.frontMatter;
|
|
35186
35273
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
@@ -35195,7 +35282,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
35195
35282
|
};
|
|
35196
35283
|
}, "documentSource");
|
|
35197
35284
|
|
|
35198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
35199
35286
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
35200
35287
|
let root;
|
|
35201
35288
|
try {
|
|
@@ -35222,7 +35309,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
|
35222
35309
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
35223
35310
|
}, "titleTiers");
|
|
35224
35311
|
|
|
35225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
35226
35313
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
35227
35314
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
35228
35315
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35267,7 +35354,7 @@ var searchNotesQuery = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35267
35354
|
var NOTE_BATCH = 8;
|
|
35268
35355
|
var downloadHint = /* @__PURE__ */ __name((model, command) => command === void 0 ? `install it with a WireCat CLI that has \`models download\` (tg, max or wa); they share the model folder` : `\`${command} models download ${model}\``, "downloadHint");
|
|
35269
35356
|
var localModel = /* @__PURE__ */ __name((choice, env, command) => {
|
|
35270
|
-
const model = textModel(choice ??
|
|
35357
|
+
const model = textModel(choice ?? chosenTextModel(env).id, env);
|
|
35271
35358
|
const directory2 = textModelsDirectory(env);
|
|
35272
35359
|
if (!isTextModelInstalled(model, directory2))
|
|
35273
35360
|
throw new CliError("not_found", `${model.id} is not downloaded \u2014 ${downloadHint(model.id, command)}`, {
|
|
@@ -35649,7 +35736,8 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35649
35736
|
const held = [
|
|
35650
35737
|
{ provider: "notes", account: INTERNAL_NOTES },
|
|
35651
35738
|
...(await store.notes.folders()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
35652
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 }))
|
|
35739
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
35740
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [{ provider: "notes", account: added.id }] : [])
|
|
35653
35741
|
];
|
|
35654
35742
|
const named3 = list3 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list3, await listContextOf(store, account, app)), ["notes", "documents"], what);
|
|
35655
35743
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
@@ -35669,14 +35757,14 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35669
35757
|
};
|
|
35670
35758
|
}, "searchNotesOf");
|
|
35671
35759
|
|
|
35672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35673
35761
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35674
35762
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35675
35763
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
35676
35764
|
const held = await store.accounts.storedAccounts();
|
|
35677
35765
|
return held.filter((one2) => accounts.some(({ provider, account }) => one2.provider === provider && one2.account === account)).map(({ id: id2 }) => String(id2));
|
|
35678
35766
|
}, "accountIdsOf");
|
|
35679
|
-
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) =>
|
|
35767
|
+
var calendarAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.storedAccounts()).filter(({ provider }) => holdsKind(provider, "events")).map(({ provider, account }) => ({ provider, account })), "calendarAccounts");
|
|
35680
35768
|
var foundEvent = /* @__PURE__ */ __name((hit, query, foundBy) => ({
|
|
35681
35769
|
ref: hit.ref,
|
|
35682
35770
|
provider: hit.account?.provider ?? null,
|
|
@@ -35787,7 +35875,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35787
35875
|
};
|
|
35788
35876
|
}, "searchEvents");
|
|
35789
35877
|
|
|
35790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
35791
35879
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
35792
35880
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
35793
35881
|
const { reason, span } = error.details ?? {};
|
|
@@ -35813,7 +35901,18 @@ var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
|
35813
35901
|
})());
|
|
35814
35902
|
return { words: words4, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
35815
35903
|
}, "titleWords");
|
|
35816
|
-
var
|
|
35904
|
+
var strictWords = /* @__PURE__ */ __name((text2) => {
|
|
35905
|
+
try {
|
|
35906
|
+
const { words: words4, anyWord } = titleWords(text2);
|
|
35907
|
+
const unique = [...new Set(words4)];
|
|
35908
|
+
return anyWord || unique.length < 2 || unique.length > 8 || unique.some((word) => /\s/u.test(word)) ? [] : unique;
|
|
35909
|
+
} catch (error) {
|
|
35910
|
+
if (error instanceof CliError)
|
|
35911
|
+
return [];
|
|
35912
|
+
throw error;
|
|
35913
|
+
}
|
|
35914
|
+
}, "strictWords");
|
|
35915
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, "crm")), "crmAccounts");
|
|
35817
35916
|
var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger = {}, searchMessages = (query) => searchStore(store, account, query, messenger), meaning) => {
|
|
35818
35917
|
if (!asked.text.trim())
|
|
35819
35918
|
throw new CliError("validation_error", "say what to find");
|
|
@@ -35861,12 +35960,12 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
35861
35960
|
if (kind === "messages" && found.coverage)
|
|
35862
35961
|
coverage2 = found.coverage;
|
|
35863
35962
|
hasMore ||= found.hasMore;
|
|
35864
|
-
const read2 = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) =>
|
|
35963
|
+
const read2 = found.coverage?.accounts ?? given ?? (await store.accounts.accounts()).filter(({ provider }) => holdsKind(provider, kind));
|
|
35865
35964
|
for (const one2 of found.skipped ?? [])
|
|
35866
35965
|
if (!skipped.some(({ source }) => source === one2.source))
|
|
35867
35966
|
skipped.push(one2);
|
|
35868
35967
|
accounts.push(...read2.map(({ provider, account: account2 }) => ({ resource: kind, provider, account: account2 })));
|
|
35869
|
-
const
|
|
35968
|
+
const itemOf4 = /* @__PURE__ */ __name((hit, foundBy) => {
|
|
35870
35969
|
const at = parseLocator(hit.locator);
|
|
35871
35970
|
return {
|
|
35872
35971
|
kind: kind === "mail" ? "mail" : "message",
|
|
@@ -35883,14 +35982,14 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
35883
35982
|
foundBy
|
|
35884
35983
|
};
|
|
35885
35984
|
}, "itemOf");
|
|
35886
|
-
const byWords = found.items.map((hit) =>
|
|
35985
|
+
const byWords = found.items.map((hit) => itemOf4(hit, ["words"]));
|
|
35887
35986
|
if (!meaning || request.exact || kind === "messages" && request.backend === "server")
|
|
35888
35987
|
return byWords;
|
|
35889
35988
|
const filters = filtersBeside(request.text);
|
|
35890
35989
|
const lane = filters === void 0 ? {
|
|
35891
35990
|
skipped: {
|
|
35892
35991
|
reason: "the query uses NOT, or a filter under OR or in a group, which meaning cannot follow",
|
|
35893
|
-
model:
|
|
35992
|
+
model: chosenTextModel(request.env).id
|
|
35894
35993
|
}
|
|
35895
35994
|
} : await meaning(request.text, read2, embedders);
|
|
35896
35995
|
if ("skipped" in lane) {
|
|
@@ -35912,7 +36011,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
35912
36011
|
if (held && discovers)
|
|
35913
36012
|
held.score = Math.max(held.score, vote);
|
|
35914
36013
|
else
|
|
35915
|
-
fused2.set(hit.locator, { item: held?.item ??
|
|
36014
|
+
fused2.set(hit.locator, { item: held?.item ?? itemOf4(hit, ["meaning"]), score: (held?.score ?? 0) + vote });
|
|
35916
36015
|
});
|
|
35917
36016
|
return [...fused2.values()].sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
35918
36017
|
}, "messagesOf");
|
|
@@ -35954,7 +36053,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
35954
36053
|
const read2 = chosen?.map(({ account: account2 }) => account2) ?? [
|
|
35955
36054
|
INTERNAL_NOTES,
|
|
35956
36055
|
...(await store.notes.folders()).map(({ id: id2 }) => id2),
|
|
35957
|
-
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2)
|
|
36056
|
+
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => id2),
|
|
36057
|
+
...[await store.notes.addedAccount()].flatMap((added) => added ? [added.id] : [])
|
|
35958
36058
|
];
|
|
35959
36059
|
accounts.push(...read2.map((account2) => ({ resource, provider: "notes", account: account2 })));
|
|
35960
36060
|
} else if (resource === "events") {
|
|
@@ -36030,6 +36130,14 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
36030
36130
|
}
|
|
36031
36131
|
const ordered = oneList(lists, cosines);
|
|
36032
36132
|
const more = hasMore || ordered.length > window3;
|
|
36133
|
+
const { backend: _backend, server: _server, ...local } = asked;
|
|
36134
|
+
const unmatched = [];
|
|
36135
|
+
if (!ordered.length && !offset && !discover)
|
|
36136
|
+
for (const word of strictWords(request.text)) {
|
|
36137
|
+
const alone = await searchAll(store, account, { ...local, text: word, limit: 1, only: searched });
|
|
36138
|
+
if (!alone.items.length)
|
|
36139
|
+
unmatched.push(word);
|
|
36140
|
+
}
|
|
36033
36141
|
return {
|
|
36034
36142
|
query: asked.text,
|
|
36035
36143
|
items: ordered.slice(offset, window3),
|
|
@@ -36043,7 +36151,8 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
36043
36151
|
...by.messages === void 0 ? {} : { messages: by.messages },
|
|
36044
36152
|
...by.mail === void 0 ? {} : { mail: by.mail },
|
|
36045
36153
|
...server === void 0 ? {} : { server },
|
|
36046
|
-
...coverage2 === void 0 ? {} : { coverage: coverage2 }
|
|
36154
|
+
...coverage2 === void 0 ? {} : { coverage: coverage2 },
|
|
36155
|
+
...unmatched.length ? { unmatched } : {}
|
|
36047
36156
|
};
|
|
36048
36157
|
}, "searchAll");
|
|
36049
36158
|
var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
@@ -36055,10 +36164,11 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
36055
36164
|
place.set(item2.ref, { item: item2, rank });
|
|
36056
36165
|
});
|
|
36057
36166
|
const cosine = /* @__PURE__ */ __name((ref) => cosines.get(ref) ?? Number.NEGATIVE_INFINITY, "cosine");
|
|
36058
|
-
|
|
36167
|
+
const head = /* @__PURE__ */ __name((rank) => Math.min(rank, 1), "head");
|
|
36168
|
+
return [...place.values()].sort((a, b) => head(a.rank) - head(b.rank) || cosine(b.item.ref) - cosine(a.item.ref) || a.rank - b.rank).map(({ item: item2 }) => item2);
|
|
36059
36169
|
}, "oneList");
|
|
36060
36170
|
|
|
36061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
36062
36172
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
36063
36173
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
36064
36174
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -36283,7 +36393,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
36283
36393
|
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
36284
36394
|
const { skipped } = fitting(entries, only, "search all", (kind) => `--only leaves ${kind} out`);
|
|
36285
36395
|
const named3 = /* @__PURE__ */ __name((resource) => [
|
|
36286
|
-
...new Map(entries.flatMap(({ accounts }) => accounts).filter((
|
|
36396
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one2) => listedHolds(one2, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
36287
36397
|
], "named");
|
|
36288
36398
|
const meetings = await holdingMeetings(store, named3("meetings"));
|
|
36289
36399
|
const empty2 = named3("meetings").filter((one2) => !meetings.some(({ provider, account: account2 }) => provider === one2.provider && account2 === one2.account)).map(({ provider, account: account2 }) => ({
|
|
@@ -36312,7 +36422,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
36312
36422
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
36313
36423
|
}, "searchAllOfSource");
|
|
36314
36424
|
|
|
36315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36316
36426
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36317
36427
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36318
36428
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36501,7 +36611,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36501
36611
|
return { report, sources };
|
|
36502
36612
|
}, "searchServer");
|
|
36503
36613
|
|
|
36504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36614
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36505
36615
|
var DELETE_AT_ONCE = 10;
|
|
36506
36616
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36507
36617
|
const files = fileLinks(attachments);
|
|
@@ -36942,7 +37052,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
36942
37052
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
36943
37053
|
}, "checkMediaOptions");
|
|
36944
37054
|
|
|
36945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37055
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
36946
37056
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
36947
37057
|
var RULES = {
|
|
36948
37058
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -36957,7 +37067,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
36957
37067
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
36958
37068
|
}), "classifyChannel");
|
|
36959
37069
|
|
|
36960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
36961
37071
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
36962
37072
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
36963
37073
|
const store = await deps.store();
|
|
@@ -37043,7 +37153,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
37043
37153
|
};
|
|
37044
37154
|
}, "metadataService");
|
|
37045
37155
|
|
|
37046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
37047
37157
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
37048
37158
|
var LINK2 = /https?:\/\/\S+/i;
|
|
37049
37159
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -37231,7 +37341,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
37231
37341
|
}, "nextPoint");
|
|
37232
37342
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
37233
37343
|
|
|
37234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
37235
37345
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
37236
37346
|
import { join as join11 } from "node:path";
|
|
37237
37347
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -37374,7 +37484,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
37374
37484
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
37375
37485
|
}, "assign");
|
|
37376
37486
|
|
|
37377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37378
37488
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37379
37489
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
37380
37490
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -37411,7 +37521,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
37411
37521
|
return { chatId, rows, notes };
|
|
37412
37522
|
}, "moderateWith");
|
|
37413
37523
|
|
|
37414
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37415
37525
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37416
37526
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37417
37527
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37489,7 +37599,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37489
37599
|
}, "removePerson")
|
|
37490
37600
|
}), "moderatorOf");
|
|
37491
37601
|
|
|
37492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37493
37603
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
37494
37604
|
id: note2.id,
|
|
37495
37605
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -37533,7 +37643,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37533
37643
|
};
|
|
37534
37644
|
}, "privatePeopleService");
|
|
37535
37645
|
|
|
37536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37537
37647
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37538
37648
|
total: 0,
|
|
37539
37649
|
population: 0,
|
|
@@ -37789,7 +37899,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37789
37899
|
}, "evidence")
|
|
37790
37900
|
}), "rankingsService");
|
|
37791
37901
|
|
|
37792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37793
37903
|
var FIELDS = ["date", "chat", "kind"];
|
|
37794
37904
|
var WAITING_TAIL = 100;
|
|
37795
37905
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37916,7 +38026,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37916
38026
|
};
|
|
37917
38027
|
}, "replyStatsService");
|
|
37918
38028
|
|
|
37919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37920
38030
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
37921
38031
|
id: one2.id,
|
|
37922
38032
|
name: one2.name,
|
|
@@ -38045,7 +38155,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
38045
38155
|
};
|
|
38046
38156
|
}, "searchesService");
|
|
38047
38157
|
|
|
38048
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38158
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
38049
38159
|
var TAGGING_QUERY = {
|
|
38050
38160
|
entity: "tagging",
|
|
38051
38161
|
backend: "sql",
|
|
@@ -38129,7 +38239,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38129
38239
|
};
|
|
38130
38240
|
}, "tagsService");
|
|
38131
38241
|
|
|
38132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38133
38243
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38134
38244
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
38135
38245
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38328,7 +38438,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38328
38438
|
};
|
|
38329
38439
|
}, "topicsService");
|
|
38330
38440
|
|
|
38331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38441
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38332
38442
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
38333
38443
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38334
38444
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38402,7 +38512,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38402
38512
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
38403
38513
|
}, "prepareEvidencePacket");
|
|
38404
38514
|
|
|
38405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38406
38516
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38407
38517
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38408
38518
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38422,7 +38532,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38422
38532
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38423
38533
|
}, "readEvidencePacket");
|
|
38424
38534
|
|
|
38425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
38426
38536
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
38427
38537
|
let before2 = Number.POSITIVE_INFINITY;
|
|
38428
38538
|
for (; ; ) {
|
|
@@ -38484,7 +38594,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
38484
38594
|
return { ...result, selection };
|
|
38485
38595
|
}, "searchMeetingHits");
|
|
38486
38596
|
|
|
38487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38488
38598
|
import { createHash as createHash12 } from "node:crypto";
|
|
38489
38599
|
var scopeKeys = [
|
|
38490
38600
|
"accountId",
|
|
@@ -38619,8 +38729,139 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
38619
38729
|
};
|
|
38620
38730
|
}, "readMeetingProjectDiscovery");
|
|
38621
38731
|
|
|
38622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38732
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
38623
38733
|
import { createHash as createHash13 } from "node:crypto";
|
|
38734
|
+
import { existsSync as existsSync3 } from "node:fs";
|
|
38735
|
+
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
38736
|
+
const model = textModel(id2, env);
|
|
38737
|
+
if (!isTextModelInstalled(model, textModelsDirectory(env)))
|
|
38738
|
+
throw new CliError("not_found", `${model.id} is not downloaded \u2014 \`${command} models download ${model.id}${model.terms ? " --accept-terms" : ""}\` first`, { reason: "model.not-downloaded", model: model.id });
|
|
38739
|
+
const previous = chosenTextModel(env).id;
|
|
38740
|
+
const before2 = textModels(env).find((one2) => one2.id === previous);
|
|
38741
|
+
const toEmbed = previous === model.id ? 0 : before2 ? await missingVectors(before2, model, env) : null;
|
|
38742
|
+
writeTextModelsSection({ ...readTextModelsSection(env), use: model.id }, env);
|
|
38743
|
+
return {
|
|
38744
|
+
model,
|
|
38745
|
+
previous,
|
|
38746
|
+
toEmbed,
|
|
38747
|
+
estimateSeconds: toEmbed === null || model.chunksPerSecond === void 0 ? null : Math.ceil(toEmbed / model.chunksPerSecond)
|
|
38748
|
+
};
|
|
38749
|
+
}, "useTextModel");
|
|
38750
|
+
var missingVectors = /* @__PURE__ */ __name(async (from, to, env) => {
|
|
38751
|
+
if (!existsSync3(storePath(env)))
|
|
38752
|
+
return null;
|
|
38753
|
+
try {
|
|
38754
|
+
const store = await openStore({ env });
|
|
38755
|
+
try {
|
|
38756
|
+
const counts = await store.vectors.vectorCounts([vectorModelKey(from), vectorModelKey(to)]);
|
|
38757
|
+
return Math.max(0, (counts.get(vectorModelKey(from)) ?? 0) - (counts.get(vectorModelKey(to)) ?? 0));
|
|
38758
|
+
} finally {
|
|
38759
|
+
await store.close();
|
|
38760
|
+
}
|
|
38761
|
+
} catch {
|
|
38762
|
+
return null;
|
|
38763
|
+
}
|
|
38764
|
+
}, "missingVectors");
|
|
38765
|
+
var CustomModelRequest = strictObject({
|
|
38766
|
+
/** A Hugging Face repository, `owner/name`. */
|
|
38767
|
+
repository: pipe(string(), regex(/^[\w.-]+\/[\w.-]+$/, "is not a Hugging Face repository, owner/name")),
|
|
38768
|
+
/** A branch, tag or commit; pinned to the commit it names now. */
|
|
38769
|
+
revision: optional(pipe(string(), minLength(1), maxLength(200))),
|
|
38770
|
+
onnx: string(),
|
|
38771
|
+
externalData: optional(string()),
|
|
38772
|
+
dims: number(),
|
|
38773
|
+
pooling: picklist(["mean", "sentence_embedding"]),
|
|
38774
|
+
prefix: strictObject({ query: string(), passage: string() }),
|
|
38775
|
+
maxTokens: optional(number()),
|
|
38776
|
+
title: optional(string()),
|
|
38777
|
+
languages: optional(string()),
|
|
38778
|
+
licence: optional(string()),
|
|
38779
|
+
chunksPerSecond: optional(number())
|
|
38780
|
+
});
|
|
38781
|
+
var invalid5 = /* @__PURE__ */ __name((what, issues) => {
|
|
38782
|
+
const at = getDotPath(issues[0]);
|
|
38783
|
+
return new CliError("validation_error", `${what}${at ? ` ${at}` : ""} ${issues[0].message}`);
|
|
38784
|
+
}, "invalid");
|
|
38785
|
+
var HUB = "https://huggingface.co";
|
|
38786
|
+
var SMALL_FILE_MOST = 2e7;
|
|
38787
|
+
var hubJson = /* @__PURE__ */ __name(async (get, url) => {
|
|
38788
|
+
const response = await get(url);
|
|
38789
|
+
if (!response.ok) {
|
|
38790
|
+
await response.body?.cancel();
|
|
38791
|
+
throw new CliError(response.status === 404 || response.status === 401 ? "not_found" : "network_error", `Hugging Face answered HTTP ${response.status} for ${url}`);
|
|
38792
|
+
}
|
|
38793
|
+
return response.json();
|
|
38794
|
+
}, "hubJson");
|
|
38795
|
+
var Revision = object({ sha: pipe(string(), regex(/^[0-9a-f]{40}$/)), cardData: optional(unknown()) });
|
|
38796
|
+
var Tree = array(object({
|
|
38797
|
+
path: string(),
|
|
38798
|
+
type: optional(string()),
|
|
38799
|
+
size: optional(number()),
|
|
38800
|
+
lfs: optional(object({ oid: string(), size: optional(number()) }))
|
|
38801
|
+
}));
|
|
38802
|
+
var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetch: get = fetch }) => {
|
|
38803
|
+
const given = safeParse(CustomModelRequest, payload);
|
|
38804
|
+
if (!given.success)
|
|
38805
|
+
throw invalid5("--payload", given.issues);
|
|
38806
|
+
const request = given.output;
|
|
38807
|
+
const revision = safeParse(Revision, await hubJson(get, `${HUB}/api/models/${request.repository}/revision/${encodeURIComponent(request.revision ?? "main")}`));
|
|
38808
|
+
if (!revision.success)
|
|
38809
|
+
throw new CliError("invalid_response", "Hugging Face gave no commit for that revision");
|
|
38810
|
+
const commit = revision.output.sha;
|
|
38811
|
+
const names2 = [
|
|
38812
|
+
...new Set([request.onnx, request.externalData, "tokenizer.json", "tokenizer_config.json"].filter(Boolean))
|
|
38813
|
+
];
|
|
38814
|
+
const folders = [...new Set(names2.map((name) => name.split("/").slice(0, -1).join("/")))];
|
|
38815
|
+
const listed2 = /* @__PURE__ */ new Map();
|
|
38816
|
+
for (const folder of folders) {
|
|
38817
|
+
const tree = safeParse(Tree, await hubJson(get, `${HUB}/api/models/${request.repository}/tree/${commit}${folder ? `/${folder}` : ""}`));
|
|
38818
|
+
if (!tree.success)
|
|
38819
|
+
throw new CliError("invalid_response", "Hugging Face gave an unreadable file list");
|
|
38820
|
+
for (const entry of tree.output)
|
|
38821
|
+
listed2.set(entry.path, entry);
|
|
38822
|
+
}
|
|
38823
|
+
const url = /* @__PURE__ */ __name((name) => `${HUB}/${request.repository}/resolve/${commit}/${name}`, "url");
|
|
38824
|
+
const files = [];
|
|
38825
|
+
for (const name of names2) {
|
|
38826
|
+
const entry = listed2.get(name);
|
|
38827
|
+
if (!entry)
|
|
38828
|
+
throw new CliError("not_found", `${request.repository} has no ${name} at ${commit.slice(0, 12)}`);
|
|
38829
|
+
if (entry.lfs) {
|
|
38830
|
+
files.push({ name, url: url(name), sha256: entry.lfs.oid, bytes: entry.lfs.size ?? entry.size ?? 0 });
|
|
38831
|
+
continue;
|
|
38832
|
+
}
|
|
38833
|
+
if ((entry.size ?? 0) > SMALL_FILE_MOST)
|
|
38834
|
+
throw new CliError("invalid_response", `${name} is large and not in LFS, so it has no sha256 to pin`);
|
|
38835
|
+
const response = await get(url(name));
|
|
38836
|
+
if (!response.ok)
|
|
38837
|
+
throw new CliError("network_error", `${name} could not be downloaded: HTTP ${response.status}`);
|
|
38838
|
+
const bytes2 = Buffer.from(await response.arrayBuffer());
|
|
38839
|
+
files.push({ name, url: url(name), sha256: createHash13("sha256").update(bytes2).digest("hex"), bytes: bytes2.length });
|
|
38840
|
+
}
|
|
38841
|
+
const card = revision.output.cardData;
|
|
38842
|
+
const checked2 = safeParse(CustomTextModelShape, {
|
|
38843
|
+
id: id2,
|
|
38844
|
+
title: request.title ?? `${request.repository} (${request.onnx})`,
|
|
38845
|
+
languages: request.languages ?? "as the model card says",
|
|
38846
|
+
licence: request.licence ?? (typeof card?.license === "string" ? card.license : `unknown \u2014 read ${HUB}/${request.repository}`),
|
|
38847
|
+
dims: request.dims,
|
|
38848
|
+
maxTokens: request.maxTokens ?? 512,
|
|
38849
|
+
...request.chunksPerSecond === void 0 ? {} : { chunksPerSecond: request.chunksPerSecond },
|
|
38850
|
+
pooling: request.pooling,
|
|
38851
|
+
prefix: request.prefix,
|
|
38852
|
+
onnx: request.onnx,
|
|
38853
|
+
...request.externalData ? { externalData: request.externalData } : {},
|
|
38854
|
+
files
|
|
38855
|
+
});
|
|
38856
|
+
if (!checked2.success)
|
|
38857
|
+
throw invalid5("the model", checked2.issues);
|
|
38858
|
+
const section = readTextModelsSection(env);
|
|
38859
|
+
writeTextModelsSection({ ...section, custom: [...(section.custom ?? []).filter((one2) => one2.id !== id2), checked2.output] }, env);
|
|
38860
|
+
return { ...checked2.output, custom: true };
|
|
38861
|
+
}, "addCustomTextModel");
|
|
38862
|
+
|
|
38863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
38864
|
+
import { createHash as createHash14 } from "node:crypto";
|
|
38624
38865
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
38625
38866
|
ref: cue.reference,
|
|
38626
38867
|
fingerprint: cue.fingerprint,
|
|
@@ -38734,10 +38975,10 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
38734
38975
|
},
|
|
38735
38976
|
items: picked
|
|
38736
38977
|
};
|
|
38737
|
-
return { ...packet, fingerprint:
|
|
38978
|
+
return { ...packet, fingerprint: createHash14("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
38738
38979
|
}, "readMeetingHitContext");
|
|
38739
38980
|
|
|
38740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
38741
38982
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
38742
38983
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
38743
38984
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -38813,7 +39054,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
38813
39054
|
return { packet, content };
|
|
38814
39055
|
}, "readMeetingPassage");
|
|
38815
39056
|
|
|
38816
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
38817
39058
|
var communicationFields = {
|
|
38818
39059
|
sources: pipe(array(strictObject({
|
|
38819
39060
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -38845,7 +39086,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
38845
39086
|
return { ...input, after, before: before2 };
|
|
38846
39087
|
}, "communicationRequest");
|
|
38847
39088
|
|
|
38848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
38849
39090
|
var MEETING_PREPARATION_LIMITS = {
|
|
38850
39091
|
meetings: { min: 1, max: 20, default: 5 },
|
|
38851
39092
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -38931,7 +39172,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
38931
39172
|
return { ...input, history };
|
|
38932
39173
|
}, "preparationRequest");
|
|
38933
39174
|
|
|
38934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39175
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
38935
39176
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
38936
39177
|
const section = {
|
|
38937
39178
|
readUsage: plan.reader.usage(),
|
|
@@ -39036,7 +39277,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
39036
39277
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
39037
39278
|
}, "appendPreparationCommunications");
|
|
39038
39279
|
|
|
39039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
39040
39281
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
39041
39282
|
if (port === void 0)
|
|
39042
39283
|
return void 0;
|
|
@@ -39141,13 +39382,13 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
39141
39382
|
}
|
|
39142
39383
|
}, "validatePreparationCommunications");
|
|
39143
39384
|
|
|
39144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39145
|
-
var
|
|
39385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
39386
|
+
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
39146
39387
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
39147
39388
|
}, "invalid");
|
|
39148
39389
|
var factOf = /* @__PURE__ */ __name((fact, before2) => {
|
|
39149
39390
|
if (!fact || typeof fact.ref !== "string" || !/^fact:[1-9]\d*$/.test(fact.ref) || !["fact", "statement", "question", "decision", "promise"].includes(fact.type) || typeof fact.statement !== "string" || !fact.statement.trim() || fact.subject !== null && (typeof fact.subject !== "string" || !/^(person|project):[1-9]\d*$/.test(fact.subject)) || fact.project !== null && (typeof fact.project !== "string" || !/^project:[1-9]\d*$/.test(fact.project)) || !Number.isSafeInteger(fact.updatedAt) || Math.abs(fact.updatedAt) > 864e13 || fact.updatedAt > before2 || typeof fact.sharedPerson !== "boolean" || typeof fact.sharedProject !== "boolean" || !(fact.sharedPerson || fact.sharedProject) || fact.sharedPerson && !fact.subject?.startsWith("person:") || fact.sharedProject && !fact.project && !fact.subject?.startsWith("project:"))
|
|
39150
|
-
return
|
|
39391
|
+
return invalid6();
|
|
39151
39392
|
return {
|
|
39152
39393
|
ref: fact.ref,
|
|
39153
39394
|
type: fact.type,
|
|
@@ -39175,13 +39416,13 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
39175
39416
|
});
|
|
39176
39417
|
preparationCancelled(input.signal);
|
|
39177
39418
|
if (!page || !Array.isArray(page.items) || page.items.length > limit || typeof page.hasMore !== "boolean")
|
|
39178
|
-
return
|
|
39419
|
+
return invalid6();
|
|
39179
39420
|
const items = page.items.map((fact) => factOf(fact, input.after));
|
|
39180
39421
|
if (new Set(items.map((fact) => fact.ref)).size !== items.length)
|
|
39181
|
-
return
|
|
39422
|
+
return invalid6();
|
|
39182
39423
|
const readBytes = items.reduce((total, fact) => total + Buffer.byteLength(fact.statement + fact.type, "utf8"), 0);
|
|
39183
39424
|
if (readBytes > input.maxReadBytes)
|
|
39184
|
-
return
|
|
39425
|
+
return invalid6();
|
|
39185
39426
|
const knowledge = {
|
|
39186
39427
|
anchors: result.items.map((item2) => item2.reference),
|
|
39187
39428
|
items: [],
|
|
@@ -39210,13 +39451,13 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
39210
39451
|
}
|
|
39211
39452
|
}, "appendKnowledgePreparation");
|
|
39212
39453
|
|
|
39213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39214
|
-
var
|
|
39454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
39455
|
+
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
39215
39456
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
39216
39457
|
}, "invalid");
|
|
39217
39458
|
var noteOf = /* @__PURE__ */ __name((note2, before2, anchors) => {
|
|
39218
39459
|
if (!note2 || typeof note2.ref !== "string" || !/^note:[1-9]\d*$/.test(note2.ref) || note2.title !== null && typeof note2.title !== "string" || typeof note2.text !== "string" || !note2.text.trim() || !Number.isSafeInteger(note2.revision) || note2.revision < 1 || !Number.isSafeInteger(note2.updatedAt) || Math.abs(note2.updatedAt) > 864e13 || note2.updatedAt > before2 || note2.person !== null && (typeof note2.person !== "string" || !/^person:[1-9]\d*$/.test(note2.person)) || note2.project !== null && (typeof note2.project !== "string" || !/^project:[1-9]\d*$/.test(note2.project)) || note2.meeting !== void 0 && note2.meeting !== null && !anchors.has(note2.meeting) || !(note2.person || note2.project || note2.meeting))
|
|
39219
|
-
return
|
|
39460
|
+
return invalid7();
|
|
39220
39461
|
return {
|
|
39221
39462
|
ref: note2.ref,
|
|
39222
39463
|
title: note2.title,
|
|
@@ -39244,18 +39485,18 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
39244
39485
|
});
|
|
39245
39486
|
preparationCancelled(input.signal);
|
|
39246
39487
|
if (!page || !Array.isArray(page.items) || page.items.length > limit || typeof page.hasMore !== "boolean")
|
|
39247
|
-
return
|
|
39488
|
+
return invalid7();
|
|
39248
39489
|
const selection = page.selection === void 0 ? "owner-written-global-person/project-notes" : page.selection;
|
|
39249
39490
|
if (!["owner-written-global-person/project-notes", "owner-written-meeting/person/project-notes"].includes(selection))
|
|
39250
|
-
return
|
|
39491
|
+
return invalid7();
|
|
39251
39492
|
const anchors = new Set(result.items.map((item2) => item2.reference));
|
|
39252
39493
|
const items = page.items.map((note2) => noteOf(note2, input.after, anchors));
|
|
39253
39494
|
if (items.some((note2) => note2.meeting) && selection !== "owner-written-meeting/person/project-notes")
|
|
39254
|
-
return
|
|
39495
|
+
return invalid7();
|
|
39255
39496
|
if (new Set(items.map((note2) => note2.ref)).size !== items.length)
|
|
39256
|
-
return
|
|
39497
|
+
return invalid7();
|
|
39257
39498
|
if (items.reduce((total, note2) => total + Buffer.byteLength((note2.title ?? "") + note2.text, "utf8"), 0) > input.maxReadBytes)
|
|
39258
|
-
return
|
|
39499
|
+
return invalid7();
|
|
39259
39500
|
const notes = {
|
|
39260
39501
|
anchors: result.items.map((item2) => item2.reference),
|
|
39261
39502
|
items: [],
|
|
@@ -39284,7 +39525,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
39284
39525
|
}
|
|
39285
39526
|
}, "appendNotesPreparation");
|
|
39286
39527
|
|
|
39287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
39288
39529
|
var PAGE_LIMIT = 4;
|
|
39289
39530
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39290
39531
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -39334,7 +39575,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
39334
39575
|
}
|
|
39335
39576
|
}, "appendProjectPreparation");
|
|
39336
39577
|
|
|
39337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
39338
39579
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
39339
39580
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
39340
39581
|
return;
|
|
@@ -39406,7 +39647,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
39406
39647
|
}
|
|
39407
39648
|
}, "appendRelatedPreparation");
|
|
39408
39649
|
|
|
39409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
39410
39651
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39411
39652
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
39412
39653
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -39544,7 +39785,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
39544
39785
|
};
|
|
39545
39786
|
}, "createMeetingPreparationService");
|
|
39546
39787
|
|
|
39547
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
39548
39789
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
39549
39790
|
const installer = ports.installer();
|
|
39550
39791
|
const argv = updateCommand(installer, packageName);
|
|
@@ -39609,7 +39850,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
39609
39850
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
39610
39851
|
}, "dayAfter");
|
|
39611
39852
|
|
|
39612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39613
39854
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39614
39855
|
const pictures = picturesService(deps);
|
|
39615
39856
|
const base = {
|
|
@@ -39646,8 +39887,8 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
39646
39887
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
39647
39888
|
}, "servicesFor");
|
|
39648
39889
|
|
|
39649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39650
|
-
import { createHash as
|
|
39890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
39891
|
+
import { createHash as createHash15 } from "node:crypto";
|
|
39651
39892
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
39652
39893
|
import { createConnection, createServer } from "node:net";
|
|
39653
39894
|
import { tmpdir } from "node:os";
|
|
@@ -39668,7 +39909,7 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
|
|
|
39668
39909
|
const beside = lockPath.replace(/\.lock$/, ".sock");
|
|
39669
39910
|
if (beside.length <= MAX_SOCKET_PATH)
|
|
39670
39911
|
return beside;
|
|
39671
|
-
const hash3 =
|
|
39912
|
+
const hash3 = createHash15("sha256").update(beside).digest("hex").slice(0, 16);
|
|
39672
39913
|
const name = join12(`wirecat-relay-${process.getuid?.() ?? "user"}`, `${hash3}.sock`);
|
|
39673
39914
|
const temporary = join12(tmpdir(), name);
|
|
39674
39915
|
if (temporary.length <= MAX_SOCKET_PATH || process.platform === "win32")
|
|
@@ -39794,7 +40035,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
39794
40035
|
}
|
|
39795
40036
|
}, "serve");
|
|
39796
40037
|
|
|
39797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.609.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_cc90521890eb0d504a7d45d35f643969/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
39798
40039
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
39799
40040
|
close: /* @__PURE__ */ __name(async () => {
|
|
39800
40041
|
}, "close"),
|
|
@@ -39941,6 +40182,8 @@ export {
|
|
|
39941
40182
|
AGENDA_QUERY,
|
|
39942
40183
|
agendaItem,
|
|
39943
40184
|
excerpt,
|
|
40185
|
+
previewProjectAnnotationSnapshot,
|
|
40186
|
+
snapshotProjectAnnotations,
|
|
39944
40187
|
ingest,
|
|
39945
40188
|
BUILT_IN_PURPOSES,
|
|
39946
40189
|
purposesOf,
|
|
@@ -40031,8 +40274,6 @@ export {
|
|
|
40031
40274
|
withoutPhone,
|
|
40032
40275
|
savedSearchItem,
|
|
40033
40276
|
TAGGING_QUERY,
|
|
40034
|
-
previewProjectAnnotationSnapshot,
|
|
40035
|
-
snapshotProjectAnnotations,
|
|
40036
40277
|
TASK_STATS_BY,
|
|
40037
40278
|
TASK_QUERY,
|
|
40038
40279
|
TASK_STATS_QUERY,
|
|
@@ -40045,6 +40286,8 @@ export {
|
|
|
40045
40286
|
taskView,
|
|
40046
40287
|
readEvidencePacket,
|
|
40047
40288
|
searchMeetingHits,
|
|
40289
|
+
useTextModel,
|
|
40290
|
+
addCustomTextModel,
|
|
40048
40291
|
readMeetingPassage,
|
|
40049
40292
|
communicationFields,
|
|
40050
40293
|
MEETING_PREPARATION_LIMITS,
|