@wirecat/tg-cli 0.126.0 → 0.128.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/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-BXU3AVB7.js → adapter-JOI34QLS.js} +43 -43
- package/dist/bundle/{all-profiles-G5A6IROO.js → all-profiles-2BZEE7J2.js} +18 -28
- package/dist/bundle/{anthropic-SINVEVEM.js → anthropic-NW7DL3S3.js} +2 -2
- package/dist/bundle/{app-server-IHIQXPJF.js → app-server-RUTYKELF.js} +39 -54
- package/dist/bundle/{bot-api-LGAVVYRM.js → bot-api-DW6NAZAQ.js} +44 -44
- package/dist/bundle/{bot-history-5C35FGCD.js → bot-history-FAJ2W42U.js} +12 -12
- package/dist/bundle/{bun-2GK3YOP3.js → bun-IVP5LSVI.js} +2 -2
- package/dist/bundle/{bun-sqlite-7DGADK3E.js → bun-sqlite-ATPCJ4CT.js} +3 -3
- package/dist/bundle/{chunk-Y5DGB7GP.js → chunk-2A3TC52A.js} +7 -7
- package/dist/bundle/{chunk-Y4724JRR.js → chunk-2IL4YDGG.js} +2 -2
- package/dist/bundle/{chunk-2F2UMQMB.js → chunk-2QHIOPSA.js} +182 -399
- package/dist/bundle/{chunk-SXVB2CVR.js → chunk-3UGRMFWK.js} +2 -2
- package/dist/bundle/{chunk-QCLMP635.js → chunk-4DSIGS2E.js} +5 -5
- package/dist/bundle/{chunk-HPFB4Y7P.js → chunk-5AP25FMW.js} +1 -1
- package/dist/bundle/{chunk-CK7DSGIK.js → chunk-7D6LI2N7.js} +322 -11
- package/dist/bundle/{chunk-2LN6OJUB.js → chunk-7I5NMVX7.js} +1 -1
- package/dist/bundle/{chunk-JQ2RKLPU.js → chunk-AF2XVV5P.js} +648 -239
- package/dist/bundle/{chunk-MP47TE77.js → chunk-BVCRDHI2.js} +3 -3
- package/dist/bundle/{chunk-7UACPXDC.js → chunk-E56QE3UC.js} +987 -768
- package/dist/bundle/{chunk-ACLUVZ4I.js → chunk-EAUHYQUK.js} +40 -48
- package/dist/bundle/{chunk-L5PYWQDA.js → chunk-F4UIBEQK.js} +2 -2
- package/dist/bundle/{chunk-FYOHGIQP.js → chunk-FHGAJK4I.js} +16 -13
- package/dist/bundle/{chunk-AA2NZAUT.js → chunk-G3PL3R45.js} +1 -1
- package/dist/bundle/{chunk-W75SKUY4.js → chunk-GYO4WXLG.js} +2 -2
- package/dist/bundle/{chunk-GIY56MIB.js → chunk-IHLNXL2D.js} +1 -1
- package/dist/bundle/{chunk-MA2XHO4O.js → chunk-IIHCSJV2.js} +641 -389
- package/dist/bundle/{chunk-N2JSMP4N.js → chunk-IV2KJQ5F.js} +16 -15
- package/dist/bundle/{chunk-QGLB4D7J.js → chunk-J3SX36NE.js} +1 -1
- package/dist/bundle/{chunk-XGBXRDJP.js → chunk-JI2PFQFL.js} +5 -5
- package/dist/bundle/{chunk-RFDPU4NO.js → chunk-JJGPU24U.js} +4 -4
- package/dist/bundle/{chunk-5NLAGTWU.js → chunk-KF2Q776U.js} +7 -7
- package/dist/bundle/{chunk-F34EE5Y2.js → chunk-KKZQK6IK.js} +2 -2
- package/dist/bundle/{chunk-5GINYFD4.js → chunk-LTADKMP5.js} +1 -1
- package/dist/bundle/{chunk-J2BUWK5U.js → chunk-MC6FOTCV.js} +98 -6
- package/dist/bundle/{chunk-63DSHUNP.js → chunk-MDGLKMLD.js} +5 -5
- package/dist/bundle/{chunk-PJ6FZXUR.js → chunk-MGBVVQTU.js} +2 -2
- package/dist/bundle/{chunk-K4DXGJK4.js → chunk-MOUPWPNL.js} +10 -10
- package/dist/bundle/{chunk-G4VVBR6U.js → chunk-NXDQXDRN.js} +3 -3
- package/dist/bundle/{chunk-SL4S5GFR.js → chunk-ODBK56ZR.js} +1 -1
- package/dist/bundle/{chunk-QYLYMOXN.js → chunk-OX6574YV.js} +11 -11
- package/dist/bundle/{chunk-4GR5YYGA.js → chunk-PJA43HVE.js} +2 -2
- package/dist/bundle/{chunk-GI2ZUNOH.js → chunk-Q3ZO6Q3M.js} +4 -4
- package/dist/bundle/{chunk-OXB5P37M.js → chunk-QO4ON2X7.js} +1 -1
- package/dist/bundle/{chunk-NJ3FSKSU.js → chunk-QYN5RDTZ.js} +2 -2
- package/dist/bundle/{chunk-GOGGRLS6.js → chunk-R4QVV3LN.js} +27 -12
- package/dist/bundle/{chunk-AZ7DSHQO.js → chunk-RIGNCUZD.js} +1 -1
- package/dist/bundle/{chunk-QMEPKUG3.js → chunk-RZFIQMOA.js} +55 -52
- package/dist/bundle/{chunk-G4RCT5RH.js → chunk-SDLJJF7E.js} +12 -12
- package/dist/bundle/{chunk-JAKP5RWM.js → chunk-T2CWSFGY.js} +1558 -928
- package/dist/bundle/{chunk-W35POPPX.js → chunk-TGUXKG4B.js} +16 -16
- package/dist/bundle/{chunk-W725T2V7.js → chunk-TQFUAKU6.js} +1 -1
- package/dist/bundle/{chunk-UIFQEXVP.js → chunk-UURJO46N.js} +1 -1
- package/dist/bundle/{chunk-AKUBJHE5.js → chunk-WG3BF7SA.js} +1 -1
- package/dist/bundle/{chunk-7FL2N6DM.js → chunk-WMF6SL5D.js} +1 -1
- package/dist/bundle/{chunk-ZXCQF6XV.js → chunk-WMUPZ3IY.js} +10 -10
- package/dist/bundle/{chunk-KSLZEXRF.js → chunk-WPMJQIEU.js} +1 -1
- package/dist/bundle/{chunk-QOINWAQD.js → chunk-XYAH6QQO.js} +2 -2
- package/dist/bundle/{chunk-DGGAYHLN.js → chunk-YSXDCSBP.js} +33 -23
- package/dist/bundle/{chunk-AYEQMXRE.js → chunk-YVV5S2QA.js} +1 -1
- package/dist/bundle/{chunk-P2GNIWGG.js → chunk-ZVLYK6CZ.js} +6 -6
- package/dist/bundle/{command-contract-ZEYY3ZXK.js → command-contract-3BSXDYBC.js} +13 -13
- package/dist/bundle/{command-server-entry-UWY6PQIV.js → command-server-entry-BU3X4XNL.js} +20 -20
- package/dist/bundle/{decode-QGMFQ6XX.js → decode-NXB7E46F.js} +2 -2
- package/dist/bundle/{echarts-GHU3GEWV.js → echarts-NAXLKJLA.js} +2 -2
- package/dist/bundle/{embed-6DMEWQDO.js → embed-LB6ONWHX.js} +3 -3
- package/dist/bundle/{embedder-W2L7YZPW.js → embedder-WE7B2RU5.js} +6 -6
- package/dist/bundle/{entry-LPEXVFQC.js → entry-W6Y52ZRN.js} +6 -6
- package/dist/bundle/{first-run-3UJ6SJF5.js → first-run-NVYNZZA6.js} +5 -5
- package/dist/bundle/{first-screen-VCSY5QH5.js → first-screen-Z6TVHK6I.js} +14 -14
- package/dist/bundle/{instructions-RUVAH2IS.js → instructions-MRUC57NS.js} +1 -1
- package/dist/bundle/{node-RYSNHVBX.js → node-G7PMDYQV.js} +2 -2
- package/dist/bundle/{node-sqlite-J6ZL4LUY.js → node-sqlite-RXWQ3SES.js} +4 -4
- package/dist/bundle/{oauth-B2QNZNSC.js → oauth-6ZWOL6KX.js} +4 -4
- package/dist/bundle/{open-OMUP5P6V.js → open-V7LMZCFI.js} +2 -2
- package/dist/bundle/{openai-BT4BP4VQ.js → openai-P472V4ZM.js} +12 -12
- package/dist/bundle/{process-HG3QDD54.js → process-GSNPENHL.js} +1 -1
- package/dist/bundle/{program-P2VATMKJ.js → program-IELITPKT.js} +46 -46
- package/dist/bundle/{prompt-BTIHH3Z4.js → prompt-2CP6CQ5N.js} +2 -2
- package/dist/bundle/{recognize-CTSJXPIG.js → recognize-R2DEQ5TC.js} +1 -1
- package/dist/bundle/{remote-2FIGCMKL.js → remote-JG3POFES.js} +6 -6
- package/dist/bundle/{rerank-TI5SLEF4.js → rerank-TVMR3OLL.js} +4 -4
- package/dist/bundle/{serve-IO3IM5C7.js → serve-DBWSMLPH.js} +6 -6
- package/dist/bundle/{server-WEPFFTYA.js → server-EXJ2WNZY.js} +37 -35
- package/dist/bundle/server-SXNFFAIR.js +61 -0
- package/dist/bundle/{sqlite-runtime-CTEYXX7L.js → sqlite-runtime-AWMY7W4Q.js} +3 -3
- package/dist/bundle/{state-GFHVDGHM.js → state-HN44BWNQ.js} +3 -3
- package/dist/bundle/{store-RCK6HT4F.js → store-GIYS3LHV.js} +9 -9
- package/dist/bundle/{store-Y5XC4LEM.js → store-LOVKYQDC.js} +15 -11
- package/dist/bundle/store-maintenance-command-X3VOYNCG.js +52 -0
- package/dist/bundle/tg.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-BSKYPHLB.js +0 -76
- package/dist/bundle/server-RIGXUTKZ.js +0 -62
- package/dist/bundle/store-maintenance-command-XH6VMCDU.js +0 -52
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SDLJJF7E.js";
|
|
12
12
|
import {
|
|
13
13
|
isNewer,
|
|
14
14
|
updateCommand
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
localOnly,
|
|
18
18
|
refuseOffComputer,
|
|
19
19
|
remoteKey
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-KF2Q776U.js";
|
|
21
21
|
import {
|
|
22
22
|
Unzip,
|
|
23
23
|
UnzipInflate,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
placedText,
|
|
29
29
|
runEmbedders,
|
|
30
30
|
textModelsDirectory
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4DSIGS2E.js";
|
|
32
32
|
import {
|
|
33
33
|
AGENDA_COLUMNS,
|
|
34
34
|
BUSINESS_FIND_MAX,
|
|
@@ -108,13 +108,13 @@ import {
|
|
|
108
108
|
validateAst,
|
|
109
109
|
validateFields,
|
|
110
110
|
withoutField
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-T2CWSFGY.js";
|
|
112
112
|
import {
|
|
113
113
|
DEFAULT_STEMMERS,
|
|
114
114
|
createStemmer,
|
|
115
115
|
fold,
|
|
116
116
|
normalize
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-2A3TC52A.js";
|
|
118
118
|
import {
|
|
119
119
|
EmptyAnswer,
|
|
120
120
|
MAX_MODEL_IMAGE_BYTES,
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
range,
|
|
124
124
|
systemFor,
|
|
125
125
|
validateImages
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-3UGRMFWK.js";
|
|
127
127
|
import {
|
|
128
128
|
CEILING_KEY,
|
|
129
129
|
Command,
|
|
@@ -136,6 +136,7 @@ import {
|
|
|
136
136
|
LINK,
|
|
137
137
|
Option,
|
|
138
138
|
PREVIOUS_DEFAULT_TEXT_MODEL,
|
|
139
|
+
STORE_ONLY_KEYS,
|
|
139
140
|
WEIGHTS,
|
|
140
141
|
agenda,
|
|
141
142
|
annotate,
|
|
@@ -166,32 +167,34 @@ import {
|
|
|
166
167
|
sharedCommand,
|
|
167
168
|
skipFlagFor,
|
|
168
169
|
snakeKeys,
|
|
170
|
+
stops,
|
|
169
171
|
tagging,
|
|
170
172
|
task,
|
|
171
173
|
textModel,
|
|
172
174
|
textModels,
|
|
173
175
|
vectorModelKey,
|
|
174
176
|
writeTextModelsSection
|
|
175
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-2QHIOPSA.js";
|
|
176
178
|
import {
|
|
177
179
|
MESSENGER_CHANGE_REFUSAL,
|
|
178
180
|
ancestorValue,
|
|
179
181
|
envName,
|
|
180
182
|
readOnlyLockOf,
|
|
181
183
|
readOnlyRefusal
|
|
182
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-YVV5S2QA.js";
|
|
183
185
|
import {
|
|
184
186
|
PLAIN_HTTP_REFUSED,
|
|
185
187
|
endpoint,
|
|
186
188
|
endpointFetch,
|
|
187
189
|
modelAddressAllowed,
|
|
188
190
|
onThisComputer
|
|
189
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-RIGNCUZD.js";
|
|
190
192
|
import {
|
|
191
193
|
installFiles,
|
|
192
194
|
megabytes
|
|
193
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-BVCRDHI2.js";
|
|
194
196
|
import {
|
|
197
|
+
BACKENDS,
|
|
195
198
|
EVENT_QUERY,
|
|
196
199
|
INTERNAL_NOTES,
|
|
197
200
|
LOG_ATTRIBUTES,
|
|
@@ -212,6 +215,7 @@ import {
|
|
|
212
215
|
dayBoundary,
|
|
213
216
|
defineQuery,
|
|
214
217
|
entriesOfList,
|
|
218
|
+
event,
|
|
215
219
|
eventItem,
|
|
216
220
|
exportMeeting,
|
|
217
221
|
fieldsHelp,
|
|
@@ -242,12 +246,13 @@ import {
|
|
|
242
246
|
listedHolds,
|
|
243
247
|
logAttributes,
|
|
244
248
|
meetingCueFingerprint,
|
|
245
|
-
|
|
249
|
+
meetingDetailsBody,
|
|
246
250
|
meetingHitsList,
|
|
247
251
|
meetingPeople,
|
|
252
|
+
meetingShowThrough,
|
|
248
253
|
meetingSummaryAnswer,
|
|
249
254
|
meetingTranscriptAnswer,
|
|
250
|
-
|
|
255
|
+
meetingsListThrough,
|
|
251
256
|
meetingsQuery,
|
|
252
257
|
normalizeTag,
|
|
253
258
|
parseLocator,
|
|
@@ -259,8 +264,10 @@ import {
|
|
|
259
264
|
pull,
|
|
260
265
|
queryError,
|
|
261
266
|
queryFieldsOf,
|
|
267
|
+
rangeOf,
|
|
262
268
|
readMeetingProjectEvidence,
|
|
263
269
|
sameAs,
|
|
270
|
+
serviceCallsOf,
|
|
264
271
|
sourceOf2 as sourceOf,
|
|
265
272
|
sourceOf3 as sourceOf2,
|
|
266
273
|
strongRecordingValidator,
|
|
@@ -270,24 +277,25 @@ import {
|
|
|
270
277
|
validateMeetingPassage,
|
|
271
278
|
validateQuery,
|
|
272
279
|
walkQuery,
|
|
280
|
+
windowOf,
|
|
273
281
|
withAttempt,
|
|
274
282
|
zonedMoment
|
|
275
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-AF2XVV5P.js";
|
|
276
284
|
import {
|
|
277
285
|
isCliFailure,
|
|
278
286
|
sqliteCode
|
|
279
|
-
} from "./chunk-
|
|
287
|
+
} from "./chunk-MGBVVQTU.js";
|
|
280
288
|
import {
|
|
281
289
|
DEFAULT_TASK_CATEGORIES,
|
|
282
290
|
FALLBACK_CATEGORY,
|
|
283
291
|
readSharedSection,
|
|
284
292
|
sharedConfigPath,
|
|
285
293
|
writeSharedSection
|
|
286
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-7D6LI2N7.js";
|
|
287
295
|
import {
|
|
288
296
|
storePath,
|
|
289
297
|
wirecatDirectory
|
|
290
|
-
} from "./chunk-
|
|
298
|
+
} from "./chunk-TQFUAKU6.js";
|
|
291
299
|
import {
|
|
292
300
|
Credentials,
|
|
293
301
|
logRecordOf,
|
|
@@ -16950,7 +16958,7 @@ var require_lib3 = __commonJS({
|
|
|
16950
16958
|
}
|
|
16951
16959
|
});
|
|
16952
16960
|
|
|
16953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16954
16962
|
var RULES_VERSION = 5;
|
|
16955
16963
|
var LOOK_BACK = 50;
|
|
16956
16964
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17040,10 +17048,10 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
17040
17048
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17041
17049
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17042
17050
|
|
|
17043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17044
17052
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17045
17053
|
|
|
17046
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
17047
17055
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
17048
17056
|
import { open, stat } from "node:fs/promises";
|
|
17049
17057
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17276,15 +17284,15 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17276
17284
|
return { name, source };
|
|
17277
17285
|
}, "readStickerFile");
|
|
17278
17286
|
|
|
17279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17287
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17280
17288
|
import { randomBytes } from "node:crypto";
|
|
17281
17289
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17282
17290
|
var newOperationId = newSendId;
|
|
17283
17291
|
|
|
17284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17285
17293
|
import { randomUUID } from "node:crypto";
|
|
17286
17294
|
|
|
17287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
17288
17296
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
17289
17297
|
import { dirname as dirname2, join } from "node:path";
|
|
17290
17298
|
var MOST_DEADLINES = 50;
|
|
@@ -17368,11 +17376,11 @@ var FloodMemory = class {
|
|
|
17368
17376
|
}
|
|
17369
17377
|
};
|
|
17370
17378
|
|
|
17371
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17372
17380
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
17373
17381
|
import { dirname as dirname4, join as join2 } from "node:path";
|
|
17374
17382
|
|
|
17375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
17376
17384
|
import { closeSync, mkdirSync as mkdirSync2, openSync, statSync, unlinkSync } from "node:fs";
|
|
17377
17385
|
import { dirname as dirname3 } from "node:path";
|
|
17378
17386
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -17439,7 +17447,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
17439
17447
|
}
|
|
17440
17448
|
}, "lockTime");
|
|
17441
17449
|
|
|
17442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
17443
17451
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
17444
17452
|
var SendJournal = class {
|
|
17445
17453
|
static {
|
|
@@ -17516,7 +17524,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
17516
17524
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
17517
17525
|
}, "withSendId");
|
|
17518
17526
|
|
|
17519
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
17520
17528
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
17521
17529
|
import { join as join3 } from "node:path";
|
|
17522
17530
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -17628,23 +17636,14 @@ var RecipientList = class {
|
|
|
17628
17636
|
}
|
|
17629
17637
|
};
|
|
17630
17638
|
|
|
17631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17639
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
17632
17640
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
17633
|
-
var READS = /* @__PURE__ */ new Set([
|
|
17634
|
-
"attachments.extract",
|
|
17635
|
-
"conversations.embeddings",
|
|
17636
|
-
"conversations.links",
|
|
17637
|
-
"messages.server-search",
|
|
17638
|
-
"messages.sync-first",
|
|
17639
|
-
"stats.contacts.top.sync-first",
|
|
17640
|
-
"stats.messages.counters.sync",
|
|
17641
|
-
"stats.messages.show.sync-first",
|
|
17642
|
-
"stats.messages.top.sync-first",
|
|
17643
|
-
"store.gaps.repair"
|
|
17644
|
-
]);
|
|
17645
17641
|
var countsTowardLimit = /* @__PURE__ */ __name(({ kind = "message", action: action2, notify }) => kind === "message" || kind === "forward" || kind === "edit" || kind === "delete" || kind === "pin" && notify === true || action2 === "create" || action2 === "members.add" || action2 === "requests.accept" || action2 === "join" || action2 === "contact-import", "countsTowardLimit");
|
|
17646
17642
|
var weightOf = /* @__PURE__ */ __name(({ kind = "message", action: action2, count: count4, people }) => kind === "delete" || kind === "message" && action2 === void 0 ? Math.max(1, count4 ?? 1) : action2 === "create" || action2 === "members.add" || action2 === "requests.accept" || action2 === "contact-import" ? Math.max(1, people ?? count4 ?? 1) : 1, "weightOf");
|
|
17647
|
-
var timeOf = /* @__PURE__ */ __name((entry) =>
|
|
17643
|
+
var timeOf = /* @__PURE__ */ __name((entry) => {
|
|
17644
|
+
const scheduled = entry.scheduledFor === void 0 ? Number.NaN : Date.parse(entry.scheduledFor);
|
|
17645
|
+
return Number.isNaN(scheduled) ? Date.parse(entry.at) : scheduled;
|
|
17646
|
+
}, "timeOf");
|
|
17648
17647
|
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");
|
|
17649
17648
|
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");
|
|
17650
17649
|
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") }) => {
|
|
@@ -17652,13 +17651,13 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
17652
17651
|
let reservation;
|
|
17653
17652
|
const answered = /* @__PURE__ */ new WeakSet();
|
|
17654
17653
|
const refuseReadOnly = /* @__PURE__ */ __name(({ key }) => {
|
|
17655
|
-
if (key !== void 0 &&
|
|
17654
|
+
if (key !== void 0 && STORE_ONLY_KEYS.has(key))
|
|
17656
17655
|
return;
|
|
17657
17656
|
if (readOnlyLock)
|
|
17658
17657
|
throw readOnlyRefusal(readOnlyLock, MESSENGER_CHANGE_REFUSAL);
|
|
17659
17658
|
}, "refuseReadOnly");
|
|
17660
17659
|
const refuseHeld = /* @__PURE__ */ __name(({ key }) => {
|
|
17661
|
-
if (key !== void 0 &&
|
|
17660
|
+
if (key !== void 0 && STORE_ONLY_KEYS.has(key))
|
|
17662
17661
|
return;
|
|
17663
17662
|
const block = flood?.sendBlock();
|
|
17664
17663
|
if (!block)
|
|
@@ -17672,7 +17671,7 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
17672
17671
|
if (levels !== void 0) {
|
|
17673
17672
|
const key = request.key ?? keyForWrite(kind, action2);
|
|
17674
17673
|
const { level: level2, key: named2 } = levelFor(levels, key, permissionDefaults);
|
|
17675
|
-
if (level2
|
|
17674
|
+
if (stops(level2, key))
|
|
17676
17675
|
throw levelRefusal({ profile, command, key, level: level2, named: named2, permissionSources }, permissionFix?.(request, key));
|
|
17677
17676
|
if (level2 === "ask" && !answered.has(request)) {
|
|
17678
17677
|
throw new CliError("confirmation_required", `${key} asks before it acts, and it was not asked`);
|
|
@@ -17695,6 +17694,8 @@ var sendGuard = /* @__PURE__ */ __name(({ profile, recipients, command = recipie
|
|
|
17695
17694
|
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`);
|
|
17696
17695
|
}
|
|
17697
17696
|
const at = request.scheduledFor ? Date.parse(request.scheduledFor) : now().getTime();
|
|
17697
|
+
if (Number.isNaN(at))
|
|
17698
|
+
throw new CliError("validation_error", `"${request.scheduledFor}" is not a time to send at \u2014 use ISO 8601`);
|
|
17698
17699
|
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);
|
|
17699
17700
|
const unsure = /* @__PURE__ */ __name((entry) => entry.outcome === "outcome_unknown", "unsure");
|
|
17700
17701
|
const same2 = /* @__PURE__ */ __name((a, b) => a.sendId !== void 0 && a.sendId === b.sendId && a.chatId === b.chatId, "same");
|
|
@@ -17823,7 +17824,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
17823
17824
|
}), "guardFor");
|
|
17824
17825
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
17825
17826
|
|
|
17826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17827
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17827
17828
|
var COMMAND_NEEDS = {
|
|
17828
17829
|
"account update": ["updateProfile", "change the profile"],
|
|
17829
17830
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17873,7 +17874,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17873
17874
|
return group;
|
|
17874
17875
|
}, "hideNever");
|
|
17875
17876
|
|
|
17876
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17877
17878
|
var AUDIT_PAGE = 200;
|
|
17878
17879
|
var AUDIT_BUDGET = 10;
|
|
17879
17880
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17953,7 +17954,82 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17953
17954
|
return found;
|
|
17954
17955
|
}, "burstJoins");
|
|
17955
17956
|
|
|
17956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/management.js
|
|
17958
|
+
var REMOTE_READ = { remote: "read", local: "read" };
|
|
17959
|
+
var REMOTE_WRITE = { remote: "write", local: "write" };
|
|
17960
|
+
var minutes = /* @__PURE__ */ __name((text2) => {
|
|
17961
|
+
if (!/^[1-9]\d*$/.test(text2))
|
|
17962
|
+
throw new InvalidArgumentError("expected whole minutes");
|
|
17963
|
+
return Number(text2);
|
|
17964
|
+
}, "minutes");
|
|
17965
|
+
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");
|
|
17966
|
+
var changeOf = /* @__PURE__ */ __name((flags) => Object.fromEntries(["title", "kind", "startTime", "durationMinutes", "timezone", "agenda"].flatMap((key) => flags[key] === void 0 ? [] : [[key, flags[key]]])), "changeOf");
|
|
17967
|
+
var meetingOf = /* @__PURE__ */ __name((one) => ({
|
|
17968
|
+
id: one.id,
|
|
17969
|
+
title: one.title,
|
|
17970
|
+
kind: one.kind,
|
|
17971
|
+
start_time: one.startTime,
|
|
17972
|
+
duration_minutes: one.durationMinutes,
|
|
17973
|
+
timezone: one.timezone,
|
|
17974
|
+
agenda: one.agenda,
|
|
17975
|
+
join_url: one.joinUrl
|
|
17976
|
+
}), "meetingOf");
|
|
17977
|
+
var receiptItem = /* @__PURE__ */ __name((receipt) => {
|
|
17978
|
+
const { change } = receipt;
|
|
17979
|
+
return {
|
|
17980
|
+
action: receipt.action,
|
|
17981
|
+
provider: receipt.scope.provider,
|
|
17982
|
+
account: receipt.scope.account,
|
|
17983
|
+
...receipt.id === void 0 ? {} : { id: receipt.id },
|
|
17984
|
+
...receipt.occurrenceId === void 0 ? {} : { occurrence_id: receipt.occurrenceId },
|
|
17985
|
+
...change ? {
|
|
17986
|
+
change: {
|
|
17987
|
+
...change.title === void 0 ? {} : { title: change.title },
|
|
17988
|
+
...change.kind === void 0 ? {} : { kind: change.kind },
|
|
17989
|
+
...change.startTime === void 0 ? {} : { start_time: change.startTime },
|
|
17990
|
+
...change.durationMinutes === void 0 ? {} : { duration_minutes: change.durationMinutes },
|
|
17991
|
+
...change.timezone === void 0 ? {} : { timezone: change.timezone },
|
|
17992
|
+
...change.agenda === void 0 ? {} : { agenda: change.agenda }
|
|
17993
|
+
}
|
|
17994
|
+
} : {},
|
|
17995
|
+
applied: receipt.applied,
|
|
17996
|
+
...receipt.meeting ? { meeting: meetingOf(receipt.meeting) } : {}
|
|
17997
|
+
};
|
|
17998
|
+
}, "receiptItem");
|
|
17999
|
+
var addMeetingManagementCommands = /* @__PURE__ */ __name((group, deps) => {
|
|
18000
|
+
const { management, print, output, inRun, askFirst } = deps;
|
|
18001
|
+
const has = /* @__PURE__ */ __name((name) => management.capabilities.includes(name), "has");
|
|
18002
|
+
const mutation = /* @__PURE__ */ __name(async (command) => {
|
|
18003
|
+
const dryRun = command.optsWithGlobals().dryRun === true;
|
|
18004
|
+
if (!dryRun) {
|
|
18005
|
+
if (!askFirst)
|
|
18006
|
+
throw new CliError("configuration_error", "this tool cannot ask before it changes a meeting on the service");
|
|
18007
|
+
await askFirst(command);
|
|
18008
|
+
}
|
|
18009
|
+
return { apply: true, dryRun };
|
|
18010
|
+
}, "mutation");
|
|
18011
|
+
const write = /* @__PURE__ */ __name((name) => annotate(group.command(name), { effects: REMOTE_WRITE, offline: false, output: { entity: "meeting_change" } }), "write");
|
|
18012
|
+
const target2 = /* @__PURE__ */ __name((command) => command.argument("<meeting>", "the service's id of the meeting"), "target");
|
|
18013
|
+
if (has("create"))
|
|
18014
|
+
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)));
|
|
18015
|
+
if (has("update"))
|
|
18016
|
+
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)));
|
|
18017
|
+
if (has("cancel"))
|
|
18018
|
+
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({
|
|
18019
|
+
item: receiptItem(await management.cancel(id2, {
|
|
18020
|
+
...await mutation(command),
|
|
18021
|
+
...flags.occurrenceId === void 0 ? {} : { occurrenceId: flags.occurrenceId }
|
|
18022
|
+
}))
|
|
18023
|
+
}, command)));
|
|
18024
|
+
if (has("invitation"))
|
|
18025
|
+
output(target2(annotate(group.command("invitation"), {
|
|
18026
|
+
effects: REMOTE_READ,
|
|
18027
|
+
offline: false,
|
|
18028
|
+
output: { entity: "meeting_invitation" }
|
|
18029
|
+
}).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)));
|
|
18030
|
+
}, "addMeetingManagementCommands");
|
|
18031
|
+
|
|
18032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17957
18033
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17958
18034
|
command.allowUnknownOption();
|
|
17959
18035
|
const parse2 = command.parseOptions.bind(command);
|
|
@@ -17973,7 +18049,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17973
18049
|
return command;
|
|
17974
18050
|
}, "queryWordsAfterOptions");
|
|
17975
18051
|
|
|
17976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17977
18053
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17978
18054
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17979
18055
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -18015,7 +18091,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
18015
18091
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
18016
18092
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
18017
18093
|
|
|
18018
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
18019
18095
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
18020
18096
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
18021
18097
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -18038,15 +18114,20 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
18038
18114
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
18039
18115
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
18040
18116
|
|
|
18041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
18042
18118
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
18119
|
+
var AGO = /^(\d+)(m|h|d)$/;
|
|
18120
|
+
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
18043
18121
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
18122
|
+
const [, amount, unit] = AGO.exec(value.trim()) ?? [];
|
|
18123
|
+
if (amount && unit)
|
|
18124
|
+
return Date.now() - Number(amount) * (AGO_MS[unit] ?? 0);
|
|
18044
18125
|
const zone = timezoneOf();
|
|
18045
18126
|
let time;
|
|
18046
18127
|
try {
|
|
18047
18128
|
time = zonedMoment(value, zone, { start: 0, end: value.length }, { end });
|
|
18048
18129
|
} catch {
|
|
18049
|
-
throw new CliError("validation_error", `${flag} takes an ISO date,
|
|
18130
|
+
throw new CliError("validation_error", `${flag} takes an ISO date, a time with or without an offset, or 30m, 2h, 7d ago`);
|
|
18050
18131
|
}
|
|
18051
18132
|
if (!ZONED.test(value.trim()))
|
|
18052
18133
|
readIn(zone);
|
|
@@ -18064,7 +18145,7 @@ var createMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program) => {
|
|
|
18064
18145
|
program.addCommand(search);
|
|
18065
18146
|
}
|
|
18066
18147
|
const readIn = /* @__PURE__ */ __name((zone) => command.setOptionValue("timesReadIn", zone), "readIn");
|
|
18067
|
-
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);
|
|
18148
|
+
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);
|
|
18068
18149
|
annotate(command, {
|
|
18069
18150
|
origin: "handwritten",
|
|
18070
18151
|
effects: { remote: "none", local: "read" },
|
|
@@ -18124,7 +18205,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
18124
18205
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
18125
18206
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
18126
18207
|
|
|
18127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
18128
18209
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
18129
18210
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
18130
18211
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -18143,6 +18224,14 @@ var date = /* @__PURE__ */ __name((text2) => {
|
|
|
18143
18224
|
}
|
|
18144
18225
|
}, "date");
|
|
18145
18226
|
var LOCAL_READ = { remote: "none", local: "read" };
|
|
18227
|
+
var REMOTE_READ2 = { remote: "read", local: "read" };
|
|
18228
|
+
var backendOf = /* @__PURE__ */ __name((value) => {
|
|
18229
|
+
if (!BACKENDS.includes(value))
|
|
18230
|
+
throw new InvalidArgumentError("expected archive, server or both");
|
|
18231
|
+
return value;
|
|
18232
|
+
}, "backendOf");
|
|
18233
|
+
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");
|
|
18234
|
+
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.";
|
|
18146
18235
|
var LOCAL_WRITE = { remote: "none", local: "write" };
|
|
18147
18236
|
var FETCH = { remote: "read", local: "write" };
|
|
18148
18237
|
var addMeetingCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
|
|
@@ -18158,20 +18247,44 @@ var addMeetingCommandsDefinition = /* @__PURE__ */ __name((program, deps) => {
|
|
|
18158
18247
|
const opts = command.optsWithGlobals();
|
|
18159
18248
|
deps.write(value, opts.json ? "json" : opts.jsonl ? "jsonl" : "text");
|
|
18160
18249
|
}, "print");
|
|
18161
|
-
const
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
|
|
18250
|
+
const access = /* @__PURE__ */ __name((command, backend) => ({
|
|
18251
|
+
...backend === void 0 ? {} : { backend },
|
|
18252
|
+
offline: command.optsWithGlobals().offline === true,
|
|
18253
|
+
timezone: timezoneOf(deps.timezone),
|
|
18254
|
+
...deps.now ? { now: deps.now() } : {}
|
|
18255
|
+
}), "access");
|
|
18256
|
+
const list3 = 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", `
|
|
18257
|
+
${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}
|
|
18258
|
+
${BACKEND_HELP}`);
|
|
18259
|
+
annotate(list3, {
|
|
18260
|
+
effects: REMOTE_READ2,
|
|
18261
|
+
partial: true,
|
|
18262
|
+
query: defineQuery(MEETING_QUERY),
|
|
18263
|
+
output: { entity: "meeting" }
|
|
18264
|
+
});
|
|
18265
|
+
backendOption(output(list3)).option("--limit <n>", "meetings per page", integer4, 100).option("--page <n>", "page number", integer4, 1).action(async (words3, opts, command) => {
|
|
18165
18266
|
const query = meetingsQuery(words3.join(" "));
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18170
|
-
|
|
18171
|
-
|
|
18267
|
+
await deps.inRun(command, async () => {
|
|
18268
|
+
const { server: _server, ...answer } = await meetingsListThrough(deps.source, deps.store, {
|
|
18269
|
+
accountId: deps.accountId,
|
|
18270
|
+
limit: opts.limit,
|
|
18271
|
+
offset: (opts.page - 1) * opts.limit,
|
|
18272
|
+
...query ? { query } : {}
|
|
18273
|
+
}, access(command, opts.backend));
|
|
18274
|
+
print(answer, command);
|
|
18275
|
+
});
|
|
18172
18276
|
});
|
|
18173
|
-
output(annotate(group.command("show"), { effects:
|
|
18174
|
-
|
|
18277
|
+
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}
|
|
18278
|
+
${BACKEND_HELP}`))).action(async (meeting, opts, command) => {
|
|
18279
|
+
await deps.inRun(command, async () => {
|
|
18280
|
+
const shown = await meetingShowThrough(deps.source, deps.store, deps.accountId, meeting, access(command, opts.backend));
|
|
18281
|
+
const { item: item2 } = await meetingDetailsBody(deps.store, shown.details);
|
|
18282
|
+
print({
|
|
18283
|
+
item: shown.foundIn ? { ...item2, found_in: shown.foundIn } : item2,
|
|
18284
|
+
...shown.missing ? { missing: shown.missing } : {},
|
|
18285
|
+
...shown.meta ? { meta: shown.meta } : {}
|
|
18286
|
+
}, command);
|
|
18287
|
+
});
|
|
18175
18288
|
});
|
|
18176
18289
|
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) => {
|
|
18177
18290
|
print(await meetingTranscriptAnswer(deps.store, id2, deps.accountId, { history: opts.history }), command);
|
|
@@ -18256,6 +18369,14 @@ ${deps.importHelp}`);
|
|
|
18256
18369
|
now: deps.now?.() ?? Date.now()
|
|
18257
18370
|
}), command);
|
|
18258
18371
|
});
|
|
18372
|
+
if (deps.management)
|
|
18373
|
+
addMeetingManagementCommands(group, {
|
|
18374
|
+
management: deps.management,
|
|
18375
|
+
print,
|
|
18376
|
+
output,
|
|
18377
|
+
inRun: deps.inRun,
|
|
18378
|
+
...deps.askFirst ? { askFirst: deps.askFirst } : {}
|
|
18379
|
+
});
|
|
18259
18380
|
const eventList = queryWordsAfterOptions(annotate(program.command("events").description("the owner's stored events"), {
|
|
18260
18381
|
effects: { remote: "none", local: "none" }
|
|
18261
18382
|
}).command("list")).description("list stored events").argument("[query...]", "event id, origin or time fields that narrow the list").addHelpText("after", `
|
|
@@ -18273,7 +18394,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
18273
18394
|
}, "addMeetingCommandsDefinition");
|
|
18274
18395
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
18275
18396
|
|
|
18276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18397
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
18277
18398
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
18278
18399
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
18279
18400
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -18407,7 +18528,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
18407
18528
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
18408
18529
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
18409
18530
|
|
|
18410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18531
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
18411
18532
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
18412
18533
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
18413
18534
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -18416,7 +18537,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
18416
18537
|
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");
|
|
18417
18538
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
18418
18539
|
|
|
18419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18540
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
18420
18541
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
18421
18542
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
18422
18543
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18532,23 +18653,23 @@ var contactShown = /* @__PURE__ */ __name((account, card, profile) => {
|
|
|
18532
18653
|
chats: shared
|
|
18533
18654
|
};
|
|
18534
18655
|
}, "contactShown");
|
|
18535
|
-
var chatEventAnswer = /* @__PURE__ */ __name((chatId,
|
|
18656
|
+
var chatEventAnswer = /* @__PURE__ */ __name((chatId, event2) => defined({
|
|
18536
18657
|
chat_id: chatId,
|
|
18537
|
-
time:
|
|
18538
|
-
type:
|
|
18539
|
-
message_id:
|
|
18540
|
-
by:
|
|
18541
|
-
people:
|
|
18542
|
-
title:
|
|
18658
|
+
time: event2.timestamp,
|
|
18659
|
+
type: event2.event,
|
|
18660
|
+
message_id: event2.messageId,
|
|
18661
|
+
by: event2.by,
|
|
18662
|
+
people: event2.people,
|
|
18663
|
+
title: event2.title
|
|
18543
18664
|
}), "chatEventAnswer");
|
|
18544
18665
|
var HISTORY_TYPES = { joined: "join", left: "leave", changed: "profile" };
|
|
18545
|
-
var memberEventAnswer = /* @__PURE__ */ __name((chatId,
|
|
18666
|
+
var memberEventAnswer = /* @__PURE__ */ __name((chatId, event2) => defined({
|
|
18546
18667
|
chat_id: chatId,
|
|
18547
|
-
time:
|
|
18548
|
-
type: HISTORY_TYPES[
|
|
18549
|
-
by:
|
|
18550
|
-
people: [{ id:
|
|
18551
|
-
before:
|
|
18668
|
+
time: event2.at,
|
|
18669
|
+
type: HISTORY_TYPES[event2.event],
|
|
18670
|
+
by: event2.invitedBy === void 0 ? void 0 : { id: event2.invitedBy, name: null },
|
|
18671
|
+
people: [{ id: event2.id, name: event2.name, username: event2.username }],
|
|
18672
|
+
before: event2.before ? { name: event2.before.name, username: event2.before.username } : void 0
|
|
18552
18673
|
}), "memberEventAnswer");
|
|
18553
18674
|
var inviteLinkAnswer = /* @__PURE__ */ __name((link4) => defined({
|
|
18554
18675
|
link: link4.link,
|
|
@@ -18678,7 +18799,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18678
18799
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18679
18800
|
}), "sessionAnswer");
|
|
18680
18801
|
|
|
18681
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18682
18803
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18683
18804
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18684
18805
|
if (key in own)
|
|
@@ -18695,7 +18816,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18695
18816
|
return found.bind(adapter);
|
|
18696
18817
|
}, "capability");
|
|
18697
18818
|
|
|
18698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18819
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18699
18820
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18700
18821
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18701
18822
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18757,7 +18878,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18757
18878
|
}), "storedDeps");
|
|
18758
18879
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18759
18880
|
|
|
18760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18881
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18761
18882
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18762
18883
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18763
18884
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18780,10 +18901,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18780
18901
|
}
|
|
18781
18902
|
}, "patiently");
|
|
18782
18903
|
|
|
18783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18904
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18784
18905
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18785
18906
|
|
|
18786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18787
18908
|
var REQUEST_MS = 400;
|
|
18788
18909
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18789
18910
|
const lowest = ranges[0];
|
|
@@ -18806,13 +18927,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18806
18927
|
};
|
|
18807
18928
|
}, "estimateBackfill");
|
|
18808
18929
|
|
|
18809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18930
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18810
18931
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18811
18932
|
...error,
|
|
18812
18933
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18813
18934
|
}), "withRecovery");
|
|
18814
18935
|
|
|
18815
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18816
18937
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18817
18938
|
if (isCliFailure(error))
|
|
18818
18939
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18895,7 +19016,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18895
19016
|
};
|
|
18896
19017
|
}, "mergeBatches");
|
|
18897
19018
|
|
|
18898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/groups.js
|
|
18899
19020
|
var ALL = "all";
|
|
18900
19021
|
var OWNER_NOTES = { provider: "notes", account: INTERNAL_NOTES };
|
|
18901
19022
|
var NOT_GROUP_NAMES = /* @__PURE__ */ new Set([ALL, "bots"]);
|
|
@@ -18967,7 +19088,7 @@ var groupEntries = /* @__PURE__ */ __name((saved) => ({
|
|
|
18967
19088
|
[ALL]: [ALL]
|
|
18968
19089
|
}), "groupEntries");
|
|
18969
19090
|
|
|
18970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19091
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
18971
19092
|
var NO_MAIL = "no_mail";
|
|
18972
19093
|
var MAIL = "email";
|
|
18973
19094
|
var groupLockOf = /* @__PURE__ */ __name((app, env) => {
|
|
@@ -19041,7 +19162,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
19041
19162
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
19042
19163
|
}, "accountsOfKind");
|
|
19043
19164
|
|
|
19044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
19045
19166
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
19046
19167
|
if (deps.reads !== "store")
|
|
19047
19168
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -19155,12 +19276,14 @@ var chatAmong = /* @__PURE__ */ __name(async (messenger, store, accounts, refere
|
|
|
19155
19276
|
const [only] = accounts;
|
|
19156
19277
|
if (accounts.length === 1 && only)
|
|
19157
19278
|
return { account: only, chatId: await storedChatId(messenger, reference, store, only, { includeLeft: true }) };
|
|
19158
|
-
const
|
|
19159
|
-
const held = (await store.chats.chats(account, {})).items;
|
|
19160
|
-
const chatId = await storedChatId(messenger, reference, store, account).catch(missing);
|
|
19279
|
+
const among = /* @__PURE__ */ __name(async (includeLeft) => (await Promise.all(accounts.map(async (account) => {
|
|
19280
|
+
const held = (await store.chats.chats(account, includeLeft ? { includeLeft } : {})).items;
|
|
19281
|
+
const chatId = await storedChatId(messenger, reference, store, account, { includeLeft }).catch(missing);
|
|
19161
19282
|
const chat = held.find((one2) => one2.id === chatId);
|
|
19162
19283
|
return chat ? [{ account, chat }] : [];
|
|
19163
|
-
}))).flat();
|
|
19284
|
+
}))).flat(), "among");
|
|
19285
|
+
const current = await among(false);
|
|
19286
|
+
const found = current.length > 0 ? current : await among(true);
|
|
19164
19287
|
const [one] = found;
|
|
19165
19288
|
if (found.length === 1 && one)
|
|
19166
19289
|
return { account: one.account, chatId: one.chat.id };
|
|
@@ -19240,7 +19363,7 @@ var chatsMatchingIn = /* @__PURE__ */ __name(async (store, accounts, pattern) =>
|
|
|
19240
19363
|
}, "chatsMatchingIn");
|
|
19241
19364
|
var isText = /* @__PURE__ */ __name((value) => typeof value === "string" && value !== "", "isText");
|
|
19242
19365
|
|
|
19243
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
19244
19367
|
var CONTEXT_MESSAGES = 3;
|
|
19245
19368
|
var CONTEXT_MINUTES = 10;
|
|
19246
19369
|
var MAX_CHARS = 1200;
|
|
@@ -19264,12 +19387,12 @@ var context = {
|
|
|
19264
19387
|
}, "describe")
|
|
19265
19388
|
};
|
|
19266
19389
|
|
|
19267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
19268
19391
|
var BUILT_INS = [context];
|
|
19269
19392
|
var providers = [...BUILT_INS];
|
|
19270
19393
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
19271
19394
|
|
|
19272
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
19273
19396
|
var READ_PAGE = 5e3;
|
|
19274
19397
|
var CHAIN = 50;
|
|
19275
19398
|
var CONVERSATION_QUERY = {
|
|
@@ -19421,7 +19544,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
19421
19544
|
return size2;
|
|
19422
19545
|
}, "sized");
|
|
19423
19546
|
|
|
19424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
19425
19548
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
19426
19549
|
var MESSAGE_PAGE = 5e3;
|
|
19427
19550
|
var PER_SESSION = 8;
|
|
@@ -19440,7 +19563,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19440
19563
|
price: remote.price,
|
|
19441
19564
|
installed: true,
|
|
19442
19565
|
perBatch: PER_REQUEST * concurrency,
|
|
19443
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
19566
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-JG3POFES.js")).openRemote(remote, apiKey, {
|
|
19444
19567
|
concurrency,
|
|
19445
19568
|
env: deps.env ?? process.env
|
|
19446
19569
|
}), "open")
|
|
@@ -19460,7 +19583,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
19460
19583
|
if (!isTextModelInstalled(model, directory2))
|
|
19461
19584
|
throw notDownloaded(model.id);
|
|
19462
19585
|
if (apart) {
|
|
19463
|
-
const { openProcess } = await import("./process-
|
|
19586
|
+
const { openProcess } = await import("./process-GSNPENHL.js");
|
|
19464
19587
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
19465
19588
|
}
|
|
19466
19589
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19749,7 +19872,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19749
19872
|
return { ...one, state };
|
|
19750
19873
|
}, "shaped");
|
|
19751
19874
|
|
|
19752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19753
19876
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19754
19877
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options2) => {
|
|
19755
19878
|
for (const [key, value, maximum] of [
|
|
@@ -19802,7 +19925,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options2, signal,
|
|
|
19802
19925
|
}
|
|
19803
19926
|
}, "catchUpSearch");
|
|
19804
19927
|
|
|
19805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19806
19929
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19807
19930
|
if (deps.reads === "store") {
|
|
19808
19931
|
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`);
|
|
@@ -20183,7 +20306,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
20183
20306
|
return message?.timestamp ?? fallback;
|
|
20184
20307
|
}, "timeOfKey");
|
|
20185
20308
|
|
|
20186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
20187
20310
|
var LINKS = /https?:\/\/\S+/g;
|
|
20188
20311
|
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");
|
|
20189
20312
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -20213,7 +20336,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
20213
20336
|
});
|
|
20214
20337
|
}, "questions");
|
|
20215
20338
|
|
|
20216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
20217
20340
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
20218
20341
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
20219
20342
|
const name = typed.trim().toLowerCase();
|
|
@@ -20270,7 +20393,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
20270
20393
|
return best.name;
|
|
20271
20394
|
}, "categorize");
|
|
20272
20395
|
|
|
20273
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
20274
20397
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
20275
20398
|
var RULES_IN = {
|
|
20276
20399
|
dialog: "all",
|
|
@@ -20476,18 +20599,18 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
20476
20599
|
return passes;
|
|
20477
20600
|
}, "applyTaskRulesToChats");
|
|
20478
20601
|
|
|
20479
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20602
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
20480
20603
|
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
20481
20604
|
var encoder = new TextEncoder();
|
|
20482
20605
|
|
|
20483
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20484
|
-
var
|
|
20485
|
-
var
|
|
20606
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
20607
|
+
var AGO2 = /^(\d+)(m|h|d)$/;
|
|
20608
|
+
var AGO_MS2 = { m: 6e4, h: 36e5, d: 864e5 };
|
|
20486
20609
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
20487
20610
|
var momentOf = /* @__PURE__ */ __name((reference, flag = "--since", now = Date.now(), at = {}) => {
|
|
20488
20611
|
const wanted = reference.trim();
|
|
20489
|
-
const [, amount, unit] =
|
|
20490
|
-
const time = amount && unit ? now - Number(amount) * (
|
|
20612
|
+
const [, amount, unit] = AGO2.exec(wanted) ?? [];
|
|
20613
|
+
const time = amount && unit ? now - Number(amount) * (AGO_MS2[unit] ?? 0) : DATE.test(wanted) ? calendarMoment(wanted, flag, at) : Number.NaN;
|
|
20491
20614
|
if (Number.isNaN(time)) {
|
|
20492
20615
|
throw new CliError("validation_error", `${flag} takes an ISO 8601 time or 30m, 2h, 1d ago \u2014 not "${wanted}"`);
|
|
20493
20616
|
}
|
|
@@ -20495,8 +20618,8 @@ var momentOf = /* @__PURE__ */ __name((reference, flag = "--since", now = Date.n
|
|
|
20495
20618
|
}, "momentOf");
|
|
20496
20619
|
var aheadOf = /* @__PURE__ */ __name((reference, flag, now = Date.now(), at = {}) => {
|
|
20497
20620
|
const wanted = reference.trim();
|
|
20498
|
-
const [, amount, unit] =
|
|
20499
|
-
const time = amount && unit ? now + Number(amount) * (
|
|
20621
|
+
const [, amount, unit] = AGO2.exec(wanted) ?? [];
|
|
20622
|
+
const time = amount && unit ? now + Number(amount) * (AGO_MS2[unit] ?? 0) : DATE.test(wanted) ? calendarMoment(wanted, flag, at) : Number.NaN;
|
|
20500
20623
|
if (Number.isNaN(time)) {
|
|
20501
20624
|
throw new CliError("validation_error", `${flag} takes an ISO 8601 time or 30m, 2h, 3d from now \u2014 not "${wanted}"`);
|
|
20502
20625
|
}
|
|
@@ -20520,7 +20643,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
20520
20643
|
};
|
|
20521
20644
|
}, "dateWindow");
|
|
20522
20645
|
|
|
20523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20646
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
20524
20647
|
var DAY_MS = 864e5;
|
|
20525
20648
|
var NEW_DAYS = 30;
|
|
20526
20649
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20597,7 +20720,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20597
20720
|
};
|
|
20598
20721
|
}, "scorePerson");
|
|
20599
20722
|
|
|
20600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20723
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
20601
20724
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
20602
20725
|
const controller = new AbortController();
|
|
20603
20726
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -20613,7 +20736,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run2) => {
|
|
|
20613
20736
|
}
|
|
20614
20737
|
}, "withTimeLimit");
|
|
20615
20738
|
|
|
20616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20617
20740
|
var REGISTRIES = {
|
|
20618
20741
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20619
20742
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20700,7 +20823,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20700
20823
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20701
20824
|
})), "notCovered");
|
|
20702
20825
|
|
|
20703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20704
20827
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20705
20828
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20706
20829
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20788,7 +20911,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20788
20911
|
};
|
|
20789
20912
|
}, "botCheckService");
|
|
20790
20913
|
|
|
20791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20792
20915
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20793
20916
|
if (value === void 0)
|
|
20794
20917
|
return void 0;
|
|
@@ -20798,7 +20921,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20798
20921
|
return id2;
|
|
20799
20922
|
}, "threadIdOf");
|
|
20800
20923
|
|
|
20801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20924
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20802
20925
|
var TOP_POSTS = 5;
|
|
20803
20926
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20804
20927
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20858,7 +20981,7 @@ var topPosts = /* @__PURE__ */ __name((messages) => messages.map((one) => {
|
|
|
20858
20981
|
}).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");
|
|
20859
20982
|
var membersOf2 = /* @__PURE__ */ __name(({ events, more }, messages, since) => {
|
|
20860
20983
|
const inPeriod = events.filter(({ timestamp }) => Date.parse(timestamp) >= since);
|
|
20861
|
-
const people = /* @__PURE__ */ __name((names2) => inPeriod.filter(({ event }) => names2.has(
|
|
20984
|
+
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");
|
|
20862
20985
|
const joined = people(JOINS);
|
|
20863
20986
|
const left = people(LEAVES);
|
|
20864
20987
|
const firstWords = joined.flatMap(({ id: id2, at }) => {
|
|
@@ -20892,10 +21015,10 @@ var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
|
20892
21015
|
}, "row");
|
|
20893
21016
|
for (const one of messages)
|
|
20894
21017
|
row(keyOf7(one.timestamp)).messages.push(one);
|
|
20895
|
-
for (const { timestamp, event, people } of events?.events ?? []) {
|
|
20896
|
-
if (JOINS.has(
|
|
21018
|
+
for (const { timestamp, event: event2, people } of events?.events ?? []) {
|
|
21019
|
+
if (JOINS.has(event2))
|
|
20897
21020
|
row(keyOf7(timestamp)).joined += people.length;
|
|
20898
|
-
if (LEAVES.has(
|
|
21021
|
+
if (LEAVES.has(event2))
|
|
20899
21022
|
row(keyOf7(timestamp)).left += people.length;
|
|
20900
21023
|
}
|
|
20901
21024
|
return [...rows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, found]) => ({
|
|
@@ -20915,7 +21038,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20915
21038
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20916
21039
|
}, "median");
|
|
20917
21040
|
|
|
20918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21041
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20919
21042
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20920
21043
|
const events = [];
|
|
20921
21044
|
for (const stay of stays) {
|
|
@@ -20947,7 +21070,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20947
21070
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20948
21071
|
}, "memberEvents");
|
|
20949
21072
|
|
|
20950
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21073
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20951
21074
|
var EVENTS_DAYS = 7;
|
|
20952
21075
|
var TRACKED_DAYS = 30;
|
|
20953
21076
|
var STATS_PAGE = 1e3;
|
|
@@ -21242,7 +21365,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
21242
21365
|
return members.length === 0 ? null : members;
|
|
21243
21366
|
}, "storedMembers");
|
|
21244
21367
|
|
|
21245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
21246
21369
|
var INBOX_CHATS = 20;
|
|
21247
21370
|
var REVIEW_DAYS = 3;
|
|
21248
21371
|
var UNANSWERED_HOURS = 24;
|
|
@@ -21450,7 +21573,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
21450
21573
|
};
|
|
21451
21574
|
}, "inboxService");
|
|
21452
21575
|
|
|
21453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21576
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
21454
21577
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
21455
21578
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
21456
21579
|
const { text: text2, spans } = formatted2;
|
|
@@ -21493,9 +21616,9 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
21493
21616
|
const positions = /* @__PURE__ */ new Map([[0, 0]]);
|
|
21494
21617
|
let original = 0;
|
|
21495
21618
|
let visible = 0;
|
|
21496
|
-
for (const
|
|
21497
|
-
const rendered = text2.startsWith(
|
|
21498
|
-
original +=
|
|
21619
|
+
for (const character2 of formatted2.text) {
|
|
21620
|
+
const rendered = text2.startsWith(character2, visible) ? character2 : visibleControls(character2);
|
|
21621
|
+
original += character2.length;
|
|
21499
21622
|
visible += rendered.length;
|
|
21500
21623
|
positions.set(original, visible);
|
|
21501
21624
|
}
|
|
@@ -21510,7 +21633,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
21510
21633
|
};
|
|
21511
21634
|
}, "visibleFormattedText");
|
|
21512
21635
|
|
|
21513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
21514
21637
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
21515
21638
|
var LINK2 = /https?:\/\/\S+/i;
|
|
21516
21639
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -21667,7 +21790,7 @@ var gather = /* @__PURE__ */ __name(async (adapter, chatId, since) => {
|
|
|
21667
21790
|
}
|
|
21668
21791
|
const scanned = adapter.chatEvents ? (await adapter.chatEvents(chatId, { since })).events : [];
|
|
21669
21792
|
const until = messages.at(-1)?.timestamp ?? null;
|
|
21670
|
-
const events = more && until !== null ? scanned.filter((
|
|
21793
|
+
const events = more && until !== null ? scanned.filter((event2) => Date.parse(event2.timestamp) <= Date.parse(until)) : scanned;
|
|
21671
21794
|
if (!adapter.chatEvents)
|
|
21672
21795
|
notes.push("this messenger does not say who joined, so only messages are judged");
|
|
21673
21796
|
const joinedIds = new Set(events.filter((one) => one.event === "join" || one.event === "add").flatMap((one) => one.people.length > 0 ? one.people.map((person) => person.id) : one.by.id ? [one.by.id] : []));
|
|
@@ -21698,7 +21821,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
21698
21821
|
}, "nextPoint");
|
|
21699
21822
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
21700
21823
|
|
|
21701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
21702
21825
|
import { existsSync as existsSync2, readFileSync as readFileSync4 } from "node:fs";
|
|
21703
21826
|
import { join as join4 } from "node:path";
|
|
21704
21827
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -21841,7 +21964,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
21841
21964
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
21842
21965
|
}, "assign");
|
|
21843
21966
|
|
|
21844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-meetings.js
|
|
21845
21968
|
var SCAN = 1e3;
|
|
21846
21969
|
var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { limit = 10, since, until } = {}) => {
|
|
21847
21970
|
const byId2 = new Map(accounts.map((one) => [one.id, one]));
|
|
@@ -21893,7 +22016,7 @@ var personMeetings = /* @__PURE__ */ __name(async (store, people, accounts, { li
|
|
|
21893
22016
|
return { items, total: newest.length, hasMore: cut || newest.length > limit };
|
|
21894
22017
|
}, "personMeetings");
|
|
21895
22018
|
|
|
21896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22019
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21897
22020
|
var CONTEXT_MESSAGES2 = 10;
|
|
21898
22021
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21899
22022
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21936,14 +22059,14 @@ var mailWith = /* @__PURE__ */ __name(async (store, key, address, limit, since)
|
|
|
21936
22059
|
}, "mailWith");
|
|
21937
22060
|
var newestFirst = /* @__PURE__ */ __name((a, b) => Date.parse(b.timestamp) - Date.parse(a.timestamp), "newestFirst");
|
|
21938
22061
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
21939
|
-
var contextEvent = /* @__PURE__ */ __name((
|
|
21940
|
-
ref: `event:${
|
|
21941
|
-
title:
|
|
21942
|
-
startsAt: iso(
|
|
21943
|
-
endsAt: iso(
|
|
21944
|
-
allDay:
|
|
21945
|
-
location:
|
|
21946
|
-
status:
|
|
22062
|
+
var contextEvent = /* @__PURE__ */ __name((event2) => ({
|
|
22063
|
+
ref: `event:${event2.id}`,
|
|
22064
|
+
title: event2.title,
|
|
22065
|
+
startsAt: iso(event2.startsAt),
|
|
22066
|
+
endsAt: iso(event2.endsAt),
|
|
22067
|
+
allDay: event2.allDay === true,
|
|
22068
|
+
location: event2.location,
|
|
22069
|
+
status: event2.status ?? null
|
|
21947
22070
|
}), "contextEvent");
|
|
21948
22071
|
var EVENT_PAGE = 100;
|
|
21949
22072
|
var EVENT_ROWS = 1e3;
|
|
@@ -21952,17 +22075,17 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
21952
22075
|
const series = /* @__PURE__ */ new Set();
|
|
21953
22076
|
for (let offset = 0; offset < EVENT_ROWS; offset += EVENT_PAGE) {
|
|
21954
22077
|
const page = await store.calendar.events({ ...filter, limit: EVENT_PAGE, offset });
|
|
21955
|
-
for (const
|
|
21956
|
-
if (
|
|
22078
|
+
for (const event2 of page) {
|
|
22079
|
+
if (event2.status === "cancelled")
|
|
21957
22080
|
continue;
|
|
21958
|
-
if (
|
|
21959
|
-
if (series.has(
|
|
22081
|
+
if (event2.eventSeriesId !== null) {
|
|
22082
|
+
if (series.has(event2.eventSeriesId))
|
|
21960
22083
|
continue;
|
|
21961
|
-
series.add(
|
|
22084
|
+
series.add(event2.eventSeriesId);
|
|
21962
22085
|
}
|
|
21963
22086
|
if (items.length === limit)
|
|
21964
22087
|
return { items, cut: true };
|
|
21965
|
-
items.push(
|
|
22088
|
+
items.push(event2);
|
|
21966
22089
|
}
|
|
21967
22090
|
if (page.length < EVENT_PAGE)
|
|
21968
22091
|
return { items, cut: false };
|
|
@@ -22199,10 +22322,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
22199
22322
|
};
|
|
22200
22323
|
}, "personMessages");
|
|
22201
22324
|
|
|
22202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
22203
22326
|
import { createHash } from "node:crypto";
|
|
22204
22327
|
|
|
22205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
22206
22329
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
22207
22330
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options2 = {}) => {
|
|
22208
22331
|
const parsed = parseMeetingReference(reference);
|
|
@@ -22220,7 +22343,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
22220
22343
|
return { parsed, meeting };
|
|
22221
22344
|
}, "authorizedMeetingMetadata");
|
|
22222
22345
|
|
|
22223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
22224
22347
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
22225
22348
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
22226
22349
|
if (signal?.aborted)
|
|
@@ -22419,7 +22542,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
22419
22542
|
return { ...packet, fingerprint: hash(packet) };
|
|
22420
22543
|
}, "readMeetingEvidence");
|
|
22421
22544
|
|
|
22422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
22423
22546
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options2) => {
|
|
22424
22547
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options2;
|
|
22425
22548
|
const requestedAccounts = options2.accountIds;
|
|
@@ -22518,7 +22641,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
22518
22641
|
};
|
|
22519
22642
|
}, "personMeetingContext");
|
|
22520
22643
|
|
|
22521
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
22522
22645
|
var PREPARE_BYTES = 96 * 1024;
|
|
22523
22646
|
var MEETINGS = 5;
|
|
22524
22647
|
var CUES = 3;
|
|
@@ -22641,7 +22764,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
22641
22764
|
}
|
|
22642
22765
|
}, "meetingsOf");
|
|
22643
22766
|
|
|
22644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
22645
22768
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
22646
22769
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
22647
22770
|
const held = await storeIfOpen(deps);
|
|
@@ -22711,7 +22834,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
22711
22834
|
complete: false
|
|
22712
22835
|
})), "quiet");
|
|
22713
22836
|
|
|
22714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
22715
22838
|
var TIMELINE_ITEMS = 50;
|
|
22716
22839
|
var TIMELINE_MAX = 500;
|
|
22717
22840
|
var SCOPES = ["personal", "work"];
|
|
@@ -22773,7 +22896,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
22773
22896
|
};
|
|
22774
22897
|
}, "personTimeline");
|
|
22775
22898
|
|
|
22776
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22777
22900
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22778
22901
|
const ids = [...new Set(chatIds)];
|
|
22779
22902
|
if (ids.length === 0)
|
|
@@ -22799,7 +22922,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22799
22922
|
}));
|
|
22800
22923
|
}, "chatCoverage");
|
|
22801
22924
|
|
|
22802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
22803
22926
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
22804
22927
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
22805
22928
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -22863,7 +22986,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
22863
22986
|
}
|
|
22864
22987
|
}, "validateContextEvidencePage");
|
|
22865
22988
|
|
|
22866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
22867
22990
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
22868
22991
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
22869
22992
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -22916,7 +23039,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
22916
23039
|
};
|
|
22917
23040
|
}, "contextReadBudget");
|
|
22918
23041
|
|
|
22919
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
22920
23043
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
22921
23044
|
if (!port || typeof port.read !== "function")
|
|
22922
23045
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -22960,7 +23083,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
22960
23083
|
};
|
|
22961
23084
|
}, "createContextEvidenceReader");
|
|
22962
23085
|
|
|
22963
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
22964
23087
|
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");
|
|
22965
23088
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {}) => {
|
|
22966
23089
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -22976,7 +23099,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options2 = {})
|
|
|
22976
23099
|
}, "excerpt");
|
|
22977
23100
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
22978
23101
|
|
|
22979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
22980
23103
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
22981
23104
|
async around(ref, window3) {
|
|
22982
23105
|
const at = parseLocator(ref);
|
|
@@ -23071,7 +23194,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23071
23194
|
};
|
|
23072
23195
|
}, "storedNeighbours");
|
|
23073
23196
|
|
|
23074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23075
23198
|
import { createHash as createHash2 } from "node:crypto";
|
|
23076
23199
|
var DAY = 864e5;
|
|
23077
23200
|
var MAX_TIME = 864e13;
|
|
@@ -23387,7 +23510,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23387
23510
|
return value;
|
|
23388
23511
|
}, "decodeCheckpoint");
|
|
23389
23512
|
|
|
23390
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23391
23514
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23392
23515
|
var PAGE3 = 20;
|
|
23393
23516
|
var PEOPLE = 20;
|
|
@@ -23791,7 +23914,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
23791
23914
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
23792
23915
|
}, "peopleOf");
|
|
23793
23916
|
|
|
23794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
23795
23918
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
23796
23919
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
23797
23920
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -23835,7 +23958,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
23835
23958
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
23836
23959
|
}, "matchVocabularyTerms");
|
|
23837
23960
|
|
|
23838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
23839
23962
|
var KINDS = ["project", "tag", "topic"];
|
|
23840
23963
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options2 = {}) => {
|
|
23841
23964
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -23890,7 +24013,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
23890
24013
|
};
|
|
23891
24014
|
}, "findEvidenceMentions");
|
|
23892
24015
|
|
|
23893
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
23894
24017
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
23895
24018
|
var DEFAULT_PURPOSES = ["work"];
|
|
23896
24019
|
var LINK_PURPOSE = "work";
|
|
@@ -23920,7 +24043,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
23920
24043
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
23921
24044
|
], "purposeList");
|
|
23922
24045
|
|
|
23923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
23924
24047
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
23925
24048
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
23926
24049
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -24231,7 +24354,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
24231
24354
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
24232
24355
|
}, "purposeHintOf");
|
|
24233
24356
|
|
|
24234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
24235
24358
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
24236
24359
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
24237
24360
|
const held = await storeIfOpen(deps);
|
|
@@ -24496,7 +24619,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
24496
24619
|
return rest;
|
|
24497
24620
|
}, "withoutPhone");
|
|
24498
24621
|
|
|
24499
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
24500
24623
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
24501
24624
|
var PERIOD_FIELD = "created";
|
|
24502
24625
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -24616,18 +24739,18 @@ var meetingIdOf = /* @__PURE__ */ __name((group) => {
|
|
|
24616
24739
|
}
|
|
24617
24740
|
}, "meetingIdOf");
|
|
24618
24741
|
var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
24619
|
-
const
|
|
24742
|
+
const meetingOf2 = new Map(groups.flatMap((group) => {
|
|
24620
24743
|
const id2 = meetingIdOf(group);
|
|
24621
24744
|
return id2 === void 0 ? [] : [[group, id2]];
|
|
24622
24745
|
}));
|
|
24623
|
-
const titles = await store.tasks.statNames("meeting", [...new Set(
|
|
24624
|
-
return new Map([...
|
|
24746
|
+
const titles = await store.tasks.statNames("meeting", [...new Set(meetingOf2.values())]);
|
|
24747
|
+
return new Map([...meetingOf2].flatMap(([group, id2]) => {
|
|
24625
24748
|
const title = titles.get(id2);
|
|
24626
24749
|
return title === void 0 ? [] : [[group, title]];
|
|
24627
24750
|
}));
|
|
24628
24751
|
}, "meetingNames");
|
|
24629
24752
|
|
|
24630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
24631
24754
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
24632
24755
|
const tags = /* @__PURE__ */ new Map();
|
|
24633
24756
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -24636,7 +24759,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
24636
24759
|
return tags;
|
|
24637
24760
|
}, "taskTagFilters");
|
|
24638
24761
|
|
|
24639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
24640
24763
|
var TASK_QUERY = {
|
|
24641
24764
|
entity: "task",
|
|
24642
24765
|
backend: "sql",
|
|
@@ -25136,7 +25259,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
25136
25259
|
};
|
|
25137
25260
|
}, "taskView");
|
|
25138
25261
|
|
|
25139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25262
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
25140
25263
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
25141
25264
|
if (newest === null)
|
|
25142
25265
|
return null;
|
|
@@ -25145,7 +25268,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
25145
25268
|
return newest.addressed ? "owed" : null;
|
|
25146
25269
|
}, "mailTurn");
|
|
25147
25270
|
|
|
25148
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
25149
25272
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
25150
25273
|
if (error instanceof CliError && error.code === "not_found")
|
|
25151
25274
|
return void 0;
|
|
@@ -25203,7 +25326,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
25203
25326
|
};
|
|
25204
25327
|
}, "mailActivity");
|
|
25205
25328
|
|
|
25206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25329
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
25207
25330
|
var DAY2 = 864e5;
|
|
25208
25331
|
var AGENDA_DEFAULTS = { unanswered: DAY2, waiting: 7 * DAY2 };
|
|
25209
25332
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -25457,18 +25580,18 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
25457
25580
|
};
|
|
25458
25581
|
}, "agendaItem");
|
|
25459
25582
|
|
|
25460
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25461
25584
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25462
25585
|
|
|
25463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25586
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25464
25587
|
import { lstat } from "node:fs/promises";
|
|
25465
25588
|
|
|
25466
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25467
25590
|
import { createHash as createHash4, randomUUID as randomUUID3 } from "node:crypto";
|
|
25468
25591
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25469
25592
|
import { join as join6 } from "node:path";
|
|
25470
25593
|
|
|
25471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25594
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25472
25595
|
import { createHash as createHash3 } from "node:crypto";
|
|
25473
25596
|
var metadataLimit = 16384;
|
|
25474
25597
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -25528,7 +25651,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
25528
25651
|
}
|
|
25529
25652
|
}, "readPartialMetadata");
|
|
25530
25653
|
|
|
25531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
25532
25655
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
25533
25656
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
25534
25657
|
import { join as join5 } from "node:path";
|
|
@@ -25620,7 +25743,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
25620
25743
|
};
|
|
25621
25744
|
}, "partialWriter");
|
|
25622
25745
|
|
|
25623
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25746
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25624
25747
|
var NativeRecordingPartialStore = class {
|
|
25625
25748
|
static {
|
|
25626
25749
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -25727,12 +25850,12 @@ var NativeRecordingPartialStore = class {
|
|
|
25727
25850
|
}
|
|
25728
25851
|
};
|
|
25729
25852
|
|
|
25730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25853
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
25731
25854
|
import { createHash as createHash5 } from "node:crypto";
|
|
25732
25855
|
import { link as link2 } from "node:fs/promises";
|
|
25733
25856
|
import { basename as basename2, dirname as dirname5, join as join8, resolve as resolve2 } from "node:path";
|
|
25734
25857
|
|
|
25735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
25736
25859
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
25737
25860
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
25738
25861
|
signal?.throwIfAborted();
|
|
@@ -25767,7 +25890,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
25767
25890
|
signal?.throwIfAborted();
|
|
25768
25891
|
}, "commitPublication");
|
|
25769
25892
|
|
|
25770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
25771
25894
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
25772
25895
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
25773
25896
|
import { join as join7 } from "node:path";
|
|
@@ -25840,7 +25963,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
25840
25963
|
}
|
|
25841
25964
|
}, "writePublicationJournal");
|
|
25842
25965
|
|
|
25843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25966
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
25844
25967
|
var NativeRecordingPublication = class {
|
|
25845
25968
|
static {
|
|
25846
25969
|
__name(this, "NativeRecordingPublication");
|
|
@@ -25913,7 +26036,7 @@ var NativeRecordingPublication = class {
|
|
|
25913
26036
|
}
|
|
25914
26037
|
};
|
|
25915
26038
|
|
|
25916
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
25917
26040
|
import { createHash as createHash6 } from "node:crypto";
|
|
25918
26041
|
import { readdir } from "node:fs/promises";
|
|
25919
26042
|
import { isAbsolute as isAbsolute2, join as join9, resolve as resolve3 } from "node:path";
|
|
@@ -26000,7 +26123,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
26000
26123
|
beforePublish
|
|
26001
26124
|
}), "commitMediaEntry");
|
|
26002
26125
|
|
|
26003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26004
26127
|
var validator = '"media-completed-v1"';
|
|
26005
26128
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26006
26129
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -26101,7 +26224,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
26101
26224
|
return entry;
|
|
26102
26225
|
}, "archiveMediaFile");
|
|
26103
26226
|
|
|
26104
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
26105
26228
|
import { mkdir, realpath } from "node:fs/promises";
|
|
26106
26229
|
import { join as join10, resolve as resolve4 } from "node:path";
|
|
26107
26230
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -26168,7 +26291,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
26168
26291
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
26169
26292
|
}, "withMediaArchiveLocks");
|
|
26170
26293
|
|
|
26171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26172
26295
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
26173
26296
|
if (value === void 0)
|
|
26174
26297
|
return void 0;
|
|
@@ -26321,7 +26444,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options2) => {
|
|
|
26321
26444
|
}, { create: true });
|
|
26322
26445
|
}, "archiveMedia");
|
|
26323
26446
|
|
|
26324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26447
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
26325
26448
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
26326
26449
|
import { basename as basename3, dirname as dirname6, join as join11, resolve as resolve5 } from "node:path";
|
|
26327
26450
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -26474,7 +26597,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options2) => {
|
|
|
26474
26597
|
}, { additional: [target2], createAdditional: !options2.dryRun });
|
|
26475
26598
|
}, "moveMediaArchive");
|
|
26476
26599
|
|
|
26477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
26478
26601
|
import { writeFileSync as writeFileSync2 } from "node:fs";
|
|
26479
26602
|
import { join as join12 } from "node:path";
|
|
26480
26603
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
@@ -26499,7 +26622,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26499
26622
|
`);
|
|
26500
26623
|
await nativeRuntime({ env, progress });
|
|
26501
26624
|
progress(`${model.id}: loading it once to check it works`);
|
|
26502
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
26625
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-LB6ONWHX.js");
|
|
26503
26626
|
const embedder = await openEmbedder2(model, directory2);
|
|
26504
26627
|
try {
|
|
26505
26628
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -26520,7 +26643,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
26520
26643
|
}
|
|
26521
26644
|
await nativeRuntime({ env, progress });
|
|
26522
26645
|
progress(`${model.id}: loading it once to check it works`);
|
|
26523
|
-
const { openReranker } = await import("./rerank-
|
|
26646
|
+
const { openReranker } = await import("./rerank-TVMR3OLL.js");
|
|
26524
26647
|
const reranker = await openReranker(model, directory2);
|
|
26525
26648
|
try {
|
|
26526
26649
|
await reranker.score("check", ["check"]);
|
|
@@ -26538,7 +26661,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26538
26661
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
26539
26662
|
}
|
|
26540
26663
|
progress(`${model.id}: loading it once to check it works`);
|
|
26541
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
26664
|
+
const { openPictureEmbedder } = await import("./embedder-WE7B2RU5.js");
|
|
26542
26665
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
26543
26666
|
try {
|
|
26544
26667
|
const vector = await embedder.embedQuery("check");
|
|
@@ -26550,7 +26673,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26550
26673
|
return { model, directory: directory2 };
|
|
26551
26674
|
}, "downloadImageModel");
|
|
26552
26675
|
|
|
26553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
26554
26677
|
var MONEY_REQUEST = "money-request";
|
|
26555
26678
|
var MONEY_DONE = "money-done";
|
|
26556
26679
|
var PROMISE = "promise";
|
|
@@ -26584,10 +26707,10 @@ var MONEY_WORDS = [
|
|
|
26584
26707
|
}
|
|
26585
26708
|
];
|
|
26586
26709
|
|
|
26587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
26588
26711
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
26589
26712
|
|
|
26590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
26591
26714
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
26592
26715
|
var MONEY_DONE_FORMS = words([
|
|
26593
26716
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -26627,7 +26750,7 @@ var PROMISE_FORMS = words([
|
|
|
26627
26750
|
"estar\xE1 listo"
|
|
26628
26751
|
]);
|
|
26629
26752
|
|
|
26630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
26631
26754
|
var EXCERPT_CHARS = 80;
|
|
26632
26755
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
26633
26756
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -26649,7 +26772,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
26649
26772
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
26650
26773
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
26651
26774
|
|
|
26652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
26653
26776
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
26654
26777
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
26655
26778
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -26730,7 +26853,7 @@ var amounts = {
|
|
|
26730
26853
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
26731
26854
|
};
|
|
26732
26855
|
|
|
26733
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
26734
26857
|
var children = {
|
|
26735
26858
|
id: "children",
|
|
26736
26859
|
version: 1,
|
|
@@ -26759,7 +26882,7 @@ var children = {
|
|
|
26759
26882
|
}, "read")
|
|
26760
26883
|
};
|
|
26761
26884
|
|
|
26762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
26763
26886
|
var coverage = {
|
|
26764
26887
|
id: "coverage",
|
|
26765
26888
|
version: 1,
|
|
@@ -26788,7 +26911,7 @@ var coverage = {
|
|
|
26788
26911
|
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")
|
|
26789
26912
|
};
|
|
26790
26913
|
|
|
26791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
26792
26915
|
var holding2 = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
26793
26916
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
26794
26917
|
signal: "payments",
|
|
@@ -26838,7 +26961,7 @@ var payments = {
|
|
|
26838
26961
|
}, "read")
|
|
26839
26962
|
};
|
|
26840
26963
|
|
|
26841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
26842
26965
|
var PATTERNS_PER_CHAT = 3;
|
|
26843
26966
|
var DAY3 = 864e5;
|
|
26844
26967
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -26927,7 +27050,7 @@ var promises = {
|
|
|
26927
27050
|
}, "read")
|
|
26928
27051
|
};
|
|
26929
27052
|
|
|
26930
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
26931
27054
|
var PER_SIDE = 5;
|
|
26932
27055
|
var WEEK = 7 * 864e5;
|
|
26933
27056
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26958,7 +27081,7 @@ var questions2 = {
|
|
|
26958
27081
|
}, "attention")
|
|
26959
27082
|
};
|
|
26960
27083
|
|
|
26961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26962
27085
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26963
27086
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
26964
27087
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27026,7 +27149,7 @@ var replyNext = {
|
|
|
27026
27149
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27027
27150
|
};
|
|
27028
27151
|
|
|
27029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27030
27153
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27031
27154
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27032
27155
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27072,7 +27195,7 @@ var topics = {
|
|
|
27072
27195
|
}, "read")
|
|
27073
27196
|
};
|
|
27074
27197
|
|
|
27075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27076
27199
|
var STATUS_SIGNALS = [
|
|
27077
27200
|
replyNext,
|
|
27078
27201
|
questions2,
|
|
@@ -27084,7 +27207,7 @@ var STATUS_SIGNALS = [
|
|
|
27084
27207
|
children
|
|
27085
27208
|
];
|
|
27086
27209
|
|
|
27087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27088
27211
|
var DAY4 = 864e5;
|
|
27089
27212
|
var STATUS_WINDOW = 300;
|
|
27090
27213
|
var STATUS_CHATS = 16;
|
|
@@ -27273,7 +27396,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27273
27396
|
};
|
|
27274
27397
|
}, "projectStatus");
|
|
27275
27398
|
|
|
27276
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27399
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
27277
27400
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
27278
27401
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27279
27402
|
if (deps.offline)
|
|
@@ -27345,7 +27468,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
27345
27468
|
};
|
|
27346
27469
|
}, "accountService");
|
|
27347
27470
|
|
|
27348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
27349
27472
|
var MINUTE = 6e4;
|
|
27350
27473
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
27351
27474
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -27364,7 +27487,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
27364
27487
|
return new Date(at - at % MINUTE).toISOString();
|
|
27365
27488
|
}, "sendTime");
|
|
27366
27489
|
|
|
27367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
27368
27491
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
27369
27492
|
try {
|
|
27370
27493
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -27611,7 +27734,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
27611
27734
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
27612
27735
|
}, "linkLimits");
|
|
27613
27736
|
|
|
27614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27737
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
27615
27738
|
var THREADS_PAGE = 500;
|
|
27616
27739
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
27617
27740
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -27690,7 +27813,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
27690
27813
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
27691
27814
|
}, "readMail");
|
|
27692
27815
|
|
|
27693
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
27694
27817
|
var PERSON_FIELDS = /* @__PURE__ */ new Set(["from", "to", "cc", "bcc"]);
|
|
27695
27818
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is", "list"]);
|
|
27696
27819
|
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");
|
|
@@ -27774,9 +27897,7 @@ var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messe
|
|
|
27774
27897
|
if (node.field === "date")
|
|
27775
27898
|
return {
|
|
27776
27899
|
...node,
|
|
27777
|
-
resolution: {
|
|
27778
|
-
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)
|
|
27779
|
-
}
|
|
27900
|
+
resolution: { date: rangeOf(node, timezone) }
|
|
27780
27901
|
};
|
|
27781
27902
|
return node;
|
|
27782
27903
|
}, "resolve");
|
|
@@ -28059,7 +28180,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28059
28180
|
};
|
|
28060
28181
|
}, "statsLucene");
|
|
28061
28182
|
|
|
28062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28183
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28063
28184
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28064
28185
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28065
28186
|
function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -28228,7 +28349,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28228
28349
|
};
|
|
28229
28350
|
}, "readRankingSelection");
|
|
28230
28351
|
|
|
28231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
28232
28353
|
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");
|
|
28233
28354
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
28234
28355
|
command,
|
|
@@ -28238,7 +28359,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
28238
28359
|
fieldsVersion: FIELD_VERSION
|
|
28239
28360
|
}), "searchRecordOf");
|
|
28240
28361
|
|
|
28241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28362
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
28242
28363
|
function invalid4(message) {
|
|
28243
28364
|
throw new CliError("validation_error", message);
|
|
28244
28365
|
}
|
|
@@ -28532,7 +28653,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28532
28653
|
}, "evidence")
|
|
28533
28654
|
}), "adminStatisticsService");
|
|
28534
28655
|
|
|
28535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
28536
28657
|
import { createHash as createHash7, randomUUID as randomUUID5 } from "node:crypto";
|
|
28537
28658
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
28538
28659
|
var validateRepair = /* @__PURE__ */ __name((messenger, options2) => {
|
|
@@ -28669,12 +28790,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
28669
28790
|
return { plan, repair };
|
|
28670
28791
|
}, "gapsService");
|
|
28671
28792
|
|
|
28672
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28673
28794
|
import { createHash as createHash10 } from "node:crypto";
|
|
28674
28795
|
import { constants as constants2, mkdirSync as mkdirSync5 } from "node:fs";
|
|
28675
28796
|
import { lstat as lstat5, open as open6, readFile as readFile2, stat as stat2 } from "node:fs/promises";
|
|
28676
28797
|
|
|
28677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
28678
28799
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
28679
28800
|
import { basename as basename4, join as join13, relative as relative2, sep as sep2 } from "node:path";
|
|
28680
28801
|
var MAX_FILES = 1e4;
|
|
@@ -28745,21 +28866,21 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
28745
28866
|
return choices;
|
|
28746
28867
|
}, "directoryPaths");
|
|
28747
28868
|
|
|
28748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28869
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28749
28870
|
import { posix } from "node:path";
|
|
28750
28871
|
|
|
28751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28752
28873
|
import { setImmediate as tick } from "node:timers/promises";
|
|
28753
28874
|
import { crc32 } from "node:zlib";
|
|
28754
28875
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
28755
28876
|
|
|
28756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
28757
28878
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
28758
28879
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
28759
28880
|
var SAMPLE = 65536;
|
|
28760
28881
|
var invalidText = /* @__PURE__ */ __name((text2) => {
|
|
28761
|
-
for (const
|
|
28762
|
-
const code =
|
|
28882
|
+
for (const character2 of text2) {
|
|
28883
|
+
const code = character2.charCodeAt(0);
|
|
28763
28884
|
if (code < 9 || code === 11 || code > 13 && code < 32 || code >= 127 && code <= 159)
|
|
28764
28885
|
return true;
|
|
28765
28886
|
}
|
|
@@ -28855,7 +28976,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
28855
28976
|
return result.text;
|
|
28856
28977
|
}, "decodeXml");
|
|
28857
28978
|
|
|
28858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28979
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
28859
28980
|
var MAX_PART = 10 * 1024 * 1024;
|
|
28860
28981
|
var MAX_ENTRIES = 1e3;
|
|
28861
28982
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28868,7 +28989,7 @@ var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
|
28868
28989
|
if (signal?.aborted)
|
|
28869
28990
|
throw new CliError("cancelled", "document extraction cancelled");
|
|
28870
28991
|
}, "cancelled");
|
|
28871
|
-
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((
|
|
28992
|
+
var safeName2 = /* @__PURE__ */ __name((name) => name.length > 0 && name.length <= 512 && !/^[\\/]|\\/.test(name) && ![...name].some((character2) => character2.charCodeAt(0) < 32) && !name.split("/").includes(".."), "safeName");
|
|
28872
28993
|
var directory = /* @__PURE__ */ __name((bytes2) => {
|
|
28873
28994
|
const view = new DataView(bytes2.buffer, bytes2.byteOffset, bytes2.byteLength);
|
|
28874
28995
|
let end = -1;
|
|
@@ -29070,7 +29191,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29070
29191
|
return found;
|
|
29071
29192
|
}, "elements");
|
|
29072
29193
|
|
|
29073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29194
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29074
29195
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29075
29196
|
let name = "";
|
|
29076
29197
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -29125,7 +29246,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
29125
29246
|
return { text: parts.join("").trim(), truncated: false };
|
|
29126
29247
|
}, "sheetText");
|
|
29127
29248
|
|
|
29128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29129
29250
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
29130
29251
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
29131
29252
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -29200,7 +29321,7 @@ var rootIs = /* @__PURE__ */ __name((node, name, namespaces) => {
|
|
|
29200
29321
|
}, "rootIs");
|
|
29201
29322
|
var target = /* @__PURE__ */ __name((owner, reference) => {
|
|
29202
29323
|
const decoded = decodeURIComponent(reference.split(/[?#]/)[0] ?? "");
|
|
29203
|
-
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(decoded) || [...decoded].some((
|
|
29324
|
+
if (/^[a-z][a-z0-9+.-]*:|^[\\/]|\\/i.test(decoded) || [...decoded].some((character2) => character2.charCodeAt(0) < 32))
|
|
29204
29325
|
throw new Error("external_part");
|
|
29205
29326
|
const path = posix.normalize(posix.join(posix.dirname(owner), decoded));
|
|
29206
29327
|
if (path.startsWith("../") || !path || path === ".")
|
|
@@ -29525,10 +29646,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
29525
29646
|
}
|
|
29526
29647
|
}, "readDocument");
|
|
29527
29648
|
|
|
29528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29649
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29529
29650
|
import { extname as extname3 } from "node:path";
|
|
29530
29651
|
|
|
29531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
29532
29653
|
import { readFileSync as readFileSync5 } from "node:fs";
|
|
29533
29654
|
import { dirname as dirname7, extname as extname2, join as join14 } from "node:path";
|
|
29534
29655
|
import { fileURLToPath } from "node:url";
|
|
@@ -29589,7 +29710,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
29589
29710
|
}
|
|
29590
29711
|
}, "derived");
|
|
29591
29712
|
|
|
29592
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
29593
29714
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
29594
29715
|
var image2 = {
|
|
29595
29716
|
id: "image",
|
|
@@ -29598,7 +29719,7 @@ var image2 = {
|
|
|
29598
29719
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
29599
29720
|
};
|
|
29600
29721
|
|
|
29601
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
29602
29723
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
29603
29724
|
var doc = {
|
|
29604
29725
|
id: "doc",
|
|
@@ -29610,7 +29731,7 @@ var doc = {
|
|
|
29610
29731
|
}), "read")
|
|
29611
29732
|
};
|
|
29612
29733
|
|
|
29613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
29614
29735
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
29615
29736
|
var docx = {
|
|
29616
29737
|
id: "docx",
|
|
@@ -29623,8 +29744,62 @@ var docx = {
|
|
|
29623
29744
|
}), "read")
|
|
29624
29745
|
};
|
|
29625
29746
|
|
|
29626
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
29627
29748
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
29749
|
+
|
|
29750
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/html-entities.js
|
|
29751
|
+
var NAMED = {
|
|
29752
|
+
amp: "&",
|
|
29753
|
+
lt: "<",
|
|
29754
|
+
gt: ">",
|
|
29755
|
+
quot: '"',
|
|
29756
|
+
apos: "'",
|
|
29757
|
+
nbsp: "\xA0",
|
|
29758
|
+
shy: "\xAD",
|
|
29759
|
+
ensp: "\u2002",
|
|
29760
|
+
emsp: "\u2003",
|
|
29761
|
+
thinsp: "\u2009",
|
|
29762
|
+
zwnj: "\u200C",
|
|
29763
|
+
zwj: "\u200D",
|
|
29764
|
+
lsquo: "\u2018",
|
|
29765
|
+
rsquo: "\u2019",
|
|
29766
|
+
sbquo: "\u201A",
|
|
29767
|
+
ldquo: "\u201C",
|
|
29768
|
+
rdquo: "\u201D",
|
|
29769
|
+
bdquo: "\u201E",
|
|
29770
|
+
laquo: "\xAB",
|
|
29771
|
+
raquo: "\xBB",
|
|
29772
|
+
lsaquo: "\u2039",
|
|
29773
|
+
rsaquo: "\u203A",
|
|
29774
|
+
ndash: "\u2013",
|
|
29775
|
+
mdash: "\u2014",
|
|
29776
|
+
hellip: "\u2026",
|
|
29777
|
+
bull: "\u2022",
|
|
29778
|
+
middot: "\xB7",
|
|
29779
|
+
copy: "\xA9",
|
|
29780
|
+
reg: "\xAE",
|
|
29781
|
+
trade: "\u2122",
|
|
29782
|
+
euro: "\u20AC",
|
|
29783
|
+
pound: "\xA3",
|
|
29784
|
+
yen: "\xA5",
|
|
29785
|
+
cent: "\xA2",
|
|
29786
|
+
deg: "\xB0",
|
|
29787
|
+
plusmn: "\xB1",
|
|
29788
|
+
times: "\xD7",
|
|
29789
|
+
divide: "\xF7",
|
|
29790
|
+
sect: "\xA7",
|
|
29791
|
+
para: "\xB6",
|
|
29792
|
+
iexcl: "\xA1",
|
|
29793
|
+
iquest: "\xBF"
|
|
29794
|
+
};
|
|
29795
|
+
var character = /* @__PURE__ */ __name((code, entity) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : entity, "character");
|
|
29796
|
+
var decodeEntities = /* @__PURE__ */ __name((text2) => text2.replace(/&(#x[0-9a-f]{1,6}|#\d{1,7}|[a-z]{2,8});/gi, (entity, body) => {
|
|
29797
|
+
if (body[0] !== "#")
|
|
29798
|
+
return NAMED[body] ?? NAMED[body.toLowerCase()] ?? entity;
|
|
29799
|
+
return body[1] === "x" || body[1] === "X" ? character(Number.parseInt(body.slice(2), 16), entity) : character(Number(body.slice(1)), entity);
|
|
29800
|
+
}), "decodeEntities");
|
|
29801
|
+
|
|
29802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
29628
29803
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
29629
29804
|
"fonttbl",
|
|
29630
29805
|
"colortbl",
|
|
@@ -29757,7 +29932,6 @@ var HTML_DROPPED_CLOSE = new Map(["script", "style", "head", "noscript", "templa
|
|
|
29757
29932
|
new RegExp(`<\\/${name}\\s*>`, "gi")
|
|
29758
29933
|
]));
|
|
29759
29934
|
var HTML_BLOCK = /<\/?(p|div|br|li|ul|ol|tr|h[1-6]|blockquote|pre|section|article|header|footer|table|hr)\b[^>]*>/gi;
|
|
29760
|
-
var ENTITIES = { amp: "&", lt: "<", gt: ">", quot: '"', apos: "'", nbsp: "\xA0" };
|
|
29761
29935
|
var replaceTags = /* @__PURE__ */ __name((source, tag, replacement) => {
|
|
29762
29936
|
const end = source.lastIndexOf(">") + 1;
|
|
29763
29937
|
return source.slice(0, end).replace(tag, replacement) + source.slice(end);
|
|
@@ -29788,18 +29962,10 @@ var dropHidden = /* @__PURE__ */ __name((source) => {
|
|
|
29788
29962
|
var htmlText = /* @__PURE__ */ __name((source) => {
|
|
29789
29963
|
const uncommented = source.replace(/<!--[\s\S]*?(-->|$)/g, (comment, close) => close ? "" : comment);
|
|
29790
29964
|
const blocks = replaceTags(dropHidden(uncommented).replace(/<\/t[dh]\s*>/gi, " "), HTML_BLOCK, "\n");
|
|
29791
|
-
return replaceTags(blocks, /<[^>]*>/g, "").replace(
|
|
29792
|
-
const lower = body.toLowerCase();
|
|
29793
|
-
if (lower.startsWith("#x"))
|
|
29794
|
-
return safeChar(Number.parseInt(lower.slice(2), 16), entity);
|
|
29795
|
-
if (lower.startsWith("#"))
|
|
29796
|
-
return safeChar(Number(lower.slice(1)), entity);
|
|
29797
|
-
return ENTITIES[lower] ?? entity;
|
|
29798
|
-
}).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
29965
|
+
return decodeEntities(replaceTags(blocks, /<[^>]*>/g, "")).replace(/(?<![ \t\u00a0])[ \t\u00a0]+\n/g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
29799
29966
|
}, "htmlText");
|
|
29800
|
-
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
29801
29967
|
|
|
29802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
29803
29969
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
29804
29970
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
29805
29971
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -29855,7 +30021,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
29855
30021
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
29856
30022
|
}, "markdownSections");
|
|
29857
30023
|
|
|
29858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
29859
30025
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
29860
30026
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
29861
30027
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29926,7 +30092,7 @@ var html = {
|
|
|
29926
30092
|
}, "read")
|
|
29927
30093
|
};
|
|
29928
30094
|
|
|
29929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29930
30096
|
var office = {
|
|
29931
30097
|
id: "office",
|
|
29932
30098
|
version: documentExtractor("odt"),
|
|
@@ -29937,7 +30103,7 @@ var office = {
|
|
|
29937
30103
|
}, "read")
|
|
29938
30104
|
};
|
|
29939
30105
|
|
|
29940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29941
30107
|
var pdf = {
|
|
29942
30108
|
id: "pdf",
|
|
29943
30109
|
version: "unpdf",
|
|
@@ -30004,7 +30170,7 @@ var pdf = {
|
|
|
30004
30170
|
}), "read")
|
|
30005
30171
|
};
|
|
30006
30172
|
|
|
30007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30008
30174
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30009
30175
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30010
30176
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30024,7 +30190,7 @@ var plain = {
|
|
|
30024
30190
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30025
30191
|
};
|
|
30026
30192
|
|
|
30027
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30028
30194
|
var rtf = {
|
|
30029
30195
|
id: "rtf",
|
|
30030
30196
|
version: "v1",
|
|
@@ -30032,10 +30198,10 @@ var rtf = {
|
|
|
30032
30198
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30033
30199
|
};
|
|
30034
30200
|
|
|
30035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30036
30202
|
import { basename as basename5 } from "node:path";
|
|
30037
30203
|
|
|
30038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30039
30205
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
30040
30206
|
const cells = [];
|
|
30041
30207
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -30073,7 +30239,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
30073
30239
|
return { cells, truncated };
|
|
30074
30240
|
}, "delimitedSpans");
|
|
30075
30241
|
|
|
30076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30077
30243
|
var DELIMITED = {
|
|
30078
30244
|
".csv": ",",
|
|
30079
30245
|
".tsv": " ",
|
|
@@ -30112,7 +30278,7 @@ var sheets = {
|
|
|
30112
30278
|
}, "read")
|
|
30113
30279
|
};
|
|
30114
30280
|
|
|
30115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30281
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
30116
30282
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
30117
30283
|
var HEAD_BYTES = 1024;
|
|
30118
30284
|
var readers = [...BUILT_INS2];
|
|
@@ -30122,7 +30288,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
30122
30288
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
30123
30289
|
}, "readWithRegistry");
|
|
30124
30290
|
|
|
30125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30291
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30126
30292
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
30127
30293
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
30128
30294
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -31201,7 +31367,7 @@ function imageSize(input) {
|
|
|
31201
31367
|
}
|
|
31202
31368
|
__name(imageSize, "imageSize");
|
|
31203
31369
|
|
|
31204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31370
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
31205
31371
|
var MAX_PAGES = 20;
|
|
31206
31372
|
var MAX_PIXELS = 2e7;
|
|
31207
31373
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -31361,7 +31527,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
31361
31527
|
}
|
|
31362
31528
|
}, "ocrPdf");
|
|
31363
31529
|
|
|
31364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
31365
31531
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
31366
31532
|
const limits = pdfPreviewLimits(env);
|
|
31367
31533
|
const cancelled3 = /* @__PURE__ */ __name(() => {
|
|
@@ -31438,7 +31604,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
31438
31604
|
}
|
|
31439
31605
|
}, "pdfPreview");
|
|
31440
31606
|
|
|
31441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/picture-reading.js
|
|
31442
31608
|
import { spawn } from "node:child_process";
|
|
31443
31609
|
import { mkdtempSync, readFileSync as readFileSync6, rmSync as rmSync2, writeFileSync as writeFileSync3 } from "node:fs";
|
|
31444
31610
|
import { tmpdir } from "node:os";
|
|
@@ -31601,7 +31767,7 @@ Read the attached picture.`,
|
|
|
31601
31767
|
}
|
|
31602
31768
|
}, "readPictureWithAgent");
|
|
31603
31769
|
|
|
31604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
31605
31771
|
import { createHash as createHash8 } from "node:crypto";
|
|
31606
31772
|
import { constants } from "node:fs";
|
|
31607
31773
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -31709,7 +31875,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
31709
31875
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
31710
31876
|
}, "transferMime");
|
|
31711
31877
|
|
|
31712
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31878
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
31713
31879
|
import { createWriteStream, mkdirSync as mkdirSync4 } from "node:fs";
|
|
31714
31880
|
import { link as link3, rm } from "node:fs/promises";
|
|
31715
31881
|
import { join as join16, resolve as resolve6 } from "node:path";
|
|
@@ -31823,12 +31989,12 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
31823
31989
|
}
|
|
31824
31990
|
}, "save");
|
|
31825
31991
|
|
|
31826
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31827
31993
|
import { createHash as createHash9 } from "node:crypto";
|
|
31828
31994
|
import { lstat as lstat4, readFile } from "node:fs/promises";
|
|
31829
31995
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
31830
31996
|
|
|
31831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
31832
31998
|
var GROUP_SETTINGS = [
|
|
31833
31999
|
"allCanPin",
|
|
31834
32000
|
"onlyAdminsAdd",
|
|
@@ -31842,7 +32008,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
31842
32008
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
31843
32009
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
31844
32010
|
|
|
31845
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
31846
32012
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
31847
32013
|
var PICTURE_FLOOR = 0.25;
|
|
31848
32014
|
var PAGE4 = 50;
|
|
@@ -31883,7 +32049,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
31883
32049
|
const directory2 = imageModelsDirectory(deps.env);
|
|
31884
32050
|
if (!isImageModelInstalled(model2, directory2))
|
|
31885
32051
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
31886
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32052
|
+
const { openPictureEmbedder } = await import("./embedder-WE7B2RU5.js");
|
|
31887
32053
|
return openPictureEmbedder(model2, directory2);
|
|
31888
32054
|
}, "open");
|
|
31889
32055
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -32057,7 +32223,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
32057
32223
|
}, "search")
|
|
32058
32224
|
}), "withPictures");
|
|
32059
32225
|
|
|
32060
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
32061
32227
|
var ATTACHMENT_QUERY = {
|
|
32062
32228
|
entity: "attachment",
|
|
32063
32229
|
backend: "sql",
|
|
@@ -32528,7 +32694,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32528
32694
|
}, "readPicture")
|
|
32529
32695
|
}), "attachmentsService");
|
|
32530
32696
|
|
|
32531
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32532
32698
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32533
32699
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32534
32700
|
const store = await accountStore(deps);
|
|
@@ -32558,7 +32724,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32558
32724
|
}, "list")
|
|
32559
32725
|
}), "chatDocumentsService");
|
|
32560
32726
|
|
|
32561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32727
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32562
32728
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32563
32729
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32564
32730
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32645,7 +32811,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32645
32811
|
}
|
|
32646
32812
|
}, "isRetentionSelection");
|
|
32647
32813
|
|
|
32648
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32814
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32649
32815
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32650
32816
|
const fields = text2.split(",").map((one) => one.trim());
|
|
32651
32817
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -32852,7 +33018,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32852
33018
|
};
|
|
32853
33019
|
}, "countersService");
|
|
32854
33020
|
|
|
32855
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33021
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
32856
33022
|
var SYNC_KEY = "messages.sync-first";
|
|
32857
33023
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
32858
33024
|
var keyOf3 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -32984,7 +33150,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
32984
33150
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
32985
33151
|
}), "withRefresh");
|
|
32986
33152
|
|
|
32987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
32988
33154
|
var CANDIDATES = 50;
|
|
32989
33155
|
var WORD_HITS = 200;
|
|
32990
33156
|
var RRF_K = 60;
|
|
@@ -33259,13 +33425,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33259
33425
|
return mean2.map((value) => value / length);
|
|
33260
33426
|
}, "meanOf");
|
|
33261
33427
|
|
|
33262
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33428
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
33263
33429
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33264
33430
|
...embeddingsMaintenance(deps),
|
|
33265
33431
|
...embeddingsSearch(deps)
|
|
33266
33432
|
}), "embeddingsService");
|
|
33267
33433
|
|
|
33268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33434
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
33269
33435
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33270
33436
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33271
33437
|
if (deps.offline)
|
|
@@ -33406,7 +33572,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33406
33572
|
};
|
|
33407
33573
|
}, "foldersService");
|
|
33408
33574
|
|
|
33409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33575
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33410
33576
|
var REVIEW_COUNT = 500;
|
|
33411
33577
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33412
33578
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33485,7 +33651,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33485
33651
|
};
|
|
33486
33652
|
}, "mentionsService");
|
|
33487
33653
|
|
|
33488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33489
33655
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33490
33656
|
position,
|
|
33491
33657
|
kind,
|
|
@@ -33534,7 +33700,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33534
33700
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33535
33701
|
}, "validatePermalink");
|
|
33536
33702
|
|
|
33537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33538
33704
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33539
33705
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33540
33706
|
return `${seconds / 86400}d`;
|
|
@@ -33566,7 +33732,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33566
33732
|
return seconds;
|
|
33567
33733
|
}, "pinDurationOf");
|
|
33568
33734
|
|
|
33569
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33570
33736
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33571
33737
|
if (sendAs === void 0) {
|
|
33572
33738
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33591,7 +33757,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33591
33757
|
return sendAs;
|
|
33592
33758
|
}, "typedSendAs");
|
|
33593
33759
|
|
|
33594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33760
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33595
33761
|
var TOTAL_CAP = 1e4;
|
|
33596
33762
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33597
33763
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33602,7 +33768,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33602
33768
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33603
33769
|
}, "totalOf");
|
|
33604
33770
|
|
|
33605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33606
33772
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33607
33773
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33608
33774
|
let narrows = false;
|
|
@@ -33631,7 +33797,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33631
33797
|
return wanted(root).join(" ").trim();
|
|
33632
33798
|
}, "meaningWords");
|
|
33633
33799
|
|
|
33634
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33800
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33635
33801
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33636
33802
|
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"));
|
|
33637
33803
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -33764,7 +33930,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
33764
33930
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
33765
33931
|
}, "questionLookup");
|
|
33766
33932
|
|
|
33767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
33768
33934
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
33769
33935
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
33770
33936
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options2 = COMBINED_DEFAULTS) => {
|
|
@@ -33940,11 +34106,11 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
33940
34106
|
const events = positions.flatMap((matches, term) => matches.map(({ index }) => ({ index, term }))).sort((a, b) => a.index - b.index);
|
|
33941
34107
|
const held = /* @__PURE__ */ new Map();
|
|
33942
34108
|
let left = 0, span = Infinity;
|
|
33943
|
-
for (const [right,
|
|
33944
|
-
held.set(
|
|
34109
|
+
for (const [right, event2] of events.entries()) {
|
|
34110
|
+
held.set(event2.term, (held.get(event2.term) ?? 0) + 1);
|
|
33945
34111
|
while (held.size === terms.length && left <= right) {
|
|
33946
34112
|
const first2 = events[left];
|
|
33947
|
-
span = Math.min(span,
|
|
34113
|
+
span = Math.min(span, event2.index - first2.index + 1);
|
|
33948
34114
|
const count4 = (held.get(first2.term) ?? 1) - 1;
|
|
33949
34115
|
if (count4)
|
|
33950
34116
|
held.set(first2.term, count4);
|
|
@@ -33958,7 +34124,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
33958
34124
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase2 : coverage2 * 4 + proximity + phrase2;
|
|
33959
34125
|
}, "signals");
|
|
33960
34126
|
|
|
33961
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
33962
34128
|
var MEANING_DEPTH = 100;
|
|
33963
34129
|
var RRF_K2 = 60;
|
|
33964
34130
|
var RERANK_DEPTH = 50;
|
|
@@ -34284,7 +34450,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
34284
34450
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
34285
34451
|
}, "mixedWithReranker");
|
|
34286
34452
|
|
|
34287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34453
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
34288
34454
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
34289
34455
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
34290
34456
|
var threadBounds = /* @__PURE__ */ __name((options2 = {}) => {
|
|
@@ -34483,7 +34649,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34483
34649
|
return result;
|
|
34484
34650
|
}, "readThreadContext");
|
|
34485
34651
|
|
|
34486
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34487
34653
|
var SEARCH_FILL_MS = 200;
|
|
34488
34654
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34489
34655
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34552,7 +34718,7 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34552
34718
|
}, "accountOf");
|
|
34553
34719
|
var keyOf4 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34554
34720
|
|
|
34555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meaning-model.js
|
|
34556
34722
|
var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
34557
34723
|
const chosen = chosenTextModel(env);
|
|
34558
34724
|
if (chosen.from === "chosen" || chosen.id !== DEFAULT_TEXT_MODEL)
|
|
@@ -34567,7 +34733,7 @@ var meaningModel = /* @__PURE__ */ __name(async (store, env = process.env) => {
|
|
|
34567
34733
|
return (counts.get(before2) ?? 0) > (counts.get(now) ?? 0) ? previous.id : current.id;
|
|
34568
34734
|
}, "meaningModel");
|
|
34569
34735
|
|
|
34570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
34571
34737
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
34572
34738
|
try {
|
|
34573
34739
|
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -34646,7 +34812,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
34646
34812
|
}
|
|
34647
34813
|
}, "meaningLane");
|
|
34648
34814
|
|
|
34649
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
34650
34816
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
34651
34817
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
34652
34818
|
if (choice === "off")
|
|
@@ -34658,9 +34824,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34658
34824
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
34659
34825
|
try {
|
|
34660
34826
|
const warm = deps.embedders;
|
|
34661
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
34827
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-GSNPENHL.js")).openRerankerProcess(model, directory2, {
|
|
34662
34828
|
threads: defaultThreads()
|
|
34663
|
-
})) : await (await import("./rerank-
|
|
34829
|
+
})) : await (await import("./rerank-TVMR3OLL.js")).openReranker(model, directory2);
|
|
34664
34830
|
return {
|
|
34665
34831
|
model: model.id,
|
|
34666
34832
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -34680,7 +34846,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34680
34846
|
};
|
|
34681
34847
|
}, "rerankLane");
|
|
34682
34848
|
|
|
34683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/search/question-period.js
|
|
34684
34850
|
var DAY5 = 864e5;
|
|
34685
34851
|
var SPAN = { start: 0, end: 0 };
|
|
34686
34852
|
var phrase = /* @__PURE__ */ __name((source) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${source})(?![\\p{L}\\p{N}])`, "giu"), "phrase");
|
|
@@ -34805,17 +34971,17 @@ var questionPeriod = /* @__PURE__ */ __name((text2, now, zone) => {
|
|
|
34805
34971
|
};
|
|
34806
34972
|
}, "questionPeriod");
|
|
34807
34973
|
|
|
34808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
34809
34975
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
34810
34976
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
34811
34977
|
const directory2 = imageModelsDirectory(env);
|
|
34812
34978
|
if (!isImageModelInstalled(model, directory2))
|
|
34813
34979
|
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 });
|
|
34814
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34980
|
+
const { openPictureEmbedder } = await import("./embedder-WE7B2RU5.js");
|
|
34815
34981
|
return openPictureEmbedder(model, directory2);
|
|
34816
34982
|
}, "openPictureEmbedderFor");
|
|
34817
34983
|
|
|
34818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
34819
34985
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
34820
34986
|
const metadata = note.frontMatter;
|
|
34821
34987
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -34837,7 +35003,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
34837
35003
|
};
|
|
34838
35004
|
}, "documentSource");
|
|
34839
35005
|
|
|
34840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35006
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
34841
35007
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
34842
35008
|
const host = new URL(baseUrl).host;
|
|
34843
35009
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -34870,7 +35036,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
34870
35036
|
};
|
|
34871
35037
|
}, "embeddingKeys");
|
|
34872
35038
|
|
|
34873
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
34874
35040
|
var options = strictObject({
|
|
34875
35041
|
temperature: range(0, 2),
|
|
34876
35042
|
top_p: range(0, 1),
|
|
@@ -34937,7 +35103,7 @@ var openai = {
|
|
|
34937
35103
|
}), "complete")
|
|
34938
35104
|
};
|
|
34939
35105
|
|
|
34940
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
34941
35107
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
34942
35108
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
34943
35109
|
if (deps.signal?.aborted)
|
|
@@ -34952,7 +35118,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
34952
35118
|
if (!adapter && target2.provider === "openai")
|
|
34953
35119
|
adapter = openai;
|
|
34954
35120
|
if (!adapter && target2.provider === "anthropic")
|
|
34955
|
-
adapter = (await import("./anthropic-
|
|
35121
|
+
adapter = (await import("./anthropic-NW7DL3S3.js")).anthropic;
|
|
34956
35122
|
if (!adapter)
|
|
34957
35123
|
throw new CliError("validation_error", `no model adapter for ${target2.provider}`);
|
|
34958
35124
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -35012,7 +35178,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
35012
35178
|
}, "complete")
|
|
35013
35179
|
}), "modelGateway");
|
|
35014
35180
|
|
|
35015
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/enrichment-setting.js
|
|
35016
35182
|
var SECTION2 = "enrichment";
|
|
35017
35183
|
var ENRICHMENT_PROVIDERS = ["openai", "anthropic"];
|
|
35018
35184
|
var DEFAULT_BASE_URLS = {
|
|
@@ -35087,7 +35253,7 @@ var costOf = /* @__PURE__ */ __name((usage, setting) => {
|
|
|
35087
35253
|
return price ? Math.round((usage.input * price.input + usage.output * price.output) * 1e6) / 1e6 : null;
|
|
35088
35254
|
}, "costOf");
|
|
35089
35255
|
|
|
35090
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/enrichment.js
|
|
35091
35257
|
var ENRICH_PER_RUN = 600;
|
|
35092
35258
|
var MAX_LINE = 400;
|
|
35093
35259
|
var line2 = pipe(unknown(), transform((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim().slice(0, MAX_LINE) : ""));
|
|
@@ -35163,7 +35329,7 @@ var enrichmentState = /* @__PURE__ */ __name(async (store, env, estimateFor, key
|
|
|
35163
35329
|
};
|
|
35164
35330
|
}, "enrichmentState");
|
|
35165
35331
|
|
|
35166
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
35167
35333
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
35168
35334
|
let root;
|
|
35169
35335
|
try {
|
|
@@ -35190,7 +35356,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
35190
35356
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
35191
35357
|
}, "titleTiers");
|
|
35192
35358
|
|
|
35193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
35194
35360
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
35195
35361
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
35196
35362
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35619,7 +35785,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35619
35785
|
};
|
|
35620
35786
|
}, "searchNotesOf");
|
|
35621
35787
|
|
|
35622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35788
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35623
35789
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35624
35790
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35625
35791
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -35652,7 +35818,7 @@ var nearestEvents = /* @__PURE__ */ __name(async (store, words3, { limit, accoun
|
|
|
35652
35818
|
const floor = meaningFloor(key);
|
|
35653
35819
|
return (await store.calendar.nearest(key, vector, { limit, ...accountIds ? { accountIds } : {} })).filter(({ score }) => score > floor);
|
|
35654
35820
|
}, "nearestEvents");
|
|
35655
|
-
var keyOf5 = /* @__PURE__ */ __name(({ event }) =>
|
|
35821
|
+
var keyOf5 = /* @__PURE__ */ __name(({ event: event2 }) => event2.eventSeriesId === null ? `e${event2.id}` : `s${event2.eventSeriesId}`, "keyOf");
|
|
35656
35822
|
var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, offset = 0, accounts, exact, discover, newest, timezone, signal, candidates, env, command, embedders } = {}) => {
|
|
35657
35823
|
if (!query.trim())
|
|
35658
35824
|
throw new CliError("validation_error", "say what to find in the events");
|
|
@@ -35737,7 +35903,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35737
35903
|
};
|
|
35738
35904
|
}, "searchEvents");
|
|
35739
35905
|
|
|
35740
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
35741
35907
|
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
35742
35908
|
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
35743
35909
|
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
@@ -35767,7 +35933,7 @@ var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words3, anyWo
|
|
|
35767
35933
|
};
|
|
35768
35934
|
}, "searchBusiness");
|
|
35769
35935
|
|
|
35770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
35771
35937
|
var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
35772
35938
|
const { project, tag, topic, ...input } = request;
|
|
35773
35939
|
input.signal?.throwIfAborted();
|
|
@@ -35805,7 +35971,7 @@ var resolveMeetingSelection = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
35805
35971
|
return { input, selection };
|
|
35806
35972
|
}, "resolveMeetingSelection");
|
|
35807
35973
|
|
|
35808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35974
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
35809
35975
|
var MOST_HITS_PER_MEETING = 3;
|
|
35810
35976
|
var PAGE_ROWS = 200;
|
|
35811
35977
|
var MOST_PAGES = 25;
|
|
@@ -36033,7 +36199,7 @@ var titleItem = /* @__PURE__ */ __name((account, meeting, query) => ({
|
|
|
36033
36199
|
foundBy: ["title"]
|
|
36034
36200
|
}), "titleItem");
|
|
36035
36201
|
|
|
36036
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-harder.js
|
|
36037
36203
|
var SECTION3 = "search_harder";
|
|
36038
36204
|
var HARDER_MODELS = {
|
|
36039
36205
|
anthropic: "claude-haiku-5-5",
|
|
@@ -36279,7 +36445,7 @@ var reorderHarder = /* @__PURE__ */ __name(async (question, hits, { laterPage, a
|
|
|
36279
36445
|
};
|
|
36280
36446
|
}, "reorderHarder");
|
|
36281
36447
|
|
|
36282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36448
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
36283
36449
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm", "business", "meetings"];
|
|
36284
36450
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
36285
36451
|
const { reason, span } = error.details ?? {};
|
|
@@ -36692,7 +36858,7 @@ var insidePeriodFirst = /* @__PURE__ */ __name((ordered, period) => {
|
|
|
36692
36858
|
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);
|
|
36693
36859
|
}, "insidePeriodFirst");
|
|
36694
36860
|
|
|
36695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36696
36862
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36697
36863
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36698
36864
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36715,31 +36881,37 @@ var merge = /* @__PURE__ */ __name((one, other) => {
|
|
|
36715
36881
|
};
|
|
36716
36882
|
}, "merge");
|
|
36717
36883
|
var sameAccount4 = /* @__PURE__ */ __name((one, other) => one.provider === other.provider && one.account === other.account, "sameAccount");
|
|
36718
|
-
var
|
|
36719
|
-
|
|
36720
|
-
|
|
36721
|
-
|
|
36884
|
+
var serverReads = /* @__PURE__ */ __name((account) => ({
|
|
36885
|
+
fields: {
|
|
36886
|
+
text: ["term", "phrase"],
|
|
36887
|
+
exact: ["term", "phrase"],
|
|
36888
|
+
chat: ["term", "phrase"],
|
|
36889
|
+
from: ["term", "phrase"],
|
|
36890
|
+
date: ["term", "range"]
|
|
36891
|
+
},
|
|
36892
|
+
maxCalls: SERVER_BOUNDS.maxCalls,
|
|
36893
|
+
all: { words: [] },
|
|
36894
|
+
leaf: /* @__PURE__ */ __name((node) => {
|
|
36895
|
+
if (node.field === "text" || node.field === "exact")
|
|
36896
|
+
return { words: node.value === "" ? [] : [node.value] };
|
|
36722
36897
|
const { chat, sender, date: date2 } = node.resolution ?? {};
|
|
36723
36898
|
if (chat)
|
|
36724
|
-
return sameAccount4(chat.account, account) ?
|
|
36899
|
+
return sameAccount4(chat.account, account) ? { words: [], chat: chat.chatId } : void 0;
|
|
36725
36900
|
if (sender?.provider === account.provider)
|
|
36726
|
-
return
|
|
36727
|
-
if (date2)
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36732
|
-
|
|
36733
|
-
|
|
36734
|
-
|
|
36735
|
-
return
|
|
36736
|
-
}
|
|
36737
|
-
|
|
36738
|
-
|
|
36739
|
-
|
|
36740
|
-
const should = node.clauses.filter(({ occur }) => occur === "should");
|
|
36741
|
-
return should.length ? should.flatMap(({ node: node2 }) => branchesOf(node2, account)) : [{ words: [] }];
|
|
36742
|
-
}, "branchesOf");
|
|
36901
|
+
return { words: [], from: sender.id };
|
|
36902
|
+
if (date2) {
|
|
36903
|
+
const { from, to } = windowOf(date2);
|
|
36904
|
+
return {
|
|
36905
|
+
words: [],
|
|
36906
|
+
...from === void 0 ? {} : { minDate: from },
|
|
36907
|
+
...to === void 0 ? {} : { maxDate: to }
|
|
36908
|
+
};
|
|
36909
|
+
}
|
|
36910
|
+
return { words: [] };
|
|
36911
|
+
}, "leaf"),
|
|
36912
|
+
both: merge,
|
|
36913
|
+
sends: /* @__PURE__ */ __name(({ words: words3 }) => words3.length > 0, "sends")
|
|
36914
|
+
}), "serverReads");
|
|
36743
36915
|
var asQuery = /* @__PURE__ */ __name(({ words: words3, from, ...rest }) => ({
|
|
36744
36916
|
text: words3.join(" "),
|
|
36745
36917
|
...rest,
|
|
@@ -36796,15 +36968,12 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36796
36968
|
const scoped = execution.chat ? sameAccount4(execution.chat.account, account) ? { words: [], chat: execution.chat.chatId } : void 0 : { words: [] };
|
|
36797
36969
|
if (!scoped)
|
|
36798
36970
|
return skip("other_accounts");
|
|
36799
|
-
const
|
|
36800
|
-
|
|
36801
|
-
...new Map(all.filter(({ words: words3 }) => words3.length).map((branch) => [JSON.stringify(branch), branch])).values()
|
|
36802
|
-
];
|
|
36803
|
-
if (!unique.length)
|
|
36971
|
+
const { calls, complete } = serviceCallsOf(execution.root, serverReads(account), scoped);
|
|
36972
|
+
if (!calls.length)
|
|
36804
36973
|
return skip("no_words");
|
|
36805
|
-
if (deps.messenger.serverSearch === "chat" &&
|
|
36974
|
+
if (deps.messenger.serverSearch === "chat" && calls.some(({ chat }) => chat === void 0))
|
|
36806
36975
|
return skip("needs_chat");
|
|
36807
|
-
if (
|
|
36976
|
+
if (!complete)
|
|
36808
36977
|
report.complete = false;
|
|
36809
36978
|
const controller = new AbortController();
|
|
36810
36979
|
const timer = setTimeout(() => controller.abort(), timeMs);
|
|
@@ -36814,7 +36983,6 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36814
36983
|
resolve7(BOUND);
|
|
36815
36984
|
stop.addEventListener("abort", () => resolve7(BOUND), { once: true });
|
|
36816
36985
|
});
|
|
36817
|
-
const calls = unique.slice(0, SERVER_BOUNDS.maxCalls);
|
|
36818
36986
|
const pending = new Set(calls);
|
|
36819
36987
|
const found = [];
|
|
36820
36988
|
let open7 = true;
|
|
@@ -36881,7 +37049,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36881
37049
|
return { report, sources };
|
|
36882
37050
|
}, "searchServer");
|
|
36883
37051
|
|
|
36884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36885
37053
|
var DELETE_AT_ONCE = 10;
|
|
36886
37054
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36887
37055
|
const files = fileLinks(attachments);
|
|
@@ -37321,7 +37489,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
37321
37489
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
37322
37490
|
}, "checkMediaOptions");
|
|
37323
37491
|
|
|
37324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
37325
37493
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
37326
37494
|
var RULES2 = {
|
|
37327
37495
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -37336,7 +37504,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES2
|
|
|
37336
37504
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
37337
37505
|
}), "classifyChannel");
|
|
37338
37506
|
|
|
37339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
37340
37508
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
37341
37509
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
37342
37510
|
const store = await deps.store();
|
|
@@ -37422,7 +37590,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
37422
37590
|
};
|
|
37423
37591
|
}, "metadataService");
|
|
37424
37592
|
|
|
37425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37593
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37426
37594
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37427
37595
|
var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
37428
37596
|
const { chatId, title, rules, point, since, dryRun } = run2;
|
|
@@ -37459,7 +37627,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run2) => {
|
|
|
37459
37627
|
return { chatId, rows, notes };
|
|
37460
37628
|
}, "moderateWith");
|
|
37461
37629
|
|
|
37462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37463
37631
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37464
37632
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37465
37633
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37537,7 +37705,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37537
37705
|
}, "removePerson")
|
|
37538
37706
|
}), "moderatorOf");
|
|
37539
37707
|
|
|
37540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37541
37709
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
37542
37710
|
id: note.id,
|
|
37543
37711
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -37581,7 +37749,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37581
37749
|
};
|
|
37582
37750
|
}, "privatePeopleService");
|
|
37583
37751
|
|
|
37584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37585
37753
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37586
37754
|
total: 0,
|
|
37587
37755
|
population: 0,
|
|
@@ -37837,7 +38005,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37837
38005
|
}, "evidence")
|
|
37838
38006
|
}), "rankingsService");
|
|
37839
38007
|
|
|
37840
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37841
38009
|
var FIELDS = ["date", "chat", "kind", "muted"];
|
|
37842
38010
|
var WAITING_TAIL = 100;
|
|
37843
38011
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37971,7 +38139,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37971
38139
|
};
|
|
37972
38140
|
}, "replyStatsService");
|
|
37973
38141
|
|
|
37974
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37975
38143
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
37976
38144
|
id: one.id,
|
|
37977
38145
|
name: one.name,
|
|
@@ -38097,7 +38265,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
38097
38265
|
};
|
|
38098
38266
|
}, "searchesService");
|
|
38099
38267
|
|
|
38100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
38101
38269
|
var TAGGING_QUERY = {
|
|
38102
38270
|
entity: "tagging",
|
|
38103
38271
|
backend: "sql",
|
|
@@ -38181,7 +38349,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38181
38349
|
};
|
|
38182
38350
|
}, "tagsService");
|
|
38183
38351
|
|
|
38184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38352
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38185
38353
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38186
38354
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
38187
38355
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38380,10 +38548,10 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38380
38548
|
};
|
|
38381
38549
|
}, "topicsService");
|
|
38382
38550
|
|
|
38383
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38551
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/crm/sync.js
|
|
38384
38552
|
var CLOCK_MARGIN = 60 * 6e4;
|
|
38385
38553
|
|
|
38386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/crm/writer.js
|
|
38387
38555
|
var CRM_ASSIGN_OTHERS_KEY = "crm.assign-others";
|
|
38388
38556
|
var CRM_WRITE_DEFAULTS = {
|
|
38389
38557
|
"deals.delete": "ask",
|
|
@@ -38391,7 +38559,7 @@ var CRM_WRITE_DEFAULTS = {
|
|
|
38391
38559
|
[CRM_ASSIGN_OTHERS_KEY]: "deny"
|
|
38392
38560
|
};
|
|
38393
38561
|
|
|
38394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38395
38563
|
import { createHash as createHash11, randomUUID as randomUUID6 } from "node:crypto";
|
|
38396
38564
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38397
38565
|
var positive2 = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38465,7 +38633,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38465
38633
|
return { ...content, id: randomUUID6(), fingerprint: hash2(content) };
|
|
38466
38634
|
}, "prepareEvidencePacket");
|
|
38467
38635
|
|
|
38468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38636
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38469
38637
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38470
38638
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38471
38639
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38485,7 +38653,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38485
38653
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38486
38654
|
}, "readEvidencePacket");
|
|
38487
38655
|
|
|
38488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38489
38657
|
var scopeKeys = [
|
|
38490
38658
|
"accountId",
|
|
38491
38659
|
"meetingId",
|
|
@@ -38507,7 +38675,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
38507
38675
|
"maxVocabularyReadBytes"
|
|
38508
38676
|
]);
|
|
38509
38677
|
|
|
38510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
38511
38679
|
import { createHash as createHash12 } from "node:crypto";
|
|
38512
38680
|
import { existsSync as existsSync3 } from "node:fs";
|
|
38513
38681
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
@@ -38638,7 +38806,91 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
38638
38806
|
return { ...checked2.output, custom: true };
|
|
38639
38807
|
}, "addCustomTextModel");
|
|
38640
38808
|
|
|
38641
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/calendar/sync.js
|
|
38810
|
+
var DAY6 = 864e5;
|
|
38811
|
+
var SLOTS_EVERY = 7 * DAY6;
|
|
38812
|
+
|
|
38813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/calendar/feeds.js
|
|
38814
|
+
var FEED_LIMITS = { maxBytes: 10 * 1024 * 1024, timeoutMs: 3e4, redirects: 5 };
|
|
38815
|
+
|
|
38816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/calendar/reads.js
|
|
38817
|
+
var LIST = "events list";
|
|
38818
|
+
var EVENT_TYPES = [
|
|
38819
|
+
"default",
|
|
38820
|
+
"out-of-office",
|
|
38821
|
+
"focus",
|
|
38822
|
+
"working-location",
|
|
38823
|
+
"birthday",
|
|
38824
|
+
"from-mail",
|
|
38825
|
+
"call"
|
|
38826
|
+
];
|
|
38827
|
+
var oneSided = /* @__PURE__ */ __name((field, example) => (node) => {
|
|
38828
|
+
if (node.operator !== "range" || node.upper !== "*")
|
|
38829
|
+
queryError("query.unsupported-operator", node.span, `${field} takes only an earliest moment, such as ${example}`, {
|
|
38830
|
+
command: LIST,
|
|
38831
|
+
guide: LIST_QUERY_GUIDE
|
|
38832
|
+
});
|
|
38833
|
+
}, "oneSided");
|
|
38834
|
+
var EVENTS_QUERY = {
|
|
38835
|
+
entity: "event",
|
|
38836
|
+
backend: "native",
|
|
38837
|
+
fields: queryFieldsOf(event, {
|
|
38838
|
+
native: ["id", "starts_at", "ends_at", "changed_at", "overlapping", "calendar", "person", "event_type"],
|
|
38839
|
+
negatable: ["event_type"],
|
|
38840
|
+
relations: {
|
|
38841
|
+
event_type: {
|
|
38842
|
+
type: "enum",
|
|
38843
|
+
values: EVENT_TYPES,
|
|
38844
|
+
example: "event_type:default",
|
|
38845
|
+
relation: "events with a copy of this kind; -event_type:<kind> leaves out events with one"
|
|
38846
|
+
},
|
|
38847
|
+
calendar: {
|
|
38848
|
+
type: "kw",
|
|
38849
|
+
example: "calendar:3",
|
|
38850
|
+
relation: "one calendar, by its id, the provider's id or its title"
|
|
38851
|
+
},
|
|
38852
|
+
person: {
|
|
38853
|
+
type: "kw",
|
|
38854
|
+
example: "person:ana@example.com",
|
|
38855
|
+
relation: "events one person attends: an address, or a person id from search"
|
|
38856
|
+
}
|
|
38857
|
+
},
|
|
38858
|
+
examples: {
|
|
38859
|
+
id: "id:42",
|
|
38860
|
+
starts_at: "starts_at:[2026-11-02 TO 2026-11-07}",
|
|
38861
|
+
ends_at: "ends_at>=2026-11-02",
|
|
38862
|
+
changed_at: "changed_at>=2026-10-01",
|
|
38863
|
+
overlapping: "overlapping:true"
|
|
38864
|
+
},
|
|
38865
|
+
validate: {
|
|
38866
|
+
ends_at: oneSided("ends_at", "ends_at>=2026-11-02; for the latest, write starts_at<2026-11-07"),
|
|
38867
|
+
changed_at: oneSided("changed_at", "changed_at>=2026-10-01")
|
|
38868
|
+
}
|
|
38869
|
+
}).map((field) => field.native ? {
|
|
38870
|
+
...field,
|
|
38871
|
+
operators: field.type === "time" ? ["term", "range"] : field.type === "bool" ? ["term"] : ["term", "phrase"]
|
|
38872
|
+
} : field)
|
|
38873
|
+
};
|
|
38874
|
+
|
|
38875
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/calendar/writer.js
|
|
38876
|
+
var EVENTS_NOTIFY_KEY = "events.notify";
|
|
38877
|
+
var EVENTS_DELETE_SERIES_KEY = "events.delete.series";
|
|
38878
|
+
var EVENTS_REMIND_HOOK_KEY = "events.remind.hook";
|
|
38879
|
+
var CALENDAR_WRITE_DEFAULTS = {
|
|
38880
|
+
"events.create": "allow",
|
|
38881
|
+
// One import writes a whole file of events, and may change events the calendar already holds under their UIDs.
|
|
38882
|
+
"events.import": "ask",
|
|
38883
|
+
"events.update": "allow",
|
|
38884
|
+
"events.respond": "allow",
|
|
38885
|
+
"events.move": "allow",
|
|
38886
|
+
"events.delete": "ask",
|
|
38887
|
+
[EVENTS_DELETE_SERIES_KEY]: "deny",
|
|
38888
|
+
[EVENTS_NOTIFY_KEY]: "deny",
|
|
38889
|
+
// Not ask: `--yes` answers ask, and anything that can type a gcal command can add it.
|
|
38890
|
+
[EVENTS_REMIND_HOOK_KEY]: "deny"
|
|
38891
|
+
};
|
|
38892
|
+
|
|
38893
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
38642
38894
|
var communicationFields = {
|
|
38643
38895
|
sources: pipe(array(strictObject({
|
|
38644
38896
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -38670,7 +38922,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
38670
38922
|
return { ...input, after, before: before2 };
|
|
38671
38923
|
}, "communicationRequest");
|
|
38672
38924
|
|
|
38673
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
38674
38926
|
var MEETING_PREPARATION_LIMITS = {
|
|
38675
38927
|
meetings: { min: 1, max: 20, default: 5 },
|
|
38676
38928
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -38743,7 +38995,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
38743
38995
|
};
|
|
38744
38996
|
}, "validateMeetingPreparationRequest");
|
|
38745
38997
|
|
|
38746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38998
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
38747
38999
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
38748
39000
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
38749
39001
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -38791,7 +39043,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
38791
39043
|
}
|
|
38792
39044
|
}, "validatePreparationCommunications");
|
|
38793
39045
|
|
|
38794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
38795
39047
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
38796
39048
|
const installer = ports.installer();
|
|
38797
39049
|
const argv = updateCommand(installer, packageName);
|
|
@@ -38856,7 +39108,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
38856
39108
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
38857
39109
|
}, "dayAfter");
|
|
38858
39110
|
|
|
38859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
38860
39112
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
38861
39113
|
const pictures = picturesService(deps);
|
|
38862
39114
|
const base = {
|
|
@@ -38893,7 +39145,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
38893
39145
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
38894
39146
|
}, "servicesFor");
|
|
38895
39147
|
|
|
38896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
38897
39149
|
import { createHash as createHash13 } from "node:crypto";
|
|
38898
39150
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync6, rmSync as rmSync3 } from "node:fs";
|
|
38899
39151
|
import { createConnection, createServer } from "node:net";
|
|
@@ -39114,7 +39366,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options2) => new Promi
|
|
|
39114
39366
|
}, () => finish({ error: stopped() }));
|
|
39115
39367
|
}), "relayCommand");
|
|
39116
39368
|
|
|
39117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.662.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.99.0_commander@15._e11817b5a9b273e1a17561462f2db6c9/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
39118
39370
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
39119
39371
|
close: /* @__PURE__ */ __name(async () => {
|
|
39120
39372
|
}, "close"),
|
|
@@ -39128,9 +39380,9 @@ var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWra
|
|
|
39128
39380
|
let watcher;
|
|
39129
39381
|
try {
|
|
39130
39382
|
await new Promise((resolve7, reject) => {
|
|
39131
|
-
watcher = /* @__PURE__ */ __name((
|
|
39383
|
+
watcher = /* @__PURE__ */ __name((event2) => {
|
|
39132
39384
|
try {
|
|
39133
|
-
onEvent(
|
|
39385
|
+
onEvent(event2);
|
|
39134
39386
|
} catch (error) {
|
|
39135
39387
|
reject(error);
|
|
39136
39388
|
}
|
|
@@ -39166,9 +39418,9 @@ var serveRelay = /* @__PURE__ */ __name((command, messenger) => {
|
|
|
39166
39418
|
return held;
|
|
39167
39419
|
}, "connect")
|
|
39168
39420
|
},
|
|
39169
|
-
arrived: /* @__PURE__ */ __name((
|
|
39421
|
+
arrived: /* @__PURE__ */ __name((event2) => {
|
|
39170
39422
|
for (const watcher of watchers)
|
|
39171
|
-
watcher(
|
|
39423
|
+
watcher(event2);
|
|
39172
39424
|
}, "arrived"),
|
|
39173
39425
|
/** Listens beside the lock; the address goes into it, which is how a client finds it. */
|
|
39174
39426
|
open: /* @__PURE__ */ __name(async (lockPath, profile) => {
|
|
@@ -39374,19 +39626,6 @@ export {
|
|
|
39374
39626
|
readEvidencePacket,
|
|
39375
39627
|
useTextModel,
|
|
39376
39628
|
addCustomTextModel,
|
|
39377
|
-
communicationFields,
|
|
39378
|
-
MEETING_PREPARATION_LIMITS,
|
|
39379
|
-
validateMeetingPreparationRequest,
|
|
39380
|
-
validatePreparationCommunications,
|
|
39381
|
-
upgradePackage,
|
|
39382
|
-
servicesFor,
|
|
39383
|
-
lackedNeed,
|
|
39384
|
-
refuseLacking,
|
|
39385
|
-
hideNever,
|
|
39386
|
-
RELAY_PROTOCOL,
|
|
39387
|
-
relayCommand,
|
|
39388
|
-
lentConnection,
|
|
39389
|
-
serveRelay,
|
|
39390
39629
|
meetingPassageRequest,
|
|
39391
39630
|
createMeetingPassageCommand,
|
|
39392
39631
|
meetingHitSearchRequest,
|
|
@@ -39410,6 +39649,19 @@ export {
|
|
|
39410
39649
|
nativeField,
|
|
39411
39650
|
termField,
|
|
39412
39651
|
queryHelp,
|
|
39652
|
+
communicationFields,
|
|
39653
|
+
MEETING_PREPARATION_LIMITS,
|
|
39654
|
+
validateMeetingPreparationRequest,
|
|
39655
|
+
validatePreparationCommunications,
|
|
39656
|
+
upgradePackage,
|
|
39657
|
+
servicesFor,
|
|
39658
|
+
lackedNeed,
|
|
39659
|
+
refuseLacking,
|
|
39660
|
+
hideNever,
|
|
39661
|
+
RELAY_PROTOCOL,
|
|
39662
|
+
relayCommand,
|
|
39663
|
+
lentConnection,
|
|
39664
|
+
serveRelay,
|
|
39413
39665
|
positiveCount,
|
|
39414
39666
|
withPaging,
|
|
39415
39667
|
window,
|