@wirecat/mail-cli 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +115 -0
- package/README.md +41 -10
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-55XPXQHY.js → all-profiles-GBFTKUHA.js} +9 -9
- package/dist/bundle/{anthropic-K5B6I4LB.js → anthropic-PTSCWUG6.js} +6 -6
- package/dist/bundle/{app-server-VWWLQLTZ.js → app-server-5VJ2WCKJ.js} +46 -46
- package/dist/bundle/{bun-EO7AI6YP.js → bun-2KRUBPIN.js} +2 -2
- package/dist/bundle/{bun-sqlite-F24A4IOP.js → bun-sqlite-ELSRSJBM.js} +5 -5
- package/dist/bundle/{chunk-X7AXH2IC.js → chunk-3KY7DA5A.js} +428 -434
- package/dist/bundle/{chunk-ANRI6EZY.js → chunk-4PKHZQIM.js} +8 -8
- package/dist/bundle/{chunk-CADRRSQK.js → chunk-56PI2BRH.js} +1 -1
- package/dist/bundle/{chunk-2ADB5DSG.js → chunk-5AQKM47C.js} +3 -3
- package/dist/bundle/{chunk-VP5GCMHM.js → chunk-5KHJUYHQ.js} +8 -8
- package/dist/bundle/{chunk-HUB42T2Z.js → chunk-6MV2TBDB.js} +57 -54
- package/dist/bundle/{chunk-4KLJN3LK.js → chunk-AGX7NR3S.js} +26 -13
- package/dist/bundle/{chunk-ZD3WUGR2.js → chunk-B337KHJ5.js} +4 -4
- package/dist/bundle/{chunk-5BVIWP3S.js → chunk-BM445GYF.js} +2 -2
- package/dist/bundle/{chunk-H7K2DN3R.js → chunk-BVIHT7KR.js} +9 -9
- package/dist/bundle/{chunk-EDKV6D6T.js → chunk-DA46WQEA.js} +1 -1
- package/dist/bundle/{chunk-UO7X2VW4.js → chunk-DV4RSEAH.js} +6 -6
- package/dist/bundle/{chunk-JZFIHVRB.js → chunk-ES4PWHBJ.js} +28 -28
- package/dist/bundle/{chunk-7X64JS6S.js → chunk-FIQOBLHS.js} +1 -1
- package/dist/bundle/{chunk-TI6VBZKJ.js → chunk-FUB3X25H.js} +4 -4
- package/dist/bundle/{chunk-VWXCEEUH.js → chunk-H4VFIH5W.js} +3 -3
- package/dist/bundle/{chunk-JKHI3PH7.js → chunk-J4C32YKH.js} +1 -1
- package/dist/bundle/{chunk-F6JTOQIK.js → chunk-J5MYH4L5.js} +12 -6
- package/dist/bundle/{chunk-QYWDC7NP.js → chunk-JFJTDL22.js} +47 -46
- package/dist/bundle/{chunk-UZDHK26H.js → chunk-JIQAFFPV.js} +2 -2
- package/dist/bundle/{chunk-BHKI5OCD.js → chunk-JKA2AICL.js} +2 -2
- package/dist/bundle/{dist-FMN7UZ7R.js → chunk-JKLQHPED.js} +16 -116
- package/dist/bundle/{chunk-J3QXTBD2.js → chunk-JLRMSNPX.js} +18 -18
- package/dist/bundle/{chunk-HORM6VRV.js → chunk-K5JUROGN.js} +1 -1
- package/dist/bundle/{chunk-SY3SP7EI.js → chunk-KUQYWIVR.js} +6 -6
- package/dist/bundle/{chunk-7QQ4EMYF.js → chunk-LWTG5UOF.js} +2 -2
- package/dist/bundle/{chunk-YSSMDVT3.js → chunk-M7V3GSJQ.js} +1 -1
- package/dist/bundle/chunk-MD2J3POF.js +52 -0
- package/dist/bundle/{chunk-SWRNMYDL.js → chunk-NCWO2FNC.js} +2 -2
- package/dist/bundle/{chunk-LKDK5YMI.js → chunk-NOU6MWEM.js} +2 -2
- package/dist/bundle/{chunk-LQ37ALDJ.js → chunk-NXJLC2WK.js} +8 -8
- package/dist/bundle/{chunk-ZAR67WKR.js → chunk-NZB4WGQS.js} +6 -6
- package/dist/bundle/{chunk-5RUTHKXZ.js → chunk-O555ZEQR.js} +4 -4
- package/dist/bundle/{chunk-MGBGE2Y4.js → chunk-O7VK7CJX.js} +2 -2
- package/dist/bundle/{chunk-WFBTPZK3.js → chunk-OHV5RDFE.js} +4 -4
- package/dist/bundle/{chunk-HJEMHZRU.js → chunk-P5B7IFOG.js} +2 -2
- package/dist/bundle/{chunk-VWHRIGYJ.js → chunk-PBYDT3CG.js} +13 -3
- package/dist/bundle/{chunk-7IYDIU4P.js → chunk-PHPC72DP.js} +7 -7
- package/dist/bundle/{chunk-ID24SLH3.js → chunk-PKU6V4EQ.js} +17 -17
- package/dist/bundle/{chunk-P7P5MNAU.js → chunk-QZBT6BOU.js} +1 -1
- package/dist/bundle/{chunk-NL5LNYGX.js → chunk-RAZOSYEO.js} +23 -23
- package/dist/bundle/{chunk-CCNHVZ3G.js → chunk-RDSAI6DC.js} +398 -293
- package/dist/bundle/{chunk-CSI73XJ5.js → chunk-SAZJDKEI.js} +8 -8
- package/dist/bundle/{chunk-QX7RCLRS.js → chunk-SQLCCKEL.js} +1 -1
- package/dist/bundle/{chunk-ORYYYM5Y.js → chunk-TKJDGAHT.js} +23 -23
- package/dist/bundle/{chunk-RLSGMMGC.js → chunk-TPNC5VCJ.js} +4 -4
- package/dist/bundle/{chunk-IIO6NXCA.js → chunk-UAXBLHZK.js} +2 -2
- package/dist/bundle/{chunk-2NZGUKYK.js → chunk-VEAP5RVI.js} +10 -8
- package/dist/bundle/{chunk-6BNMEOVS.js → chunk-VF24ZAPX.js} +4 -4
- package/dist/bundle/{chunk-FFKNUVVD.js → chunk-WCL3WBH5.js} +3 -3
- package/dist/bundle/{chunk-M4NTQ247.js → chunk-WGK4AIRL.js} +12 -12
- package/dist/bundle/{chunk-OM4ZBLT7.js → chunk-XERTHQ6D.js} +88 -34
- package/dist/bundle/{chunk-6BR6JMCR.js → chunk-XZGLY2LU.js} +14 -14
- package/dist/bundle/{chunk-2LP46EUH.js → chunk-Y7JKWQC2.js} +96 -94
- package/dist/bundle/{chunk-F7KAJNNK.js → chunk-YBJMBPL7.js} +6 -6
- package/dist/bundle/{chunk-YYTWV5GU.js → chunk-ZMMIIBTM.js} +73 -57
- package/dist/bundle/{chunk-EOEYP7CJ.js → chunk-ZPGLWMNH.js} +3 -3
- package/dist/bundle/{chunk-UJYCKCFR.js → chunk-ZRYFEEXZ.js} +3 -3
- package/dist/bundle/command-contract-NZF4B5OR.js +34 -0
- package/dist/bundle/{decode-ON4KBMEX.js → decode-HVXDCQ63.js} +5 -5
- package/dist/bundle/{dispatch-EUKKT3PD.js → dispatch-GDAH4JHS.js} +8 -8
- package/dist/bundle/dist-43DZXMBL.js +134 -0
- package/dist/bundle/{echarts-XPA226QR.js → echarts-LZ74IXHG.js} +2 -2
- package/dist/bundle/{embed-QERDAB73.js → embed-OQF5U2C6.js} +6 -6
- package/dist/bundle/{embedder-I76YT3E5.js → embedder-OCWQAWKO.js} +9 -9
- package/dist/bundle/{failure-OAIC5VAP.js → failure-6COJAO7T.js} +2 -2
- package/dist/bundle/{first-run-KZJFR55N.js → first-run-MTZPUPGA.js} +11 -11
- package/dist/bundle/first-screen-4PBS6QK5.js +32 -0
- package/dist/bundle/{instructions-NN3BCFIM.js → instructions-M6F4FP7U.js} +1 -1
- package/dist/bundle/mail.js +12 -11
- package/dist/bundle/{mcp-L7SRVDRN.js → mcp-GAPDLFWA.js} +2 -2
- package/dist/bundle/{node-2S75QJ6B.js → node-NYBBFHGN.js} +2 -2
- package/dist/bundle/{node-sqlite-RC7WM3EG.js → node-sqlite-CWCNWO75.js} +5 -5
- package/dist/bundle/{oauth-FUHLZCKV.js → oauth-DVX45EME.js} +7 -7
- package/dist/bundle/{open-JOKT7LKY.js → open-M7EQWWHL.js} +4 -4
- package/dist/bundle/{openai-U3IMQ6UI.js → openai-63KRU5H2.js} +14 -14
- package/dist/bundle/{process-LKODK722.js → process-DV5GQIGM.js} +1 -1
- package/dist/bundle/{program-RMLIQXCA.js → program-EPR3QCMX.js} +20570 -7622
- package/dist/bundle/{prompt-23VYMNNB.js → prompt-EPWPWTB3.js} +5 -5
- package/dist/bundle/{recognize-TXO3462R.js → recognize-R46KDXK4.js} +4 -4
- package/dist/bundle/{remote-5F4ZOASM.js → remote-RENCYB5X.js} +7 -7
- package/dist/bundle/{rerank-TXSDPEFE.js → rerank-VHPC5O73.js} +7 -7
- package/dist/bundle/{serve-TWYECYWM.js → serve-KCH3ORYO.js} +9 -9
- package/dist/bundle/server-FMCPE2ZK.js +63 -0
- package/dist/bundle/{server-3S3BKE6D.js → server-HZVXSK7B.js} +38 -38
- package/dist/bundle/{sqlite-runtime-BEOBGC6K.js → sqlite-runtime-XP7ZJCKJ.js} +5 -5
- package/dist/bundle/{state-ERWIUTQQ.js → state-GQ4MEQJ5.js} +6 -6
- package/dist/bundle/{store-2JO4JGQL.js → store-CQNLNINW.js} +13 -13
- package/dist/bundle/{store-4RY5UMOP.js → store-WT7YTR3Y.js} +15 -15
- package/dist/bundle/store-maintenance-command-YYR42IT4.js +52 -0
- package/dist/commands/attachments.d.ts +3 -0
- package/dist/commands/attachments.d.ts.map +1 -0
- package/dist/commands/attachments.js +97 -0
- package/dist/commands/attachments.js.map +1 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +11 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/drafts-send.d.ts +7 -0
- package/dist/commands/drafts-send.d.ts.map +1 -0
- package/dist/commands/drafts-send.js +58 -0
- package/dist/commands/drafts-send.js.map +1 -0
- package/dist/commands/drafts.d.ts +3 -0
- package/dist/commands/drafts.d.ts.map +1 -0
- package/dist/commands/drafts.js +239 -0
- package/dist/commands/drafts.js.map +1 -0
- package/dist/commands/export.d.ts +3 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +275 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +120 -2
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/messages.d.ts +25 -0
- package/dist/commands/messages.d.ts.map +1 -0
- package/dist/commands/messages.js +502 -0
- package/dist/commands/messages.js.map +1 -0
- package/dist/commands/read.d.ts +4 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +12 -2
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/rules.d.ts +3 -0
- package/dist/commands/rules.d.ts.map +1 -0
- package/dist/commands/rules.js +292 -0
- package/dist/commands/rules.js.map +1 -0
- package/dist/commands/send.d.ts +39 -0
- package/dist/commands/send.d.ts.map +1 -0
- package/dist/commands/send.js +309 -0
- package/dist/commands/send.js.map +1 -0
- package/dist/commands/server-search.d.ts +8 -0
- package/dist/commands/server-search.d.ts.map +1 -0
- package/dist/commands/server-search.js +38 -0
- package/dist/commands/server-search.js.map +1 -0
- package/dist/commands/stats.d.ts +3 -0
- package/dist/commands/stats.d.ts.map +1 -0
- package/dist/commands/stats.js +90 -0
- package/dist/commands/stats.js.map +1 -0
- package/dist/commands/sync.d.ts +7 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +22 -7
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tags.d.ts +3 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +144 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +47 -1
- package/dist/config.js.map +1 -1
- package/dist/export/format.d.ts +19 -0
- package/dist/export/format.d.ts.map +1 -0
- package/dist/export/format.js +40 -0
- package/dist/export/format.js.map +1 -0
- package/dist/export/journal.d.ts +32 -0
- package/dist/export/journal.d.ts.map +1 -0
- package/dist/export/journal.js +84 -0
- package/dist/export/journal.js.map +1 -0
- package/dist/export/write.d.ts +14 -0
- package/dist/export/write.d.ts.map +1 -0
- package/dist/export/write.js +42 -0
- package/dist/export/write.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +3 -0
- package/dist/identity.js.map +1 -1
- package/dist/mail/backend.d.ts +81 -1
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/changes.d.ts +91 -0
- package/dist/mail/changes.d.ts.map +1 -0
- package/dist/mail/changes.js +198 -0
- package/dist/mail/changes.js.map +1 -0
- package/dist/mail/cleanup.d.ts +41 -0
- package/dist/mail/cleanup.d.ts.map +1 -0
- package/dist/mail/cleanup.js +119 -0
- package/dist/mail/cleanup.js.map +1 -0
- package/dist/mail/compose.d.ts +73 -0
- package/dist/mail/compose.d.ts.map +1 -0
- package/dist/mail/compose.js +122 -0
- package/dist/mail/compose.js.map +1 -0
- package/dist/mail/doctor.d.ts +25 -0
- package/dist/mail/doctor.d.ts.map +1 -0
- package/dist/mail/doctor.js +39 -0
- package/dist/mail/doctor.js.map +1 -0
- package/dist/mail/drafts.d.ts +54 -0
- package/dist/mail/drafts.d.ts.map +1 -0
- package/dist/mail/drafts.js +104 -0
- package/dist/mail/drafts.js.map +1 -0
- package/dist/mail/imap/connection.d.ts +7 -0
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +24 -2
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +1 -1
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +12 -2
- package/dist/mail/imap/index.js.map +1 -1
- package/dist/mail/imap/messages.d.ts +5 -6
- package/dist/mail/imap/messages.d.ts.map +1 -1
- package/dist/mail/imap/messages.js +14 -28
- package/dist/mail/imap/messages.js.map +1 -1
- package/dist/mail/imap/read.d.ts.map +1 -1
- package/dist/mail/imap/read.js +27 -13
- package/dist/mail/imap/read.js.map +1 -1
- package/dist/mail/imap/search.d.ts +14 -0
- package/dist/mail/imap/search.d.ts.map +1 -0
- package/dist/mail/imap/search.js +49 -0
- package/dist/mail/imap/search.js.map +1 -0
- package/dist/mail/imap/write.d.ts +5 -0
- package/dist/mail/imap/write.d.ts.map +1 -0
- package/dist/mail/imap/write.js +93 -0
- package/dist/mail/imap/write.js.map +1 -0
- package/dist/mail/organise.d.ts +116 -0
- package/dist/mail/organise.d.ts.map +1 -0
- package/dist/mail/organise.js +531 -0
- package/dist/mail/organise.js.map +1 -0
- package/dist/mail/rethread.d.ts +1 -2
- package/dist/mail/rethread.d.ts.map +1 -1
- package/dist/mail/rethread.js +8 -3
- package/dist/mail/rethread.js.map +1 -1
- package/dist/mail/rules/apply.d.ts +40 -0
- package/dist/mail/rules/apply.d.ts.map +1 -0
- package/dist/mail/rules/apply.js +114 -0
- package/dist/mail/rules/apply.js.map +1 -0
- package/dist/mail/rules/file.d.ts +9 -0
- package/dist/mail/rules/file.d.ts.map +1 -0
- package/dist/mail/rules/file.js +51 -0
- package/dist/mail/rules/file.js.map +1 -0
- package/dist/mail/rules/filters.d.ts +11 -0
- package/dist/mail/rules/filters.d.ts.map +1 -0
- package/dist/mail/rules/filters.js +150 -0
- package/dist/mail/rules/filters.js.map +1 -0
- package/dist/mail/rules/folders.d.ts +11 -0
- package/dist/mail/rules/folders.d.ts.map +1 -0
- package/dist/mail/rules/folders.js +17 -0
- package/dist/mail/rules/folders.js.map +1 -0
- package/dist/mail/rules/query.d.ts +15 -0
- package/dist/mail/rules/query.d.ts.map +1 -0
- package/dist/mail/rules/query.js +103 -0
- package/dist/mail/rules/query.js.map +1 -0
- package/dist/mail/rules/store.d.ts +9 -0
- package/dist/mail/rules/store.d.ts.map +1 -0
- package/dist/mail/rules/store.js +17 -0
- package/dist/mail/rules/store.js.map +1 -0
- package/dist/mail/save.d.ts +12 -0
- package/dist/mail/save.d.ts.map +1 -0
- package/dist/mail/save.js +71 -0
- package/dist/mail/save.js.map +1 -0
- package/dist/mail/send.d.ts +67 -0
- package/dist/mail/send.d.ts.map +1 -0
- package/dist/mail/send.js +172 -0
- package/dist/mail/send.js.map +1 -0
- package/dist/mail/smtp.d.ts +4 -0
- package/dist/mail/smtp.d.ts.map +1 -0
- package/dist/mail/smtp.js +97 -0
- package/dist/mail/smtp.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +28 -6
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +71 -6
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +38 -9
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts +9 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +21 -0
- package/dist/reasons.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +8 -5
- package/skills/mail-cli/SKILL.md +30 -3
- package/dist/bundle/chunk-XJ5TBPCK.js +0 -27
- package/dist/bundle/command-contract-L65UZ7AF.js +0 -34
- package/dist/bundle/first-screen-EORANEAK.js +0 -32
- package/dist/bundle/server-2GEAXKX2.js +0 -63
- package/dist/bundle/store-maintenance-command-T7D4OTN7.js +0 -52
- /package/dist/bundle/{chunk-NPGVOZVK.js → chunk-WJWLHLQ7.js} +0 -0
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
acquireLock,
|
|
5
5
|
openOrdinaryFile,
|
|
6
6
|
readBoundedUtf8File,
|
|
7
|
+
safeName,
|
|
7
8
|
sameOrdinaryFile,
|
|
8
9
|
syncDirectory,
|
|
9
10
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AGX7NR3S.js";
|
|
11
12
|
import {
|
|
12
13
|
MAX_ACTIONS,
|
|
13
14
|
ModerationRules,
|
|
@@ -23,10 +24,10 @@ import {
|
|
|
23
24
|
someUndone,
|
|
24
25
|
validateFormattedText,
|
|
25
26
|
visibleFormattedText
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-5KHJUYHQ.js";
|
|
27
28
|
import {
|
|
28
29
|
MAX_MODEL_IMAGE_BYTES
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-JKA2AICL.js";
|
|
30
31
|
import {
|
|
31
32
|
Command,
|
|
32
33
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -65,17 +66,17 @@ import {
|
|
|
65
66
|
typedCommand,
|
|
66
67
|
vectorModelKey,
|
|
67
68
|
withAttempt
|
|
68
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6MV2TBDB.js";
|
|
69
70
|
import {
|
|
70
71
|
isCliFailure
|
|
71
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-BVIHT7KR.js";
|
|
72
73
|
import {
|
|
73
74
|
isNewer,
|
|
74
75
|
updateCommand
|
|
75
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-B337KHJ5.js";
|
|
76
77
|
import {
|
|
77
78
|
remoteKey
|
|
78
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-ZRYFEEXZ.js";
|
|
79
80
|
import {
|
|
80
81
|
AGENDA_COLUMNS,
|
|
81
82
|
CHAT_COLUMNS,
|
|
@@ -130,7 +131,7 @@ import {
|
|
|
130
131
|
threadConversation,
|
|
131
132
|
validateAst,
|
|
132
133
|
validateFields
|
|
133
|
-
} from "./chunk-
|
|
134
|
+
} from "./chunk-RDSAI6DC.js";
|
|
134
135
|
import {
|
|
135
136
|
COUNTER_FIELDS,
|
|
136
137
|
INTERNAL_NOTES,
|
|
@@ -149,13 +150,13 @@ import {
|
|
|
149
150
|
parseReference,
|
|
150
151
|
providerNamed,
|
|
151
152
|
rankingOptions
|
|
152
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-KUQYWIVR.js";
|
|
153
154
|
import {
|
|
154
155
|
TASK_KINDS,
|
|
155
156
|
TASK_STATES,
|
|
156
157
|
createTaskService,
|
|
157
158
|
isClosedState
|
|
158
|
-
} from "./chunk-
|
|
159
|
+
} from "./chunk-VEAP5RVI.js";
|
|
159
160
|
import {
|
|
160
161
|
EVENT_QUERY,
|
|
161
162
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -196,17 +197,17 @@ import {
|
|
|
196
197
|
validateQuery,
|
|
197
198
|
walkQuery,
|
|
198
199
|
zonedMoment
|
|
199
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-ZMMIIBTM.js";
|
|
200
201
|
import {
|
|
201
202
|
DEFAULT_STEMMERS,
|
|
202
203
|
createStemmer,
|
|
203
204
|
fold,
|
|
204
205
|
normalize
|
|
205
|
-
} from "./chunk-
|
|
206
|
+
} from "./chunk-4PKHZQIM.js";
|
|
206
207
|
import {
|
|
207
208
|
DEFAULT_TASK_CATEGORIES,
|
|
208
209
|
FALLBACK_CATEGORY
|
|
209
|
-
} from "./chunk-
|
|
210
|
+
} from "./chunk-YBJMBPL7.js";
|
|
210
211
|
import {
|
|
211
212
|
Unzip,
|
|
212
213
|
UnzipInflate,
|
|
@@ -217,18 +218,18 @@ import {
|
|
|
217
218
|
placedText,
|
|
218
219
|
runEmbedders,
|
|
219
220
|
textModelsDirectory
|
|
220
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-NZB4WGQS.js";
|
|
221
222
|
import {
|
|
222
223
|
installFiles,
|
|
223
224
|
megabytes
|
|
224
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-OHV5RDFE.js";
|
|
225
226
|
import {
|
|
226
227
|
storePath,
|
|
227
228
|
wirecatDirectory
|
|
228
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-JIQAFFPV.js";
|
|
229
230
|
import {
|
|
230
231
|
resolvePaths
|
|
231
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-JLRMSNPX.js";
|
|
232
233
|
import {
|
|
233
234
|
array,
|
|
234
235
|
boolean,
|
|
@@ -245,7 +246,7 @@ import {
|
|
|
245
246
|
safeParse,
|
|
246
247
|
strictObject,
|
|
247
248
|
string
|
|
248
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-NXJLC2WK.js";
|
|
249
250
|
import {
|
|
250
251
|
importFrom,
|
|
251
252
|
resolveFrom
|
|
@@ -254,7 +255,7 @@ import {
|
|
|
254
255
|
CliError,
|
|
255
256
|
isCliError,
|
|
256
257
|
singleLine
|
|
257
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-BM445GYF.js";
|
|
258
259
|
import {
|
|
259
260
|
__commonJS,
|
|
260
261
|
__name,
|
|
@@ -16870,10 +16871,10 @@ var require_lib3 = __commonJS({
|
|
|
16870
16871
|
}
|
|
16871
16872
|
});
|
|
16872
16873
|
|
|
16873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16874
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16874
16875
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16875
16876
|
|
|
16876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16877
16878
|
var RULES_VERSION = 5;
|
|
16878
16879
|
var LOOK_BACK = 50;
|
|
16879
16880
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16963,7 +16964,7 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16963
16964
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16964
16965
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16965
16966
|
|
|
16966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
16967
16968
|
var COMMAND_NEEDS = {
|
|
16968
16969
|
"account update": ["updateProfile", "change the profile"],
|
|
16969
16970
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17013,7 +17014,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17013
17014
|
return group;
|
|
17014
17015
|
}, "hideNever");
|
|
17015
17016
|
|
|
17016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17017
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17017
17018
|
var AUDIT_PAGE = 200;
|
|
17018
17019
|
var AUDIT_BUDGET = 10;
|
|
17019
17020
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17093,7 +17094,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17093
17094
|
return found;
|
|
17094
17095
|
}, "burstJoins");
|
|
17095
17096
|
|
|
17096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17097
17098
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17098
17099
|
command.allowUnknownOption();
|
|
17099
17100
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17113,7 +17114,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17113
17114
|
return command;
|
|
17114
17115
|
}, "queryWordsAfterOptions");
|
|
17115
17116
|
|
|
17116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17117
17118
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17118
17119
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17119
17120
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17155,7 +17156,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17155
17156
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17156
17157
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17157
17158
|
|
|
17158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17159
17160
|
var integer = /* @__PURE__ */ __name((value) => {
|
|
17160
17161
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17161
17162
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17178,7 +17179,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17178
17179
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17179
17180
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17180
17181
|
|
|
17181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17182
17183
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17183
17184
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17184
17185
|
const zone = timezoneOf();
|
|
@@ -17264,7 +17265,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17264
17265
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17265
17266
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17266
17267
|
|
|
17267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17268
17269
|
var integer3 = /* @__PURE__ */ __name((text2) => {
|
|
17269
17270
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17270
17271
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17384,7 +17385,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17384
17385
|
}, "addMeetingCommandsDefinition");
|
|
17385
17386
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17386
17387
|
|
|
17387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17388
17389
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17389
17390
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
17390
17391
|
const query = defineQuery(registry);
|
|
@@ -17500,7 +17501,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17500
17501
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17501
17502
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17502
17503
|
|
|
17503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17504
17505
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17505
17506
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17506
17507
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17509,7 +17510,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17509
17510
|
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");
|
|
17510
17511
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17511
17512
|
|
|
17512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17513
17514
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17514
17515
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17515
17516
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17771,7 +17772,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17771
17772
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17772
17773
|
}), "sessionAnswer");
|
|
17773
17774
|
|
|
17774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17775
17776
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17776
17777
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17777
17778
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17836,7 +17837,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17836
17837
|
}), "storedDeps");
|
|
17837
17838
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17838
17839
|
|
|
17839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17840
17841
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17841
17842
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17842
17843
|
if (key in own)
|
|
@@ -17853,12 +17854,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17853
17854
|
return found.bind(adapter);
|
|
17854
17855
|
}, "capability");
|
|
17855
17856
|
|
|
17856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17857
17858
|
import { randomBytes } from "node:crypto";
|
|
17858
17859
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17859
17860
|
var newOperationId = newSendId;
|
|
17860
17861
|
|
|
17861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17862
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
17862
17863
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
17863
17864
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
17864
17865
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -17898,7 +17899,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
17898
17899
|
};
|
|
17899
17900
|
}, "dateWindow");
|
|
17900
17901
|
|
|
17901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17902
17903
|
var LINKS = /https?:\/\/\S+/g;
|
|
17903
17904
|
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");
|
|
17904
17905
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -17925,7 +17926,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
17925
17926
|
});
|
|
17926
17927
|
}, "questions");
|
|
17927
17928
|
|
|
17928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
17929
17930
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17930
17931
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17931
17932
|
const name = typed.trim().toLowerCase();
|
|
@@ -17975,7 +17976,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
17975
17976
|
return best.name;
|
|
17976
17977
|
}, "categorize");
|
|
17977
17978
|
|
|
17978
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
17979
17980
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
17980
17981
|
var RULES_IN = {
|
|
17981
17982
|
dialog: "all",
|
|
@@ -18181,7 +18182,209 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18181
18182
|
return passes;
|
|
18182
18183
|
}, "applyTaskRulesToChats");
|
|
18183
18184
|
|
|
18184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
18186
|
+
import { openAsBlob, realpathSync } from "node:fs";
|
|
18187
|
+
import { open, stat } from "node:fs/promises";
|
|
18188
|
+
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
18189
|
+
var MAX_BUFFERED_UPLOAD_BYTES = 256 * 1024 * 1024;
|
|
18190
|
+
var uploadSize = /* @__PURE__ */ __name((source) => source.kind === "file" ? source.size : source.bytes.byteLength, "uploadSize");
|
|
18191
|
+
var PHOTO = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp"]);
|
|
18192
|
+
var VOICE = /* @__PURE__ */ new Set([".ogg", ".oga", ".opus"]);
|
|
18193
|
+
var JPEG = /* @__PURE__ */ __name((head) => head[0] === 255 && head[1] === 216 && head[2] === 255, "JPEG");
|
|
18194
|
+
var SIGNATURES = {
|
|
18195
|
+
".jpg": JPEG,
|
|
18196
|
+
".jpeg": JPEG,
|
|
18197
|
+
".png": /* @__PURE__ */ __name((head) => Buffer.from(head.subarray(0, 8)).toString("latin1") === "\x89PNG\r\n\n", ".png"),
|
|
18198
|
+
".webp": /* @__PURE__ */ __name((head) => {
|
|
18199
|
+
const text2 = Buffer.from(head).toString("latin1");
|
|
18200
|
+
return text2.startsWith("RIFF") && text2.slice(8, 12) === "WEBP";
|
|
18201
|
+
}, ".webp")
|
|
18202
|
+
};
|
|
18203
|
+
var fileHead = /* @__PURE__ */ __name(async (path) => {
|
|
18204
|
+
const file = await open(path, "r");
|
|
18205
|
+
try {
|
|
18206
|
+
const head = new Uint8Array(12);
|
|
18207
|
+
const { bytesRead } = await file.read(head, 0, head.length, 0);
|
|
18208
|
+
return head.subarray(0, bytesRead);
|
|
18209
|
+
} finally {
|
|
18210
|
+
await file.close();
|
|
18211
|
+
}
|
|
18212
|
+
}, "fileHead");
|
|
18213
|
+
var typesText = /* @__PURE__ */ __name((types2) => types2.length < 2 ? types2[0] ?? "" : `${types2.slice(0, -1).join(", ")} or ${types2.at(-1)}`, "typesText");
|
|
18214
|
+
var CREDENTIAL_PARTS = /* @__PURE__ */ new Set([
|
|
18215
|
+
".ssh",
|
|
18216
|
+
".gnupg",
|
|
18217
|
+
".aws",
|
|
18218
|
+
".azure",
|
|
18219
|
+
".kube",
|
|
18220
|
+
".secrets",
|
|
18221
|
+
"secrets",
|
|
18222
|
+
".password-store",
|
|
18223
|
+
".mozilla",
|
|
18224
|
+
".env",
|
|
18225
|
+
".npmrc",
|
|
18226
|
+
".pypirc",
|
|
18227
|
+
".netrc",
|
|
18228
|
+
"_netrc",
|
|
18229
|
+
".git-credentials",
|
|
18230
|
+
"credentials.yml.enc",
|
|
18231
|
+
"master.key"
|
|
18232
|
+
]);
|
|
18233
|
+
var CREDENTIAL_RUNS = [
|
|
18234
|
+
[".config", "autostart"],
|
|
18235
|
+
[".config", "git", "credentials"],
|
|
18236
|
+
[".config", "gh"],
|
|
18237
|
+
[".config", "gcloud"],
|
|
18238
|
+
[".config", "google-chrome"],
|
|
18239
|
+
[".config", "chromium"],
|
|
18240
|
+
[".config", "microsoft-edge"],
|
|
18241
|
+
[".config", "BraveSoftware"],
|
|
18242
|
+
[".docker", "config.json"],
|
|
18243
|
+
[".claude", ".credentials.json"],
|
|
18244
|
+
[".codex", "auth.json"],
|
|
18245
|
+
[".local", "share", "keyrings"],
|
|
18246
|
+
["Library", "Keychains"],
|
|
18247
|
+
["Library", "Cookies"],
|
|
18248
|
+
["Library", "Safari"],
|
|
18249
|
+
["Library", "Application Support", "Google", "Chrome"],
|
|
18250
|
+
["Library", "Application Support", "Chromium"],
|
|
18251
|
+
["Library", "Application Support", "Microsoft Edge"],
|
|
18252
|
+
["Library", "Application Support", "BraveSoftware"],
|
|
18253
|
+
["Library", "Application Support", "Firefox"],
|
|
18254
|
+
["AppData", "Local", "Google", "Chrome"],
|
|
18255
|
+
["AppData", "Local", "Chromium"],
|
|
18256
|
+
["AppData", "Local", "Microsoft", "Edge"],
|
|
18257
|
+
["AppData", "Local", "BraveSoftware"],
|
|
18258
|
+
["AppData", "Roaming", "Mozilla", "Firefox"],
|
|
18259
|
+
["AppData", "Local", "Microsoft", "Credentials"],
|
|
18260
|
+
["AppData", "Roaming", "Microsoft", "Credentials"],
|
|
18261
|
+
["AppData", "Roaming", "Microsoft", "Protect"],
|
|
18262
|
+
["AppData", "Roaming", "gcloud"],
|
|
18263
|
+
["AppData", "Roaming", "GitHub CLI"]
|
|
18264
|
+
];
|
|
18265
|
+
var WIRECAT_APPS = [
|
|
18266
|
+
{ appName: "max-cli", prefix: "MAX" },
|
|
18267
|
+
{ appName: "tg-cli", prefix: "TG" },
|
|
18268
|
+
{ appName: "whatsapp-cli", prefix: "WA" },
|
|
18269
|
+
{ appName: "cli-memo", prefix: "MEMO" },
|
|
18270
|
+
{ appName: "drive-cli", prefix: "DRIVE" },
|
|
18271
|
+
{ appName: "zm", prefix: "ZM" },
|
|
18272
|
+
{ appName: "cli-messaging", prefix: "MESSAGING" },
|
|
18273
|
+
{ appName: "cli-common", prefix: "CLI_COMMON" }
|
|
18274
|
+
];
|
|
18275
|
+
var refusedPlace = /* @__PURE__ */ __name((path, app, env, platform = process.platform) => {
|
|
18276
|
+
const own = [
|
|
18277
|
+
...[{ appName: app.appName, prefix: app.envPrefix }, ...WIRECAT_APPS].flatMap((one) => Object.values(resolvePaths({ ...one, env, platform }))),
|
|
18278
|
+
// The shared WireCat folder: the store, its backups beside it, the models.
|
|
18279
|
+
wirecatDirectory(env, platform)
|
|
18280
|
+
];
|
|
18281
|
+
const store = resolve(storePath(env));
|
|
18282
|
+
let ancestor = resolve(path);
|
|
18283
|
+
let real = ancestor;
|
|
18284
|
+
for (; ; ) {
|
|
18285
|
+
try {
|
|
18286
|
+
real = resolve(realpathSync(ancestor), relative(ancestor, resolve(path)));
|
|
18287
|
+
break;
|
|
18288
|
+
} catch {
|
|
18289
|
+
const parent = dirname(ancestor);
|
|
18290
|
+
if (parent === ancestor)
|
|
18291
|
+
break;
|
|
18292
|
+
ancestor = parent;
|
|
18293
|
+
}
|
|
18294
|
+
}
|
|
18295
|
+
const folded = platform === "darwin" || platform === "win32";
|
|
18296
|
+
const fold2 = /* @__PURE__ */ __name((text2) => folded ? text2.toLowerCase() : text2, "fold");
|
|
18297
|
+
const parts = new Set([...CREDENTIAL_PARTS].map(fold2));
|
|
18298
|
+
const runs = CREDENTIAL_RUNS.map((run) => run.map(fold2));
|
|
18299
|
+
const named2 = /* @__PURE__ */ __name((candidate) => {
|
|
18300
|
+
const names2 = candidate.split(sep).map(fold2);
|
|
18301
|
+
return names2.some((name, index) => parts.has(name) || /^\.env\./.test(name) || runs.some((run) => run.every((part, offset) => names2[index + offset] === part)));
|
|
18302
|
+
}, "named");
|
|
18303
|
+
const same2 = /* @__PURE__ */ __name((a, b) => fold2(a) === fold2(b), "same");
|
|
18304
|
+
return [resolve(path), real].some((candidate) => named2(candidate) || own.some((dir) => inside(fold2(candidate), fold2(dir))) || [store, `${store}-wal`, `${store}-shm`].some((file) => same2(candidate, file)));
|
|
18305
|
+
}, "refusedPlace");
|
|
18306
|
+
var inside = /* @__PURE__ */ __name((path, dir) => {
|
|
18307
|
+
const way = relative(resolve(dir), path);
|
|
18308
|
+
return way === "" || !way.startsWith("..") && !isAbsolute(way);
|
|
18309
|
+
}, "inside");
|
|
18310
|
+
var readUpload = /* @__PURE__ */ __name(async (kind, path, { app, env = process.env, anyFile = false, photoTypes }) => {
|
|
18311
|
+
const extension = extname(path).toLowerCase();
|
|
18312
|
+
if (kind === "photo" && photoTypes !== void 0 && !photoTypes.includes(extension)) {
|
|
18313
|
+
throw new CliError("validation_error", `this photo must be a ${typesText(photoTypes)} file, not ${path}`);
|
|
18314
|
+
}
|
|
18315
|
+
if (kind === "photo" && photoTypes === void 0 && !PHOTO.has(extension)) {
|
|
18316
|
+
throw new CliError("validation_error", `a photo is a .jpg, .png or .webp \u2014 send ${path} as a file instead`);
|
|
18317
|
+
}
|
|
18318
|
+
if (kind === "voice" && !VOICE.has(extension)) {
|
|
18319
|
+
throw new CliError("validation_error", `a voice message is Ogg Opus: .ogg, .oga or .opus \u2014 send ${path} as a file`);
|
|
18320
|
+
}
|
|
18321
|
+
if (!anyFile && refusedPlace(path, app, env)) {
|
|
18322
|
+
throw new CliError("validation_error", `cannot send ${path}: known credential files, browser profiles, the WireCat apps' folders and the message store are not sent \u2014 the owner adds --allow-any-file to the command if this file is meant to go`);
|
|
18323
|
+
}
|
|
18324
|
+
let size2;
|
|
18325
|
+
let head;
|
|
18326
|
+
try {
|
|
18327
|
+
const info = await stat(path);
|
|
18328
|
+
if (!info.isFile())
|
|
18329
|
+
throw Object.assign(new Error("not a file"), { code: "EISDIR" });
|
|
18330
|
+
size2 = info.size;
|
|
18331
|
+
if (photoTypes !== void 0 && SIGNATURES[extension] !== void 0)
|
|
18332
|
+
head = await fileHead(path);
|
|
18333
|
+
} catch (error) {
|
|
18334
|
+
const code = error.code;
|
|
18335
|
+
const reason = code === "ENOENT" ? "no such file" : code === "EISDIR" ? "it is a folder" : "it cannot be read";
|
|
18336
|
+
throw new CliError("validation_error", `cannot send ${path}: ${reason}`);
|
|
18337
|
+
}
|
|
18338
|
+
if (head !== void 0 && SIGNATURES[extension]?.(head) !== true) {
|
|
18339
|
+
throw new CliError("validation_error", `${path} is not a ${typesText(photoTypes ?? [])} image inside`);
|
|
18340
|
+
}
|
|
18341
|
+
return { kind, name: basename(path), source: { kind: "file", path: resolve(path), size: size2 } };
|
|
18342
|
+
}, "readUpload");
|
|
18343
|
+
var checkFilename = /* @__PURE__ */ __name((filename, files) => {
|
|
18344
|
+
if (files.length === 0)
|
|
18345
|
+
throw new CliError("validation_error", "--filename names a --file; give one");
|
|
18346
|
+
if (files.length > 1)
|
|
18347
|
+
throw new CliError("validation_error", "--filename names one --file; an album keeps its names");
|
|
18348
|
+
if (filename.trim() === "" || /[/\\\0]/.test(filename) || filename.length > 255)
|
|
18349
|
+
throw new CliError("validation_error", "--filename is a name, not a path: no / or \\, at most 255 characters");
|
|
18350
|
+
}, "checkFilename");
|
|
18351
|
+
var listOf2 = /* @__PURE__ */ __name((value) => value === void 0 ? [] : typeof value === "string" ? [value] : value, "listOf");
|
|
18352
|
+
var readAttachments = /* @__PURE__ */ __name(async ({ photo, file, voice, asFile, filename, text: text2 }, read) => {
|
|
18353
|
+
const photos = listOf2(photo);
|
|
18354
|
+
const files = listOf2(file);
|
|
18355
|
+
if (voice !== void 0 && (photos.length > 0 || files.length > 0 || (text2 ?? "").trim() !== "")) {
|
|
18356
|
+
throw new CliError("validation_error", "a voice message goes alone \u2014 no text, no file, no photo beside it");
|
|
18357
|
+
}
|
|
18358
|
+
if (asFile && files.length === 0)
|
|
18359
|
+
throw new CliError("validation_error", "--as-file is about a --file; give one");
|
|
18360
|
+
if (filename !== void 0)
|
|
18361
|
+
checkFilename(filename, files);
|
|
18362
|
+
const uploads = [];
|
|
18363
|
+
for (const one of photos)
|
|
18364
|
+
uploads.push(await readUpload("photo", one, read));
|
|
18365
|
+
for (const one of files)
|
|
18366
|
+
uploads.push({
|
|
18367
|
+
...await readUpload("file", one, read),
|
|
18368
|
+
...filename === void 0 ? {} : { name: filename },
|
|
18369
|
+
...asFile ? { asFile: true } : {}
|
|
18370
|
+
});
|
|
18371
|
+
if (voice !== void 0)
|
|
18372
|
+
uploads.push(await readUpload("voice", voice, read));
|
|
18373
|
+
return uploads;
|
|
18374
|
+
}, "readAttachments");
|
|
18375
|
+
var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
18376
|
+
if (extname(path).toLowerCase() !== ".webp")
|
|
18377
|
+
throw new CliError("validation_error", `a sticker is a .webp \u2014 send ${path} as a photo or a file instead`);
|
|
18378
|
+
const { name, source } = await readUpload("file", path, read);
|
|
18379
|
+
if (SIGNATURES[".webp"]?.(await fileHead(path)) !== true)
|
|
18380
|
+
throw new CliError("validation_error", `${path} is named .webp but is not a WebP image \u2014 nothing was sent`);
|
|
18381
|
+
const size2 = uploadSize(source);
|
|
18382
|
+
if (size2 > maxBytes)
|
|
18383
|
+
throw new CliError("validation_error", `the sticker is ${Math.ceil(size2 / 1024)} KiB, and this messenger takes at most ${Math.floor(maxBytes / 1024)} KiB \u2014 nothing was sent`);
|
|
18384
|
+
return { name, source };
|
|
18385
|
+
}, "readStickerFile");
|
|
18386
|
+
|
|
18387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
18185
18388
|
var DAY_MS = 864e5;
|
|
18186
18389
|
var NEW_DAYS = 30;
|
|
18187
18390
|
var SAME_TEXT_MIN = 20;
|
|
@@ -18258,7 +18461,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
18258
18461
|
};
|
|
18259
18462
|
}, "scorePerson");
|
|
18260
18463
|
|
|
18261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
18262
18465
|
var REGISTRIES = {
|
|
18263
18466
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
18264
18467
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -18343,7 +18546,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
18343
18546
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
18344
18547
|
})), "notCovered");
|
|
18345
18548
|
|
|
18346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
18347
18550
|
var ACTIVITY_MESSAGES = 1e3;
|
|
18348
18551
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
18349
18552
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18431,7 +18634,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
18431
18634
|
};
|
|
18432
18635
|
}, "botCheckService");
|
|
18433
18636
|
|
|
18434
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
18435
18638
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
18436
18639
|
if (value === void 0)
|
|
18437
18640
|
return void 0;
|
|
@@ -18441,7 +18644,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
18441
18644
|
return id2;
|
|
18442
18645
|
}, "threadIdOf");
|
|
18443
18646
|
|
|
18444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18647
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
18445
18648
|
var TOP_POSTS = 5;
|
|
18446
18649
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
18447
18650
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -18558,7 +18761,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
18558
18761
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
18559
18762
|
}, "median");
|
|
18560
18763
|
|
|
18561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
18562
18765
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
18563
18766
|
const events = [];
|
|
18564
18767
|
for (const stay of stays) {
|
|
@@ -18590,7 +18793,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
18590
18793
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
18591
18794
|
}, "memberEvents");
|
|
18592
18795
|
|
|
18593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18594
18797
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18595
18798
|
if (deps.reads !== "store")
|
|
18596
18799
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18737,7 +18940,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18737
18940
|
}
|
|
18738
18941
|
}, "senderAmong");
|
|
18739
18942
|
|
|
18740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
18741
18944
|
var EVENTS_DAYS = 7;
|
|
18742
18945
|
var TRACKED_DAYS = 30;
|
|
18743
18946
|
var STATS_PAGE = 1e3;
|
|
@@ -19032,7 +19235,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
19032
19235
|
return members.length === 0 ? null : members;
|
|
19033
19236
|
}, "storedMembers");
|
|
19034
19237
|
|
|
19035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
19036
19239
|
var INBOX_CHATS = 20;
|
|
19037
19240
|
var REVIEW_DAYS = 3;
|
|
19038
19241
|
var UNANSWERED_HOURS = 24;
|
|
@@ -19240,7 +19443,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
19240
19443
|
};
|
|
19241
19444
|
}, "inboxService");
|
|
19242
19445
|
|
|
19243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
19244
19447
|
var CONTEXT_MESSAGES = 10;
|
|
19245
19448
|
var CONTEXT_BYTES = 64 * 1024;
|
|
19246
19449
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -19496,10 +19699,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
19496
19699
|
};
|
|
19497
19700
|
}, "personMessages");
|
|
19498
19701
|
|
|
19499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19500
19703
|
import { createHash } from "node:crypto";
|
|
19501
19704
|
|
|
19502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
19503
19706
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
19504
19707
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
19505
19708
|
const parsed = parseMeetingReference(reference);
|
|
@@ -19517,7 +19720,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
19517
19720
|
return { parsed, meeting };
|
|
19518
19721
|
}, "authorizedMeetingMetadata");
|
|
19519
19722
|
|
|
19520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19521
19724
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
19522
19725
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
19523
19726
|
if (signal?.aborted)
|
|
@@ -19716,7 +19919,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
19716
19919
|
return { ...packet, fingerprint: hash(packet) };
|
|
19717
19920
|
}, "readMeetingEvidence");
|
|
19718
19921
|
|
|
19719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
19720
19923
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
19721
19924
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
19722
19925
|
const requestedAccounts = options.accountIds;
|
|
@@ -19815,7 +20018,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
19815
20018
|
};
|
|
19816
20019
|
}, "personMeetingContext");
|
|
19817
20020
|
|
|
19818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
19819
20022
|
var PREPARE_BYTES = 96 * 1024;
|
|
19820
20023
|
var MEETINGS = 5;
|
|
19821
20024
|
var CUES = 3;
|
|
@@ -19932,7 +20135,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
19932
20135
|
}
|
|
19933
20136
|
}, "meetingsOf");
|
|
19934
20137
|
|
|
19935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
19936
20139
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
19937
20140
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
19938
20141
|
const held = await storeIfOpen(deps);
|
|
@@ -20002,7 +20205,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
20002
20205
|
complete: false
|
|
20003
20206
|
})), "quiet");
|
|
20004
20207
|
|
|
20005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
20006
20209
|
var TIMELINE_ITEMS = 50;
|
|
20007
20210
|
var TIMELINE_MAX = 500;
|
|
20008
20211
|
var SCOPES = ["personal", "work"];
|
|
@@ -20057,7 +20260,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
20057
20260
|
};
|
|
20058
20261
|
}, "personTimeline");
|
|
20059
20262
|
|
|
20060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
20061
20264
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
20062
20265
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
20063
20266
|
const held = await storeIfOpen(deps);
|
|
@@ -20284,7 +20487,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
20284
20487
|
return rest;
|
|
20285
20488
|
}, "withoutPhone");
|
|
20286
20489
|
|
|
20287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
20288
20491
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
20289
20492
|
const tags = /* @__PURE__ */ new Map();
|
|
20290
20493
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -20293,7 +20496,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
20293
20496
|
return tags;
|
|
20294
20497
|
}, "taskTagFilters");
|
|
20295
20498
|
|
|
20296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
20297
20500
|
var TASK_QUERY = {
|
|
20298
20501
|
entity: "task",
|
|
20299
20502
|
backend: "sql",
|
|
@@ -20773,7 +20976,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
20773
20976
|
};
|
|
20774
20977
|
}, "taskView");
|
|
20775
20978
|
|
|
20776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
20777
20980
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
20778
20981
|
const ids = [...new Set(chatIds)];
|
|
20779
20982
|
if (ids.length === 0)
|
|
@@ -20799,7 +21002,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
20799
21002
|
}));
|
|
20800
21003
|
}, "chatCoverage");
|
|
20801
21004
|
|
|
20802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21005
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
20803
21006
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
20804
21007
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
20805
21008
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -20863,7 +21066,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
20863
21066
|
}
|
|
20864
21067
|
}, "validateContextEvidencePage");
|
|
20865
21068
|
|
|
20866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
20867
21070
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
20868
21071
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
20869
21072
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -20916,7 +21119,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
20916
21119
|
};
|
|
20917
21120
|
}, "contextReadBudget");
|
|
20918
21121
|
|
|
20919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
20920
21123
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
20921
21124
|
if (!port || typeof port.read !== "function")
|
|
20922
21125
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -20960,7 +21163,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
20960
21163
|
};
|
|
20961
21164
|
}, "createContextEvidenceReader");
|
|
20962
21165
|
|
|
20963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
20964
21167
|
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");
|
|
20965
21168
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
20966
21169
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -20976,18 +21179,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
20976
21179
|
}, "excerpt");
|
|
20977
21180
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
20978
21181
|
|
|
20979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
20980
21183
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
20981
21184
|
|
|
20982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
20983
21186
|
import { lstat } from "node:fs/promises";
|
|
20984
21187
|
|
|
20985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
20986
21189
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
20987
|
-
import { open as
|
|
21190
|
+
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
20988
21191
|
import { join as join2 } from "node:path";
|
|
20989
21192
|
|
|
20990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
20991
21194
|
import { createHash as createHash2 } from "node:crypto";
|
|
20992
21195
|
var metadataLimit = 16384;
|
|
20993
21196
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -21047,9 +21250,9 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
21047
21250
|
}
|
|
21048
21251
|
}, "readPartialMetadata");
|
|
21049
21252
|
|
|
21050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21253
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
21051
21254
|
import { randomUUID } from "node:crypto";
|
|
21052
|
-
import { open, rename, unlink } from "node:fs/promises";
|
|
21255
|
+
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
21053
21256
|
import { join } from "node:path";
|
|
21054
21257
|
var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
21055
21258
|
const { file, signal, partial } = input;
|
|
@@ -21077,7 +21280,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21077
21280
|
if (Buffer.byteLength(content) > metadataLimit)
|
|
21078
21281
|
throw new CliError("validation_error", "recording partial metadata exceeds its byte limit");
|
|
21079
21282
|
const temp = join(input.root, `${input.prefix}${randomUUID()}.tmp`);
|
|
21080
|
-
const metadata = await
|
|
21283
|
+
const metadata = await open2(temp, "wx", 384);
|
|
21081
21284
|
try {
|
|
21082
21285
|
try {
|
|
21083
21286
|
await metadata.writeFile(content);
|
|
@@ -21139,7 +21342,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21139
21342
|
};
|
|
21140
21343
|
}, "partialWriter");
|
|
21141
21344
|
|
|
21142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21143
21346
|
var NativeRecordingPartialStore = class {
|
|
21144
21347
|
static {
|
|
21145
21348
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -21205,7 +21408,7 @@ var NativeRecordingPartialStore = class {
|
|
|
21205
21408
|
file = await openOrdinaryFile(this.path, { writable: true });
|
|
21206
21409
|
} else {
|
|
21207
21410
|
const temp = join2(this.root, `${this.options.prefix}${randomUUID2()}.tmp`);
|
|
21208
|
-
file = await
|
|
21411
|
+
file = await open3(temp, "wx+", 384);
|
|
21209
21412
|
try {
|
|
21210
21413
|
await rename2(temp, this.path);
|
|
21211
21414
|
await unlink2(this.metadataPath).catch((error) => {
|
|
@@ -21246,12 +21449,12 @@ var NativeRecordingPartialStore = class {
|
|
|
21246
21449
|
}
|
|
21247
21450
|
};
|
|
21248
21451
|
|
|
21249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21250
21453
|
import { createHash as createHash4 } from "node:crypto";
|
|
21251
21454
|
import { link as link2 } from "node:fs/promises";
|
|
21252
|
-
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
21455
|
+
import { basename as basename2, dirname as dirname2, join as join4, resolve as resolve2 } from "node:path";
|
|
21253
21456
|
|
|
21254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
21255
21458
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
21256
21459
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
21257
21460
|
signal?.throwIfAborted();
|
|
@@ -21286,9 +21489,9 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
21286
21489
|
signal?.throwIfAborted();
|
|
21287
21490
|
}, "commitPublication");
|
|
21288
21491
|
|
|
21289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21290
21493
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21291
|
-
import { open as
|
|
21494
|
+
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21292
21495
|
import { join as join3 } from "node:path";
|
|
21293
21496
|
var readPublicationJournal = /* @__PURE__ */ __name(async (path, codec, limit, signal) => {
|
|
21294
21497
|
signal?.throwIfAborted();
|
|
@@ -21334,7 +21537,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21334
21537
|
throw new CliError("validation_error", "recording recovery record exceeds its metadata limit");
|
|
21335
21538
|
codec.decode(JSON.parse(content));
|
|
21336
21539
|
const temp = join3(root, `${prefix}${randomUUID3()}.tmp`);
|
|
21337
|
-
const handle = await
|
|
21540
|
+
const handle = await open4(temp, "wx", 384);
|
|
21338
21541
|
let identity;
|
|
21339
21542
|
try {
|
|
21340
21543
|
try {
|
|
@@ -21359,7 +21562,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21359
21562
|
}
|
|
21360
21563
|
}, "writePublicationJournal");
|
|
21361
21564
|
|
|
21362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21565
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21363
21566
|
var NativeRecordingPublication = class {
|
|
21364
21567
|
static {
|
|
21365
21568
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21371,7 +21574,7 @@ var NativeRecordingPublication = class {
|
|
|
21371
21574
|
options;
|
|
21372
21575
|
constructor(root, locator, options) {
|
|
21373
21576
|
this.root = root;
|
|
21374
|
-
if (!root || root.includes("\0") || !/^\.[a-zA-Z0-9][a-zA-Z0-9._-]{0,95}-$/.test(options.prefix) || !options.filename ||
|
|
21577
|
+
if (!root || root.includes("\0") || !/^\.[a-zA-Z0-9][a-zA-Z0-9._-]{0,95}-$/.test(options.prefix) || !options.filename || basename2(options.filename) !== options.filename || /[\\/\0]/.test(options.filename) || [".", ".."].includes(options.filename) || !Number.isSafeInteger(options.maxBytes) || options.maxBytes <= 0 || !Number.isSafeInteger(options.metadataLimit) || options.metadataLimit <= 0 || options.metadataLimit > 1048576 || [locator.provider, locator.account, locator.occurrenceId, locator.assetId].some((value) => typeof value !== "string" || !value.trim() || /[\0\r\n]/.test(value)))
|
|
21375
21578
|
throw new CliError("validation_error", "invalid native recording publication options");
|
|
21376
21579
|
this.scope = partialIdentity(locator);
|
|
21377
21580
|
this.options = Object.freeze({ ...options, codec: Object.freeze({ ...options.codec }) });
|
|
@@ -21387,7 +21590,7 @@ var NativeRecordingPublication = class {
|
|
|
21387
21590
|
return writePublicationJournal(this.root, this.journalPath, this.options.prefix, value, this.options.codec, this.options.metadataLimit, this.options.signal);
|
|
21388
21591
|
}
|
|
21389
21592
|
validate(partialPath, expected) {
|
|
21390
|
-
if (
|
|
21593
|
+
if (resolve2(dirname2(partialPath)) !== resolve2(this.root) || resolve2(partialPath) === resolve2(this.finalPath) || resolve2(partialPath) === resolve2(this.journalPath) || !Number.isSafeInteger(expected.size) || expected.size < 0 || expected.size > this.options.maxBytes || typeof expected.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(expected.sha256))
|
|
21391
21594
|
throw new CliError("validation_error", "invalid recording publication evidence");
|
|
21392
21595
|
this.options.signal?.throwIfAborted();
|
|
21393
21596
|
}
|
|
@@ -21432,10 +21635,10 @@ var NativeRecordingPublication = class {
|
|
|
21432
21635
|
}
|
|
21433
21636
|
};
|
|
21434
21637
|
|
|
21435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21436
21639
|
import { createHash as createHash5 } from "node:crypto";
|
|
21437
21640
|
import { readdir } from "node:fs/promises";
|
|
21438
|
-
import { isAbsolute, join as join5, resolve as
|
|
21641
|
+
import { isAbsolute as isAbsolute2, join as join5, resolve as resolve3 } from "node:path";
|
|
21439
21642
|
var mediaKey = /* @__PURE__ */ __name((one) => createHash5("sha256").update(JSON.stringify([one.provider, one.account, one.chat, one.message, one.position])).digest("hex"), "mediaKey");
|
|
21440
21643
|
var mediaManifestName = /* @__PURE__ */ __name((one) => `.media-archive-${mediaKey(one)}.json`, "mediaManifestName");
|
|
21441
21644
|
var missingMediaFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingMediaFile");
|
|
@@ -21455,7 +21658,7 @@ var parseMediaEntry = /* @__PURE__ */ __name((value) => {
|
|
|
21455
21658
|
"messageTime",
|
|
21456
21659
|
"mime",
|
|
21457
21660
|
"relocatedTo"
|
|
21458
|
-
].includes(key)) || one.messageTime !== void 0 && (typeof one.messageTime !== "string" || !Number.isFinite(Date.parse(one.messageTime)) || new Date(one.messageTime).toISOString() !== one.messageTime) || one.mime !== void 0 && (typeof one.mime !== "string" || one.mime.length > 127 || !/^[a-z0-9.+-]+\/[a-z0-9.+-]+$/.test(one.mime)) || one.relocatedTo !== void 0 && (typeof one.relocatedTo !== "string" || !
|
|
21661
|
+
].includes(key)) || one.messageTime !== void 0 && (typeof one.messageTime !== "string" || !Number.isFinite(Date.parse(one.messageTime)) || new Date(one.messageTime).toISOString() !== one.messageTime) || one.mime !== void 0 && (typeof one.mime !== "string" || one.mime.length > 127 || !/^[a-z0-9.+-]+\/[a-z0-9.+-]+$/.test(one.mime)) || one.relocatedTo !== void 0 && (typeof one.relocatedTo !== "string" || !isAbsolute2(one.relocatedTo) || /[\p{Cc}]/u.test(one.relocatedTo)) || [one.provider, one.account, one.chat, one.message, one.kind].some((text2) => typeof text2 !== "string" || !text2.trim() || text2.length > 512 || /[\0\r\n]/.test(text2)) || !Number.isSafeInteger(one.position) || one.position < 0 || !Number.isSafeInteger(one.size) || one.size < 0 || typeof one.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(one.sha256) || one.path !== `${mediaKey(one)}.bin`)
|
|
21459
21662
|
throw new CliError("validation_error", "invalid media archive manifest");
|
|
21460
21663
|
return { ...one };
|
|
21461
21664
|
}, "parseMediaEntry");
|
|
@@ -21494,7 +21697,7 @@ var readMediaManifests = /* @__PURE__ */ __name(async (root, signal) => {
|
|
|
21494
21697
|
return entries;
|
|
21495
21698
|
}, "readMediaManifests");
|
|
21496
21699
|
var verifyMediaEntry = /* @__PURE__ */ __name(async (root, one, signal) => {
|
|
21497
|
-
let location =
|
|
21700
|
+
let location = resolve3(root);
|
|
21498
21701
|
let entry = one;
|
|
21499
21702
|
const visited = /* @__PURE__ */ new Set();
|
|
21500
21703
|
while (entry.relocatedTo !== void 0) {
|
|
@@ -21502,7 +21705,7 @@ var verifyMediaEntry = /* @__PURE__ */ __name(async (root, one, signal) => {
|
|
|
21502
21705
|
if (visited.has(location) || visited.size >= 64)
|
|
21503
21706
|
throw new CliError("validation_error", "media archive relocation cycle or excessive depth");
|
|
21504
21707
|
visited.add(location);
|
|
21505
|
-
location =
|
|
21708
|
+
location = resolve3(entry.relocatedTo);
|
|
21506
21709
|
const target2 = parseMediaEntry(JSON.parse(await readBoundedUtf8File(join5(location, mediaManifestName(one)), { maxBytes: 16384 })));
|
|
21507
21710
|
if (!sameMediaCopy(one, target2))
|
|
21508
21711
|
return false;
|
|
@@ -21519,7 +21722,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
21519
21722
|
beforePublish
|
|
21520
21723
|
}), "commitMediaEntry");
|
|
21521
21724
|
|
|
21522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21523
21726
|
var validator = '"media-completed-v1"';
|
|
21524
21727
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21525
21728
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21620,12 +21823,12 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
21620
21823
|
return entry;
|
|
21621
21824
|
}, "archiveMediaFile");
|
|
21622
21825
|
|
|
21623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21624
21827
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21625
|
-
import { join as join6, resolve as
|
|
21828
|
+
import { join as join6, resolve as resolve4 } from "node:path";
|
|
21626
21829
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
21627
21830
|
const roots = /* @__PURE__ */ new Set();
|
|
21628
|
-
const queued = new Set(initial.map((directory2) =>
|
|
21831
|
+
const queued = new Set(initial.map((directory2) => resolve4(directory2)));
|
|
21629
21832
|
const pending = [...queued];
|
|
21630
21833
|
for (let at = 0; at < pending.length; at++) {
|
|
21631
21834
|
signal?.throwIfAborted();
|
|
@@ -21644,7 +21847,7 @@ var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
|
21644
21847
|
roots.add(root);
|
|
21645
21848
|
for (const entry of await readMediaManifests(root, signal))
|
|
21646
21849
|
if (entry.relocatedTo) {
|
|
21647
|
-
const location =
|
|
21850
|
+
const location = resolve4(entry.relocatedTo);
|
|
21648
21851
|
if (!queued.has(location)) {
|
|
21649
21852
|
queued.add(location);
|
|
21650
21853
|
pending.push(location);
|
|
@@ -21687,7 +21890,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21687
21890
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21688
21891
|
}, "withMediaArchiveLocks");
|
|
21689
21892
|
|
|
21690
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21691
21894
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
21692
21895
|
if (value === void 0)
|
|
21693
21896
|
return void 0;
|
|
@@ -21840,17 +22043,17 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
21840
22043
|
}, { create: true });
|
|
21841
22044
|
}, "archiveMedia");
|
|
21842
22045
|
|
|
21843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
21844
22047
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
21845
|
-
import { basename as
|
|
22048
|
+
import { basename as basename3, dirname as dirname3, join as join7, resolve as resolve5 } from "node:path";
|
|
21846
22049
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
21847
|
-
const path =
|
|
22050
|
+
const path = resolve5(directory2);
|
|
21848
22051
|
try {
|
|
21849
22052
|
return await realpath2(path);
|
|
21850
22053
|
} catch (error) {
|
|
21851
|
-
if (!missingMediaFile(error) ||
|
|
22054
|
+
if (!missingMediaFile(error) || dirname3(path) === path)
|
|
21852
22055
|
throw error;
|
|
21853
|
-
return join7(await canonicalDestination(
|
|
22056
|
+
return join7(await canonicalDestination(dirname3(path)), basename3(path));
|
|
21854
22057
|
}
|
|
21855
22058
|
}, "canonicalDestination");
|
|
21856
22059
|
var image = /* @__PURE__ */ __name((entry) => ["photo", "image"].includes(entry.kind) || entry.mime?.startsWith("image/"), "image");
|
|
@@ -21993,7 +22196,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
21993
22196
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
21994
22197
|
}, "moveMediaArchive");
|
|
21995
22198
|
|
|
21996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
21997
22200
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
21998
22201
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
21999
22202
|
}, "progress") }) => {
|
|
@@ -22016,7 +22219,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22016
22219
|
}
|
|
22017
22220
|
await nativeRuntime({ env, progress });
|
|
22018
22221
|
progress(`${model.id}: loading it once to check it works`);
|
|
22019
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
22222
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-OQF5U2C6.js");
|
|
22020
22223
|
const embedder = await openEmbedder2(model, directory2);
|
|
22021
22224
|
try {
|
|
22022
22225
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -22037,7 +22240,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
22037
22240
|
}
|
|
22038
22241
|
await nativeRuntime({ env, progress });
|
|
22039
22242
|
progress(`${model.id}: loading it once to check it works`);
|
|
22040
|
-
const { openReranker } = await import("./rerank-
|
|
22243
|
+
const { openReranker } = await import("./rerank-VHPC5O73.js");
|
|
22041
22244
|
const reranker = await openReranker(model, directory2);
|
|
22042
22245
|
try {
|
|
22043
22246
|
await reranker.score("check", ["check"]);
|
|
@@ -22055,7 +22258,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22055
22258
|
await installFiles(placedImage(model, directory2), { progress });
|
|
22056
22259
|
}
|
|
22057
22260
|
progress(`${model.id}: loading it once to check it works`);
|
|
22058
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22261
|
+
const { openPictureEmbedder } = await import("./embedder-OCWQAWKO.js");
|
|
22059
22262
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22060
22263
|
try {
|
|
22061
22264
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22067,7 +22270,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22067
22270
|
return { model, directory: directory2 };
|
|
22068
22271
|
}, "downloadImageModel");
|
|
22069
22272
|
|
|
22070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22071
22274
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22072
22275
|
async around(ref, window3) {
|
|
22073
22276
|
const at = parseLocator(ref);
|
|
@@ -22162,7 +22365,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
22162
22365
|
};
|
|
22163
22366
|
}, "storedNeighbours");
|
|
22164
22367
|
|
|
22165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
22166
22369
|
import { createHash as createHash6 } from "node:crypto";
|
|
22167
22370
|
var DAY = 864e5;
|
|
22168
22371
|
var MAX_TIME = 864e13;
|
|
@@ -22478,7 +22681,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
22478
22681
|
return value;
|
|
22479
22682
|
}, "decodeCheckpoint");
|
|
22480
22683
|
|
|
22481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
22482
22685
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
22483
22686
|
var PAGE = 20;
|
|
22484
22687
|
var PEOPLE = 20;
|
|
@@ -22882,7 +23085,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
22882
23085
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
22883
23086
|
}, "peopleOf");
|
|
22884
23087
|
|
|
22885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
22886
23089
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
22887
23090
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
22888
23091
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -22926,7 +23129,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
22926
23129
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
22927
23130
|
}, "matchVocabularyTerms");
|
|
22928
23131
|
|
|
22929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23132
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
22930
23133
|
var KINDS = ["project", "tag", "topic"];
|
|
22931
23134
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
22932
23135
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -22981,7 +23184,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
22981
23184
|
};
|
|
22982
23185
|
}, "findEvidenceMentions");
|
|
22983
23186
|
|
|
22984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
22985
23188
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
22986
23189
|
var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
|
|
22987
23190
|
if (PROJECT_ID.test(reference)) {
|
|
@@ -23147,7 +23350,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23147
23350
|
return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
|
|
23148
23351
|
}, "gatherStoredProject");
|
|
23149
23352
|
|
|
23150
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
23151
23354
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
23152
23355
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
23153
23356
|
if (deps.offline)
|
|
@@ -23219,7 +23422,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
23219
23422
|
};
|
|
23220
23423
|
}, "accountService");
|
|
23221
23424
|
|
|
23222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
23223
23426
|
var MINUTE = 6e4;
|
|
23224
23427
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
23225
23428
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -23238,7 +23441,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
23238
23441
|
return new Date(at - at % MINUTE).toISOString();
|
|
23239
23442
|
}, "sendTime");
|
|
23240
23443
|
|
|
23241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
23242
23445
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
23243
23446
|
try {
|
|
23244
23447
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -23485,7 +23688,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
23485
23688
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
23486
23689
|
}, "linkLimits");
|
|
23487
23690
|
|
|
23488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
23489
23692
|
var THREADS_PAGE = 500;
|
|
23490
23693
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
23491
23694
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -23564,7 +23767,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
23564
23767
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
23565
23768
|
}, "readMail");
|
|
23566
23769
|
|
|
23567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
23568
23771
|
var NO_MAIL = "no_mail";
|
|
23569
23772
|
var MAIL = "email";
|
|
23570
23773
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -23611,7 +23814,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
23611
23814
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
23612
23815
|
}, "accountsOfKind");
|
|
23613
23816
|
|
|
23614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
23615
23818
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
23616
23819
|
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");
|
|
23617
23820
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -23959,7 +24162,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
23959
24162
|
};
|
|
23960
24163
|
}, "statsLucene");
|
|
23961
24164
|
|
|
23962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
23963
24166
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
23964
24167
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
23965
24168
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -24128,7 +24331,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24128
24331
|
};
|
|
24129
24332
|
}, "readRankingSelection");
|
|
24130
24333
|
|
|
24131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
24132
24335
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
|
|
24133
24336
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
24134
24337
|
command,
|
|
@@ -24138,7 +24341,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
24138
24341
|
fieldsVersion: FIELD_VERSION
|
|
24139
24342
|
}), "searchRecordOf");
|
|
24140
24343
|
|
|
24141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
24142
24345
|
function invalid2(message) {
|
|
24143
24346
|
throw new CliError("validation_error", message);
|
|
24144
24347
|
}
|
|
@@ -24432,7 +24635,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
24432
24635
|
}, "evidence")
|
|
24433
24636
|
}), "adminStatisticsService");
|
|
24434
24637
|
|
|
24435
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
24436
24639
|
var DAY2 = 864e5;
|
|
24437
24640
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
24438
24641
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -24674,10 +24877,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24674
24877
|
};
|
|
24675
24878
|
}, "agendaItem");
|
|
24676
24879
|
|
|
24677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24678
24881
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24679
24882
|
|
|
24680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
24681
24884
|
var REQUEST_MS = 400;
|
|
24682
24885
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
24683
24886
|
const lowest = ranges[0];
|
|
@@ -24700,13 +24903,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
24700
24903
|
};
|
|
24701
24904
|
}, "estimateBackfill");
|
|
24702
24905
|
|
|
24703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
24704
24907
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
24705
24908
|
...error,
|
|
24706
24909
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
24707
24910
|
}), "withRecovery");
|
|
24708
24911
|
|
|
24709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
24710
24913
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
24711
24914
|
if (isCliFailure(error))
|
|
24712
24915
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -24789,7 +24992,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
24789
24992
|
};
|
|
24790
24993
|
}, "mergeBatches");
|
|
24791
24994
|
|
|
24792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
24793
24996
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
24794
24997
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
24795
24998
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -24812,7 +25015,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
24812
25015
|
}
|
|
24813
25016
|
}, "patiently");
|
|
24814
25017
|
|
|
24815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
24816
25019
|
var CONTEXT_MESSAGES2 = 3;
|
|
24817
25020
|
var CONTEXT_MINUTES = 10;
|
|
24818
25021
|
var MAX_CHARS = 1200;
|
|
@@ -24836,12 +25039,12 @@ var context = {
|
|
|
24836
25039
|
}, "describe")
|
|
24837
25040
|
};
|
|
24838
25041
|
|
|
24839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
24840
25043
|
var BUILT_INS = [context];
|
|
24841
25044
|
var providers = [...BUILT_INS];
|
|
24842
25045
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
24843
25046
|
|
|
24844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
24845
25048
|
var READ_PAGE = 5e3;
|
|
24846
25049
|
var CHAIN = 50;
|
|
24847
25050
|
var CONVERSATION_QUERY = {
|
|
@@ -24993,7 +25196,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
24993
25196
|
return size2;
|
|
24994
25197
|
}, "sized");
|
|
24995
25198
|
|
|
24996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
24997
25200
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
24998
25201
|
var MESSAGE_PAGE = 5e3;
|
|
24999
25202
|
var PER_SESSION = 8;
|
|
@@ -25012,7 +25215,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25012
25215
|
price: remote.price,
|
|
25013
25216
|
installed: true,
|
|
25014
25217
|
perBatch: PER_REQUEST * concurrency,
|
|
25015
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
25218
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-RENCYB5X.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
25016
25219
|
};
|
|
25017
25220
|
}
|
|
25018
25221
|
const model = textModel(choice);
|
|
@@ -25029,7 +25232,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25029
25232
|
if (!isTextModelInstalled(model, directory2))
|
|
25030
25233
|
throw notDownloaded(model.id);
|
|
25031
25234
|
if (apart) {
|
|
25032
|
-
const { openProcess } = await import("./process-
|
|
25235
|
+
const { openProcess } = await import("./process-DV5GQIGM.js");
|
|
25033
25236
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
25034
25237
|
}
|
|
25035
25238
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -25318,7 +25521,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
25318
25521
|
return { ...one, state };
|
|
25319
25522
|
}, "shaped");
|
|
25320
25523
|
|
|
25321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
25322
25525
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
25323
25526
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
25324
25527
|
for (const [key, value, maximum] of [
|
|
@@ -25371,7 +25574,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
25371
25574
|
}
|
|
25372
25575
|
}, "catchUpSearch");
|
|
25373
25576
|
|
|
25374
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
25375
25578
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
25376
25579
|
if (deps.reads === "store") {
|
|
25377
25580
|
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`);
|
|
@@ -25692,7 +25895,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
25692
25895
|
return message?.timestamp ?? fallback;
|
|
25693
25896
|
}, "timeOfKey");
|
|
25694
25897
|
|
|
25695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
25696
25899
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
25697
25900
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
25698
25901
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -25829,218 +26032,14 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
25829
26032
|
return { plan, repair };
|
|
25830
26033
|
}, "gapsService");
|
|
25831
26034
|
|
|
25832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
25833
26036
|
import { createHash as createHash9 } from "node:crypto";
|
|
25834
26037
|
import { constants as constants2 } from "node:fs";
|
|
25835
26038
|
import { open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
25836
26039
|
|
|
25837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25838
26041
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
25839
26042
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
25840
|
-
|
|
25841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
25842
|
-
import { openAsBlob, realpathSync } from "node:fs";
|
|
25843
|
-
import { open as open4, stat } from "node:fs/promises";
|
|
25844
|
-
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
25845
|
-
var MAX_BUFFERED_UPLOAD_BYTES = 256 * 1024 * 1024;
|
|
25846
|
-
var uploadSize = /* @__PURE__ */ __name((source) => source.kind === "file" ? source.size : source.bytes.byteLength, "uploadSize");
|
|
25847
|
-
var PHOTO = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp"]);
|
|
25848
|
-
var VOICE = /* @__PURE__ */ new Set([".ogg", ".oga", ".opus"]);
|
|
25849
|
-
var JPEG = /* @__PURE__ */ __name((head) => head[0] === 255 && head[1] === 216 && head[2] === 255, "JPEG");
|
|
25850
|
-
var SIGNATURES = {
|
|
25851
|
-
".jpg": JPEG,
|
|
25852
|
-
".jpeg": JPEG,
|
|
25853
|
-
".png": /* @__PURE__ */ __name((head) => Buffer.from(head.subarray(0, 8)).toString("latin1") === "\x89PNG\r\n\n", ".png"),
|
|
25854
|
-
".webp": /* @__PURE__ */ __name((head) => {
|
|
25855
|
-
const text2 = Buffer.from(head).toString("latin1");
|
|
25856
|
-
return text2.startsWith("RIFF") && text2.slice(8, 12) === "WEBP";
|
|
25857
|
-
}, ".webp")
|
|
25858
|
-
};
|
|
25859
|
-
var fileHead = /* @__PURE__ */ __name(async (path) => {
|
|
25860
|
-
const file = await open4(path, "r");
|
|
25861
|
-
try {
|
|
25862
|
-
const head = new Uint8Array(12);
|
|
25863
|
-
const { bytesRead } = await file.read(head, 0, head.length, 0);
|
|
25864
|
-
return head.subarray(0, bytesRead);
|
|
25865
|
-
} finally {
|
|
25866
|
-
await file.close();
|
|
25867
|
-
}
|
|
25868
|
-
}, "fileHead");
|
|
25869
|
-
var typesText = /* @__PURE__ */ __name((types2) => types2.length < 2 ? types2[0] ?? "" : `${types2.slice(0, -1).join(", ")} or ${types2.at(-1)}`, "typesText");
|
|
25870
|
-
var CREDENTIAL_PARTS = /* @__PURE__ */ new Set([
|
|
25871
|
-
".ssh",
|
|
25872
|
-
".gnupg",
|
|
25873
|
-
".aws",
|
|
25874
|
-
".azure",
|
|
25875
|
-
".kube",
|
|
25876
|
-
".secrets",
|
|
25877
|
-
"secrets",
|
|
25878
|
-
".password-store",
|
|
25879
|
-
".mozilla",
|
|
25880
|
-
".env",
|
|
25881
|
-
".npmrc",
|
|
25882
|
-
".pypirc",
|
|
25883
|
-
".netrc",
|
|
25884
|
-
"_netrc",
|
|
25885
|
-
".git-credentials",
|
|
25886
|
-
"credentials.yml.enc",
|
|
25887
|
-
"master.key"
|
|
25888
|
-
]);
|
|
25889
|
-
var CREDENTIAL_RUNS = [
|
|
25890
|
-
[".config", "autostart"],
|
|
25891
|
-
[".config", "git", "credentials"],
|
|
25892
|
-
[".config", "gh"],
|
|
25893
|
-
[".config", "gcloud"],
|
|
25894
|
-
[".config", "google-chrome"],
|
|
25895
|
-
[".config", "chromium"],
|
|
25896
|
-
[".config", "microsoft-edge"],
|
|
25897
|
-
[".config", "BraveSoftware"],
|
|
25898
|
-
[".docker", "config.json"],
|
|
25899
|
-
[".claude", ".credentials.json"],
|
|
25900
|
-
[".codex", "auth.json"],
|
|
25901
|
-
[".local", "share", "keyrings"],
|
|
25902
|
-
["Library", "Keychains"],
|
|
25903
|
-
["Library", "Cookies"],
|
|
25904
|
-
["Library", "Safari"],
|
|
25905
|
-
["Library", "Application Support", "Google", "Chrome"],
|
|
25906
|
-
["Library", "Application Support", "Chromium"],
|
|
25907
|
-
["Library", "Application Support", "Microsoft Edge"],
|
|
25908
|
-
["Library", "Application Support", "BraveSoftware"],
|
|
25909
|
-
["Library", "Application Support", "Firefox"],
|
|
25910
|
-
["AppData", "Local", "Google", "Chrome"],
|
|
25911
|
-
["AppData", "Local", "Chromium"],
|
|
25912
|
-
["AppData", "Local", "Microsoft", "Edge"],
|
|
25913
|
-
["AppData", "Local", "BraveSoftware"],
|
|
25914
|
-
["AppData", "Roaming", "Mozilla", "Firefox"],
|
|
25915
|
-
["AppData", "Local", "Microsoft", "Credentials"],
|
|
25916
|
-
["AppData", "Roaming", "Microsoft", "Credentials"],
|
|
25917
|
-
["AppData", "Roaming", "Microsoft", "Protect"],
|
|
25918
|
-
["AppData", "Roaming", "gcloud"],
|
|
25919
|
-
["AppData", "Roaming", "GitHub CLI"]
|
|
25920
|
-
];
|
|
25921
|
-
var WIRECAT_APPS = [
|
|
25922
|
-
{ appName: "max-cli", prefix: "MAX" },
|
|
25923
|
-
{ appName: "tg-cli", prefix: "TG" },
|
|
25924
|
-
{ appName: "whatsapp-cli", prefix: "WA" },
|
|
25925
|
-
{ appName: "cli-memo", prefix: "MEMO" },
|
|
25926
|
-
{ appName: "drive-cli", prefix: "DRIVE" },
|
|
25927
|
-
{ appName: "zm", prefix: "ZM" },
|
|
25928
|
-
{ appName: "cli-messaging", prefix: "MESSAGING" },
|
|
25929
|
-
{ appName: "cli-common", prefix: "CLI_COMMON" }
|
|
25930
|
-
];
|
|
25931
|
-
var refusedPlace = /* @__PURE__ */ __name((path, app, env, platform = process.platform) => {
|
|
25932
|
-
const own = [
|
|
25933
|
-
...[{ appName: app.appName, prefix: app.envPrefix }, ...WIRECAT_APPS].flatMap((one) => Object.values(resolvePaths({ ...one, env, platform }))),
|
|
25934
|
-
// The shared WireCat folder: the store, its backups beside it, the models.
|
|
25935
|
-
wirecatDirectory(env, platform)
|
|
25936
|
-
];
|
|
25937
|
-
const store = resolve5(storePath(env));
|
|
25938
|
-
let ancestor = resolve5(path);
|
|
25939
|
-
let real = ancestor;
|
|
25940
|
-
for (; ; ) {
|
|
25941
|
-
try {
|
|
25942
|
-
real = resolve5(realpathSync(ancestor), relative(ancestor, resolve5(path)));
|
|
25943
|
-
break;
|
|
25944
|
-
} catch {
|
|
25945
|
-
const parent = dirname3(ancestor);
|
|
25946
|
-
if (parent === ancestor)
|
|
25947
|
-
break;
|
|
25948
|
-
ancestor = parent;
|
|
25949
|
-
}
|
|
25950
|
-
}
|
|
25951
|
-
const folded = platform === "darwin" || platform === "win32";
|
|
25952
|
-
const fold2 = /* @__PURE__ */ __name((text2) => folded ? text2.toLowerCase() : text2, "fold");
|
|
25953
|
-
const parts = new Set([...CREDENTIAL_PARTS].map(fold2));
|
|
25954
|
-
const runs = CREDENTIAL_RUNS.map((run) => run.map(fold2));
|
|
25955
|
-
const named2 = /* @__PURE__ */ __name((candidate) => {
|
|
25956
|
-
const names2 = candidate.split(sep).map(fold2);
|
|
25957
|
-
return names2.some((name, index) => parts.has(name) || /^\.env\./.test(name) || runs.some((run) => run.every((part, offset) => names2[index + offset] === part)));
|
|
25958
|
-
}, "named");
|
|
25959
|
-
const same2 = /* @__PURE__ */ __name((a, b) => fold2(a) === fold2(b), "same");
|
|
25960
|
-
return [resolve5(path), real].some((candidate) => named2(candidate) || own.some((dir) => inside(fold2(candidate), fold2(dir))) || [store, `${store}-wal`, `${store}-shm`].some((file) => same2(candidate, file)));
|
|
25961
|
-
}, "refusedPlace");
|
|
25962
|
-
var inside = /* @__PURE__ */ __name((path, dir) => {
|
|
25963
|
-
const way = relative(resolve5(dir), path);
|
|
25964
|
-
return way === "" || !way.startsWith("..") && !isAbsolute2(way);
|
|
25965
|
-
}, "inside");
|
|
25966
|
-
var readUpload = /* @__PURE__ */ __name(async (kind, path, { app, env = process.env, anyFile = false, photoTypes }) => {
|
|
25967
|
-
const extension = extname(path).toLowerCase();
|
|
25968
|
-
if (kind === "photo" && photoTypes !== void 0 && !photoTypes.includes(extension)) {
|
|
25969
|
-
throw new CliError("validation_error", `this photo must be a ${typesText(photoTypes)} file, not ${path}`);
|
|
25970
|
-
}
|
|
25971
|
-
if (kind === "photo" && photoTypes === void 0 && !PHOTO.has(extension)) {
|
|
25972
|
-
throw new CliError("validation_error", `a photo is a .jpg, .png or .webp \u2014 send ${path} as a file instead`);
|
|
25973
|
-
}
|
|
25974
|
-
if (kind === "voice" && !VOICE.has(extension)) {
|
|
25975
|
-
throw new CliError("validation_error", `a voice message is Ogg Opus: .ogg, .oga or .opus \u2014 send ${path} as a file`);
|
|
25976
|
-
}
|
|
25977
|
-
if (!anyFile && refusedPlace(path, app, env)) {
|
|
25978
|
-
throw new CliError("validation_error", `cannot send ${path}: known credential files, browser profiles, the WireCat apps' folders and the message store are not sent \u2014 the owner adds --allow-any-file to the command if this file is meant to go`);
|
|
25979
|
-
}
|
|
25980
|
-
let size2;
|
|
25981
|
-
let head;
|
|
25982
|
-
try {
|
|
25983
|
-
const info = await stat(path);
|
|
25984
|
-
if (!info.isFile())
|
|
25985
|
-
throw Object.assign(new Error("not a file"), { code: "EISDIR" });
|
|
25986
|
-
size2 = info.size;
|
|
25987
|
-
if (photoTypes !== void 0 && SIGNATURES[extension] !== void 0)
|
|
25988
|
-
head = await fileHead(path);
|
|
25989
|
-
} catch (error) {
|
|
25990
|
-
const code = error.code;
|
|
25991
|
-
const reason = code === "ENOENT" ? "no such file" : code === "EISDIR" ? "it is a folder" : "it cannot be read";
|
|
25992
|
-
throw new CliError("validation_error", `cannot send ${path}: ${reason}`);
|
|
25993
|
-
}
|
|
25994
|
-
if (head !== void 0 && SIGNATURES[extension]?.(head) !== true) {
|
|
25995
|
-
throw new CliError("validation_error", `${path} is not a ${typesText(photoTypes ?? [])} image inside`);
|
|
25996
|
-
}
|
|
25997
|
-
return { kind, name: basename3(path), source: { kind: "file", path: resolve5(path), size: size2 } };
|
|
25998
|
-
}, "readUpload");
|
|
25999
|
-
var checkFilename = /* @__PURE__ */ __name((filename, files) => {
|
|
26000
|
-
if (files.length === 0)
|
|
26001
|
-
throw new CliError("validation_error", "--filename names a --file; give one");
|
|
26002
|
-
if (files.length > 1)
|
|
26003
|
-
throw new CliError("validation_error", "--filename names one --file; an album keeps its names");
|
|
26004
|
-
if (filename.trim() === "" || /[/\\\0]/.test(filename) || filename.length > 255)
|
|
26005
|
-
throw new CliError("validation_error", "--filename is a name, not a path: no / or \\, at most 255 characters");
|
|
26006
|
-
}, "checkFilename");
|
|
26007
|
-
var listOf2 = /* @__PURE__ */ __name((value) => value === void 0 ? [] : typeof value === "string" ? [value] : value, "listOf");
|
|
26008
|
-
var readAttachments = /* @__PURE__ */ __name(async ({ photo, file, voice, asFile, filename, text: text2 }, read) => {
|
|
26009
|
-
const photos = listOf2(photo);
|
|
26010
|
-
const files = listOf2(file);
|
|
26011
|
-
if (voice !== void 0 && (photos.length > 0 || files.length > 0 || (text2 ?? "").trim() !== "")) {
|
|
26012
|
-
throw new CliError("validation_error", "a voice message goes alone \u2014 no text, no file, no photo beside it");
|
|
26013
|
-
}
|
|
26014
|
-
if (asFile && files.length === 0)
|
|
26015
|
-
throw new CliError("validation_error", "--as-file is about a --file; give one");
|
|
26016
|
-
if (filename !== void 0)
|
|
26017
|
-
checkFilename(filename, files);
|
|
26018
|
-
const uploads = [];
|
|
26019
|
-
for (const one of photos)
|
|
26020
|
-
uploads.push(await readUpload("photo", one, read));
|
|
26021
|
-
for (const one of files)
|
|
26022
|
-
uploads.push({
|
|
26023
|
-
...await readUpload("file", one, read),
|
|
26024
|
-
...filename === void 0 ? {} : { name: filename },
|
|
26025
|
-
...asFile ? { asFile: true } : {}
|
|
26026
|
-
});
|
|
26027
|
-
if (voice !== void 0)
|
|
26028
|
-
uploads.push(await readUpload("voice", voice, read));
|
|
26029
|
-
return uploads;
|
|
26030
|
-
}, "readAttachments");
|
|
26031
|
-
var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
26032
|
-
if (extname(path).toLowerCase() !== ".webp")
|
|
26033
|
-
throw new CliError("validation_error", `a sticker is a .webp \u2014 send ${path} as a photo or a file instead`);
|
|
26034
|
-
const { name, source } = await readUpload("file", path, read);
|
|
26035
|
-
if (SIGNATURES[".webp"]?.(await fileHead(path)) !== true)
|
|
26036
|
-
throw new CliError("validation_error", `${path} is named .webp but is not a WebP image \u2014 nothing was sent`);
|
|
26037
|
-
const size2 = uploadSize(source);
|
|
26038
|
-
if (size2 > maxBytes)
|
|
26039
|
-
throw new CliError("validation_error", `the sticker is ${Math.ceil(size2 / 1024)} KiB, and this messenger takes at most ${Math.floor(maxBytes / 1024)} KiB \u2014 nothing was sent`);
|
|
26040
|
-
return { name, source };
|
|
26041
|
-
}, "readStickerFile");
|
|
26042
|
-
|
|
26043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.520.0_@wirecat+cli-base@0.68.1_commander@15.0.0_esbuild@0.28.2_type_33ccf8bfbe17590bae2f3fc544520037/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
26044
26043
|
var MAX_FILES = 1e4;
|
|
26045
26044
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
26046
26045
|
if (refusedPlace(directory2, app, env))
|
|
@@ -26109,15 +26108,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
26109
26108
|
return choices;
|
|
26110
26109
|
}, "directoryPaths");
|
|
26111
26110
|
|
|
26112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26113
26112
|
import { posix } from "node:path";
|
|
26114
26113
|
|
|
26115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26116
26115
|
import { setImmediate as tick } from "node:timers/promises";
|
|
26117
26116
|
import { crc32 } from "node:zlib";
|
|
26118
26117
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
26119
26118
|
|
|
26120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
26121
26120
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
26122
26121
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
26123
26122
|
var SAMPLE = 65536;
|
|
@@ -26219,7 +26218,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
26219
26218
|
return result.text;
|
|
26220
26219
|
}, "decodeXml");
|
|
26221
26220
|
|
|
26222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26223
26222
|
var MAX_PART = 10 * 1024 * 1024;
|
|
26224
26223
|
var MAX_ENTRIES = 1e3;
|
|
26225
26224
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -26232,7 +26231,7 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
26232
26231
|
if (signal?.aborted)
|
|
26233
26232
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
26234
26233
|
}, "cancelled");
|
|
26235
|
-
var
|
|
26234
|
+
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character) => character.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
26236
26235
|
var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
26237
26236
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
26238
26237
|
let end = -1;
|
|
@@ -26267,7 +26266,7 @@ var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
|
26267
26266
|
if (next > stop)
|
|
26268
26267
|
throw new Error("invalid_zip");
|
|
26269
26268
|
const name = decoder.decode(bytes2.subarray(offset + 46, offset + 46 + length));
|
|
26270
|
-
if (!
|
|
26269
|
+
if (!safeName2(name) || entries.has(name) || flags & 1 || method !== 0 && method !== 8)
|
|
26271
26270
|
throw new Error("invalid_zip");
|
|
26272
26271
|
if ((view.getUint32(offset + 38, true) >>> 16 & 61440) === 40960)
|
|
26273
26272
|
throw new Error("invalid_zip");
|
|
@@ -26434,7 +26433,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
26434
26433
|
return found;
|
|
26435
26434
|
}, "elements");
|
|
26436
26435
|
|
|
26437
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
26438
26437
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
26439
26438
|
let name = "";
|
|
26440
26439
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -26489,7 +26488,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
26489
26488
|
return { text: parts.join("").trim(), truncated: false };
|
|
26490
26489
|
}, "sheetText");
|
|
26491
26490
|
|
|
26492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26493
26492
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
26494
26493
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
26495
26494
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26889,10 +26888,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26889
26888
|
}
|
|
26890
26889
|
}, "readDocument");
|
|
26891
26890
|
|
|
26892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26893
26892
|
import { extname as extname3 } from "node:path";
|
|
26894
26893
|
|
|
26895
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26896
26895
|
import { readFileSync } from "node:fs";
|
|
26897
26896
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
26898
26897
|
import { fileURLToPath } from "node:url";
|
|
@@ -26953,7 +26952,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26953
26952
|
}
|
|
26954
26953
|
}, "derived");
|
|
26955
26954
|
|
|
26956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26957
26956
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26958
26957
|
var image2 = {
|
|
26959
26958
|
id: "image",
|
|
@@ -26962,7 +26961,7 @@ var image2 = {
|
|
|
26962
26961
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26963
26962
|
};
|
|
26964
26963
|
|
|
26965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26966
26965
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26967
26966
|
var doc = {
|
|
26968
26967
|
id: "doc",
|
|
@@ -26974,7 +26973,7 @@ var doc = {
|
|
|
26974
26973
|
}), "read")
|
|
26975
26974
|
};
|
|
26976
26975
|
|
|
26977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26976
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26978
26977
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26979
26978
|
var docx = {
|
|
26980
26979
|
id: "docx",
|
|
@@ -26987,7 +26986,7 @@ var docx = {
|
|
|
26987
26986
|
}), "read")
|
|
26988
26987
|
};
|
|
26989
26988
|
|
|
26990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26991
26990
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26992
26991
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26993
26992
|
"fonttbl",
|
|
@@ -27163,7 +27162,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
27163
27162
|
}, "htmlText");
|
|
27164
27163
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
27165
27164
|
|
|
27166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
27167
27166
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
27168
27167
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
27169
27168
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -27219,7 +27218,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
27219
27218
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
27220
27219
|
}, "markdownSections");
|
|
27221
27220
|
|
|
27222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
27223
27222
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
27224
27223
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
27225
27224
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -27290,7 +27289,7 @@ var html = {
|
|
|
27290
27289
|
}, "read")
|
|
27291
27290
|
};
|
|
27292
27291
|
|
|
27293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
27294
27293
|
var office = {
|
|
27295
27294
|
id: "office",
|
|
27296
27295
|
version: documentExtractor("odt"),
|
|
@@ -27301,7 +27300,7 @@ var office = {
|
|
|
27301
27300
|
}, "read")
|
|
27302
27301
|
};
|
|
27303
27302
|
|
|
27304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
27305
27304
|
var pdf = {
|
|
27306
27305
|
id: "pdf",
|
|
27307
27306
|
version: "unpdf",
|
|
@@ -27368,7 +27367,7 @@ var pdf = {
|
|
|
27368
27367
|
}), "read")
|
|
27369
27368
|
};
|
|
27370
27369
|
|
|
27371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
27372
27371
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
27373
27372
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
27374
27373
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -27388,7 +27387,7 @@ var plain = {
|
|
|
27388
27387
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
27389
27388
|
};
|
|
27390
27389
|
|
|
27391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
27392
27391
|
var rtf = {
|
|
27393
27392
|
id: "rtf",
|
|
27394
27393
|
version: "v1",
|
|
@@ -27396,10 +27395,10 @@ var rtf = {
|
|
|
27396
27395
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
27397
27396
|
};
|
|
27398
27397
|
|
|
27399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27400
27399
|
import { basename as basename5 } from "node:path";
|
|
27401
27400
|
|
|
27402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
27403
27402
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
27404
27403
|
const cells = [];
|
|
27405
27404
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -27437,7 +27436,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
27437
27436
|
return { cells, truncated };
|
|
27438
27437
|
}, "delimitedSpans");
|
|
27439
27438
|
|
|
27440
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27441
27440
|
var DELIMITED = {
|
|
27442
27441
|
".csv": ",",
|
|
27443
27442
|
".tsv": " ",
|
|
@@ -27476,7 +27475,7 @@ var sheets = {
|
|
|
27476
27475
|
}, "read")
|
|
27477
27476
|
};
|
|
27478
27477
|
|
|
27479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
27480
27479
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
27481
27480
|
var HEAD_BYTES = 1024;
|
|
27482
27481
|
var readers = [...BUILT_INS2];
|
|
@@ -27486,7 +27485,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
27486
27485
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
27487
27486
|
}, "readWithRegistry");
|
|
27488
27487
|
|
|
27489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27490
27489
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
27491
27490
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
27492
27491
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -28565,7 +28564,7 @@ function imageSize(input) {
|
|
|
28565
28564
|
}
|
|
28566
28565
|
__name(imageSize, "imageSize");
|
|
28567
28566
|
|
|
28568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
28569
28568
|
var MAX_PAGES = 20;
|
|
28570
28569
|
var MAX_PIXELS = 2e7;
|
|
28571
28570
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28716,7 +28715,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28716
28715
|
}
|
|
28717
28716
|
}, "ocrPdf");
|
|
28718
28717
|
|
|
28719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28718
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28720
28719
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28721
28720
|
const limits = pdfPreviewLimits(env);
|
|
28722
28721
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -28793,7 +28792,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28793
28792
|
}
|
|
28794
28793
|
}, "pdfPreview");
|
|
28795
28794
|
|
|
28796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28795
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28797
28796
|
import { createHash as createHash8 } from "node:crypto";
|
|
28798
28797
|
import { constants } from "node:fs";
|
|
28799
28798
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28901,7 +28900,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28901
28900
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28902
28901
|
}, "transferMime");
|
|
28903
28902
|
|
|
28904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28905
28904
|
var ATTACHMENT_QUERY = {
|
|
28906
28905
|
entity: "attachment",
|
|
28907
28906
|
backend: "sql",
|
|
@@ -29282,7 +29281,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29282
29281
|
}, "setText")
|
|
29283
29282
|
}), "attachmentsService");
|
|
29284
29283
|
|
|
29285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
29286
29285
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
29287
29286
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
29288
29287
|
const store = await accountStore(deps);
|
|
@@ -29312,7 +29311,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29312
29311
|
}, "list")
|
|
29313
29312
|
}), "chatDocumentsService");
|
|
29314
29313
|
|
|
29315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
29316
29315
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
29317
29316
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
29318
29317
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -29399,7 +29398,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
29399
29398
|
}
|
|
29400
29399
|
}, "isRetentionSelection");
|
|
29401
29400
|
|
|
29402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
29403
29402
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
29404
29403
|
const fields = text2.split(",").map((one) => one.trim());
|
|
29405
29404
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -29606,7 +29605,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29606
29605
|
};
|
|
29607
29606
|
}, "countersService");
|
|
29608
29607
|
|
|
29609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29610
29609
|
var SYNC_KEY = "messages.sync-first";
|
|
29611
29610
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29612
29611
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29738,7 +29737,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29738
29737
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29739
29738
|
}), "withRefresh");
|
|
29740
29739
|
|
|
29741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29740
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29742
29741
|
var CANDIDATES = 50;
|
|
29743
29742
|
var WORD_HITS = 200;
|
|
29744
29743
|
var RRF_K = 60;
|
|
@@ -30013,13 +30012,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
30013
30012
|
return mean.map((value) => value / length);
|
|
30014
30013
|
}, "meanOf");
|
|
30015
30014
|
|
|
30016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
30017
30016
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
30018
30017
|
...embeddingsMaintenance(deps),
|
|
30019
30018
|
...embeddingsSearch(deps)
|
|
30020
30019
|
}), "embeddingsService");
|
|
30021
30020
|
|
|
30022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
30023
30022
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
30024
30023
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
30025
30024
|
if (deps.offline)
|
|
@@ -30160,7 +30159,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30160
30159
|
};
|
|
30161
30160
|
}, "foldersService");
|
|
30162
30161
|
|
|
30163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
30164
30163
|
var REVIEW_COUNT = 500;
|
|
30165
30164
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
30166
30165
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -30239,7 +30238,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
30239
30238
|
};
|
|
30240
30239
|
}, "mentionsService");
|
|
30241
30240
|
|
|
30242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
30243
30242
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
30244
30243
|
if (isLocator(reference)) {
|
|
30245
30244
|
if (message !== void 0)
|
|
@@ -30286,7 +30285,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
30286
30285
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
30287
30286
|
}, "validatePermalink");
|
|
30288
30287
|
|
|
30289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30288
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
30290
30289
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
30291
30290
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
30292
30291
|
return `${seconds / 86400}d`;
|
|
@@ -30318,7 +30317,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
30318
30317
|
return seconds;
|
|
30319
30318
|
}, "pinDurationOf");
|
|
30320
30319
|
|
|
30321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
30322
30321
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
30323
30322
|
if (sendAs === void 0) {
|
|
30324
30323
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30343,7 +30342,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30343
30342
|
return sendAs;
|
|
30344
30343
|
}, "typedSendAs");
|
|
30345
30344
|
|
|
30346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
30347
30346
|
var TOTAL_CAP = 1e4;
|
|
30348
30347
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
30349
30348
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -30354,7 +30353,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
30354
30353
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
30355
30354
|
}, "totalOf");
|
|
30356
30355
|
|
|
30357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
30358
30357
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
30359
30358
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
30360
30359
|
let narrows = false;
|
|
@@ -30383,7 +30382,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
30383
30382
|
return wanted(root).join(" ").trim();
|
|
30384
30383
|
}, "meaningWords");
|
|
30385
30384
|
|
|
30386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30385
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
30387
30386
|
var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
30388
30387
|
var scaffolding = new Set(words("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"));
|
|
30389
30388
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -30498,7 +30497,7 @@ function planQuestion(text2, strict = false) {
|
|
|
30498
30497
|
}
|
|
30499
30498
|
__name(planQuestion, "planQuestion");
|
|
30500
30499
|
|
|
30501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30500
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30502
30501
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30503
30502
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30504
30503
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30691,7 +30690,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30691
30690
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
30692
30691
|
}, "signals");
|
|
30693
30692
|
|
|
30694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30695
30694
|
var MEANING_DEPTH = 100;
|
|
30696
30695
|
var RRF_K2 = 60;
|
|
30697
30696
|
var RERANK_DEPTH = 50;
|
|
@@ -31019,7 +31018,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
31019
31018
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
31020
31019
|
}, "mixedWithReranker");
|
|
31021
31020
|
|
|
31022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
31023
31022
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
31024
31023
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
31025
31024
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -31218,7 +31217,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31218
31217
|
return result;
|
|
31219
31218
|
}, "readThreadContext");
|
|
31220
31219
|
|
|
31221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
31222
31221
|
var SEARCH_FILL_MS = 200;
|
|
31223
31222
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
31224
31223
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -31285,12 +31284,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
31285
31284
|
}, "accountOf");
|
|
31286
31285
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
31287
31286
|
|
|
31288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31289
31288
|
import { createHash as createHash10 } from "node:crypto";
|
|
31290
31289
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
31291
31290
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
31292
31291
|
|
|
31293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
31294
31293
|
var GROUP_SETTINGS = [
|
|
31295
31294
|
"allCanPin",
|
|
31296
31295
|
"onlyAdminsAdd",
|
|
@@ -31304,10 +31303,10 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
31304
31303
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
31305
31304
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
31306
31305
|
|
|
31307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
31308
31307
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
31309
31308
|
import { link as link3, rm } from "node:fs/promises";
|
|
31310
|
-
import {
|
|
31309
|
+
import { join as join10, resolve as resolve6 } from "node:path";
|
|
31311
31310
|
import { Readable, Transform } from "node:stream";
|
|
31312
31311
|
import { pipeline } from "node:stream/promises";
|
|
31313
31312
|
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
@@ -31381,17 +31380,8 @@ var EXTENSIONS = {
|
|
|
31381
31380
|
"application/pdf": "pdf"
|
|
31382
31381
|
};
|
|
31383
31382
|
var BY_KIND = { photo: "jpg" };
|
|
31384
|
-
var safeName2 = /* @__PURE__ */ __name((name, platform = process.platform) => {
|
|
31385
|
-
let plain2 = name === void 0 ? "" : basename6(name.replaceAll("\\", "/")).replace(/[\p{Cc}---]/gu, "").replace(/^\.+/, "");
|
|
31386
|
-
if (platform === "win32") {
|
|
31387
|
-
plain2 = plain2.replace(/[<>:"|?*]/g, "_").replace(/[. ]+$/, "");
|
|
31388
|
-
if (/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\.|$)/i.test(plain2))
|
|
31389
|
-
return void 0;
|
|
31390
|
-
}
|
|
31391
|
-
return plain2 === "" ? void 0 : plain2;
|
|
31392
|
-
}, "safeName");
|
|
31393
31383
|
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
31394
|
-
const own =
|
|
31384
|
+
const own = safeName(file.name);
|
|
31395
31385
|
const fileName = /* @__PURE__ */ __name(() => {
|
|
31396
31386
|
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
31397
31387
|
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
@@ -31427,7 +31417,7 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
31427
31417
|
}
|
|
31428
31418
|
}, "save");
|
|
31429
31419
|
|
|
31430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31431
31421
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
31432
31422
|
var PICTURE_FLOOR = 0.25;
|
|
31433
31423
|
var PAGE4 = 50;
|
|
@@ -31444,7 +31434,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31444
31434
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31445
31435
|
if (!isImageModelInstalled(model2, directory2))
|
|
31446
31436
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31447
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31437
|
+
const { openPictureEmbedder } = await import("./embedder-OCWQAWKO.js");
|
|
31448
31438
|
return openPictureEmbedder(model2, directory2);
|
|
31449
31439
|
}, "open");
|
|
31450
31440
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31641,7 +31631,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31641
31631
|
}, "search")
|
|
31642
31632
|
}), "withPictures");
|
|
31643
31633
|
|
|
31644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31645
31635
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
31646
31636
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
31647
31637
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31690,7 +31680,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31690
31680
|
}
|
|
31691
31681
|
}, "meaningLane");
|
|
31692
31682
|
|
|
31693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31683
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31694
31684
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31695
31685
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31696
31686
|
if (choice === "off")
|
|
@@ -31702,9 +31692,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31702
31692
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31703
31693
|
try {
|
|
31704
31694
|
const warm = deps.embedders;
|
|
31705
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31695
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-DV5GQIGM.js")).openRerankerProcess(model, directory2, {
|
|
31706
31696
|
threads: defaultThreads()
|
|
31707
|
-
})) : await (await import("./rerank-
|
|
31697
|
+
})) : await (await import("./rerank-VHPC5O73.js")).openReranker(model, directory2);
|
|
31708
31698
|
return {
|
|
31709
31699
|
model: model.id,
|
|
31710
31700
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31724,17 +31714,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31724
31714
|
};
|
|
31725
31715
|
}, "rerankLane");
|
|
31726
31716
|
|
|
31727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31728
31718
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
31729
31719
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
31730
31720
|
const directory2 = imageModelsDirectory(env);
|
|
31731
31721
|
if (!isImageModelInstalled(model, directory2))
|
|
31732
31722
|
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 });
|
|
31733
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31723
|
+
const { openPictureEmbedder } = await import("./embedder-OCWQAWKO.js");
|
|
31734
31724
|
return openPictureEmbedder(model, directory2);
|
|
31735
31725
|
}, "openPictureEmbedderFor");
|
|
31736
31726
|
|
|
31737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31738
31728
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
31739
31729
|
const metadata = note.frontMatter;
|
|
31740
31730
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31749,7 +31739,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
31749
31739
|
};
|
|
31750
31740
|
}, "documentSource");
|
|
31751
31741
|
|
|
31752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31753
31743
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31754
31744
|
let root;
|
|
31755
31745
|
try {
|
|
@@ -31776,7 +31766,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
31776
31766
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31777
31767
|
}, "titleTiers");
|
|
31778
31768
|
|
|
31779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31780
31770
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
31781
31771
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
31782
31772
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -32186,7 +32176,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
32186
32176
|
};
|
|
32187
32177
|
}, "searchNotesOf");
|
|
32188
32178
|
|
|
32189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
32190
32180
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
32191
32181
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
32192
32182
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -32298,7 +32288,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
32298
32288
|
};
|
|
32299
32289
|
}, "searchEvents");
|
|
32300
32290
|
|
|
32301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
32302
32292
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
32303
32293
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
32304
32294
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -32506,7 +32496,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32506
32496
|
};
|
|
32507
32497
|
}, "searchAll");
|
|
32508
32498
|
|
|
32509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
32510
32500
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
32511
32501
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
32512
32502
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32753,7 +32743,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
32753
32743
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32754
32744
|
}, "searchAllOfSource");
|
|
32755
32745
|
|
|
32756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32757
32747
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32758
32748
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
32759
32749
|
var DEFAULT_BACKEND = "both";
|
|
@@ -32942,7 +32932,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32942
32932
|
return { report, sources };
|
|
32943
32933
|
}, "searchServer");
|
|
32944
32934
|
|
|
32945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32946
32936
|
var DELETE_AT_ONCE = 10;
|
|
32947
32937
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
32948
32938
|
const { guard } = deps;
|
|
@@ -33368,7 +33358,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
33368
33358
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
33369
33359
|
}, "checkMediaOptions");
|
|
33370
33360
|
|
|
33371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
33372
33362
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
33373
33363
|
var RULES = {
|
|
33374
33364
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -33383,7 +33373,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
33383
33373
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
33384
33374
|
}), "classifyChannel");
|
|
33385
33375
|
|
|
33386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
33387
33377
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
33388
33378
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
33389
33379
|
const store = await deps.store();
|
|
@@ -33469,7 +33459,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
33469
33459
|
};
|
|
33470
33460
|
}, "metadataService");
|
|
33471
33461
|
|
|
33472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
33473
33463
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
33474
33464
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
33475
33465
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -33506,7 +33496,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
33506
33496
|
return { chatId, rows, notes };
|
|
33507
33497
|
}, "moderateWith");
|
|
33508
33498
|
|
|
33509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
33510
33500
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
33511
33501
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
33512
33502
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -33584,7 +33574,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
33584
33574
|
}, "removePerson")
|
|
33585
33575
|
}), "moderatorOf");
|
|
33586
33576
|
|
|
33587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
33588
33578
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
33589
33579
|
id: note.id,
|
|
33590
33580
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -33628,7 +33618,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
33628
33618
|
};
|
|
33629
33619
|
}, "privatePeopleService");
|
|
33630
33620
|
|
|
33631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
33632
33622
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
33633
33623
|
total: 0,
|
|
33634
33624
|
population: 0,
|
|
@@ -33884,7 +33874,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33884
33874
|
}, "evidence")
|
|
33885
33875
|
}), "rankingsService");
|
|
33886
33876
|
|
|
33887
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
33888
33878
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
33889
33879
|
id: one.id,
|
|
33890
33880
|
name: one.name,
|
|
@@ -34013,7 +34003,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34013
34003
|
};
|
|
34014
34004
|
}, "searchesService");
|
|
34015
34005
|
|
|
34016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
34017
34007
|
var TAGGING_QUERY = {
|
|
34018
34008
|
entity: "tagging",
|
|
34019
34009
|
backend: "sql",
|
|
@@ -34097,7 +34087,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34097
34087
|
};
|
|
34098
34088
|
}, "tagsService");
|
|
34099
34089
|
|
|
34100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
34101
34091
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
34102
34092
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
34103
34093
|
if (title !== void 0 || set !== 1)
|
|
@@ -34282,7 +34272,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34282
34272
|
};
|
|
34283
34273
|
}, "topicsService");
|
|
34284
34274
|
|
|
34285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
34286
34276
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
34287
34277
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
34288
34278
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -34356,7 +34346,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
34356
34346
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
34357
34347
|
}, "prepareEvidencePacket");
|
|
34358
34348
|
|
|
34359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
34360
34350
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
34361
34351
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
34362
34352
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -34376,7 +34366,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
34376
34366
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
34377
34367
|
}, "readEvidencePacket");
|
|
34378
34368
|
|
|
34379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
34380
34370
|
var scopeKeys = [
|
|
34381
34371
|
"accountId",
|
|
34382
34372
|
"meetingId",
|
|
@@ -34398,7 +34388,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
34398
34388
|
"maxVocabularyReadBytes"
|
|
34399
34389
|
]);
|
|
34400
34390
|
|
|
34401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
34402
34392
|
var communicationFields = {
|
|
34403
34393
|
sources: pipe(array(strictObject({
|
|
34404
34394
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -34430,7 +34420,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
34430
34420
|
return { ...input, after, before: before2 };
|
|
34431
34421
|
}, "communicationRequest");
|
|
34432
34422
|
|
|
34433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34423
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
34434
34424
|
var MEETING_PREPARATION_LIMITS = {
|
|
34435
34425
|
meetings: { min: 1, max: 20, default: 5 },
|
|
34436
34426
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -34503,7 +34493,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
34503
34493
|
};
|
|
34504
34494
|
}, "validateMeetingPreparationRequest");
|
|
34505
34495
|
|
|
34506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
34507
34497
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
34508
34498
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
34509
34499
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -34551,7 +34541,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
34551
34541
|
}
|
|
34552
34542
|
}, "validatePreparationCommunications");
|
|
34553
34543
|
|
|
34554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
34555
34545
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
34556
34546
|
const installer = ports.installer();
|
|
34557
34547
|
const argv = updateCommand(installer, packageName);
|
|
@@ -34616,7 +34606,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
34616
34606
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
34617
34607
|
}, "dayAfter");
|
|
34618
34608
|
|
|
34619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
34620
34610
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
34621
34611
|
const pictures = picturesService(deps);
|
|
34622
34612
|
const base = {
|
|
@@ -34652,7 +34642,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
34652
34642
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
34653
34643
|
}, "servicesFor");
|
|
34654
34644
|
|
|
34655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
34656
34646
|
import { createHash as createHash12 } from "node:crypto";
|
|
34657
34647
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync2, rmSync } from "node:fs";
|
|
34658
34648
|
import { createConnection, createServer } from "node:net";
|
|
@@ -34873,7 +34863,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
34873
34863
|
}, () => finish({ error: stopped() }));
|
|
34874
34864
|
}), "relayCommand");
|
|
34875
34865
|
|
|
34876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34866
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.530.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_f01b7e2db7d22734373a522c868220f7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
34877
34867
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
34878
34868
|
close: /* @__PURE__ */ __name(async () => {
|
|
34879
34869
|
}, "close"),
|
|
@@ -35050,6 +35040,10 @@ export {
|
|
|
35050
35040
|
downloadMessage,
|
|
35051
35041
|
saveFiles,
|
|
35052
35042
|
searchNotesOf,
|
|
35043
|
+
SERVER_SEARCH_KEY,
|
|
35044
|
+
SERVER_BOUNDS,
|
|
35045
|
+
DEFAULT_BACKEND,
|
|
35046
|
+
sourceKey,
|
|
35053
35047
|
DELETE_AT_ONCE,
|
|
35054
35048
|
moderateWith,
|
|
35055
35049
|
CONTEXT_MESSAGES,
|