@wirecat/cli-memo 0.131.20 → 0.131.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/actions/command.d.ts +1 -1
- package/dist/actions/command.d.ts.map +1 -1
- package/dist/actions/command.js +12 -1
- package/dist/actions/command.js.map +1 -1
- package/dist/bin/memo.js +2 -2
- package/dist/bin/memo.js.map +1 -1
- package/dist/bundle/{all-profiles-MVF2XGZK.js → all-profiles-EZLU6CY7.js} +9 -7
- package/dist/bundle/{anthropic-OPFHMF2S.js → anthropic-XC34PJH5.js} +6 -4
- package/dist/bundle/{app-server-VHVC55S3.js → app-server-PRQVGA5X.js} +53 -48
- package/dist/bundle/auto-S3AYMAGB.js +86 -0
- package/dist/bundle/{bun-P6TMDZGU.js → bun-CKGKUKW5.js} +2 -2
- package/dist/bundle/{bun-sqlite-3G3NLK4O.js → bun-sqlite-S6KUSMTC.js} +5 -3
- package/dist/bundle/{chunk-XZWUBDBG.js → chunk-2NJUPIAO.js} +1 -1
- package/dist/bundle/{chunk-RFB5LOYR.js → chunk-2TBIVKBH.js} +8 -6
- package/dist/bundle/{chunk-LQJ4KHXK.js → chunk-3B645KUY.js} +15 -15
- package/dist/bundle/{chunk-3DVKC2XM.js → chunk-3V4WIGWC.js} +8 -19
- package/dist/bundle/{chunk-3BMUVKC7.js → chunk-4SGCOUQ6.js} +13 -9
- package/dist/bundle/{chunk-BMHSGZNE.js → chunk-5RBLNI6C.js} +4 -4
- package/dist/bundle/{chunk-D6G23NFJ.js → chunk-5UOOH7VG.js} +2 -2
- package/dist/bundle/{chunk-WOIRWVDJ.js → chunk-6JOT5KWM.js} +563 -351
- package/dist/bundle/{chunk-LKYHSVQL.js → chunk-7F6FGMCC.js} +8 -8
- package/dist/bundle/{chunk-FMSA2X3E.js → chunk-7MLWSUEK.js} +1 -1
- package/dist/bundle/{chunk-JHKTN6NL.js → chunk-7W3RCCRR.js} +13 -11
- package/dist/bundle/{chunk-SO6VNTF6.js → chunk-AIIQ7YU4.js} +1 -1
- package/dist/bundle/{chunk-IW3U6XXI.js → chunk-BB2MGFOZ.js} +6 -6
- package/dist/bundle/{chunk-TQNQS6TR.js → chunk-CBYZW5CC.js} +64 -60
- package/dist/bundle/chunk-CCHHEMPM.js +71 -0
- package/dist/bundle/{chunk-6DG7VK3H.js → chunk-CCOYC6HL.js} +5 -5
- package/dist/bundle/{chunk-MXP4J6BJ.js → chunk-CDZZ2DZO.js} +70 -2517
- package/dist/bundle/{chunk-VUWUSGSN.js → chunk-CP5N3KH3.js} +4 -4
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-BINR6MJ5.js → chunk-DNGHE2Q4.js} +1 -1
- package/dist/bundle/{chunk-KVVDRD7M.js → chunk-DZSWKA3K.js} +2 -2
- package/dist/bundle/{chunk-63XICXGM.js → chunk-E5FQ7U7L.js} +5 -3
- package/dist/bundle/chunk-EG2OMKWH.js +2423 -0
- package/dist/bundle/chunk-EW3XTUPB.js +166 -0
- package/dist/bundle/{chunk-3ORDQ62F.js → chunk-GV2FSWFS.js} +10 -8
- package/dist/bundle/{chunk-2R25UBIH.js → chunk-HXRIV2TV.js} +26 -24
- package/dist/bundle/{chunk-BPYQYZXA.js → chunk-IFWBFYXN.js} +14 -12
- package/dist/bundle/{chunk-4G46QFK5.js → chunk-ILC7NFS2.js} +7 -5
- package/dist/bundle/chunk-ILHTNOIV.js +23 -0
- package/dist/bundle/{chunk-OVFMY6ZP.js → chunk-IRDGD3QQ.js} +1 -1
- package/dist/bundle/{chunk-G7TF4E7B.js → chunk-J35OGOCI.js} +8 -2
- package/dist/bundle/{chunk-5KUPVC5M.js → chunk-KUNA6MQZ.js} +2 -2
- package/dist/bundle/{chunk-VQGVPDMH.js → chunk-KXERKAID.js} +20 -16
- package/dist/bundle/{chunk-LDVU22MF.js → chunk-LGNS4JVK.js} +8 -8
- package/dist/bundle/{chunk-57Q6NXQT.js → chunk-LR5EY5JY.js} +4 -4
- package/dist/bundle/{chunk-ZYM4M62Q.js → chunk-MCPDL5YU.js} +4 -4
- package/dist/bundle/{chunk-V7DZG62U.js → chunk-MHDLZCEO.js} +11 -9
- package/dist/bundle/{chunk-SHDZVM3B.js → chunk-NELE7AIX.js} +2 -2
- package/dist/bundle/{chunk-KIEBEYKH.js → chunk-OFYKXQMS.js} +10 -8
- package/dist/bundle/{chunk-UC4IL2P7.js → chunk-OJRLTJRS.js} +1 -1
- package/dist/bundle/{chunk-OTHEM74Z.js → chunk-OUF6RCRZ.js} +6 -6
- package/dist/bundle/{chunk-JDJDNMCP.js → chunk-PF3ALSAV.js} +1 -1
- package/dist/bundle/chunk-PQLBPYJR.js +46 -0
- package/dist/bundle/{chunk-66YZUX2C.js → chunk-QMMUPDRK.js} +10 -10
- package/dist/bundle/{chunk-F5CQ2NVA.js → chunk-RC7TIYUZ.js} +11 -9
- package/dist/bundle/{chunk-P22V2OLJ.js → chunk-RG6ITTLQ.js} +22 -16
- package/dist/bundle/{chunk-T557KUST.js → chunk-RHJC4PHV.js} +3 -3
- package/dist/bundle/{chunk-Z54GPSVH.js → chunk-RNXYDBQO.js} +186 -162
- package/dist/bundle/{chunk-YVECM7XA.js → chunk-SMDWUPXE.js} +4 -4
- package/dist/bundle/{chunk-WRPRPVZF.js → chunk-SO2YVKBK.js} +44 -42
- package/dist/bundle/{chunk-KO455254.js → chunk-SXGAIQ5X.js} +13 -13
- package/dist/bundle/{chunk-EMKFG5BP.js → chunk-THGFFQCK.js} +3 -3
- package/dist/bundle/{chunk-FRB4UXJG.js → chunk-UCINAEIA.js} +6 -6
- package/dist/bundle/{chunk-GJKM32WA.js → chunk-UG2V7BQY.js} +24 -22
- package/dist/bundle/{chunk-2MNEM2CH.js → chunk-VDBFSLHP.js} +9 -7
- package/dist/bundle/{chunk-EFKEG2BA.js → chunk-VECICKTE.js} +5 -5
- package/dist/bundle/{chunk-4MIPN37I.js → chunk-VQM3H422.js} +266 -176
- package/dist/bundle/chunk-VXHN3SWW.js +35 -0
- package/dist/bundle/{chunk-EL4ZKQUN.js → chunk-WEOFWTWZ.js} +6 -4
- package/dist/bundle/{chunk-LEUNYKL6.js → chunk-WUCQ56RP.js} +3 -3
- package/dist/bundle/{chunk-SJLVBJ2L.js → chunk-XA6YO24S.js} +2 -2
- package/dist/bundle/{chunk-36ULPM2W.js → chunk-XPRYBLTS.js} +6 -6
- package/dist/bundle/{chunk-NKTAEBCU.js → chunk-XW4KGSAA.js} +13 -9
- package/dist/bundle/{chunk-2KOVYXWK.js → chunk-YAUDFROV.js} +1243 -743
- package/dist/bundle/{chunk-5XDYV2YT.js → chunk-ZD3STMY7.js} +1 -1
- package/dist/bundle/{chunk-XWS4PTES.js → chunk-ZKWE5MCA.js} +968 -287
- package/dist/bundle/command-contract-TMVGYSQQ.js +32 -0
- package/dist/bundle/{decode-BUTF6VGO.js → decode-6XSZIZAA.js} +5 -3
- package/dist/bundle/dispatch-VUMQPYMA.js +411 -0
- package/dist/bundle/{echarts-KH3YOWMK.js → echarts-NGS4QG4E.js} +2 -2
- package/dist/bundle/{embed-WBVM7KQ2.js → embed-YNH5M6UL.js} +6 -4
- package/dist/bundle/{embedder-27HQIFHM.js → embedder-LLNK4JF4.js} +11 -9
- package/dist/bundle/{entry-K2WWMF2B.js → entry-L42C5CHF.js} +7 -5
- package/dist/bundle/failure-TQJGSWRU.js +66 -0
- package/dist/bundle/failure-Z2FXWIBY.js +24 -0
- package/dist/bundle/first-run-TT6KMHKA.js +27 -0
- package/dist/bundle/first-screen-56KZKY77.js +30 -0
- package/dist/bundle/{instructions-POJKHKRZ.js → instructions-4EJ4BBWD.js} +1 -1
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-MNI62HHE.js} +4 -2
- package/dist/bundle/mcp-PNC3TI7O.js +90 -0
- package/dist/bundle/memo.js +182 -39
- package/dist/bundle/{node-W245R2OP.js → node-QQXKQWNC.js} +2 -2
- package/dist/bundle/{node-sqlite-FUYOXFW5.js → node-sqlite-GJI2GMLW.js} +6 -4
- package/dist/bundle/{oauth-ATB3NWQA.js → oauth-Q5VGUPUR.js} +7 -5
- package/dist/bundle/{open-HEBEWCYB.js → open-NSXIYF3N.js} +5 -3
- package/dist/bundle/{openai-DN7NA2IU.js → openai-LHH7MSGQ.js} +10 -8
- package/dist/bundle/{process-QTIDOJMF.js → process-PI6XUJWP.js} +1 -1
- package/dist/bundle/{program-62ISSWCE.js → program-ZIRYOO2T.js} +8414 -8372
- package/dist/bundle/{prompt-RQXVPJ4A.js → prompt-VFXA7IKL.js} +5 -3
- package/dist/bundle/{recognize-G7NIZ3IT.js → recognize-UWAARXOH.js} +4 -2
- package/dist/bundle/{remote-H452UBSK.js → remote-KGEVCB2Q.js} +7 -5
- package/dist/bundle/{rerank-77UYD2UD.js → rerank-SCBTCBPO.js} +7 -5
- package/dist/bundle/{serve-L6R4ODZV.js → serve-WPVKVR24.js} +9 -7
- package/dist/bundle/server-F2PSE6LG.js +48 -0
- package/dist/bundle/server-K5JYA3ZT.js +61 -0
- package/dist/bundle/{server-NB3U4PPW.js → server-VO5SXU5A.js} +69 -63
- package/dist/bundle/{setup-ZGH5OZ7A.js → setup-X6OJ3K4F.js} +47 -43
- package/dist/bundle/{state-KHMYDV4I.js → state-KGHS4C6J.js} +6 -4
- package/dist/bundle/{store-M7KGTLUG.js → store-VCVOIQES.js} +12 -10
- package/dist/bundle/store-maintenance-command-R4CP6AZN.js +48 -0
- package/dist/bundle/update-M6AIJ2SZ.js +69 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/dist/contract-overrides/skill.d.ts.map +1 -1
- package/dist/contract-overrides/skill.js +14 -0
- package/dist/contract-overrides/skill.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +31 -1
- package/dist/examples.js.map +1 -1
- package/dist/knowledge/command.d.ts.map +1 -1
- package/dist/knowledge/command.js +8 -52
- package/dist/knowledge/command.js.map +1 -1
- package/dist/knowledge/project-actions-command.js +1 -1
- package/dist/knowledge/project-actions-command.js.map +1 -1
- package/dist/knowledge/project-gather-command.d.ts.map +1 -1
- package/dist/knowledge/project-gather-command.js +32 -19
- package/dist/knowledge/project-gather-command.js.map +1 -1
- package/dist/knowledge/relationships-scan.d.ts +8 -0
- package/dist/knowledge/relationships-scan.d.ts.map +1 -0
- package/dist/knowledge/relationships-scan.js +95 -0
- package/dist/knowledge/relationships-scan.js.map +1 -0
- package/dist/mail/command.d.ts.map +1 -1
- package/dist/mail/command.js +11 -1
- package/dist/mail/command.js.map +1 -1
- package/dist/mail/findings-command.d.ts +8 -0
- package/dist/mail/findings-command.d.ts.map +1 -0
- package/dist/mail/findings-command.js +80 -0
- package/dist/mail/findings-command.js.map +1 -0
- package/dist/mail/messages-command.d.ts.map +1 -1
- package/dist/mail/messages-command.js +27 -3
- package/dist/mail/messages-command.js.map +1 -1
- package/dist/mail/review-command.d.ts +12 -0
- package/dist/mail/review-command.d.ts.map +1 -0
- package/dist/mail/review-command.js +46 -0
- package/dist/mail/review-command.js.map +1 -0
- package/dist/mcp/catalogue.d.ts.map +1 -1
- package/dist/mcp/catalogue.js +1 -1
- package/dist/mcp/catalogue.js.map +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +1 -1
- package/dist/program.js.map +1 -1
- package/dist/read-only.d.ts +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -0
- package/dist/reasons.js.map +1 -1
- package/dist/review/kinds.d.ts +0 -6
- package/dist/review/kinds.d.ts.map +1 -1
- package/dist/review/kinds.js +14 -45
- package/dist/review/kinds.js.map +1 -1
- package/dist/review/status.d.ts +1 -0
- package/dist/review/status.d.ts.map +1 -1
- package/dist/schedule/command.d.ts +3 -1
- package/dist/schedule/command.d.ts.map +1 -1
- package/dist/schedule/command.js +6 -1
- package/dist/schedule/command.js.map +1 -1
- package/dist/store/source-list.d.ts +2 -0
- package/dist/store/source-list.d.ts.map +1 -1
- package/dist/store/source-list.js +6 -0
- package/dist/store/source-list.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
- package/skills/cli-memo/SKILL.md +13 -5
- package/skills/mail-triage/SKILL.md +120 -0
- package/dist/bundle/auto-GDLRYDYK.js +0 -82
- package/dist/bundle/chunk-7J5HTZCM.js +0 -18
- package/dist/bundle/command-contract-NMJKYTS4.js +0 -30
- package/dist/bundle/failure-OJI6C5JA.js +0 -62
- package/dist/bundle/first-run-7P5N72VR.js +0 -23
- package/dist/bundle/first-screen-3GM5HC4Y.js +0 -28
- package/dist/bundle/mcp-YGWNSJUH.js +0 -86
- package/dist/bundle/server-SWUSQSRW.js +0 -44
- package/dist/bundle/server-W4IKTTUY.js +0 -57
- package/dist/bundle/store-maintenance-command-ZPN2ZUL4.js +0 -44
- package/dist/bundle/update-2IYA7RJU.js +0 -65
- /package/dist/bundle/{chunk-7YF2MSEC.js → chunk-YYQN5ES2.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SXGAIQ5X.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -51,38 +51,17 @@ import {
|
|
|
51
51
|
typedCommand,
|
|
52
52
|
vectorModelKey,
|
|
53
53
|
withAttempt
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-VQM3H422.js";
|
|
55
55
|
import {
|
|
56
56
|
isCliFailure
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-RC7TIYUZ.js";
|
|
58
58
|
import {
|
|
59
59
|
isNewer,
|
|
60
60
|
updateCommand
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-3V4WIGWC.js";
|
|
62
62
|
import {
|
|
63
63
|
readOnlyLockOf
|
|
64
|
-
} from "./chunk-
|
|
65
|
-
import {
|
|
66
|
-
MAX_MODEL_IMAGE_BYTES
|
|
67
|
-
} from "./chunk-5KUPVC5M.js";
|
|
68
|
-
import {
|
|
69
|
-
remoteKey
|
|
70
|
-
} from "./chunk-LEUNYKL6.js";
|
|
71
|
-
import {
|
|
72
|
-
Unzip,
|
|
73
|
-
UnzipInflate,
|
|
74
|
-
defaultThreads,
|
|
75
|
-
installNativeRuntime,
|
|
76
|
-
isTextModelInstalled,
|
|
77
|
-
openEmbedder,
|
|
78
|
-
placedText,
|
|
79
|
-
runEmbedders,
|
|
80
|
-
textModelsDirectory
|
|
81
|
-
} from "./chunk-LDVU22MF.js";
|
|
82
|
-
import {
|
|
83
|
-
installFiles,
|
|
84
|
-
megabytes
|
|
85
|
-
} from "./chunk-57Q6NXQT.js";
|
|
64
|
+
} from "./chunk-NELE7AIX.js";
|
|
86
65
|
import {
|
|
87
66
|
AGENDA_COLUMNS,
|
|
88
67
|
CHAT_COLUMNS,
|
|
@@ -95,6 +74,7 @@ import {
|
|
|
95
74
|
FIELD_VERSION,
|
|
96
75
|
INTERNAL_NOTES,
|
|
97
76
|
MAIL_AGENDA_COLUMNS,
|
|
77
|
+
MAIL_FINDINGS_KIND,
|
|
98
78
|
MAX_FILE_BYTES,
|
|
99
79
|
MAX_TEXT_CHARS,
|
|
100
80
|
MENTION_QUERY,
|
|
@@ -176,7 +156,7 @@ import {
|
|
|
176
156
|
threadConversation,
|
|
177
157
|
validateAst,
|
|
178
158
|
validateFields
|
|
179
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-YAUDFROV.js";
|
|
180
160
|
import {
|
|
181
161
|
EVENT_QUERY,
|
|
182
162
|
MEETING_FINDINGS_KIND,
|
|
@@ -230,29 +210,52 @@ import {
|
|
|
230
210
|
validateQuery,
|
|
231
211
|
walkQuery,
|
|
232
212
|
zonedMoment
|
|
233
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-RNXYDBQO.js";
|
|
234
214
|
import {
|
|
235
215
|
DEFAULT_STEMMERS,
|
|
236
216
|
createStemmer,
|
|
237
217
|
fold,
|
|
238
218
|
normalize
|
|
239
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-7F6FGMCC.js";
|
|
240
220
|
import {
|
|
241
221
|
DEFAULT_TASK_CATEGORIES,
|
|
242
222
|
FALLBACK_CATEGORY
|
|
243
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-2TBIVKBH.js";
|
|
224
|
+
import {
|
|
225
|
+
MAX_MODEL_IMAGE_BYTES
|
|
226
|
+
} from "./chunk-KUNA6MQZ.js";
|
|
227
|
+
import {
|
|
228
|
+
remoteKey
|
|
229
|
+
} from "./chunk-WUCQ56RP.js";
|
|
230
|
+
import {
|
|
231
|
+
Unzip,
|
|
232
|
+
UnzipInflate,
|
|
233
|
+
defaultThreads,
|
|
234
|
+
installNativeRuntime,
|
|
235
|
+
isTextModelInstalled,
|
|
236
|
+
openEmbedder,
|
|
237
|
+
placedText,
|
|
238
|
+
runEmbedders,
|
|
239
|
+
textModelsDirectory
|
|
240
|
+
} from "./chunk-LGNS4JVK.js";
|
|
241
|
+
import {
|
|
242
|
+
installFiles,
|
|
243
|
+
megabytes
|
|
244
|
+
} from "./chunk-LR5EY5JY.js";
|
|
244
245
|
import {
|
|
245
246
|
storePath,
|
|
246
247
|
wirecatDirectory
|
|
247
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-VXHN3SWW.js";
|
|
249
|
+
import {
|
|
250
|
+
resolvePaths,
|
|
251
|
+
writeSecurely
|
|
252
|
+
} from "./chunk-CDZZ2DZO.js";
|
|
248
253
|
import {
|
|
249
|
-
CliError,
|
|
250
254
|
array,
|
|
251
255
|
boolean,
|
|
252
256
|
check,
|
|
253
257
|
getDotPath,
|
|
254
258
|
integer,
|
|
255
|
-
isCliError,
|
|
256
259
|
maxLength,
|
|
257
260
|
minLength,
|
|
258
261
|
minValue,
|
|
@@ -263,21 +266,23 @@ import {
|
|
|
263
266
|
pipe,
|
|
264
267
|
record,
|
|
265
268
|
regex,
|
|
266
|
-
resolvePaths,
|
|
267
269
|
safeInteger,
|
|
268
270
|
safeParse,
|
|
269
|
-
singleLine,
|
|
270
271
|
strictObject,
|
|
271
272
|
string,
|
|
272
273
|
transform,
|
|
273
|
-
unknown
|
|
274
|
-
|
|
275
|
-
writeSecurely
|
|
276
|
-
} from "./chunk-MXP4J6BJ.js";
|
|
274
|
+
unknown
|
|
275
|
+
} from "./chunk-EG2OMKWH.js";
|
|
277
276
|
import {
|
|
278
277
|
importFrom,
|
|
279
278
|
resolveFrom
|
|
280
279
|
} from "./chunk-Y5E2WNWB.js";
|
|
280
|
+
import {
|
|
281
|
+
CliError,
|
|
282
|
+
isCliError,
|
|
283
|
+
singleLine,
|
|
284
|
+
visibleControls
|
|
285
|
+
} from "./chunk-CCHHEMPM.js";
|
|
281
286
|
import {
|
|
282
287
|
__commonJS,
|
|
283
288
|
__name,
|
|
@@ -16893,7 +16898,7 @@ var require_lib3 = __commonJS({
|
|
|
16893
16898
|
}
|
|
16894
16899
|
});
|
|
16895
16900
|
|
|
16896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16897
16902
|
var RULES_VERSION = 5;
|
|
16898
16903
|
var LOOK_BACK = 50;
|
|
16899
16904
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16983,13 +16988,13 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16983
16988
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16984
16989
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16985
16990
|
|
|
16986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16991
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16987
16992
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16988
16993
|
|
|
16989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
16990
16995
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
16991
16996
|
|
|
16992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/knowledge-query.js
|
|
16993
16998
|
var ORGANIZATIONS_QUERY = {
|
|
16994
16999
|
entity: "organization",
|
|
16995
17000
|
backend: "sql",
|
|
@@ -17024,7 +17029,7 @@ var REMINDERS_QUERY = {
|
|
|
17024
17029
|
})
|
|
17025
17030
|
};
|
|
17026
17031
|
|
|
17027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17028
17033
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
17029
17034
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17030
17035
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17046,7 +17051,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
17046
17051
|
}
|
|
17047
17052
|
}, "previewProjectAnnotationSnapshot");
|
|
17048
17053
|
|
|
17049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17050
17055
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
17051
17056
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17052
17057
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17067,7 +17072,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
17067
17072
|
}
|
|
17068
17073
|
}, "snapshotProjectAnnotations");
|
|
17069
17074
|
|
|
17070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17071
17076
|
var COMMAND_NEEDS = {
|
|
17072
17077
|
"account update": ["updateProfile", "change the profile"],
|
|
17073
17078
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17117,7 +17122,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17117
17122
|
return group;
|
|
17118
17123
|
}, "hideNever");
|
|
17119
17124
|
|
|
17120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17121
17126
|
var AUDIT_PAGE = 200;
|
|
17122
17127
|
var AUDIT_BUDGET = 10;
|
|
17123
17128
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17197,7 +17202,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17197
17202
|
return found;
|
|
17198
17203
|
}, "burstJoins");
|
|
17199
17204
|
|
|
17200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17201
17206
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17202
17207
|
command.allowUnknownOption();
|
|
17203
17208
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17217,7 +17222,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17217
17222
|
return command;
|
|
17218
17223
|
}, "queryWordsAfterOptions");
|
|
17219
17224
|
|
|
17220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17225
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17221
17226
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17222
17227
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17223
17228
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17259,7 +17264,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17259
17264
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17260
17265
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17261
17266
|
|
|
17262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17263
17268
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17264
17269
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17265
17270
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17282,7 +17287,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17282
17287
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17283
17288
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17284
17289
|
|
|
17285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17286
17291
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17287
17292
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17288
17293
|
const zone = timezoneOf();
|
|
@@ -17368,7 +17373,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17368
17373
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17369
17374
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17370
17375
|
|
|
17371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17372
17377
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17373
17378
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17374
17379
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17500,7 +17505,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17500
17505
|
}, "addMeetingCommandsDefinition");
|
|
17501
17506
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17502
17507
|
|
|
17503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17508
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17504
17509
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17505
17510
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17506
17511
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17633,7 +17638,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17633
17638
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17634
17639
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17635
17640
|
|
|
17636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17637
17642
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17638
17643
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17639
17644
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17642,7 +17647,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17642
17647
|
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");
|
|
17643
17648
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17644
17649
|
|
|
17645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17646
17651
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17647
17652
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17648
17653
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17904,7 +17909,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17904
17909
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17905
17910
|
}), "sessionAnswer");
|
|
17906
17911
|
|
|
17907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17908
17913
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17909
17914
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17910
17915
|
if (key in own)
|
|
@@ -17921,12 +17926,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17921
17926
|
return found.bind(adapter);
|
|
17922
17927
|
}, "capability");
|
|
17923
17928
|
|
|
17924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17925
17930
|
import { randomBytes } from "node:crypto";
|
|
17926
17931
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17927
17932
|
var newOperationId = newSendId;
|
|
17928
17933
|
|
|
17929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17934
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17930
17935
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17931
17936
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17932
17937
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18003,7 +18008,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
18003
18008
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
18004
18009
|
}, "storeOnlyDeps");
|
|
18005
18010
|
|
|
18006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18007
18012
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18008
18013
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18009
18014
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -18026,10 +18031,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
18026
18031
|
}
|
|
18027
18032
|
}, "patiently");
|
|
18028
18033
|
|
|
18029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18030
18035
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18031
18036
|
|
|
18032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18037
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18033
18038
|
var REQUEST_MS = 400;
|
|
18034
18039
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18035
18040
|
const lowest = ranges[0];
|
|
@@ -18052,13 +18057,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18052
18057
|
};
|
|
18053
18058
|
}, "estimateBackfill");
|
|
18054
18059
|
|
|
18055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18056
18061
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18057
18062
|
...error,
|
|
18058
18063
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18059
18064
|
}), "withRecovery");
|
|
18060
18065
|
|
|
18061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18066
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18062
18067
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18063
18068
|
if (isCliFailure(error))
|
|
18064
18069
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18141,7 +18146,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18141
18146
|
};
|
|
18142
18147
|
}, "mergeBatches");
|
|
18143
18148
|
|
|
18144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18145
18150
|
var TAKES = {
|
|
18146
18151
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18147
18152
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18201,7 +18206,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18201
18206
|
throw wrongAccount(reference, scope, profiles);
|
|
18202
18207
|
}, "ensureAccount");
|
|
18203
18208
|
|
|
18204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18205
18210
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18206
18211
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18207
18212
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18246,7 +18251,7 @@ ${lines3}`, { candidates });
|
|
|
18246
18251
|
}, "ambiguous");
|
|
18247
18252
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18248
18253
|
|
|
18249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18254
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18250
18255
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18251
18256
|
if (deps.reads !== "store")
|
|
18252
18257
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18405,7 +18410,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18405
18410
|
}
|
|
18406
18411
|
}, "senderAmong");
|
|
18407
18412
|
|
|
18408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18409
18414
|
var CONTEXT_MESSAGES = 3;
|
|
18410
18415
|
var CONTEXT_MINUTES = 10;
|
|
18411
18416
|
var MAX_CHARS = 1200;
|
|
@@ -18429,12 +18434,12 @@ var context = {
|
|
|
18429
18434
|
}, "describe")
|
|
18430
18435
|
};
|
|
18431
18436
|
|
|
18432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18433
18438
|
var BUILT_INS = [context];
|
|
18434
18439
|
var providers = [...BUILT_INS];
|
|
18435
18440
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18436
18441
|
|
|
18437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18438
18443
|
var READ_PAGE = 5e3;
|
|
18439
18444
|
var CHAIN = 50;
|
|
18440
18445
|
var CONVERSATION_QUERY = {
|
|
@@ -18586,7 +18591,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
18586
18591
|
return size4;
|
|
18587
18592
|
}, "sized");
|
|
18588
18593
|
|
|
18589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18590
18595
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18591
18596
|
var MESSAGE_PAGE = 5e3;
|
|
18592
18597
|
var PER_SESSION = 8;
|
|
@@ -18605,7 +18610,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18605
18610
|
price: remote.price,
|
|
18606
18611
|
installed: true,
|
|
18607
18612
|
perBatch: PER_REQUEST * concurrency,
|
|
18608
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18613
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-KGEVCB2Q.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18609
18614
|
};
|
|
18610
18615
|
}
|
|
18611
18616
|
const model = textModel(choice);
|
|
@@ -18622,7 +18627,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18622
18627
|
if (!isTextModelInstalled(model, directory2))
|
|
18623
18628
|
throw notDownloaded(model.id);
|
|
18624
18629
|
if (apart) {
|
|
18625
|
-
const { openProcess } = await import("./process-
|
|
18630
|
+
const { openProcess } = await import("./process-PI6XUJWP.js");
|
|
18626
18631
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18627
18632
|
}
|
|
18628
18633
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -18911,7 +18916,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
18911
18916
|
return { ...one2, state };
|
|
18912
18917
|
}, "shaped");
|
|
18913
18918
|
|
|
18914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
18915
18920
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
18916
18921
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
18917
18922
|
for (const [key, value, maximum] of [
|
|
@@ -18964,7 +18969,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
18964
18969
|
}
|
|
18965
18970
|
}, "catchUpSearch");
|
|
18966
18971
|
|
|
18967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18968
18973
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
18969
18974
|
if (deps.reads === "store") {
|
|
18970
18975
|
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`);
|
|
@@ -19330,7 +19335,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19330
19335
|
return message?.timestamp ?? fallback;
|
|
19331
19336
|
}, "timeOfKey");
|
|
19332
19337
|
|
|
19333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19334
19339
|
var LINKS = /https?:\/\/\S+/g;
|
|
19335
19340
|
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");
|
|
19336
19341
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19360,7 +19365,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19360
19365
|
});
|
|
19361
19366
|
}, "questions");
|
|
19362
19367
|
|
|
19363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19364
19369
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19365
19370
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19366
19371
|
const name = typed.trim().toLowerCase();
|
|
@@ -19417,7 +19422,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19417
19422
|
return best.name;
|
|
19418
19423
|
}, "categorize");
|
|
19419
19424
|
|
|
19420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19421
19426
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19422
19427
|
var RULES_IN = {
|
|
19423
19428
|
dialog: "all",
|
|
@@ -19623,7 +19628,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19623
19628
|
return passes;
|
|
19624
19629
|
}, "applyTaskRulesToChats");
|
|
19625
19630
|
|
|
19626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19627
19632
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19628
19633
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19629
19634
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -19687,7 +19692,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19687
19692
|
}
|
|
19688
19693
|
}, "validateContextEvidencePage");
|
|
19689
19694
|
|
|
19690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19691
19696
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19692
19697
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19693
19698
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19740,7 +19745,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19740
19745
|
};
|
|
19741
19746
|
}, "contextReadBudget");
|
|
19742
19747
|
|
|
19743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
19744
19749
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19745
19750
|
if (!port || typeof port.read !== "function")
|
|
19746
19751
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19784,7 +19789,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19784
19789
|
};
|
|
19785
19790
|
}, "createContextEvidenceReader");
|
|
19786
19791
|
|
|
19787
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
19788
19793
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
19789
19794
|
dryRun,
|
|
19790
19795
|
source: null,
|
|
@@ -19859,7 +19864,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun =
|
|
|
19859
19864
|
return receipt;
|
|
19860
19865
|
}, "ingest");
|
|
19861
19866
|
|
|
19862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
19863
19868
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
19864
19869
|
var DEFAULT_PURPOSES = ["work"];
|
|
19865
19870
|
var LINK_PURPOSE = "work";
|
|
@@ -19889,7 +19894,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
19889
19894
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
19890
19895
|
], "purposeList");
|
|
19891
19896
|
|
|
19892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19893
19898
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19894
19899
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19895
19900
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19929,7 +19934,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19929
19934
|
};
|
|
19930
19935
|
}, "dateWindow");
|
|
19931
19936
|
|
|
19932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19933
19938
|
var DAY_MS = 864e5;
|
|
19934
19939
|
var NEW_DAYS = 30;
|
|
19935
19940
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20006,7 +20011,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20006
20011
|
};
|
|
20007
20012
|
}, "scorePerson");
|
|
20008
20013
|
|
|
20009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20010
20015
|
var REGISTRIES = {
|
|
20011
20016
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20012
20017
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20091,7 +20096,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20091
20096
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20092
20097
|
})), "notCovered");
|
|
20093
20098
|
|
|
20094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20095
20100
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20096
20101
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20097
20102
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20179,7 +20184,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20179
20184
|
};
|
|
20180
20185
|
}, "botCheckService");
|
|
20181
20186
|
|
|
20182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20183
20188
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20184
20189
|
if (value === void 0)
|
|
20185
20190
|
return void 0;
|
|
@@ -20189,7 +20194,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20189
20194
|
return id2;
|
|
20190
20195
|
}, "threadIdOf");
|
|
20191
20196
|
|
|
20192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20193
20198
|
var TOP_POSTS = 5;
|
|
20194
20199
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20195
20200
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20306,7 +20311,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20306
20311
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20307
20312
|
}, "median");
|
|
20308
20313
|
|
|
20309
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20310
20315
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20311
20316
|
const events = [];
|
|
20312
20317
|
for (const stay of stays) {
|
|
@@ -20338,7 +20343,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20338
20343
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20339
20344
|
}, "memberEvents");
|
|
20340
20345
|
|
|
20341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20342
20347
|
var EVENTS_DAYS = 7;
|
|
20343
20348
|
var TRACKED_DAYS = 30;
|
|
20344
20349
|
var STATS_PAGE = 1e3;
|
|
@@ -20633,7 +20638,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20633
20638
|
return members.length === 0 ? null : members;
|
|
20634
20639
|
}, "storedMembers");
|
|
20635
20640
|
|
|
20636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20637
20642
|
var INBOX_CHATS = 20;
|
|
20638
20643
|
var REVIEW_DAYS = 3;
|
|
20639
20644
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20841,7 +20846,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20841
20846
|
};
|
|
20842
20847
|
}, "inboxService");
|
|
20843
20848
|
|
|
20844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
20845
20850
|
var CONTEXT_MESSAGES2 = 10;
|
|
20846
20851
|
var CONTEXT_BYTES = 64 * 1024;
|
|
20847
20852
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21102,10 +21107,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21102
21107
|
};
|
|
21103
21108
|
}, "personMessages");
|
|
21104
21109
|
|
|
21105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21106
21111
|
import { createHash } from "node:crypto";
|
|
21107
21112
|
|
|
21108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21109
21114
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21110
21115
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21111
21116
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21123,7 +21128,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21123
21128
|
return { parsed, meeting };
|
|
21124
21129
|
}, "authorizedMeetingMetadata");
|
|
21125
21130
|
|
|
21126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21127
21132
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21128
21133
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21129
21134
|
if (signal?.aborted)
|
|
@@ -21322,7 +21327,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21322
21327
|
return { ...packet, fingerprint: hash(packet) };
|
|
21323
21328
|
}, "readMeetingEvidence");
|
|
21324
21329
|
|
|
21325
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21326
21331
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21327
21332
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21328
21333
|
const requestedAccounts = options.accountIds;
|
|
@@ -21421,7 +21426,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21421
21426
|
};
|
|
21422
21427
|
}, "personMeetingContext");
|
|
21423
21428
|
|
|
21424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21425
21430
|
var PREPARE_BYTES = 96 * 1024;
|
|
21426
21431
|
var MEETINGS = 5;
|
|
21427
21432
|
var CUES = 3;
|
|
@@ -21538,7 +21543,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21538
21543
|
}
|
|
21539
21544
|
}, "meetingsOf");
|
|
21540
21545
|
|
|
21541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21542
21547
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21543
21548
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21544
21549
|
const held = await storeIfOpen(deps);
|
|
@@ -21608,7 +21613,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21608
21613
|
complete: false
|
|
21609
21614
|
})), "quiet");
|
|
21610
21615
|
|
|
21611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21612
21617
|
var TIMELINE_ITEMS = 50;
|
|
21613
21618
|
var TIMELINE_MAX = 500;
|
|
21614
21619
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -21663,7 +21668,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21663
21668
|
};
|
|
21664
21669
|
}, "personTimeline");
|
|
21665
21670
|
|
|
21666
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21667
21672
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21668
21673
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21669
21674
|
const held = await storeIfOpen(deps);
|
|
@@ -21676,7 +21681,7 @@ var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
21676
21681
|
...!includeNotes || local.notes.length === 0 ? {} : { notes: local.notes }
|
|
21677
21682
|
};
|
|
21678
21683
|
}, "localCard");
|
|
21679
|
-
const
|
|
21684
|
+
const referenceOf2 = /* @__PURE__ */ __name(async (reference) => {
|
|
21680
21685
|
const held = await storeIfOpen(deps);
|
|
21681
21686
|
if (!held)
|
|
21682
21687
|
return reference;
|
|
@@ -21691,7 +21696,7 @@ var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
21691
21696
|
}, "online");
|
|
21692
21697
|
const change = /* @__PURE__ */ __name(async (action2, person, act2) => {
|
|
21693
21698
|
const connection = await online(`contacts ${action2.slice("contact-".length)}`);
|
|
21694
|
-
const [personId] = await capability(connection, "people", "find people")([await
|
|
21699
|
+
const [personId] = await capability(connection, "people", "find people")([await referenceOf2(person)]);
|
|
21695
21700
|
const operationId = newOperationId();
|
|
21696
21701
|
const done2 = await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: action2 }, () => act2(connection, personId));
|
|
21697
21702
|
return { operationId, personId, done: done2 };
|
|
@@ -21715,7 +21720,7 @@ var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
21715
21720
|
const found = pickPerson(person, await store.people.people(account.provider, { account: account.account }));
|
|
21716
21721
|
return localCard({ ...found, chats: await sharedChats(store, account, found.id) }, notes);
|
|
21717
21722
|
}
|
|
21718
|
-
const card = await capability(await deps.connection(), "contact", "show a person")(await
|
|
21723
|
+
const card = await capability(await deps.connection(), "contact", "show a person")(await referenceOf2(person));
|
|
21719
21724
|
if (card.chats.length > 0)
|
|
21720
21725
|
return localCard(card, notes);
|
|
21721
21726
|
const held = await storeIfOpen(deps);
|
|
@@ -21890,7 +21895,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
21890
21895
|
return rest;
|
|
21891
21896
|
}, "withoutPhone");
|
|
21892
21897
|
|
|
21893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
21894
21899
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
21895
21900
|
const tags = /* @__PURE__ */ new Map();
|
|
21896
21901
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -21899,7 +21904,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
21899
21904
|
return tags;
|
|
21900
21905
|
}, "taskTagFilters");
|
|
21901
21906
|
|
|
21902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
21903
21908
|
var TASK_QUERY = {
|
|
21904
21909
|
entity: "task",
|
|
21905
21910
|
backend: "sql",
|
|
@@ -22379,7 +22384,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22379
22384
|
};
|
|
22380
22385
|
}, "taskView");
|
|
22381
22386
|
|
|
22382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
22383
22388
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
22384
22389
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
22385
22390
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -22409,7 +22414,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
22409
22414
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
22410
22415
|
}, "approveAsTask");
|
|
22411
22416
|
|
|
22412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
22413
22418
|
var MAX_IDS = 500;
|
|
22414
22419
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
22415
22420
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -22449,7 +22454,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
22449
22454
|
return ids;
|
|
22450
22455
|
}, "parseProposalIds");
|
|
22451
22456
|
|
|
22452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
22453
22458
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
22454
22459
|
if (author.type === "person")
|
|
22455
22460
|
return { type: "person", id: author.id };
|
|
@@ -22491,7 +22496,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
22491
22496
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
22492
22497
|
}, "storedStatus");
|
|
22493
22498
|
|
|
22494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
22495
22500
|
var rowOf = /* @__PURE__ */ __name((action2) => ({
|
|
22496
22501
|
id: action2.id,
|
|
22497
22502
|
kind: "action",
|
|
@@ -22530,7 +22535,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
22530
22535
|
}, "decide")
|
|
22531
22536
|
}), "actionKind");
|
|
22532
22537
|
|
|
22533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
22534
22539
|
var STATUS = {
|
|
22535
22540
|
proposed: "proposed",
|
|
22536
22541
|
accepted: "confirmed",
|
|
@@ -22573,7 +22578,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22573
22578
|
}, "decide")
|
|
22574
22579
|
}), "factKind");
|
|
22575
22580
|
|
|
22576
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
22577
22582
|
var rowOf3 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
22578
22583
|
id: entry.ref,
|
|
22579
22584
|
kind,
|
|
@@ -22608,7 +22613,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
22608
22613
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
22609
22614
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
22610
22615
|
|
|
22611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22612
22617
|
var FACT_SUMMARIES = {
|
|
22613
22618
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
22614
22619
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -22680,7 +22685,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
22680
22685
|
};
|
|
22681
22686
|
}, "findingsKind");
|
|
22682
22687
|
|
|
22683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
22684
22689
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
22685
22690
|
id: `key:${link4.id}`,
|
|
22686
22691
|
kind: "key_document",
|
|
@@ -22748,14 +22753,93 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
22748
22753
|
};
|
|
22749
22754
|
}, "keyDocumentKind");
|
|
22750
22755
|
|
|
22751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
22757
|
+
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
22758
|
+
switch (finding.kind) {
|
|
22759
|
+
case "task":
|
|
22760
|
+
return finding.title;
|
|
22761
|
+
case "fact":
|
|
22762
|
+
return finding.statement;
|
|
22763
|
+
case "task_update":
|
|
22764
|
+
return `${finding.change} ${finding.task}: ${finding.reason}`;
|
|
22765
|
+
case "memory":
|
|
22766
|
+
return finding.body.slice(0, 200);
|
|
22767
|
+
case "link":
|
|
22768
|
+
return `${finding.from} \u2192 ${finding.to}`;
|
|
22769
|
+
case "new_contact":
|
|
22770
|
+
return `${finding.name} <${finding.address}>`;
|
|
22771
|
+
}
|
|
22772
|
+
}, "summaryOf");
|
|
22773
|
+
var rowOf5 = /* @__PURE__ */ __name((batch, createdAt) => {
|
|
22774
|
+
const findings = batch.input.findings;
|
|
22775
|
+
const outcome2 = /* @__PURE__ */ __name((id2) => batch.receipt?.items.find((item2) => item2.id === id2)?.status ?? null, "outcome");
|
|
22776
|
+
const project2 = findings.flatMap((finding) => "project" in finding && finding.project ? [finding.project] : [])[0] ?? null;
|
|
22777
|
+
return {
|
|
22778
|
+
id: batch.id,
|
|
22779
|
+
kind: "mail_findings",
|
|
22780
|
+
status: batch.status === "proposed" ? "proposed" : batch.receipt?.accepted.length ? "confirmed" : "rejected",
|
|
22781
|
+
project: project2,
|
|
22782
|
+
subject: `findings:${batch.id}`,
|
|
22783
|
+
object: null,
|
|
22784
|
+
summary: `${findings.length} mail finding${findings.length === 1 ? "" : "s"} for ${batch.account.account}`,
|
|
22785
|
+
proposedBy: proposerOfAuthor(batch.author),
|
|
22786
|
+
reason: null,
|
|
22787
|
+
evidence: [...new Set(findings.flatMap((finding) => finding.evidence.map((one2) => one2.reference)))].slice(0, 5),
|
|
22788
|
+
score: null,
|
|
22789
|
+
signals: null,
|
|
22790
|
+
parts: findings.map((finding) => ({
|
|
22791
|
+
id: finding.id,
|
|
22792
|
+
kind: finding.kind,
|
|
22793
|
+
summary: summaryOf(finding),
|
|
22794
|
+
outcome: outcome2(finding.id)
|
|
22795
|
+
})),
|
|
22796
|
+
createdAt
|
|
22797
|
+
};
|
|
22798
|
+
}, "rowOf");
|
|
22799
|
+
var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
22800
|
+
const created = /* @__PURE__ */ __name(async (batch) => rowOf5(batch, (await store.proposedActions.get(batch.id)).createdAt), "created");
|
|
22801
|
+
return {
|
|
22802
|
+
kind: "mail_findings",
|
|
22803
|
+
stored: [MAIL_FINDINGS_KIND],
|
|
22804
|
+
parts: true,
|
|
22805
|
+
ownerOnly: true,
|
|
22806
|
+
list: /* @__PURE__ */ __name(async (filter) => {
|
|
22807
|
+
const status = filter.status ?? "proposed";
|
|
22808
|
+
const rows = [];
|
|
22809
|
+
for (let offset = 0; rows.length < filter.limit; offset += 50) {
|
|
22810
|
+
const page = await store.mailFindings.list({
|
|
22811
|
+
...status === "proposed" ? { status: "proposed" } : {},
|
|
22812
|
+
...status === "confirmed" || status === "rejected" ? { status: "reviewed" } : {},
|
|
22813
|
+
limit: 50,
|
|
22814
|
+
offset
|
|
22815
|
+
});
|
|
22816
|
+
for (const row of kept(await Promise.all(page.items.map(created)), { ...filter, limit: 50 }))
|
|
22817
|
+
rows.push(row);
|
|
22818
|
+
if (!page.hasMore)
|
|
22819
|
+
break;
|
|
22820
|
+
}
|
|
22821
|
+
return kept(rows, filter);
|
|
22822
|
+
}, "list"),
|
|
22823
|
+
get: /* @__PURE__ */ __name(async (id2) => created(await store.mailFindings.get(id2)), "get"),
|
|
22824
|
+
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, parts }) => {
|
|
22825
|
+
const batch = await store.mailFindings.get(id2);
|
|
22826
|
+
const turnedDown = new Set(batch.previous.filter((one2) => one2.status === "rejected").map((one2) => one2.id));
|
|
22827
|
+
const accept = !confirm ? [] : parts ?? batch.input.findings.map((finding) => finding.id).filter((one2) => !turnedDown.has(one2));
|
|
22828
|
+
const reviewed = await store.mailFindings.review(id2, { fingerprint: batch.fingerprint, accept, by });
|
|
22829
|
+
const made = (reviewed.receipt?.items ?? []).flatMap((item2) => item2.status === "accepted" && item2.reference && !item2.reused ? [item2.reference] : []);
|
|
22830
|
+
return { id: id2, kind: "mail_findings", status: accept.length ? "confirmed" : "rejected", made };
|
|
22831
|
+
}, "decide")
|
|
22832
|
+
};
|
|
22833
|
+
}, "mailFindingsKind");
|
|
22834
|
+
|
|
22835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
22752
22836
|
var STATUS2 = {
|
|
22753
22837
|
proposed: "proposed",
|
|
22754
22838
|
confirmed: "confirmed",
|
|
22755
22839
|
superseded: "confirmed",
|
|
22756
22840
|
stale: "rejected"
|
|
22757
22841
|
};
|
|
22758
|
-
var
|
|
22842
|
+
var rowOf6 = /* @__PURE__ */ __name((memory) => ({
|
|
22759
22843
|
id: memory.ref,
|
|
22760
22844
|
kind: "memory",
|
|
22761
22845
|
status: STATUS2[memory.status],
|
|
@@ -22780,16 +22864,16 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22780
22864
|
...pushed2(filter),
|
|
22781
22865
|
...status === "all" ? {} : { status: status === "rejected" ? "stale" : status }
|
|
22782
22866
|
});
|
|
22783
|
-
return kept(memories.map(
|
|
22867
|
+
return kept(memories.map(rowOf6), filter);
|
|
22784
22868
|
}, "list"),
|
|
22785
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
22869
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf6(await store.memories.get(id2)), "get"),
|
|
22786
22870
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by }) => {
|
|
22787
22871
|
const memory = confirm ? await store.memories.confirm(id2, by) : await store.memories.markStale(id2, by);
|
|
22788
22872
|
return { id: id2, kind: "memory", status: confirm ? "confirmed" : "rejected", made: confirm ? [memory.ref] : [] };
|
|
22789
22873
|
}, "decide")
|
|
22790
22874
|
}), "memoryKind");
|
|
22791
22875
|
|
|
22792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22876
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
22793
22877
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
22794
22878
|
id: `link:${link4.id}`,
|
|
22795
22879
|
kind: "relationship",
|
|
@@ -22863,10 +22947,10 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
22863
22947
|
};
|
|
22864
22948
|
}, "relationshipKind");
|
|
22865
22949
|
|
|
22866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
22867
22951
|
var KIND = "relationship_update";
|
|
22868
|
-
var
|
|
22869
|
-
var
|
|
22952
|
+
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
22953
|
+
var rowOf7 = /* @__PURE__ */ __name((action2) => {
|
|
22870
22954
|
const payload = action2.payload;
|
|
22871
22955
|
return {
|
|
22872
22956
|
id: action2.id,
|
|
@@ -22875,7 +22959,7 @@ var rowOf6 = /* @__PURE__ */ __name((action2) => {
|
|
|
22875
22959
|
project: projectOf(payload.to, payload.from),
|
|
22876
22960
|
subject: `relationship:${payload.relationship}`,
|
|
22877
22961
|
object: payload.to,
|
|
22878
|
-
summary:
|
|
22962
|
+
summary: summaryOf2(payload),
|
|
22879
22963
|
proposedBy: proposerOfAction(action2),
|
|
22880
22964
|
reason: action2.reason,
|
|
22881
22965
|
evidence: [],
|
|
@@ -22895,9 +22979,9 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22895
22979
|
...status === void 0 ? {} : { status },
|
|
22896
22980
|
...pushed2(filter)
|
|
22897
22981
|
});
|
|
22898
|
-
return kept(stored.map(
|
|
22982
|
+
return kept(stored.map(rowOf7), filter);
|
|
22899
22983
|
}, "list"),
|
|
22900
|
-
get: /* @__PURE__ */ __name(async (id2) =>
|
|
22984
|
+
get: /* @__PURE__ */ __name(async (id2) => rowOf7(await store.proposedActions.get(id2)), "get"),
|
|
22901
22985
|
decide: /* @__PURE__ */ __name(async (id2, { confirm, by, reason }) => {
|
|
22902
22986
|
const { relation } = await store.knowledge.decideRelationUpdate(id2, {
|
|
22903
22987
|
confirm,
|
|
@@ -22913,7 +22997,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22913
22997
|
}, "decide")
|
|
22914
22998
|
}), "relationshipUpdateKind");
|
|
22915
22999
|
|
|
22916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
22917
23001
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
22918
23002
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
22919
23003
|
if (!(error instanceof CliError))
|
|
@@ -23000,7 +23084,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23000
23084
|
});
|
|
23001
23085
|
continue;
|
|
23002
23086
|
}
|
|
23003
|
-
const refusal2 = mayDecide(row, decision.by, policy);
|
|
23087
|
+
const refusal2 = mayDecide(kind.ownerOnly ? { ...row, ownerOnly: true } : row, decision.by, policy);
|
|
23004
23088
|
if (refusal2) {
|
|
23005
23089
|
refused.push(refusal2);
|
|
23006
23090
|
continue;
|
|
@@ -23025,14 +23109,15 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23025
23109
|
invoiceKind(store),
|
|
23026
23110
|
paymentKind(store),
|
|
23027
23111
|
memoryKind(store),
|
|
23028
|
-
findingsKind(store)
|
|
23112
|
+
findingsKind(store),
|
|
23113
|
+
mailFindingsKind(store)
|
|
23029
23114
|
])
|
|
23030
23115
|
registry.register(kind);
|
|
23031
23116
|
registry.register(actionKind(store, registry.claimed));
|
|
23032
23117
|
return registry;
|
|
23033
23118
|
}, "proposalRegistry");
|
|
23034
23119
|
|
|
23035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
23036
23121
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
23037
23122
|
if (newest === null)
|
|
23038
23123
|
return null;
|
|
@@ -23041,7 +23126,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
23041
23126
|
return newest.addressed ? "owed" : null;
|
|
23042
23127
|
}, "mailTurn");
|
|
23043
23128
|
|
|
23044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
23045
23130
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
23046
23131
|
if (error instanceof CliError && error.code === "not_found")
|
|
23047
23132
|
return void 0;
|
|
@@ -23099,7 +23184,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
23099
23184
|
};
|
|
23100
23185
|
}, "mailActivity");
|
|
23101
23186
|
|
|
23102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23103
23188
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23104
23189
|
const ids = [...new Set(chatIds)];
|
|
23105
23190
|
if (ids.length === 0)
|
|
@@ -23125,7 +23210,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23125
23210
|
}));
|
|
23126
23211
|
}, "chatCoverage");
|
|
23127
23212
|
|
|
23128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
23129
23214
|
var DAY = 864e5;
|
|
23130
23215
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
23131
23216
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23372,7 +23457,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23372
23457
|
};
|
|
23373
23458
|
}, "agendaItem");
|
|
23374
23459
|
|
|
23375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23376
23461
|
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");
|
|
23377
23462
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
23378
23463
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23388,7 +23473,394 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
23388
23473
|
}, "excerpt");
|
|
23389
23474
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
23390
23475
|
|
|
23391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
23477
|
+
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
23478
|
+
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
23479
|
+
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
23480
|
+
var projectTerms = /* @__PURE__ */ __name((project2) => {
|
|
23481
|
+
const terms = /* @__PURE__ */ new Map();
|
|
23482
|
+
for (const term of [project2.name, project2.key, ...project2.aliases])
|
|
23483
|
+
if (term?.trim())
|
|
23484
|
+
terms.set(normalizeVocabularyName(term), term);
|
|
23485
|
+
return [...terms.values()];
|
|
23486
|
+
}, "projectTerms");
|
|
23487
|
+
var namesProject = /* @__PURE__ */ __name((project2) => {
|
|
23488
|
+
const patterns = projectTerms(project2).map((term) => ({ term, pattern: wholeWords(term) }));
|
|
23489
|
+
return (text2) => {
|
|
23490
|
+
if (!text2)
|
|
23491
|
+
return void 0;
|
|
23492
|
+
const value = folded(text2);
|
|
23493
|
+
return patterns.find(({ pattern }) => pattern.test(value))?.term;
|
|
23494
|
+
};
|
|
23495
|
+
}, "namesProject");
|
|
23496
|
+
var chatRef2 = /* @__PURE__ */ __name((key, chat) => formatReference({ type: "chat", provider: key.provider, account: String(key.account), chat: String(chat) }), "chatRef");
|
|
23497
|
+
var contactRef2 = /* @__PURE__ */ __name((provider, id2) => formatReference({ type: "contact", provider, id: String(id2) }), "contactRef");
|
|
23498
|
+
var sameAccount = /* @__PURE__ */ __name((a, b) => a.provider === b.provider && String(a.account) === b.account, "sameAccount");
|
|
23499
|
+
var personRefOf = /* @__PURE__ */ __name(async (store, provider, id2) => {
|
|
23500
|
+
const person = await store.people.personOf({ provider, id: id2 });
|
|
23501
|
+
return person ? `person:${person.uid}` : void 0;
|
|
23502
|
+
}, "personRefOf");
|
|
23503
|
+
var projectsOf = /* @__PURE__ */ __name(async (store, person) => new Set((await store.knowledge.relations(null, person)).filter((one2) => one2.confirmed && one2.kind === "member-of" && one2.from === person && one2.to.startsWith("project:")).map((one2) => one2.to)).size, "projectsOf");
|
|
23504
|
+
var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
23505
|
+
const found = [];
|
|
23506
|
+
for (const person of people) {
|
|
23507
|
+
const record2 = await store.people.personByUid(person.slice("person:".length));
|
|
23508
|
+
for (const identity of record2?.identities ?? [])
|
|
23509
|
+
if (identity.provider === provider)
|
|
23510
|
+
found.push({ person, id: String(identity.id) });
|
|
23511
|
+
}
|
|
23512
|
+
return found;
|
|
23513
|
+
}, "identitiesIn");
|
|
23514
|
+
|
|
23515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
23516
|
+
var SEARCH_LIMIT = 500;
|
|
23517
|
+
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
23518
|
+
var aliasHits = {
|
|
23519
|
+
id: "alias-hits",
|
|
23520
|
+
version: 1,
|
|
23521
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, sources, since, signal }) => {
|
|
23522
|
+
if (!project2)
|
|
23523
|
+
return [];
|
|
23524
|
+
const terms = projectTerms(project2).filter((term) => [...term.trim()].length >= 3);
|
|
23525
|
+
const found = [];
|
|
23526
|
+
for (const key of sources) {
|
|
23527
|
+
const chats = /* @__PURE__ */ new Map();
|
|
23528
|
+
for (const term of terms) {
|
|
23529
|
+
signal?.throwIfAborted();
|
|
23530
|
+
const pattern = wholeWords(term);
|
|
23531
|
+
const hits = await store.messages.find({ account: key, text: term, limit: SEARCH_LIMIT });
|
|
23532
|
+
for (const hit of hits.items) {
|
|
23533
|
+
if (hit.timestamp < since || !pattern.test(hit.text.normalize("NFKC").toLowerCase()))
|
|
23534
|
+
continue;
|
|
23535
|
+
const messages = chats.get(String(hit.chatId)) ?? /* @__PURE__ */ new Map();
|
|
23536
|
+
messages.set(String(hit.id), formatReference({
|
|
23537
|
+
type: "message",
|
|
23538
|
+
provider: key.provider,
|
|
23539
|
+
account: String(key.account),
|
|
23540
|
+
chat: String(hit.chatId),
|
|
23541
|
+
message: String(hit.id)
|
|
23542
|
+
}));
|
|
23543
|
+
chats.set(String(hit.chatId), messages);
|
|
23544
|
+
}
|
|
23545
|
+
}
|
|
23546
|
+
for (const [chat, messages] of chats) {
|
|
23547
|
+
const weight = aliasWeight(messages.size);
|
|
23548
|
+
if (!weight)
|
|
23549
|
+
continue;
|
|
23550
|
+
found.push({
|
|
23551
|
+
from: chatRef2(key, chat),
|
|
23552
|
+
to: project2.ref,
|
|
23553
|
+
kind: "member-of",
|
|
23554
|
+
weight,
|
|
23555
|
+
why: `${messages.size} messages since ${since.slice(0, 10)} name the project`,
|
|
23556
|
+
evidence: [...messages.values()].slice(0, 3)
|
|
23557
|
+
});
|
|
23558
|
+
}
|
|
23559
|
+
}
|
|
23560
|
+
return found;
|
|
23561
|
+
}, "candidates")
|
|
23562
|
+
};
|
|
23563
|
+
|
|
23564
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
23565
|
+
var WEIGHT = 0.5;
|
|
23566
|
+
var LARGE_GROUP_WEIGHT = 0.2;
|
|
23567
|
+
var LARGE_GROUP = 30;
|
|
23568
|
+
var MIN_MESSAGES = 5;
|
|
23569
|
+
var READ_LIMIT = 2e3;
|
|
23570
|
+
var chatSenders = {
|
|
23571
|
+
id: "chat-senders",
|
|
23572
|
+
version: 1,
|
|
23573
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, since, owner, signal }) => {
|
|
23574
|
+
if (!project2)
|
|
23575
|
+
return [];
|
|
23576
|
+
const found = [];
|
|
23577
|
+
for (const chat of confirmed.chats) {
|
|
23578
|
+
const reference = parseReference(chat);
|
|
23579
|
+
if (reference.type !== "chat")
|
|
23580
|
+
continue;
|
|
23581
|
+
const key = sources.find((source) => sameAccount(source, reference));
|
|
23582
|
+
if (!key)
|
|
23583
|
+
continue;
|
|
23584
|
+
signal?.throwIfAborted();
|
|
23585
|
+
const page = await store.messages.messages(key, reference.chat, { limit: READ_LIMIT, since, outgoing: false });
|
|
23586
|
+
const senders = /* @__PURE__ */ new Map();
|
|
23587
|
+
for (const message of page.items) {
|
|
23588
|
+
if (message.senderId === null || message.senderIsChat)
|
|
23589
|
+
continue;
|
|
23590
|
+
const id2 = String(message.senderId);
|
|
23591
|
+
senders.set(id2, { count: (senders.get(id2)?.count ?? 0) + 1, last: String(message.id) });
|
|
23592
|
+
}
|
|
23593
|
+
const size4 = Math.max((await store.roster.members(key, reference.chat)).length, senders.size);
|
|
23594
|
+
const weight = size4 > LARGE_GROUP ? LARGE_GROUP_WEIGHT : WEIGHT;
|
|
23595
|
+
for (const [id2, { count: count4, last }] of senders) {
|
|
23596
|
+
if (count4 < MIN_MESSAGES)
|
|
23597
|
+
continue;
|
|
23598
|
+
const person = await personRefOf(store, key.provider, id2);
|
|
23599
|
+
if (!person || person === owner)
|
|
23600
|
+
continue;
|
|
23601
|
+
found.push({
|
|
23602
|
+
from: person,
|
|
23603
|
+
to: project2.ref,
|
|
23604
|
+
kind: "member-of",
|
|
23605
|
+
weight,
|
|
23606
|
+
why: `${count4} messages since ${since.slice(0, 10)} in a project chat (${chat})${size4 > LARGE_GROUP ? `, a group of ${size4}` : ""}`,
|
|
23607
|
+
evidence: [formatReference({ ...reference, type: "message", message: last })],
|
|
23608
|
+
identity: contactRef2(key.provider, id2)
|
|
23609
|
+
});
|
|
23610
|
+
}
|
|
23611
|
+
}
|
|
23612
|
+
return found;
|
|
23613
|
+
}, "candidates")
|
|
23614
|
+
};
|
|
23615
|
+
|
|
23616
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
23617
|
+
var WEIGHT2 = 0.7;
|
|
23618
|
+
var chatTitle = {
|
|
23619
|
+
id: "chat-title",
|
|
23620
|
+
version: 1,
|
|
23621
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, sources, purposes, signal }) => {
|
|
23622
|
+
if (!project2)
|
|
23623
|
+
return [];
|
|
23624
|
+
const names2 = namesProject(project2);
|
|
23625
|
+
const purposeOf = purposes.filter((purpose) => purpose !== "work").map((purpose) => ({ purpose, pattern: wholeWords(purpose) }));
|
|
23626
|
+
const found = [];
|
|
23627
|
+
for (const key of sources) {
|
|
23628
|
+
if (key.provider === "email")
|
|
23629
|
+
continue;
|
|
23630
|
+
signal?.throwIfAborted();
|
|
23631
|
+
const chats = await store.chats.chats(key, {});
|
|
23632
|
+
for (const chat of chats.items) {
|
|
23633
|
+
if (chat.kind === "saved")
|
|
23634
|
+
continue;
|
|
23635
|
+
const term = names2(chat.title);
|
|
23636
|
+
if (!term)
|
|
23637
|
+
continue;
|
|
23638
|
+
const title = (chat.title ?? "").normalize("NFKC").toLowerCase();
|
|
23639
|
+
const purpose = purposeOf.find(({ pattern }) => pattern.test(title))?.purpose;
|
|
23640
|
+
found.push({
|
|
23641
|
+
from: chatRef2(key, chat.id),
|
|
23642
|
+
to: project2.ref,
|
|
23643
|
+
kind: "member-of",
|
|
23644
|
+
weight: WEIGHT2,
|
|
23645
|
+
why: `the chat title names the project${term === project2.name ? "" : ` (${term === project2.key ? "key" : "alias"})`}`,
|
|
23646
|
+
evidence: [],
|
|
23647
|
+
...purpose ? { purpose } : {}
|
|
23648
|
+
});
|
|
23649
|
+
}
|
|
23650
|
+
}
|
|
23651
|
+
return found;
|
|
23652
|
+
}, "candidates")
|
|
23653
|
+
};
|
|
23654
|
+
|
|
23655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
23656
|
+
var WEIGHT3 = 0.3;
|
|
23657
|
+
var CONTACTS = 500;
|
|
23658
|
+
var MOST_PAIRS = 200;
|
|
23659
|
+
var FREE = /* @__PURE__ */ new Set([
|
|
23660
|
+
"gmail.com",
|
|
23661
|
+
"outlook.com",
|
|
23662
|
+
"hotmail.com",
|
|
23663
|
+
"yahoo.com",
|
|
23664
|
+
"icloud.com",
|
|
23665
|
+
"proton.me",
|
|
23666
|
+
"protonmail.com"
|
|
23667
|
+
]);
|
|
23668
|
+
var emailDomain = {
|
|
23669
|
+
id: "email-domain",
|
|
23670
|
+
version: 1,
|
|
23671
|
+
candidates: /* @__PURE__ */ __name(async ({ store, sources, owner, signal }) => {
|
|
23672
|
+
const domains = /* @__PURE__ */ new Map();
|
|
23673
|
+
for (const key of sources) {
|
|
23674
|
+
if (key.provider !== "email")
|
|
23675
|
+
continue;
|
|
23676
|
+
signal?.throwIfAborted();
|
|
23677
|
+
const contacts = await store.people.contacts(key, { order: "name", limit: CONTACTS, offset: 0 });
|
|
23678
|
+
for (const contact of contacts.items) {
|
|
23679
|
+
const address = String(contact.id).toLowerCase();
|
|
23680
|
+
const domain = address.split("@")[1];
|
|
23681
|
+
if (!domain || FREE.has(domain))
|
|
23682
|
+
continue;
|
|
23683
|
+
const person = await store.people.personOf({ provider: key.provider, id: contact.id });
|
|
23684
|
+
if (!person || `person:${person.uid}` === owner)
|
|
23685
|
+
continue;
|
|
23686
|
+
const people = domains.get(domain) ?? /* @__PURE__ */ new Map();
|
|
23687
|
+
if (!people.has(`person:${person.uid}`))
|
|
23688
|
+
people.set(`person:${person.uid}`, contactRef2(key.provider, contact.id));
|
|
23689
|
+
domains.set(domain, people);
|
|
23690
|
+
}
|
|
23691
|
+
}
|
|
23692
|
+
const found = [];
|
|
23693
|
+
for (const [domain, people] of domains) {
|
|
23694
|
+
const sorted = [...people].sort(([a], [b]) => a.localeCompare(b));
|
|
23695
|
+
for (let left = 0; left < sorted.length; left++)
|
|
23696
|
+
for (let right = left + 1; right < sorted.length; right++) {
|
|
23697
|
+
if (found.length >= MOST_PAIRS)
|
|
23698
|
+
return found;
|
|
23699
|
+
const [from, identity] = sorted[left];
|
|
23700
|
+
const [to] = sorted[right];
|
|
23701
|
+
found.push({
|
|
23702
|
+
from,
|
|
23703
|
+
to,
|
|
23704
|
+
kind: "related-to",
|
|
23705
|
+
weight: WEIGHT3,
|
|
23706
|
+
why: `addresses share the domain ${domain}; this does not prove they work together`,
|
|
23707
|
+
evidence: [],
|
|
23708
|
+
identity
|
|
23709
|
+
});
|
|
23710
|
+
}
|
|
23711
|
+
}
|
|
23712
|
+
return found;
|
|
23713
|
+
}, "candidates")
|
|
23714
|
+
};
|
|
23715
|
+
|
|
23716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
23717
|
+
var NAMED = 0.7;
|
|
23718
|
+
var MEMBER_ONLY = 0.3;
|
|
23719
|
+
var READ_LIMIT2 = 500;
|
|
23720
|
+
var mailThread = {
|
|
23721
|
+
id: "mail-thread",
|
|
23722
|
+
version: 1,
|
|
23723
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, since, owner, signal }) => {
|
|
23724
|
+
if (!project2)
|
|
23725
|
+
return [];
|
|
23726
|
+
const names2 = namesProject(project2);
|
|
23727
|
+
const people = confirmed.people.filter((person) => person !== owner);
|
|
23728
|
+
const found = [];
|
|
23729
|
+
for (const key of sources) {
|
|
23730
|
+
if (key.provider !== "email")
|
|
23731
|
+
continue;
|
|
23732
|
+
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
23733
|
+
if (!account)
|
|
23734
|
+
continue;
|
|
23735
|
+
const threads = /* @__PURE__ */ new Map();
|
|
23736
|
+
for (const { person, id: id2 } of await identitiesIn(store, people, "email")) {
|
|
23737
|
+
signal?.throwIfAborted();
|
|
23738
|
+
const emails = await store.mail.emails({
|
|
23739
|
+
accountId: account.id,
|
|
23740
|
+
participant: id2,
|
|
23741
|
+
since: Date.parse(since),
|
|
23742
|
+
limit: READ_LIMIT2
|
|
23743
|
+
});
|
|
23744
|
+
for (const email of emails) {
|
|
23745
|
+
const held = threads.get(email.emailThreadId) ?? {
|
|
23746
|
+
members: /* @__PURE__ */ new Set(),
|
|
23747
|
+
subject: email.subject,
|
|
23748
|
+
email: email.externalId
|
|
23749
|
+
};
|
|
23750
|
+
held.members.add(person);
|
|
23751
|
+
threads.set(email.emailThreadId, held);
|
|
23752
|
+
}
|
|
23753
|
+
}
|
|
23754
|
+
for (const [id2, { members, subject, email }] of threads) {
|
|
23755
|
+
const thread = (await store.mail.thread(id2))?.thread;
|
|
23756
|
+
if (!thread)
|
|
23757
|
+
continue;
|
|
23758
|
+
const named2 = names2(thread.subject ?? subject) !== void 0;
|
|
23759
|
+
const chat = formatReference({
|
|
23760
|
+
type: "chat",
|
|
23761
|
+
provider: "email",
|
|
23762
|
+
account: String(key.account),
|
|
23763
|
+
chat: thread.externalId
|
|
23764
|
+
});
|
|
23765
|
+
const who2 = [...members].sort();
|
|
23766
|
+
found.push({
|
|
23767
|
+
from: chat,
|
|
23768
|
+
to: project2.ref,
|
|
23769
|
+
kind: "member-of",
|
|
23770
|
+
weight: named2 ? NAMED : MEMBER_ONLY,
|
|
23771
|
+
why: `a thread with ${who2.length > 1 ? `${who2.length} members` : `a member (${who2[0]})`}${named2 ? "; its subject names the project" : ""}`,
|
|
23772
|
+
evidence: [
|
|
23773
|
+
formatReference({
|
|
23774
|
+
type: "message",
|
|
23775
|
+
provider: "email",
|
|
23776
|
+
account: String(key.account),
|
|
23777
|
+
chat: thread.externalId,
|
|
23778
|
+
message: email
|
|
23779
|
+
}),
|
|
23780
|
+
...who2
|
|
23781
|
+
].slice(0, 5)
|
|
23782
|
+
});
|
|
23783
|
+
}
|
|
23784
|
+
}
|
|
23785
|
+
return found;
|
|
23786
|
+
}, "candidates")
|
|
23787
|
+
};
|
|
23788
|
+
|
|
23789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
23790
|
+
var WEIGHT4 = 0.5;
|
|
23791
|
+
var memberChats = {
|
|
23792
|
+
id: "member-chats",
|
|
23793
|
+
version: 1,
|
|
23794
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, owner, signal }) => {
|
|
23795
|
+
if (!project2)
|
|
23796
|
+
return [];
|
|
23797
|
+
const people = confirmed.people.filter((person) => person !== owner);
|
|
23798
|
+
const found = [];
|
|
23799
|
+
for (const key of sources) {
|
|
23800
|
+
const members = /* @__PURE__ */ new Map();
|
|
23801
|
+
for (const { person, id: id2 } of await identitiesIn(store, people, key.provider)) {
|
|
23802
|
+
signal?.throwIfAborted();
|
|
23803
|
+
for (const chat of await store.chats.chatsWith(key, id2)) {
|
|
23804
|
+
if (chat.kind !== "group" && chat.kind !== "channel")
|
|
23805
|
+
continue;
|
|
23806
|
+
const held = members.get(String(chat.id)) ?? /* @__PURE__ */ new Set();
|
|
23807
|
+
held.add(person);
|
|
23808
|
+
members.set(String(chat.id), held);
|
|
23809
|
+
}
|
|
23810
|
+
}
|
|
23811
|
+
for (const [chat, held] of members) {
|
|
23812
|
+
if (held.size < 2)
|
|
23813
|
+
continue;
|
|
23814
|
+
const named2 = [...held].sort();
|
|
23815
|
+
found.push({
|
|
23816
|
+
from: chatRef2(key, chat),
|
|
23817
|
+
to: project2.ref,
|
|
23818
|
+
kind: "member-of",
|
|
23819
|
+
weight: WEIGHT4,
|
|
23820
|
+
why: `a group with ${held.size} confirmed members (${named2.slice(0, 3).join(", ")}${held.size > 3 ? ", \u2026" : ""})`,
|
|
23821
|
+
evidence: named2.slice(0, 5)
|
|
23822
|
+
});
|
|
23823
|
+
}
|
|
23824
|
+
}
|
|
23825
|
+
return found;
|
|
23826
|
+
}, "candidates")
|
|
23827
|
+
};
|
|
23828
|
+
|
|
23829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
23830
|
+
var WEIGHT5 = 0.6;
|
|
23831
|
+
var memberDialog = {
|
|
23832
|
+
id: "member-dialog",
|
|
23833
|
+
version: 1,
|
|
23834
|
+
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, owner, signal }) => {
|
|
23835
|
+
if (!project2)
|
|
23836
|
+
return [];
|
|
23837
|
+
const people = confirmed.people.filter((person) => person !== owner);
|
|
23838
|
+
const projects = /* @__PURE__ */ new Map();
|
|
23839
|
+
const found = [];
|
|
23840
|
+
for (const key of sources)
|
|
23841
|
+
for (const { person, id: id2 } of await identitiesIn(store, people, key.provider)) {
|
|
23842
|
+
signal?.throwIfAborted();
|
|
23843
|
+
for (const chat of await store.chats.chatsWith(key, id2)) {
|
|
23844
|
+
if (chat.kind !== "dialog")
|
|
23845
|
+
continue;
|
|
23846
|
+
if (!projects.has(person))
|
|
23847
|
+
projects.set(person, Math.max(1, await projectsOf(store, person)));
|
|
23848
|
+
const shared = projects.get(person) ?? 1;
|
|
23849
|
+
found.push({
|
|
23850
|
+
from: chatRef2(key, chat.id),
|
|
23851
|
+
to: project2.ref,
|
|
23852
|
+
kind: "member-of",
|
|
23853
|
+
weight: WEIGHT5 / shared,
|
|
23854
|
+
why: `a dialog with a member (${person})${shared > 1 ? `, who is in ${shared} projects` : ""}`,
|
|
23855
|
+
evidence: [person]
|
|
23856
|
+
});
|
|
23857
|
+
}
|
|
23858
|
+
}
|
|
23859
|
+
return found;
|
|
23860
|
+
}, "candidates")
|
|
23861
|
+
};
|
|
23862
|
+
|
|
23863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
23392
23864
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
23393
23865
|
async around(ref, window3) {
|
|
23394
23866
|
const at = parseLocator(ref);
|
|
@@ -23484,7 +23956,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23484
23956
|
};
|
|
23485
23957
|
}, "storedNeighbours");
|
|
23486
23958
|
|
|
23487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23488
23960
|
import { createHash as createHash2 } from "node:crypto";
|
|
23489
23961
|
var DAY2 = 864e5;
|
|
23490
23962
|
var MAX_TIME = 864e13;
|
|
@@ -23800,7 +24272,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23800
24272
|
return value;
|
|
23801
24273
|
}, "decodeCheckpoint");
|
|
23802
24274
|
|
|
23803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23804
24276
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23805
24277
|
var PAGE2 = 20;
|
|
23806
24278
|
var PEOPLE = 20;
|
|
@@ -24204,7 +24676,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
24204
24676
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
24205
24677
|
}, "peopleOf");
|
|
24206
24678
|
|
|
24207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
24208
24680
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
24209
24681
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
24210
24682
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -24248,7 +24720,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
24248
24720
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
24249
24721
|
}, "matchVocabularyTerms");
|
|
24250
24722
|
|
|
24251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
24252
24724
|
var KINDS = ["project", "tag", "topic"];
|
|
24253
24725
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
24254
24726
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -24303,7 +24775,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
24303
24775
|
};
|
|
24304
24776
|
}, "findEvidenceMentions");
|
|
24305
24777
|
|
|
24306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24778
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
24307
24779
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
24308
24780
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
24309
24781
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -24609,18 +25081,226 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
24609
25081
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
24610
25082
|
}, "purposeHintOf");
|
|
24611
25083
|
|
|
24612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
25085
|
+
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
25086
|
+
var PERSON_SCORERS = [emailDomain];
|
|
25087
|
+
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
25088
|
+
var DEFAULT_THRESHOLD = 0.5;
|
|
25089
|
+
var PERSON_THRESHOLD = 0.3;
|
|
25090
|
+
var DEFAULT_LIMIT = 20;
|
|
25091
|
+
var projectOf3 = /* @__PURE__ */ __name(async (store, reference) => {
|
|
25092
|
+
const ref = await canonicalProjectRef(store, reference);
|
|
25093
|
+
const entry = (await store.knowledge.vocabulary({ kind: "project" })).entries.find((one2) => one2.id === ref.slice(8));
|
|
25094
|
+
if (!entry)
|
|
25095
|
+
throw new CliError("not_found", `no project ${reference}`);
|
|
25096
|
+
return { ref, name: entry.name, key: entry.key, aliases: entry.aliases.map((alias) => alias.name) };
|
|
25097
|
+
}, "projectOf");
|
|
25098
|
+
var confirmedOf = /* @__PURE__ */ __name(async (store, project2) => {
|
|
25099
|
+
if (!project2)
|
|
25100
|
+
return { chats: [], people: [] };
|
|
25101
|
+
const members = (await store.knowledge.relations(null, project2.ref)).filter((one2) => one2.confirmed && one2.kind === "member-of" && one2.to === project2.ref);
|
|
25102
|
+
return {
|
|
25103
|
+
chats: [...new Set(members.map((one2) => one2.from).filter((ref) => ref.startsWith("chat:")))].sort(),
|
|
25104
|
+
people: [...new Set(members.map((one2) => one2.from).filter((ref) => ref.startsWith("person:")))].sort()
|
|
25105
|
+
};
|
|
25106
|
+
}, "confirmedOf");
|
|
25107
|
+
var checkedSources = /* @__PURE__ */ __name(async (store, sources) => {
|
|
25108
|
+
const stored = await store.accounts.accounts();
|
|
25109
|
+
const choices = stored.map((one2) => `${one2.provider}:${one2.account}`);
|
|
25110
|
+
if (!Array.isArray(sources) || sources.length === 0)
|
|
25111
|
+
throw new CliError("validation_error", "a scan names the accounts it reads; none is picked for you", {
|
|
25112
|
+
param: "source",
|
|
25113
|
+
choices
|
|
25114
|
+
});
|
|
25115
|
+
for (const source of sources)
|
|
25116
|
+
if (!stored.some((one2) => one2.provider === source.provider && String(one2.account) === String(source.account)))
|
|
25117
|
+
throw new CliError("not_found", `the store holds no account ${source.provider}:${source.account}`, {
|
|
25118
|
+
param: "source",
|
|
25119
|
+
choices
|
|
25120
|
+
});
|
|
25121
|
+
return sources;
|
|
25122
|
+
}, "checkedSources");
|
|
25123
|
+
var pairKey = /* @__PURE__ */ __name(({ from, to, kind }) => `${from}\0${to}\0${kind}`, "pairKey");
|
|
25124
|
+
var combinedScore = /* @__PURE__ */ __name((weights) => Math.round((1 - weights.reduce((left, weight) => left * (1 - weight), 1)) * 1e3) / 1e3, "combinedScore");
|
|
25125
|
+
var scanProjectLinks = /* @__PURE__ */ __name(async (store, input) => {
|
|
25126
|
+
const limit = input.limit ?? DEFAULT_LIMIT;
|
|
25127
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 50)
|
|
25128
|
+
throw new CliError("validation_error", "a scan proposes 1\u201350 links a run", { param: "limit" });
|
|
25129
|
+
const threshold = input.threshold ?? (input.project === null ? PERSON_THRESHOLD : DEFAULT_THRESHOLD);
|
|
25130
|
+
if (typeof threshold !== "number" || !(threshold > 0 && threshold <= 1))
|
|
25131
|
+
throw new CliError("validation_error", "a scan's threshold is more than 0 and at most 1", { param: "threshold" });
|
|
25132
|
+
const since = Date.parse(input.since);
|
|
25133
|
+
if (Number.isNaN(since))
|
|
25134
|
+
throw new CliError("validation_error", "a scan's window starts at an ISO 8601 time", { param: "since" });
|
|
25135
|
+
const sources = await checkedSources(store, input.sources);
|
|
25136
|
+
const project2 = input.project === null ? null : await projectOf3(store, input.project);
|
|
25137
|
+
const owner = await store.people.owner();
|
|
25138
|
+
const scorerInput = {
|
|
25139
|
+
store,
|
|
25140
|
+
project: project2,
|
|
25141
|
+
confirmed: await confirmedOf(store, project2),
|
|
25142
|
+
sources,
|
|
25143
|
+
since: new Date(since).toISOString(),
|
|
25144
|
+
purposes: input.purposes ?? BUILT_IN_PURPOSES,
|
|
25145
|
+
owner: owner ? `person:${owner.uid}` : null,
|
|
25146
|
+
...input.signal ? { signal: input.signal } : {}
|
|
25147
|
+
};
|
|
25148
|
+
const scorers = input.scorers ?? (project2 ? SCORERS : PERSON_SCORERS);
|
|
25149
|
+
const skipped = {
|
|
25150
|
+
confirmed: 0,
|
|
25151
|
+
rejected: 0,
|
|
25152
|
+
belowThreshold: 0,
|
|
25153
|
+
overLimit: 0,
|
|
25154
|
+
nameOnly: 0,
|
|
25155
|
+
unresolved: 0
|
|
25156
|
+
};
|
|
25157
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
25158
|
+
const nameOnly = /* @__PURE__ */ new Set();
|
|
25159
|
+
for (const scorer of scorers) {
|
|
25160
|
+
input.signal?.throwIfAborted();
|
|
25161
|
+
for (const candidate of await scorer.candidates(scorerInput)) {
|
|
25162
|
+
const key = pairKey(candidate);
|
|
25163
|
+
const verdict = await admissible(store, scorerInput, candidate);
|
|
25164
|
+
if (verdict === "owner")
|
|
25165
|
+
continue;
|
|
25166
|
+
if (verdict === "name-only") {
|
|
25167
|
+
if (!nameOnly.has(key))
|
|
25168
|
+
skipped.nameOnly++;
|
|
25169
|
+
nameOnly.add(key);
|
|
25170
|
+
continue;
|
|
25171
|
+
}
|
|
25172
|
+
if (verdict !== "ok") {
|
|
25173
|
+
skipped.unresolved++;
|
|
25174
|
+
continue;
|
|
25175
|
+
}
|
|
25176
|
+
const weight = Math.min(1, Math.max(0, candidate.weight));
|
|
25177
|
+
const held = pairs.get(key) ?? { candidate, signals: /* @__PURE__ */ new Map() };
|
|
25178
|
+
const scorerId = `${scorer.id}@${scorer.version}`;
|
|
25179
|
+
const before2 = held.signals.get(scorerId);
|
|
25180
|
+
if (!before2 || before2.weight < weight)
|
|
25181
|
+
held.signals.set(scorerId, {
|
|
25182
|
+
scorer: scorerId,
|
|
25183
|
+
weight,
|
|
25184
|
+
why: candidate.why.slice(0, 500),
|
|
25185
|
+
...candidate.purpose && scorerInput.purposes.includes(candidate.purpose) ? { purpose: candidate.purpose } : {}
|
|
25186
|
+
});
|
|
25187
|
+
held.candidate = {
|
|
25188
|
+
...held.candidate,
|
|
25189
|
+
evidence: [.../* @__PURE__ */ new Set([...held.candidate.evidence, ...candidate.evidence])]
|
|
25190
|
+
};
|
|
25191
|
+
pairs.set(key, held);
|
|
25192
|
+
}
|
|
25193
|
+
}
|
|
25194
|
+
const scored = [...pairs.values()].map(({ candidate, signals: signals2 }) => {
|
|
25195
|
+
const list3 = [...signals2.values()].sort((a, b) => b.weight - a.weight || a.scorer.localeCompare(b.scorer));
|
|
25196
|
+
const purpose = list3.find((one2) => one2.purpose)?.purpose;
|
|
25197
|
+
return {
|
|
25198
|
+
candidate,
|
|
25199
|
+
purpose,
|
|
25200
|
+
signals: list3.map(({ scorer, weight, why }) => ({ scorer, weight, why })),
|
|
25201
|
+
score: combinedScore(list3.map((one2) => one2.weight))
|
|
25202
|
+
};
|
|
25203
|
+
}).sort((a, b) => b.score - a.score || a.candidate.from.localeCompare(b.candidate.from));
|
|
25204
|
+
const proposals = [];
|
|
25205
|
+
let fresh = 0;
|
|
25206
|
+
for (const { candidate, purpose, signals: signals2, score } of scored) {
|
|
25207
|
+
const state = await store.knowledge.relationState(null, candidate);
|
|
25208
|
+
if (!state) {
|
|
25209
|
+
skipped.unresolved++;
|
|
25210
|
+
continue;
|
|
25211
|
+
}
|
|
25212
|
+
if (state.linked) {
|
|
25213
|
+
skipped.confirmed++;
|
|
25214
|
+
continue;
|
|
25215
|
+
}
|
|
25216
|
+
if (state.rejected || await rejectedReversed(store, candidate)) {
|
|
25217
|
+
skipped.rejected++;
|
|
25218
|
+
continue;
|
|
25219
|
+
}
|
|
25220
|
+
if (score < threshold) {
|
|
25221
|
+
skipped.belowThreshold++;
|
|
25222
|
+
continue;
|
|
25223
|
+
}
|
|
25224
|
+
if (!state.pending && fresh >= limit) {
|
|
25225
|
+
skipped.overLimit++;
|
|
25226
|
+
continue;
|
|
25227
|
+
}
|
|
25228
|
+
if (!state.pending)
|
|
25229
|
+
fresh++;
|
|
25230
|
+
const { identity: _identity, purpose: _purpose, weight: _weight, why: _why, ...pair } = candidate;
|
|
25231
|
+
const evidence = candidate.evidence.slice(0, 5);
|
|
25232
|
+
const proposal = {
|
|
25233
|
+
...pair,
|
|
25234
|
+
weight: score,
|
|
25235
|
+
why: signals2.map((one2) => one2.why).join("; "),
|
|
25236
|
+
evidence,
|
|
25237
|
+
...purpose ? { purpose } : {},
|
|
25238
|
+
score,
|
|
25239
|
+
signals: signals2
|
|
25240
|
+
};
|
|
25241
|
+
if (!input.write) {
|
|
25242
|
+
proposals.push({ ...proposal, id: state.pending?.id ?? null, state: "dry-run" });
|
|
25243
|
+
continue;
|
|
25244
|
+
}
|
|
25245
|
+
const written = await store.knowledge.proposeRelation(null, {
|
|
25246
|
+
from: pair.from,
|
|
25247
|
+
to: pair.to,
|
|
25248
|
+
kind: pair.kind,
|
|
25249
|
+
evidence,
|
|
25250
|
+
reason: proposal.why.slice(0, 2e3),
|
|
25251
|
+
score,
|
|
25252
|
+
signals: signals2,
|
|
25253
|
+
...purpose ? { purpose } : {}
|
|
25254
|
+
}, SCAN_BOT);
|
|
25255
|
+
proposals.push({
|
|
25256
|
+
...proposal,
|
|
25257
|
+
id: written.id,
|
|
25258
|
+
state: !state.pending ? "new" : JSON.stringify(written.payload) === JSON.stringify(state.pending.payload) ? "unchanged" : "updated"
|
|
25259
|
+
});
|
|
25260
|
+
}
|
|
25261
|
+
return { project: project2?.ref ?? null, proposals, skipped };
|
|
25262
|
+
}, "scanProjectLinks");
|
|
25263
|
+
var admissible = /* @__PURE__ */ __name(async (store, input, candidate) => {
|
|
25264
|
+
if (candidate.from === candidate.to || !Number.isFinite(candidate.weight))
|
|
25265
|
+
return "unresolved";
|
|
25266
|
+
if (input.project && candidate.to !== input.project.ref && !candidate.to.startsWith("person:"))
|
|
25267
|
+
return "unresolved";
|
|
25268
|
+
if (candidate.from === input.owner || candidate.to === input.owner)
|
|
25269
|
+
return "owner";
|
|
25270
|
+
if (candidate.from.startsWith("person:")) {
|
|
25271
|
+
const identity = candidate.identity === void 0 ? void 0 : referenceOf(candidate.identity);
|
|
25272
|
+
if (identity?.type !== "contact")
|
|
25273
|
+
return "name-only";
|
|
25274
|
+
const person = await store.people.personOf({ provider: identity.provider, id: identity.id });
|
|
25275
|
+
return person !== void 0 && `person:${person.uid}` === candidate.from ? "ok" : "name-only";
|
|
25276
|
+
}
|
|
25277
|
+
if (candidate.from.startsWith("chat:")) {
|
|
25278
|
+
const chat = referenceOf(candidate.from);
|
|
25279
|
+
return chat?.type === "chat" && input.sources.some((source) => sameAccount(source, chat)) ? "ok" : "unresolved";
|
|
25280
|
+
}
|
|
25281
|
+
return "unresolved";
|
|
25282
|
+
}, "admissible");
|
|
25283
|
+
var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
25284
|
+
try {
|
|
25285
|
+
return parseReference(text2);
|
|
25286
|
+
} catch {
|
|
25287
|
+
return void 0;
|
|
25288
|
+
}
|
|
25289
|
+
}, "referenceOf");
|
|
25290
|
+
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");
|
|
25291
|
+
|
|
25292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
24613
25293
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24614
25294
|
|
|
24615
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
24616
25296
|
import { lstat } from "node:fs/promises";
|
|
24617
25297
|
|
|
24618
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24619
25299
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
24620
25300
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
24621
25301
|
import { join as join2 } from "node:path";
|
|
24622
25302
|
|
|
24623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
24624
25304
|
import { createHash as createHash3 } from "node:crypto";
|
|
24625
25305
|
var metadataLimit = 16384;
|
|
24626
25306
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -24680,7 +25360,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
24680
25360
|
}
|
|
24681
25361
|
}, "readPartialMetadata");
|
|
24682
25362
|
|
|
24683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
24684
25364
|
import { randomUUID } from "node:crypto";
|
|
24685
25365
|
import { open, rename, unlink } from "node:fs/promises";
|
|
24686
25366
|
import { join } from "node:path";
|
|
@@ -24772,7 +25452,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
24772
25452
|
};
|
|
24773
25453
|
}, "partialWriter");
|
|
24774
25454
|
|
|
24775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24776
25456
|
var NativeRecordingPartialStore = class {
|
|
24777
25457
|
static {
|
|
24778
25458
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -24879,12 +25559,12 @@ var NativeRecordingPartialStore = class {
|
|
|
24879
25559
|
}
|
|
24880
25560
|
};
|
|
24881
25561
|
|
|
24882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24883
25563
|
import { createHash as createHash5 } from "node:crypto";
|
|
24884
25564
|
import { link as link2 } from "node:fs/promises";
|
|
24885
25565
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
24886
25566
|
|
|
24887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
24888
25568
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
24889
25569
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
24890
25570
|
signal?.throwIfAborted();
|
|
@@ -24919,7 +25599,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
24919
25599
|
signal?.throwIfAborted();
|
|
24920
25600
|
}, "commitPublication");
|
|
24921
25601
|
|
|
24922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
24923
25603
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24924
25604
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
24925
25605
|
import { join as join3 } from "node:path";
|
|
@@ -24992,7 +25672,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
24992
25672
|
}
|
|
24993
25673
|
}, "writePublicationJournal");
|
|
24994
25674
|
|
|
24995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24996
25676
|
var NativeRecordingPublication = class {
|
|
24997
25677
|
static {
|
|
24998
25678
|
__name(this, "NativeRecordingPublication");
|
|
@@ -25065,7 +25745,7 @@ var NativeRecordingPublication = class {
|
|
|
25065
25745
|
}
|
|
25066
25746
|
};
|
|
25067
25747
|
|
|
25068
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
25069
25749
|
import { createHash as createHash6 } from "node:crypto";
|
|
25070
25750
|
import { readdir } from "node:fs/promises";
|
|
25071
25751
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -25152,7 +25832,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
25152
25832
|
beforePublish
|
|
25153
25833
|
}), "commitMediaEntry");
|
|
25154
25834
|
|
|
25155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25156
25836
|
var validator = '"media-completed-v1"';
|
|
25157
25837
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
25158
25838
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -25253,7 +25933,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
25253
25933
|
return entry;
|
|
25254
25934
|
}, "archiveMediaFile");
|
|
25255
25935
|
|
|
25256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
25257
25937
|
import { mkdir, realpath } from "node:fs/promises";
|
|
25258
25938
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
25259
25939
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -25320,7 +26000,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
25320
26000
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
25321
26001
|
}, "withMediaArchiveLocks");
|
|
25322
26002
|
|
|
25323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25324
26004
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
25325
26005
|
if (value === void 0)
|
|
25326
26006
|
return void 0;
|
|
@@ -25473,7 +26153,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
25473
26153
|
}, { create: true });
|
|
25474
26154
|
}, "archiveMedia");
|
|
25475
26155
|
|
|
25476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
25477
26157
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
25478
26158
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
25479
26159
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -25626,7 +26306,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
25626
26306
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
25627
26307
|
}, "moveMediaArchive");
|
|
25628
26308
|
|
|
25629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
25630
26310
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
25631
26311
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
25632
26312
|
}, "progress") }) => {
|
|
@@ -25649,7 +26329,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25649
26329
|
}
|
|
25650
26330
|
await nativeRuntime({ env, progress });
|
|
25651
26331
|
progress(`${model.id}: loading it once to check it works`);
|
|
25652
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
26332
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-YNH5M6UL.js");
|
|
25653
26333
|
const embedder = await openEmbedder2(model, directory2);
|
|
25654
26334
|
try {
|
|
25655
26335
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -25670,7 +26350,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
25670
26350
|
}
|
|
25671
26351
|
await nativeRuntime({ env, progress });
|
|
25672
26352
|
progress(`${model.id}: loading it once to check it works`);
|
|
25673
|
-
const { openReranker } = await import("./rerank-
|
|
26353
|
+
const { openReranker } = await import("./rerank-SCBTCBPO.js");
|
|
25674
26354
|
const reranker = await openReranker(model, directory2);
|
|
25675
26355
|
try {
|
|
25676
26356
|
await reranker.score("check", ["check"]);
|
|
@@ -25688,7 +26368,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25688
26368
|
await installFiles(placedImage(model, directory2), { progress });
|
|
25689
26369
|
}
|
|
25690
26370
|
progress(`${model.id}: loading it once to check it works`);
|
|
25691
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
26371
|
+
const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
|
|
25692
26372
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
25693
26373
|
try {
|
|
25694
26374
|
const vector = await embedder.embedQuery("check");
|
|
@@ -25700,7 +26380,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25700
26380
|
return { model, directory: directory2 };
|
|
25701
26381
|
}, "downloadImageModel");
|
|
25702
26382
|
|
|
25703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
25704
26384
|
var MONEY_REQUEST = "money-request";
|
|
25705
26385
|
var MONEY_DONE = "money-done";
|
|
25706
26386
|
var PROMISE = "promise";
|
|
@@ -25734,10 +26414,10 @@ var MONEY_WORDS = [
|
|
|
25734
26414
|
}
|
|
25735
26415
|
];
|
|
25736
26416
|
|
|
25737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
25738
26418
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
25739
26419
|
|
|
25740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
25741
26421
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
25742
26422
|
var MONEY_DONE_FORMS = words([
|
|
25743
26423
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -25777,7 +26457,7 @@ var PROMISE_FORMS = words([
|
|
|
25777
26457
|
"estar\xE1 listo"
|
|
25778
26458
|
]);
|
|
25779
26459
|
|
|
25780
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
25781
26461
|
var EXCERPT_CHARS = 80;
|
|
25782
26462
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
25783
26463
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -25799,7 +26479,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
25799
26479
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
25800
26480
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
25801
26481
|
|
|
25802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
25803
26483
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
25804
26484
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
25805
26485
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -25879,7 +26559,7 @@ var amounts = {
|
|
|
25879
26559
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "open" ? [{ chat: item2.chat, weight: 2, why: "money open" }] : []), "attention")
|
|
25880
26560
|
};
|
|
25881
26561
|
|
|
25882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
25883
26563
|
var children = {
|
|
25884
26564
|
id: "children",
|
|
25885
26565
|
version: 1,
|
|
@@ -25908,7 +26588,7 @@ var children = {
|
|
|
25908
26588
|
}, "read")
|
|
25909
26589
|
};
|
|
25910
26590
|
|
|
25911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
25912
26592
|
var coverage = {
|
|
25913
26593
|
id: "coverage",
|
|
25914
26594
|
version: 1,
|
|
@@ -25937,7 +26617,7 @@ var coverage = {
|
|
|
25937
26617
|
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")
|
|
25938
26618
|
};
|
|
25939
26619
|
|
|
25940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/last-message.js
|
|
25941
26621
|
var lastMessage = {
|
|
25942
26622
|
id: "last-message",
|
|
25943
26623
|
version: 1,
|
|
@@ -25959,7 +26639,7 @@ var lastMessage = {
|
|
|
25959
26639
|
}, "read")
|
|
25960
26640
|
};
|
|
25961
26641
|
|
|
25962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26642
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25963
26643
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
25964
26644
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
25965
26645
|
signal: "payments",
|
|
@@ -26009,7 +26689,7 @@ var payments = {
|
|
|
26009
26689
|
}, "read")
|
|
26010
26690
|
};
|
|
26011
26691
|
|
|
26012
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26692
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
26013
26693
|
var PATTERNS_PER_CHAT = 3;
|
|
26014
26694
|
var DAY3 = 864e5;
|
|
26015
26695
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -26098,7 +26778,7 @@ var promises = {
|
|
|
26098
26778
|
}, "read")
|
|
26099
26779
|
};
|
|
26100
26780
|
|
|
26101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
26102
26782
|
var PER_SIDE = 5;
|
|
26103
26783
|
var WEEK = 7 * 864e5;
|
|
26104
26784
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26129,7 +26809,7 @@ var questions2 = {
|
|
|
26129
26809
|
}, "attention")
|
|
26130
26810
|
};
|
|
26131
26811
|
|
|
26132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26133
26813
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26134
26814
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
26135
26815
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -26197,14 +26877,14 @@ var replyNext = {
|
|
|
26197
26877
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
26198
26878
|
};
|
|
26199
26879
|
|
|
26200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26201
|
-
var
|
|
26202
|
-
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${
|
|
26880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
26881
|
+
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
26882
|
+
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
26203
26883
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
26204
26884
|
const words3 = normalize(query).split(" ").filter(Boolean).map(wholeWord);
|
|
26205
26885
|
return (text2) => {
|
|
26206
|
-
const
|
|
26207
|
-
return words3.length > 0 && words3.every((word) => word.test(
|
|
26886
|
+
const folded2 = normalize(text2);
|
|
26887
|
+
return words3.length > 0 && words3.every((word) => word.test(folded2));
|
|
26208
26888
|
};
|
|
26209
26889
|
}, "matcherOf");
|
|
26210
26890
|
var topics = {
|
|
@@ -26243,7 +26923,7 @@ var topics = {
|
|
|
26243
26923
|
}, "read")
|
|
26244
26924
|
};
|
|
26245
26925
|
|
|
26246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
26247
26927
|
var STATUS_SIGNALS = [
|
|
26248
26928
|
lastMessage,
|
|
26249
26929
|
replyNext,
|
|
@@ -26256,7 +26936,7 @@ var STATUS_SIGNALS = [
|
|
|
26256
26936
|
children
|
|
26257
26937
|
];
|
|
26258
26938
|
|
|
26259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
26260
26940
|
var DAY4 = 864e5;
|
|
26261
26941
|
var STATUS_WINDOW = 300;
|
|
26262
26942
|
var STATUS_CHATS = 16;
|
|
@@ -26438,7 +27118,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26438
27118
|
};
|
|
26439
27119
|
}, "projectStatus");
|
|
26440
27120
|
|
|
26441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
26442
27122
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
26443
27123
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
26444
27124
|
if (deps.offline)
|
|
@@ -26510,7 +27190,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
26510
27190
|
};
|
|
26511
27191
|
}, "accountService");
|
|
26512
27192
|
|
|
26513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
26514
27194
|
var MINUTE = 6e4;
|
|
26515
27195
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
26516
27196
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -26529,7 +27209,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
26529
27209
|
return new Date(at - at % MINUTE).toISOString();
|
|
26530
27210
|
}, "sendTime");
|
|
26531
27211
|
|
|
26532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
26533
27213
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
26534
27214
|
try {
|
|
26535
27215
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -26776,7 +27456,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
26776
27456
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
26777
27457
|
}, "linkLimits");
|
|
26778
27458
|
|
|
26779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
26780
27460
|
var THREADS_PAGE = 500;
|
|
26781
27461
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
26782
27462
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -26855,7 +27535,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
26855
27535
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
26856
27536
|
}, "readMail");
|
|
26857
27537
|
|
|
26858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
26859
27539
|
var NO_MAIL = "no_mail";
|
|
26860
27540
|
var MAIL = "email";
|
|
26861
27541
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -26902,7 +27582,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26902
27582
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
26903
27583
|
}, "accountsOfKind");
|
|
26904
27584
|
|
|
26905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
26906
27586
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
26907
27587
|
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");
|
|
26908
27588
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -27250,7 +27930,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
27250
27930
|
};
|
|
27251
27931
|
}, "statsLucene");
|
|
27252
27932
|
|
|
27253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
27254
27934
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
27255
27935
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
27256
27936
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -27419,7 +28099,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27419
28099
|
};
|
|
27420
28100
|
}, "readRankingSelection");
|
|
27421
28101
|
|
|
27422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
27423
28103
|
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");
|
|
27424
28104
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
27425
28105
|
command,
|
|
@@ -27429,7 +28109,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
27429
28109
|
fieldsVersion: FIELD_VERSION
|
|
27430
28110
|
}), "searchRecordOf");
|
|
27431
28111
|
|
|
27432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
27433
28113
|
function invalid2(message) {
|
|
27434
28114
|
throw new CliError("validation_error", message);
|
|
27435
28115
|
}
|
|
@@ -27723,7 +28403,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
27723
28403
|
}, "evidence")
|
|
27724
28404
|
}), "adminStatisticsService");
|
|
27725
28405
|
|
|
27726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
27727
28407
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
27728
28408
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
27729
28409
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -27860,16 +28540,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27860
28540
|
return { plan, repair };
|
|
27861
28541
|
}, "gapsService");
|
|
27862
28542
|
|
|
27863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
27864
28544
|
import { createHash as createHash9 } from "node:crypto";
|
|
27865
28545
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
27866
28546
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
27867
28547
|
|
|
27868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
27869
28549
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
27870
28550
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
27871
28551
|
|
|
27872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28552
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
27873
28553
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
27874
28554
|
import { open as open4, stat } from "node:fs/promises";
|
|
27875
28555
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -27979,8 +28659,8 @@ var refusedPlace = /* @__PURE__ */ __name((path, app, env, platform = process.pl
|
|
|
27979
28659
|
ancestor = parent;
|
|
27980
28660
|
}
|
|
27981
28661
|
}
|
|
27982
|
-
const
|
|
27983
|
-
const fold2 = /* @__PURE__ */ __name((text2) =>
|
|
28662
|
+
const folded2 = platform === "darwin" || platform === "win32";
|
|
28663
|
+
const fold2 = /* @__PURE__ */ __name((text2) => folded2 ? text2.toLowerCase() : text2, "fold");
|
|
27984
28664
|
const parts = new Set([...CREDENTIAL_PARTS].map(fold2));
|
|
27985
28665
|
const runs = CREDENTIAL_RUNS.map((run) => run.map(fold2));
|
|
27986
28666
|
const named2 = /* @__PURE__ */ __name((candidate) => {
|
|
@@ -28071,7 +28751,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
28071
28751
|
return { name, source };
|
|
28072
28752
|
}, "readStickerFile");
|
|
28073
28753
|
|
|
28074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28754
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
28075
28755
|
var MAX_FILES = 1e4;
|
|
28076
28756
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
28077
28757
|
if (refusedPlace(directory2, app, env))
|
|
@@ -28140,15 +28820,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
28140
28820
|
return choices;
|
|
28141
28821
|
}, "directoryPaths");
|
|
28142
28822
|
|
|
28143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28144
28824
|
import { posix } from "node:path";
|
|
28145
28825
|
|
|
28146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28147
28827
|
import { setImmediate as tick } from "node:timers/promises";
|
|
28148
28828
|
import { crc32 } from "node:zlib";
|
|
28149
28829
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
28150
28830
|
|
|
28151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
28152
28832
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
28153
28833
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
28154
28834
|
var SAMPLE = 65536;
|
|
@@ -28250,7 +28930,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
28250
28930
|
return result.text;
|
|
28251
28931
|
}, "decodeXml");
|
|
28252
28932
|
|
|
28253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28254
28934
|
var MAX_PART = 10 * 1024 * 1024;
|
|
28255
28935
|
var MAX_ENTRIES = 1e3;
|
|
28256
28936
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28465,7 +29145,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
28465
29145
|
return found;
|
|
28466
29146
|
}, "elements");
|
|
28467
29147
|
|
|
28468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
28469
29149
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
28470
29150
|
let name = "";
|
|
28471
29151
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -28520,7 +29200,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
28520
29200
|
return { text: parts.join("").trim(), truncated: false };
|
|
28521
29201
|
}, "sheetText");
|
|
28522
29202
|
|
|
28523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28524
29204
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
28525
29205
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
28526
29206
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -28920,10 +29600,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
28920
29600
|
}
|
|
28921
29601
|
}, "readDocument");
|
|
28922
29602
|
|
|
28923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28924
29604
|
import { extname as extname3 } from "node:path";
|
|
28925
29605
|
|
|
28926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
28927
29607
|
import { readFileSync } from "node:fs";
|
|
28928
29608
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
28929
29609
|
import { fileURLToPath } from "node:url";
|
|
@@ -28984,7 +29664,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
28984
29664
|
}
|
|
28985
29665
|
}, "derived");
|
|
28986
29666
|
|
|
28987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
28988
29668
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
28989
29669
|
var image2 = {
|
|
28990
29670
|
id: "image",
|
|
@@ -28993,7 +29673,7 @@ var image2 = {
|
|
|
28993
29673
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
28994
29674
|
};
|
|
28995
29675
|
|
|
28996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
28997
29677
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
28998
29678
|
var doc = {
|
|
28999
29679
|
id: "doc",
|
|
@@ -29005,7 +29685,7 @@ var doc = {
|
|
|
29005
29685
|
}), "read")
|
|
29006
29686
|
};
|
|
29007
29687
|
|
|
29008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
29009
29689
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
29010
29690
|
var docx = {
|
|
29011
29691
|
id: "docx",
|
|
@@ -29018,7 +29698,7 @@ var docx = {
|
|
|
29018
29698
|
}), "read")
|
|
29019
29699
|
};
|
|
29020
29700
|
|
|
29021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29701
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
29022
29702
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
29023
29703
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
29024
29704
|
"fonttbl",
|
|
@@ -29194,7 +29874,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
29194
29874
|
}, "htmlText");
|
|
29195
29875
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
29196
29876
|
|
|
29197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
29198
29878
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
29199
29879
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
29200
29880
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -29250,7 +29930,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
29250
29930
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
29251
29931
|
}, "markdownSections");
|
|
29252
29932
|
|
|
29253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
29254
29934
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
29255
29935
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
29256
29936
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29321,7 +30001,7 @@ var html = {
|
|
|
29321
30001
|
}, "read")
|
|
29322
30002
|
};
|
|
29323
30003
|
|
|
29324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29325
30005
|
var office = {
|
|
29326
30006
|
id: "office",
|
|
29327
30007
|
version: documentExtractor("odt"),
|
|
@@ -29332,7 +30012,7 @@ var office = {
|
|
|
29332
30012
|
}, "read")
|
|
29333
30013
|
};
|
|
29334
30014
|
|
|
29335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29336
30016
|
var pdf = {
|
|
29337
30017
|
id: "pdf",
|
|
29338
30018
|
version: "unpdf",
|
|
@@ -29399,7 +30079,7 @@ var pdf = {
|
|
|
29399
30079
|
}), "read")
|
|
29400
30080
|
};
|
|
29401
30081
|
|
|
29402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
29403
30083
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
29404
30084
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
29405
30085
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -29419,7 +30099,7 @@ var plain = {
|
|
|
29419
30099
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
29420
30100
|
};
|
|
29421
30101
|
|
|
29422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
29423
30103
|
var rtf = {
|
|
29424
30104
|
id: "rtf",
|
|
29425
30105
|
version: "v1",
|
|
@@ -29427,10 +30107,10 @@ var rtf = {
|
|
|
29427
30107
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
29428
30108
|
};
|
|
29429
30109
|
|
|
29430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30110
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29431
30111
|
import { basename as basename5 } from "node:path";
|
|
29432
30112
|
|
|
29433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
29434
30114
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
29435
30115
|
const cells = [];
|
|
29436
30116
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -29468,7 +30148,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
29468
30148
|
return { cells, truncated };
|
|
29469
30149
|
}, "delimitedSpans");
|
|
29470
30150
|
|
|
29471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29472
30152
|
var DELIMITED = {
|
|
29473
30153
|
".csv": ",",
|
|
29474
30154
|
".tsv": " ",
|
|
@@ -29507,7 +30187,7 @@ var sheets = {
|
|
|
29507
30187
|
}, "read")
|
|
29508
30188
|
};
|
|
29509
30189
|
|
|
29510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
29511
30191
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
29512
30192
|
var HEAD_BYTES = 1024;
|
|
29513
30193
|
var readers = [...BUILT_INS2];
|
|
@@ -29517,7 +30197,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
29517
30197
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
29518
30198
|
}, "readWithRegistry");
|
|
29519
30199
|
|
|
29520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29521
30201
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
29522
30202
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
29523
30203
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -30596,7 +31276,7 @@ function imageSize(input) {
|
|
|
30596
31276
|
}
|
|
30597
31277
|
__name(imageSize, "imageSize");
|
|
30598
31278
|
|
|
30599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
30600
31280
|
var MAX_PAGES = 20;
|
|
30601
31281
|
var MAX_PIXELS = 2e7;
|
|
30602
31282
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -30747,7 +31427,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
30747
31427
|
}
|
|
30748
31428
|
}, "ocrPdf");
|
|
30749
31429
|
|
|
30750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
30751
31431
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
30752
31432
|
const limits = pdfPreviewLimits(env);
|
|
30753
31433
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -30824,7 +31504,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
30824
31504
|
}
|
|
30825
31505
|
}, "pdfPreview");
|
|
30826
31506
|
|
|
30827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
30828
31508
|
import { createHash as createHash8 } from "node:crypto";
|
|
30829
31509
|
import { constants } from "node:fs";
|
|
30830
31510
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -30932,7 +31612,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
30932
31612
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
30933
31613
|
}, "transferMime");
|
|
30934
31614
|
|
|
30935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
30936
31616
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
30937
31617
|
import { link as link3, rm } from "node:fs/promises";
|
|
30938
31618
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -31046,7 +31726,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
31046
31726
|
}
|
|
31047
31727
|
}, "save");
|
|
31048
31728
|
|
|
31049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
31050
31730
|
var ATTACHMENT_QUERY = {
|
|
31051
31731
|
entity: "attachment",
|
|
31052
31732
|
backend: "sql",
|
|
@@ -31469,7 +32149,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31469
32149
|
}, "setText")
|
|
31470
32150
|
}), "attachmentsService");
|
|
31471
32151
|
|
|
31472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
31473
32153
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
31474
32154
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
31475
32155
|
const store = await accountStore(deps);
|
|
@@ -31499,7 +32179,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31499
32179
|
}, "list")
|
|
31500
32180
|
}), "chatDocumentsService");
|
|
31501
32181
|
|
|
31502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
31503
32183
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
31504
32184
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
31505
32185
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -31586,7 +32266,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
31586
32266
|
}
|
|
31587
32267
|
}, "isRetentionSelection");
|
|
31588
32268
|
|
|
31589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
31590
32270
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
31591
32271
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
31592
32272
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -31793,7 +32473,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31793
32473
|
};
|
|
31794
32474
|
}, "countersService");
|
|
31795
32475
|
|
|
31796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
31797
32477
|
var SYNC_KEY = "messages.sync-first";
|
|
31798
32478
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
31799
32479
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -31925,7 +32605,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
31925
32605
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
31926
32606
|
}), "withRefresh");
|
|
31927
32607
|
|
|
31928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
31929
32609
|
var CANDIDATES = 50;
|
|
31930
32610
|
var WORD_HITS = 200;
|
|
31931
32611
|
var RRF_K = 60;
|
|
@@ -32200,13 +32880,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
32200
32880
|
return mean.map((value) => value / length);
|
|
32201
32881
|
}, "meanOf");
|
|
32202
32882
|
|
|
32203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
32204
32884
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
32205
32885
|
...embeddingsMaintenance(deps),
|
|
32206
32886
|
...embeddingsSearch(deps)
|
|
32207
32887
|
}), "embeddingsService");
|
|
32208
32888
|
|
|
32209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
32210
32890
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
32211
32891
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
32212
32892
|
if (deps.offline)
|
|
@@ -32347,7 +33027,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32347
33027
|
};
|
|
32348
33028
|
}, "foldersService");
|
|
32349
33029
|
|
|
32350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
32351
33031
|
var REVIEW_COUNT = 500;
|
|
32352
33032
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
32353
33033
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -32426,7 +33106,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
32426
33106
|
};
|
|
32427
33107
|
}, "mentionsService");
|
|
32428
33108
|
|
|
32429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
32430
33110
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
32431
33111
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
32432
33112
|
const { text: text2, spans } = formatted2;
|
|
@@ -32486,7 +33166,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
32486
33166
|
};
|
|
32487
33167
|
}, "visibleFormattedText");
|
|
32488
33168
|
|
|
32489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
32490
33170
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
32491
33171
|
position,
|
|
32492
33172
|
kind,
|
|
@@ -32535,7 +33215,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
32535
33215
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
32536
33216
|
}, "validatePermalink");
|
|
32537
33217
|
|
|
32538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
32539
33219
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
32540
33220
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
32541
33221
|
return `${seconds / 86400}d`;
|
|
@@ -32567,7 +33247,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
32567
33247
|
return seconds;
|
|
32568
33248
|
}, "pinDurationOf");
|
|
32569
33249
|
|
|
32570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
32571
33251
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
32572
33252
|
if (sendAs === void 0) {
|
|
32573
33253
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -32592,7 +33272,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
32592
33272
|
return sendAs;
|
|
32593
33273
|
}, "typedSendAs");
|
|
32594
33274
|
|
|
32595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
32596
33276
|
var TOTAL_CAP = 1e4;
|
|
32597
33277
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
32598
33278
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -32603,7 +33283,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
32603
33283
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
32604
33284
|
}, "totalOf");
|
|
32605
33285
|
|
|
32606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
32607
33287
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
32608
33288
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
32609
33289
|
let narrows = false;
|
|
@@ -32632,7 +33312,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
32632
33312
|
return wanted(root).join(" ").trim();
|
|
32633
33313
|
}, "meaningWords");
|
|
32634
33314
|
|
|
32635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
32636
33316
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
32637
33317
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
32638
33318
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -32747,7 +33427,7 @@ function planQuestion(text2, strict = false) {
|
|
|
32747
33427
|
}
|
|
32748
33428
|
__name(planQuestion, "planQuestion");
|
|
32749
33429
|
|
|
32750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
32751
33431
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
32752
33432
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
32753
33433
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -32940,7 +33620,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
32940
33620
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
32941
33621
|
}, "signals");
|
|
32942
33622
|
|
|
32943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
32944
33624
|
var MEANING_DEPTH = 100;
|
|
32945
33625
|
var RRF_K2 = 60;
|
|
32946
33626
|
var RERANK_DEPTH = 50;
|
|
@@ -33268,7 +33948,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
33268
33948
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
33269
33949
|
}, "mixedWithReranker");
|
|
33270
33950
|
|
|
33271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33951
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
33272
33952
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
33273
33953
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
33274
33954
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -33467,7 +34147,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
33467
34147
|
return result;
|
|
33468
34148
|
}, "readThreadContext");
|
|
33469
34149
|
|
|
33470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
33471
34151
|
var SEARCH_FILL_MS = 200;
|
|
33472
34152
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
33473
34153
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -33534,12 +34214,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
33534
34214
|
}, "accountOf");
|
|
33535
34215
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
33536
34216
|
|
|
33537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33538
34218
|
import { createHash as createHash10 } from "node:crypto";
|
|
33539
34219
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
33540
34220
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
33541
34221
|
|
|
33542
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
33543
34223
|
var GROUP_SETTINGS = [
|
|
33544
34224
|
"allCanPin",
|
|
33545
34225
|
"onlyAdminsAdd",
|
|
@@ -33553,7 +34233,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
33553
34233
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
33554
34234
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
33555
34235
|
|
|
33556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33557
34237
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
33558
34238
|
var PICTURE_FLOOR = 0.25;
|
|
33559
34239
|
var PAGE4 = 50;
|
|
@@ -33570,7 +34250,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33570
34250
|
const directory2 = imageModelsDirectory(deps.env);
|
|
33571
34251
|
if (!isImageModelInstalled(model2, directory2))
|
|
33572
34252
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
33573
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34253
|
+
const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
|
|
33574
34254
|
return openPictureEmbedder(model2, directory2);
|
|
33575
34255
|
}, "open");
|
|
33576
34256
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33767,7 +34447,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
33767
34447
|
}, "search")
|
|
33768
34448
|
}), "withPictures");
|
|
33769
34449
|
|
|
33770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
33771
34451
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
33772
34452
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
33773
34453
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -33816,7 +34496,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
33816
34496
|
}
|
|
33817
34497
|
}, "meaningLane");
|
|
33818
34498
|
|
|
33819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
33820
34500
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
33821
34501
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
33822
34502
|
if (choice === "off")
|
|
@@ -33828,9 +34508,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33828
34508
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
33829
34509
|
try {
|
|
33830
34510
|
const warm = deps.embedders;
|
|
33831
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
34511
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-PI6XUJWP.js")).openRerankerProcess(model, directory2, {
|
|
33832
34512
|
threads: defaultThreads()
|
|
33833
|
-
})) : await (await import("./rerank-
|
|
34513
|
+
})) : await (await import("./rerank-SCBTCBPO.js")).openReranker(model, directory2);
|
|
33834
34514
|
return {
|
|
33835
34515
|
model: model.id,
|
|
33836
34516
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33850,17 +34530,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33850
34530
|
};
|
|
33851
34531
|
}, "rerankLane");
|
|
33852
34532
|
|
|
33853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
33854
34534
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
33855
34535
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
33856
34536
|
const directory2 = imageModelsDirectory(env);
|
|
33857
34537
|
if (!isImageModelInstalled(model, directory2))
|
|
33858
34538
|
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 });
|
|
33859
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34539
|
+
const { openPictureEmbedder } = await import("./embedder-LLNK4JF4.js");
|
|
33860
34540
|
return openPictureEmbedder(model, directory2);
|
|
33861
34541
|
}, "openPictureEmbedderFor");
|
|
33862
34542
|
|
|
33863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
33864
34544
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
33865
34545
|
const metadata = note2.frontMatter;
|
|
33866
34546
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
@@ -33875,7 +34555,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
33875
34555
|
};
|
|
33876
34556
|
}, "documentSource");
|
|
33877
34557
|
|
|
33878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
33879
34559
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33880
34560
|
let root;
|
|
33881
34561
|
try {
|
|
@@ -33902,7 +34582,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
33902
34582
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33903
34583
|
}, "titleTiers");
|
|
33904
34584
|
|
|
33905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
33906
34586
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33907
34587
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33908
34588
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -34337,7 +35017,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
34337
35017
|
};
|
|
34338
35018
|
}, "searchNotesOf");
|
|
34339
35019
|
|
|
34340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
34341
35021
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
34342
35022
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
34343
35023
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -34449,7 +35129,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34449
35129
|
};
|
|
34450
35130
|
}, "searchEvents");
|
|
34451
35131
|
|
|
34452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34453
35133
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
34454
35134
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
34455
35135
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -34658,7 +35338,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34658
35338
|
};
|
|
34659
35339
|
}, "searchAll");
|
|
34660
35340
|
|
|
34661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
34662
35342
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
34663
35343
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
34664
35344
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -34911,7 +35591,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34911
35591
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
34912
35592
|
}, "searchAllOfSource");
|
|
34913
35593
|
|
|
34914
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34915
35595
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34916
35596
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34917
35597
|
var DEFAULT_BACKEND = "both";
|
|
@@ -35100,7 +35780,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
35100
35780
|
return { report, sources };
|
|
35101
35781
|
}, "searchServer");
|
|
35102
35782
|
|
|
35103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
35104
35784
|
var DELETE_AT_ONCE = 10;
|
|
35105
35785
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
35106
35786
|
const files = fileLinks(attachments);
|
|
@@ -35541,7 +36221,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35541
36221
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35542
36222
|
}, "checkMediaOptions");
|
|
35543
36223
|
|
|
35544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35545
36225
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35546
36226
|
var RULES = {
|
|
35547
36227
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -35556,7 +36236,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
35556
36236
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
35557
36237
|
}), "classifyChannel");
|
|
35558
36238
|
|
|
35559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35560
36240
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35561
36241
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35562
36242
|
const store = await deps.store();
|
|
@@ -35642,7 +36322,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35642
36322
|
};
|
|
35643
36323
|
}, "metadataService");
|
|
35644
36324
|
|
|
35645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
35646
36326
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
35647
36327
|
var LINK2 = /https?:\/\/\S+/i;
|
|
35648
36328
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -35830,7 +36510,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
35830
36510
|
}, "nextPoint");
|
|
35831
36511
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
35832
36512
|
|
|
35833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
35834
36514
|
import { existsSync, readFileSync as readFileSync2 } from "node:fs";
|
|
35835
36515
|
import { join as join11 } from "node:path";
|
|
35836
36516
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -35973,7 +36653,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
35973
36653
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
35974
36654
|
}, "assign");
|
|
35975
36655
|
|
|
35976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35977
36657
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35978
36658
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
35979
36659
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -36010,7 +36690,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
36010
36690
|
return { chatId, rows, notes };
|
|
36011
36691
|
}, "moderateWith");
|
|
36012
36692
|
|
|
36013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
36014
36694
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
36015
36695
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
36016
36696
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -36088,7 +36768,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
36088
36768
|
}, "removePerson")
|
|
36089
36769
|
}), "moderatorOf");
|
|
36090
36770
|
|
|
36091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
36092
36772
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
36093
36773
|
id: note2.id,
|
|
36094
36774
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -36132,7 +36812,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
36132
36812
|
};
|
|
36133
36813
|
}, "privatePeopleService");
|
|
36134
36814
|
|
|
36135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
36136
36816
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
36137
36817
|
total: 0,
|
|
36138
36818
|
population: 0,
|
|
@@ -36388,7 +37068,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
36388
37068
|
}, "evidence")
|
|
36389
37069
|
}), "rankingsService");
|
|
36390
37070
|
|
|
36391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
36392
37072
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
36393
37073
|
id: one2.id,
|
|
36394
37074
|
name: one2.name,
|
|
@@ -36517,7 +37197,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
36517
37197
|
};
|
|
36518
37198
|
}, "searchesService");
|
|
36519
37199
|
|
|
36520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
36521
37201
|
var TAGGING_QUERY = {
|
|
36522
37202
|
entity: "tagging",
|
|
36523
37203
|
backend: "sql",
|
|
@@ -36601,7 +37281,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36601
37281
|
};
|
|
36602
37282
|
}, "tagsService");
|
|
36603
37283
|
|
|
36604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
36605
37285
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
36606
37286
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
36607
37287
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -36800,7 +37480,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36800
37480
|
};
|
|
36801
37481
|
}, "topicsService");
|
|
36802
37482
|
|
|
36803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
36804
37484
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
36805
37485
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36806
37486
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -36874,7 +37554,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
36874
37554
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
36875
37555
|
}, "prepareEvidencePacket");
|
|
36876
37556
|
|
|
36877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
36878
37558
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
36879
37559
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
36880
37560
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -36894,7 +37574,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
36894
37574
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
36895
37575
|
}, "readEvidencePacket");
|
|
36896
37576
|
|
|
36897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
36898
37578
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
36899
37579
|
let before2 = Number.POSITIVE_INFINITY;
|
|
36900
37580
|
for (; ; ) {
|
|
@@ -36956,7 +37636,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
36956
37636
|
return { ...result, selection };
|
|
36957
37637
|
}, "searchMeetingHits");
|
|
36958
37638
|
|
|
36959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36960
37640
|
import { createHash as createHash12 } from "node:crypto";
|
|
36961
37641
|
var scopeKeys = [
|
|
36962
37642
|
"accountId",
|
|
@@ -37091,7 +37771,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
37091
37771
|
};
|
|
37092
37772
|
}, "readMeetingProjectDiscovery");
|
|
37093
37773
|
|
|
37094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37774
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
37095
37775
|
import { createHash as createHash13 } from "node:crypto";
|
|
37096
37776
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
37097
37777
|
ref: cue.reference,
|
|
@@ -37209,7 +37889,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
37209
37889
|
return { ...packet, fingerprint: createHash13("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
37210
37890
|
}, "readMeetingHitContext");
|
|
37211
37891
|
|
|
37212
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
37213
37893
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
37214
37894
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
37215
37895
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -37285,7 +37965,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
37285
37965
|
return { packet, content };
|
|
37286
37966
|
}, "readMeetingPassage");
|
|
37287
37967
|
|
|
37288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
37289
37969
|
var communicationFields = {
|
|
37290
37970
|
sources: pipe(array(strictObject({
|
|
37291
37971
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -37317,7 +37997,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
37317
37997
|
return { ...input, after, before: before2 };
|
|
37318
37998
|
}, "communicationRequest");
|
|
37319
37999
|
|
|
37320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
37321
38001
|
var MEETING_PREPARATION_LIMITS = {
|
|
37322
38002
|
meetings: { min: 1, max: 20, default: 5 },
|
|
37323
38003
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -37403,7 +38083,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
37403
38083
|
return { ...input, history };
|
|
37404
38084
|
}, "preparationRequest");
|
|
37405
38085
|
|
|
37406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
37407
38087
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
37408
38088
|
const section = {
|
|
37409
38089
|
readUsage: plan.reader.usage(),
|
|
@@ -37508,7 +38188,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
37508
38188
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
37509
38189
|
}, "appendPreparationCommunications");
|
|
37510
38190
|
|
|
37511
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38191
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
37512
38192
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
37513
38193
|
if (port === void 0)
|
|
37514
38194
|
return void 0;
|
|
@@ -37613,7 +38293,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
37613
38293
|
}
|
|
37614
38294
|
}, "validatePreparationCommunications");
|
|
37615
38295
|
|
|
37616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
37617
38297
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
37618
38298
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
37619
38299
|
}, "invalid");
|
|
@@ -37682,7 +38362,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
37682
38362
|
}
|
|
37683
38363
|
}, "appendKnowledgePreparation");
|
|
37684
38364
|
|
|
37685
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
37686
38366
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
37687
38367
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
37688
38368
|
}, "invalid");
|
|
@@ -37756,7 +38436,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
37756
38436
|
}
|
|
37757
38437
|
}, "appendNotesPreparation");
|
|
37758
38438
|
|
|
37759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
37760
38440
|
var PAGE_LIMIT = 4;
|
|
37761
38441
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37762
38442
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -37806,7 +38486,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
37806
38486
|
}
|
|
37807
38487
|
}, "appendProjectPreparation");
|
|
37808
38488
|
|
|
37809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
37810
38490
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
37811
38491
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
37812
38492
|
return;
|
|
@@ -37878,7 +38558,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
37878
38558
|
}
|
|
37879
38559
|
}, "appendRelatedPreparation");
|
|
37880
38560
|
|
|
37881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38561
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
37882
38562
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
37883
38563
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
37884
38564
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -38016,7 +38696,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
38016
38696
|
};
|
|
38017
38697
|
}, "createMeetingPreparationService");
|
|
38018
38698
|
|
|
38019
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
38020
38700
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
38021
38701
|
const installer = ports.installer();
|
|
38022
38702
|
const argv = updateCommand(installer, packageName);
|
|
@@ -38081,7 +38761,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
38081
38761
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
38082
38762
|
}, "dayAfter");
|
|
38083
38763
|
|
|
38084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
38085
38765
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
38086
38766
|
const pictures = picturesService(deps);
|
|
38087
38767
|
const base = {
|
|
@@ -38117,7 +38797,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
38117
38797
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
38118
38798
|
}, "servicesFor");
|
|
38119
38799
|
|
|
38120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
38121
38801
|
import { createHash as createHash14 } from "node:crypto";
|
|
38122
38802
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
38123
38803
|
import { createConnection, createServer } from "node:net";
|
|
@@ -38265,7 +38945,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
38265
38945
|
}
|
|
38266
38946
|
}, "serve");
|
|
38267
38947
|
|
|
38268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38948
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.560.0_@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_type_5702f943a9224d209a94753f662cf36c/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
38269
38949
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
38270
38950
|
close: /* @__PURE__ */ __name(async () => {
|
|
38271
38951
|
}, "close"),
|
|
@@ -38414,6 +39094,7 @@ export {
|
|
|
38414
39094
|
documentPassage,
|
|
38415
39095
|
storedNeighbours,
|
|
38416
39096
|
gatherStoredProject,
|
|
39097
|
+
scanProjectLinks,
|
|
38417
39098
|
validateMediaSince,
|
|
38418
39099
|
checkMediaArchive,
|
|
38419
39100
|
archiveMedia,
|