@wirecat/mail-cli 0.6.0 → 0.7.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 +42 -0
- package/README.md +8 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-GBFTKUHA.js → all-profiles-SI67TKZM.js} +6 -6
- package/dist/bundle/{anthropic-PTSCWUG6.js → anthropic-DALMLC3Y.js} +4 -4
- package/dist/bundle/{app-server-5VJ2WCKJ.js → app-server-XOH327Z2.js} +41 -41
- package/dist/bundle/{bun-2KRUBPIN.js → bun-ORL67CJ6.js} +2 -2
- package/dist/bundle/{bun-sqlite-ELSRSJBM.js → bun-sqlite-DGXFNFHI.js} +3 -3
- package/dist/bundle/{chunk-B337KHJ5.js → chunk-23IEVVL2.js} +1 -1
- package/dist/bundle/{chunk-PKU6V4EQ.js → chunk-2M4K7HYR.js} +16 -16
- package/dist/bundle/{chunk-RDSAI6DC.js → chunk-35KD2CI2.js} +349 -254
- package/dist/bundle/{chunk-J4C32YKH.js → chunk-3GZK5GTU.js} +1 -1
- package/dist/bundle/{chunk-OHV5RDFE.js → chunk-3TYEJRMZ.js} +3 -3
- package/dist/bundle/{chunk-AGX7NR3S.js → chunk-45KA5667.js} +12 -12
- package/dist/bundle/{chunk-YBJMBPL7.js → chunk-4NYWHINR.js} +5 -5
- package/dist/bundle/{chunk-JKLQHPED.js → chunk-4ULY3GDL.js} +9 -9
- package/dist/bundle/{chunk-O555ZEQR.js → chunk-5BSEGMNE.js} +3 -3
- package/dist/bundle/{chunk-ZPGLWMNH.js → chunk-5JEYIHS6.js} +3 -3
- package/dist/bundle/{chunk-56PI2BRH.js → chunk-6LK7KTWB.js} +1 -1
- package/dist/bundle/{chunk-ES4PWHBJ.js → chunk-6RMMAUUW.js} +26 -26
- package/dist/bundle/{chunk-TKJDGAHT.js → chunk-6XNPXAJU.js} +31 -25
- package/dist/bundle/{chunk-PBYDT3CG.js → chunk-73OJJGZE.js} +3 -2
- package/dist/bundle/{chunk-WGK4AIRL.js → chunk-7K6KJWTO.js} +11 -11
- package/dist/bundle/{chunk-FIQOBLHS.js → chunk-AP7V256W.js} +1 -1
- package/dist/bundle/{chunk-K5JUROGN.js → chunk-BEMLGWY4.js} +1 -1
- package/dist/bundle/{chunk-P5B7IFOG.js → chunk-BGUMGCUY.js} +1 -1
- package/dist/bundle/{chunk-NZB4WGQS.js → chunk-CAKBG5FC.js} +5 -5
- package/dist/bundle/{chunk-RAZOSYEO.js → chunk-DKQWTQVY.js} +22 -22
- package/dist/bundle/{chunk-TPNC5VCJ.js → chunk-DXGMPMFP.js} +4 -4
- package/dist/bundle/{chunk-5AQKM47C.js → chunk-E3DRM6YP.js} +2 -2
- package/dist/bundle/{chunk-JFJTDL22.js → chunk-EYT33MM3.js} +44 -44
- package/dist/bundle/{chunk-LWTG5UOF.js → chunk-FPOGVDLS.js} +2 -2
- package/dist/bundle/{chunk-5KHJUYHQ.js → chunk-FTFNWGIR.js} +6 -6
- package/dist/bundle/{chunk-4PKHZQIM.js → chunk-GJUUTUK4.js} +7 -7
- package/dist/bundle/{chunk-NOU6MWEM.js → chunk-HFJNEXU7.js} +1 -1
- package/dist/bundle/{chunk-M7V3GSJQ.js → chunk-HV3EIYX4.js} +1 -1
- package/dist/bundle/{chunk-H4VFIH5W.js → chunk-IYZHM3ZN.js} +2 -2
- package/dist/bundle/{chunk-DA46WQEA.js → chunk-JFMUI4H6.js} +1 -1
- package/dist/bundle/{chunk-VF24ZAPX.js → chunk-LZ5J3UXD.js} +3 -3
- package/dist/bundle/{chunk-Y7JKWQC2.js → chunk-M2JCUVCJ.js} +112 -93
- package/dist/bundle/{chunk-KUQYWIVR.js → chunk-MCJ7LKYR.js} +5 -5
- package/dist/bundle/{chunk-XERTHQ6D.js → chunk-MHQKHWCJ.js} +14 -14
- package/dist/bundle/{chunk-VEAP5RVI.js → chunk-MMXMVGA6.js} +6 -6
- package/dist/bundle/{chunk-PHPC72DP.js → chunk-NNIXREJH.js} +5 -5
- package/dist/bundle/{chunk-UAXBLHZK.js → chunk-OHTR4WFO.js} +2 -2
- package/dist/bundle/{chunk-SAZJDKEI.js → chunk-PDL4UREY.js} +6 -6
- package/dist/bundle/{chunk-JLRMSNPX.js → chunk-Q2C3VMSU.js} +2 -0
- package/dist/bundle/{chunk-JIQAFFPV.js → chunk-Q44AYEOB.js} +2 -2
- package/dist/bundle/{chunk-6MV2TBDB.js → chunk-R5MML3FC.js} +51 -47
- package/dist/bundle/{chunk-ZRYFEEXZ.js → chunk-RQVWZBW3.js} +2 -2
- package/dist/bundle/{chunk-3KY7DA5A.js → chunk-S4YUR4S3.js} +426 -336
- package/dist/bundle/{chunk-MD2J3POF.js → chunk-U6UJ3HRS.js} +7 -1
- package/dist/bundle/{chunk-XZGLY2LU.js → chunk-V4TDG4KF.js} +10 -10
- package/dist/bundle/{chunk-ZMMIIBTM.js → chunk-VBOMKZ4E.js} +42 -42
- package/dist/bundle/{chunk-NCWO2FNC.js → chunk-VKPWP3AK.js} +1 -1
- package/dist/bundle/{chunk-O7VK7CJX.js → chunk-VNJMO5F6.js} +2 -2
- package/dist/bundle/{chunk-J5MYH4L5.js → chunk-VSHJWTX5.js} +5 -5
- package/dist/bundle/{chunk-DV4RSEAH.js → chunk-XQJWMBDY.js} +5 -5
- package/dist/bundle/{chunk-JKA2AICL.js → chunk-ZKCNMW7G.js} +1 -1
- package/dist/bundle/{chunk-WCL3WBH5.js → chunk-ZKZABB4K.js} +1 -1
- package/dist/bundle/{chunk-BVIHT7KR.js → chunk-ZNGQ3NZ4.js} +8 -8
- package/dist/bundle/{command-contract-NZF4B5OR.js → command-contract-CB5BII3S.js} +14 -14
- package/dist/bundle/{decode-HVXDCQ63.js → decode-KOBURZIQ.js} +3 -3
- package/dist/bundle/{dist-43DZXMBL.js → dist-T7HMT675.js} +10 -10
- package/dist/bundle/{echarts-LZ74IXHG.js → echarts-LEWTQO6H.js} +2 -2
- package/dist/bundle/{embed-OQF5U2C6.js → embed-PUFE4BSQ.js} +4 -4
- package/dist/bundle/{embedder-OCWQAWKO.js → embedder-3G4BQQ6X.js} +7 -7
- package/dist/bundle/{first-run-MTZPUPGA.js → first-run-FLXOC53U.js} +7 -7
- package/dist/bundle/first-screen-VUZEDSQW.js +32 -0
- package/dist/bundle/{instructions-M6F4FP7U.js → instructions-HGSXDCBT.js} +1 -1
- package/dist/bundle/mail.js +3 -3
- package/dist/bundle/{node-NYBBFHGN.js → node-5Z7PS4F5.js} +2 -2
- package/dist/bundle/{node-sqlite-CWCNWO75.js → node-sqlite-OAW7APIX.js} +3 -3
- package/dist/bundle/{oauth-DVX45EME.js → oauth-ZFZWPAJN.js} +5 -5
- package/dist/bundle/{open-M7EQWWHL.js → open-ZQMBZVH4.js} +2 -2
- package/dist/bundle/{openai-63KRU5H2.js → openai-XT2RIXAK.js} +11 -11
- package/dist/bundle/{process-DV5GQIGM.js → process-VVEQIHPE.js} +1 -1
- package/dist/bundle/{program-EPR3QCMX.js → program-RD3BBDNY.js} +2391 -941
- package/dist/bundle/{prompt-EPWPWTB3.js → prompt-PU7GE4Z4.js} +3 -3
- package/dist/bundle/{recognize-R46KDXK4.js → recognize-AG4A3KUK.js} +2 -2
- package/dist/bundle/{remote-RENCYB5X.js → remote-D6TQ6T7F.js} +5 -5
- package/dist/bundle/{rerank-VHPC5O73.js → rerank-GO24HJPF.js} +5 -5
- package/dist/bundle/{serve-KCH3ORYO.js → serve-WCHJAH6G.js} +7 -7
- package/dist/bundle/server-5KJJ3D6P.js +63 -0
- package/dist/bundle/{server-HZVXSK7B.js → server-CAVNBG3P.js} +33 -33
- package/dist/bundle/{sqlite-runtime-XP7ZJCKJ.js → sqlite-runtime-ANXC4AW2.js} +3 -3
- package/dist/bundle/{state-GQ4MEQJ5.js → state-EGJ66A62.js} +4 -4
- package/dist/bundle/{store-WT7YTR3Y.js → store-OON7FCMQ.js} +12 -12
- package/dist/bundle/{store-CQNLNINW.js → store-SBFA444C.js} +10 -10
- package/dist/bundle/store-maintenance-command-UEOJLYMJ.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 +2 -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/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 +25 -3
- package/dist/providers.d.ts.map +1 -1
- package/dist/providers.js +32 -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 +3 -4
- 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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-45KA5667.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-FTFNWGIR.js";
|
|
28
28
|
import {
|
|
29
29
|
MAX_MODEL_IMAGE_BYTES
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-ZKCNMW7G.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-R5MML3FC.js";
|
|
70
70
|
import {
|
|
71
71
|
isCliFailure
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-ZNGQ3NZ4.js";
|
|
73
73
|
import {
|
|
74
74
|
isNewer,
|
|
75
75
|
updateCommand
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-23IEVVL2.js";
|
|
77
77
|
import {
|
|
78
78
|
remoteKey
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-RQVWZBW3.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-35KD2CI2.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-MCJ7LKYR.js";
|
|
154
155
|
import {
|
|
155
156
|
TASK_KINDS,
|
|
156
157
|
TASK_STATES,
|
|
157
158
|
createTaskService,
|
|
158
159
|
isClosedState
|
|
159
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-MMXMVGA6.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-VBOMKZ4E.js";
|
|
201
202
|
import {
|
|
202
203
|
DEFAULT_STEMMERS,
|
|
203
204
|
createStemmer,
|
|
204
205
|
fold,
|
|
205
206
|
normalize
|
|
206
|
-
} from "./chunk-
|
|
207
|
+
} from "./chunk-GJUUTUK4.js";
|
|
207
208
|
import {
|
|
208
209
|
DEFAULT_TASK_CATEGORIES,
|
|
209
210
|
FALLBACK_CATEGORY
|
|
210
|
-
} from "./chunk-
|
|
211
|
+
} from "./chunk-4NYWHINR.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-CAKBG5FC.js";
|
|
222
223
|
import {
|
|
223
224
|
installFiles,
|
|
224
225
|
megabytes
|
|
225
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-3TYEJRMZ.js";
|
|
226
227
|
import {
|
|
227
228
|
storePath,
|
|
228
229
|
wirecatDirectory
|
|
229
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-Q44AYEOB.js";
|
|
230
231
|
import {
|
|
231
232
|
resolvePaths
|
|
232
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-Q2C3VMSU.js";
|
|
233
234
|
import {
|
|
234
235
|
array,
|
|
235
236
|
boolean,
|
|
@@ -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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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,7 +17386,7 @@ ${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.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/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";
|
|
17390
17391
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
17391
17392
|
const query = defineQuery(registry);
|
|
@@ -17402,9 +17403,19 @@ var unfilteredQuery = /* @__PURE__ */ __name((entity, schema2) => ({
|
|
|
17402
17403
|
backend: "native",
|
|
17403
17404
|
fields: queryFieldsOf(schema2, {})
|
|
17404
17405
|
}), "unfilteredQuery");
|
|
17406
|
+
var withTomorrow = /* @__PURE__ */ __name((query, registry, zone = timezoneOf(), now = Date.now()) => {
|
|
17407
|
+
const times = new Set(registry.fields.filter(({ type }) => type === "time").map(({ name }) => name));
|
|
17408
|
+
const date2 = /* @__PURE__ */ new Date(`${new Intl.DateTimeFormat("en-CA", { timeZone: zone }).format(now)}T00:00:00Z`);
|
|
17409
|
+
date2.setUTCDate(date2.getUTCDate() + 1);
|
|
17410
|
+
const tomorrow = date2.toISOString().slice(0, 10);
|
|
17411
|
+
const day = /* @__PURE__ */ __name((value) => value.toLowerCase() === "tomorrow" ? tomorrow : value, "day");
|
|
17412
|
+
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");
|
|
17413
|
+
return { ...query, root: map(query.root) };
|
|
17414
|
+
}, "withTomorrow");
|
|
17405
17415
|
var listQuery = /* @__PURE__ */ __name((text2, registry, command, { defaultField = "none" } = {}) => {
|
|
17406
17416
|
const context2 = { command, guide: LIST_QUERY_GUIDE };
|
|
17407
|
-
const
|
|
17417
|
+
const parsed = text2.trim() === "" ? void 0 : parseLucene(text2, { defaultField, ...context2 });
|
|
17418
|
+
const typed = parsed && withTomorrow(parsed, registry);
|
|
17408
17419
|
if (typed)
|
|
17409
17420
|
validateQuery(typed, registry, context2);
|
|
17410
17421
|
const named2 = typed ? fieldsNamed(typed) : /* @__PURE__ */ new Set();
|
|
@@ -17501,7 +17512,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17501
17512
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17502
17513
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17503
17514
|
|
|
17504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17505
17516
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17506
17517
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17507
17518
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17510,7 +17521,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17510
17521
|
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
17522
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17512
17523
|
|
|
17513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17514
17525
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17515
17526
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17516
17527
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17772,7 +17783,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17772
17783
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17773
17784
|
}), "sessionAnswer");
|
|
17774
17785
|
|
|
17775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17776
17787
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17777
17788
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17778
17789
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17807,7 +17818,7 @@ var storeIfOpen = /* @__PURE__ */ __name(async (deps) => {
|
|
|
17807
17818
|
var fromStore = /* @__PURE__ */ __name((deps) => deps.offline || deps.reads === "store", "fromStore");
|
|
17808
17819
|
var nothingStored = /* @__PURE__ */ __name((messenger) => `nothing stored for this chat yet \u2014 keep \`${typedCommand(messenger.app.command, "serve")}\` running`, "nothingStored");
|
|
17809
17820
|
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`";
|
|
17821
|
+
var OFFLINE = "--offline answers only from what is kept locally: `chats list|show`, `messages list|show|context|download`, `contacts list|show` and `review`";
|
|
17811
17822
|
var onlineDeps = /* @__PURE__ */ __name((messenger, adapter, guard, where = {}) => ({
|
|
17812
17823
|
messenger,
|
|
17813
17824
|
...where,
|
|
@@ -17837,7 +17848,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17837
17848
|
}), "storedDeps");
|
|
17838
17849
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17839
17850
|
|
|
17840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17851
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17841
17852
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17842
17853
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17843
17854
|
if (key in own)
|
|
@@ -17854,12 +17865,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17854
17865
|
return found.bind(adapter);
|
|
17855
17866
|
}, "capability");
|
|
17856
17867
|
|
|
17857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17858
17869
|
import { randomBytes } from "node:crypto";
|
|
17859
17870
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17860
17871
|
var newOperationId = newSendId;
|
|
17861
17872
|
|
|
17862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
17863
17874
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
17864
17875
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
17865
17876
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -17899,7 +17910,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
17899
17910
|
};
|
|
17900
17911
|
}, "dateWindow");
|
|
17901
17912
|
|
|
17902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
17903
17914
|
var LINKS = /https?:\/\/\S+/g;
|
|
17904
17915
|
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
17916
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -17926,7 +17937,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
17926
17937
|
});
|
|
17927
17938
|
}, "questions");
|
|
17928
17939
|
|
|
17929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
17930
17941
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
17931
17942
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
17932
17943
|
const name = typed.trim().toLowerCase();
|
|
@@ -17976,7 +17987,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
17976
17987
|
return best.name;
|
|
17977
17988
|
}, "categorize");
|
|
17978
17989
|
|
|
17979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
17980
17991
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
17981
17992
|
var RULES_IN = {
|
|
17982
17993
|
dialog: "all",
|
|
@@ -18182,7 +18193,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
18182
18193
|
return passes;
|
|
18183
18194
|
}, "applyTaskRulesToChats");
|
|
18184
18195
|
|
|
18185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
18186
18197
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
18187
18198
|
import { open, stat } from "node:fs/promises";
|
|
18188
18199
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -18384,7 +18395,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
18384
18395
|
return { name, source };
|
|
18385
18396
|
}, "readStickerFile");
|
|
18386
18397
|
|
|
18387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
18388
18399
|
var DAY_MS = 864e5;
|
|
18389
18400
|
var NEW_DAYS = 30;
|
|
18390
18401
|
var SAME_TEXT_MIN = 20;
|
|
@@ -18461,7 +18472,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
18461
18472
|
};
|
|
18462
18473
|
}, "scorePerson");
|
|
18463
18474
|
|
|
18464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18475
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
18465
18476
|
var REGISTRIES = {
|
|
18466
18477
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
18467
18478
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -18546,7 +18557,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
18546
18557
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
18547
18558
|
})), "notCovered");
|
|
18548
18559
|
|
|
18549
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
18550
18561
|
var ACTIVITY_MESSAGES = 1e3;
|
|
18551
18562
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
18552
18563
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -18634,7 +18645,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
18634
18645
|
};
|
|
18635
18646
|
}, "botCheckService");
|
|
18636
18647
|
|
|
18637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
18638
18649
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
18639
18650
|
if (value === void 0)
|
|
18640
18651
|
return void 0;
|
|
@@ -18644,7 +18655,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
18644
18655
|
return id2;
|
|
18645
18656
|
}, "threadIdOf");
|
|
18646
18657
|
|
|
18647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18658
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
18648
18659
|
var TOP_POSTS = 5;
|
|
18649
18660
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
18650
18661
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -18761,7 +18772,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
18761
18772
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
18762
18773
|
}, "median");
|
|
18763
18774
|
|
|
18764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
18765
18776
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
18766
18777
|
const events = [];
|
|
18767
18778
|
for (const stay of stays) {
|
|
@@ -18793,7 +18804,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
18793
18804
|
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
18805
|
}, "memberEvents");
|
|
18795
18806
|
|
|
18796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18797
18808
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18798
18809
|
if (deps.reads !== "store")
|
|
18799
18810
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18940,7 +18951,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18940
18951
|
}
|
|
18941
18952
|
}, "senderAmong");
|
|
18942
18953
|
|
|
18943
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
18944
18955
|
var EVENTS_DAYS = 7;
|
|
18945
18956
|
var TRACKED_DAYS = 30;
|
|
18946
18957
|
var STATS_PAGE = 1e3;
|
|
@@ -19235,7 +19246,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
19235
19246
|
return members.length === 0 ? null : members;
|
|
19236
19247
|
}, "storedMembers");
|
|
19237
19248
|
|
|
19238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
19239
19250
|
var INBOX_CHATS = 20;
|
|
19240
19251
|
var REVIEW_DAYS = 3;
|
|
19241
19252
|
var UNANSWERED_HOURS = 24;
|
|
@@ -19443,7 +19454,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
19443
19454
|
};
|
|
19444
19455
|
}, "inboxService");
|
|
19445
19456
|
|
|
19446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
19447
19458
|
var CONTEXT_MESSAGES = 10;
|
|
19448
19459
|
var CONTEXT_BYTES = 64 * 1024;
|
|
19449
19460
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -19699,10 +19710,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
19699
19710
|
};
|
|
19700
19711
|
}, "personMessages");
|
|
19701
19712
|
|
|
19702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19703
19714
|
import { createHash } from "node:crypto";
|
|
19704
19715
|
|
|
19705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
19706
19717
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
19707
19718
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
19708
19719
|
const parsed = parseMeetingReference(reference);
|
|
@@ -19720,7 +19731,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
19720
19731
|
return { parsed, meeting };
|
|
19721
19732
|
}, "authorizedMeetingMetadata");
|
|
19722
19733
|
|
|
19723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
19724
19735
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
19725
19736
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
19726
19737
|
if (signal?.aborted)
|
|
@@ -19919,7 +19930,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
19919
19930
|
return { ...packet, fingerprint: hash(packet) };
|
|
19920
19931
|
}, "readMeetingEvidence");
|
|
19921
19932
|
|
|
19922
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
19923
19934
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
19924
19935
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
19925
19936
|
const requestedAccounts = options.accountIds;
|
|
@@ -20018,7 +20029,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
20018
20029
|
};
|
|
20019
20030
|
}, "personMeetingContext");
|
|
20020
20031
|
|
|
20021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
20022
20033
|
var PREPARE_BYTES = 96 * 1024;
|
|
20023
20034
|
var MEETINGS = 5;
|
|
20024
20035
|
var CUES = 3;
|
|
@@ -20135,7 +20146,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
20135
20146
|
}
|
|
20136
20147
|
}, "meetingsOf");
|
|
20137
20148
|
|
|
20138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
20139
20150
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
20140
20151
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
20141
20152
|
const held = await storeIfOpen(deps);
|
|
@@ -20205,7 +20216,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
20205
20216
|
complete: false
|
|
20206
20217
|
})), "quiet");
|
|
20207
20218
|
|
|
20208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
20209
20220
|
var TIMELINE_ITEMS = 50;
|
|
20210
20221
|
var TIMELINE_MAX = 500;
|
|
20211
20222
|
var SCOPES = ["personal", "work"];
|
|
@@ -20260,7 +20271,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
20260
20271
|
};
|
|
20261
20272
|
}, "personTimeline");
|
|
20262
20273
|
|
|
20263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
20264
20275
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
20265
20276
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
20266
20277
|
const held = await storeIfOpen(deps);
|
|
@@ -20487,7 +20498,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
20487
20498
|
return rest;
|
|
20488
20499
|
}, "withoutPhone");
|
|
20489
20500
|
|
|
20490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
20491
20502
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
20492
20503
|
const tags = /* @__PURE__ */ new Map();
|
|
20493
20504
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -20496,7 +20507,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
20496
20507
|
return tags;
|
|
20497
20508
|
}, "taskTagFilters");
|
|
20498
20509
|
|
|
20499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
20500
20511
|
var TASK_QUERY = {
|
|
20501
20512
|
entity: "task",
|
|
20502
20513
|
backend: "sql",
|
|
@@ -20681,7 +20692,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
20681
20692
|
...previews ? { previews: await Promise.all(shown.map(({ task: task2 }) => taskView(store, account, task2))) } : {}
|
|
20682
20693
|
};
|
|
20683
20694
|
}), "list"),
|
|
20684
|
-
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}) => inStore(async (store, account) => {
|
|
20695
|
+
add: /* @__PURE__ */ __name((message, type, origin, { category: named2, ...plan } = {}, choice = {}, author = void 0) => inStore(async (store, account) => {
|
|
20685
20696
|
const chosen = named2 === void 0 ? void 0 : await categoryOf(store, named2);
|
|
20686
20697
|
const source = message.trim();
|
|
20687
20698
|
const native = isNoteReference(source);
|
|
@@ -20716,7 +20727,7 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
20716
20727
|
...plan.dueAt ? { due: plan.dueAt } : {}
|
|
20717
20728
|
};
|
|
20718
20729
|
const subject = { account: taskAccount(account), draft };
|
|
20719
|
-
const by = origin === "owner" ? "owner" : { bot: origin };
|
|
20730
|
+
const by = author ?? (origin === "owner" ? "owner" : { bot: origin });
|
|
20720
20731
|
if (choice.attach !== void 0) {
|
|
20721
20732
|
const target2 = await owned(store, account, choice.attach);
|
|
20722
20733
|
const similarity = await store.tasks.compare(subject, target2.id);
|
|
@@ -20976,7 +20987,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
20976
20987
|
};
|
|
20977
20988
|
}, "taskView");
|
|
20978
20989
|
|
|
20979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
20980
20991
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
20981
20992
|
const ids = [...new Set(chatIds)];
|
|
20982
20993
|
if (ids.length === 0)
|
|
@@ -21002,7 +21013,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
21002
21013
|
}));
|
|
21003
21014
|
}, "chatCoverage");
|
|
21004
21015
|
|
|
21005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
21006
21017
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
21007
21018
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
21008
21019
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -21066,7 +21077,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
21066
21077
|
}
|
|
21067
21078
|
}, "validateContextEvidencePage");
|
|
21068
21079
|
|
|
21069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
21070
21081
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
21071
21082
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
21072
21083
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -21119,7 +21130,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
21119
21130
|
};
|
|
21120
21131
|
}, "contextReadBudget");
|
|
21121
21132
|
|
|
21122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
21123
21134
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
21124
21135
|
if (!port || typeof port.read !== "function")
|
|
21125
21136
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -21163,7 +21174,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
21163
21174
|
};
|
|
21164
21175
|
}, "createContextEvidenceReader");
|
|
21165
21176
|
|
|
21166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21177
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
21167
21178
|
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
21179
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
21169
21180
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -21179,18 +21190,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
21179
21190
|
}, "excerpt");
|
|
21180
21191
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
21181
21192
|
|
|
21182
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21183
21194
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
21184
21195
|
|
|
21185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21186
21197
|
import { lstat } from "node:fs/promises";
|
|
21187
21198
|
|
|
21188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21199
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21189
21200
|
import { createHash as createHash3, randomUUID as randomUUID2 } from "node:crypto";
|
|
21190
21201
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
21191
21202
|
import { join as join2 } from "node:path";
|
|
21192
21203
|
|
|
21193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
21194
21205
|
import { createHash as createHash2 } from "node:crypto";
|
|
21195
21206
|
var metadataLimit = 16384;
|
|
21196
21207
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -21250,7 +21261,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
21250
21261
|
}
|
|
21251
21262
|
}, "readPartialMetadata");
|
|
21252
21263
|
|
|
21253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21264
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
21254
21265
|
import { randomUUID } from "node:crypto";
|
|
21255
21266
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
21256
21267
|
import { join } from "node:path";
|
|
@@ -21342,7 +21353,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21342
21353
|
};
|
|
21343
21354
|
}, "partialWriter");
|
|
21344
21355
|
|
|
21345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21346
21357
|
var NativeRecordingPartialStore = class {
|
|
21347
21358
|
static {
|
|
21348
21359
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -21449,12 +21460,12 @@ var NativeRecordingPartialStore = class {
|
|
|
21449
21460
|
}
|
|
21450
21461
|
};
|
|
21451
21462
|
|
|
21452
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21453
21464
|
import { createHash as createHash4 } from "node:crypto";
|
|
21454
21465
|
import { link as link2 } from "node:fs/promises";
|
|
21455
21466
|
import { basename as basename2, dirname as dirname2, join as join4, resolve as resolve2 } from "node:path";
|
|
21456
21467
|
|
|
21457
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
21458
21469
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
21459
21470
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
21460
21471
|
signal?.throwIfAborted();
|
|
@@ -21489,7 +21500,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
21489
21500
|
signal?.throwIfAborted();
|
|
21490
21501
|
}, "commitPublication");
|
|
21491
21502
|
|
|
21492
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
21493
21504
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21494
21505
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
21495
21506
|
import { join as join3 } from "node:path";
|
|
@@ -21562,7 +21573,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
21562
21573
|
}
|
|
21563
21574
|
}, "writePublicationJournal");
|
|
21564
21575
|
|
|
21565
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21566
21577
|
var NativeRecordingPublication = class {
|
|
21567
21578
|
static {
|
|
21568
21579
|
__name(this, "NativeRecordingPublication");
|
|
@@ -21635,7 +21646,7 @@ var NativeRecordingPublication = class {
|
|
|
21635
21646
|
}
|
|
21636
21647
|
};
|
|
21637
21648
|
|
|
21638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
21639
21650
|
import { createHash as createHash5 } from "node:crypto";
|
|
21640
21651
|
import { readdir } from "node:fs/promises";
|
|
21641
21652
|
import { isAbsolute as isAbsolute2, join as join5, resolve as resolve3 } from "node:path";
|
|
@@ -21722,7 +21733,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
21722
21733
|
beforePublish
|
|
21723
21734
|
}), "commitMediaEntry");
|
|
21724
21735
|
|
|
21725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21726
21737
|
var validator = '"media-completed-v1"';
|
|
21727
21738
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
21728
21739
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -21823,7 +21834,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
21823
21834
|
return entry;
|
|
21824
21835
|
}, "archiveMediaFile");
|
|
21825
21836
|
|
|
21826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
21827
21838
|
import { mkdir, realpath } from "node:fs/promises";
|
|
21828
21839
|
import { join as join6, resolve as resolve4 } from "node:path";
|
|
21829
21840
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -21890,7 +21901,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
21890
21901
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
21891
21902
|
}, "withMediaArchiveLocks");
|
|
21892
21903
|
|
|
21893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21894
21905
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
21895
21906
|
if (value === void 0)
|
|
21896
21907
|
return void 0;
|
|
@@ -22043,7 +22054,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
22043
22054
|
}, { create: true });
|
|
22044
22055
|
}, "archiveMedia");
|
|
22045
22056
|
|
|
22046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
22047
22058
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
22048
22059
|
import { basename as basename3, dirname as dirname3, join as join7, resolve as resolve5 } from "node:path";
|
|
22049
22060
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -22196,7 +22207,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
22196
22207
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
22197
22208
|
}, "moveMediaArchive");
|
|
22198
22209
|
|
|
22199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
22200
22211
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
22201
22212
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
22202
22213
|
}, "progress") }) => {
|
|
@@ -22219,7 +22230,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22219
22230
|
}
|
|
22220
22231
|
await nativeRuntime({ env, progress });
|
|
22221
22232
|
progress(`${model.id}: loading it once to check it works`);
|
|
22222
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
22233
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-PUFE4BSQ.js");
|
|
22223
22234
|
const embedder = await openEmbedder2(model, directory2);
|
|
22224
22235
|
try {
|
|
22225
22236
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -22240,7 +22251,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
22240
22251
|
}
|
|
22241
22252
|
await nativeRuntime({ env, progress });
|
|
22242
22253
|
progress(`${model.id}: loading it once to check it works`);
|
|
22243
|
-
const { openReranker } = await import("./rerank-
|
|
22254
|
+
const { openReranker } = await import("./rerank-GO24HJPF.js");
|
|
22244
22255
|
const reranker = await openReranker(model, directory2);
|
|
22245
22256
|
try {
|
|
22246
22257
|
await reranker.score("check", ["check"]);
|
|
@@ -22258,7 +22269,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22258
22269
|
await installFiles(placedImage(model, directory2), { progress });
|
|
22259
22270
|
}
|
|
22260
22271
|
progress(`${model.id}: loading it once to check it works`);
|
|
22261
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22272
|
+
const { openPictureEmbedder } = await import("./embedder-3G4BQQ6X.js");
|
|
22262
22273
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22263
22274
|
try {
|
|
22264
22275
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22270,7 +22281,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22270
22281
|
return { model, directory: directory2 };
|
|
22271
22282
|
}, "downloadImageModel");
|
|
22272
22283
|
|
|
22273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22274
22285
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22275
22286
|
async around(ref, window3) {
|
|
22276
22287
|
const at = parseLocator(ref);
|
|
@@ -22365,7 +22376,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
22365
22376
|
};
|
|
22366
22377
|
}, "storedNeighbours");
|
|
22367
22378
|
|
|
22368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
22369
22380
|
import { createHash as createHash6 } from "node:crypto";
|
|
22370
22381
|
var DAY = 864e5;
|
|
22371
22382
|
var MAX_TIME = 864e13;
|
|
@@ -22681,7 +22692,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
22681
22692
|
return value;
|
|
22682
22693
|
}, "decodeCheckpoint");
|
|
22683
22694
|
|
|
22684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
22685
22696
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
22686
22697
|
var PAGE = 20;
|
|
22687
22698
|
var PEOPLE = 20;
|
|
@@ -23085,7 +23096,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
23085
23096
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
23086
23097
|
}, "peopleOf");
|
|
23087
23098
|
|
|
23088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
23089
23100
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
23090
23101
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
23091
23102
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -23129,7 +23140,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
23129
23140
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
23130
23141
|
}, "matchVocabularyTerms");
|
|
23131
23142
|
|
|
23132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
23133
23144
|
var KINDS = ["project", "tag", "topic"];
|
|
23134
23145
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
23135
23146
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -23184,7 +23195,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23184
23195
|
};
|
|
23185
23196
|
}, "findEvidenceMentions");
|
|
23186
23197
|
|
|
23187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
23188
23199
|
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
23189
23200
|
var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
|
|
23190
23201
|
if (PROJECT_ID.test(reference)) {
|
|
@@ -23350,7 +23361,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23350
23361
|
return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
|
|
23351
23362
|
}, "gatherStoredProject");
|
|
23352
23363
|
|
|
23353
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
23354
23365
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
23355
23366
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
23356
23367
|
if (deps.offline)
|
|
@@ -23422,7 +23433,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
23422
23433
|
};
|
|
23423
23434
|
}, "accountService");
|
|
23424
23435
|
|
|
23425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
23426
23437
|
var MINUTE = 6e4;
|
|
23427
23438
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
23428
23439
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -23441,7 +23452,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
23441
23452
|
return new Date(at - at % MINUTE).toISOString();
|
|
23442
23453
|
}, "sendTime");
|
|
23443
23454
|
|
|
23444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23455
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
23445
23456
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
23446
23457
|
try {
|
|
23447
23458
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -23688,7 +23699,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
23688
23699
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
23689
23700
|
}, "linkLimits");
|
|
23690
23701
|
|
|
23691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
23692
23703
|
var THREADS_PAGE = 500;
|
|
23693
23704
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
23694
23705
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -23767,7 +23778,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
23767
23778
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
23768
23779
|
}, "readMail");
|
|
23769
23780
|
|
|
23770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23781
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
23771
23782
|
var NO_MAIL = "no_mail";
|
|
23772
23783
|
var MAIL = "email";
|
|
23773
23784
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -23814,7 +23825,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
23814
23825
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
23815
23826
|
}, "accountsOfKind");
|
|
23816
23827
|
|
|
23817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
23818
23829
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
23819
23830
|
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
23831
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -24162,7 +24173,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
24162
24173
|
};
|
|
24163
24174
|
}, "statsLucene");
|
|
24164
24175
|
|
|
24165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
24166
24177
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
24167
24178
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
24168
24179
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -24331,7 +24342,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24331
24342
|
};
|
|
24332
24343
|
}, "readRankingSelection");
|
|
24333
24344
|
|
|
24334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
24335
24346
|
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
24347
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
24337
24348
|
command,
|
|
@@ -24341,7 +24352,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
24341
24352
|
fieldsVersion: FIELD_VERSION
|
|
24342
24353
|
}), "searchRecordOf");
|
|
24343
24354
|
|
|
24344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
24345
24356
|
function invalid2(message) {
|
|
24346
24357
|
throw new CliError("validation_error", message);
|
|
24347
24358
|
}
|
|
@@ -24635,7 +24646,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
24635
24646
|
}, "evidence")
|
|
24636
24647
|
}), "adminStatisticsService");
|
|
24637
24648
|
|
|
24638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
24639
24650
|
var DAY2 = 864e5;
|
|
24640
24651
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
24641
24652
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -24877,10 +24888,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24877
24888
|
};
|
|
24878
24889
|
}, "agendaItem");
|
|
24879
24890
|
|
|
24880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24891
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24881
24892
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24882
24893
|
|
|
24883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
24884
24895
|
var REQUEST_MS = 400;
|
|
24885
24896
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
24886
24897
|
const lowest = ranges[0];
|
|
@@ -24903,13 +24914,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
24903
24914
|
};
|
|
24904
24915
|
}, "estimateBackfill");
|
|
24905
24916
|
|
|
24906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
24907
24918
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
24908
24919
|
...error,
|
|
24909
24920
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
24910
24921
|
}), "withRecovery");
|
|
24911
24922
|
|
|
24912
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
24913
24924
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
24914
24925
|
if (isCliFailure(error))
|
|
24915
24926
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -24992,7 +25003,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
24992
25003
|
};
|
|
24993
25004
|
}, "mergeBatches");
|
|
24994
25005
|
|
|
24995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
24996
25007
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
24997
25008
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
24998
25009
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -25015,7 +25026,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
25015
25026
|
}
|
|
25016
25027
|
}, "patiently");
|
|
25017
25028
|
|
|
25018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
25019
25030
|
var CONTEXT_MESSAGES2 = 3;
|
|
25020
25031
|
var CONTEXT_MINUTES = 10;
|
|
25021
25032
|
var MAX_CHARS = 1200;
|
|
@@ -25039,12 +25050,12 @@ var context = {
|
|
|
25039
25050
|
}, "describe")
|
|
25040
25051
|
};
|
|
25041
25052
|
|
|
25042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
25043
25054
|
var BUILT_INS = [context];
|
|
25044
25055
|
var providers = [...BUILT_INS];
|
|
25045
25056
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
25046
25057
|
|
|
25047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
25048
25059
|
var READ_PAGE = 5e3;
|
|
25049
25060
|
var CHAIN = 50;
|
|
25050
25061
|
var CONVERSATION_QUERY = {
|
|
@@ -25196,7 +25207,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
25196
25207
|
return size2;
|
|
25197
25208
|
}, "sized");
|
|
25198
25209
|
|
|
25199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
25200
25211
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
25201
25212
|
var MESSAGE_PAGE = 5e3;
|
|
25202
25213
|
var PER_SESSION = 8;
|
|
@@ -25215,7 +25226,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25215
25226
|
price: remote.price,
|
|
25216
25227
|
installed: true,
|
|
25217
25228
|
perBatch: PER_REQUEST * concurrency,
|
|
25218
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
25229
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-D6TQ6T7F.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
25219
25230
|
};
|
|
25220
25231
|
}
|
|
25221
25232
|
const model = textModel(choice);
|
|
@@ -25232,7 +25243,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
25232
25243
|
if (!isTextModelInstalled(model, directory2))
|
|
25233
25244
|
throw notDownloaded(model.id);
|
|
25234
25245
|
if (apart) {
|
|
25235
|
-
const { openProcess } = await import("./process-
|
|
25246
|
+
const { openProcess } = await import("./process-VVEQIHPE.js");
|
|
25236
25247
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
25237
25248
|
}
|
|
25238
25249
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -25521,7 +25532,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
25521
25532
|
return { ...one, state };
|
|
25522
25533
|
}, "shaped");
|
|
25523
25534
|
|
|
25524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
25525
25536
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
25526
25537
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
25527
25538
|
for (const [key, value, maximum] of [
|
|
@@ -25574,7 +25585,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
25574
25585
|
}
|
|
25575
25586
|
}, "catchUpSearch");
|
|
25576
25587
|
|
|
25577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
25578
25589
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
25579
25590
|
if (deps.reads === "store") {
|
|
25580
25591
|
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 +25906,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
25895
25906
|
return message?.timestamp ?? fallback;
|
|
25896
25907
|
}, "timeOfKey");
|
|
25897
25908
|
|
|
25898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25909
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
25899
25910
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
25900
25911
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
25901
25912
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -26032,12 +26043,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
26032
26043
|
return { plan, repair };
|
|
26033
26044
|
}, "gapsService");
|
|
26034
26045
|
|
|
26035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
26036
26047
|
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";
|
|
26048
|
+
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
26049
|
+
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
26039
26050
|
|
|
26040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
26041
26052
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
26042
26053
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
26043
26054
|
var MAX_FILES = 1e4;
|
|
@@ -26108,15 +26119,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
26108
26119
|
return choices;
|
|
26109
26120
|
}, "directoryPaths");
|
|
26110
26121
|
|
|
26111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26112
26123
|
import { posix } from "node:path";
|
|
26113
26124
|
|
|
26114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26115
26126
|
import { setImmediate as tick } from "node:timers/promises";
|
|
26116
26127
|
import { crc32 } from "node:zlib";
|
|
26117
26128
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
26118
26129
|
|
|
26119
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
26120
26131
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
26121
26132
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
26122
26133
|
var SAMPLE = 65536;
|
|
@@ -26218,7 +26229,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
26218
26229
|
return result.text;
|
|
26219
26230
|
}, "decodeXml");
|
|
26220
26231
|
|
|
26221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
26222
26233
|
var MAX_PART = 10 * 1024 * 1024;
|
|
26223
26234
|
var MAX_ENTRIES = 1e3;
|
|
26224
26235
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -26433,7 +26444,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
26433
26444
|
return found;
|
|
26434
26445
|
}, "elements");
|
|
26435
26446
|
|
|
26436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
26437
26448
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
26438
26449
|
let name = "";
|
|
26439
26450
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -26488,7 +26499,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
26488
26499
|
return { text: parts.join("").trim(), truncated: false };
|
|
26489
26500
|
}, "sheetText");
|
|
26490
26501
|
|
|
26491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
26492
26503
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
26493
26504
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
26494
26505
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26888,10 +26899,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26888
26899
|
}
|
|
26889
26900
|
}, "readDocument");
|
|
26890
26901
|
|
|
26891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26892
26903
|
import { extname as extname3 } from "node:path";
|
|
26893
26904
|
|
|
26894
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26895
26906
|
import { readFileSync } from "node:fs";
|
|
26896
26907
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
26897
26908
|
import { fileURLToPath } from "node:url";
|
|
@@ -26952,7 +26963,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26952
26963
|
}
|
|
26953
26964
|
}, "derived");
|
|
26954
26965
|
|
|
26955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26956
26967
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26957
26968
|
var image2 = {
|
|
26958
26969
|
id: "image",
|
|
@@ -26961,7 +26972,7 @@ var image2 = {
|
|
|
26961
26972
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26962
26973
|
};
|
|
26963
26974
|
|
|
26964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26965
26976
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26966
26977
|
var doc = {
|
|
26967
26978
|
id: "doc",
|
|
@@ -26973,7 +26984,7 @@ var doc = {
|
|
|
26973
26984
|
}), "read")
|
|
26974
26985
|
};
|
|
26975
26986
|
|
|
26976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26987
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26977
26988
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26978
26989
|
var docx = {
|
|
26979
26990
|
id: "docx",
|
|
@@ -26986,7 +26997,7 @@ var docx = {
|
|
|
26986
26997
|
}), "read")
|
|
26987
26998
|
};
|
|
26988
26999
|
|
|
26989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26990
27001
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26991
27002
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26992
27003
|
"fonttbl",
|
|
@@ -27162,7 +27173,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
27162
27173
|
}, "htmlText");
|
|
27163
27174
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
27164
27175
|
|
|
27165
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
27166
27177
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
27167
27178
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
27168
27179
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -27218,7 +27229,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
27218
27229
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
27219
27230
|
}, "markdownSections");
|
|
27220
27231
|
|
|
27221
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
27222
27233
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
27223
27234
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
27224
27235
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -27289,7 +27300,7 @@ var html = {
|
|
|
27289
27300
|
}, "read")
|
|
27290
27301
|
};
|
|
27291
27302
|
|
|
27292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27303
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
27293
27304
|
var office = {
|
|
27294
27305
|
id: "office",
|
|
27295
27306
|
version: documentExtractor("odt"),
|
|
@@ -27300,7 +27311,7 @@ var office = {
|
|
|
27300
27311
|
}, "read")
|
|
27301
27312
|
};
|
|
27302
27313
|
|
|
27303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
27304
27315
|
var pdf = {
|
|
27305
27316
|
id: "pdf",
|
|
27306
27317
|
version: "unpdf",
|
|
@@ -27367,7 +27378,7 @@ var pdf = {
|
|
|
27367
27378
|
}), "read")
|
|
27368
27379
|
};
|
|
27369
27380
|
|
|
27370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
27371
27382
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
27372
27383
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
27373
27384
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -27387,7 +27398,7 @@ var plain = {
|
|
|
27387
27398
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
27388
27399
|
};
|
|
27389
27400
|
|
|
27390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
27391
27402
|
var rtf = {
|
|
27392
27403
|
id: "rtf",
|
|
27393
27404
|
version: "v1",
|
|
@@ -27395,10 +27406,10 @@ var rtf = {
|
|
|
27395
27406
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
27396
27407
|
};
|
|
27397
27408
|
|
|
27398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27399
27410
|
import { basename as basename5 } from "node:path";
|
|
27400
27411
|
|
|
27401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
27402
27413
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
27403
27414
|
const cells = [];
|
|
27404
27415
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -27436,7 +27447,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
27436
27447
|
return { cells, truncated };
|
|
27437
27448
|
}, "delimitedSpans");
|
|
27438
27449
|
|
|
27439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
27440
27451
|
var DELIMITED = {
|
|
27441
27452
|
".csv": ",",
|
|
27442
27453
|
".tsv": " ",
|
|
@@ -27475,7 +27486,7 @@ var sheets = {
|
|
|
27475
27486
|
}, "read")
|
|
27476
27487
|
};
|
|
27477
27488
|
|
|
27478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
27479
27490
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
27480
27491
|
var HEAD_BYTES = 1024;
|
|
27481
27492
|
var readers = [...BUILT_INS2];
|
|
@@ -27485,7 +27496,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
27485
27496
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
27486
27497
|
}, "readWithRegistry");
|
|
27487
27498
|
|
|
27488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
27489
27500
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
27490
27501
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
27491
27502
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -28564,7 +28575,7 @@ function imageSize(input) {
|
|
|
28564
28575
|
}
|
|
28565
28576
|
__name(imageSize, "imageSize");
|
|
28566
28577
|
|
|
28567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
28568
28579
|
var MAX_PAGES = 20;
|
|
28569
28580
|
var MAX_PIXELS = 2e7;
|
|
28570
28581
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28715,7 +28726,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28715
28726
|
}
|
|
28716
28727
|
}, "ocrPdf");
|
|
28717
28728
|
|
|
28718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28719
28730
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28720
28731
|
const limits = pdfPreviewLimits(env);
|
|
28721
28732
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -28792,7 +28803,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28792
28803
|
}
|
|
28793
28804
|
}, "pdfPreview");
|
|
28794
28805
|
|
|
28795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28806
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28796
28807
|
import { createHash as createHash8 } from "node:crypto";
|
|
28797
28808
|
import { constants } from "node:fs";
|
|
28798
28809
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -28900,7 +28911,121 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28900
28911
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28901
28912
|
}, "transferMime");
|
|
28902
28913
|
|
|
28903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
28915
|
+
import { createWriteStream, mkdirSync } from "node:fs";
|
|
28916
|
+
import { link as link3, rm } from "node:fs/promises";
|
|
28917
|
+
import { join as join10, resolve as resolve6 } from "node:path";
|
|
28918
|
+
import { Readable, Transform } from "node:stream";
|
|
28919
|
+
import { pipeline } from "node:stream/promises";
|
|
28920
|
+
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
28921
|
+
{
|
|
28922
|
+
kind,
|
|
28923
|
+
providerRef,
|
|
28924
|
+
...name === void 0 ? {} : { name },
|
|
28925
|
+
...position === void 0 ? {} : { position }
|
|
28926
|
+
}
|
|
28927
|
+
]), "refreshedFiles");
|
|
28928
|
+
var recordPaths = /* @__PURE__ */ __name(async (messages, chat, message, files, saved, warn, onFailure) => {
|
|
28929
|
+
const downloaded = saved.map((one, index) => ({
|
|
28930
|
+
kind: one.kind,
|
|
28931
|
+
path: one.path,
|
|
28932
|
+
...files[index]?.name === void 0 ? {} : { name: files[index]?.name },
|
|
28933
|
+
...files[index]?.position === void 0 ? {} : { position: files[index]?.position },
|
|
28934
|
+
...files[index]?.providerRef === void 0 ? {} : { providerRef: files[index]?.providerRef }
|
|
28935
|
+
}));
|
|
28936
|
+
try {
|
|
28937
|
+
const kept = await messages.keepDownloaded(chat, message, downloaded);
|
|
28938
|
+
if (kept < downloaded.length && downloaded.some(({ providerRef }) => Object.keys(providerRef ?? {}).length > 0))
|
|
28939
|
+
warn(`message ${message}: a new file reference from the messenger was not saved; the next download asks again`);
|
|
28940
|
+
return kept;
|
|
28941
|
+
} catch (error) {
|
|
28942
|
+
onFailure?.(error);
|
|
28943
|
+
warn(`not recorded in the local store where message ${message}'s files went: ${error.message}`);
|
|
28944
|
+
return 0;
|
|
28945
|
+
}
|
|
28946
|
+
}, "recordPaths");
|
|
28947
|
+
var downloadMessage = /* @__PURE__ */ __name(async (messages, chat, message, output, warn) => {
|
|
28948
|
+
const { files } = await messages.download(chat, message);
|
|
28949
|
+
mkdirSync(output, { recursive: true });
|
|
28950
|
+
const result = await saveFiles(messages, chat, message, files, output, { unique: true, warn });
|
|
28951
|
+
if (result.batch.failed > 0)
|
|
28952
|
+
throw new CliError("provider_error", "some attachments failed; completed downloads are retained", {
|
|
28953
|
+
batch: result.batch,
|
|
28954
|
+
saved: result.saved
|
|
28955
|
+
});
|
|
28956
|
+
return result.saved;
|
|
28957
|
+
}, "downloadMessage");
|
|
28958
|
+
var saveFiles = /* @__PURE__ */ __name(async (messages, chat, message, files, output, { unique = false, warn, onSaved, batch = batchProgress() }) => {
|
|
28959
|
+
const saved = [];
|
|
28960
|
+
const successful = [];
|
|
28961
|
+
for (const [index, file] of files.entries()) {
|
|
28962
|
+
if (batch.stopped)
|
|
28963
|
+
break;
|
|
28964
|
+
try {
|
|
28965
|
+
const one = await save(file, output, `${message}-${index + 1}`, { unique });
|
|
28966
|
+
saved.push(one);
|
|
28967
|
+
successful.push(file);
|
|
28968
|
+
batch.ok();
|
|
28969
|
+
onSaved?.(one);
|
|
28970
|
+
} catch (error) {
|
|
28971
|
+
const issue = batch.fail(message, "download", error, (file.position ?? index) + 1);
|
|
28972
|
+
warn(`message ${message}, attachment ${(file.position ?? index) + 1}: ${issue.code} \u2014 ${issue.message}`);
|
|
28973
|
+
}
|
|
28974
|
+
}
|
|
28975
|
+
await recordPaths(messages, chat, message, successful, saved, warn, (error) => batch.fail(message, "record_downloads", error));
|
|
28976
|
+
return { saved, batch: batch.result() };
|
|
28977
|
+
}, "saveFiles");
|
|
28978
|
+
var EXTENSIONS = {
|
|
28979
|
+
"image/jpeg": "jpg",
|
|
28980
|
+
"image/png": "png",
|
|
28981
|
+
"image/webp": "webp",
|
|
28982
|
+
"image/gif": "gif",
|
|
28983
|
+
"video/mp4": "mp4",
|
|
28984
|
+
"video/webm": "webm",
|
|
28985
|
+
"audio/mpeg": "mp3",
|
|
28986
|
+
"audio/ogg": "ogg",
|
|
28987
|
+
"audio/mp4": "m4a",
|
|
28988
|
+
"application/pdf": "pdf"
|
|
28989
|
+
};
|
|
28990
|
+
var BY_KIND = { photo: "jpg" };
|
|
28991
|
+
var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { unique = false } = {}) => {
|
|
28992
|
+
const own = safeName(file.name);
|
|
28993
|
+
const fileName = /* @__PURE__ */ __name(() => {
|
|
28994
|
+
const extension = EXTENSIONS[file.mime ?? ""] ?? BY_KIND[file.kind];
|
|
28995
|
+
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
28996
|
+
}, "fileName");
|
|
28997
|
+
const partial = join10(directory2, `.${fileName()}.${process.pid}.part`);
|
|
28998
|
+
let bytes2 = 0;
|
|
28999
|
+
const counting = new Transform({
|
|
29000
|
+
transform(chunk, _encoding, done2) {
|
|
29001
|
+
bytes2 += chunk.length;
|
|
29002
|
+
done2(null, chunk);
|
|
29003
|
+
}
|
|
29004
|
+
});
|
|
29005
|
+
try {
|
|
29006
|
+
await pipeline(Readable.from(file.bytes()), counting, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
29007
|
+
const name = fileName();
|
|
29008
|
+
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
29009
|
+
for (const candidate of names2) {
|
|
29010
|
+
const path2 = resolve6(join10(directory2, candidate));
|
|
29011
|
+
const taken = await link3(partial, path2).then(() => false, (error) => {
|
|
29012
|
+
if (error.code === "EEXIST")
|
|
29013
|
+
return true;
|
|
29014
|
+
throw error;
|
|
29015
|
+
});
|
|
29016
|
+
if (!taken)
|
|
29017
|
+
return { kind: file.kind, path: path2, bytes: bytes2 };
|
|
29018
|
+
}
|
|
29019
|
+
const path = resolve6(join10(directory2, names2.at(-1) ?? name));
|
|
29020
|
+
if (unique)
|
|
29021
|
+
return { kind: file.kind, path, bytes: bytes2, existing: true };
|
|
29022
|
+
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
29023
|
+
} finally {
|
|
29024
|
+
await rm(partial, { force: true });
|
|
29025
|
+
}
|
|
29026
|
+
}, "save");
|
|
29027
|
+
|
|
29028
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28904
29029
|
var ATTACHMENT_QUERY = {
|
|
28905
29030
|
entity: "attachment",
|
|
28906
29031
|
backend: "sql",
|
|
@@ -29255,6 +29380,48 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29255
29380
|
...preview
|
|
29256
29381
|
};
|
|
29257
29382
|
}, "show"),
|
|
29383
|
+
saveHeld: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, output }) => {
|
|
29384
|
+
if (attachment2 !== void 0 && (!Number.isSafeInteger(attachment2) || attachment2 < 1))
|
|
29385
|
+
throw new CliError("validation_error", "attachment must be a position from 1");
|
|
29386
|
+
const store = await accountStore(deps);
|
|
29387
|
+
const { account } = store;
|
|
29388
|
+
const { chatId, messageId } = await messageOf(deps, store, chat, message);
|
|
29389
|
+
const ref = formatLocator({ ...account, chat: chatId, message: messageId });
|
|
29390
|
+
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
29391
|
+
if (files.length === 0)
|
|
29392
|
+
throw new CliError("not_found", `the local store holds no file of ${ref}`);
|
|
29393
|
+
const chosen = attachment2 === void 0 ? files : files.filter(({ position }) => position === attachment2 - 1);
|
|
29394
|
+
if (chosen.length === 0)
|
|
29395
|
+
throw new CliError("not_found", `${ref} has no file at position ${attachment2}; its files are at ${files.map(({ position }) => position + 1).join(", ")}`);
|
|
29396
|
+
const env = deps.env ?? process.env;
|
|
29397
|
+
const held = await Promise.all(chosen.map(async (file) => {
|
|
29398
|
+
const missing4 = new CliError("not_found", `file ${file.position + 1} of ${ref} is not saved on this computer; run messages download without --offline`);
|
|
29399
|
+
if (file.localPath === null)
|
|
29400
|
+
throw missing4;
|
|
29401
|
+
if (refusedPlace(file.localPath, deps.messenger.app, env))
|
|
29402
|
+
throw new CliError("validation_error", "cannot copy known credential files, the WireCat apps' own files or the message store");
|
|
29403
|
+
const found = await lstat4(file.localPath).catch(() => void 0);
|
|
29404
|
+
if (!found)
|
|
29405
|
+
throw missing4;
|
|
29406
|
+
if (!found.isFile())
|
|
29407
|
+
throw new CliError("validation_error", "the saved attachment must be a regular file");
|
|
29408
|
+
return { file, path: file.localPath };
|
|
29409
|
+
}));
|
|
29410
|
+
mkdirSync2(output, { recursive: true });
|
|
29411
|
+
const saved = [];
|
|
29412
|
+
for (const { file, path } of held)
|
|
29413
|
+
saved.push(await save({
|
|
29414
|
+
kind: file.kind,
|
|
29415
|
+
...file.name === null ? {} : { name: file.name },
|
|
29416
|
+
...file.mime === null ? {} : { mime: file.mime },
|
|
29417
|
+
position: file.position,
|
|
29418
|
+
bytes: /* @__PURE__ */ __name(async function* () {
|
|
29419
|
+
const handle = await open6(path, constants2.O_RDONLY | (constants2.O_NOFOLLOW ?? 0));
|
|
29420
|
+
yield* handle.createReadStream();
|
|
29421
|
+
}, "bytes")
|
|
29422
|
+
}, output, `${messageId}-${file.position + 1}`));
|
|
29423
|
+
return saved;
|
|
29424
|
+
}, "saveHeld"),
|
|
29258
29425
|
setText: /* @__PURE__ */ __name(async ({ chat, message, attachment: attachment2, text: text2 }) => {
|
|
29259
29426
|
if (text2.trim() === "")
|
|
29260
29427
|
throw new CliError("validation_error", "the text is empty \u2014 nothing to keep");
|
|
@@ -29281,7 +29448,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29281
29448
|
}, "setText")
|
|
29282
29449
|
}), "attachmentsService");
|
|
29283
29450
|
|
|
29284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
29285
29452
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
29286
29453
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
29287
29454
|
const store = await accountStore(deps);
|
|
@@ -29311,7 +29478,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29311
29478
|
}, "list")
|
|
29312
29479
|
}), "chatDocumentsService");
|
|
29313
29480
|
|
|
29314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
29315
29482
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
29316
29483
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
29317
29484
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -29398,7 +29565,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
29398
29565
|
}
|
|
29399
29566
|
}, "isRetentionSelection");
|
|
29400
29567
|
|
|
29401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
29402
29569
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
29403
29570
|
const fields = text2.split(",").map((one) => one.trim());
|
|
29404
29571
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -29605,7 +29772,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29605
29772
|
};
|
|
29606
29773
|
}, "countersService");
|
|
29607
29774
|
|
|
29608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29609
29776
|
var SYNC_KEY = "messages.sync-first";
|
|
29610
29777
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29611
29778
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29737,7 +29904,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29737
29904
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29738
29905
|
}), "withRefresh");
|
|
29739
29906
|
|
|
29740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29741
29908
|
var CANDIDATES = 50;
|
|
29742
29909
|
var WORD_HITS = 200;
|
|
29743
29910
|
var RRF_K = 60;
|
|
@@ -30012,13 +30179,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
30012
30179
|
return mean.map((value) => value / length);
|
|
30013
30180
|
}, "meanOf");
|
|
30014
30181
|
|
|
30015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
30016
30183
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
30017
30184
|
...embeddingsMaintenance(deps),
|
|
30018
30185
|
...embeddingsSearch(deps)
|
|
30019
30186
|
}), "embeddingsService");
|
|
30020
30187
|
|
|
30021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
30022
30189
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
30023
30190
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
30024
30191
|
if (deps.offline)
|
|
@@ -30159,7 +30326,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
30159
30326
|
};
|
|
30160
30327
|
}, "foldersService");
|
|
30161
30328
|
|
|
30162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
30163
30330
|
var REVIEW_COUNT = 500;
|
|
30164
30331
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
30165
30332
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -30238,7 +30405,14 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
30238
30405
|
};
|
|
30239
30406
|
}, "mentionsService");
|
|
30240
30407
|
|
|
30241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
30409
|
+
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
30410
|
+
position,
|
|
30411
|
+
kind,
|
|
30412
|
+
...name === void 0 ? {} : { name },
|
|
30413
|
+
url: null,
|
|
30414
|
+
reason: "unsupported_provider"
|
|
30415
|
+
})), "fileLinks");
|
|
30242
30416
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
30243
30417
|
if (isLocator(reference)) {
|
|
30244
30418
|
if (message !== void 0)
|
|
@@ -30285,7 +30459,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
30285
30459
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
30286
30460
|
}, "validatePermalink");
|
|
30287
30461
|
|
|
30288
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
30289
30463
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
30290
30464
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
30291
30465
|
return `${seconds / 86400}d`;
|
|
@@ -30317,7 +30491,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
30317
30491
|
return seconds;
|
|
30318
30492
|
}, "pinDurationOf");
|
|
30319
30493
|
|
|
30320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30494
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
30321
30495
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
30322
30496
|
if (sendAs === void 0) {
|
|
30323
30497
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -30342,7 +30516,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
30342
30516
|
return sendAs;
|
|
30343
30517
|
}, "typedSendAs");
|
|
30344
30518
|
|
|
30345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
30346
30520
|
var TOTAL_CAP = 1e4;
|
|
30347
30521
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
30348
30522
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -30353,7 +30527,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
30353
30527
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
30354
30528
|
}, "totalOf");
|
|
30355
30529
|
|
|
30356
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
30357
30531
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
30358
30532
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
30359
30533
|
let narrows = false;
|
|
@@ -30382,7 +30556,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
30382
30556
|
return wanted(root).join(" ").trim();
|
|
30383
30557
|
}, "meaningWords");
|
|
30384
30558
|
|
|
30385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
30386
30560
|
var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
30387
30561
|
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
30562
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -30497,7 +30671,7 @@ function planQuestion(text2, strict = false) {
|
|
|
30497
30671
|
}
|
|
30498
30672
|
__name(planQuestion, "planQuestion");
|
|
30499
30673
|
|
|
30500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
30501
30675
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
30502
30676
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
30503
30677
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30690,7 +30864,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30690
30864
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
30691
30865
|
}, "signals");
|
|
30692
30866
|
|
|
30693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30694
30868
|
var MEANING_DEPTH = 100;
|
|
30695
30869
|
var RRF_K2 = 60;
|
|
30696
30870
|
var RERANK_DEPTH = 50;
|
|
@@ -31018,7 +31192,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
31018
31192
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
31019
31193
|
}, "mixedWithReranker");
|
|
31020
31194
|
|
|
31021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
31022
31196
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
31023
31197
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
31024
31198
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -31217,7 +31391,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
31217
31391
|
return result;
|
|
31218
31392
|
}, "readThreadContext");
|
|
31219
31393
|
|
|
31220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31394
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
31221
31395
|
var SEARCH_FILL_MS = 200;
|
|
31222
31396
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
31223
31397
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -31284,12 +31458,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
31284
31458
|
}, "accountOf");
|
|
31285
31459
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
31286
31460
|
|
|
31287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31288
31462
|
import { createHash as createHash10 } from "node:crypto";
|
|
31289
31463
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
31290
31464
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
31291
31465
|
|
|
31292
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31466
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
31293
31467
|
var GROUP_SETTINGS = [
|
|
31294
31468
|
"allCanPin",
|
|
31295
31469
|
"onlyAdminsAdd",
|
|
@@ -31303,121 +31477,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
31303
31477
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
31304
31478
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
31305
31479
|
|
|
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
|
|
31480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31421
31481
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
31422
31482
|
var PICTURE_FLOOR = 0.25;
|
|
31423
31483
|
var PAGE4 = 50;
|
|
@@ -31434,7 +31494,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31434
31494
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31435
31495
|
if (!isImageModelInstalled(model2, directory2))
|
|
31436
31496
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31437
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31497
|
+
const { openPictureEmbedder } = await import("./embedder-3G4BQQ6X.js");
|
|
31438
31498
|
return openPictureEmbedder(model2, directory2);
|
|
31439
31499
|
}, "open");
|
|
31440
31500
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31631,7 +31691,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31631
31691
|
}, "search")
|
|
31632
31692
|
}), "withPictures");
|
|
31633
31693
|
|
|
31634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
31635
31695
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
31636
31696
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
31637
31697
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31680,7 +31740,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31680
31740
|
}
|
|
31681
31741
|
}, "meaningLane");
|
|
31682
31742
|
|
|
31683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31743
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31684
31744
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31685
31745
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31686
31746
|
if (choice === "off")
|
|
@@ -31692,9 +31752,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31692
31752
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31693
31753
|
try {
|
|
31694
31754
|
const warm = deps.embedders;
|
|
31695
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31755
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-VVEQIHPE.js")).openRerankerProcess(model, directory2, {
|
|
31696
31756
|
threads: defaultThreads()
|
|
31697
|
-
})) : await (await import("./rerank-
|
|
31757
|
+
})) : await (await import("./rerank-GO24HJPF.js")).openReranker(model, directory2);
|
|
31698
31758
|
return {
|
|
31699
31759
|
model: model.id,
|
|
31700
31760
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31714,17 +31774,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31714
31774
|
};
|
|
31715
31775
|
}, "rerankLane");
|
|
31716
31776
|
|
|
31717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31718
31778
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
31719
31779
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
31720
31780
|
const directory2 = imageModelsDirectory(env);
|
|
31721
31781
|
if (!isImageModelInstalled(model, directory2))
|
|
31722
31782
|
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-
|
|
31783
|
+
const { openPictureEmbedder } = await import("./embedder-3G4BQQ6X.js");
|
|
31724
31784
|
return openPictureEmbedder(model, directory2);
|
|
31725
31785
|
}, "openPictureEmbedderFor");
|
|
31726
31786
|
|
|
31727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31728
31788
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
31729
31789
|
const metadata = note.frontMatter;
|
|
31730
31790
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31739,7 +31799,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
31739
31799
|
};
|
|
31740
31800
|
}, "documentSource");
|
|
31741
31801
|
|
|
31742
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31743
31803
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31744
31804
|
let root;
|
|
31745
31805
|
try {
|
|
@@ -31766,7 +31826,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
31766
31826
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31767
31827
|
}, "titleTiers");
|
|
31768
31828
|
|
|
31769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31829
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31770
31830
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
31771
31831
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
31772
31832
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -32176,7 +32236,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
32176
32236
|
};
|
|
32177
32237
|
}, "searchNotesOf");
|
|
32178
32238
|
|
|
32179
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
32180
32240
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
32181
32241
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
32182
32242
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -32288,7 +32348,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
32288
32348
|
};
|
|
32289
32349
|
}, "searchEvents");
|
|
32290
32350
|
|
|
32291
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
32292
32352
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
32293
32353
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
32294
32354
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -32357,6 +32417,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32357
32417
|
from: hit.email?.from ? { name: hit.email.from.name ?? hit.email.from.address, ref: hit.email.from.ref } : { name: hit.senderName, ref: null },
|
|
32358
32418
|
senderIsMe: senderIsMe(hit, at.account),
|
|
32359
32419
|
...hit.email ? { email: hit.email } : {},
|
|
32420
|
+
attachments: hitFiles(hit.attachments),
|
|
32360
32421
|
foundBy
|
|
32361
32422
|
};
|
|
32362
32423
|
}, "itemOf");
|
|
@@ -32496,7 +32557,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
32496
32557
|
};
|
|
32497
32558
|
}, "searchAll");
|
|
32498
32559
|
|
|
32499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
32500
32561
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
32501
32562
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
32502
32563
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32589,7 +32650,8 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, que
|
|
|
32589
32650
|
meetingId: hit.meetingId,
|
|
32590
32651
|
scope: hit.scope,
|
|
32591
32652
|
id: hit.id,
|
|
32592
|
-
startMs: hit.startMs
|
|
32653
|
+
startMs: hit.startMs,
|
|
32654
|
+
...hit.scope === "transcript" && hit.ref !== void 0 ? { cueRef: hit.ref, speakerName: hit.speakerName ?? null } : {}
|
|
32593
32655
|
}
|
|
32594
32656
|
});
|
|
32595
32657
|
if (collected.items.length > request.limit) {
|
|
@@ -32743,7 +32805,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
32743
32805
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32744
32806
|
}, "searchAllOfSource");
|
|
32745
32807
|
|
|
32746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32747
32809
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32748
32810
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
32749
32811
|
var DEFAULT_BACKEND = "both";
|
|
@@ -32932,8 +32994,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32932
32994
|
return { report, sources };
|
|
32933
32995
|
}, "searchServer");
|
|
32934
32996
|
|
|
32935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32936
32998
|
var DELETE_AT_ONCE = 10;
|
|
32999
|
+
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
33000
|
+
const files = fileLinks(attachments);
|
|
33001
|
+
return files.length > 0 ? { files } : {};
|
|
33002
|
+
}, "filesOf");
|
|
32937
33003
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
32938
33004
|
const { guard } = deps;
|
|
32939
33005
|
const inStore = /* @__PURE__ */ __name(async (read) => read(await deps.store(), await deps.account()), "inStore");
|
|
@@ -33083,13 +33149,15 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33083
33149
|
const store = await deps.store();
|
|
33084
33150
|
const chat2 = await readChatId(deps, target2.chat, store, account);
|
|
33085
33151
|
const found2 = await store.messages.around(account, chat2, target2.message, { before: 0, after: 0 });
|
|
33086
|
-
|
|
33152
|
+
const held2 = found2.find((item) => item.id === target2.message && item.chatId === chat2);
|
|
33153
|
+
if (!held2)
|
|
33087
33154
|
throw new CliError("not_found", "no such message in this account's stored chat");
|
|
33088
33155
|
return {
|
|
33089
33156
|
locator: formatLocator({ ...account, chat: chat2, message: target2.message }),
|
|
33090
33157
|
url: null,
|
|
33091
33158
|
access: "unavailable",
|
|
33092
|
-
reason: deps.offline ? "offline" : "unsupported_provider"
|
|
33159
|
+
reason: deps.offline ? "offline" : "unsupported_provider",
|
|
33160
|
+
...filesOf(held2)
|
|
33093
33161
|
};
|
|
33094
33162
|
}
|
|
33095
33163
|
const connection = await deps.connection();
|
|
@@ -33097,20 +33165,27 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33097
33165
|
throw new CliError("authentication_error", "the connected account differs from the recorded profile; refresh the session before linking");
|
|
33098
33166
|
const { id: chat } = await connection.resolve(target2.chat);
|
|
33099
33167
|
const locator = formatLocator({ ...account, chat, message: target2.message });
|
|
33100
|
-
if (connection.permalink)
|
|
33101
|
-
|
|
33168
|
+
if (connection.permalink) {
|
|
33169
|
+
const permalink = validatePermalink(await connection.permalink(chat, target2.message));
|
|
33170
|
+
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);
|
|
33171
|
+
return { locator, ...permalink, ...held2 ? filesOf(held2) : {} };
|
|
33172
|
+
}
|
|
33102
33173
|
const found = await capability(connection, "around", "read a message")(chat, target2.message, {
|
|
33103
33174
|
before: 0,
|
|
33104
33175
|
after: 0
|
|
33105
33176
|
});
|
|
33106
|
-
|
|
33177
|
+
const held = found.find((item) => item.id === target2.message && item.chatId === chat);
|
|
33178
|
+
if (!held)
|
|
33107
33179
|
throw new CliError("not_found", "no such message in this chat");
|
|
33108
|
-
return { locator, url: null, access: "unavailable", reason: "unsupported_provider" };
|
|
33180
|
+
return { locator, url: null, access: "unavailable", reason: "unsupported_provider", ...filesOf(held) };
|
|
33109
33181
|
}, "link"),
|
|
33110
|
-
download: /* @__PURE__ */ __name(async (
|
|
33182
|
+
download: /* @__PURE__ */ __name(async (reference, message) => {
|
|
33183
|
+
const target2 = messageLinkTarget(reference, message, deps.messenger.provider);
|
|
33184
|
+
if (target2.account !== void 0 && target2.account !== (await deps.account()).account)
|
|
33185
|
+
throw new CliError("validation_error", "that locator belongs to another account; select its profile first");
|
|
33111
33186
|
const connection = await deps.connection();
|
|
33112
33187
|
const download = capability(connection, "download", "download attachments");
|
|
33113
|
-
return download((await connection.resolve(chat)).id, message);
|
|
33188
|
+
return download((await connection.resolve(target2.chat)).id, target2.message);
|
|
33114
33189
|
}, "download"),
|
|
33115
33190
|
keepDownloaded: /* @__PURE__ */ __name((chat, message, files) => inStore(async (store, account) => {
|
|
33116
33191
|
const chatId = await storedChatId(deps.messenger, chat, store, account).catch(() => void 0) ?? (await (await deps.connection()).resolve(chat)).id;
|
|
@@ -33358,7 +33433,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
33358
33433
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
33359
33434
|
}, "checkMediaOptions");
|
|
33360
33435
|
|
|
33361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
33362
33437
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
33363
33438
|
var RULES = {
|
|
33364
33439
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -33373,7 +33448,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
33373
33448
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
33374
33449
|
}), "classifyChannel");
|
|
33375
33450
|
|
|
33376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
33377
33452
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
33378
33453
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
33379
33454
|
const store = await deps.store();
|
|
@@ -33459,7 +33534,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
33459
33534
|
};
|
|
33460
33535
|
}, "metadataService");
|
|
33461
33536
|
|
|
33462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
33463
33538
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
33464
33539
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
33465
33540
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -33496,7 +33571,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
33496
33571
|
return { chatId, rows, notes };
|
|
33497
33572
|
}, "moderateWith");
|
|
33498
33573
|
|
|
33499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33574
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
33500
33575
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
33501
33576
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
33502
33577
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -33574,7 +33649,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
33574
33649
|
}, "removePerson")
|
|
33575
33650
|
}), "moderatorOf");
|
|
33576
33651
|
|
|
33577
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
33578
33653
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
33579
33654
|
id: note.id,
|
|
33580
33655
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -33618,7 +33693,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
33618
33693
|
};
|
|
33619
33694
|
}, "privatePeopleService");
|
|
33620
33695
|
|
|
33621
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33696
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
33622
33697
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
33623
33698
|
total: 0,
|
|
33624
33699
|
population: 0,
|
|
@@ -33874,7 +33949,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33874
33949
|
}, "evidence")
|
|
33875
33950
|
}), "rankingsService");
|
|
33876
33951
|
|
|
33877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
33878
33953
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
33879
33954
|
id: one.id,
|
|
33880
33955
|
name: one.name,
|
|
@@ -34003,7 +34078,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34003
34078
|
};
|
|
34004
34079
|
}, "searchesService");
|
|
34005
34080
|
|
|
34006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34081
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
34007
34082
|
var TAGGING_QUERY = {
|
|
34008
34083
|
entity: "tagging",
|
|
34009
34084
|
backend: "sql",
|
|
@@ -34087,10 +34162,10 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34087
34162
|
};
|
|
34088
34163
|
}, "tagsService");
|
|
34089
34164
|
|
|
34090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34091
|
-
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
34165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
34166
|
+
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
34092
34167
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
34093
|
-
if (title !== void 0 || set !== 1)
|
|
34168
|
+
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
34094
34169
|
return "topic-edit";
|
|
34095
34170
|
if (closed !== void 0)
|
|
34096
34171
|
return closed ? "topic-close" : "topic-reopen";
|
|
@@ -34102,6 +34177,12 @@ var validTitle = /* @__PURE__ */ __name((title) => {
|
|
|
34102
34177
|
if (title.trim() === "" || new TextEncoder().encode(title).byteLength > 128)
|
|
34103
34178
|
throw new CliError("validation_error", "a topic title needs 1\u2013128 UTF-8 bytes");
|
|
34104
34179
|
}, "validTitle");
|
|
34180
|
+
var validIcon = /* @__PURE__ */ __name((icon) => {
|
|
34181
|
+
const emoji = icon.trim();
|
|
34182
|
+
if (emoji === "")
|
|
34183
|
+
throw new CliError("validation_error", "which icon? give an emoji from `topics icons list`");
|
|
34184
|
+
return emoji;
|
|
34185
|
+
}, "validIcon");
|
|
34105
34186
|
var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
34106
34187
|
const online = /* @__PURE__ */ __name(async () => {
|
|
34107
34188
|
if (deps.offline)
|
|
@@ -34117,6 +34198,11 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34117
34198
|
throw new CliError("validation_error", "which topic? give its id, from `topics list`");
|
|
34118
34199
|
return capability(await deps.connection(), "topic", "show a forum topic")(chat, id2);
|
|
34119
34200
|
}, "show"),
|
|
34201
|
+
icons: /* @__PURE__ */ __name(async () => {
|
|
34202
|
+
if (deps.offline)
|
|
34203
|
+
throw new CliError("validation_error", "`topics icons list` asks the messenger; not with --offline");
|
|
34204
|
+
return capability(await deps.connection(), "topicIcons", "list topic icons")();
|
|
34205
|
+
}, "icons"),
|
|
34120
34206
|
enable: /* @__PURE__ */ __name(async (chat, { upgrade }) => {
|
|
34121
34207
|
const connection = await online();
|
|
34122
34208
|
const probe = capability(connection, "forumState", "configure forum topics");
|
|
@@ -34193,8 +34279,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34193
34279
|
forum: true
|
|
34194
34280
|
};
|
|
34195
34281
|
}, "enable"),
|
|
34196
|
-
create: /* @__PURE__ */ __name(async (chat, title, { sendId }) => {
|
|
34282
|
+
create: /* @__PURE__ */ __name(async (chat, title, { sendId, icon: typedIcon }) => {
|
|
34197
34283
|
validTitle(title);
|
|
34284
|
+
const icon = typedIcon === void 0 ? void 0 : validIcon(typedIcon);
|
|
34198
34285
|
const connection = await online();
|
|
34199
34286
|
const create = capability(connection, "createTopic", "create forum topics");
|
|
34200
34287
|
const probe = capability(connection, "forumState", "read forum settings");
|
|
@@ -34209,7 +34296,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34209
34296
|
action: "topic-create",
|
|
34210
34297
|
key: "topics.create",
|
|
34211
34298
|
length: title.length
|
|
34212
|
-
}, () => create(target2, title, { sendId: id2 }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
34299
|
+
}, () => create(target2, title, { sendId: id2, ...icon === void 0 ? {} : { icon } }), (done2) => ({ threadId: done2.id, resultChatId: target2 }), async () => {
|
|
34213
34300
|
const state = await probe(chatId);
|
|
34214
34301
|
if (!state.forum)
|
|
34215
34302
|
throw new CliError("validation_error", "enable topics first with `topics enable`; creating a topic never upgrades a group");
|
|
@@ -34223,8 +34310,9 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34223
34310
|
}, "create"),
|
|
34224
34311
|
edit: /* @__PURE__ */ __name(async (chat, typedTopic, change) => {
|
|
34225
34312
|
const { title, closed, pinned, hidden } = change;
|
|
34226
|
-
|
|
34227
|
-
|
|
34313
|
+
const icon = change.icon == null ? change.icon : validIcon(change.icon);
|
|
34314
|
+
if ([title, closed, pinned, hidden, icon].every((one) => one === void 0))
|
|
34315
|
+
throw new CliError("validation_error", "nothing to change \u2014 rename, close, reopen, pin, unpin, hide or give an icon");
|
|
34228
34316
|
if (title !== void 0)
|
|
34229
34317
|
validTitle(title);
|
|
34230
34318
|
const topicId = typedTopic.trim();
|
|
@@ -34239,7 +34327,8 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34239
34327
|
...title === void 0 ? {} : { title },
|
|
34240
34328
|
...closed === void 0 ? {} : { closed },
|
|
34241
34329
|
...pinned === void 0 ? {} : { pinned },
|
|
34242
|
-
...hidden === void 0 ? {} : { hidden }
|
|
34330
|
+
...hidden === void 0 ? {} : { hidden },
|
|
34331
|
+
...icon === void 0 ? {} : { icon }
|
|
34243
34332
|
}));
|
|
34244
34333
|
return { operationId, chatId, topic };
|
|
34245
34334
|
}, "edit"),
|
|
@@ -34272,7 +34361,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
34272
34361
|
};
|
|
34273
34362
|
}, "topicsService");
|
|
34274
34363
|
|
|
34275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
34276
34365
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
34277
34366
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
34278
34367
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -34346,7 +34435,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
34346
34435
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
34347
34436
|
}, "prepareEvidencePacket");
|
|
34348
34437
|
|
|
34349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34438
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
34350
34439
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
34351
34440
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
34352
34441
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -34366,7 +34455,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
34366
34455
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
34367
34456
|
}, "readEvidencePacket");
|
|
34368
34457
|
|
|
34369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
34370
34459
|
var scopeKeys = [
|
|
34371
34460
|
"accountId",
|
|
34372
34461
|
"meetingId",
|
|
@@ -34388,7 +34477,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
34388
34477
|
"maxVocabularyReadBytes"
|
|
34389
34478
|
]);
|
|
34390
34479
|
|
|
34391
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
34392
34481
|
var communicationFields = {
|
|
34393
34482
|
sources: pipe(array(strictObject({
|
|
34394
34483
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -34420,7 +34509,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
34420
34509
|
return { ...input, after, before: before2 };
|
|
34421
34510
|
}, "communicationRequest");
|
|
34422
34511
|
|
|
34423
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
34424
34513
|
var MEETING_PREPARATION_LIMITS = {
|
|
34425
34514
|
meetings: { min: 1, max: 20, default: 5 },
|
|
34426
34515
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -34493,7 +34582,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
34493
34582
|
};
|
|
34494
34583
|
}, "validateMeetingPreparationRequest");
|
|
34495
34584
|
|
|
34496
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
34497
34586
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
34498
34587
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
34499
34588
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -34541,7 +34630,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
34541
34630
|
}
|
|
34542
34631
|
}, "validatePreparationCommunications");
|
|
34543
34632
|
|
|
34544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34633
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
34545
34634
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
34546
34635
|
const installer = ports.installer();
|
|
34547
34636
|
const argv = updateCommand(installer, packageName);
|
|
@@ -34606,7 +34695,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
34606
34695
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
34607
34696
|
}, "dayAfter");
|
|
34608
34697
|
|
|
34609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
34610
34699
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
34611
34700
|
const pictures = picturesService(deps);
|
|
34612
34701
|
const base = {
|
|
@@ -34642,9 +34731,9 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
34642
34731
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
34643
34732
|
}, "servicesFor");
|
|
34644
34733
|
|
|
34645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
34646
34735
|
import { createHash as createHash12 } from "node:crypto";
|
|
34647
|
-
import { chmodSync, lstatSync, mkdirSync as
|
|
34736
|
+
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
34648
34737
|
import { createConnection, createServer } from "node:net";
|
|
34649
34738
|
import { tmpdir } from "node:os";
|
|
34650
34739
|
import { dirname as dirname5, isAbsolute as isAbsolute3, join as join11 } from "node:path";
|
|
@@ -34672,7 +34761,7 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
|
|
|
34672
34761
|
return join11("/tmp", name);
|
|
34673
34762
|
}, "relayPath");
|
|
34674
34763
|
var privateDirectory = /* @__PURE__ */ __name((dir) => {
|
|
34675
|
-
|
|
34764
|
+
mkdirSync3(dir, { recursive: true, mode: 448 });
|
|
34676
34765
|
const stat4 = lstatSync(dir);
|
|
34677
34766
|
const mine = process.getuid === void 0 || stat4.uid === process.getuid();
|
|
34678
34767
|
if (!stat4.isDirectory() || !mine || (stat4.mode & 63) !== 0) {
|
|
@@ -34863,7 +34952,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
34863
34952
|
}, () => finish({ error: stopped() }));
|
|
34864
34953
|
}), "relayCommand");
|
|
34865
34954
|
|
|
34866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.537.0_@wirecat+cli-base@0.71.0_commander@15.0.0_esbuild@0.28.2_type_e3a3074c051d1ca759b7e8b914e3af6d/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
34867
34956
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
34868
34957
|
close: /* @__PURE__ */ __name(async () => {
|
|
34869
34958
|
}, "close"),
|
|
@@ -35018,12 +35107,16 @@ export {
|
|
|
35018
35107
|
engineHint,
|
|
35019
35108
|
engineStates,
|
|
35020
35109
|
imageSize,
|
|
35110
|
+
refreshedFiles,
|
|
35111
|
+
downloadMessage,
|
|
35112
|
+
saveFiles,
|
|
35021
35113
|
ATTACHMENT_QUERY,
|
|
35022
35114
|
isRetentionSelection,
|
|
35023
35115
|
REVIEW_DAYS,
|
|
35024
35116
|
UNANSWERED_HOURS,
|
|
35025
35117
|
reviewStart,
|
|
35026
35118
|
kindsOf,
|
|
35119
|
+
messageLinkTarget,
|
|
35027
35120
|
pinLengthHelp,
|
|
35028
35121
|
pinDurationOf,
|
|
35029
35122
|
sendAsCheck,
|
|
@@ -35036,9 +35129,6 @@ export {
|
|
|
35036
35129
|
ADMIN_RIGHTS,
|
|
35037
35130
|
senderIsMe,
|
|
35038
35131
|
MEDIA_KINDS,
|
|
35039
|
-
refreshedFiles,
|
|
35040
|
-
downloadMessage,
|
|
35041
|
-
saveFiles,
|
|
35042
35132
|
searchNotesOf,
|
|
35043
35133
|
SERVER_SEARCH_KEY,
|
|
35044
35134
|
SERVER_BOUNDS,
|