@wirecat/mail-cli 0.29.0 → 0.31.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 +31 -0
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/{all-profiles-Q4E2LPB4.js → all-profiles-XL62TNUO.js} +19 -29
- package/dist/bundle/{anthropic-S3N4JDJU.js → anthropic-3MSWVYCE.js} +2 -2
- package/dist/bundle/{app-server-E44CAPPI.js → app-server-RRNR5XFA.js} +45 -60
- package/dist/bundle/{bun-RDYA5FCZ.js → bun-E3F3PEQQ.js} +2 -2
- package/dist/bundle/{bun-sqlite-FPVHKI24.js → bun-sqlite-UOFN77LO.js} +3 -3
- package/dist/bundle/{chunk-KBTVVHFP.js → chunk-3CJ4C6BB.js} +12 -12
- package/dist/bundle/{chunk-KTLJ6F2B.js → chunk-3V6J7VPF.js} +3 -3
- package/dist/bundle/{chunk-44IAJV2T.js → chunk-4BW5JACS.js} +16 -16
- package/dist/bundle/{chunk-UQZJ2GFQ.js → chunk-4ME2NHNJ.js} +2 -2
- package/dist/bundle/{chunk-NUHUTJTM.js → chunk-5YRR52NH.js} +1 -1
- package/dist/bundle/{chunk-ZIFB6KGQ.js → chunk-6UOUDIXL.js} +1575 -945
- package/dist/bundle/{chunk-WZNQ2P7H.js → chunk-7E7YXQ52.js} +1307 -1307
- package/dist/bundle/{chunk-45ET53MO.js → chunk-BKRIIZPV.js} +2 -2
- package/dist/bundle/{chunk-TXDA437R.js → chunk-BNP7WLDQ.js} +1 -1
- package/dist/bundle/{chunk-W32UQL5I.js → chunk-BS6WYCNZ.js} +32 -22
- package/dist/bundle/{chunk-WSHPLO4Q.js → chunk-BXMLIKUM.js} +147 -391
- package/dist/bundle/{chunk-BPHLFSUO.js → chunk-D6D6JLXG.js} +16 -16
- package/dist/bundle/{chunk-YRER6N3Y.js → chunk-DCR3IWC7.js} +38 -47
- package/dist/bundle/{chunk-KSFPMRH6.js → chunk-DDCDOBZS.js} +1 -1
- package/dist/bundle/{chunk-DMW6J2P3.js → chunk-DPDS6IZJ.js} +1 -1
- package/dist/bundle/{chunk-5PDWUD3W.js → chunk-DWBY7DMF.js} +1 -1
- package/dist/bundle/{chunk-IZEK7JI7.js → chunk-DZSS2IUK.js} +18 -2
- package/dist/bundle/{chunk-UUM7AF32.js → chunk-E3IOR37T.js} +2 -2
- package/dist/bundle/{chunk-5ZJ6IHVE.js → chunk-EMVLCION.js} +1 -1
- package/dist/bundle/{chunk-IKTBM64M.js → chunk-EV5SR3OC.js} +7 -7
- package/dist/bundle/{chunk-D4QALV67.js → chunk-FRXDSR45.js} +1 -1
- package/dist/bundle/{chunk-BDWOTD7E.js → chunk-FYP2M6IT.js} +80 -80
- package/dist/bundle/{chunk-ATJANIQR.js → chunk-GWKGZOSO.js} +2 -2
- package/dist/bundle/{chunk-MVGFB7IS.js → chunk-GXBNTKJW.js} +2 -2
- package/dist/bundle/{chunk-Z5D6CRY6.js → chunk-GZLCZU5B.js} +322 -11
- package/dist/bundle/{chunk-ZPVVSA5R.js → chunk-H2QTUZ3C.js} +1 -1
- package/dist/bundle/{chunk-FHQ32JKS.js → chunk-HZCINHHS.js} +1 -1
- package/dist/bundle/{chunk-7AO73MJZ.js → chunk-HZL3X4XR.js} +15 -15
- package/dist/bundle/{chunk-HKC6ZJA5.js → chunk-I3BQ2QIY.js} +12 -12
- package/dist/bundle/{chunk-PCYTU7HS.js → chunk-I5Y6Y7Q5.js} +1 -1
- package/dist/bundle/{chunk-7E4KECG4.js → chunk-ITU6K7LU.js} +1 -1
- package/dist/bundle/{chunk-RGIEG4XK.js → chunk-JLIVJSCF.js} +1 -1
- package/dist/bundle/{chunk-3AH7UEM6.js → chunk-JYGFEMTR.js} +1 -1
- package/dist/bundle/{chunk-3RBUACSJ.js → chunk-KPFB2VUY.js} +762 -353
- package/dist/bundle/{chunk-FOZXPSHA.js → chunk-LGDJDD5J.js} +3 -3
- package/dist/bundle/{chunk-2MTIGJHQ.js → chunk-MS5XYEYW.js} +14 -9
- package/dist/bundle/{chunk-DIOHJT2W.js → chunk-NEJU74O4.js} +6 -6
- package/dist/bundle/{chunk-FDGCTY6J.js → chunk-NUN7DBR4.js} +9 -9
- package/dist/bundle/{chunk-6B2BBL35.js → chunk-NV3WPD3B.js} +5 -5
- package/dist/bundle/{chunk-NWA7JS74.js → chunk-NYQPKZWL.js} +633 -370
- package/dist/bundle/{chunk-RFM3AAK5.js → chunk-OP5ZLH53.js} +57 -54
- package/dist/bundle/{chunk-VXHL3XI6.js → chunk-OXHQNEXU.js} +98 -6
- package/dist/bundle/{chunk-ODPYXNHI.js → chunk-P6CYVOL6.js} +1 -1
- package/dist/bundle/{chunk-YAQGWHMH.js → chunk-PIXFZZUZ.js} +6 -6
- package/dist/bundle/{chunk-KNTAOY5J.js → chunk-PZL7DHVJ.js} +7 -7
- package/dist/bundle/{chunk-MT5KDBOM.js → chunk-QANXOKYQ.js} +5 -5
- package/dist/bundle/{chunk-UH7FYLFL.js → chunk-QSXJ2BVQ.js} +4 -4
- package/dist/bundle/{chunk-VERUQQZS.js → chunk-QVGCHTTU.js} +10 -10
- package/dist/bundle/{chunk-PYOM4J73.js → chunk-S2QO6KUI.js} +2 -2
- package/dist/bundle/{chunk-7ESXP4TG.js → chunk-SQA5JI7Q.js} +1 -1
- package/dist/bundle/{chunk-PIKOQWTL.js → chunk-T72DWT37.js} +4 -4
- package/dist/bundle/{chunk-YSR2XBDO.js → chunk-THZHNCJP.js} +3 -3
- package/dist/bundle/{chunk-XEMARUGS.js → chunk-TUXNILKR.js} +7 -7
- package/dist/bundle/{chunk-FM4B357N.js → chunk-UFMR2TB3.js} +2 -2
- package/dist/bundle/{chunk-OLTJB5PW.js → chunk-WZGFC7D5.js} +1 -1
- package/dist/bundle/{command-contract-TMLXLGVT.js → command-contract-YRNKDQDL.js} +15 -15
- package/dist/bundle/{command-server-entry-PFUR2W7X.js → command-server-entry-A3FCP24M.js} +21 -21
- package/dist/bundle/{decode-SIVT4JWX.js → decode-FI2ISRNZ.js} +2 -2
- package/dist/bundle/{dist-YWSF5MHP.js → dist-NLOOZJ64.js} +15 -11
- package/dist/bundle/{echarts-CABLIXX7.js → echarts-PMAJUJFE.js} +2 -2
- package/dist/bundle/{embed-OHENS6RB.js → embed-OIMT6SAX.js} +3 -3
- package/dist/bundle/{embedder-JINT4Y4O.js → embedder-Q5IF5WIM.js} +6 -6
- package/dist/bundle/{first-run-LU2MAK2B.js → first-run-4L53QWOT.js} +6 -6
- package/dist/bundle/first-screen-ZPQLAAIS.js +34 -0
- package/dist/bundle/{instructions-3D22PA4T.js → instructions-ZJGGGXOA.js} +1 -1
- package/dist/bundle/mail.js +2 -2
- package/dist/bundle/{node-42G4RGMW.js → node-DCSOHRD6.js} +2 -2
- package/dist/bundle/{node-sqlite-KQZM5M3N.js → node-sqlite-7F77K5JA.js} +4 -4
- package/dist/bundle/{oauth-7BNCNKQV.js → oauth-LVPMEN6M.js} +4 -4
- package/dist/bundle/{open-ULOQOP7K.js → open-XM5LWEN6.js} +2 -2
- package/dist/bundle/{openai-O5AH6VGT.js → openai-H2LCGK22.js} +12 -12
- package/dist/bundle/{process-6D767IDN.js → process-MFC5VSPT.js} +1 -1
- package/dist/bundle/{program-OE7MFRMJ.js → program-ZQ43ZYKZ.js} +1327 -1089
- package/dist/bundle/{prompt-WN7EBVKT.js → prompt-3LZAZNQ4.js} +2 -2
- package/dist/bundle/{recognize-IX33XEXZ.js → recognize-GYQMHFY2.js} +1 -1
- package/dist/bundle/{remote-22N3FQUC.js → remote-P2MD5G64.js} +6 -6
- package/dist/bundle/{rerank-IGX4EFA2.js → rerank-A5X6THV6.js} +4 -4
- package/dist/bundle/{serve-XWIRR2QZ.js → serve-IEC3EUKS.js} +6 -6
- package/dist/bundle/{server-DBS4WC6T.js → server-3REPXFNI.js} +43 -41
- package/dist/bundle/server-E2QTFURI.js +67 -0
- package/dist/bundle/{sqlite-runtime-WFBTXXXJ.js → sqlite-runtime-AOLQGC5J.js} +3 -3
- package/dist/bundle/{state-4J5ERHJA.js → state-D3P5IXXA.js} +3 -3
- package/dist/bundle/{store-YRBX7XLM.js → store-DIN6OY3K.js} +13 -13
- package/dist/bundle/{store-YSP2NPRJ.js → store-MZCQXBVW.js} +19 -15
- package/dist/bundle/store-maintenance-command-UMVFI6M6.js +58 -0
- package/dist/commands/rules.d.ts.map +1 -1
- package/dist/commands/rules.js +73 -22
- package/dist/commands/rules.js.map +1 -1
- package/dist/mail/rules/apply.d.ts.map +1 -1
- package/dist/mail/rules/apply.js +1 -9
- package/dist/mail/rules/apply.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-VFRI6RF7.js +0 -76
- package/dist/bundle/first-screen-KZNLKRRQ.js +0 -34
- package/dist/bundle/server-D5OTVERP.js +0 -68
- package/dist/bundle/store-maintenance-command-SH6IB7S6.js +0 -58
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3CJ4C6BB.js";
|
|
12
12
|
import {
|
|
13
13
|
MAX_ACTIONS,
|
|
14
14
|
ModerationRules,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
someUndone,
|
|
22
22
|
validateFormattedText,
|
|
23
23
|
visibleFormattedText
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PIXFZZUZ.js";
|
|
25
25
|
import {
|
|
26
26
|
EmptyAnswer,
|
|
27
27
|
MAX_MODEL_IMAGE_BYTES,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
range,
|
|
31
31
|
systemFor,
|
|
32
32
|
validateImages
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-E3IOR37T.js";
|
|
34
34
|
import {
|
|
35
35
|
Command,
|
|
36
36
|
CustomTextModelShape,
|
|
@@ -79,13 +79,13 @@ import {
|
|
|
79
79
|
textModels,
|
|
80
80
|
vectorModelKey,
|
|
81
81
|
writeTextModelsSection
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-BXMLIKUM.js";
|
|
83
83
|
import {
|
|
84
84
|
CEILING_KEY,
|
|
85
85
|
keyForWrite,
|
|
86
86
|
levelFor,
|
|
87
87
|
skipFlagFor
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-MS5XYEYW.js";
|
|
89
89
|
import {
|
|
90
90
|
isNewer,
|
|
91
91
|
updateCommand
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
validateAst,
|
|
146
146
|
validateFields,
|
|
147
147
|
withoutField
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-6UOUDIXL.js";
|
|
149
149
|
import {
|
|
150
150
|
COUNTER_FIELDS,
|
|
151
151
|
MESSAGE_PARSING,
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
rankingOptions,
|
|
171
171
|
rankingQuestion,
|
|
172
172
|
searchError
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-7E7YXQ52.js";
|
|
174
174
|
import {
|
|
175
175
|
LOG_ATTRIBUTES,
|
|
176
176
|
TASK_KINDS,
|
|
@@ -190,11 +190,12 @@ import {
|
|
|
190
190
|
logAttributes,
|
|
191
191
|
sameAs,
|
|
192
192
|
sourceOf,
|
|
193
|
-
sourceOf2,
|
|
193
|
+
sourceOf3 as sourceOf2,
|
|
194
194
|
typedCommand,
|
|
195
195
|
withAttempt
|
|
196
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-FYP2M6IT.js";
|
|
197
197
|
import {
|
|
198
|
+
BACKENDS,
|
|
198
199
|
EVENT_QUERY,
|
|
199
200
|
INTERNAL_NOTES,
|
|
200
201
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -208,6 +209,7 @@ import {
|
|
|
208
209
|
dateRange,
|
|
209
210
|
dayBoundary,
|
|
210
211
|
defineQuery,
|
|
212
|
+
event,
|
|
211
213
|
eventItem,
|
|
212
214
|
exportMeeting,
|
|
213
215
|
fieldsHelp,
|
|
@@ -229,12 +231,13 @@ import {
|
|
|
229
231
|
liftMeetingFields,
|
|
230
232
|
listed,
|
|
231
233
|
meetingCueFingerprint,
|
|
232
|
-
|
|
234
|
+
meetingDetailsBody,
|
|
233
235
|
meetingHitsList,
|
|
234
236
|
meetingPeople,
|
|
237
|
+
meetingShowThrough,
|
|
235
238
|
meetingSummaryAnswer,
|
|
236
239
|
meetingTranscriptAnswer,
|
|
237
|
-
|
|
240
|
+
meetingsListThrough,
|
|
238
241
|
meetingsQuery,
|
|
239
242
|
normalizeTag,
|
|
240
243
|
parseLocator,
|
|
@@ -246,46 +249,49 @@ import {
|
|
|
246
249
|
pull,
|
|
247
250
|
queryError,
|
|
248
251
|
queryFieldsOf,
|
|
252
|
+
rangeOf,
|
|
249
253
|
readMeetingProjectEvidence,
|
|
254
|
+
serviceCallsOf,
|
|
250
255
|
strongRecordingValidator,
|
|
251
256
|
timezoneOf,
|
|
252
257
|
validateMeetingHitSearch,
|
|
253
258
|
validateMeetingPassage,
|
|
254
259
|
validateQuery,
|
|
255
260
|
walkQuery,
|
|
261
|
+
windowOf,
|
|
256
262
|
zonedMoment
|
|
257
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-KPFB2VUY.js";
|
|
258
264
|
import {
|
|
259
265
|
isCliFailure,
|
|
260
266
|
sqliteCode
|
|
261
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-5YRR52NH.js";
|
|
262
268
|
import {
|
|
263
269
|
DEFAULT_STEMMERS,
|
|
264
270
|
createStemmer
|
|
265
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-EV5SR3OC.js";
|
|
266
272
|
import {
|
|
267
273
|
fold,
|
|
268
274
|
normalize
|
|
269
|
-
} from "./chunk-
|
|
275
|
+
} from "./chunk-FRXDSR45.js";
|
|
270
276
|
import {
|
|
271
277
|
localOnly,
|
|
272
278
|
refuseOffComputer,
|
|
273
279
|
remoteKey
|
|
274
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-PZL7DHVJ.js";
|
|
275
281
|
import {
|
|
276
282
|
PLAIN_HTTP_REFUSED,
|
|
277
283
|
endpoint,
|
|
278
284
|
endpointFetch,
|
|
279
285
|
modelAddressAllowed,
|
|
280
286
|
onThisComputer
|
|
281
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-DWBY7DMF.js";
|
|
282
288
|
import {
|
|
283
289
|
DEFAULT_TASK_CATEGORIES,
|
|
284
290
|
FALLBACK_CATEGORY,
|
|
285
291
|
readSharedSection,
|
|
286
292
|
sharedConfigPath,
|
|
287
293
|
writeSharedSection
|
|
288
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-GZLCZU5B.js";
|
|
289
295
|
import {
|
|
290
296
|
Unzip,
|
|
291
297
|
UnzipInflate,
|
|
@@ -296,15 +302,15 @@ import {
|
|
|
296
302
|
placedText,
|
|
297
303
|
runEmbedders,
|
|
298
304
|
textModelsDirectory
|
|
299
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-QANXOKYQ.js";
|
|
300
306
|
import {
|
|
301
307
|
installFiles,
|
|
302
308
|
megabytes
|
|
303
|
-
} from "./chunk-
|
|
309
|
+
} from "./chunk-LGDJDD5J.js";
|
|
304
310
|
import {
|
|
305
311
|
storePath,
|
|
306
312
|
wirecatDirectory
|
|
307
|
-
} from "./chunk-
|
|
313
|
+
} from "./chunk-BNP7WLDQ.js";
|
|
308
314
|
import {
|
|
309
315
|
Credentials,
|
|
310
316
|
logRecordOf,
|
|
@@ -16965,10 +16971,10 @@ var require_lib3 = __commonJS({
|
|
|
16965
16971
|
}
|
|
16966
16972
|
});
|
|
16967
16973
|
|
|
16968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16969
16975
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16970
16976
|
|
|
16971
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16972
16978
|
var RULES_VERSION = 5;
|
|
16973
16979
|
var LOOK_BACK = 50;
|
|
16974
16980
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17058,7 +17064,7 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
17058
17064
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17059
17065
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17060
17066
|
|
|
17061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
17062
17068
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
17063
17069
|
import { open, stat } from "node:fs/promises";
|
|
17064
17070
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17272,10 +17278,10 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17272
17278
|
return { name, source };
|
|
17273
17279
|
}, "readStickerFile");
|
|
17274
17280
|
|
|
17275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17276
17282
|
import { randomUUID } from "node:crypto";
|
|
17277
17283
|
|
|
17278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
17279
17285
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
17280
17286
|
import { dirname as dirname2, join } from "node:path";
|
|
17281
17287
|
var MOST_DEADLINES = 50;
|
|
@@ -17359,11 +17365,11 @@ var FloodMemory = class {
|
|
|
17359
17365
|
}
|
|
17360
17366
|
};
|
|
17361
17367
|
|
|
17362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17363
17369
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
17364
17370
|
import { dirname as dirname4, join as join2 } from "node:path";
|
|
17365
17371
|
|
|
17366
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17372
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
17367
17373
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
17368
17374
|
import { dirname as dirname3 } from "node:path";
|
|
17369
17375
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -17430,7 +17436,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
17430
17436
|
}
|
|
17431
17437
|
}, "lockTime");
|
|
17432
17438
|
|
|
17433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17439
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17434
17440
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
17435
17441
|
var SendJournal = class {
|
|
17436
17442
|
static {
|
|
@@ -17507,7 +17513,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
17507
17513
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
17508
17514
|
}, "withSendId");
|
|
17509
17515
|
|
|
17510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
17511
17517
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
17512
17518
|
import { join as join3 } from "node:path";
|
|
17513
17519
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -17619,7 +17625,7 @@ var RecipientList = class {
|
|
|
17619
17625
|
}
|
|
17620
17626
|
};
|
|
17621
17627
|
|
|
17622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17623
17629
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
17624
17630
|
var READS = /* @__PURE__ */ new Set([
|
|
17625
17631
|
"attachments.extract",
|
|
@@ -17635,7 +17641,10 @@ var READS = /* @__PURE__ */ new Set([
|
|
|
17635
17641
|
]);
|
|
17636
17642
|
var countsTowardLimit = /* @__PURE__ */ __name(({ kind = "message", action, notify }) => kind === "message" || kind === "forward" || kind === "edit" || kind === "delete" || kind === "pin" && notify === true || action === "create" || action === "members.add" || action === "requests.accept" || action === "join" || action === "contact-import", "countsTowardLimit");
|
|
17637
17643
|
var weightOf = /* @__PURE__ */ __name(({ kind = "message", action, count: count4, people }) => kind === "delete" || kind === "message" && action === void 0 ? Math.max(1, count4 ?? 1) : action === "create" || action === "members.add" || action === "requests.accept" || action === "contact-import" ? Math.max(1, people ?? count4 ?? 1) : 1, "weightOf");
|
|
17638
|
-
var timeOf = /* @__PURE__ */ __name((entry) =>
|
|
17644
|
+
var timeOf = /* @__PURE__ */ __name((entry) => {
|
|
17645
|
+
const scheduled = entry.scheduledFor === void 0 ? Number.NaN : Date.parse(entry.scheduledFor);
|
|
17646
|
+
return Number.isNaN(scheduled) ? Date.parse(entry.at) : scheduled;
|
|
17647
|
+
}, "timeOf");
|
|
17639
17648
|
var ceilingRefusal = /* @__PURE__ */ __name((key, command) => new CliError("permission_error", `${key} is not allowed: setup's answer keeps every WireCat tool read-only; the owner changes it at a terminal with \`${command} setup\``, { permission: key }), "ceilingRefusal");
|
|
17640
17649
|
var levelRefusal = /* @__PURE__ */ __name((refused, fix = `${refused.command} ${refused.profile} config set permissions.${refused.key} allow`) => refused.named === CEILING_KEY ? ceilingRefusal(refused.key, refused.command) : new CliError("permission_error", `profile ${refused.profile} does not let ${refused.key} write (permissions.${refused.named} is ${refused.level}, from the ${refused.permissionSources[refused.named ?? ""] ?? "default"}); to allow it: ${fix}`, { permission: refused.key }), "levelRefusal");
|
|
17641
17650
|
var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipients.command, readOnlyLock, permissions, permissionSources = {}, permissionDefaults, permissionFix, ask: ask2 = refuseToAsk, sendsPerHour, journal, flood, warn, now = /* @__PURE__ */ __name(() => /* @__PURE__ */ new Date(), "now") }) => {
|
|
@@ -17686,6 +17695,8 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
17686
17695
|
throw new CliError("rate_limited", `${count4} at once is more than the hourly limit of profile ${profile} (sendsPerHour ${sendsPerHour}) \u2014 do fewer at a time`);
|
|
17687
17696
|
}
|
|
17688
17697
|
const at = request.scheduledFor ? Date.parse(request.scheduledFor) : now().getTime();
|
|
17698
|
+
if (Number.isNaN(at))
|
|
17699
|
+
throw new CliError("validation_error", `"${request.scheduledFor}" is not a time to send at \u2014 use ISO 8601`);
|
|
17689
17700
|
const counted2 = entries.filter(countsTowardLimit).filter((entry) => entry.outcome === "sent" || entry.outcome === "outcome_unknown" || entry.outcome === "reserved").filter((entry) => Math.abs(timeOf(entry) - at) < HOUR_MS);
|
|
17690
17701
|
const unsure = /* @__PURE__ */ __name((entry) => entry.outcome === "outcome_unknown", "unsure");
|
|
17691
17702
|
const same2 = /* @__PURE__ */ __name((a, b) => a.sendId !== void 0 && a.sendId === b.sendId && a.chatId === b.chatId, "same");
|
|
@@ -17814,7 +17825,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
17814
17825
|
}), "guardFor");
|
|
17815
17826
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
17816
17827
|
|
|
17817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17818
17829
|
var COMMAND_NEEDS = {
|
|
17819
17830
|
"account update": ["updateProfile", "change the profile"],
|
|
17820
17831
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17864,7 +17875,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17864
17875
|
return group;
|
|
17865
17876
|
}, "hideNever");
|
|
17866
17877
|
|
|
17867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17868
17879
|
var AUDIT_PAGE = 200;
|
|
17869
17880
|
var AUDIT_BUDGET = 10;
|
|
17870
17881
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17944,7 +17955,82 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17944
17955
|
return found;
|
|
17945
17956
|
}, "burstJoins");
|
|
17946
17957
|
|
|
17947
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/management.js
|
|
17959
|
+
var REMOTE_READ = { remote: "read", local: "read" };
|
|
17960
|
+
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
17961
|
+
var minutes = /* @__PURE__ */ __name((text2) => {
|
|
17962
|
+
if (!/^[1-9]\d*$/.test(text2))
|
|
17963
|
+
throw new InvalidArgumentError("expected whole minutes");
|
|
17964
|
+
return Number(text2);
|
|
17965
|
+
}, "minutes");
|
|
17966
|
+
var changeOptions = /* @__PURE__ */ __name((command) => command.option("--title <title>", "the meeting's title").addOption(new Option("--kind <kind>", "an instant or a scheduled meeting").choices(["instant", "scheduled"])).option("--start-time <time>", "when it starts: an ISO time with its offset, 2026-11-20T10:00:00+01:00").option("--duration-minutes <minutes>", "how long it lasts, 1\u20131440", minutes).option("--timezone <zone>", "its IANA time zone, Europe/Madrid").option("--agenda <text>", "its agenda"), "changeOptions");
|
|
17967
|
+
var changeOf = /* @__PURE__ */ __name((flags) => Object.fromEntries(["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].flatMap((key) => flags[key] === void 0 ? [] : [[key, flags[key]]])), "changeOf");
|
|
17968
|
+
var meetingOf = /* @__PURE__ */ __name((one) => ({
|
|
17969
|
+
id: one.id,
|
|
17970
|
+
title: one.title,
|
|
17971
|
+
kind: one.kind,
|
|
17972
|
+
start_time: one.startTime,
|
|
17973
|
+
duration_minutes: one.durationMinutes,
|
|
17974
|
+
timezone: one.timezone,
|
|
17975
|
+
agenda: one.agenda,
|
|
17976
|
+
join_url: one.joinUrl
|
|
17977
|
+
}), "meetingOf");
|
|
17978
|
+
var receiptItem = /* @__PURE__ */ __name((receipt) => {
|
|
17979
|
+
const { change } = receipt;
|
|
17980
|
+
return {
|
|
17981
|
+
action: receipt.action,
|
|
17982
|
+
provider: receipt.scope.provider,
|
|
17983
|
+
account: receipt.scope.account,
|
|
17984
|
+
...receipt.id === void 0 ? {} : { id: receipt.id },
|
|
17985
|
+
...receipt.occurrenceId === void 0 ? {} : { occurrence_id: receipt.occurrenceId },
|
|
17986
|
+
...change ? {
|
|
17987
|
+
change: {
|
|
17988
|
+
...change.title === void 0 ? {} : { title: change.title },
|
|
17989
|
+
...change.kind === void 0 ? {} : { kind: change.kind },
|
|
17990
|
+
...change.startTime === void 0 ? {} : { start_time: change.startTime },
|
|
17991
|
+
...change.durationMinutes === void 0 ? {} : { duration_minutes: change.durationMinutes },
|
|
17992
|
+
...change.timezone === void 0 ? {} : { timezone: change.timezone },
|
|
17993
|
+
...change.agenda === void 0 ? {} : { agenda: change.agenda }
|
|
17994
|
+
}
|
|
17995
|
+
} : {},
|
|
17996
|
+
applied: receipt.applied,
|
|
17997
|
+
...receipt.meeting ? { meeting: meetingOf(receipt.meeting) } : {}
|
|
17998
|
+
};
|
|
17999
|
+
}, "receiptItem");
|
|
18000
|
+
var addMeetingManagementCommands = /* @__PURE__ */ __name((group, deps) => {
|
|
18001
|
+
const { management, print, output, inRun, askFirst } = deps;
|
|
18002
|
+
const has = /* @__PURE__ */ __name((name) => management.capabilities.includes(name), "has");
|
|
18003
|
+
const mutation = /* @__PURE__ */ __name(async (command) => {
|
|
18004
|
+
const dryRun = command.optsWithGlobals().dryRun === true;
|
|
18005
|
+
if (!dryRun) {
|
|
18006
|
+
if (!askFirst)
|
|
18007
|
+
throw new CliError("configuration_error", "this tool cannot ask before it changes a meeting on the service");
|
|
18008
|
+
await askFirst(command);
|
|
18009
|
+
}
|
|
18010
|
+
return { apply: true, dryRun };
|
|
18011
|
+
}, "mutation");
|
|
18012
|
+
const write = /* @__PURE__ */ __name((name) => annotate(group.command(name), { effects: REMOTE_WRITE, offline: false, output: { entity: "meeting_change" } }), "write");
|
|
18013
|
+
const target2 = /* @__PURE__ */ __name((command) => command.argument("<meeting>", "the service's id of the meeting"), "target");
|
|
18014
|
+
if (has("create"))
|
|
18015
|
+
output(changeOptions(write("create").description("create a meeting on the service"))).action(async (flags, command) => inRun(command, async () => print({ item: receiptItem(await management.create(changeOf(flags), await mutation(command))) }, command)));
|
|
18016
|
+
if (has("update"))
|
|
18017
|
+
output(changeOptions(target2(write("update").description("change a meeting on the service")))).action(async (id2, flags, command) => inRun(command, async () => print({ item: receiptItem(await management.update(id2, changeOf(flags), await mutation(command))) }, command)));
|
|
18018
|
+
if (has("cancel"))
|
|
18019
|
+
output(target2(write("cancel").description("cancel a meeting on the service")).option("--occurrence-id <id>", "cancel only this occurrence of a repeating meeting")).action(async (id2, flags, command) => inRun(command, async () => print({
|
|
18020
|
+
item: receiptItem(await management.cancel(id2, {
|
|
18021
|
+
...await mutation(command),
|
|
18022
|
+
...flags.occurrenceId === void 0 ? {} : { occurrenceId: flags.occurrenceId }
|
|
18023
|
+
}))
|
|
18024
|
+
}, command)));
|
|
18025
|
+
if (has("invitation"))
|
|
18026
|
+
output(target2(annotate(group.command("invitation"), {
|
|
18027
|
+
effects: REMOTE_READ,
|
|
18028
|
+
offline: false,
|
|
18029
|
+
output: { entity: "meeting_invitation" }
|
|
18030
|
+
}).description("the invitation text the service writes for a meeting"))).action(async (id2, _flags, command) => inRun(command, async () => print({ item: { ...await management.invitation(id2), untrusted: ["invitation"] } }, command)));
|
|
18031
|
+
}, "addMeetingManagementCommands");
|
|
18032
|
+
|
|
18033
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17948
18034
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17949
18035
|
command.allowUnknownOption();
|
|
17950
18036
|
const parse2 = command.parseOptions.bind(command);
|
|
@@ -17964,7 +18050,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17964
18050
|
return command;
|
|
17965
18051
|
}, "queryWordsAfterOptions");
|
|
17966
18052
|
|
|
17967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17968
18054
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17969
18055
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17970
18056
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -18006,7 +18092,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
18006
18092
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
18007
18093
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
18008
18094
|
|
|
18009
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
18010
18096
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
18011
18097
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
18012
18098
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -18029,15 +18115,20 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
18029
18115
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
18030
18116
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
18031
18117
|
|
|
18032
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
18033
18119
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
18120
|
+
var AGO = /^(\d+)(m|h|d)$/;
|
|
18121
|
+
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
18034
18122
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
18123
|
+
const [, amount, unit] = AGO.exec(value.trim()) ?? [];
|
|
18124
|
+
if (amount && unit)
|
|
18125
|
+
return Date.now() - Number(amount) * (AGO_MS[unit] ?? 0);
|
|
18035
18126
|
const zone = timezoneOf();
|
|
18036
18127
|
let time;
|
|
18037
18128
|
try {
|
|
18038
18129
|
time = zonedMoment(value, zone, { start: 0, end: value.length }, { end });
|
|
18039
18130
|
} catch {
|
|
18040
|
-
throw new CliError("validation_error", `${flag} takes an ISO date,
|
|
18131
|
+
throw new CliError("validation_error", `${flag} takes an ISO date, a time with or without an offset, or 30m, 2h, 7d ago`);
|
|
18041
18132
|
}
|
|
18042
18133
|
if (!ZONED.test(value.trim()))
|
|
18043
18134
|
readIn(zone);
|
|
@@ -18055,7 +18146,7 @@ var createMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program) => {
|
|
|
18055
18146
|
program.addCommand(search);
|
|
18056
18147
|
}
|
|
18057
18148
|
const readIn = /* @__PURE__ */ __name((zone) => command.setOptionValue("timesReadIn", zone), "readIn");
|
|
18058
|
-
const command = search.command("meetings").description("find words in stored meetings, indexing new ones first").argument("<query>", 'words, OR, (groups), -word, "a phrase", "a b"~N (within N lines), exact:word, from:"Name" (who said the line); date>=30d, project:, tag:, topic: choose meetings; a word also matches its other forms and spellings speech recognition garbled').option("--meeting-id <id>", "only this stored meeting", integer3).option("--identity-id <id>", "meetings with this participant identity; does not say who spoke a hit", integer3).option("--person-id <id>", "meetings with a participant linked to this person", integer3).option("--event-id <id>", "only meetings linked to this stored event", integer3).option("--series-id <id>", "only meetings in this stored series", integer3).option("--project <project>", "meetings confirmed in this project, by name, key or alias").option("--tag <name>", "meetings with this tag, by name or alias").option("--topic-name <name>", "meetings with this topic, by name or alias").option("--since-time <time>", "meetings starting at or after this ISO 8601 date or time", moment("--since-time", false, readIn)).option("--until-time <time>", "meetings starting at or before this ISO 8601 date or time; a date alone covers that whole local day", moment("--until-time", true, readIn)).option("--limit <n>", "how many hits, 1 through 1000 (default 100)", integer3).option("--cursor <cursor>", "continue from the previous page's page.next_cursor, with the same query and filters").option("--max-read-bytes <bytes>", "most stored bytes to read, 1 through 67108864 (default 4194304)", integer3);
|
|
18149
|
+
const command = search.command("meetings").description("find words in stored meetings, indexing new ones first").argument("<query>", 'words, OR, (groups), -word, "a phrase", "a b"~N (within N lines), exact:word, from:"Name" (who said the line); date>=30d, project:, tag:, topic: choose meetings; a word also matches its other forms and spellings speech recognition garbled').option("--meeting-id <id>", "only this stored meeting", integer3).option("--identity-id <id>", "meetings with this participant identity; does not say who spoke a hit", integer3).option("--person-id <id>", "meetings with a participant linked to this person", integer3).option("--event-id <id>", "only meetings linked to this stored event", integer3).option("--series-id <id>", "only meetings in this stored series", integer3).option("--project <project>", "meetings confirmed in this project, by name, key or alias").option("--tag <name>", "meetings with this tag, by name or alias").option("--topic-name <name>", "meetings with this topic, by name or alias").option("--since-time <time>", "meetings starting at or after this ISO 8601 date or time, or 30m, 2h, 7d ago", moment("--since-time", false, readIn)).option("--until-time <time>", "meetings starting at or before this ISO 8601 date or time; a date alone covers that whole local day", moment("--until-time", true, readIn)).option("--limit <n>", "how many hits, 1 through 1000 (default 100)", integer3).option("--cursor <cursor>", "continue from the previous page's page.next_cursor, with the same query and filters").option("--max-read-bytes <bytes>", "most stored bytes to read, 1 through 67108864 (default 4194304)", integer3);
|
|
18059
18150
|
annotate(command, {
|
|
18060
18151
|
origin: "handwritten",
|
|
18061
18152
|
effects: { remote: "none", local: "read" },
|
|
@@ -18115,7 +18206,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
18115
18206
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
18116
18207
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
18117
18208
|
|
|
18118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
18119
18210
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
18120
18211
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
18121
18212
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -18134,6 +18225,14 @@ var date = /* @__PURE__ */ __name((text2) => {
|
|
|
18134
18225
|
}
|
|
18135
18226
|
}, "date");
|
|
18136
18227
|
var LOCAL_READ = { remote: "none", local: "read" };
|
|
18228
|
+
var REMOTE_READ2 = { remote: "read", local: "read" };
|
|
18229
|
+
var backendOf = /* @__PURE__ */ __name((value) => {
|
|
18230
|
+
if (!BACKENDS.includes(value))
|
|
18231
|
+
throw new InvalidArgumentError("expected archive, server or both");
|
|
18232
|
+
return value;
|
|
18233
|
+
}, "backendOf");
|
|
18234
|
+
var backendOption = /* @__PURE__ */ __name((command) => command.option("--backend <archive|server|both>", "where to read: the store (archive), the service (server), or both, kept in the store (default: both)", backendOf), "backendOption");
|
|
18235
|
+
var BACKEND_HELP = "--backend both asks the service with the part of the query it can filter, keeps what it returns, then runs the whole query over the store; each item says found_in archive, server or both. --offline reads the store only.";
|
|
18137
18236
|
var LOCAL_WRITE = { remote: "none", local: "write" };
|
|
18138
18237
|
var FETCH = { remote: "read", local: "write" };
|
|
18139
18238
|
var addMeetingCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
|
|
@@ -18149,20 +18248,44 @@ var addMeetingCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
|
|
|
18149
18248
|
const opts = command.optsWithGlobals();
|
|
18150
18249
|
deps.write(value, opts.json ? "json" : opts.jsonl ? "jsonl" : "text");
|
|
18151
18250
|
}, "print");
|
|
18152
|
-
const
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18251
|
+
const access = /* @__PURE__ */ __name((command, backend) => ({
|
|
18252
|
+
...backend === void 0 ? {} : { backend },
|
|
18253
|
+
offline: command.optsWithGlobals().offline === true,
|
|
18254
|
+
timezone: timezoneOf(deps.timezone),
|
|
18255
|
+
...deps.now ? { now: deps.now() } : {}
|
|
18256
|
+
}), "access");
|
|
18257
|
+
const list2 = queryWordsAfterOptions(group.command("list").description("meetings, newest first: the service's and the stored ones, kept in the store")).argument("[query...]", "field:value terms that narrow the list \u2014 the fields are below").addHelpText("after", `
|
|
18258
|
+
${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}
|
|
18259
|
+
${BACKEND_HELP}`);
|
|
18260
|
+
annotate(list2, {
|
|
18261
|
+
effects: REMOTE_READ2,
|
|
18262
|
+
partial: true,
|
|
18263
|
+
query: defineQuery(MEETING_QUERY),
|
|
18264
|
+
output: { entity: "meeting" }
|
|
18265
|
+
});
|
|
18266
|
+
backendOption(output(list2)).option("--limit <n>", "meetings per page", integer4, 100).option("--page <n>", "page number", integer4, 1).action(async (words3, opts, command) => {
|
|
18156
18267
|
const query = meetingsQuery(words3.join(" "));
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18268
|
+
await deps.inRun(command, async () => {
|
|
18269
|
+
const { server: _server, ...answer } = await meetingsListThrough(deps.source, deps.store, {
|
|
18270
|
+
accountId: deps.accountId,
|
|
18271
|
+
limit: opts.limit,
|
|
18272
|
+
offset: (opts.page - 1) * opts.limit,
|
|
18273
|
+
...query ? { query } : {}
|
|
18274
|
+
}, access(command, opts.backend));
|
|
18275
|
+
print(answer, command);
|
|
18276
|
+
});
|
|
18163
18277
|
});
|
|
18164
|
-
output(annotate(group.command("show"), { effects:
|
|
18165
|
-
|
|
18278
|
+
backendOption(output(annotate(group.command("show"), { effects: REMOTE_READ2, partial: true, output: { entity: "meeting_details" } }).description("show a meeting, read again from the service with its people, transcript and documents").argument("<meeting>", "the stored meeting's number, its meeting: ref, or the service's id (provider_id)").addHelpText("after", `${SAVE_HELP}
|
|
18279
|
+
${BACKEND_HELP}`))).action(async (meeting, opts, command) => {
|
|
18280
|
+
await deps.inRun(command, async () => {
|
|
18281
|
+
const shown = await meetingShowThrough(deps.source, deps.store, deps.accountId, meeting, access(command, opts.backend));
|
|
18282
|
+
const { item: item2 } = await meetingDetailsBody(deps.store, shown.details);
|
|
18283
|
+
print({
|
|
18284
|
+
item: shown.foundIn ? { ...item2, found_in: shown.foundIn } : item2,
|
|
18285
|
+
...shown.missing ? { missing: shown.missing } : {},
|
|
18286
|
+
...shown.meta ? { meta: shown.meta } : {}
|
|
18287
|
+
}, command);
|
|
18288
|
+
});
|
|
18166
18289
|
});
|
|
18167
18290
|
output(annotate(group.command("transcript"), { effects: LOCAL_READ, output: { entity: "meeting_transcript" } }).description("show current meeting transcripts").argument("<meeting>", "stored meeting id", integer4).option("--history", "include superseded transcript versions").addHelpText("after", SAVE_HELP)).action(async (id2, opts, command) => {
|
|
18168
18291
|
print(await meetingTranscriptAnswer(deps.store, id2, deps.accountId, { history: opts.history }), command);
|
|
@@ -18247,6 +18370,14 @@ ${deps.importHelp}`);
|
|
|
18247
18370
|
now: deps.now?.() ?? Date.now()
|
|
18248
18371
|
}), command);
|
|
18249
18372
|
});
|
|
18373
|
+
if (deps.management)
|
|
18374
|
+
addMeetingManagementCommands(group, {
|
|
18375
|
+
management: deps.management,
|
|
18376
|
+
print,
|
|
18377
|
+
output,
|
|
18378
|
+
inRun: deps.inRun,
|
|
18379
|
+
...deps.askFirst ? { askFirst: deps.askFirst } : {}
|
|
18380
|
+
});
|
|
18250
18381
|
const eventList = queryWordsAfterOptions(annotate(program.command("events").description("the owner's stored events"), {
|
|
18251
18382
|
effects: { remote: "none", local: "none" }
|
|
18252
18383
|
}).command("list")).description("list stored events").argument("[query...]", "event id, origin or time fields that narrow the list").addHelpText("after", `
|
|
@@ -18264,7 +18395,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
18264
18395
|
}, "addMeetingCommandsDefinition");
|
|
18265
18396
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
18266
18397
|
|
|
18267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
18268
18399
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
18269
18400
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
18270
18401
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -18398,7 +18529,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
18398
18529
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
18399
18530
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
18400
18531
|
|
|
18401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
18402
18533
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
18403
18534
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
18404
18535
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -18407,7 +18538,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
18407
18538
|
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");
|
|
18408
18539
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
18409
18540
|
|
|
18410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
18411
18542
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
18412
18543
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
18413
18544
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18523,23 +18654,23 @@ var contactShown = /* @__PURE__ */ __name((account, card, profile) => {
|
|
|
18523
18654
|
chats: shared
|
|
18524
18655
|
};
|
|
18525
18656
|
}, "contactShown");
|
|
18526
|
-
var chatEventAnswer = /* @__PURE__ */ __name((chatId,
|
|
18657
|
+
var chatEventAnswer = /* @__PURE__ */ __name((chatId, event2) => defined({
|
|
18527
18658
|
chat_id: chatId,
|
|
18528
|
-
time:
|
|
18529
|
-
type:
|
|
18530
|
-
message_id:
|
|
18531
|
-
by:
|
|
18532
|
-
people:
|
|
18533
|
-
title:
|
|
18659
|
+
time: event2.timestamp,
|
|
18660
|
+
type: event2.event,
|
|
18661
|
+
message_id: event2.messageId,
|
|
18662
|
+
by: event2.by,
|
|
18663
|
+
people: event2.people,
|
|
18664
|
+
title: event2.title
|
|
18534
18665
|
}), "chatEventAnswer");
|
|
18535
18666
|
var HISTORY_TYPES = { joined: "join", left: "leave", changed: "profile" };
|
|
18536
|
-
var memberEventAnswer = /* @__PURE__ */ __name((chatId,
|
|
18667
|
+
var memberEventAnswer = /* @__PURE__ */ __name((chatId, event2) => defined({
|
|
18537
18668
|
chat_id: chatId,
|
|
18538
|
-
time:
|
|
18539
|
-
type: HISTORY_TYPES[
|
|
18540
|
-
by:
|
|
18541
|
-
people: [{ id:
|
|
18542
|
-
before:
|
|
18669
|
+
time: event2.at,
|
|
18670
|
+
type: HISTORY_TYPES[event2.event],
|
|
18671
|
+
by: event2.invitedBy === void 0 ? void 0 : { id: event2.invitedBy, name: null },
|
|
18672
|
+
people: [{ id: event2.id, name: event2.name, username: event2.username }],
|
|
18673
|
+
before: event2.before ? { name: event2.before.name, username: event2.before.username } : void 0
|
|
18543
18674
|
}), "memberEventAnswer");
|
|
18544
18675
|
var inviteLinkAnswer = /* @__PURE__ */ __name((link4) => defined({
|
|
18545
18676
|
link: link4.link,
|
|
@@ -18669,7 +18800,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18669
18800
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18670
18801
|
}), "sessionAnswer");
|
|
18671
18802
|
|
|
18672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18803
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18673
18804
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18674
18805
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18675
18806
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18731,7 +18862,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18731
18862
|
}), "storedDeps");
|
|
18732
18863
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18733
18864
|
|
|
18734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18735
18866
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18736
18867
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18737
18868
|
if (key in own)
|
|
@@ -18748,12 +18879,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18748
18879
|
return found.bind(adapter);
|
|
18749
18880
|
}, "capability");
|
|
18750
18881
|
|
|
18751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18752
18883
|
import { randomBytes } from "node:crypto";
|
|
18753
18884
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18754
18885
|
var newOperationId = newSendId;
|
|
18755
18886
|
|
|
18756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
18757
18888
|
var LINKS = /https?:\/\/\S+/g;
|
|
18758
18889
|
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");
|
|
18759
18890
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -18783,7 +18914,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
18783
18914
|
});
|
|
18784
18915
|
}, "questions");
|
|
18785
18916
|
|
|
18786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
18787
18918
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
18788
18919
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
18789
18920
|
const name = typed.trim().toLowerCase();
|
|
@@ -18840,7 +18971,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
18840
18971
|
return best.name;
|
|
18841
18972
|
}, "categorize");
|
|
18842
18973
|
|
|
18843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
18844
18975
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
18845
18976
|
var RULES_IN = {
|
|
18846
18977
|
dialog: "all",
|
|
@@ -19046,14 +19177,14 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19046
19177
|
return passes;
|
|
19047
19178
|
}, "applyTaskRulesToChats");
|
|
19048
19179
|
|
|
19049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19050
|
-
var
|
|
19051
|
-
var
|
|
19180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19181
|
+
var AGO2 = /^(\d+)(m|h|d)$/;
|
|
19182
|
+
var AGO_MS2 = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19052
19183
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
19053
19184
|
var momentOf = /* @__PURE__ */ __name((reference, flag = "--since", now = Date.now(), at = {}) => {
|
|
19054
19185
|
const wanted = reference.trim();
|
|
19055
|
-
const [, amount, unit] =
|
|
19056
|
-
const time = amount && unit ? now - Number(amount) * (
|
|
19186
|
+
const [, amount, unit] = AGO2.exec(wanted) ?? [];
|
|
19187
|
+
const time = amount && unit ? now - Number(amount) * (AGO_MS2[unit] ?? 0) : DATE.test(wanted) ? calendarMoment(wanted, flag, at) : Number.NaN;
|
|
19057
19188
|
if (Number.isNaN(time)) {
|
|
19058
19189
|
throw new CliError("validation_error", `${flag} takes an ISO 8601 time or 30m, 2h, 1d ago \u2014 not "${wanted}"`);
|
|
19059
19190
|
}
|
|
@@ -19061,8 +19192,8 @@ var momentOf = /* @__PURE__ */ __name((reference, flag = "--since", now = Date.n
|
|
|
19061
19192
|
}, "momentOf");
|
|
19062
19193
|
var aheadOf = /* @__PURE__ */ __name((reference, flag, now = Date.now(), at = {}) => {
|
|
19063
19194
|
const wanted = reference.trim();
|
|
19064
|
-
const [, amount, unit] =
|
|
19065
|
-
const time = amount && unit ? now + Number(amount) * (
|
|
19195
|
+
const [, amount, unit] = AGO2.exec(wanted) ?? [];
|
|
19196
|
+
const time = amount && unit ? now + Number(amount) * (AGO_MS2[unit] ?? 0) : DATE.test(wanted) ? calendarMoment(wanted, flag, at) : Number.NaN;
|
|
19066
19197
|
if (Number.isNaN(time)) {
|
|
19067
19198
|
throw new CliError("validation_error", `${flag} takes an ISO 8601 time or 30m, 2h, 3d from now \u2014 not "${wanted}"`);
|
|
19068
19199
|
}
|
|
@@ -19086,7 +19217,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19086
19217
|
};
|
|
19087
19218
|
}, "dateWindow");
|
|
19088
19219
|
|
|
19089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
19090
19221
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
19091
19222
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
19092
19223
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -19109,10 +19240,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
19109
19240
|
}
|
|
19110
19241
|
}, "patiently");
|
|
19111
19242
|
|
|
19112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19113
19244
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
19114
19245
|
|
|
19115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
19116
19247
|
var REQUEST_MS = 400;
|
|
19117
19248
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
19118
19249
|
const lowest = ranges[0];
|
|
@@ -19135,13 +19266,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
19135
19266
|
};
|
|
19136
19267
|
}, "estimateBackfill");
|
|
19137
19268
|
|
|
19138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
19139
19270
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
19140
19271
|
...error,
|
|
19141
19272
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
19142
19273
|
}), "withRecovery");
|
|
19143
19274
|
|
|
19144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
19145
19276
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
19146
19277
|
if (isCliFailure(error))
|
|
19147
19278
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -19224,7 +19355,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
19224
19355
|
};
|
|
19225
19356
|
}, "mergeBatches");
|
|
19226
19357
|
|
|
19227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/groups.js
|
|
19228
19359
|
var ALL = "all";
|
|
19229
19360
|
var OWNER_NOTES = { provider: "notes", account: INTERNAL_NOTES };
|
|
19230
19361
|
var NOT_GROUP_NAMES = /* @__PURE__ */ new Set([ALL, "bots"]);
|
|
@@ -19296,7 +19427,7 @@ var groupEntries = /* @__PURE__ */ __name((saved) => ({
|
|
|
19296
19427
|
[ALL]: [ALL]
|
|
19297
19428
|
}), "groupEntries");
|
|
19298
19429
|
|
|
19299
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
19300
19431
|
var NO_MAIL = "no_mail";
|
|
19301
19432
|
var MAIL = "email";
|
|
19302
19433
|
var groupLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
@@ -19370,7 +19501,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
19370
19501
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
19371
19502
|
}, "accountsOfKind");
|
|
19372
19503
|
|
|
19373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
19374
19505
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
19375
19506
|
if (deps.reads !== "store")
|
|
19376
19507
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -19484,12 +19615,14 @@ var chatAmong = /* @__PURE__ */ __name(async (messenger, store, accounts, refere
|
|
|
19484
19615
|
const [only] = accounts;
|
|
19485
19616
|
if (accounts.length === 1 && only)
|
|
19486
19617
|
return { account: only, chatId: await storedChatId(messenger, reference, store, only, { includeLeft: true }) };
|
|
19487
|
-
const
|
|
19488
|
-
const held = (await store.chats.chats(account, {})).items;
|
|
19489
|
-
const chatId = await storedChatId(messenger, reference, store, account).catch(missing);
|
|
19618
|
+
const among = /* @__PURE__ */ __name(async (includeLeft) => (await Promise.all(accounts.map(async (account) => {
|
|
19619
|
+
const held = (await store.chats.chats(account, includeLeft ? { includeLeft } : {})).items;
|
|
19620
|
+
const chatId = await storedChatId(messenger, reference, store, account, { includeLeft }).catch(missing);
|
|
19490
19621
|
const chat = held.find((one2) => one2.id === chatId);
|
|
19491
19622
|
return chat ? [{ account, chat }] : [];
|
|
19492
|
-
}))).flat();
|
|
19623
|
+
}))).flat(), "among");
|
|
19624
|
+
const current = await among(false);
|
|
19625
|
+
const found = current.length > 0 ? current : await among(true);
|
|
19493
19626
|
const [one] = found;
|
|
19494
19627
|
if (found.length === 1 && one)
|
|
19495
19628
|
return { account: one.account, chatId: one.chat.id };
|
|
@@ -19569,7 +19702,7 @@ var chatsMatchingIn = /* @__PURE__ */ __name(async (store, accounts, pattern) =>
|
|
|
19569
19702
|
}, "chatsMatchingIn");
|
|
19570
19703
|
var isText = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "", "isText");
|
|
19571
19704
|
|
|
19572
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
19573
19706
|
var CONTEXT_MESSAGES = 3;
|
|
19574
19707
|
var CONTEXT_MINUTES = 10;
|
|
19575
19708
|
var MAX_CHARS = 1200;
|
|
@@ -19593,12 +19726,12 @@ var context = {
|
|
|
19593
19726
|
}, "describe")
|
|
19594
19727
|
};
|
|
19595
19728
|
|
|
19596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
19597
19730
|
var BUILT_INS = [context];
|
|
19598
19731
|
var providers = [...BUILT_INS];
|
|
19599
19732
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
19600
19733
|
|
|
19601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
19602
19735
|
var READ_PAGE = 5e3;
|
|
19603
19736
|
var CHAIN = 50;
|
|
19604
19737
|
var CONVERSATION_QUERY = {
|
|
@@ -19750,7 +19883,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
19750
19883
|
return size2;
|
|
19751
19884
|
}, "sized");
|
|
19752
19885
|
|
|
19753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19886
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
19754
19887
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
19755
19888
|
var MESSAGE_PAGE = 5e3;
|
|
19756
19889
|
var PER_SESSION = 8;
|
|
@@ -19769,7 +19902,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19769
19902
|
price: remote.price,
|
|
19770
19903
|
installed: true,
|
|
19771
19904
|
perBatch: PER_REQUEST * concurrency,
|
|
19772
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
19905
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-P2MD5G64.js")).openRemote(remote, apiKey, {
|
|
19773
19906
|
concurrency,
|
|
19774
19907
|
env: deps.env ?? process.env
|
|
19775
19908
|
}), "open")
|
|
@@ -19789,7 +19922,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19789
19922
|
if (!isTextModelInstalled(model, directory2))
|
|
19790
19923
|
throw notDownloaded(model.id);
|
|
19791
19924
|
if (apart) {
|
|
19792
|
-
const { openProcess } = await import("./process-
|
|
19925
|
+
const { openProcess } = await import("./process-MFC5VSPT.js");
|
|
19793
19926
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
19794
19927
|
}
|
|
19795
19928
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -20078,7 +20211,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
20078
20211
|
return { ...one, state };
|
|
20079
20212
|
}, "shaped");
|
|
20080
20213
|
|
|
20081
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20214
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
20082
20215
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
20083
20216
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options2) => {
|
|
20084
20217
|
for (const [key, value, maximum] of [
|
|
@@ -20131,7 +20264,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options2, signal,
|
|
|
20131
20264
|
}
|
|
20132
20265
|
}, "catchUpSearch");
|
|
20133
20266
|
|
|
20134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
20135
20268
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
20136
20269
|
if (deps.reads === "store") {
|
|
20137
20270
|
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`);
|
|
@@ -20512,7 +20645,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
20512
20645
|
return message?.timestamp ?? fallback;
|
|
20513
20646
|
}, "timeOfKey");
|
|
20514
20647
|
|
|
20515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
20516
20649
|
var DAY_MS = 864e5;
|
|
20517
20650
|
var NEW_DAYS = 30;
|
|
20518
20651
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20589,7 +20722,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20589
20722
|
};
|
|
20590
20723
|
}, "scorePerson");
|
|
20591
20724
|
|
|
20592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
20593
20726
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
20594
20727
|
const controller = new AbortController();
|
|
20595
20728
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -20605,7 +20738,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
|
20605
20738
|
}
|
|
20606
20739
|
}, "withTimeLimit");
|
|
20607
20740
|
|
|
20608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20609
20742
|
var REGISTRIES = {
|
|
20610
20743
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20611
20744
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20692,7 +20825,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20692
20825
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20693
20826
|
})), "notCovered");
|
|
20694
20827
|
|
|
20695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20696
20829
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20697
20830
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20698
20831
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20780,7 +20913,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20780
20913
|
};
|
|
20781
20914
|
}, "botCheckService");
|
|
20782
20915
|
|
|
20783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20784
20917
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20785
20918
|
if (value === void 0)
|
|
20786
20919
|
return void 0;
|
|
@@ -20790,7 +20923,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20790
20923
|
return id2;
|
|
20791
20924
|
}, "threadIdOf");
|
|
20792
20925
|
|
|
20793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20794
20927
|
var TOP_POSTS = 5;
|
|
20795
20928
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20796
20929
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20850,7 +20983,7 @@ var topPosts = /* @__PURE__ */ __name((messages) => messages.map((one) => {
|
|
|
20850
20983
|
}).filter((one) => one.reactions > 0 || (one.views ?? 0) > 0).sort((a, b) => b.reactions - a.reactions || (b.views ?? 0) - (a.views ?? 0)).slice(0, TOP_POSTS), "topPosts");
|
|
20851
20984
|
var membersOf2 = /* @__PURE__ */ __name(({ events, more }, messages, since) => {
|
|
20852
20985
|
const inPeriod = events.filter(({ timestamp }) => Date.parse(timestamp) >= since);
|
|
20853
|
-
const people = /* @__PURE__ */ __name((names2) => inPeriod.filter(({ event }) => names2.has(
|
|
20986
|
+
const people = /* @__PURE__ */ __name((names2) => inPeriod.filter(({ event: event2 }) => names2.has(event2)).flatMap(({ timestamp, people: people2 }) => people2.map(({ id: id2 }) => ({ id: id2, at: Date.parse(timestamp) }))), "people");
|
|
20854
20987
|
const joined = people(JOINS);
|
|
20855
20988
|
const left = people(LEAVES);
|
|
20856
20989
|
const firstWords = joined.flatMap(({ id: id2, at }) => {
|
|
@@ -20884,10 +21017,10 @@ var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
|
20884
21017
|
}, "row");
|
|
20885
21018
|
for (const one of messages)
|
|
20886
21019
|
row(keyOf7(one.timestamp)).messages.push(one);
|
|
20887
|
-
for (const { timestamp, event, people } of events?.events ?? []) {
|
|
20888
|
-
if (JOINS.has(
|
|
21020
|
+
for (const { timestamp, event: event2, people } of events?.events ?? []) {
|
|
21021
|
+
if (JOINS.has(event2))
|
|
20889
21022
|
row(keyOf7(timestamp)).joined += people.length;
|
|
20890
|
-
if (LEAVES.has(
|
|
21023
|
+
if (LEAVES.has(event2))
|
|
20891
21024
|
row(keyOf7(timestamp)).left += people.length;
|
|
20892
21025
|
}
|
|
20893
21026
|
return [...rows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, found]) => ({
|
|
@@ -20907,7 +21040,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20907
21040
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20908
21041
|
}, "median");
|
|
20909
21042
|
|
|
20910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20911
21044
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20912
21045
|
const events = [];
|
|
20913
21046
|
for (const stay of stays) {
|
|
@@ -20939,7 +21072,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20939
21072
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20940
21073
|
}, "memberEvents");
|
|
20941
21074
|
|
|
20942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20943
21076
|
var EVENTS_DAYS = 7;
|
|
20944
21077
|
var TRACKED_DAYS = 30;
|
|
20945
21078
|
var STATS_PAGE = 1e3;
|
|
@@ -21234,7 +21367,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
21234
21367
|
return members.length === 0 ? null : members;
|
|
21235
21368
|
}, "storedMembers");
|
|
21236
21369
|
|
|
21237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
21238
21371
|
var INBOX_CHATS = 20;
|
|
21239
21372
|
var REVIEW_DAYS = 3;
|
|
21240
21373
|
var UNANSWERED_HOURS = 24;
|
|
@@ -21442,7 +21575,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
21442
21575
|
};
|
|
21443
21576
|
}, "inboxService");
|
|
21444
21577
|
|
|
21445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-meetings.js
|
|
21446
21579
|
var SCAN = 1e3;
|
|
21447
21580
|
var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { limit = 10, since, until } = {}) => {
|
|
21448
21581
|
const byId2 = new Map(accounts.map((one) => [one.id, one]));
|
|
@@ -21494,7 +21627,7 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
21494
21627
|
return { items, total: newest.length, hasMore: cut || newest.length > limit };
|
|
21495
21628
|
}, "personMeetings");
|
|
21496
21629
|
|
|
21497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21498
21631
|
var CONTEXT_MESSAGES2 = 10;
|
|
21499
21632
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21500
21633
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21537,14 +21670,14 @@ var mailWith = /* @__PURE__ */ __name(async (store, key, address, limit, since)
|
|
|
21537
21670
|
}, "mailWith");
|
|
21538
21671
|
var newestFirst = /* @__PURE__ */ __name((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp), "newestFirst");
|
|
21539
21672
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
21540
|
-
var contextEvent = /* @__PURE__ */ __name((
|
|
21541
|
-
ref: `event:${
|
|
21542
|
-
title:
|
|
21543
|
-
startsAt: iso(
|
|
21544
|
-
endsAt: iso(
|
|
21545
|
-
allDay:
|
|
21546
|
-
location:
|
|
21547
|
-
status:
|
|
21673
|
+
var contextEvent = /* @__PURE__ */ __name((event2) => ({
|
|
21674
|
+
ref: `event:${event2.id}`,
|
|
21675
|
+
title: event2.title,
|
|
21676
|
+
startsAt: iso(event2.startsAt),
|
|
21677
|
+
endsAt: iso(event2.endsAt),
|
|
21678
|
+
allDay: event2.allDay === true,
|
|
21679
|
+
location: event2.location,
|
|
21680
|
+
status: event2.status ?? null
|
|
21548
21681
|
}), "contextEvent");
|
|
21549
21682
|
var EVENT_PAGE = 100;
|
|
21550
21683
|
var EVENT_ROWS = 1e3;
|
|
@@ -21553,17 +21686,17 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
21553
21686
|
const series = /* @__PURE__ */ new Set();
|
|
21554
21687
|
for (let offset = 0; offset < EVENT_ROWS; offset += EVENT_PAGE) {
|
|
21555
21688
|
const page = await store.calendar.events({ ...filter, limit: EVENT_PAGE, offset });
|
|
21556
|
-
for (const
|
|
21557
|
-
if (
|
|
21689
|
+
for (const event2 of page) {
|
|
21690
|
+
if (event2.status === "cancelled")
|
|
21558
21691
|
continue;
|
|
21559
|
-
if (
|
|
21560
|
-
if (series.has(
|
|
21692
|
+
if (event2.eventSeriesId !== null) {
|
|
21693
|
+
if (series.has(event2.eventSeriesId))
|
|
21561
21694
|
continue;
|
|
21562
|
-
series.add(
|
|
21695
|
+
series.add(event2.eventSeriesId);
|
|
21563
21696
|
}
|
|
21564
21697
|
if (items.length === limit)
|
|
21565
21698
|
return { items, cut: true };
|
|
21566
|
-
items.push(
|
|
21699
|
+
items.push(event2);
|
|
21567
21700
|
}
|
|
21568
21701
|
if (page.length < EVENT_PAGE)
|
|
21569
21702
|
return { items, cut: false };
|
|
@@ -21800,10 +21933,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21800
21933
|
};
|
|
21801
21934
|
}, "personMessages");
|
|
21802
21935
|
|
|
21803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21804
21937
|
import { createHash } from "node:crypto";
|
|
21805
21938
|
|
|
21806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21807
21940
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21808
21941
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options2 = {}) => {
|
|
21809
21942
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21821,7 +21954,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21821
21954
|
return { parsed, meeting };
|
|
21822
21955
|
}, "authorizedMeetingMetadata");
|
|
21823
21956
|
|
|
21824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21825
21958
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21826
21959
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21827
21960
|
if (signal?.aborted)
|
|
@@ -22020,7 +22153,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
22020
22153
|
return { ...packet, fingerprint: hash(packet) };
|
|
22021
22154
|
}, "readMeetingEvidence");
|
|
22022
22155
|
|
|
22023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
22024
22157
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options2) => {
|
|
22025
22158
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options2;
|
|
22026
22159
|
const requestedAccounts = options2.accountIds;
|
|
@@ -22119,7 +22252,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
22119
22252
|
};
|
|
22120
22253
|
}, "personMeetingContext");
|
|
22121
22254
|
|
|
22122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22255
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
22123
22256
|
var PREPARE_BYTES = 96 * 1024;
|
|
22124
22257
|
var MEETINGS = 5;
|
|
22125
22258
|
var CUES = 3;
|
|
@@ -22242,7 +22375,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
22242
22375
|
}
|
|
22243
22376
|
}, "meetingsOf");
|
|
22244
22377
|
|
|
22245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
22246
22379
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
22247
22380
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
22248
22381
|
const held = await storeIfOpen(deps);
|
|
@@ -22312,7 +22445,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
22312
22445
|
complete: false
|
|
22313
22446
|
})), "quiet");
|
|
22314
22447
|
|
|
22315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
22316
22449
|
var TIMELINE_ITEMS = 50;
|
|
22317
22450
|
var TIMELINE_MAX = 500;
|
|
22318
22451
|
var SCOPES = ["personal", "work"];
|
|
@@ -22374,7 +22507,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
22374
22507
|
};
|
|
22375
22508
|
}, "personTimeline");
|
|
22376
22509
|
|
|
22377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22378
22511
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22379
22512
|
const ids = [...new Set(chatIds)];
|
|
22380
22513
|
if (ids.length === 0)
|
|
@@ -22400,7 +22533,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22400
22533
|
}));
|
|
22401
22534
|
}, "chatCoverage");
|
|
22402
22535
|
|
|
22403
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
22404
22537
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
22405
22538
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
22406
22539
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -22464,7 +22597,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
22464
22597
|
}
|
|
22465
22598
|
}, "validateContextEvidencePage");
|
|
22466
22599
|
|
|
22467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
22468
22601
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
22469
22602
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
22470
22603
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -22517,7 +22650,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
22517
22650
|
};
|
|
22518
22651
|
}, "contextReadBudget");
|
|
22519
22652
|
|
|
22520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
22521
22654
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
22522
22655
|
if (!port || typeof port.read !== "function")
|
|
22523
22656
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -22561,7 +22694,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
22561
22694
|
};
|
|
22562
22695
|
}, "createContextEvidenceReader");
|
|
22563
22696
|
|
|
22564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
22565
22698
|
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");
|
|
22566
22699
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {}) => {
|
|
22567
22700
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -22577,7 +22710,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {})
|
|
|
22577
22710
|
}, "excerpt");
|
|
22578
22711
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
22579
22712
|
|
|
22580
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22581
22714
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22582
22715
|
async around(ref, window3) {
|
|
22583
22716
|
const at = parseLocator(ref);
|
|
@@ -22672,7 +22805,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
22672
22805
|
};
|
|
22673
22806
|
}, "storedNeighbours");
|
|
22674
22807
|
|
|
22675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
22676
22809
|
import { createHash as createHash2 } from "node:crypto";
|
|
22677
22810
|
var DAY = 864e5;
|
|
22678
22811
|
var MAX_TIME = 864e13;
|
|
@@ -22988,7 +23121,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
22988
23121
|
return value;
|
|
22989
23122
|
}, "decodeCheckpoint");
|
|
22990
23123
|
|
|
22991
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
22992
23125
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
22993
23126
|
var PAGE2 = 20;
|
|
22994
23127
|
var PEOPLE = 20;
|
|
@@ -23392,7 +23525,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
23392
23525
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
23393
23526
|
}, "peopleOf");
|
|
23394
23527
|
|
|
23395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
23396
23529
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
23397
23530
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
23398
23531
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -23436,7 +23569,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
23436
23569
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
23437
23570
|
}, "matchVocabularyTerms");
|
|
23438
23571
|
|
|
23439
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
23440
23573
|
var KINDS = ["project", "tag", "topic"];
|
|
23441
23574
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options2 = {}) => {
|
|
23442
23575
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -23491,7 +23624,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23491
23624
|
};
|
|
23492
23625
|
}, "findEvidenceMentions");
|
|
23493
23626
|
|
|
23494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23627
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
23495
23628
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
23496
23629
|
var DEFAULT_PURPOSES = ["work"];
|
|
23497
23630
|
var LINK_PURPOSE = "work";
|
|
@@ -23521,7 +23654,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
23521
23654
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
23522
23655
|
], "purposeList");
|
|
23523
23656
|
|
|
23524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
23525
23658
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
23526
23659
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
23527
23660
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -23832,7 +23965,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
23832
23965
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
23833
23966
|
}, "purposeHintOf");
|
|
23834
23967
|
|
|
23835
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
23836
23969
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
23837
23970
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
23838
23971
|
const held = await storeIfOpen(deps);
|
|
@@ -24097,7 +24230,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
24097
24230
|
return rest;
|
|
24098
24231
|
}, "withoutPhone");
|
|
24099
24232
|
|
|
24100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
24101
24234
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
24102
24235
|
var PERIOD_FIELD = "created";
|
|
24103
24236
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -24217,18 +24350,18 @@ var meetingIdOf = /* @__PURE__ */ __name((group) => {
|
|
|
24217
24350
|
}
|
|
24218
24351
|
}, "meetingIdOf");
|
|
24219
24352
|
var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
24220
|
-
const
|
|
24353
|
+
const meetingOf2 = new Map(groups.flatMap((group) => {
|
|
24221
24354
|
const id2 = meetingIdOf(group);
|
|
24222
24355
|
return id2 === void 0 ? [] : [[group, id2]];
|
|
24223
24356
|
}));
|
|
24224
|
-
const titles = await store.tasks.statNames("meeting", [...new Set(
|
|
24225
|
-
return new Map([...
|
|
24357
|
+
const titles = await store.tasks.statNames("meeting", [...new Set(meetingOf2.values())]);
|
|
24358
|
+
return new Map([...meetingOf2].flatMap(([group, id2]) => {
|
|
24226
24359
|
const title = titles.get(id2);
|
|
24227
24360
|
return title === void 0 ? [] : [[group, title]];
|
|
24228
24361
|
}));
|
|
24229
24362
|
}, "meetingNames");
|
|
24230
24363
|
|
|
24231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
24232
24365
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
24233
24366
|
const tags = /* @__PURE__ */ new Map();
|
|
24234
24367
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -24237,7 +24370,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
24237
24370
|
return tags;
|
|
24238
24371
|
}, "taskTagFilters");
|
|
24239
24372
|
|
|
24240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
24241
24374
|
var TASK_QUERY = {
|
|
24242
24375
|
entity: "task",
|
|
24243
24376
|
backend: "sql",
|
|
@@ -24737,7 +24870,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
24737
24870
|
};
|
|
24738
24871
|
}, "taskView");
|
|
24739
24872
|
|
|
24740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
24741
24874
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
24742
24875
|
if (newest === null)
|
|
24743
24876
|
return null;
|
|
@@ -24746,7 +24879,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
24746
24879
|
return newest.addressed ? "owed" : null;
|
|
24747
24880
|
}, "mailTurn");
|
|
24748
24881
|
|
|
24749
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
24750
24883
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
24751
24884
|
if (error instanceof CliError && error.code === "not_found")
|
|
24752
24885
|
return void 0;
|
|
@@ -24804,7 +24937,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
24804
24937
|
};
|
|
24805
24938
|
}, "mailActivity");
|
|
24806
24939
|
|
|
24807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
24808
24941
|
var DAY2 = 864e5;
|
|
24809
24942
|
var AGENDA_DEFAULTS = { unanswered: DAY2, waiting: 7 * DAY2 };
|
|
24810
24943
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -25058,18 +25191,18 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
25058
25191
|
};
|
|
25059
25192
|
}, "agendaItem");
|
|
25060
25193
|
|
|
25061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25062
25195
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25063
25196
|
|
|
25064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25065
25198
|
import { lstat } from "node:fs/promises";
|
|
25066
25199
|
|
|
25067
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25200
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25068
25201
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
25069
25202
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25070
25203
|
import { join as join5 } from "node:path";
|
|
25071
25204
|
|
|
25072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25073
25206
|
import { createHash as createHash3 } from "node:crypto";
|
|
25074
25207
|
var metadataLimit = 16384;
|
|
25075
25208
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -25129,7 +25262,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
25129
25262
|
}
|
|
25130
25263
|
}, "readPartialMetadata");
|
|
25131
25264
|
|
|
25132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
25133
25266
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
25134
25267
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
25135
25268
|
import { join as join4 } from "node:path";
|
|
@@ -25221,7 +25354,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
25221
25354
|
};
|
|
25222
25355
|
}, "partialWriter");
|
|
25223
25356
|
|
|
25224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25225
25358
|
var NativeRecordingPartialStore = class {
|
|
25226
25359
|
static {
|
|
25227
25360
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -25328,12 +25461,12 @@ var NativeRecordingPartialStore = class {
|
|
|
25328
25461
|
}
|
|
25329
25462
|
};
|
|
25330
25463
|
|
|
25331
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
25332
25465
|
import { createHash as createHash5 } from "node:crypto";
|
|
25333
25466
|
import { link as link2 } from "node:fs/promises";
|
|
25334
25467
|
import { basename as basename2, dirname as dirname5, join as join7, resolve as resolve2 } from "node:path";
|
|
25335
25468
|
|
|
25336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
25337
25470
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
25338
25471
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
25339
25472
|
signal?.throwIfAborted();
|
|
@@ -25368,7 +25501,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
25368
25501
|
signal?.throwIfAborted();
|
|
25369
25502
|
}, "commitPublication");
|
|
25370
25503
|
|
|
25371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
25372
25505
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
25373
25506
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
25374
25507
|
import { join as join6 } from "node:path";
|
|
@@ -25441,7 +25574,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
25441
25574
|
}
|
|
25442
25575
|
}, "writePublicationJournal");
|
|
25443
25576
|
|
|
25444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
25445
25578
|
var NativeRecordingPublication = class {
|
|
25446
25579
|
static {
|
|
25447
25580
|
__name(this, "NativeRecordingPublication");
|
|
@@ -25514,7 +25647,7 @@ var NativeRecordingPublication = class {
|
|
|
25514
25647
|
}
|
|
25515
25648
|
};
|
|
25516
25649
|
|
|
25517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
25518
25651
|
import { createHash as createHash6 } from "node:crypto";
|
|
25519
25652
|
import { readdir } from "node:fs/promises";
|
|
25520
25653
|
import { isAbsolute as isAbsolute2, join as join8, resolve as resolve3 } from "node:path";
|
|
@@ -25601,7 +25734,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
25601
25734
|
beforePublish
|
|
25602
25735
|
}), "commitMediaEntry");
|
|
25603
25736
|
|
|
25604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25605
25738
|
var validator = '"media-completed-v1"';
|
|
25606
25739
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
25607
25740
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file, beforeWrite, signal, metadata = {}) => {
|
|
@@ -25702,7 +25835,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file,
|
|
|
25702
25835
|
return entry;
|
|
25703
25836
|
}, "archiveMediaFile");
|
|
25704
25837
|
|
|
25705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25838
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
25706
25839
|
import { mkdir, realpath } from "node:fs/promises";
|
|
25707
25840
|
import { join as join9, resolve as resolve4 } from "node:path";
|
|
25708
25841
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -25769,7 +25902,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
25769
25902
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
25770
25903
|
}, "withMediaArchiveLocks");
|
|
25771
25904
|
|
|
25772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25773
25906
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
25774
25907
|
if (value === void 0)
|
|
25775
25908
|
return void 0;
|
|
@@ -25922,7 +26055,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options2) => {
|
|
|
25922
26055
|
}, { create: true });
|
|
25923
26056
|
}, "archiveMedia");
|
|
25924
26057
|
|
|
25925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26058
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
25926
26059
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
25927
26060
|
import { basename as basename3, dirname as dirname6, join as join10, resolve as resolve5 } from "node:path";
|
|
25928
26061
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -26075,7 +26208,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options2) => {
|
|
|
26075
26208
|
}, { additional: [target2], createAdditional: !options2.dryRun });
|
|
26076
26209
|
}, "moveMediaArchive");
|
|
26077
26210
|
|
|
26078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
26079
26212
|
import { writeFileSync as writeFileSync2 } from "node:fs";
|
|
26080
26213
|
import { join as join11 } from "node:path";
|
|
26081
26214
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file) => sum2 + file.bytes, 0), "bytesOf");
|
|
@@ -26100,7 +26233,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26100
26233
|
`);
|
|
26101
26234
|
await nativeRuntime({ env, progress });
|
|
26102
26235
|
progress(`${model.id}: loading it once to check it works`);
|
|
26103
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
26236
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-OIMT6SAX.js");
|
|
26104
26237
|
const embedder = await openEmbedder2(model, directory2);
|
|
26105
26238
|
try {
|
|
26106
26239
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -26121,7 +26254,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
26121
26254
|
}
|
|
26122
26255
|
await nativeRuntime({ env, progress });
|
|
26123
26256
|
progress(`${model.id}: loading it once to check it works`);
|
|
26124
|
-
const { openReranker } = await import("./rerank-
|
|
26257
|
+
const { openReranker } = await import("./rerank-A5X6THV6.js");
|
|
26125
26258
|
const reranker = await openReranker(model, directory2);
|
|
26126
26259
|
try {
|
|
26127
26260
|
await reranker.score("check", ["check"]);
|
|
@@ -26139,7 +26272,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26139
26272
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
26140
26273
|
}
|
|
26141
26274
|
progress(`${model.id}: loading it once to check it works`);
|
|
26142
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
26275
|
+
const { openPictureEmbedder } = await import("./embedder-Q5IF5WIM.js");
|
|
26143
26276
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
26144
26277
|
try {
|
|
26145
26278
|
const vector = await embedder.embedQuery("check");
|
|
@@ -26151,7 +26284,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26151
26284
|
return { model, directory: directory2 };
|
|
26152
26285
|
}, "downloadImageModel");
|
|
26153
26286
|
|
|
26154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
26155
26288
|
var MONEY_REQUEST = "money-request";
|
|
26156
26289
|
var MONEY_DONE = "money-done";
|
|
26157
26290
|
var PROMISE = "promise";
|
|
@@ -26185,10 +26318,10 @@ var MONEY_WORDS = [
|
|
|
26185
26318
|
}
|
|
26186
26319
|
];
|
|
26187
26320
|
|
|
26188
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
26189
26322
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
26190
26323
|
|
|
26191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
26192
26325
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
26193
26326
|
var MONEY_DONE_FORMS = words([
|
|
26194
26327
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -26228,7 +26361,7 @@ var PROMISE_FORMS = words([
|
|
|
26228
26361
|
"estar\xE1 listo"
|
|
26229
26362
|
]);
|
|
26230
26363
|
|
|
26231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
26232
26365
|
var EXCERPT_CHARS = 80;
|
|
26233
26366
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
26234
26367
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -26250,7 +26383,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
26250
26383
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
26251
26384
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
26252
26385
|
|
|
26253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
26254
26387
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
26255
26388
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
26256
26389
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -26331,7 +26464,7 @@ var amounts = {
|
|
|
26331
26464
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
26332
26465
|
};
|
|
26333
26466
|
|
|
26334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
26335
26468
|
var children = {
|
|
26336
26469
|
id: "children",
|
|
26337
26470
|
version: 1,
|
|
@@ -26360,7 +26493,7 @@ var children = {
|
|
|
26360
26493
|
}, "read")
|
|
26361
26494
|
};
|
|
26362
26495
|
|
|
26363
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
26364
26497
|
var coverage = {
|
|
26365
26498
|
id: "coverage",
|
|
26366
26499
|
version: 1,
|
|
@@ -26389,7 +26522,7 @@ var coverage = {
|
|
|
26389
26522
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
|
|
26390
26523
|
};
|
|
26391
26524
|
|
|
26392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26525
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
26393
26526
|
var holding2 = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
26394
26527
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
26395
26528
|
signal: "payments",
|
|
@@ -26439,7 +26572,7 @@ var payments = {
|
|
|
26439
26572
|
}, "read")
|
|
26440
26573
|
};
|
|
26441
26574
|
|
|
26442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
26443
26576
|
var PATTERNS_PER_CHAT = 3;
|
|
26444
26577
|
var DAY3 = 864e5;
|
|
26445
26578
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -26528,7 +26661,7 @@ var promises = {
|
|
|
26528
26661
|
}, "read")
|
|
26529
26662
|
};
|
|
26530
26663
|
|
|
26531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
26532
26665
|
var PER_SIDE = 5;
|
|
26533
26666
|
var WEEK = 7 * 864e5;
|
|
26534
26667
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26559,7 +26692,7 @@ var questions2 = {
|
|
|
26559
26692
|
}, "attention")
|
|
26560
26693
|
};
|
|
26561
26694
|
|
|
26562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26695
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26563
26696
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26564
26697
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
26565
26698
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -26627,7 +26760,7 @@ var replyNext = {
|
|
|
26627
26760
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
26628
26761
|
};
|
|
26629
26762
|
|
|
26630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
26631
26764
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
26632
26765
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
26633
26766
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -26673,7 +26806,7 @@ var topics = {
|
|
|
26673
26806
|
}, "read")
|
|
26674
26807
|
};
|
|
26675
26808
|
|
|
26676
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
26677
26810
|
var STATUS_SIGNALS = [
|
|
26678
26811
|
replyNext,
|
|
26679
26812
|
questions2,
|
|
@@ -26685,7 +26818,7 @@ var STATUS_SIGNALS = [
|
|
|
26685
26818
|
children
|
|
26686
26819
|
];
|
|
26687
26820
|
|
|
26688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
26689
26822
|
var DAY4 = 864e5;
|
|
26690
26823
|
var STATUS_WINDOW = 300;
|
|
26691
26824
|
var STATUS_CHATS = 16;
|
|
@@ -26874,7 +27007,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26874
27007
|
};
|
|
26875
27008
|
}, "projectStatus");
|
|
26876
27009
|
|
|
26877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
26878
27011
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
26879
27012
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
26880
27013
|
if (deps.offline)
|
|
@@ -26946,7 +27079,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
26946
27079
|
};
|
|
26947
27080
|
}, "accountService");
|
|
26948
27081
|
|
|
26949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27082
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
26950
27083
|
var MINUTE = 6e4;
|
|
26951
27084
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
26952
27085
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -26965,7 +27098,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
26965
27098
|
return new Date(at - at % MINUTE).toISOString();
|
|
26966
27099
|
}, "sendTime");
|
|
26967
27100
|
|
|
26968
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
26969
27102
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
26970
27103
|
try {
|
|
26971
27104
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -27212,7 +27345,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
27212
27345
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
27213
27346
|
}, "linkLimits");
|
|
27214
27347
|
|
|
27215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
27216
27349
|
var THREADS_PAGE = 500;
|
|
27217
27350
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
27218
27351
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -27291,7 +27424,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
27291
27424
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
27292
27425
|
}, "readMail");
|
|
27293
27426
|
|
|
27294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
27295
27428
|
var PERSON_FIELDS = /* @__PURE__ */ new Set(["from", "to", "cc", "bcc"]);
|
|
27296
27429
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list"]);
|
|
27297
27430
|
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");
|
|
@@ -27375,9 +27508,7 @@ var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messe
|
|
|
27375
27508
|
if (node.field === "date")
|
|
27376
27509
|
return {
|
|
27377
27510
|
...node,
|
|
27378
|
-
resolution: {
|
|
27379
|
-
date: dateRange(node.value, node.operator === "range" ? node.upper ?? "*" : node.value, node.operator === "range" ? node.lower_inclusive === true : true, node.operator === "range" ? node.upper_inclusive === true : true, timezone, node.span)
|
|
27380
|
-
}
|
|
27511
|
+
resolution: { date: rangeOf(node, timezone) }
|
|
27381
27512
|
};
|
|
27382
27513
|
return node;
|
|
27383
27514
|
}, "resolve");
|
|
@@ -27660,7 +27791,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
27660
27791
|
};
|
|
27661
27792
|
}, "statsLucene");
|
|
27662
27793
|
|
|
27663
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
27664
27795
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
27665
27796
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
27666
27797
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -27829,7 +27960,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27829
27960
|
};
|
|
27830
27961
|
}, "readRankingSelection");
|
|
27831
27962
|
|
|
27832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
27833
27964
|
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");
|
|
27834
27965
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
27835
27966
|
command,
|
|
@@ -27839,7 +27970,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
27839
27970
|
fieldsVersion: FIELD_VERSION
|
|
27840
27971
|
}), "searchRecordOf");
|
|
27841
27972
|
|
|
27842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
27843
27974
|
function invalid2(message) {
|
|
27844
27975
|
throw new CliError("validation_error", message);
|
|
27845
27976
|
}
|
|
@@ -28133,7 +28264,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28133
28264
|
}, "evidence")
|
|
28134
28265
|
}), "adminStatisticsService");
|
|
28135
28266
|
|
|
28136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
28137
28268
|
import { createHash as createHash7, randomUUID as randomUUID5 } from "node:crypto";
|
|
28138
28269
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
28139
28270
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
@@ -28270,12 +28401,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
28270
28401
|
return { plan, repair };
|
|
28271
28402
|
}, "gapsService");
|
|
28272
28403
|
|
|
28273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28274
28405
|
import { createHash as createHash10 } from "node:crypto";
|
|
28275
28406
|
import { constants as constants2, mkdirSync as mkdirSync5 } from "node:fs";
|
|
28276
28407
|
import { lstat as lstat5, open as open6, readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
28277
28408
|
|
|
28278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
28279
28410
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
28280
28411
|
import { basename as basename4, join as join12, relative as relative2, sep as sep2 } from "node:path";
|
|
28281
28412
|
var MAX_FILES = 1e4;
|
|
@@ -28346,21 +28477,21 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
28346
28477
|
return choices;
|
|
28347
28478
|
}, "directoryPaths");
|
|
28348
28479
|
|
|
28349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28480
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28350
28481
|
import { posix } from "node:path";
|
|
28351
28482
|
|
|
28352
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28353
28484
|
import { setImmediate as tick } from "node:timers/promises";
|
|
28354
28485
|
import { crc32 } from "node:zlib";
|
|
28355
28486
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
28356
28487
|
|
|
28357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28488
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
28358
28489
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
28359
28490
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
28360
28491
|
var SAMPLE = 65536;
|
|
28361
28492
|
var invalidText = /* @__PURE__ */ __name((text2) => {
|
|
28362
|
-
for (const
|
|
28363
|
-
const code =
|
|
28493
|
+
for (const character2 of text2) {
|
|
28494
|
+
const code = character2.charCodeAt(0);
|
|
28364
28495
|
if (code < 9 || code === 11 || code > 13 && code < 32 || code >= 127 && code <= 159)
|
|
28365
28496
|
return true;
|
|
28366
28497
|
}
|
|
@@ -28456,7 +28587,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
28456
28587
|
return result.text;
|
|
28457
28588
|
}, "decodeXml");
|
|
28458
28589
|
|
|
28459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28590
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28460
28591
|
var MAX_PART = 10 * 1024 * 1024;
|
|
28461
28592
|
var MAX_ENTRIES = 1e3;
|
|
28462
28593
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28469,7 +28600,7 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
28469
28600
|
if (signal?.aborted)
|
|
28470
28601
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
28471
28602
|
}, "cancelled");
|
|
28472
|
-
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((
|
|
28603
|
+
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character2) => character2.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
28473
28604
|
var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
28474
28605
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
28475
28606
|
let end = -1;
|
|
@@ -28671,7 +28802,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
28671
28802
|
return found;
|
|
28672
28803
|
}, "elements");
|
|
28673
28804
|
|
|
28674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
28675
28806
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
28676
28807
|
let name = "";
|
|
28677
28808
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -28726,7 +28857,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
28726
28857
|
return { text: parts.join("").trim(), truncated: false };
|
|
28727
28858
|
}, "sheetText");
|
|
28728
28859
|
|
|
28729
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28730
28861
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
28731
28862
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
28732
28863
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -28801,7 +28932,7 @@ var rootIs = /* @__PURE__ */ __name((node, name, namespaces) => {
|
|
|
28801
28932
|
}, "rootIs");
|
|
28802
28933
|
var target = /* @__PURE__ */ __name((owner, reference) => {
|
|
28803
28934
|
const decoded = decodeURIComponent(reference.split(/[?#]/)[0] ?? "");
|
|
28804
|
-
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(decoded) || [...decoded].some((
|
|
28935
|
+
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(decoded) || [...decoded].some((character2) => character2.charCodeAt(0) < 32))
|
|
28805
28936
|
throw new Error("external_part");
|
|
28806
28937
|
const path = posix.normalize(posix.join(posix.dirname(owner), decoded));
|
|
28807
28938
|
if (path.startsWith("../") || !path || path === ".")
|
|
@@ -29126,10 +29257,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
29126
29257
|
}
|
|
29127
29258
|
}, "readDocument");
|
|
29128
29259
|
|
|
29129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29130
29261
|
import { extname as extname3 } from "node:path";
|
|
29131
29262
|
|
|
29132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
29133
29264
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
29134
29265
|
import { dirname as dirname7, extname as extname2, join as join13 } from "node:path";
|
|
29135
29266
|
import { fileURLToPath } from "node:url";
|
|
@@ -29190,7 +29321,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
29190
29321
|
}
|
|
29191
29322
|
}, "derived");
|
|
29192
29323
|
|
|
29193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29324
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
29194
29325
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
29195
29326
|
var image2 = {
|
|
29196
29327
|
id: "image",
|
|
@@ -29199,7 +29330,7 @@ var image2 = {
|
|
|
29199
29330
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
29200
29331
|
};
|
|
29201
29332
|
|
|
29202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
29203
29334
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
29204
29335
|
var doc = {
|
|
29205
29336
|
id: "doc",
|
|
@@ -29211,7 +29342,7 @@ var doc = {
|
|
|
29211
29342
|
}), "read")
|
|
29212
29343
|
};
|
|
29213
29344
|
|
|
29214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29345
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
29215
29346
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
29216
29347
|
var docx = {
|
|
29217
29348
|
id: "docx",
|
|
@@ -29224,8 +29355,62 @@ var docx = {
|
|
|
29224
29355
|
}), "read")
|
|
29225
29356
|
};
|
|
29226
29357
|
|
|
29227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
29228
29359
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
29360
|
+
|
|
29361
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/html-entities.js
|
|
29362
|
+
var NAMED = {
|
|
29363
|
+
amp: "&",
|
|
29364
|
+
lt: "<",
|
|
29365
|
+
gt: ">",
|
|
29366
|
+
quot: '"',
|
|
29367
|
+
apos: "'",
|
|
29368
|
+
nbsp: "\xA0",
|
|
29369
|
+
shy: "\xAD",
|
|
29370
|
+
ensp: "\u2002",
|
|
29371
|
+
emsp: "\u2003",
|
|
29372
|
+
thinsp: "\u2009",
|
|
29373
|
+
zwnj: "\u200C",
|
|
29374
|
+
zwj: "\u200D",
|
|
29375
|
+
lsquo: "\u2018",
|
|
29376
|
+
rsquo: "\u2019",
|
|
29377
|
+
sbquo: "\u201A",
|
|
29378
|
+
ldquo: "\u201C",
|
|
29379
|
+
rdquo: "\u201D",
|
|
29380
|
+
bdquo: "\u201E",
|
|
29381
|
+
laquo: "\xAB",
|
|
29382
|
+
raquo: "\xBB",
|
|
29383
|
+
lsaquo: "\u2039",
|
|
29384
|
+
rsaquo: "\u203A",
|
|
29385
|
+
ndash: "\u2013",
|
|
29386
|
+
mdash: "\u2014",
|
|
29387
|
+
hellip: "\u2026",
|
|
29388
|
+
bull: "\u2022",
|
|
29389
|
+
middot: "\xB7",
|
|
29390
|
+
copy: "\xA9",
|
|
29391
|
+
reg: "\xAE",
|
|
29392
|
+
trade: "\u2122",
|
|
29393
|
+
euro: "\u20AC",
|
|
29394
|
+
pound: "\xA3",
|
|
29395
|
+
yen: "\xA5",
|
|
29396
|
+
cent: "\xA2",
|
|
29397
|
+
deg: "\xB0",
|
|
29398
|
+
plusmn: "\xB1",
|
|
29399
|
+
times: "\xD7",
|
|
29400
|
+
divide: "\xF7",
|
|
29401
|
+
sect: "\xA7",
|
|
29402
|
+
para: "\xB6",
|
|
29403
|
+
iexcl: "\xA1",
|
|
29404
|
+
iquest: "\xBF"
|
|
29405
|
+
};
|
|
29406
|
+
var character = /* @__PURE__ */ __name((code, entity) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : entity, "character");
|
|
29407
|
+
var decodeEntities = /* @__PURE__ */ __name((text2) => text2.replace(/&(#x[0-9a-f]{1,6}|#\d{1,7}|[a-z]{2,8});/gi, (entity, body) => {
|
|
29408
|
+
if (body[0] !== "#")
|
|
29409
|
+
return NAMED[body] ?? NAMED[body.toLowerCase()] ?? entity;
|
|
29410
|
+
return body[1] === "x" || body[1] === "X" ? character(Number.parseInt(body.slice(2), 16), entity) : character(Number(body.slice(1)), entity);
|
|
29411
|
+
}), "decodeEntities");
|
|
29412
|
+
|
|
29413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
29229
29414
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
29230
29415
|
"fonttbl",
|
|
29231
29416
|
"colortbl",
|
|
@@ -29358,7 +29543,6 @@ var HTML_DROPPED_CLOSE = new Map(["script", "style", "head", "noscript", "templa
|
|
|
29358
29543
|
new RegExp(`<\\/${name}\\s*>`, "gi")
|
|
29359
29544
|
]));
|
|
29360
29545
|
var HTML_BLOCK = /<\/?(p|div|br|li|ul|ol|tr|h[1-6]|blockquote|pre|section|article|header|footer|table|hr)\b[^>]*>/gi;
|
|
29361
|
-
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: "\xA0" };
|
|
29362
29546
|
var replaceTags = /* @__PURE__ */ __name((source, tag, replacement) => {
|
|
29363
29547
|
const end = source.lastIndexOf(">") + 1;
|
|
29364
29548
|
return source.slice(0, end).replace(tag, replacement) + source.slice(end);
|
|
@@ -29389,18 +29573,10 @@ var dropHidden = /* @__PURE__ */ __name((source) => {
|
|
|
29389
29573
|
var htmlText = /* @__PURE__ */ __name((source) => {
|
|
29390
29574
|
const uncommented = source.replace(/<!--[\s\S]*?(-->|$)/g, (comment, close) => close ? "" : comment);
|
|
29391
29575
|
const blocks = replaceTags(dropHidden(uncommented).replace(/<\/t[dh]\s*>/gi, " "), HTML_BLOCK, "\n");
|
|
29392
|
-
return replaceTags(blocks, /<[^>]*>/g, "").replace(
|
|
29393
|
-
const lower = body.toLowerCase();
|
|
29394
|
-
if (lower.startsWith("#x"))
|
|
29395
|
-
return safeChar(Number.parseInt(lower.slice(2), 16), entity);
|
|
29396
|
-
if (lower.startsWith("#"))
|
|
29397
|
-
return safeChar(Number(lower.slice(1)), entity);
|
|
29398
|
-
return ENTITIES[lower] ?? entity;
|
|
29399
|
-
}).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
29576
|
+
return decodeEntities(replaceTags(blocks, /<[^>]*>/g, "")).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
29400
29577
|
}, "htmlText");
|
|
29401
|
-
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
29402
29578
|
|
|
29403
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
29404
29580
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
29405
29581
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
29406
29582
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -29456,7 +29632,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
29456
29632
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
29457
29633
|
}, "markdownSections");
|
|
29458
29634
|
|
|
29459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
29460
29636
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
29461
29637
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
29462
29638
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29527,7 +29703,7 @@ var html = {
|
|
|
29527
29703
|
}, "read")
|
|
29528
29704
|
};
|
|
29529
29705
|
|
|
29530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29531
29707
|
var office = {
|
|
29532
29708
|
id: "office",
|
|
29533
29709
|
version: documentExtractor("odt"),
|
|
@@ -29538,7 +29714,7 @@ var office = {
|
|
|
29538
29714
|
}, "read")
|
|
29539
29715
|
};
|
|
29540
29716
|
|
|
29541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29542
29718
|
var pdf = {
|
|
29543
29719
|
id: "pdf",
|
|
29544
29720
|
version: "unpdf",
|
|
@@ -29605,7 +29781,7 @@ var pdf = {
|
|
|
29605
29781
|
}), "read")
|
|
29606
29782
|
};
|
|
29607
29783
|
|
|
29608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
29609
29785
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
29610
29786
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
29611
29787
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -29625,7 +29801,7 @@ var plain = {
|
|
|
29625
29801
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
29626
29802
|
};
|
|
29627
29803
|
|
|
29628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
29629
29805
|
var rtf = {
|
|
29630
29806
|
id: "rtf",
|
|
29631
29807
|
version: "v1",
|
|
@@ -29633,10 +29809,10 @@ var rtf = {
|
|
|
29633
29809
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
29634
29810
|
};
|
|
29635
29811
|
|
|
29636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29637
29813
|
import { basename as basename5 } from "node:path";
|
|
29638
29814
|
|
|
29639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
29640
29816
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
29641
29817
|
const cells = [];
|
|
29642
29818
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -29674,7 +29850,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
29674
29850
|
return { cells, truncated };
|
|
29675
29851
|
}, "delimitedSpans");
|
|
29676
29852
|
|
|
29677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29678
29854
|
var DELIMITED = {
|
|
29679
29855
|
".csv": ",",
|
|
29680
29856
|
".tsv": " ",
|
|
@@ -29713,7 +29889,7 @@ var sheets = {
|
|
|
29713
29889
|
}, "read")
|
|
29714
29890
|
};
|
|
29715
29891
|
|
|
29716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
29717
29893
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
29718
29894
|
var HEAD_BYTES = 1024;
|
|
29719
29895
|
var readers = [...BUILT_INS2];
|
|
@@ -29723,7 +29899,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
29723
29899
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
29724
29900
|
}, "readWithRegistry");
|
|
29725
29901
|
|
|
29726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29902
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29727
29903
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
29728
29904
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
29729
29905
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -30802,7 +30978,7 @@ function imageSize(input) {
|
|
|
30802
30978
|
}
|
|
30803
30979
|
__name(imageSize, "imageSize");
|
|
30804
30980
|
|
|
30805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30981
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
30806
30982
|
var MAX_PAGES = 20;
|
|
30807
30983
|
var MAX_PIXELS = 2e7;
|
|
30808
30984
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -30962,7 +31138,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
30962
31138
|
}
|
|
30963
31139
|
}, "ocrPdf");
|
|
30964
31140
|
|
|
30965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
30966
31142
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
30967
31143
|
const limits = pdfPreviewLimits(env);
|
|
30968
31144
|
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
@@ -31039,7 +31215,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
31039
31215
|
}
|
|
31040
31216
|
}, "pdfPreview");
|
|
31041
31217
|
|
|
31042
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/picture-reading.js
|
|
31043
31219
|
import { spawn } from "node:child_process";
|
|
31044
31220
|
import { mkdtempSync, readFileSync as readFileSync5, rmSync as rmSync2, writeFileSync as writeFileSync3 } from "node:fs";
|
|
31045
31221
|
import { tmpdir } from "node:os";
|
|
@@ -31202,7 +31378,7 @@ Read the attached picture.`,
|
|
|
31202
31378
|
}
|
|
31203
31379
|
}, "readPictureWithAgent");
|
|
31204
31380
|
|
|
31205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
31206
31382
|
import { createHash as createHash8 } from "node:crypto";
|
|
31207
31383
|
import { constants } from "node:fs";
|
|
31208
31384
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -31310,7 +31486,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
31310
31486
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
31311
31487
|
}, "transferMime");
|
|
31312
31488
|
|
|
31313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
31314
31490
|
import { createWriteStream, mkdirSync as mkdirSync4 } from "node:fs";
|
|
31315
31491
|
import { link as link3, rm } from "node:fs/promises";
|
|
31316
31492
|
import { join as join15, resolve as resolve6 } from "node:path";
|
|
@@ -31424,12 +31600,12 @@ var save = /* @__PURE__ */ __name(async (file, directory2, fallbackName, { uniqu
|
|
|
31424
31600
|
}
|
|
31425
31601
|
}, "save");
|
|
31426
31602
|
|
|
31427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31428
31604
|
import { createHash as createHash9 } from "node:crypto";
|
|
31429
31605
|
import { lstat as lstat4, readFile } from "node:fs/promises";
|
|
31430
31606
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
31431
31607
|
|
|
31432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
31433
31609
|
var GROUP_SETTINGS = [
|
|
31434
31610
|
"allCanPin",
|
|
31435
31611
|
"onlyAdminsAdd",
|
|
@@ -31443,7 +31619,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
31443
31619
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
31444
31620
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
31445
31621
|
|
|
31446
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31447
31623
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
31448
31624
|
var PICTURE_FLOOR = 0.25;
|
|
31449
31625
|
var PAGE3 = 50;
|
|
@@ -31484,7 +31660,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31484
31660
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31485
31661
|
if (!isImageModelInstalled(model2, directory2))
|
|
31486
31662
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31487
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31663
|
+
const { openPictureEmbedder } = await import("./embedder-Q5IF5WIM.js");
|
|
31488
31664
|
return openPictureEmbedder(model2, directory2);
|
|
31489
31665
|
}, "open");
|
|
31490
31666
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -31658,7 +31834,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
31658
31834
|
}, "search")
|
|
31659
31835
|
}), "withPictures");
|
|
31660
31836
|
|
|
31661
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
31662
31838
|
var ATTACHMENT_QUERY = {
|
|
31663
31839
|
entity: "attachment",
|
|
31664
31840
|
backend: "sql",
|
|
@@ -32129,7 +32305,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32129
32305
|
}, "readPicture")
|
|
32130
32306
|
}), "attachmentsService");
|
|
32131
32307
|
|
|
32132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32133
32309
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32134
32310
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32135
32311
|
const store = await accountStore(deps);
|
|
@@ -32159,7 +32335,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32159
32335
|
}, "list")
|
|
32160
32336
|
}), "chatDocumentsService");
|
|
32161
32337
|
|
|
32162
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32163
32339
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32164
32340
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32165
32341
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32246,7 +32422,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32246
32422
|
}
|
|
32247
32423
|
}, "isRetentionSelection");
|
|
32248
32424
|
|
|
32249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32250
32426
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32251
32427
|
const fields = text2.split(",").map((one) => one.trim());
|
|
32252
32428
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -32453,7 +32629,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32453
32629
|
};
|
|
32454
32630
|
}, "countersService");
|
|
32455
32631
|
|
|
32456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
32457
32633
|
var SYNC_KEY = "messages.sync-first";
|
|
32458
32634
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
32459
32635
|
var keyOf3 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -32585,7 +32761,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
32585
32761
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
32586
32762
|
}), "withRefresh");
|
|
32587
32763
|
|
|
32588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32764
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
32589
32765
|
var CANDIDATES = 50;
|
|
32590
32766
|
var WORD_HITS = 200;
|
|
32591
32767
|
var RRF_K = 60;
|
|
@@ -32860,13 +33036,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
32860
33036
|
return mean2.map((value) => value / length);
|
|
32861
33037
|
}, "meanOf");
|
|
32862
33038
|
|
|
32863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
32864
33040
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
32865
33041
|
...embeddingsMaintenance(deps),
|
|
32866
33042
|
...embeddingsSearch(deps)
|
|
32867
33043
|
}), "embeddingsService");
|
|
32868
33044
|
|
|
32869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
32870
33046
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
32871
33047
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
32872
33048
|
if (deps.offline)
|
|
@@ -33007,7 +33183,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33007
33183
|
};
|
|
33008
33184
|
}, "foldersService");
|
|
33009
33185
|
|
|
33010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33011
33187
|
var REVIEW_COUNT = 500;
|
|
33012
33188
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33013
33189
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33086,7 +33262,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33086
33262
|
};
|
|
33087
33263
|
}, "mentionsService");
|
|
33088
33264
|
|
|
33089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33090
33266
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33091
33267
|
position,
|
|
33092
33268
|
kind,
|
|
@@ -33135,7 +33311,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33135
33311
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33136
33312
|
}, "validatePermalink");
|
|
33137
33313
|
|
|
33138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33139
33315
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33140
33316
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33141
33317
|
return `${seconds / 86400}d`;
|
|
@@ -33167,7 +33343,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33167
33343
|
return seconds;
|
|
33168
33344
|
}, "pinDurationOf");
|
|
33169
33345
|
|
|
33170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33171
33347
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33172
33348
|
if (sendAs === void 0) {
|
|
33173
33349
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33192,7 +33368,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33192
33368
|
return sendAs;
|
|
33193
33369
|
}, "typedSendAs");
|
|
33194
33370
|
|
|
33195
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33196
33372
|
var TOTAL_CAP = 1e4;
|
|
33197
33373
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33198
33374
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33203,7 +33379,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33203
33379
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33204
33380
|
}, "totalOf");
|
|
33205
33381
|
|
|
33206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33382
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33207
33383
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33208
33384
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33209
33385
|
let narrows = false;
|
|
@@ -33232,7 +33408,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33232
33408
|
return wanted(root).join(" ").trim();
|
|
33233
33409
|
}, "meaningWords");
|
|
33234
33410
|
|
|
33235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33236
33412
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33237
33413
|
var scaffolding = new Set(words2("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
33238
33414
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -33365,7 +33541,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
33365
33541
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
33366
33542
|
}, "questionLookup");
|
|
33367
33543
|
|
|
33368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
33369
33545
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
33370
33546
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
33371
33547
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options2 = COMBINED_DEFAULTS) => {
|
|
@@ -33541,11 +33717,11 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
33541
33717
|
const events = positions.flatMap((matches, term) => matches.map(({ index }) => ({ index, term }))).sort((a, b) => a.index - b.index);
|
|
33542
33718
|
const held = /* @__PURE__ */ new Map();
|
|
33543
33719
|
let left = 0, span = Infinity;
|
|
33544
|
-
for (const [right,
|
|
33545
|
-
held.set(
|
|
33720
|
+
for (const [right, event2] of events.entries()) {
|
|
33721
|
+
held.set(event2.term, (held.get(event2.term) ?? 0) + 1);
|
|
33546
33722
|
while (held.size === terms.length && left <= right) {
|
|
33547
33723
|
const first2 = events[left];
|
|
33548
|
-
span = Math.min(span,
|
|
33724
|
+
span = Math.min(span, event2.index - first2.index + 1);
|
|
33549
33725
|
const count4 = (held.get(first2.term) ?? 1) - 1;
|
|
33550
33726
|
if (count4)
|
|
33551
33727
|
held.set(first2.term, count4);
|
|
@@ -33559,7 +33735,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
33559
33735
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
33560
33736
|
}, "signals");
|
|
33561
33737
|
|
|
33562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33738
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
33563
33739
|
var MEANING_DEPTH = 100;
|
|
33564
33740
|
var RRF_K2 = 60;
|
|
33565
33741
|
var RERANK_DEPTH = 50;
|
|
@@ -33885,7 +34061,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
33885
34061
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
33886
34062
|
}, "mixedWithReranker");
|
|
33887
34063
|
|
|
33888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
33889
34065
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
33890
34066
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
33891
34067
|
var threadBounds = /* @__PURE__ */ __name((options2 = {}) => {
|
|
@@ -34084,7 +34260,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34084
34260
|
return result;
|
|
34085
34261
|
}, "readThreadContext");
|
|
34086
34262
|
|
|
34087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34088
34264
|
var SEARCH_FILL_MS = 200;
|
|
34089
34265
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34090
34266
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34153,7 +34329,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34153
34329
|
}, "accountOf");
|
|
34154
34330
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34155
34331
|
|
|
34156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meaning-model.js
|
|
34157
34333
|
var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
34158
34334
|
const chosen = chosenTextModel(env);
|
|
34159
34335
|
if (chosen.from === "chosen" || chosen.id !== DEFAULT_TEXT_MODEL)
|
|
@@ -34168,7 +34344,7 @@ var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
|
34168
34344
|
return (counts.get(before2) ?? 0) > (counts.get(now) ?? 0) ? previous.id : current.id;
|
|
34169
34345
|
}, "meaningModel");
|
|
34170
34346
|
|
|
34171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
34172
34348
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
34173
34349
|
try {
|
|
34174
34350
|
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -34247,7 +34423,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
34247
34423
|
}
|
|
34248
34424
|
}, "meaningLane");
|
|
34249
34425
|
|
|
34250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34426
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
34251
34427
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
34252
34428
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
34253
34429
|
if (choice === "off")
|
|
@@ -34259,9 +34435,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34259
34435
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
34260
34436
|
try {
|
|
34261
34437
|
const warm = deps.embedders;
|
|
34262
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
34438
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-MFC5VSPT.js")).openRerankerProcess(model, directory2, {
|
|
34263
34439
|
threads: defaultThreads()
|
|
34264
|
-
})) : await (await import("./rerank-
|
|
34440
|
+
})) : await (await import("./rerank-A5X6THV6.js")).openReranker(model, directory2);
|
|
34265
34441
|
return {
|
|
34266
34442
|
model: model.id,
|
|
34267
34443
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -34281,7 +34457,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34281
34457
|
};
|
|
34282
34458
|
}, "rerankLane");
|
|
34283
34459
|
|
|
34284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/search/question-period.js
|
|
34285
34461
|
var DAY5 = 864e5;
|
|
34286
34462
|
var SPAN = { start: 0, end: 0 };
|
|
34287
34463
|
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
@@ -34406,17 +34582,17 @@ var questionPeriod = /* @__PURE__ */ __name((text2, now, zone) => {
|
|
|
34406
34582
|
};
|
|
34407
34583
|
}, "questionPeriod");
|
|
34408
34584
|
|
|
34409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
34410
34586
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
34411
34587
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
34412
34588
|
const directory2 = imageModelsDirectory(env);
|
|
34413
34589
|
if (!isImageModelInstalled(model, directory2))
|
|
34414
34590
|
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 });
|
|
34415
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34591
|
+
const { openPictureEmbedder } = await import("./embedder-Q5IF5WIM.js");
|
|
34416
34592
|
return openPictureEmbedder(model, directory2);
|
|
34417
34593
|
}, "openPictureEmbedderFor");
|
|
34418
34594
|
|
|
34419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
34420
34596
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) => {
|
|
34421
34597
|
const metadata = note.frontMatter;
|
|
34422
34598
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -34438,7 +34614,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file) =>
|
|
|
34438
34614
|
};
|
|
34439
34615
|
}, "documentSource");
|
|
34440
34616
|
|
|
34441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
34442
34618
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
34443
34619
|
const host = new URL(baseUrl).host;
|
|
34444
34620
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -34471,7 +34647,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
34471
34647
|
};
|
|
34472
34648
|
}, "embeddingKeys");
|
|
34473
34649
|
|
|
34474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
34475
34651
|
var options = strictObject({
|
|
34476
34652
|
temperature: range(0, 2),
|
|
34477
34653
|
top_p: range(0, 1),
|
|
@@ -34538,7 +34714,7 @@ var openai = {
|
|
|
34538
34714
|
}), "complete")
|
|
34539
34715
|
};
|
|
34540
34716
|
|
|
34541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
34542
34718
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
34543
34719
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
34544
34720
|
if (deps.signal?.aborted)
|
|
@@ -34553,7 +34729,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
34553
34729
|
if (!adapter && target2.provider === "openai")
|
|
34554
34730
|
adapter = openai;
|
|
34555
34731
|
if (!adapter && target2.provider === "anthropic")
|
|
34556
|
-
adapter = (await import("./anthropic-
|
|
34732
|
+
adapter = (await import("./anthropic-3MSWVYCE.js")).anthropic;
|
|
34557
34733
|
if (!adapter)
|
|
34558
34734
|
throw new CliError("validation_error", `no model adapter for ${target2.provider}`);
|
|
34559
34735
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -34613,7 +34789,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
34613
34789
|
}, "complete")
|
|
34614
34790
|
}), "modelGateway");
|
|
34615
34791
|
|
|
34616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/enrichment-setting.js
|
|
34617
34793
|
var SECTION2 = "enrichment";
|
|
34618
34794
|
var ENRICHMENT_PROVIDERS = ["openai", "anthropic"];
|
|
34619
34795
|
var DEFAULT_BASE_URLS = {
|
|
@@ -34688,7 +34864,7 @@ var costOf = /* @__PURE__ */ __name((usage, setting) => {
|
|
|
34688
34864
|
return price ? Math.round((usage.input * price.input + usage.output * price.output) * 1e6) / 1e6 : null;
|
|
34689
34865
|
}, "costOf");
|
|
34690
34866
|
|
|
34691
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/enrichment.js
|
|
34692
34868
|
var ENRICH_PER_RUN = 600;
|
|
34693
34869
|
var MAX_LINE = 400;
|
|
34694
34870
|
var line2 = pipe(unknown(), transform((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim().slice(0, MAX_LINE) : ""));
|
|
@@ -34764,7 +34940,7 @@ var enrichmentState = /* @__PURE__ */ __name(async (store, env, estimateFor, key
|
|
|
34764
34940
|
};
|
|
34765
34941
|
}, "enrichmentState");
|
|
34766
34942
|
|
|
34767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34943
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
34768
34944
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
34769
34945
|
let root;
|
|
34770
34946
|
try {
|
|
@@ -34791,7 +34967,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
34791
34967
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
34792
34968
|
}, "titleTiers");
|
|
34793
34969
|
|
|
34794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
34795
34971
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
34796
34972
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
34797
34973
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35220,7 +35396,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35220
35396
|
};
|
|
35221
35397
|
}, "searchNotesOf");
|
|
35222
35398
|
|
|
35223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35224
35400
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35225
35401
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35226
35402
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -35253,7 +35429,7 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
|
|
|
35253
35429
|
const floor = meaningFloor(key);
|
|
35254
35430
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
35255
35431
|
}, "nearestEvents");
|
|
35256
|
-
var keyOf5 = /* @__PURE__ */ __name(({ event }) =>
|
|
35432
|
+
var keyOf5 = /* @__PURE__ */ __name(({ event: event2 }) => event2.eventSeriesId === null ? `e${event2.id}` : `s${event2.eventSeriesId}`, "keyOf");
|
|
35257
35433
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
35258
35434
|
if (!query.trim())
|
|
35259
35435
|
throw new CliError("validation_error", "say what to find in the events");
|
|
@@ -35338,7 +35514,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35338
35514
|
};
|
|
35339
35515
|
}, "searchEvents");
|
|
35340
35516
|
|
|
35341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
35342
35518
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
35343
35519
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
35344
35520
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -35368,7 +35544,7 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words3, anyWo
|
|
|
35368
35544
|
};
|
|
35369
35545
|
}, "searchBusiness");
|
|
35370
35546
|
|
|
35371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
35372
35548
|
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
35373
35549
|
const { project, tag, topic, ...input } = request;
|
|
35374
35550
|
input.signal?.throwIfAborted();
|
|
@@ -35406,7 +35582,7 @@ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35406
35582
|
return { input, selection };
|
|
35407
35583
|
}, "resolveMeetingSelection");
|
|
35408
35584
|
|
|
35409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
35410
35586
|
var MOST_HITS_PER_MEETING = 3;
|
|
35411
35587
|
var PAGE_ROWS = 200;
|
|
35412
35588
|
var MOST_PAGES = 25;
|
|
@@ -35634,7 +35810,7 @@ var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
|
35634
35810
|
foundBy: ["title"]
|
|
35635
35811
|
}), "titleItem");
|
|
35636
35812
|
|
|
35637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-harder.js
|
|
35638
35814
|
var SECTION3 = "search_harder";
|
|
35639
35815
|
var HARDER_MODELS = {
|
|
35640
35816
|
anthropic: "claude-haiku-5-5",
|
|
@@ -35880,7 +36056,7 @@ var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { laterPage, a
|
|
|
35880
36056
|
};
|
|
35881
36057
|
}, "reorderHarder");
|
|
35882
36058
|
|
|
35883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
35884
36060
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm", "business", "meetings"];
|
|
35885
36061
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
35886
36062
|
const { reason, span } = error.details ?? {};
|
|
@@ -36293,7 +36469,7 @@ var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
|
36293
36469
|
return ordered.map((item2, rank) => ({ item: item2, score: 1 - rank / PERIOD_DEPTH + (inside2(item2) ? PERIOD_BOOST : 0) })).sort((a, b) => b.score - a.score).map(({ item: item2 }) => item2);
|
|
36294
36470
|
}, "insidePeriodFirst");
|
|
36295
36471
|
|
|
36296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36297
36473
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36298
36474
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36299
36475
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36316,31 +36492,37 @@ var merge = /* @__PURE__ */ __name((one, other) => {
|
|
|
36316
36492
|
};
|
|
36317
36493
|
}, "merge");
|
|
36318
36494
|
var sameAccount4 = /* @__PURE__ */ __name((one, other) => one.provider === other.provider && one.account === other.account, "sameAccount");
|
|
36319
|
-
var
|
|
36320
|
-
|
|
36321
|
-
|
|
36322
|
-
|
|
36495
|
+
var serverReads = /* @__PURE__ */ __name((account) => ({
|
|
36496
|
+
fields: {
|
|
36497
|
+
text: ["term", "phrase"],
|
|
36498
|
+
exact: ["term", "phrase"],
|
|
36499
|
+
chat: ["term", "phrase"],
|
|
36500
|
+
from: ["term", "phrase"],
|
|
36501
|
+
date: ["term", "range"]
|
|
36502
|
+
},
|
|
36503
|
+
maxCalls: SERVER_BOUNDS.maxCalls,
|
|
36504
|
+
all: { words: [] },
|
|
36505
|
+
leaf: /* @__PURE__ */ __name((node) => {
|
|
36506
|
+
if (node.field === "text" || node.field === "exact")
|
|
36507
|
+
return { words: node.value === "" ? [] : [node.value] };
|
|
36323
36508
|
const { chat, sender, date: date2 } = node.resolution ?? {};
|
|
36324
36509
|
if (chat)
|
|
36325
|
-
return sameAccount4(chat.account, account) ?
|
|
36510
|
+
return sameAccount4(chat.account, account) ? { words: [], chat: chat.chatId } : void 0;
|
|
36326
36511
|
if (sender?.provider === account.provider)
|
|
36327
|
-
return
|
|
36328
|
-
if (date2)
|
|
36329
|
-
|
|
36330
|
-
|
|
36331
|
-
|
|
36332
|
-
|
|
36333
|
-
|
|
36334
|
-
|
|
36335
|
-
|
|
36336
|
-
return
|
|
36337
|
-
}
|
|
36338
|
-
|
|
36339
|
-
|
|
36340
|
-
|
|
36341
|
-
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
36342
|
-
return should.length ? should.flatMap(({ node: node2 }) => branchesOf(node2, account)) : [{ words: [] }];
|
|
36343
|
-
}, "branchesOf");
|
|
36512
|
+
return { words: [], from: sender.id };
|
|
36513
|
+
if (date2) {
|
|
36514
|
+
const { from, to } = windowOf(date2);
|
|
36515
|
+
return {
|
|
36516
|
+
words: [],
|
|
36517
|
+
...from === void 0 ? {} : { minDate: from },
|
|
36518
|
+
...to === void 0 ? {} : { maxDate: to }
|
|
36519
|
+
};
|
|
36520
|
+
}
|
|
36521
|
+
return { words: [] };
|
|
36522
|
+
}, "leaf"),
|
|
36523
|
+
both: merge,
|
|
36524
|
+
sends: /* @__PURE__ */ __name(({ words: words3 }) => words3.length > 0, "sends")
|
|
36525
|
+
}), "serverReads");
|
|
36344
36526
|
var asQuery = /* @__PURE__ */ __name(({ words: words3, from, ...rest }) => ({
|
|
36345
36527
|
text: words3.join(" "),
|
|
36346
36528
|
...rest,
|
|
@@ -36397,15 +36579,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36397
36579
|
const scoped = execution.chat ? sameAccount4(execution.chat.account, account) ? { words: [], chat: execution.chat.chatId } : void 0 : { words: [] };
|
|
36398
36580
|
if (!scoped)
|
|
36399
36581
|
return skip("other_accounts");
|
|
36400
|
-
const
|
|
36401
|
-
|
|
36402
|
-
...new Map(all.filter(({ words: words3 }) => words3.length).map((branch) => [JSON.stringify(branch), branch])).values()
|
|
36403
|
-
];
|
|
36404
|
-
if (!unique.length)
|
|
36582
|
+
const { calls, complete } = serviceCallsOf(execution.root, serverReads(account), scoped);
|
|
36583
|
+
if (!calls.length)
|
|
36405
36584
|
return skip("no_words");
|
|
36406
|
-
if (deps.messenger.serverSearch === "chat" &&
|
|
36585
|
+
if (deps.messenger.serverSearch === "chat" && calls.some(({ chat }) => chat === void 0))
|
|
36407
36586
|
return skip("needs_chat");
|
|
36408
|
-
if (
|
|
36587
|
+
if (!complete)
|
|
36409
36588
|
report.complete = false;
|
|
36410
36589
|
const controller = new AbortController();
|
|
36411
36590
|
const timer = setTimeout(() => controller.abort(), timeMs);
|
|
@@ -36415,7 +36594,6 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36415
36594
|
resolve7(BOUND);
|
|
36416
36595
|
stop.addEventListener("abort", () => resolve7(BOUND), { once: true });
|
|
36417
36596
|
});
|
|
36418
|
-
const calls = unique.slice(0, SERVER_BOUNDS.maxCalls);
|
|
36419
36597
|
const pending = new Set(calls);
|
|
36420
36598
|
const found = [];
|
|
36421
36599
|
let open7 = true;
|
|
@@ -36482,7 +36660,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36482
36660
|
return { report, sources };
|
|
36483
36661
|
}, "searchServer");
|
|
36484
36662
|
|
|
36485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36486
36664
|
var DELETE_AT_ONCE = 10;
|
|
36487
36665
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36488
36666
|
const files = fileLinks(attachments);
|
|
@@ -36922,7 +37100,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
36922
37100
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
36923
37101
|
}, "checkMediaOptions");
|
|
36924
37102
|
|
|
36925
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
36926
37104
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
36927
37105
|
var RULES2 = {
|
|
36928
37106
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -36937,7 +37115,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2
|
|
|
36937
37115
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
36938
37116
|
}), "classifyChannel");
|
|
36939
37117
|
|
|
36940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
36941
37119
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
36942
37120
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
36943
37121
|
const store = await deps.store();
|
|
@@ -37023,7 +37201,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
37023
37201
|
};
|
|
37024
37202
|
}, "metadataService");
|
|
37025
37203
|
|
|
37026
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37027
37205
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37028
37206
|
var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
37029
37207
|
const { chatId, title, rules, point, since, dryRun } = run2;
|
|
@@ -37060,7 +37238,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
|
37060
37238
|
return { chatId, rows, notes };
|
|
37061
37239
|
}, "moderateWith");
|
|
37062
37240
|
|
|
37063
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37064
37242
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37065
37243
|
const file = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37066
37244
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37138,7 +37316,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37138
37316
|
}, "removePerson")
|
|
37139
37317
|
}), "moderatorOf");
|
|
37140
37318
|
|
|
37141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37142
37320
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
37143
37321
|
id: note.id,
|
|
37144
37322
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -37182,7 +37360,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37182
37360
|
};
|
|
37183
37361
|
}, "privatePeopleService");
|
|
37184
37362
|
|
|
37185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37186
37364
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37187
37365
|
total: 0,
|
|
37188
37366
|
population: 0,
|
|
@@ -37438,7 +37616,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37438
37616
|
}, "evidence")
|
|
37439
37617
|
}), "rankingsService");
|
|
37440
37618
|
|
|
37441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37442
37620
|
var FIELDS = ["date", "chat", "kind", "muted"];
|
|
37443
37621
|
var WAITING_TAIL = 100;
|
|
37444
37622
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37572,7 +37750,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37572
37750
|
};
|
|
37573
37751
|
}, "replyStatsService");
|
|
37574
37752
|
|
|
37575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37576
37754
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
37577
37755
|
id: one.id,
|
|
37578
37756
|
name: one.name,
|
|
@@ -37698,7 +37876,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37698
37876
|
};
|
|
37699
37877
|
}, "searchesService");
|
|
37700
37878
|
|
|
37701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
37702
37880
|
var TAGGING_QUERY = {
|
|
37703
37881
|
entity: "tagging",
|
|
37704
37882
|
backend: "sql",
|
|
@@ -37782,7 +37960,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37782
37960
|
};
|
|
37783
37961
|
}, "tagsService");
|
|
37784
37962
|
|
|
37785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37963
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
37786
37964
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
37787
37965
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
37788
37966
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -37981,10 +38159,10 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37981
38159
|
};
|
|
37982
38160
|
}, "topicsService");
|
|
37983
38161
|
|
|
37984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/crm/sync.js
|
|
37985
38163
|
var CLOCK_MARGIN = 60 * 6e4;
|
|
37986
38164
|
|
|
37987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/crm/writer.js
|
|
37988
38166
|
var CRM_ASSIGN_OTHERS_KEY = "crm.assign-others";
|
|
37989
38167
|
var CRM_WRITE_DEFAULTS = {
|
|
37990
38168
|
"deals.delete": "ask",
|
|
@@ -37992,7 +38170,7 @@ var CRM_WRITE_DEFAULTS = {
|
|
|
37992
38170
|
[CRM_ASSIGN_OTHERS_KEY]: "deny"
|
|
37993
38171
|
};
|
|
37994
38172
|
|
|
37995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
37996
38174
|
import { createHash as createHash11, randomUUID as randomUUID6 } from "node:crypto";
|
|
37997
38175
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
37998
38176
|
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38066,7 +38244,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38066
38244
|
return { ...content, id: randomUUID6(), fingerprint: hash2(content) };
|
|
38067
38245
|
}, "prepareEvidencePacket");
|
|
38068
38246
|
|
|
38069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38247
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38070
38248
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38071
38249
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38072
38250
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38086,7 +38264,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38086
38264
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38087
38265
|
}, "readEvidencePacket");
|
|
38088
38266
|
|
|
38089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38090
38268
|
var scopeKeys = [
|
|
38091
38269
|
"accountId",
|
|
38092
38270
|
"meetingId",
|
|
@@ -38108,7 +38286,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
38108
38286
|
"maxVocabularyReadBytes"
|
|
38109
38287
|
]);
|
|
38110
38288
|
|
|
38111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
38112
38290
|
import { createHash as createHash12 } from "node:crypto";
|
|
38113
38291
|
import { existsSync as existsSync2 } from "node:fs";
|
|
38114
38292
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
@@ -38239,7 +38417,91 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
38239
38417
|
return { ...checked2.output, custom: true };
|
|
38240
38418
|
}, "addCustomTextModel");
|
|
38241
38419
|
|
|
38242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/calendar/sync.js
|
|
38421
|
+
var DAY6 = 864e5;
|
|
38422
|
+
var SLOTS_EVERY = 7 * DAY6;
|
|
38423
|
+
|
|
38424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
|
|
38425
|
+
var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
|
|
38426
|
+
|
|
38427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/calendar/reads.js
|
|
38428
|
+
var LIST = "events list";
|
|
38429
|
+
var EVENT_TYPES = [
|
|
38430
|
+
"default",
|
|
38431
|
+
"out-of-office",
|
|
38432
|
+
"focus",
|
|
38433
|
+
"working-location",
|
|
38434
|
+
"birthday",
|
|
38435
|
+
"from-mail",
|
|
38436
|
+
"call"
|
|
38437
|
+
];
|
|
38438
|
+
var oneSided = /* @__PURE__ */ __name((field, example) => (node) => {
|
|
38439
|
+
if (node.operator !== "range" || node.upper !== "*")
|
|
38440
|
+
queryError("query.unsupported-operator", node.span, `${field} takes only an earliest moment, such as ${example}`, {
|
|
38441
|
+
command: LIST,
|
|
38442
|
+
guide: LIST_QUERY_GUIDE
|
|
38443
|
+
});
|
|
38444
|
+
}, "oneSided");
|
|
38445
|
+
var EVENTS_QUERY = {
|
|
38446
|
+
entity: "event",
|
|
38447
|
+
backend: "native",
|
|
38448
|
+
fields: queryFieldsOf(event, {
|
|
38449
|
+
native: ["id", "starts_at", "ends_at", "changed_at", "overlapping", "calendar", "person", "event_type"],
|
|
38450
|
+
negatable: ["event_type"],
|
|
38451
|
+
relations: {
|
|
38452
|
+
event_type: {
|
|
38453
|
+
type: "enum",
|
|
38454
|
+
values: EVENT_TYPES,
|
|
38455
|
+
example: "event_type:default",
|
|
38456
|
+
relation: "events with a copy of this kind; -event_type:<kind> leaves out events with one"
|
|
38457
|
+
},
|
|
38458
|
+
calendar: {
|
|
38459
|
+
type: "kw",
|
|
38460
|
+
example: "calendar:3",
|
|
38461
|
+
relation: "one calendar, by its id, the provider's id or its title"
|
|
38462
|
+
},
|
|
38463
|
+
person: {
|
|
38464
|
+
type: "kw",
|
|
38465
|
+
example: "person:ana@example.com",
|
|
38466
|
+
relation: "events one person attends: an address, or a person id from search"
|
|
38467
|
+
}
|
|
38468
|
+
},
|
|
38469
|
+
examples: {
|
|
38470
|
+
id: "id:42",
|
|
38471
|
+
starts_at: "starts_at:[2026-11-02 TO 2026-11-07}",
|
|
38472
|
+
ends_at: "ends_at>=2026-11-02",
|
|
38473
|
+
changed_at: "changed_at>=2026-10-01",
|
|
38474
|
+
overlapping: "overlapping:true"
|
|
38475
|
+
},
|
|
38476
|
+
validate: {
|
|
38477
|
+
ends_at: oneSided("ends_at", "ends_at>=2026-11-02; for the latest, write starts_at<2026-11-07"),
|
|
38478
|
+
changed_at: oneSided("changed_at", "changed_at>=2026-10-01")
|
|
38479
|
+
}
|
|
38480
|
+
}).map((field) => field.native ? {
|
|
38481
|
+
...field,
|
|
38482
|
+
operators: field.type === "time" ? ["term", "range"] : field.type === "bool" ? ["term"] : ["term", "phrase"]
|
|
38483
|
+
} : field)
|
|
38484
|
+
};
|
|
38485
|
+
|
|
38486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/calendar/writer.js
|
|
38487
|
+
var EVENTS_NOTIFY_KEY = "events.notify";
|
|
38488
|
+
var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
|
|
38489
|
+
var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
|
|
38490
|
+
var CALENDAR_WRITE_DEFAULTS = {
|
|
38491
|
+
"events.create": "allow",
|
|
38492
|
+
// One import writes a whole file of events, and may change events the calendar already holds under their UIDs.
|
|
38493
|
+
"events.import": "ask",
|
|
38494
|
+
"events.update": "allow",
|
|
38495
|
+
"events.respond": "allow",
|
|
38496
|
+
"events.move": "allow",
|
|
38497
|
+
"events.delete": "ask",
|
|
38498
|
+
[EVENTS_DELETE_SERIES_KEY]: "deny",
|
|
38499
|
+
[EVENTS_NOTIFY_KEY]: "deny",
|
|
38500
|
+
// Not ask: `--yes` answers ask, and anything that can type a gcal command can add it.
|
|
38501
|
+
[EVENTS_REMIND_HOOK_KEY]: "deny"
|
|
38502
|
+
};
|
|
38503
|
+
|
|
38504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
38243
38505
|
var communicationFields = {
|
|
38244
38506
|
sources: pipe(array(strictObject({
|
|
38245
38507
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -38271,7 +38533,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
38271
38533
|
return { ...input, after, before: before2 };
|
|
38272
38534
|
}, "communicationRequest");
|
|
38273
38535
|
|
|
38274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
38275
38537
|
var MEETING_PREPARATION_LIMITS = {
|
|
38276
38538
|
meetings: { min: 1, max: 20, default: 5 },
|
|
38277
38539
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -38344,7 +38606,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
38344
38606
|
};
|
|
38345
38607
|
}, "validateMeetingPreparationRequest");
|
|
38346
38608
|
|
|
38347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
38348
38610
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
38349
38611
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
38350
38612
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -38392,7 +38654,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
38392
38654
|
}
|
|
38393
38655
|
}, "validatePreparationCommunications");
|
|
38394
38656
|
|
|
38395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
38396
38658
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
38397
38659
|
const installer = ports.installer();
|
|
38398
38660
|
const argv = updateCommand(installer, packageName);
|
|
@@ -38457,7 +38719,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
38457
38719
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
38458
38720
|
}, "dayAfter");
|
|
38459
38721
|
|
|
38460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
38461
38723
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
38462
38724
|
const pictures = picturesService(deps);
|
|
38463
38725
|
const base = {
|
|
@@ -38494,7 +38756,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
38494
38756
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
38495
38757
|
}, "servicesFor");
|
|
38496
38758
|
|
|
38497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38759
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
38498
38760
|
import { createHash as createHash13 } from "node:crypto";
|
|
38499
38761
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync6, rmSync as rmSync3 } from "node:fs";
|
|
38500
38762
|
import { createConnection, createServer } from "node:net";
|
|
@@ -38715,7 +38977,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options2) => new Promi
|
|
|
38715
38977
|
}, () => finish({ error: stopped() }));
|
|
38716
38978
|
}), "relayCommand");
|
|
38717
38979
|
|
|
38718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.661.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_df14b19e105bc4fb805918d3d486e7fb/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
38719
38981
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
38720
38982
|
close: /* @__PURE__ */ __name(async () => {
|
|
38721
38983
|
}, "close"),
|
|
@@ -38729,9 +38991,9 @@ var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWra
|
|
|
38729
38991
|
let watcher;
|
|
38730
38992
|
try {
|
|
38731
38993
|
await new Promise((resolve7, reject) => {
|
|
38732
|
-
watcher = /* @__PURE__ */ __name((
|
|
38994
|
+
watcher = /* @__PURE__ */ __name((event2) => {
|
|
38733
38995
|
try {
|
|
38734
|
-
onEvent(
|
|
38996
|
+
onEvent(event2);
|
|
38735
38997
|
} catch (error) {
|
|
38736
38998
|
reject(error);
|
|
38737
38999
|
}
|
|
@@ -38767,9 +39029,9 @@ var serveRelay = /* @__PURE__ */ __name((command, messenger) => {
|
|
|
38767
39029
|
return held;
|
|
38768
39030
|
}, "connect")
|
|
38769
39031
|
},
|
|
38770
|
-
arrived: /* @__PURE__ */ __name((
|
|
39032
|
+
arrived: /* @__PURE__ */ __name((event2) => {
|
|
38771
39033
|
for (const watcher of watchers)
|
|
38772
|
-
watcher(
|
|
39034
|
+
watcher(event2);
|
|
38773
39035
|
}, "arrived"),
|
|
38774
39036
|
/** Listens beside the lock; the address goes into it, which is how a client finds it. */
|
|
38775
39037
|
open: /* @__PURE__ */ __name(async (lockPath, profile) => {
|
|
@@ -38882,6 +39144,7 @@ export {
|
|
|
38882
39144
|
readUpload,
|
|
38883
39145
|
readAttachments,
|
|
38884
39146
|
readStickerFile,
|
|
39147
|
+
decodeEntities,
|
|
38885
39148
|
importEngine,
|
|
38886
39149
|
extractText,
|
|
38887
39150
|
engineHint,
|
|
@@ -38975,18 +39238,6 @@ export {
|
|
|
38975
39238
|
readEvidencePacket,
|
|
38976
39239
|
useTextModel,
|
|
38977
39240
|
addCustomTextModel,
|
|
38978
|
-
MEETING_PREPARATION_LIMITS,
|
|
38979
|
-
validateMeetingPreparationRequest,
|
|
38980
|
-
validatePreparationCommunications,
|
|
38981
|
-
upgradePackage,
|
|
38982
|
-
servicesFor,
|
|
38983
|
-
RELAY_PROTOCOL,
|
|
38984
|
-
relayCommand,
|
|
38985
|
-
lackedNeed,
|
|
38986
|
-
refuseLacking,
|
|
38987
|
-
hideNever,
|
|
38988
|
-
lentConnection,
|
|
38989
|
-
serveRelay,
|
|
38990
39241
|
meetingPassageRequest,
|
|
38991
39242
|
createMeetingPassageCommand,
|
|
38992
39243
|
meetingHitSearchRequest,
|
|
@@ -39009,6 +39260,18 @@ export {
|
|
|
39009
39260
|
nativeField,
|
|
39010
39261
|
termField,
|
|
39011
39262
|
queryHelp,
|
|
39263
|
+
MEETING_PREPARATION_LIMITS,
|
|
39264
|
+
validateMeetingPreparationRequest,
|
|
39265
|
+
validatePreparationCommunications,
|
|
39266
|
+
upgradePackage,
|
|
39267
|
+
servicesFor,
|
|
39268
|
+
RELAY_PROTOCOL,
|
|
39269
|
+
relayCommand,
|
|
39270
|
+
lackedNeed,
|
|
39271
|
+
refuseLacking,
|
|
39272
|
+
hideNever,
|
|
39273
|
+
lentConnection,
|
|
39274
|
+
serveRelay,
|
|
39012
39275
|
positiveCount,
|
|
39013
39276
|
withPaging,
|
|
39014
39277
|
window,
|