@wirecat/mail-cli 0.6.0 → 0.8.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 +62 -0
- package/README.md +8 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GBFTKUHA.js → all-profiles-MXGDUBAM.js} +9 -9
- package/dist/bundle/{anthropic-PTSCWUG6.js → anthropic-A2QA4W7L.js} +6 -6
- package/dist/bundle/{app-server-5VJ2WCKJ.js → app-server-PMIMK6FK.js} +48 -48
- package/dist/bundle/{bun-2KRUBPIN.js → bun-3UW3LFNL.js} +2 -2
- package/dist/bundle/{bun-sqlite-ELSRSJBM.js → bun-sqlite-TGFZFKAX.js} +5 -5
- package/dist/bundle/{chunk-H4VFIH5W.js → chunk-2KZJWBXB.js} +3 -3
- package/dist/bundle/{chunk-PKU6V4EQ.js → chunk-2MQXXPPK.js} +17 -17
- package/dist/bundle/{chunk-ZMMIIBTM.js → chunk-4QDBMYK4.js} +70 -53
- package/dist/bundle/{chunk-B337KHJ5.js → chunk-5PWKPRTD.js} +4 -4
- package/dist/bundle/{chunk-ZRYFEEXZ.js → chunk-5W74YMCK.js} +3 -3
- package/dist/bundle/{chunk-WGK4AIRL.js → chunk-6J3DKKOV.js} +12 -12
- package/dist/bundle/{chunk-YBJMBPL7.js → chunk-6JK46V5X.js} +6 -6
- package/dist/bundle/{chunk-NZB4WGQS.js → chunk-6U6Z3GXR.js} +6 -6
- package/dist/bundle/{chunk-XZGLY2LU.js → chunk-7JUTNCQX.js} +14 -14
- package/dist/bundle/{chunk-TKJDGAHT.js → chunk-AO3XYONW.js} +33 -27
- package/dist/bundle/{chunk-DA46WQEA.js → chunk-BCDPLG7T.js} +1 -1
- package/dist/bundle/{chunk-SAZJDKEI.js → chunk-BEUQ2X7U.js} +8 -8
- package/dist/bundle/{chunk-TPNC5VCJ.js → chunk-CMNFLAUG.js} +4 -4
- package/dist/bundle/{chunk-MD2J3POF.js → chunk-CRS63C3T.js} +8 -2
- package/dist/bundle/{chunk-SQLCCKEL.js → chunk-DLB2JPLU.js} +1 -1
- package/dist/bundle/{chunk-DV4RSEAH.js → chunk-DM4ULDS3.js} +6 -6
- package/dist/bundle/{chunk-P5B7IFOG.js → chunk-DYCPBLUC.js} +2 -2
- package/dist/bundle/{chunk-OHV5RDFE.js → chunk-EN3UZPGB.js} +4 -4
- package/dist/bundle/{chunk-RAZOSYEO.js → chunk-EU35YQXE.js} +23 -23
- package/dist/bundle/{chunk-4PKHZQIM.js → chunk-EVO77D3Y.js} +8 -8
- package/dist/bundle/{chunk-3KY7DA5A.js → chunk-FSBKLJXM.js} +449 -346
- package/dist/bundle/{chunk-JFJTDL22.js → chunk-J5RKMQ6A.js} +46 -46
- package/dist/bundle/{chunk-BVIHT7KR.js → chunk-J6ACLZKV.js} +9 -9
- package/dist/bundle/{chunk-AGX7NR3S.js → chunk-KBKEZV4L.js} +13 -13
- package/dist/bundle/{chunk-PBYDT3CG.js → chunk-KEZHPPMI.js} +18 -3
- package/dist/bundle/{chunk-JKLQHPED.js → chunk-KF4YULWC.js} +10 -10
- package/dist/bundle/{chunk-NOU6MWEM.js → chunk-L2ZHPIFC.js} +2 -2
- package/dist/bundle/{chunk-BM445GYF.js → chunk-L3KMVMRJ.js} +2 -2
- package/dist/bundle/{chunk-5KHJUYHQ.js → chunk-LN7TNZIS.js} +8 -8
- package/dist/bundle/{chunk-NXJLC2WK.js → chunk-NAIJNJZZ.js} +12 -8
- package/dist/bundle/{chunk-ZPGLWMNH.js → chunk-NEBO3NZU.js} +3 -3
- package/dist/bundle/{chunk-O7VK7CJX.js → chunk-NI6WX55Z.js} +2 -2
- package/dist/bundle/{chunk-Y7JKWQC2.js → chunk-NSODLSEL.js} +114 -95
- package/dist/bundle/{chunk-ES4PWHBJ.js → chunk-NWKLBZN5.js} +30 -30
- package/dist/bundle/{chunk-O555ZEQR.js → chunk-OAQ4UB6V.js} +4 -4
- package/dist/bundle/{chunk-FUB3X25H.js → chunk-PEF637VV.js} +4 -4
- package/dist/bundle/{chunk-PHPC72DP.js → chunk-PXCIM6D5.js} +7 -7
- package/dist/bundle/{chunk-56PI2BRH.js → chunk-Q5DOXSBM.js} +1 -1
- package/dist/bundle/{chunk-RDSAI6DC.js → chunk-QBBKSCQD.js} +386 -257
- package/dist/bundle/{chunk-XERTHQ6D.js → chunk-RFWTPSJX.js} +34 -28
- package/dist/bundle/{chunk-QZBT6BOU.js → chunk-ROZBXOES.js} +1 -1
- package/dist/bundle/{chunk-FIQOBLHS.js → chunk-RVZ4JIRR.js} +1 -1
- package/dist/bundle/{chunk-VEAP5RVI.js → chunk-SZ5PKNDF.js} +7 -7
- package/dist/bundle/{chunk-J5MYH4L5.js → chunk-TCWJYOZV.js} +6 -6
- package/dist/bundle/{chunk-M7V3GSJQ.js → chunk-TMQA4KR7.js} +1 -1
- package/dist/bundle/{chunk-NCWO2FNC.js → chunk-U4IF2MOB.js} +2 -2
- package/dist/bundle/{chunk-JKA2AICL.js → chunk-UR6WHUJF.js} +2 -2
- package/dist/bundle/{chunk-KUQYWIVR.js → chunk-VGR3AGAC.js} +6 -6
- package/dist/bundle/{chunk-6MV2TBDB.js → chunk-VSDVH2M2.js} +71 -59
- package/dist/bundle/{chunk-5AQKM47C.js → chunk-W5J6I5GW.js} +3 -3
- package/dist/bundle/{chunk-LWTG5UOF.js → chunk-W7H3PZ67.js} +2 -2
- package/dist/bundle/{chunk-K5JUROGN.js → chunk-WS4L47DG.js} +1 -1
- package/dist/bundle/{chunk-WCL3WBH5.js → chunk-WWNAQ75T.js} +3 -3
- package/dist/bundle/{chunk-JIQAFFPV.js → chunk-XWNCXFR5.js} +2 -2
- package/dist/bundle/{chunk-VF24ZAPX.js → chunk-YS2WUWY7.js} +4 -4
- package/dist/bundle/{chunk-UAXBLHZK.js → chunk-Z5GDZ3QF.js} +2 -2
- package/dist/bundle/{chunk-JLRMSNPX.js → chunk-ZISFMUYB.js} +20 -18
- package/dist/bundle/{chunk-J4C32YKH.js → chunk-ZKAT6I2I.js} +1 -1
- package/dist/bundle/command-contract-Q32SL5KX.js +34 -0
- package/dist/bundle/{decode-HVXDCQ63.js → decode-NF4TGOR3.js} +5 -5
- package/dist/bundle/{dispatch-GDAH4JHS.js → dispatch-5C6XNGEE.js} +8 -8
- package/dist/bundle/{dist-43DZXMBL.js → dist-DVYY3YFG.js} +13 -13
- package/dist/bundle/{echarts-LZ74IXHG.js → echarts-F3USGP5B.js} +2 -2
- package/dist/bundle/{embed-OQF5U2C6.js → embed-2RXV3BEC.js} +6 -6
- package/dist/bundle/{embedder-OCWQAWKO.js → embedder-I2SJMC6N.js} +9 -9
- package/dist/bundle/{failure-6COJAO7T.js → failure-YRGRZBTX.js} +2 -2
- package/dist/bundle/{first-run-MTZPUPGA.js → first-run-3GA7YCKZ.js} +11 -11
- package/dist/bundle/first-screen-JFIXKYAK.js +32 -0
- package/dist/bundle/{instructions-M6F4FP7U.js → instructions-VHI5CWH5.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-GAPDLFWA.js → mcp-B25MZCS7.js} +2 -2
- package/dist/bundle/{node-NYBBFHGN.js → node-4RBB3RDY.js} +2 -2
- package/dist/bundle/{node-sqlite-CWCNWO75.js → node-sqlite-FWYX3P2D.js} +5 -5
- package/dist/bundle/{oauth-DVX45EME.js → oauth-6JKKRGLX.js} +7 -7
- package/dist/bundle/{open-M7EQWWHL.js → open-7JSNC3MR.js} +4 -4
- package/dist/bundle/{openai-63KRU5H2.js → openai-ASLWL3D6.js} +14 -14
- package/dist/bundle/{process-DV5GQIGM.js → process-AB2D2G2Q.js} +1 -1
- package/dist/bundle/{program-EPR3QCMX.js → program-ZJPQ3IDU.js} +2539 -1024
- package/dist/bundle/{prompt-EPWPWTB3.js → prompt-JDFVQR3L.js} +5 -5
- package/dist/bundle/{recognize-R46KDXK4.js → recognize-PKYA4HRC.js} +4 -4
- package/dist/bundle/{remote-RENCYB5X.js → remote-USBVVO4O.js} +7 -7
- package/dist/bundle/{rerank-VHPC5O73.js → rerank-UBMV6KO6.js} +7 -7
- package/dist/bundle/{serve-KCH3ORYO.js → serve-SVS3YOYS.js} +9 -9
- package/dist/bundle/{server-HZVXSK7B.js → server-7PZMYXY6.js} +38 -38
- package/dist/bundle/server-KA7Q5XCL.js +63 -0
- package/dist/bundle/{sqlite-runtime-XP7ZJCKJ.js → sqlite-runtime-IDPTXAM7.js} +5 -5
- package/dist/bundle/{state-GQ4MEQJ5.js → state-6G2TSVP7.js} +6 -6
- package/dist/bundle/{store-WT7YTR3Y.js → store-7A464D4X.js} +15 -15
- package/dist/bundle/{store-CQNLNINW.js → store-L56GFI4P.js} +13 -13
- package/dist/bundle/store-maintenance-command-2LM4GOI3.js +52 -0
- package/dist/commands/attachments.js +2 -2
- package/dist/commands/attachments.js.map +1 -1
- package/dist/commands/context.d.ts +21 -6
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +47 -6
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/drafts.d.ts.map +1 -1
- package/dist/commands/drafts.js +20 -16
- package/dist/commands/drafts.js.map +1 -1
- package/dist/commands/export.d.ts.map +1 -1
- package/dist/commands/export.js +10 -7
- package/dist/commands/export.js.map +1 -1
- package/dist/commands/messages.d.ts.map +1 -1
- package/dist/commands/messages.js +13 -9
- package/dist/commands/messages.js.map +1 -1
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +3 -1
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +5 -5
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/server-search.d.ts.map +1 -1
- package/dist/commands/server-search.js +3 -2
- package/dist/commands/server-search.js.map +1 -1
- package/dist/commands/session-start.d.ts.map +1 -1
- package/dist/commands/session-start.js +107 -10
- package/dist/commands/session-start.js.map +1 -1
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +72 -9
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/stats.d.ts.map +1 -1
- package/dist/commands/stats.js +2 -3
- package/dist/commands/stats.js.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +0 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +8 -15
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +6 -1
- package/dist/config.js.map +1 -1
- package/dist/mail/backend.d.ts +23 -1
- package/dist/mail/backend.d.ts.map +1 -1
- package/dist/mail/backend.js +4 -1
- package/dist/mail/backend.js.map +1 -1
- package/dist/mail/compose.d.ts.map +1 -1
- package/dist/mail/compose.js +13 -25
- package/dist/mail/compose.js.map +1 -1
- package/dist/mail/doctor.d.ts +42 -0
- package/dist/mail/doctor.d.ts.map +1 -1
- package/dist/mail/doctor.js +76 -0
- package/dist/mail/doctor.js.map +1 -1
- package/dist/mail/drafts.d.ts.map +1 -1
- package/dist/mail/drafts.js +4 -4
- package/dist/mail/drafts.js.map +1 -1
- package/dist/mail/imap/connection.d.ts +6 -3
- package/dist/mail/imap/connection.d.ts.map +1 -1
- package/dist/mail/imap/connection.js +63 -16
- package/dist/mail/imap/connection.js.map +1 -1
- package/dist/mail/imap/index.d.ts +2 -2
- package/dist/mail/imap/index.d.ts.map +1 -1
- package/dist/mail/imap/index.js +3 -3
- package/dist/mail/imap/index.js.map +1 -1
- package/dist/mail/imap/search.d.ts.map +1 -1
- package/dist/mail/imap/search.js +10 -4
- package/dist/mail/imap/search.js.map +1 -1
- package/dist/mail/save.d.ts +2 -5
- package/dist/mail/save.d.ts.map +1 -1
- package/dist/mail/save.js +6 -27
- package/dist/mail/save.js.map +1 -1
- package/dist/mail/send.d.ts.map +1 -1
- package/dist/mail/send.js +1 -0
- package/dist/mail/send.js.map +1 -1
- package/dist/mail/smtp.d.ts +3 -3
- package/dist/mail/smtp.d.ts.map +1 -1
- package/dist/mail/smtp.js +72 -36
- package/dist/mail/smtp.js.map +1 -1
- package/dist/oauth.d.ts +74 -0
- package/dist/oauth.d.ts.map +1 -0
- package/dist/oauth.js +230 -0
- package/dist/oauth.js.map +1 -0
- package/dist/program.js +2 -2
- package/dist/program.js.map +1 -1
- package/dist/providers.d.ts +33 -3
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +34 -8
- package/dist/providers.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +6 -0
- package/dist/reasons.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -5
- package/dist/bundle/command-contract-NZF4B5OR.js +0 -34
- package/dist/bundle/first-screen-4PBS6QK5.js +0 -32
- package/dist/bundle/server-FMCPE2ZK.js +0 -63
- package/dist/bundle/store-maintenance-command-YYR42IT4.js +0 -52
- /package/dist/bundle/{chunk-WJWLHLQ7.js → chunk-EKRM2QJB.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-KBKEZV4L.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_ACTIONS,
|
|
14
14
|
ModerationRules,
|
|
@@ -24,10 +24,10 @@ import {
|
|
|
24
24
|
someUndone,
|
|
25
25
|
validateFormattedText,
|
|
26
26
|
visibleFormattedText
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-LN7TNZIS.js";
|
|
28
28
|
import {
|
|
29
29
|
MAX_MODEL_IMAGE_BYTES
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-UR6WHUJF.js";
|
|
31
31
|
import {
|
|
32
32
|
Command,
|
|
33
33
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -66,17 +66,17 @@ import {
|
|
|
66
66
|
typedCommand,
|
|
67
67
|
vectorModelKey,
|
|
68
68
|
withAttempt
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-VSDVH2M2.js";
|
|
70
70
|
import {
|
|
71
71
|
isCliFailure
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-J6ACLZKV.js";
|
|
73
73
|
import {
|
|
74
74
|
isNewer,
|
|
75
75
|
updateCommand
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-5PWKPRTD.js";
|
|
77
77
|
import {
|
|
78
78
|
remoteKey
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-5W74YMCK.js";
|
|
80
80
|
import {
|
|
81
81
|
AGENDA_COLUMNS,
|
|
82
82
|
CHAT_COLUMNS,
|
|
@@ -116,6 +116,7 @@ import {
|
|
|
116
116
|
hasStems,
|
|
117
117
|
hasText,
|
|
118
118
|
historyStartKey,
|
|
119
|
+
hitFiles,
|
|
119
120
|
inSource,
|
|
120
121
|
inboxKey,
|
|
121
122
|
isAccountList,
|
|
@@ -131,7 +132,7 @@ import {
|
|
|
131
132
|
threadConversation,
|
|
132
133
|
validateAst,
|
|
133
134
|
validateFields
|
|
134
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-QBBKSCQD.js";
|
|
135
136
|
import {
|
|
136
137
|
COUNTER_FIELDS,
|
|
137
138
|
INTERNAL_NOTES,
|
|
@@ -150,13 +151,13 @@ import {
|
|
|
150
151
|
parseReference,
|
|
151
152
|
providerNamed,
|
|
152
153
|
rankingOptions
|
|
153
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-VGR3AGAC.js";
|
|
154
155
|
import {
|
|
155
156
|
TASK_KINDS,
|
|
156
157
|
TASK_STATES,
|
|
157
158
|
createTaskService,
|
|
158
159
|
isClosedState
|
|
159
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-SZ5PKNDF.js";
|
|
160
161
|
import {
|
|
161
162
|
EVENT_QUERY,
|
|
162
163
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -197,17 +198,17 @@ import {
|
|
|
197
198
|
validateQuery,
|
|
198
199
|
walkQuery,
|
|
199
200
|
zonedMoment
|
|
200
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-4QDBMYK4.js";
|
|
201
202
|
import {
|
|
202
203
|
DEFAULT_STEMMERS,
|
|
203
204
|
createStemmer,
|
|
204
205
|
fold,
|
|
205
206
|
normalize
|
|
206
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-EVO77D3Y.js";
|
|
207
208
|
import {
|
|
208
209
|
DEFAULT_TASK_CATEGORIES,
|
|
209
210
|
FALLBACK_CATEGORY
|
|
210
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-6JK46V5X.js";
|
|
211
212
|
import {
|
|
212
213
|
Unzip,
|
|
213
214
|
UnzipInflate,
|
|
@@ -218,18 +219,18 @@ import {
|
|
|
218
219
|
placedText,
|
|
219
220
|
runEmbedders,
|
|
220
221
|
textModelsDirectory
|
|
221
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-6U6Z3GXR.js";
|
|
222
223
|
import {
|
|
223
224
|
installFiles,
|
|
224
225
|
megabytes
|
|
225
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-EN3UZPGB.js";
|
|
226
227
|
import {
|
|
227
228
|
storePath,
|
|
228
229
|
wirecatDirectory
|
|
229
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-XWNCXFR5.js";
|
|
230
231
|
import {
|
|
231
232
|
resolvePaths
|
|
232
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-ZISFMUYB.js";
|
|
233
234
|
import {
|
|
234
235
|
array,
|
|
235
236
|
boolean,
|
|
@@ -246,7 +247,7 @@ import {
|
|
|
246
247
|
safeParse,
|
|
247
248
|
strictObject,
|
|
248
249
|
string
|
|
249
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-NAIJNJZZ.js";
|
|
250
251
|
import {
|
|
251
252
|
importFrom,
|
|
252
253
|
resolveFrom
|
|
@@ -255,7 +256,7 @@ import {
|
|
|
255
256
|
CliError,
|
|
256
257
|
isCliError,
|
|
257
258
|
singleLine
|
|
258
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-L3KMVMRJ.js";
|
|
259
260
|
import {
|
|
260
261
|
__commonJS,
|
|
261
262
|
__name,
|
|
@@ -16871,10 +16872,10 @@ var require_lib3 = __commonJS({
|
|
|
16871
16872
|
}
|
|
16872
16873
|
});
|
|
16873
16874
|
|
|
16874
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16875
16876
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16876
16877
|
|
|
16877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16878
16879
|
var RULES_VERSION = 5;
|
|
16879
16880
|
var LOOK_BACK = 50;
|
|
16880
16881
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16964,7 +16965,7 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16964
16965
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16965
16966
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16966
16967
|
|
|
16967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
16968
16969
|
var COMMAND_NEEDS = {
|
|
16969
16970
|
"account update": ["updateProfile", "change the profile"],
|
|
16970
16971
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17014,7 +17015,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17014
17015
|
return group;
|
|
17015
17016
|
}, "hideNever");
|
|
17016
17017
|
|
|
17017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17018
17019
|
var AUDIT_PAGE = 200;
|
|
17019
17020
|
var AUDIT_BUDGET = 10;
|
|
17020
17021
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17094,7 +17095,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17094
17095
|
return found;
|
|
17095
17096
|
}, "burstJoins");
|
|
17096
17097
|
|
|
17097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17098
17099
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17099
17100
|
command.allowUnknownOption();
|
|
17100
17101
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17114,7 +17115,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17114
17115
|
return command;
|
|
17115
17116
|
}, "queryWordsAfterOptions");
|
|
17116
17117
|
|
|
17117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17118
17119
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17119
17120
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17120
17121
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17156,7 +17157,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17156
17157
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17157
17158
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17158
17159
|
|
|
17159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17160
17161
|
var integer = /* @__PURE__ */ __name((value) => {
|
|
17161
17162
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17162
17163
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17179,7 +17180,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17179
17180
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17180
17181
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17181
17182
|
|
|
17182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17183
17184
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17184
17185
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17185
17186
|
const zone = timezoneOf();
|
|
@@ -17265,7 +17266,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17265
17266
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17266
17267
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17267
17268
|
|
|
17268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17269
17270
|
var integer3 = /* @__PURE__ */ __name((text2) => {
|
|
17270
17271
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17271
17272
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17385,13 +17386,14 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17385
17386
|
}, "addMeetingCommandsDefinition");
|
|
17386
17387
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17387
17388
|
|
|
17388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17389
17390
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17391
|
+
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17390
17392
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
17391
17393
|
const query = defineQuery(registry);
|
|
17392
17394
|
annotate(command, { query, output: { entity: registry.entity } });
|
|
17393
17395
|
const shown = askable(query);
|
|
17394
|
-
queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ?
|
|
17396
|
+
queryWordsAfterOptions(command).argument("[query...]", shown.length > 0 ? QUERY_ARGUMENT : "field:value terms; this list filters by none yet");
|
|
17395
17397
|
if (shown.length > 0)
|
|
17396
17398
|
command.addHelpText("after", `
|
|
17397
17399
|
${fieldsHelp({ ...query, fields: shown }, LIST_QUERY_GUIDE)}`);
|
|
@@ -17402,9 +17404,19 @@ var unfilteredQuery = /* @__PURE__ */ __name((entity, schema2) => ({
|
|
|
17402
17404
|
backend: "native",
|
|
17403
17405
|
fields: queryFieldsOf(schema2, {})
|
|
17404
17406
|
}), "unfilteredQuery");
|
|
17407
|
+
var withTomorrow = /* @__PURE__ */ __name((query, registry, zone = timezoneOf(), now = Date.now()) => {
|
|
17408
|
+
const times = new Set(registry.fields.filter(({ type }) => type === "time").map(({ name }) => name));
|
|
17409
|
+
const date2 = /* @__PURE__ */ new Date(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now)}T00:00:00Z`);
|
|
17410
|
+
date2.setUTCDate(date2.getUTCDate() + 1);
|
|
17411
|
+
const tomorrow = date2.toISOString().slice(0, 10);
|
|
17412
|
+
const day = /* @__PURE__ */ __name((value) => value.toLowerCase() === "tomorrow" ? tomorrow : value, "day");
|
|
17413
|
+
const map = /* @__PURE__ */ __name((node) => node.kind === "predicate" ? times.has(node.field) ? { ...node, value: day(node.value), ...node.upper === void 0 ? {} : { upper: day(node.upper) } } : node : { ...node, clauses: node.clauses.map((clause) => ({ ...clause, node: map(clause.node) })) }, "map");
|
|
17414
|
+
return { ...query, root: map(query.root) };
|
|
17415
|
+
}, "withTomorrow");
|
|
17405
17416
|
var listQuery = /* @__PURE__ */ __name((text2, registry, command, { defaultField = "none" } = {}) => {
|
|
17406
17417
|
const context2 = { command, guide: LIST_QUERY_GUIDE };
|
|
17407
|
-
const
|
|
17418
|
+
const parsed = text2.trim() === "" ? void 0 : parseLucene(text2, { defaultField, ...context2 });
|
|
17419
|
+
const typed = parsed && withTomorrow(parsed, registry);
|
|
17408
17420
|
if (typed)
|
|
17409
17421
|
validateQuery(typed, registry, context2);
|
|
17410
17422
|
const named2 = typed ? fieldsNamed(typed) : /* @__PURE__ */ new Set();
|
|
@@ -17436,7 +17448,7 @@ var pagedList = /* @__PURE__ */ __name((command, { limit, page, all }, { items,
|
|
|
17436
17448
|
}), "pagedList");
|
|
17437
17449
|
var askable = /* @__PURE__ */ __name((registry) => registry.backend === "native" ? registry.fields.filter((field) => field.native) : registry.fields, "askable");
|
|
17438
17450
|
var nativeTerms = /* @__PURE__ */ __name((ast, command) => new Map([...nativeTermLists(ast, command)].map(([field, [node]]) => [field, node])), "nativeTerms");
|
|
17439
|
-
var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) => {
|
|
17451
|
+
var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = [], negatable = []) => {
|
|
17440
17452
|
const terms = /* @__PURE__ */ new Map();
|
|
17441
17453
|
if (!ast)
|
|
17442
17454
|
return terms;
|
|
@@ -17444,8 +17456,14 @@ var nativeTermLists = /* @__PURE__ */ __name((ast, command, repeatable = []) =>
|
|
|
17444
17456
|
const add = /* @__PURE__ */ __name((node) => {
|
|
17445
17457
|
if (node.kind === "boolean") {
|
|
17446
17458
|
for (const clause of node.clauses) {
|
|
17459
|
+
const excluded = clause.occur === "must_not" && clause.node.kind === "predicate" && negatable.includes(clause.node.field);
|
|
17460
|
+
if (excluded && clause.node.kind === "predicate") {
|
|
17461
|
+
const key = `-${clause.node.field}`;
|
|
17462
|
+
terms.set(key, [...terms.get(key) ?? [], clause.node]);
|
|
17463
|
+
continue;
|
|
17464
|
+
}
|
|
17447
17465
|
if (clause.occur !== "must")
|
|
17448
|
-
queryError("query.unsupported-placement", clause.node.span, "this list takes only field:value terms joined by AND", context2);
|
|
17466
|
+
queryError("query.unsupported-placement", clause.node.span, negatable.length ? `this list takes only field:value terms joined by AND, and -field:value for ${negatable.join(", ")}` : "this list takes only field:value terms joined by AND", context2);
|
|
17449
17467
|
add(clause.node);
|
|
17450
17468
|
}
|
|
17451
17469
|
return;
|
|
@@ -17501,7 +17519,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17501
17519
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17502
17520
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17503
17521
|
|
|
17504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17505
17523
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17506
17524
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17507
17525
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17510,7 +17528,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17510
17528
|
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");
|
|
17511
17529
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17512
17530
|
|
|
17513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17514
17532
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17515
17533
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17516
17534
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17772,7 +17790,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17772
17790
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17773
17791
|
}), "sessionAnswer");
|
|
17774
17792
|
|
|
17775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17776
17794
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17777
17795
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17778
17796
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17807,7 +17825,7 @@ var storeIfOpen = /* @__PURE__ */ __name(async (deps) => {
|
|
|
17807
17825
|
var fromStore = /* @__PURE__ */ __name((deps) => deps.offline || deps.reads === "store", "fromStore");
|
|
17808
17826
|
var nothingStored = /* @__PURE__ */ __name((messenger) => `nothing stored for this chat yet \u2014 keep \`${typedCommand(messenger.app.command, "serve")}\` running`, "nothingStored");
|
|
17809
17827
|
var PUSHED = "this messenger's history is read from the local store";
|
|
17810
|
-
var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context`, `contacts list|show` and `review`";
|
|
17828
|
+
var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context|download`, `contacts list|show` and `review`";
|
|
17811
17829
|
var onlineDeps = /* @__PURE__ */ __name((messenger, adapter, guard, where = {}) => ({
|
|
17812
17830
|
messenger,
|
|
17813
17831
|
...where,
|
|
@@ -17837,7 +17855,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17837
17855
|
}), "storedDeps");
|
|
17838
17856
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17839
17857
|
|
|
17840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17841
17859
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17842
17860
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17843
17861
|
if (key in own)
|
|
@@ -17854,12 +17872,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17854
17872
|
return found.bind(adapter);
|
|
17855
17873
|
}, "capability");
|
|
17856
17874
|
|
|
17857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17858
17876
|
import { randomBytes } from "node:crypto";
|
|
17859
17877
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17860
17878
|
var newOperationId = newSendId;
|
|
17861
17879
|
|
|
17862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
17863
17881
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
17864
17882
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
17865
17883
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -17899,7 +17917,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
17899
17917
|
};
|
|
17900
17918
|
}, "dateWindow");
|
|
17901
17919
|
|
|
17902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17903
17921
|
var LINKS = /https?:\/\/\S+/g;
|
|
17904
17922
|
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");
|
|
17905
17923
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -17926,7 +17944,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
17926
17944
|
});
|
|
17927
17945
|
}, "questions");
|
|
17928
17946
|
|
|
17929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
17930
17948
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17931
17949
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17932
17950
|
const name = typed.trim().toLowerCase();
|
|
@@ -17976,7 +17994,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
17976
17994
|
return best.name;
|
|
17977
17995
|
}, "categorize");
|
|
17978
17996
|
|
|
17979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
17980
17998
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
17981
17999
|
var RULES_IN = {
|
|
17982
18000
|
dialog: "all",
|
|
@@ -18182,7 +18200,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18182
18200
|
return passes;
|
|
18183
18201
|
}, "applyTaskRulesToChats");
|
|
18184
18202
|
|
|
18185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
18186
18204
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
18187
18205
|
import { open, stat } from "node:fs/promises";
|
|
18188
18206
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -18384,7 +18402,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
18384
18402
|
return { name, source };
|
|
18385
18403
|
}, "readStickerFile");
|
|
18386
18404
|
|
|
18387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18405
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
18388
18406
|
var DAY_MS = 864e5;
|
|
18389
18407
|
var NEW_DAYS = 30;
|
|
18390
18408
|
var SAME_TEXT_MIN = 20;
|
|
@@ -18461,7 +18479,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
18461
18479
|
};
|
|
18462
18480
|
}, "scorePerson");
|
|
18463
18481
|
|
|
18464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
18465
18483
|
var REGISTRIES = {
|
|
18466
18484
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
18467
18485
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -18546,7 +18564,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
18546
18564
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
18547
18565
|
})), "notCovered");
|
|
18548
18566
|
|
|
18549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18567
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
18550
18568
|
var ACTIVITY_MESSAGES = 1e3;
|
|
18551
18569
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
18552
18570
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18634,7 +18652,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
18634
18652
|
};
|
|
18635
18653
|
}, "botCheckService");
|
|
18636
18654
|
|
|
18637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
18638
18656
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
18639
18657
|
if (value === void 0)
|
|
18640
18658
|
return void 0;
|
|
@@ -18644,7 +18662,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
18644
18662
|
return id2;
|
|
18645
18663
|
}, "threadIdOf");
|
|
18646
18664
|
|
|
18647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
18648
18666
|
var TOP_POSTS = 5;
|
|
18649
18667
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
18650
18668
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -18761,7 +18779,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
18761
18779
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
18762
18780
|
}, "median");
|
|
18763
18781
|
|
|
18764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18782
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
18765
18783
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
18766
18784
|
const events = [];
|
|
18767
18785
|
for (const stay of stays) {
|
|
@@ -18793,7 +18811,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
18793
18811
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
18794
18812
|
}, "memberEvents");
|
|
18795
18813
|
|
|
18796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18797
18815
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18798
18816
|
if (deps.reads !== "store")
|
|
18799
18817
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18940,7 +18958,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18940
18958
|
}
|
|
18941
18959
|
}, "senderAmong");
|
|
18942
18960
|
|
|
18943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
18944
18962
|
var EVENTS_DAYS = 7;
|
|
18945
18963
|
var TRACKED_DAYS = 30;
|
|
18946
18964
|
var STATS_PAGE = 1e3;
|
|
@@ -19235,7 +19253,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
19235
19253
|
return members.length === 0 ? null : members;
|
|
19236
19254
|
}, "storedMembers");
|
|
19237
19255
|
|
|
19238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
19239
19257
|
var INBOX_CHATS = 20;
|
|
19240
19258
|
var REVIEW_DAYS = 3;
|
|
19241
19259
|
var UNANSWERED_HOURS = 24;
|
|
@@ -19443,7 +19461,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
19443
19461
|
};
|
|
19444
19462
|
}, "inboxService");
|
|
19445
19463
|
|
|
19446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
19447
19465
|
var CONTEXT_MESSAGES = 10;
|
|
19448
19466
|
var CONTEXT_BYTES = 64 * 1024;
|
|
19449
19467
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -19520,11 +19538,17 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
19520
19538
|
return { items, cut: true };
|
|
19521
19539
|
}, "eventsOnce");
|
|
19522
19540
|
var readsOf = /* @__PURE__ */ __name((record2, asked) => record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).filter((account) => identity.accounts.includes(account)).map((account) => ({ key: { provider: identity.provider, account }, identity }))), "readsOf");
|
|
19523
|
-
var personContext = /* @__PURE__ */ __name(async (store, asked, reference,
|
|
19541
|
+
var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
|
|
19524
19542
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
19525
19543
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
19526
19544
|
if (!record2)
|
|
19527
19545
|
throw new CliError("not_found", `no person ${found.id} in the store`);
|
|
19546
|
+
return {
|
|
19547
|
+
person: { ...record2, provider: asked.provider, id: found.id },
|
|
19548
|
+
...await recordContext(store, record2, readsOf(record2, asked), options)
|
|
19549
|
+
};
|
|
19550
|
+
}, "personContext");
|
|
19551
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messages = CONTEXT_MESSAGES, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
19528
19552
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
19529
19553
|
const shared = [];
|
|
19530
19554
|
const notRead = [];
|
|
@@ -19533,7 +19557,7 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
|
|
|
19533
19557
|
const theirs = [];
|
|
19534
19558
|
const mentions = [];
|
|
19535
19559
|
let cut = false;
|
|
19536
|
-
for (const { key, identity } of
|
|
19560
|
+
for (const { key, identity } of reads) {
|
|
19537
19561
|
const chats = await store.chats.chatsWith(key, identity.id);
|
|
19538
19562
|
for (const chat of chats) {
|
|
19539
19563
|
shared.push({ ...key, chatId: chat.id, title: chat.title, kind: chat.kind, lastMessageAt: chat.lastMessageAt });
|
|
@@ -19601,7 +19625,6 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
|
|
|
19601
19625
|
cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
|
|
19602
19626
|
const kept = withinBytes(lists, bytes2);
|
|
19603
19627
|
return {
|
|
19604
|
-
person: { ...record2, provider: asked.provider, id: found.id },
|
|
19605
19628
|
shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
|
|
19606
19629
|
last: {
|
|
19607
19630
|
fromThem: each.find((message) => !message.outgoing) ?? null,
|
|
@@ -19619,7 +19642,7 @@ var personContext = /* @__PURE__ */ __name(async (store, asked, reference, { mes
|
|
|
19619
19642
|
complete: notRead.length === 0,
|
|
19620
19643
|
notRead
|
|
19621
19644
|
};
|
|
19622
|
-
}, "
|
|
19645
|
+
}, "recordContext");
|
|
19623
19646
|
var withinBytes = /* @__PURE__ */ __name((lists, bytes2) => {
|
|
19624
19647
|
let used = 0;
|
|
19625
19648
|
let cut = false;
|
|
@@ -19699,10 +19722,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
19699
19722
|
};
|
|
19700
19723
|
}, "personMessages");
|
|
19701
19724
|
|
|
19702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19703
19726
|
import { createHash } from "node:crypto";
|
|
19704
19727
|
|
|
19705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
19706
19729
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
19707
19730
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
19708
19731
|
const parsed = parseMeetingReference(reference);
|
|
@@ -19720,7 +19743,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
19720
19743
|
return { parsed, meeting };
|
|
19721
19744
|
}, "authorizedMeetingMetadata");
|
|
19722
19745
|
|
|
19723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19724
19747
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
19725
19748
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
19726
19749
|
if (signal?.aborted)
|
|
@@ -19919,7 +19942,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
19919
19942
|
return { ...packet, fingerprint: hash(packet) };
|
|
19920
19943
|
}, "readMeetingEvidence");
|
|
19921
19944
|
|
|
19922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
19923
19946
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
19924
19947
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
19925
19948
|
const requestedAccounts = options.accountIds;
|
|
@@ -20018,7 +20041,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
20018
20041
|
};
|
|
20019
20042
|
}, "personMeetingContext");
|
|
20020
20043
|
|
|
20021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20044
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
20022
20045
|
var PREPARE_BYTES = 96 * 1024;
|
|
20023
20046
|
var MEETINGS = 5;
|
|
20024
20047
|
var CUES = 3;
|
|
@@ -20135,7 +20158,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
20135
20158
|
}
|
|
20136
20159
|
}, "meetingsOf");
|
|
20137
20160
|
|
|
20138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20161
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
20139
20162
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
20140
20163
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
20141
20164
|
const held = await storeIfOpen(deps);
|
|
@@ -20205,7 +20228,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
20205
20228
|
complete: false
|
|
20206
20229
|
})), "quiet");
|
|
20207
20230
|
|
|
20208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
20209
20232
|
var TIMELINE_ITEMS = 50;
|
|
20210
20233
|
var TIMELINE_MAX = 500;
|
|
20211
20234
|
var SCOPES = ["personal", "work"];
|
|
@@ -20260,7 +20283,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
20260
20283
|
};
|
|
20261
20284
|
}, "personTimeline");
|
|
20262
20285
|
|
|
20263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
20264
20287
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
20265
20288
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
20266
20289
|
const held = await storeIfOpen(deps);
|
|
@@ -20487,7 +20510,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
20487
20510
|
return rest;
|
|
20488
20511
|
}, "withoutPhone");
|
|
20489
20512
|
|
|
20490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
20491
20514
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
20492
20515
|
const tags = /* @__PURE__ */ new Map();
|
|
20493
20516
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -20496,7 +20519,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
20496
20519
|
return tags;
|
|
20497
20520
|
}, "taskTagFilters");
|
|
20498
20521
|
|
|
20499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
20500
20523
|
var TASK_QUERY = {
|
|
20501
20524
|
entity: "task",
|
|
20502
20525
|
backend: "sql",
|
|
@@ -20681,7 +20704,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
20681
20704
|
...previews ? { previews: await Promise.all(shown.map(({ task: task2 }) => taskView(store, account, task2))) } : {}
|
|
20682
20705
|
};
|
|
20683
20706
|
}), "list"),
|
|
20684
|
-
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}) => inStore(async (store, account) => {
|
|
20707
|
+
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}, author = void 0) => inStore(async (store, account) => {
|
|
20685
20708
|
const chosen = named2 === void 0 ? void 0 : await categoryOf(store, named2);
|
|
20686
20709
|
const source = message.trim();
|
|
20687
20710
|
const native = isNoteReference(source);
|
|
@@ -20716,7 +20739,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
20716
20739
|
...plan.dueAt ? { due: plan.dueAt } : {}
|
|
20717
20740
|
};
|
|
20718
20741
|
const subject = { account: taskAccount(account), draft };
|
|
20719
|
-
const by = origin === "owner" ? "owner" : { bot: origin };
|
|
20742
|
+
const by = author ?? (origin === "owner" ? "owner" : { bot: origin });
|
|
20720
20743
|
if (choice.attach !== void 0) {
|
|
20721
20744
|
const target2 = await owned(store, account, choice.attach);
|
|
20722
20745
|
const similarity = await store.tasks.compare(subject, target2.id);
|
|
@@ -20976,7 +20999,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
20976
20999
|
};
|
|
20977
21000
|
}, "taskView");
|
|
20978
21001
|
|
|
20979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
20980
21003
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
20981
21004
|
const ids = [...new Set(chatIds)];
|
|
20982
21005
|
if (ids.length === 0)
|
|
@@ -21002,7 +21025,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
21002
21025
|
}));
|
|
21003
21026
|
}, "chatCoverage");
|
|
21004
21027
|
|
|
21005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
21006
21029
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
21007
21030
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
21008
21031
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -21066,7 +21089,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
21066
21089
|
}
|
|
21067
21090
|
}, "validateContextEvidencePage");
|
|
21068
21091
|
|
|
21069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
21070
21093
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
21071
21094
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
21072
21095
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -21119,7 +21142,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
21119
21142
|
};
|
|
21120
21143
|
}, "contextReadBudget");
|
|
21121
21144
|
|
|
21122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
21123
21146
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
21124
21147
|
if (!port || typeof port.read !== "function")
|
|
21125
21148
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -21163,7 +21186,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
21163
21186
|
};
|
|
21164
21187
|
}, "createContextEvidenceReader");
|
|
21165
21188
|
|
|
21166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
21167
21190
|
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");
|
|
21168
21191
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
21169
21192
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -21179,18 +21202,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
21179
21202
|
}, "excerpt");
|
|
21180
21203
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
21181
21204
|
|
|
21182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21183
21206
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
21184
21207
|
|
|
21185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21186
21209
|
import { lstat } from "node:fs/promises";
|
|
21187
21210
|
|
|
21188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21189
21212
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
21190
21213
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
21191
21214
|
import { join as join2 } from "node:path";
|
|
21192
21215
|
|
|
21193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21216
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
21194
21217
|
import { createHash as createHash2 } from "node:crypto";
|
|
21195
21218
|
var metadataLimit = 16384;
|
|
21196
21219
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -21250,7 +21273,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
21250
21273
|
}
|
|
21251
21274
|
}, "readPartialMetadata");
|
|
21252
21275
|
|
|
21253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
21254
21277
|
import { randomUUID } from "node:crypto";
|
|
21255
21278
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
21256
21279
|
import { join } from "node:path";
|
|
@@ -21342,7 +21365,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21342
21365
|
};
|
|
21343
21366
|
}, "partialWriter");
|
|
21344
21367
|
|
|
21345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21346
21369
|
var NativeRecordingPartialStore = class {
|
|
21347
21370
|
static {
|
|
21348
21371
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -21449,12 +21472,12 @@ var NativeRecordingPartialStore = class {
|
|
|
21449
21472
|
}
|
|
21450
21473
|
};
|
|
21451
21474
|
|
|
21452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21453
21476
|
import { createHash as createHash4 } from "node:crypto";
|
|
21454
21477
|
import { link as link2 } from "node:fs/promises";
|
|
21455
21478
|
import { basename as basename2, dirname as dirname2, join as join4, resolve as resolve2 } from "node:path";
|
|
21456
21479
|
|
|
21457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
21458
21481
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
21459
21482
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
21460
21483
|
signal?.throwIfAborted();
|
|
@@ -21489,7 +21512,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
21489
21512
|
signal?.throwIfAborted();
|
|
21490
21513
|
}, "commitPublication");
|
|
21491
21514
|
|
|
21492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21493
21516
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21494
21517
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21495
21518
|
import { join as join3 } from "node:path";
|
|
@@ -21562,7 +21585,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21562
21585
|
}
|
|
21563
21586
|
}, "writePublicationJournal");
|
|
21564
21587
|
|
|
21565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21566
21589
|
var NativeRecordingPublication = class {
|
|
21567
21590
|
static {
|
|
21568
21591
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21635,7 +21658,7 @@ var NativeRecordingPublication = class {
|
|
|
21635
21658
|
}
|
|
21636
21659
|
};
|
|
21637
21660
|
|
|
21638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21639
21662
|
import { createHash as createHash5 } from "node:crypto";
|
|
21640
21663
|
import { readdir } from "node:fs/promises";
|
|
21641
21664
|
import { isAbsolute as isAbsolute2, join as join5, resolve as resolve3 } from "node:path";
|
|
@@ -21722,7 +21745,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
21722
21745
|
beforePublish
|
|
21723
21746
|
}), "commitMediaEntry");
|
|
21724
21747
|
|
|
21725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21726
21749
|
var validator = '"media-completed-v1"';
|
|
21727
21750
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21728
21751
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21823,7 +21846,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
21823
21846
|
return entry;
|
|
21824
21847
|
}, "archiveMediaFile");
|
|
21825
21848
|
|
|
21826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21827
21850
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21828
21851
|
import { join as join6, resolve as resolve4 } from "node:path";
|
|
21829
21852
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -21890,7 +21913,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21890
21913
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21891
21914
|
}, "withMediaArchiveLocks");
|
|
21892
21915
|
|
|
21893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21894
21917
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
21895
21918
|
if (value === void 0)
|
|
21896
21919
|
return void 0;
|
|
@@ -22043,7 +22066,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
22043
22066
|
}, { create: true });
|
|
22044
22067
|
}, "archiveMedia");
|
|
22045
22068
|
|
|
22046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
22047
22070
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
22048
22071
|
import { basename as basename3, dirname as dirname3, join as join7, resolve as resolve5 } from "node:path";
|
|
22049
22072
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -22196,7 +22219,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
22196
22219
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
22197
22220
|
}, "moveMediaArchive");
|
|
22198
22221
|
|
|
22199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
22200
22223
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
22201
22224
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
22202
22225
|
}, "progress") }) => {
|
|
@@ -22219,7 +22242,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22219
22242
|
}
|
|
22220
22243
|
await nativeRuntime({ env, progress });
|
|
22221
22244
|
progress(`${model.id}: loading it once to check it works`);
|
|
22222
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
22245
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-2RXV3BEC.js");
|
|
22223
22246
|
const embedder = await openEmbedder2(model, directory2);
|
|
22224
22247
|
try {
|
|
22225
22248
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -22240,7 +22263,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
22240
22263
|
}
|
|
22241
22264
|
await nativeRuntime({ env, progress });
|
|
22242
22265
|
progress(`${model.id}: loading it once to check it works`);
|
|
22243
|
-
const { openReranker } = await import("./rerank-
|
|
22266
|
+
const { openReranker } = await import("./rerank-UBMV6KO6.js");
|
|
22244
22267
|
const reranker = await openReranker(model, directory2);
|
|
22245
22268
|
try {
|
|
22246
22269
|
await reranker.score("check", ["check"]);
|
|
@@ -22258,7 +22281,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22258
22281
|
await installFiles(placedImage(model, directory2), { progress });
|
|
22259
22282
|
}
|
|
22260
22283
|
progress(`${model.id}: loading it once to check it works`);
|
|
22261
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22284
|
+
const { openPictureEmbedder } = await import("./embedder-I2SJMC6N.js");
|
|
22262
22285
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22263
22286
|
try {
|
|
22264
22287
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22270,7 +22293,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22270
22293
|
return { model, directory: directory2 };
|
|
22271
22294
|
}, "downloadImageModel");
|
|
22272
22295
|
|
|
22273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22274
22297
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22275
22298
|
async around(ref, window3) {
|
|
22276
22299
|
const at = parseLocator(ref);
|
|
@@ -22365,7 +22388,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
22365
22388
|
};
|
|
22366
22389
|
}, "storedNeighbours");
|
|
22367
22390
|
|
|
22368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
22369
22392
|
import { createHash as createHash6 } from "node:crypto";
|
|
22370
22393
|
var DAY = 864e5;
|
|
22371
22394
|
var MAX_TIME = 864e13;
|
|
@@ -22681,7 +22704,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
22681
22704
|
return value;
|
|
22682
22705
|
}, "decodeCheckpoint");
|
|
22683
22706
|
|
|
22684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
22685
22708
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
22686
22709
|
var PAGE = 20;
|
|
22687
22710
|
var PEOPLE = 20;
|
|
@@ -23085,7 +23108,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
23085
23108
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
23086
23109
|
}, "peopleOf");
|
|
23087
23110
|
|
|
23088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
23089
23112
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
23090
23113
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
23091
23114
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -23129,7 +23152,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
23129
23152
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
23130
23153
|
}, "matchVocabularyTerms");
|
|
23131
23154
|
|
|
23132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
23133
23156
|
var KINDS = ["project", "tag", "topic"];
|
|
23134
23157
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
23135
23158
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -23184,7 +23207,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23184
23207
|
};
|
|
23185
23208
|
}, "findEvidenceMentions");
|
|
23186
23209
|
|
|
23187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
23188
23211
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
23189
23212
|
var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
|
|
23190
23213
|
if (PROJECT_ID.test(reference)) {
|
|
@@ -23350,7 +23373,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23350
23373
|
return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
|
|
23351
23374
|
}, "gatherStoredProject");
|
|
23352
23375
|
|
|
23353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
23354
23377
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
23355
23378
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
23356
23379
|
if (deps.offline)
|
|
@@ -23422,7 +23445,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
23422
23445
|
};
|
|
23423
23446
|
}, "accountService");
|
|
23424
23447
|
|
|
23425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
23426
23449
|
var MINUTE = 6e4;
|
|
23427
23450
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
23428
23451
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -23441,7 +23464,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
23441
23464
|
return new Date(at - at % MINUTE).toISOString();
|
|
23442
23465
|
}, "sendTime");
|
|
23443
23466
|
|
|
23444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
23445
23468
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
23446
23469
|
try {
|
|
23447
23470
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -23688,7 +23711,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
23688
23711
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
23689
23712
|
}, "linkLimits");
|
|
23690
23713
|
|
|
23691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
23692
23715
|
var THREADS_PAGE = 500;
|
|
23693
23716
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
23694
23717
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -23767,7 +23790,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
23767
23790
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
23768
23791
|
}, "readMail");
|
|
23769
23792
|
|
|
23770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
23771
23794
|
var NO_MAIL = "no_mail";
|
|
23772
23795
|
var MAIL = "email";
|
|
23773
23796
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -23814,7 +23837,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
23814
23837
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
23815
23838
|
}, "accountsOfKind");
|
|
23816
23839
|
|
|
23817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
23818
23841
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
23819
23842
|
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");
|
|
23820
23843
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -24162,7 +24185,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
24162
24185
|
};
|
|
24163
24186
|
}, "statsLucene");
|
|
24164
24187
|
|
|
24165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
24166
24189
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
24167
24190
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
24168
24191
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -24331,7 +24354,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24331
24354
|
};
|
|
24332
24355
|
}, "readRankingSelection");
|
|
24333
24356
|
|
|
24334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
24335
24358
|
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");
|
|
24336
24359
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
24337
24360
|
command,
|
|
@@ -24341,7 +24364,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
24341
24364
|
fieldsVersion: FIELD_VERSION
|
|
24342
24365
|
}), "searchRecordOf");
|
|
24343
24366
|
|
|
24344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
24345
24368
|
function invalid2(message) {
|
|
24346
24369
|
throw new CliError("validation_error", message);
|
|
24347
24370
|
}
|
|
@@ -24635,7 +24658,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
24635
24658
|
}, "evidence")
|
|
24636
24659
|
}), "adminStatisticsService");
|
|
24637
24660
|
|
|
24638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
24639
24662
|
var DAY2 = 864e5;
|
|
24640
24663
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
24641
24664
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -24877,10 +24900,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24877
24900
|
};
|
|
24878
24901
|
}, "agendaItem");
|
|
24879
24902
|
|
|
24880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24881
24904
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24882
24905
|
|
|
24883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
24884
24907
|
var REQUEST_MS = 400;
|
|
24885
24908
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
24886
24909
|
const lowest = ranges[0];
|
|
@@ -24903,13 +24926,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
24903
24926
|
};
|
|
24904
24927
|
}, "estimateBackfill");
|
|
24905
24928
|
|
|
24906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24929
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
24907
24930
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
24908
24931
|
...error,
|
|
24909
24932
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
24910
24933
|
}), "withRecovery");
|
|
24911
24934
|
|
|
24912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
24913
24936
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
24914
24937
|
if (isCliFailure(error))
|
|
24915
24938
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -24992,7 +25015,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
24992
25015
|
};
|
|
24993
25016
|
}, "mergeBatches");
|
|
24994
25017
|
|
|
24995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
24996
25019
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
24997
25020
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
24998
25021
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -25015,7 +25038,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
25015
25038
|
}
|
|
25016
25039
|
}, "patiently");
|
|
25017
25040
|
|
|
25018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
25019
25042
|
var CONTEXT_MESSAGES2 = 3;
|
|
25020
25043
|
var CONTEXT_MINUTES = 10;
|
|
25021
25044
|
var MAX_CHARS = 1200;
|
|
@@ -25039,12 +25062,12 @@ var context = {
|
|
|
25039
25062
|
}, "describe")
|
|
25040
25063
|
};
|
|
25041
25064
|
|
|
25042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
25043
25066
|
var BUILT_INS = [context];
|
|
25044
25067
|
var providers = [...BUILT_INS];
|
|
25045
25068
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
25046
25069
|
|
|
25047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
25048
25071
|
var READ_PAGE = 5e3;
|
|
25049
25072
|
var CHAIN = 50;
|
|
25050
25073
|
var CONVERSATION_QUERY = {
|
|
@@ -25196,7 +25219,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
25196
25219
|
return size2;
|
|
25197
25220
|
}, "sized");
|
|
25198
25221
|
|
|
25199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
25200
25223
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
25201
25224
|
var MESSAGE_PAGE = 5e3;
|
|
25202
25225
|
var PER_SESSION = 8;
|
|
@@ -25215,7 +25238,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25215
25238
|
price: remote.price,
|
|
25216
25239
|
installed: true,
|
|
25217
25240
|
perBatch: PER_REQUEST * concurrency,
|
|
25218
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
25241
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-USBVVO4O.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
25219
25242
|
};
|
|
25220
25243
|
}
|
|
25221
25244
|
const model = textModel(choice);
|
|
@@ -25232,7 +25255,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25232
25255
|
if (!isTextModelInstalled(model, directory2))
|
|
25233
25256
|
throw notDownloaded(model.id);
|
|
25234
25257
|
if (apart) {
|
|
25235
|
-
const { openProcess } = await import("./process-
|
|
25258
|
+
const { openProcess } = await import("./process-AB2D2G2Q.js");
|
|
25236
25259
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
25237
25260
|
}
|
|
25238
25261
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -25521,7 +25544,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
25521
25544
|
return { ...one, state };
|
|
25522
25545
|
}, "shaped");
|
|
25523
25546
|
|
|
25524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
25525
25548
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
25526
25549
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
25527
25550
|
for (const [key, value, maximum] of [
|
|
@@ -25574,7 +25597,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
25574
25597
|
}
|
|
25575
25598
|
}, "catchUpSearch");
|
|
25576
25599
|
|
|
25577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
25578
25601
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
25579
25602
|
if (deps.reads === "store") {
|
|
25580
25603
|
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`);
|
|
@@ -25895,7 +25918,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
25895
25918
|
return message?.timestamp ?? fallback;
|
|
25896
25919
|
}, "timeOfKey");
|
|
25897
25920
|
|
|
25898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
25899
25922
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
25900
25923
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
25901
25924
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -26032,12 +26055,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
26032
26055
|
return { plan, repair };
|
|
26033
26056
|
}, "gapsService");
|
|
26034
26057
|
|
|
26035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
26036
26059
|
import { createHash as createHash9 } from "node:crypto";
|
|
26037
|
-
import { constants as constants2 } from "node:fs";
|
|
26038
|
-
import { open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
26060
|
+
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
26061
|
+
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
26039
26062
|
|
|
26040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
26041
26064
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
26042
26065
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
26043
26066
|
var MAX_FILES = 1e4;
|
|
@@ -26108,15 +26131,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
26108
26131
|
return choices;
|
|
26109
26132
|
}, "directoryPaths");
|
|
26110
26133
|
|
|
26111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26134
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26112
26135
|
import { posix } from "node:path";
|
|
26113
26136
|
|
|
26114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26115
26138
|
import { setImmediate as tick } from "node:timers/promises";
|
|
26116
26139
|
import { crc32 } from "node:zlib";
|
|
26117
26140
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
26118
26141
|
|
|
26119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
26120
26143
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
26121
26144
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
26122
26145
|
var SAMPLE = 65536;
|
|
@@ -26218,7 +26241,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
26218
26241
|
return result.text;
|
|
26219
26242
|
}, "decodeXml");
|
|
26220
26243
|
|
|
26221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26222
26245
|
var MAX_PART = 10 * 1024 * 1024;
|
|
26223
26246
|
var MAX_ENTRIES = 1e3;
|
|
26224
26247
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -26433,7 +26456,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
26433
26456
|
return found;
|
|
26434
26457
|
}, "elements");
|
|
26435
26458
|
|
|
26436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26459
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
26437
26460
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
26438
26461
|
let name = "";
|
|
26439
26462
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -26488,7 +26511,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
26488
26511
|
return { text: parts.join("").trim(), truncated: false };
|
|
26489
26512
|
}, "sheetText");
|
|
26490
26513
|
|
|
26491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26514
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26492
26515
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
26493
26516
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
26494
26517
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26888,10 +26911,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26888
26911
|
}
|
|
26889
26912
|
}, "readDocument");
|
|
26890
26913
|
|
|
26891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26892
26915
|
import { extname as extname3 } from "node:path";
|
|
26893
26916
|
|
|
26894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26895
26918
|
import { readFileSync } from "node:fs";
|
|
26896
26919
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
26897
26920
|
import { fileURLToPath } from "node:url";
|
|
@@ -26952,7 +26975,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26952
26975
|
}
|
|
26953
26976
|
}, "derived");
|
|
26954
26977
|
|
|
26955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26956
26979
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26957
26980
|
var image2 = {
|
|
26958
26981
|
id: "image",
|
|
@@ -26961,7 +26984,7 @@ var image2 = {
|
|
|
26961
26984
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26962
26985
|
};
|
|
26963
26986
|
|
|
26964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26965
26988
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26966
26989
|
var doc = {
|
|
26967
26990
|
id: "doc",
|
|
@@ -26973,7 +26996,7 @@ var doc = {
|
|
|
26973
26996
|
}), "read")
|
|
26974
26997
|
};
|
|
26975
26998
|
|
|
26976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26977
27000
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26978
27001
|
var docx = {
|
|
26979
27002
|
id: "docx",
|
|
@@ -26986,7 +27009,7 @@ var docx = {
|
|
|
26986
27009
|
}), "read")
|
|
26987
27010
|
};
|
|
26988
27011
|
|
|
26989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27012
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26990
27013
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26991
27014
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26992
27015
|
"fonttbl",
|
|
@@ -27162,7 +27185,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
27162
27185
|
}, "htmlText");
|
|
27163
27186
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
27164
27187
|
|
|
27165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
27166
27189
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
27167
27190
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
27168
27191
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -27218,7 +27241,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
27218
27241
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
27219
27242
|
}, "markdownSections");
|
|
27220
27243
|
|
|
27221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
27222
27245
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
27223
27246
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
27224
27247
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -27289,7 +27312,7 @@ var html = {
|
|
|
27289
27312
|
}, "read")
|
|
27290
27313
|
};
|
|
27291
27314
|
|
|
27292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
27293
27316
|
var office = {
|
|
27294
27317
|
id: "office",
|
|
27295
27318
|
version: documentExtractor("odt"),
|
|
@@ -27300,7 +27323,7 @@ var office = {
|
|
|
27300
27323
|
}, "read")
|
|
27301
27324
|
};
|
|
27302
27325
|
|
|
27303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
27304
27327
|
var pdf = {
|
|
27305
27328
|
id: "pdf",
|
|
27306
27329
|
version: "unpdf",
|
|
@@ -27367,7 +27390,7 @@ var pdf = {
|
|
|
27367
27390
|
}), "read")
|
|
27368
27391
|
};
|
|
27369
27392
|
|
|
27370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
27371
27394
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
27372
27395
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
27373
27396
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -27387,7 +27410,7 @@ var plain = {
|
|
|
27387
27410
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
27388
27411
|
};
|
|
27389
27412
|
|
|
27390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
27391
27414
|
var rtf = {
|
|
27392
27415
|
id: "rtf",
|
|
27393
27416
|
version: "v1",
|
|
@@ -27395,10 +27418,10 @@ var rtf = {
|
|
|
27395
27418
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
27396
27419
|
};
|
|
27397
27420
|
|
|
27398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27399
27422
|
import { basename as basename5 } from "node:path";
|
|
27400
27423
|
|
|
27401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
27402
27425
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
27403
27426
|
const cells = [];
|
|
27404
27427
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -27436,7 +27459,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
27436
27459
|
return { cells, truncated };
|
|
27437
27460
|
}, "delimitedSpans");
|
|
27438
27461
|
|
|
27439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27440
27463
|
var DELIMITED = {
|
|
27441
27464
|
".csv": ",",
|
|
27442
27465
|
".tsv": " ",
|
|
@@ -27475,7 +27498,7 @@ var sheets = {
|
|
|
27475
27498
|
}, "read")
|
|
27476
27499
|
};
|
|
27477
27500
|
|
|
27478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
27479
27502
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
27480
27503
|
var HEAD_BYTES = 1024;
|
|
27481
27504
|
var readers = [...BUILT_INS2];
|
|
@@ -27485,7 +27508,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
27485
27508
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
27486
27509
|
}, "readWithRegistry");
|
|
27487
27510
|
|
|
27488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27489
27512
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
27490
27513
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
27491
27514
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -28564,7 +28587,7 @@ function imageSize(input) {
|
|
|
28564
28587
|
}
|
|
28565
28588
|
__name(imageSize, "imageSize");
|
|
28566
28589
|
|
|
28567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
28568
28591
|
var MAX_PAGES = 20;
|
|
28569
28592
|
var MAX_PIXELS = 2e7;
|
|
28570
28593
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28715,7 +28738,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28715
28738
|
}
|
|
28716
28739
|
}, "ocrPdf");
|
|
28717
28740
|
|
|
28718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28719
28742
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28720
28743
|
const limits = pdfPreviewLimits(env);
|
|
28721
28744
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -28792,7 +28815,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28792
28815
|
}
|
|
28793
28816
|
}, "pdfPreview");
|
|
28794
28817
|
|
|
28795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28796
28819
|
import { createHash as createHash8 } from "node:crypto";
|
|
28797
28820
|
import { constants } from "node:fs";
|
|
28798
28821
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28900,7 +28923,121 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28900
28923
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28901
28924
|
}, "transferMime");
|
|
28902
28925
|
|
|
28903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
28927
|
+
import { createWriteStream, mkdirSync } from "node:fs";
|
|
28928
|
+
import { link as link3, rm } from "node:fs/promises";
|
|
28929
|
+
import { join as join10, resolve as resolve6 } from "node:path";
|
|
28930
|
+
import { Readable, Transform } from "node:stream";
|
|
28931
|
+
import { pipeline } from "node:stream/promises";
|
|
28932
|
+
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
28933
|
+
{
|
|
28934
|
+
kind,
|
|
28935
|
+
providerRef,
|
|
28936
|
+
...name === void 0 ? {} : { name },
|
|
28937
|
+
...position === void 0 ? {} : { position }
|
|
28938
|
+
}
|
|
28939
|
+
]), "refreshedFiles");
|
|
28940
|
+
var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
|
|
28941
|
+
const downloaded = saved.map((one, index) => ({
|
|
28942
|
+
kind: one.kind,
|
|
28943
|
+
path: one.path,
|
|
28944
|
+
...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
|
|
28945
|
+
...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
|
|
28946
|
+
...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
|
|
28947
|
+
}));
|
|
28948
|
+
try {
|
|
28949
|
+
const kept = await messages.keepDownloaded(chat, message, downloaded);
|
|
28950
|
+
if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
|
|
28951
|
+
warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
|
|
28952
|
+
return kept;
|
|
28953
|
+
} catch (error) {
|
|
28954
|
+
onFailure?.(error);
|
|
28955
|
+
warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
|
|
28956
|
+
return 0;
|
|
28957
|
+
}
|
|
28958
|
+
}, "recordPaths");
|
|
28959
|
+
var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
|
|
28960
|
+
const { files } = await messages.download(chat, message);
|
|
28961
|
+
mkdirSync(output, { recursive: true });
|
|
28962
|
+
const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
|
|
28963
|
+
if (result.batch.failed > 0)
|
|
28964
|
+
throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
|
|
28965
|
+
batch: result.batch,
|
|
28966
|
+
saved: result.saved
|
|
28967
|
+
});
|
|
28968
|
+
return result.saved;
|
|
28969
|
+
}, "downloadMessage");
|
|
28970
|
+
var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
|
|
28971
|
+
const saved = [];
|
|
28972
|
+
const successful = [];
|
|
28973
|
+
for (const [index, file] of files.entries()) {
|
|
28974
|
+
if (batch.stopped)
|
|
28975
|
+
break;
|
|
28976
|
+
try {
|
|
28977
|
+
const one = await save(file, output, `${message}-${index + 1}`, { unique });
|
|
28978
|
+
saved.push(one);
|
|
28979
|
+
successful.push(file);
|
|
28980
|
+
batch.ok();
|
|
28981
|
+
onSaved?.(one);
|
|
28982
|
+
} catch (error) {
|
|
28983
|
+
const issue = batch.fail(message, "download", error, (file.position ?? index) + 1);
|
|
28984
|
+
warn(`message ${message}, attachment ${(file.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
|
|
28985
|
+
}
|
|
28986
|
+
}
|
|
28987
|
+
await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
|
|
28988
|
+
return { saved, batch: batch.result() };
|
|
28989
|
+
}, "saveFiles");
|
|
28990
|
+
var EXTENSIONS = {
|
|
28991
|
+
"image/jpeg": "jpg",
|
|
28992
|
+
"image/png": "png",
|
|
28993
|
+
"image/webp": "webp",
|
|
28994
|
+
"image/gif": "gif",
|
|
28995
|
+
"video/mp4": "mp4",
|
|
28996
|
+
"video/webm": "webm",
|
|
28997
|
+
"audio/mpeg": "mp3",
|
|
28998
|
+
"audio/ogg": "ogg",
|
|
28999
|
+
"audio/mp4": "m4a",
|
|
29000
|
+
"application/pdf": "pdf"
|
|
29001
|
+
};
|
|
29002
|
+
var BY_KIND = { photo: "jpg" };
|
|
29003
|
+
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
29004
|
+
const own = safeName(file.name);
|
|
29005
|
+
const fileName = /* @__PURE__ */ __name(() => {
|
|
29006
|
+
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
29007
|
+
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
29008
|
+
}, "fileName");
|
|
29009
|
+
const partial = join10(directory2, `.${fileName()}.${process.pid}.part`);
|
|
29010
|
+
let bytes2 = 0;
|
|
29011
|
+
const counting = new Transform({
|
|
29012
|
+
transform(chunk, _encoding, done2) {
|
|
29013
|
+
bytes2 += chunk.length;
|
|
29014
|
+
done2(null, chunk);
|
|
29015
|
+
}
|
|
29016
|
+
});
|
|
29017
|
+
try {
|
|
29018
|
+
await pipeline(Readable.from(file.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
29019
|
+
const name = fileName();
|
|
29020
|
+
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
29021
|
+
for (const candidate of names2) {
|
|
29022
|
+
const path2 = resolve6(join10(directory2, candidate));
|
|
29023
|
+
const taken = await link3(partial, path2).then(() => false, (error) => {
|
|
29024
|
+
if (error.code === "EEXIST")
|
|
29025
|
+
return true;
|
|
29026
|
+
throw error;
|
|
29027
|
+
});
|
|
29028
|
+
if (!taken)
|
|
29029
|
+
return { kind: file.kind, path: path2, bytes: bytes2 };
|
|
29030
|
+
}
|
|
29031
|
+
const path = resolve6(join10(directory2, names2.at(-1) ?? name));
|
|
29032
|
+
if (unique)
|
|
29033
|
+
return { kind: file.kind, path, bytes: bytes2, existing: true };
|
|
29034
|
+
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
29035
|
+
} finally {
|
|
29036
|
+
await rm(partial, { force: true });
|
|
29037
|
+
}
|
|
29038
|
+
}, "save");
|
|
29039
|
+
|
|
29040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28904
29041
|
var ATTACHMENT_QUERY = {
|
|
28905
29042
|
entity: "attachment",
|
|
28906
29043
|
backend: "sql",
|
|
@@ -29255,6 +29392,48 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29255
29392
|
...preview
|
|
29256
29393
|
};
|
|
29257
29394
|
}, "show"),
|
|
29395
|
+
saveHeld: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, output }) => {
|
|
29396
|
+
if (attachment2 !== void 0 && (!Number.isSafeInteger(attachment2) || attachment2 < 1))
|
|
29397
|
+
throw new CliError("validation_error", "attachment must be a position from 1");
|
|
29398
|
+
const store = await accountStore(deps);
|
|
29399
|
+
const { account } = store;
|
|
29400
|
+
const { chatId, messageId } = await messageOf(deps, store, chat, message);
|
|
29401
|
+
const ref = formatLocator({ ...account, chat: chatId, message: messageId });
|
|
29402
|
+
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
29403
|
+
if (files.length === 0)
|
|
29404
|
+
throw new CliError("not_found", `the local store holds no file of ${ref}`);
|
|
29405
|
+
const chosen = attachment2 === void 0 ? files : files.filter(({ position }) => position === attachment2 - 1);
|
|
29406
|
+
if (chosen.length === 0)
|
|
29407
|
+
throw new CliError("not_found", `${ref} has no file at position ${attachment2}; its files are at ${files.map(({ position }) => position + 1).join(", ")}`);
|
|
29408
|
+
const env = deps.env ?? process.env;
|
|
29409
|
+
const held = await Promise.all(chosen.map(async (file) => {
|
|
29410
|
+
const missing4 = new CliError("not_found", `file ${file.position + 1} of ${ref} is not saved on this computer; run messages download without --offline`);
|
|
29411
|
+
if (file.localPath === null)
|
|
29412
|
+
throw missing4;
|
|
29413
|
+
if (refusedPlace(file.localPath, deps.messenger.app, env))
|
|
29414
|
+
throw new CliError("validation_error", "cannot copy known credential files, the WireCat apps' own files or the message store");
|
|
29415
|
+
const found = await lstat4(file.localPath).catch(() => void 0);
|
|
29416
|
+
if (!found)
|
|
29417
|
+
throw missing4;
|
|
29418
|
+
if (!found.isFile())
|
|
29419
|
+
throw new CliError("validation_error", "the saved attachment must be a regular file");
|
|
29420
|
+
return { file, path: file.localPath };
|
|
29421
|
+
}));
|
|
29422
|
+
mkdirSync2(output, { recursive: true });
|
|
29423
|
+
const saved = [];
|
|
29424
|
+
for (const { file, path } of held)
|
|
29425
|
+
saved.push(await save({
|
|
29426
|
+
kind: file.kind,
|
|
29427
|
+
...file.name === null ? {} : { name: file.name },
|
|
29428
|
+
...file.mime === null ? {} : { mime: file.mime },
|
|
29429
|
+
position: file.position,
|
|
29430
|
+
bytes: /* @__PURE__ */ __name(async function* () {
|
|
29431
|
+
const handle = await open6(path, constants2.O_RDONLY | (constants2.O_NOFOLLOW ?? 0));
|
|
29432
|
+
yield* handle.createReadStream();
|
|
29433
|
+
}, "bytes")
|
|
29434
|
+
}, output, `${messageId}-${file.position + 1}`));
|
|
29435
|
+
return saved;
|
|
29436
|
+
}, "saveHeld"),
|
|
29258
29437
|
setText: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, text: text2 }) => {
|
|
29259
29438
|
if (text2.trim() === "")
|
|
29260
29439
|
throw new CliError("validation_error", "the text is empty \u2014 nothing to keep");
|
|
@@ -29281,7 +29460,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29281
29460
|
}, "setText")
|
|
29282
29461
|
}), "attachmentsService");
|
|
29283
29462
|
|
|
29284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
29285
29464
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
29286
29465
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
29287
29466
|
const store = await accountStore(deps);
|
|
@@ -29311,7 +29490,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29311
29490
|
}, "list")
|
|
29312
29491
|
}), "chatDocumentsService");
|
|
29313
29492
|
|
|
29314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
29315
29494
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
29316
29495
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
29317
29496
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -29398,7 +29577,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
29398
29577
|
}
|
|
29399
29578
|
}, "isRetentionSelection");
|
|
29400
29579
|
|
|
29401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29580
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
29402
29581
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
29403
29582
|
const fields = text2.split(",").map((one) => one.trim());
|
|
29404
29583
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -29605,7 +29784,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29605
29784
|
};
|
|
29606
29785
|
}, "countersService");
|
|
29607
29786
|
|
|
29608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29609
29788
|
var SYNC_KEY = "messages.sync-first";
|
|
29610
29789
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29611
29790
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29737,7 +29916,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29737
29916
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29738
29917
|
}), "withRefresh");
|
|
29739
29918
|
|
|
29740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29741
29920
|
var CANDIDATES = 50;
|
|
29742
29921
|
var WORD_HITS = 200;
|
|
29743
29922
|
var RRF_K = 60;
|
|
@@ -30012,13 +30191,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
30012
30191
|
return mean.map((value) => value / length);
|
|
30013
30192
|
}, "meanOf");
|
|
30014
30193
|
|
|
30015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
30016
30195
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
30017
30196
|
...embeddingsMaintenance(deps),
|
|
30018
30197
|
...embeddingsSearch(deps)
|
|
30019
30198
|
}), "embeddingsService");
|
|
30020
30199
|
|
|
30021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
30022
30201
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
30023
30202
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
30024
30203
|
if (deps.offline)
|
|
@@ -30159,7 +30338,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30159
30338
|
};
|
|
30160
30339
|
}, "foldersService");
|
|
30161
30340
|
|
|
30162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
30163
30342
|
var REVIEW_COUNT = 500;
|
|
30164
30343
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
30165
30344
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -30238,7 +30417,14 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
30238
30417
|
};
|
|
30239
30418
|
}, "mentionsService");
|
|
30240
30419
|
|
|
30241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
30421
|
+
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
30422
|
+
position,
|
|
30423
|
+
kind,
|
|
30424
|
+
...name === void 0 ? {} : { name },
|
|
30425
|
+
url: null,
|
|
30426
|
+
reason: "unsupported_provider"
|
|
30427
|
+
})), "fileLinks");
|
|
30242
30428
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
30243
30429
|
if (isLocator(reference)) {
|
|
30244
30430
|
if (message !== void 0)
|
|
@@ -30285,7 +30471,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
30285
30471
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
30286
30472
|
}, "validatePermalink");
|
|
30287
30473
|
|
|
30288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30474
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
30289
30475
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
30290
30476
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
30291
30477
|
return `${seconds / 86400}d`;
|
|
@@ -30317,7 +30503,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
30317
30503
|
return seconds;
|
|
30318
30504
|
}, "pinDurationOf");
|
|
30319
30505
|
|
|
30320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30506
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
30321
30507
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
30322
30508
|
if (sendAs === void 0) {
|
|
30323
30509
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30342,7 +30528,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30342
30528
|
return sendAs;
|
|
30343
30529
|
}, "typedSendAs");
|
|
30344
30530
|
|
|
30345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
30346
30532
|
var TOTAL_CAP = 1e4;
|
|
30347
30533
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
30348
30534
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -30353,7 +30539,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
30353
30539
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
30354
30540
|
}, "totalOf");
|
|
30355
30541
|
|
|
30356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
30357
30543
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
30358
30544
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
30359
30545
|
let narrows = false;
|
|
@@ -30382,7 +30568,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
30382
30568
|
return wanted(root).join(" ").trim();
|
|
30383
30569
|
}, "meaningWords");
|
|
30384
30570
|
|
|
30385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30571
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
30386
30572
|
var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
30387
30573
|
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"));
|
|
30388
30574
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -30497,7 +30683,7 @@ function planQuestion(text2, strict = false) {
|
|
|
30497
30683
|
}
|
|
30498
30684
|
__name(planQuestion, "planQuestion");
|
|
30499
30685
|
|
|
30500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30501
30687
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30502
30688
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30503
30689
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30690,7 +30876,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30690
30876
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
30691
30877
|
}, "signals");
|
|
30692
30878
|
|
|
30693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30694
30880
|
var MEANING_DEPTH = 100;
|
|
30695
30881
|
var RRF_K2 = 60;
|
|
30696
30882
|
var RERANK_DEPTH = 50;
|
|
@@ -31018,7 +31204,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
31018
31204
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
31019
31205
|
}, "mixedWithReranker");
|
|
31020
31206
|
|
|
31021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
31022
31208
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
31023
31209
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
31024
31210
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -31217,7 +31403,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31217
31403
|
return result;
|
|
31218
31404
|
}, "readThreadContext");
|
|
31219
31405
|
|
|
31220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
31221
31407
|
var SEARCH_FILL_MS = 200;
|
|
31222
31408
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
31223
31409
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -31284,12 +31470,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
31284
31470
|
}, "accountOf");
|
|
31285
31471
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
31286
31472
|
|
|
31287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31288
31474
|
import { createHash as createHash10 } from "node:crypto";
|
|
31289
31475
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
31290
31476
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
31291
31477
|
|
|
31292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
31293
31479
|
var GROUP_SETTINGS = [
|
|
31294
31480
|
"allCanPin",
|
|
31295
31481
|
"onlyAdminsAdd",
|
|
@@ -31303,121 +31489,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
31303
31489
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
31304
31490
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
31305
31491
|
|
|
31306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31307
|
-
import { createWriteStream, mkdirSync } from "node:fs";
|
|
31308
|
-
import { link as link3, rm } from "node:fs/promises";
|
|
31309
|
-
import { join as join10, resolve as resolve6 } from "node:path";
|
|
31310
|
-
import { Readable, Transform } from "node:stream";
|
|
31311
|
-
import { pipeline } from "node:stream/promises";
|
|
31312
|
-
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
31313
|
-
{
|
|
31314
|
-
kind,
|
|
31315
|
-
providerRef,
|
|
31316
|
-
...name === void 0 ? {} : { name },
|
|
31317
|
-
...position === void 0 ? {} : { position }
|
|
31318
|
-
}
|
|
31319
|
-
]), "refreshedFiles");
|
|
31320
|
-
var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
|
|
31321
|
-
const downloaded = saved.map((one, index) => ({
|
|
31322
|
-
kind: one.kind,
|
|
31323
|
-
path: one.path,
|
|
31324
|
-
...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
|
|
31325
|
-
...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
|
|
31326
|
-
...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
|
|
31327
|
-
}));
|
|
31328
|
-
try {
|
|
31329
|
-
const kept = await messages.keepDownloaded(chat, message, downloaded);
|
|
31330
|
-
if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
|
|
31331
|
-
warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
|
|
31332
|
-
return kept;
|
|
31333
|
-
} catch (error) {
|
|
31334
|
-
onFailure?.(error);
|
|
31335
|
-
warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
|
|
31336
|
-
return 0;
|
|
31337
|
-
}
|
|
31338
|
-
}, "recordPaths");
|
|
31339
|
-
var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
|
|
31340
|
-
const { files } = await messages.download(chat, message);
|
|
31341
|
-
mkdirSync(output, { recursive: true });
|
|
31342
|
-
const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
|
|
31343
|
-
if (result.batch.failed > 0)
|
|
31344
|
-
throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
|
|
31345
|
-
batch: result.batch,
|
|
31346
|
-
saved: result.saved
|
|
31347
|
-
});
|
|
31348
|
-
return result.saved;
|
|
31349
|
-
}, "downloadMessage");
|
|
31350
|
-
var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
|
|
31351
|
-
const saved = [];
|
|
31352
|
-
const successful = [];
|
|
31353
|
-
for (const [index, file] of files.entries()) {
|
|
31354
|
-
if (batch.stopped)
|
|
31355
|
-
break;
|
|
31356
|
-
try {
|
|
31357
|
-
const one = await save(file, output, `${message}-${index + 1}`, { unique });
|
|
31358
|
-
saved.push(one);
|
|
31359
|
-
successful.push(file);
|
|
31360
|
-
batch.ok();
|
|
31361
|
-
onSaved?.(one);
|
|
31362
|
-
} catch (error) {
|
|
31363
|
-
const issue = batch.fail(message, "download", error, (file.position ?? index) + 1);
|
|
31364
|
-
warn(`message ${message}, attachment ${(file.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
|
|
31365
|
-
}
|
|
31366
|
-
}
|
|
31367
|
-
await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
|
|
31368
|
-
return { saved, batch: batch.result() };
|
|
31369
|
-
}, "saveFiles");
|
|
31370
|
-
var EXTENSIONS = {
|
|
31371
|
-
"image/jpeg": "jpg",
|
|
31372
|
-
"image/png": "png",
|
|
31373
|
-
"image/webp": "webp",
|
|
31374
|
-
"image/gif": "gif",
|
|
31375
|
-
"video/mp4": "mp4",
|
|
31376
|
-
"video/webm": "webm",
|
|
31377
|
-
"audio/mpeg": "mp3",
|
|
31378
|
-
"audio/ogg": "ogg",
|
|
31379
|
-
"audio/mp4": "m4a",
|
|
31380
|
-
"application/pdf": "pdf"
|
|
31381
|
-
};
|
|
31382
|
-
var BY_KIND = { photo: "jpg" };
|
|
31383
|
-
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
31384
|
-
const own = safeName(file.name);
|
|
31385
|
-
const fileName = /* @__PURE__ */ __name(() => {
|
|
31386
|
-
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
31387
|
-
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
31388
|
-
}, "fileName");
|
|
31389
|
-
const partial = join10(directory2, `.${fileName()}.${process.pid}.part`);
|
|
31390
|
-
let bytes2 = 0;
|
|
31391
|
-
const counting = new Transform({
|
|
31392
|
-
transform(chunk, _encoding, done2) {
|
|
31393
|
-
bytes2 += chunk.length;
|
|
31394
|
-
done2(null, chunk);
|
|
31395
|
-
}
|
|
31396
|
-
});
|
|
31397
|
-
try {
|
|
31398
|
-
await pipeline(Readable.from(file.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
31399
|
-
const name = fileName();
|
|
31400
|
-
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
31401
|
-
for (const candidate of names2) {
|
|
31402
|
-
const path2 = resolve6(join10(directory2, candidate));
|
|
31403
|
-
const taken = await link3(partial, path2).then(() => false, (error) => {
|
|
31404
|
-
if (error.code === "EEXIST")
|
|
31405
|
-
return true;
|
|
31406
|
-
throw error;
|
|
31407
|
-
});
|
|
31408
|
-
if (!taken)
|
|
31409
|
-
return { kind: file.kind, path: path2, bytes: bytes2 };
|
|
31410
|
-
}
|
|
31411
|
-
const path = resolve6(join10(directory2, names2.at(-1) ?? name));
|
|
31412
|
-
if (unique)
|
|
31413
|
-
return { kind: file.kind, path, bytes: bytes2, existing: true };
|
|
31414
|
-
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
31415
|
-
} finally {
|
|
31416
|
-
await rm(partial, { force: true });
|
|
31417
|
-
}
|
|
31418
|
-
}, "save");
|
|
31419
|
-
|
|
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
|
|
31492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31421
31493
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
31422
31494
|
var PICTURE_FLOOR = 0.25;
|
|
31423
31495
|
var PAGE4 = 50;
|
|
@@ -31434,7 +31506,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31434
31506
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31435
31507
|
if (!isImageModelInstalled(model2, directory2))
|
|
31436
31508
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31437
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31509
|
+
const { openPictureEmbedder } = await import("./embedder-I2SJMC6N.js");
|
|
31438
31510
|
return openPictureEmbedder(model2, directory2);
|
|
31439
31511
|
}, "open");
|
|
31440
31512
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31631,7 +31703,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31631
31703
|
}, "search")
|
|
31632
31704
|
}), "withPictures");
|
|
31633
31705
|
|
|
31634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31635
31707
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
31636
31708
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
31637
31709
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31680,7 +31752,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31680
31752
|
}
|
|
31681
31753
|
}, "meaningLane");
|
|
31682
31754
|
|
|
31683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31684
31756
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31685
31757
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31686
31758
|
if (choice === "off")
|
|
@@ -31692,9 +31764,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31692
31764
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31693
31765
|
try {
|
|
31694
31766
|
const warm = deps.embedders;
|
|
31695
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31767
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-AB2D2G2Q.js")).openRerankerProcess(model, directory2, {
|
|
31696
31768
|
threads: defaultThreads()
|
|
31697
|
-
})) : await (await import("./rerank-
|
|
31769
|
+
})) : await (await import("./rerank-UBMV6KO6.js")).openReranker(model, directory2);
|
|
31698
31770
|
return {
|
|
31699
31771
|
model: model.id,
|
|
31700
31772
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31714,17 +31786,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31714
31786
|
};
|
|
31715
31787
|
}, "rerankLane");
|
|
31716
31788
|
|
|
31717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31718
31790
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
31719
31791
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
31720
31792
|
const directory2 = imageModelsDirectory(env);
|
|
31721
31793
|
if (!isImageModelInstalled(model, directory2))
|
|
31722
31794
|
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 });
|
|
31723
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31795
|
+
const { openPictureEmbedder } = await import("./embedder-I2SJMC6N.js");
|
|
31724
31796
|
return openPictureEmbedder(model, directory2);
|
|
31725
31797
|
}, "openPictureEmbedderFor");
|
|
31726
31798
|
|
|
31727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31728
31800
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
31729
31801
|
const metadata = note.frontMatter;
|
|
31730
31802
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31739,7 +31811,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
31739
31811
|
};
|
|
31740
31812
|
}, "documentSource");
|
|
31741
31813
|
|
|
31742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31743
31815
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31744
31816
|
let root;
|
|
31745
31817
|
try {
|
|
@@ -31766,7 +31838,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
31766
31838
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31767
31839
|
}, "titleTiers");
|
|
31768
31840
|
|
|
31769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31770
31842
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
31771
31843
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
31772
31844
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -32176,7 +32248,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
32176
32248
|
};
|
|
32177
32249
|
}, "searchNotesOf");
|
|
32178
32250
|
|
|
32179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32251
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
32180
32252
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
32181
32253
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
32182
32254
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -32288,7 +32360,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
32288
32360
|
};
|
|
32289
32361
|
}, "searchEvents");
|
|
32290
32362
|
|
|
32291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
32292
32364
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
32293
32365
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
32294
32366
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -32357,6 +32429,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32357
32429
|
from: hit.email?.from ? { name: hit.email.from.name ?? hit.email.from.address, ref: hit.email.from.ref } : { name: hit.senderName, ref: null },
|
|
32358
32430
|
senderIsMe: senderIsMe(hit, at.account),
|
|
32359
32431
|
...hit.email ? { email: hit.email } : {},
|
|
32432
|
+
attachments: hitFiles(hit.attachments),
|
|
32360
32433
|
foundBy
|
|
32361
32434
|
};
|
|
32362
32435
|
}, "itemOf");
|
|
@@ -32496,7 +32569,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32496
32569
|
};
|
|
32497
32570
|
}, "searchAll");
|
|
32498
32571
|
|
|
32499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
32500
32573
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
32501
32574
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
32502
32575
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32589,7 +32662,8 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, que
|
|
|
32589
32662
|
meetingId: hit.meetingId,
|
|
32590
32663
|
scope: hit.scope,
|
|
32591
32664
|
id: hit.id,
|
|
32592
|
-
startMs: hit.startMs
|
|
32665
|
+
startMs: hit.startMs,
|
|
32666
|
+
...hit.scope === "transcript" && hit.ref !== void 0 ? { cueRef: hit.ref, speakerName: hit.speakerName ?? null } : {}
|
|
32593
32667
|
}
|
|
32594
32668
|
});
|
|
32595
32669
|
if (collected.items.length > request.limit) {
|
|
@@ -32743,9 +32817,9 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
32743
32817
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32744
32818
|
}, "searchAllOfSource");
|
|
32745
32819
|
|
|
32746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32747
32821
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32748
|
-
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
32822
|
+
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, maxMessageBytes: 5e6 };
|
|
32749
32823
|
var DEFAULT_BACKEND = "both";
|
|
32750
32824
|
var sourceKey = /* @__PURE__ */ __name((chatId, id2) => JSON.stringify([chatId, id2]), "sourceKey");
|
|
32751
32825
|
var merge = /* @__PURE__ */ __name((one, other) => {
|
|
@@ -32932,8 +33006,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32932
33006
|
return { report, sources };
|
|
32933
33007
|
}, "searchServer");
|
|
32934
33008
|
|
|
32935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32936
33010
|
var DELETE_AT_ONCE = 10;
|
|
33011
|
+
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
33012
|
+
const files = fileLinks(attachments);
|
|
33013
|
+
return files.length > 0 ? { files } : {};
|
|
33014
|
+
}, "filesOf");
|
|
32937
33015
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
32938
33016
|
const { guard } = deps;
|
|
32939
33017
|
const inStore = /* @__PURE__ */ __name(async (read) => read(await deps.store(), await deps.account()), "inStore");
|
|
@@ -33083,13 +33161,15 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33083
33161
|
const store = await deps.store();
|
|
33084
33162
|
const chat2 = await readChatId(deps, target2.chat, store, account);
|
|
33085
33163
|
const found2 = await store.messages.around(account, chat2, target2.message, { before: 0, after: 0 });
|
|
33086
|
-
|
|
33164
|
+
const held2 = found2.find((item) => item.id === target2.message && item.chatId === chat2);
|
|
33165
|
+
if (!held2)
|
|
33087
33166
|
throw new CliError("not_found", "no such message in this account's stored chat");
|
|
33088
33167
|
return {
|
|
33089
33168
|
locator: formatLocator({ ...account, chat: chat2, message: target2.message }),
|
|
33090
33169
|
url: null,
|
|
33091
33170
|
access: "unavailable",
|
|
33092
|
-
reason: deps.offline ? "offline" : "unsupported_provider"
|
|
33171
|
+
reason: deps.offline ? "offline" : "unsupported_provider",
|
|
33172
|
+
...filesOf(held2)
|
|
33093
33173
|
};
|
|
33094
33174
|
}
|
|
33095
33175
|
const connection = await deps.connection();
|
|
@@ -33097,20 +33177,27 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33097
33177
|
throw new CliError("authentication_error", "the connected account differs from the recorded profile; refresh the session before linking");
|
|
33098
33178
|
const { id: chat } = await connection.resolve(target2.chat);
|
|
33099
33179
|
const locator = formatLocator({ ...account, chat, message: target2.message });
|
|
33100
|
-
if (connection.permalink)
|
|
33101
|
-
|
|
33180
|
+
if (connection.permalink) {
|
|
33181
|
+
const permalink = validatePermalink(await connection.permalink(chat, target2.message));
|
|
33182
|
+
const held2 = await deps.store().then((store) => store.messages.around(account, chat, target2.message, { before: 0, after: 0 })).then((found2) => found2.find((item) => item.id === target2.message && item.chatId === chat)).catch(() => void 0);
|
|
33183
|
+
return { locator, ...permalink, ...held2 ? filesOf(held2) : {} };
|
|
33184
|
+
}
|
|
33102
33185
|
const found = await capability(connection, "around", "read a message")(chat, target2.message, {
|
|
33103
33186
|
before: 0,
|
|
33104
33187
|
after: 0
|
|
33105
33188
|
});
|
|
33106
|
-
|
|
33189
|
+
const held = found.find((item) => item.id === target2.message && item.chatId === chat);
|
|
33190
|
+
if (!held)
|
|
33107
33191
|
throw new CliError("not_found", "no such message in this chat");
|
|
33108
|
-
return { locator, url: null, access: "unavailable", reason: "unsupported_provider" };
|
|
33192
|
+
return { locator, url: null, access: "unavailable", reason: "unsupported_provider", ...filesOf(held) };
|
|
33109
33193
|
}, "link"),
|
|
33110
|
-
download: /* @__PURE__ */ __name(async (
|
|
33194
|
+
download: /* @__PURE__ */ __name(async (reference, message) => {
|
|
33195
|
+
const target2 = messageLinkTarget(reference, message, deps.messenger.provider);
|
|
33196
|
+
if (target2.account !== void 0 && target2.account !== (await deps.account()).account)
|
|
33197
|
+
throw new CliError("validation_error", "that locator belongs to another account; select its profile first");
|
|
33111
33198
|
const connection = await deps.connection();
|
|
33112
33199
|
const download = capability(connection, "download", "download attachments");
|
|
33113
|
-
return download((await connection.resolve(chat)).id, message);
|
|
33200
|
+
return download((await connection.resolve(target2.chat)).id, target2.message);
|
|
33114
33201
|
}, "download"),
|
|
33115
33202
|
keepDownloaded: /* @__PURE__ */ __name((chat, message, files) => inStore(async (store, account) => {
|
|
33116
33203
|
const chatId = await storedChatId(deps.messenger, chat, store, account).catch(() => void 0) ?? (await (await deps.connection()).resolve(chat)).id;
|
|
@@ -33358,7 +33445,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
33358
33445
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
33359
33446
|
}, "checkMediaOptions");
|
|
33360
33447
|
|
|
33361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
33362
33449
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
33363
33450
|
var RULES = {
|
|
33364
33451
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -33373,7 +33460,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
33373
33460
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
33374
33461
|
}), "classifyChannel");
|
|
33375
33462
|
|
|
33376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
33377
33464
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
33378
33465
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
33379
33466
|
const store = await deps.store();
|
|
@@ -33459,7 +33546,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
33459
33546
|
};
|
|
33460
33547
|
}, "metadataService");
|
|
33461
33548
|
|
|
33462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33549
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
33463
33550
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
33464
33551
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
33465
33552
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -33496,7 +33583,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
33496
33583
|
return { chatId, rows, notes };
|
|
33497
33584
|
}, "moderateWith");
|
|
33498
33585
|
|
|
33499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
33500
33587
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
33501
33588
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
33502
33589
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -33574,7 +33661,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
33574
33661
|
}, "removePerson")
|
|
33575
33662
|
}), "moderatorOf");
|
|
33576
33663
|
|
|
33577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
33578
33665
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
33579
33666
|
id: note.id,
|
|
33580
33667
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -33618,7 +33705,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
33618
33705
|
};
|
|
33619
33706
|
}, "privatePeopleService");
|
|
33620
33707
|
|
|
33621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
33622
33709
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
33623
33710
|
total: 0,
|
|
33624
33711
|
population: 0,
|
|
@@ -33874,7 +33961,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33874
33961
|
}, "evidence")
|
|
33875
33962
|
}), "rankingsService");
|
|
33876
33963
|
|
|
33877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
33878
33965
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
33879
33966
|
id: one.id,
|
|
33880
33967
|
name: one.name,
|
|
@@ -34003,7 +34090,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34003
34090
|
};
|
|
34004
34091
|
}, "searchesService");
|
|
34005
34092
|
|
|
34006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
34007
34094
|
var TAGGING_QUERY = {
|
|
34008
34095
|
entity: "tagging",
|
|
34009
34096
|
backend: "sql",
|
|
@@ -34087,10 +34174,10 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34087
34174
|
};
|
|
34088
34175
|
}, "tagsService");
|
|
34089
34176
|
|
|
34090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34091
|
-
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
34177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
34178
|
+
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
34092
34179
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
34093
|
-
if (title !== void 0 || set !== 1)
|
|
34180
|
+
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
34094
34181
|
return "topic-edit";
|
|
34095
34182
|
if (closed !== void 0)
|
|
34096
34183
|
return closed ? "topic-close" : "topic-reopen";
|
|
@@ -34102,6 +34189,12 @@ var validTitle = /* @__PURE__ */ __name((title) => {
|
|
|
34102
34189
|
if (title.trim() === "" || new TextEncoder().encode(title).byteLength > 128)
|
|
34103
34190
|
throw new CliError("validation_error", "a topic title needs 1\u2013128 UTF-8 bytes");
|
|
34104
34191
|
}, "validTitle");
|
|
34192
|
+
var validIcon = /* @__PURE__ */ __name((icon) => {
|
|
34193
|
+
const emoji = icon.trim();
|
|
34194
|
+
if (emoji === "")
|
|
34195
|
+
throw new CliError("validation_error", "which icon? give an emoji from `topics icons list`");
|
|
34196
|
+
return emoji;
|
|
34197
|
+
}, "validIcon");
|
|
34105
34198
|
var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
34106
34199
|
const online = /* @__PURE__ */ __name(async () => {
|
|
34107
34200
|
if (deps.offline)
|
|
@@ -34117,6 +34210,11 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34117
34210
|
throw new CliError("validation_error", "which topic? give its id, from `topics list`");
|
|
34118
34211
|
return capability(await deps.connection(), "topic", "show a forum topic")(chat, id2);
|
|
34119
34212
|
}, "show"),
|
|
34213
|
+
icons: /* @__PURE__ */ __name(async () => {
|
|
34214
|
+
if (deps.offline)
|
|
34215
|
+
throw new CliError("validation_error", "`topics icons list` asks the messenger; not with --offline");
|
|
34216
|
+
return capability(await deps.connection(), "topicIcons", "list topic icons")();
|
|
34217
|
+
}, "icons"),
|
|
34120
34218
|
enable: /* @__PURE__ */ __name(async (chat, { upgrade }) => {
|
|
34121
34219
|
const connection = await online();
|
|
34122
34220
|
const probe = capability(connection, "forumState", "configure forum topics");
|
|
@@ -34193,8 +34291,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34193
34291
|
forum: true
|
|
34194
34292
|
};
|
|
34195
34293
|
}, "enable"),
|
|
34196
|
-
create: /* @__PURE__ */ __name(async (chat, title, { sendId }) => {
|
|
34294
|
+
create: /* @__PURE__ */ __name(async (chat, title, { sendId, icon: typedIcon }) => {
|
|
34197
34295
|
validTitle(title);
|
|
34296
|
+
const icon = typedIcon === void 0 ? void 0 : validIcon(typedIcon);
|
|
34198
34297
|
const connection = await online();
|
|
34199
34298
|
const create = capability(connection, "createTopic", "create forum topics");
|
|
34200
34299
|
const probe = capability(connection, "forumState", "read forum settings");
|
|
@@ -34209,7 +34308,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34209
34308
|
action: "topic-create",
|
|
34210
34309
|
key: "topics.create",
|
|
34211
34310
|
length: title.length
|
|
34212
|
-
}, () => create(target2, title, { sendId: id2 }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
34311
|
+
}, () => create(target2, title, { sendId: id2, ...icon === void 0 ? {} : { icon } }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
34213
34312
|
const state = await probe(chatId);
|
|
34214
34313
|
if (!state.forum)
|
|
34215
34314
|
throw new CliError("validation_error", "enable topics first with `topics enable`; creating a topic never upgrades a group");
|
|
@@ -34223,8 +34322,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34223
34322
|
}, "create"),
|
|
34224
34323
|
edit: /* @__PURE__ */ __name(async (chat, typedTopic, change) => {
|
|
34225
34324
|
const { title, closed, pinned, hidden } = change;
|
|
34226
|
-
|
|
34227
|
-
|
|
34325
|
+
const icon = change.icon == null ? change.icon : validIcon(change.icon);
|
|
34326
|
+
if ([title, closed, pinned, hidden, icon].every((one) => one === void 0))
|
|
34327
|
+
throw new CliError("validation_error", "nothing to change \u2014 rename, close, reopen, pin, unpin, hide or give an icon");
|
|
34228
34328
|
if (title !== void 0)
|
|
34229
34329
|
validTitle(title);
|
|
34230
34330
|
const topicId = typedTopic.trim();
|
|
@@ -34239,7 +34339,8 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34239
34339
|
...title === void 0 ? {} : { title },
|
|
34240
34340
|
...closed === void 0 ? {} : { closed },
|
|
34241
34341
|
...pinned === void 0 ? {} : { pinned },
|
|
34242
|
-
...hidden === void 0 ? {} : { hidden }
|
|
34342
|
+
...hidden === void 0 ? {} : { hidden },
|
|
34343
|
+
...icon === void 0 ? {} : { icon }
|
|
34243
34344
|
}));
|
|
34244
34345
|
return { operationId, chatId, topic };
|
|
34245
34346
|
}, "edit"),
|
|
@@ -34272,7 +34373,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34272
34373
|
};
|
|
34273
34374
|
}, "topicsService");
|
|
34274
34375
|
|
|
34275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
34276
34377
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
34277
34378
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
34278
34379
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -34346,7 +34447,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
34346
34447
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
34347
34448
|
}, "prepareEvidencePacket");
|
|
34348
34449
|
|
|
34349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
34350
34451
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
34351
34452
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
34352
34453
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -34366,7 +34467,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
34366
34467
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
34367
34468
|
}, "readEvidencePacket");
|
|
34368
34469
|
|
|
34369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
34370
34471
|
var scopeKeys = [
|
|
34371
34472
|
"accountId",
|
|
34372
34473
|
"meetingId",
|
|
@@ -34388,7 +34489,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
34388
34489
|
"maxVocabularyReadBytes"
|
|
34389
34490
|
]);
|
|
34390
34491
|
|
|
34391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
34392
34493
|
var communicationFields = {
|
|
34393
34494
|
sources: pipe(array(strictObject({
|
|
34394
34495
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -34420,7 +34521,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
34420
34521
|
return { ...input, after, before: before2 };
|
|
34421
34522
|
}, "communicationRequest");
|
|
34422
34523
|
|
|
34423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
34424
34525
|
var MEETING_PREPARATION_LIMITS = {
|
|
34425
34526
|
meetings: { min: 1, max: 20, default: 5 },
|
|
34426
34527
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -34493,7 +34594,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
34493
34594
|
};
|
|
34494
34595
|
}, "validateMeetingPreparationRequest");
|
|
34495
34596
|
|
|
34496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
34497
34598
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
34498
34599
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
34499
34600
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -34541,7 +34642,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
34541
34642
|
}
|
|
34542
34643
|
}, "validatePreparationCommunications");
|
|
34543
34644
|
|
|
34544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
34545
34646
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
34546
34647
|
const installer = ports.installer();
|
|
34547
34648
|
const argv = updateCommand(installer, packageName);
|
|
@@ -34606,7 +34707,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
34606
34707
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
34607
34708
|
}, "dayAfter");
|
|
34608
34709
|
|
|
34609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
34610
34711
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
34611
34712
|
const pictures = picturesService(deps);
|
|
34612
34713
|
const base = {
|
|
@@ -34642,9 +34743,9 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
34642
34743
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
34643
34744
|
}, "servicesFor");
|
|
34644
34745
|
|
|
34645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
34646
34747
|
import { createHash as createHash12 } from "node:crypto";
|
|
34647
|
-
import { chmodSync, lstatSync, mkdirSync as
|
|
34748
|
+
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
34648
34749
|
import { createConnection, createServer } from "node:net";
|
|
34649
34750
|
import { tmpdir } from "node:os";
|
|
34650
34751
|
import { dirname as dirname5, isAbsolute as isAbsolute3, join as join11 } from "node:path";
|
|
@@ -34672,7 +34773,7 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
|
|
|
34672
34773
|
return join11("/tmp", name);
|
|
34673
34774
|
}, "relayPath");
|
|
34674
34775
|
var privateDirectory = /* @__PURE__ */ __name((dir) => {
|
|
34675
|
-
|
|
34776
|
+
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
34676
34777
|
const stat4 = lstatSync(dir);
|
|
34677
34778
|
const mine = process.getuid === void 0 || stat4.uid === process.getuid();
|
|
34678
34779
|
if (!stat4.isDirectory() || !mine || (stat4.mode & 63) !== 0) {
|
|
@@ -34863,7 +34964,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
34863
34964
|
}, () => finish({ error: stopped() }));
|
|
34864
34965
|
}), "relayCommand");
|
|
34865
34966
|
|
|
34866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.541.0_@wirecat+cli-base@0.72.0_commander@15.0.0_esbuild@0.28.2_type_5e2b4e61bcb779e86c364517878b6f21/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
34867
34968
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
34868
34969
|
close: /* @__PURE__ */ __name(async () => {
|
|
34869
34970
|
}, "close"),
|
|
@@ -35018,12 +35119,16 @@ export {
|
|
|
35018
35119
|
engineHint,
|
|
35019
35120
|
engineStates,
|
|
35020
35121
|
imageSize,
|
|
35122
|
+
refreshedFiles,
|
|
35123
|
+
downloadMessage,
|
|
35124
|
+
saveFiles,
|
|
35021
35125
|
ATTACHMENT_QUERY,
|
|
35022
35126
|
isRetentionSelection,
|
|
35023
35127
|
REVIEW_DAYS,
|
|
35024
35128
|
UNANSWERED_HOURS,
|
|
35025
35129
|
reviewStart,
|
|
35026
35130
|
kindsOf,
|
|
35131
|
+
messageLinkTarget,
|
|
35027
35132
|
pinLengthHelp,
|
|
35028
35133
|
pinDurationOf,
|
|
35029
35134
|
sendAsCheck,
|
|
@@ -35036,9 +35141,6 @@ export {
|
|
|
35036
35141
|
ADMIN_RIGHTS,
|
|
35037
35142
|
senderIsMe,
|
|
35038
35143
|
MEDIA_KINDS,
|
|
35039
|
-
refreshedFiles,
|
|
35040
|
-
downloadMessage,
|
|
35041
|
-
saveFiles,
|
|
35042
35144
|
searchNotesOf,
|
|
35043
35145
|
SERVER_SEARCH_KEY,
|
|
35044
35146
|
SERVER_BOUNDS,
|
|
@@ -35081,6 +35183,7 @@ export {
|
|
|
35081
35183
|
meetingSearchMeta,
|
|
35082
35184
|
createMeetingSearchCommand,
|
|
35083
35185
|
LIST_QUERY_GUIDE,
|
|
35186
|
+
QUERY_ARGUMENT,
|
|
35084
35187
|
withQuery,
|
|
35085
35188
|
unfilteredQuery,
|
|
35086
35189
|
listQuery,
|