@wirecat/drive-cli 0.53.0 → 0.54.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/drive.js +2 -2
- package/dist/bundle/{all-profiles-WRN35CUF.js → all-profiles-LFIPUPZI.js} +9 -9
- package/dist/bundle/{anthropic-DZASXWG3.js → anthropic-G5ZRRWG4.js} +5 -5
- package/dist/bundle/{app-server-4VHT7QZN.js → app-server-UVWATOQC.js} +46 -46
- package/dist/bundle/{bun-7SYKSCLA.js → bun-DNEFTPTR.js} +2 -2
- package/dist/bundle/{bun-sqlite-2GOM5PM3.js → bun-sqlite-FWBYHIXB.js} +4 -4
- package/dist/bundle/{chunk-PC4UA6UN.js → chunk-2CQT2WWN.js} +5 -5
- package/dist/bundle/{chunk-DZMK255Y.js → chunk-2D6AAGBP.js} +41 -31
- package/dist/bundle/{chunk-FG4XXZZE.js → chunk-2FFXRWI2.js} +2 -2
- package/dist/bundle/{chunk-MK3N7WX7.js → chunk-2HQPJ366.js} +3 -3
- package/dist/bundle/{chunk-54BYJQ77.js → chunk-2HWOGSTA.js} +25 -25
- package/dist/bundle/{chunk-7XKAVMCF.js → chunk-2MSJVFAS.js} +8 -8
- package/dist/bundle/{chunk-NSIFQ5OP.js → chunk-2NWFZ43Q.js} +1 -1
- package/dist/bundle/{chunk-6XYGTRMQ.js → chunk-2Q3S47BC.js} +523 -268
- package/dist/bundle/{chunk-KPBCGUJC.js → chunk-47MEPBWG.js} +21 -21
- package/dist/bundle/{chunk-3RYX7IB6.js → chunk-4RDXCE45.js} +39 -38
- package/dist/bundle/{chunk-7IUMHMTP.js → chunk-5BPOAHVD.js} +2 -2
- package/dist/bundle/{chunk-VZ2I62HN.js → chunk-5LNOVPOR.js} +2 -2
- package/dist/bundle/{chunk-EKFEY3KP.js → chunk-5WQN2TUM.js} +1 -1
- package/dist/bundle/{chunk-ALJWBGD5.js → chunk-6MGSFYGL.js} +1 -1
- package/dist/bundle/{chunk-WUX7AUOQ.js → chunk-6RAEXK7Y.js} +26 -26
- package/dist/bundle/{chunk-RNIHKIQP.js → chunk-6SOQJRGI.js} +4 -4
- package/dist/bundle/{chunk-CKBHR7QO.js → chunk-75DSLCPC.js} +1 -1
- package/dist/bundle/{chunk-YLKQSVLI.js → chunk-76JIVDKC.js} +2 -2
- package/dist/bundle/{chunk-LSGAJYVN.js → chunk-7WCZ2OZ5.js} +6 -6
- package/dist/bundle/{chunk-OQMK6WXQ.js → chunk-7XU3TR7K.js} +2 -2
- package/dist/bundle/{chunk-7SH4JHYW.js → chunk-A4FTLORC.js} +12 -12
- package/dist/bundle/{chunk-CITFEQ6S.js → chunk-AACQA2CO.js} +1 -1
- package/dist/bundle/{chunk-PSNHPFSK.js → chunk-AAHIBA36.js} +1 -1
- package/dist/bundle/{chunk-GPJEYW2J.js → chunk-BWBVBW5T.js} +8 -8
- package/dist/bundle/{chunk-HM352LJR.js → chunk-CVALO727.js} +24 -24
- package/dist/bundle/{chunk-E6XDFMRZ.js → chunk-FHW4ENRF.js} +32 -32
- package/dist/bundle/{chunk-2HHOMN2G.js → chunk-HAHARAJD.js} +23 -23
- package/dist/bundle/{chunk-SQHPJBNO.js → chunk-IBRXVPBI.js} +95 -95
- package/dist/bundle/{chunk-YQOVVCIA.js → chunk-IKODUUQG.js} +17 -16
- package/dist/bundle/{chunk-IJFZKQC4.js → chunk-IOMSC4ZG.js} +3 -3
- package/dist/bundle/{chunk-YKZ4IPLB.js → chunk-JKEAZBEZ.js} +7 -7
- package/dist/bundle/{chunk-VTWADVEQ.js → chunk-KIQIF5M7.js} +2 -2
- package/dist/bundle/{chunk-IAQ4L6SM.js → chunk-KT5G3KVS.js} +3 -3
- package/dist/bundle/{chunk-BEL4XZ3M.js → chunk-L3RV42O3.js} +16 -16
- package/dist/bundle/{chunk-NHBUTCNR.js → chunk-LQXLWHKM.js} +9 -9
- package/dist/bundle/{chunk-PR3DA7KA.js → chunk-MATUQFYL.js} +11 -11
- package/dist/bundle/{chunk-F3KHUJEE.js → chunk-MULPNGM2.js} +10 -10
- package/dist/bundle/{chunk-FJW3DDCF.js → chunk-N4OO3SPQ.js} +5 -5
- package/dist/bundle/{chunk-6DHQTUB2.js → chunk-NDWWGBSM.js} +1 -1
- package/dist/bundle/{chunk-DLAFGSTN.js → chunk-NHDSJMAR.js} +1 -1
- package/dist/bundle/{chunk-CNKILAWA.js → chunk-O6YYFVDD.js} +30 -23
- package/dist/bundle/{chunk-FXWBUTR7.js → chunk-OYGEBFFO.js} +7 -7
- package/dist/bundle/{chunk-DOZOLBXE.js → chunk-P7E7K467.js} +3 -3
- package/dist/bundle/{chunk-GE4DP24O.js → chunk-PKNTBZXN.js} +51 -51
- package/dist/bundle/{chunk-PIMMF67N.js → chunk-PU4GANCD.js} +2 -2
- package/dist/bundle/{chunk-UFWK3L5Z.js → chunk-Q46JLJ5O.js} +6 -6
- package/dist/bundle/{chunk-R276546S.js → chunk-QKHFQHE7.js} +1 -1
- package/dist/bundle/{chunk-6BNALDGA.js → chunk-QUJCD5U7.js} +4 -4
- package/dist/bundle/{chunk-CL4GVCXS.js → chunk-RIYXQFKU.js} +46 -46
- package/dist/bundle/{chunk-DT2YCB2V.js → chunk-RWEFKLXJ.js} +24 -22
- package/dist/bundle/{chunk-R4TE4ZSD.js → chunk-SBOTSSYV.js} +342 -296
- package/dist/bundle/{chunk-SIWBUGBU.js → chunk-U3BOQ63L.js} +8 -8
- package/dist/bundle/{chunk-QXYGK6G5.js → chunk-UBJX5D2O.js} +2 -2
- package/dist/bundle/{chunk-WJRJBQIM.js → chunk-VCGQMTHW.js} +549 -288
- package/dist/bundle/{chunk-ZG6X24ON.js → chunk-VKYCMXEQ.js} +5 -5
- package/dist/bundle/{chunk-ZSXRDF6I.js → chunk-VX4RAT3A.js} +1 -1
- package/dist/bundle/{chunk-2PVDFLJJ.js → chunk-W5SYBHRX.js} +2 -2
- package/dist/bundle/{chunk-KXMJE3XC.js → chunk-WGSTTWM5.js} +6 -6
- package/dist/bundle/{chunk-T334CFU4.js → chunk-WJRE45Z6.js} +4 -4
- package/dist/bundle/{chunk-TZLO3ZZF.js → chunk-WQPTZHHR.js} +17 -26
- package/dist/bundle/{chunk-JEOYFKUK.js → chunk-WSX5UQNT.js} +2 -2
- package/dist/bundle/{chunk-LJAX6YCF.js → chunk-WYDYSQ7T.js} +2 -2
- package/dist/bundle/{chunk-C6Z25IBJ.js → chunk-XCUUYQN7.js} +4 -4
- package/dist/bundle/{chunk-GVCN3GLZ.js → chunk-YOHOQ6ZR.js} +4 -4
- package/dist/bundle/{chunk-SVTYS36O.js → chunk-YZ5VMR2S.js} +3 -3
- package/dist/bundle/{chunk-ZDLIO76S.js → chunk-ZMMOVTUB.js} +2 -2
- package/dist/bundle/command-contract-VZ3ZJLEF.js +35 -0
- package/dist/bundle/{decode-WAPM2VBH.js → decode-DN2DDFET.js} +4 -4
- package/dist/bundle/drive.js +6 -6
- package/dist/bundle/{echarts-GXY34GHA.js → echarts-VMHZ2UYP.js} +2 -2
- package/dist/bundle/{embed-HW3N3KNP.js → embed-MDN7R7BA.js} +5 -5
- package/dist/bundle/{embedder-7WNFXYYP.js → embedder-KEVEDNDJ.js} +8 -8
- package/dist/bundle/{entry-J7YIRDPD.js → entry-HTNK5TJQ.js} +6 -6
- package/dist/bundle/{first-run-53CL2IYH.js → first-run-QNMCMP67.js} +9 -9
- package/dist/bundle/first-screen-RQBEHUQC.js +33 -0
- package/dist/bundle/{google-5NNVARNR.js → google-QAKMV57Q.js} +9 -9
- package/dist/bundle/{google-api-EQQH53QD.js → google-api-UJJS7ECO.js} +51 -51
- package/dist/bundle/grants-VMPKFEC2.js +98 -0
- package/dist/bundle/{identity-LBTXDMTA.js → identity-UODE3QAL.js} +4 -4
- package/dist/bundle/{instructions-K5BEQM4C.js → instructions-IWLHCDC7.js} +1 -1
- package/dist/bundle/{login-Y6ENYKC3.js → login-GIZXEN7I.js} +58 -60
- package/dist/bundle/{mcp-WSGVVZWI.js → mcp-RUYPQVYS.js} +2 -2
- package/dist/bundle/{node-ZYWB7IET.js → node-25IJLDBZ.js} +2 -2
- package/dist/bundle/{node-sqlite-FSQIKGED.js → node-sqlite-DYR4FEI4.js} +4 -4
- package/dist/bundle/{oauth-HF5USWXY.js → oauth-FLHXEDDY.js} +6 -6
- package/dist/bundle/{open-NHGJENCX.js → open-FWDZB7KX.js} +3 -3
- package/dist/bundle/{openai-3JCJYKNX.js → openai-HB7UGKPW.js} +13 -13
- package/dist/bundle/{process-ZXO2MWRJ.js → process-P6TW37HQ.js} +1 -1
- package/dist/bundle/{program-QAJ66K3Z.js → program-DVUNLXXS.js} +73 -73
- package/dist/bundle/{prompt-LQJBCCUF.js → prompt-MKWMYO3B.js} +4 -4
- package/dist/bundle/{reasons-J57GSRWN.js → reasons-25BEO2NE.js} +3 -3
- package/dist/bundle/{recognize-QM3LN4ZF.js → recognize-VXGNPROM.js} +3 -3
- package/dist/bundle/{remote-WREGEZJQ.js → remote-H5ZWLJHR.js} +6 -6
- package/dist/bundle/{rerank-YFUB6J6M.js → rerank-5A3JDK7O.js} +6 -6
- package/dist/bundle/{serve-7NFEZ564.js → serve-QNPNEZVR.js} +8 -8
- package/dist/bundle/{server-KBCFZ2AU.js → server-GWBVIRLY.js} +38 -38
- package/dist/bundle/server-QJU3HEGM.js +63 -0
- package/dist/bundle/{services-C3XWRA2W.js → services-PFXEWHJG.js} +29 -25
- package/dist/bundle/{sqlite-runtime-H3TSAMIN.js → sqlite-runtime-RGFISYXM.js} +4 -4
- package/dist/bundle/{state-S2Q53L6L.js → state-BUSX5BXF.js} +5 -5
- package/dist/bundle/{store-I27LAJPU.js → store-FIEE5HHG.js} +14 -14
- package/dist/bundle/{store-H345VQHP.js → store-HFF5KQ44.js} +12 -12
- package/dist/bundle/store-maintenance-command-Z4SPEQUM.js +52 -0
- package/dist/bundle/tokens-B6MUZRFM.js +96 -0
- package/dist/login.d.ts.map +1 -1
- package/dist/login.js +2 -4
- package/dist/login.js.map +1 -1
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +0 -9
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/command-contract-D4UG3D33.js +0 -35
- package/dist/bundle/first-screen-2KT7HM2K.js +0 -33
- package/dist/bundle/grants-4NETZ4MR.js +0 -98
- package/dist/bundle/server-UYVL2CFI.js +0 -63
- package/dist/bundle/store-maintenance-command-3XA73XMC.js +0 -52
- package/dist/bundle/tokens-7MUGKFEM.js +0 -96
- /package/dist/bundle/{chunk-62EDJKGP.js → chunk-HEA3XVAJ.js} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
sameOrdinaryFile,
|
|
8
8
|
syncDirectory,
|
|
9
9
|
writeFileAtomic
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A4FTLORC.js";
|
|
11
11
|
import {
|
|
12
12
|
classify,
|
|
13
13
|
documentExtractor,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
engineMissing,
|
|
16
16
|
extractText,
|
|
17
17
|
importEngine
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-6RAEXK7Y.js";
|
|
19
19
|
import {
|
|
20
20
|
DEFAULT_IMAGE_MODEL,
|
|
21
21
|
DEFAULT_RERANK_MODEL,
|
|
@@ -43,23 +43,23 @@ import {
|
|
|
43
43
|
typedCommand,
|
|
44
44
|
vectorModelKey,
|
|
45
45
|
withAttempt
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-HAHARAJD.js";
|
|
47
47
|
import {
|
|
48
48
|
isCliFailure
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-76JIVDKC.js";
|
|
50
50
|
import {
|
|
51
51
|
isNewer,
|
|
52
52
|
updateCommand
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-VKYCMXEQ.js";
|
|
54
54
|
import {
|
|
55
55
|
MAX_MODEL_IMAGE_BYTES
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-5LNOVPOR.js";
|
|
57
57
|
import {
|
|
58
58
|
OPENAI_URL,
|
|
59
59
|
openRemote,
|
|
60
60
|
remoteKey,
|
|
61
61
|
remoteModel
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-2HQPJ366.js";
|
|
63
63
|
import {
|
|
64
64
|
defaultThreads,
|
|
65
65
|
installNativeRuntime,
|
|
@@ -68,11 +68,11 @@ import {
|
|
|
68
68
|
placedText,
|
|
69
69
|
runEmbedders,
|
|
70
70
|
textModelsDirectory
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-2CQT2WWN.js";
|
|
72
72
|
import {
|
|
73
73
|
installFiles,
|
|
74
74
|
megabytes
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-6SOQJRGI.js";
|
|
76
76
|
import {
|
|
77
77
|
AGENDA_COLUMNS,
|
|
78
78
|
CHAT_COLUMNS,
|
|
@@ -143,12 +143,12 @@ import {
|
|
|
143
143
|
threadConversation,
|
|
144
144
|
validateAst,
|
|
145
145
|
validateFields
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-SBOTSSYV.js";
|
|
147
147
|
import {
|
|
148
148
|
MAX_TEXT_CHARS,
|
|
149
149
|
attachmentMaxBytes,
|
|
150
150
|
pdfPreviewLimits
|
|
151
|
-
} from "./chunk-
|
|
151
|
+
} from "./chunk-WSX5UQNT.js";
|
|
152
152
|
import {
|
|
153
153
|
MEETING_FINDINGS_KIND,
|
|
154
154
|
TASK_KINDS,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
validateMeetingHitSearch,
|
|
172
172
|
validateMeetingPassage,
|
|
173
173
|
validateMeetingSeriesHistory
|
|
174
|
-
} from "./chunk-
|
|
174
|
+
} from "./chunk-PKNTBZXN.js";
|
|
175
175
|
import {
|
|
176
176
|
dateRange,
|
|
177
177
|
implicitTextTerms,
|
|
@@ -181,27 +181,27 @@ import {
|
|
|
181
181
|
timezoneOf,
|
|
182
182
|
validateQuery,
|
|
183
183
|
walkQuery
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-LQXLWHKM.js";
|
|
185
185
|
import {
|
|
186
186
|
DEFAULT_STEMMERS,
|
|
187
187
|
createStemmer,
|
|
188
188
|
fold,
|
|
189
189
|
normalize
|
|
190
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-2MSJVFAS.js";
|
|
191
191
|
import {
|
|
192
192
|
DEFAULT_TASK_CATEGORIES,
|
|
193
193
|
FALLBACK_CATEGORY
|
|
194
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-WGSTTWM5.js";
|
|
195
195
|
import {
|
|
196
196
|
storePath,
|
|
197
197
|
wirecatDirectory
|
|
198
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-UBJX5D2O.js";
|
|
199
199
|
import {
|
|
200
200
|
resolvePaths,
|
|
201
201
|
singleLine,
|
|
202
202
|
visibleControls,
|
|
203
203
|
writeSecurely
|
|
204
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-2D6AAGBP.js";
|
|
205
205
|
import {
|
|
206
206
|
CliError,
|
|
207
207
|
array,
|
|
@@ -224,12 +224,12 @@ import {
|
|
|
224
224
|
string,
|
|
225
225
|
transform,
|
|
226
226
|
unknown
|
|
227
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-JKEAZBEZ.js";
|
|
228
228
|
import {
|
|
229
229
|
__name
|
|
230
230
|
} from "./chunk-ZVVMGPBJ.js";
|
|
231
231
|
|
|
232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
233
233
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
234
234
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
235
235
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -267,7 +267,7 @@ ${lines}`, { candidates });
|
|
|
267
267
|
}, "ambiguous");
|
|
268
268
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
269
269
|
|
|
270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
271
271
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
272
272
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
273
273
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -345,7 +345,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account2, { app, env }) => {
|
|
|
345
345
|
return { ...storedDeps(messenger, store, account2, guard), ...env === void 0 ? {} : { env } };
|
|
346
346
|
}, "storeOnlyDeps");
|
|
347
347
|
|
|
348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
348
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
349
349
|
var DAY_MS = 864e5;
|
|
350
350
|
var NEW_DAYS = 30;
|
|
351
351
|
var SAME_TEXT_MIN = 20;
|
|
@@ -422,7 +422,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
422
422
|
};
|
|
423
423
|
}, "scorePerson");
|
|
424
424
|
|
|
425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
426
426
|
var REGISTRIES = {
|
|
427
427
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
428
428
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -507,7 +507,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
507
507
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
508
508
|
})), "notCovered");
|
|
509
509
|
|
|
510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
511
511
|
var ACTIVITY_MESSAGES = 1e3;
|
|
512
512
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
513
513
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -595,7 +595,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
595
595
|
};
|
|
596
596
|
}, "botCheckService");
|
|
597
597
|
|
|
598
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
599
599
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
600
600
|
const ids = [...new Set(chatIds)];
|
|
601
601
|
if (ids.length === 0)
|
|
@@ -621,7 +621,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account2, chatIds) => {
|
|
|
621
621
|
}));
|
|
622
622
|
}, "chatCoverage");
|
|
623
623
|
|
|
624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
625
625
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
626
626
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
627
627
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -685,7 +685,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
685
685
|
}
|
|
686
686
|
}, "validateContextEvidencePage");
|
|
687
687
|
|
|
688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
689
689
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
690
690
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
691
691
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -738,7 +738,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
738
738
|
};
|
|
739
739
|
}, "contextReadBudget");
|
|
740
740
|
|
|
741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
741
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
742
742
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
743
743
|
if (!port || typeof port.read !== "function")
|
|
744
744
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -782,7 +782,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
782
782
|
};
|
|
783
783
|
}, "createContextEvidenceReader");
|
|
784
784
|
|
|
785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
786
786
|
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");
|
|
787
787
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
788
788
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -798,18 +798,18 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
798
798
|
}, "excerpt");
|
|
799
799
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
800
800
|
|
|
801
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
802
802
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
803
803
|
|
|
804
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
805
805
|
import { lstat } from "node:fs/promises";
|
|
806
806
|
|
|
807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
808
808
|
import { createHash as createHash2, randomUUID as randomUUID2 } from "node:crypto";
|
|
809
809
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
810
810
|
import { join as join2 } from "node:path";
|
|
811
811
|
|
|
812
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
813
813
|
import { createHash } from "node:crypto";
|
|
814
814
|
var metadataLimit = 16384;
|
|
815
815
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -869,7 +869,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
869
869
|
}
|
|
870
870
|
}, "readPartialMetadata");
|
|
871
871
|
|
|
872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
873
873
|
import { randomUUID } from "node:crypto";
|
|
874
874
|
import { open, rename, unlink } from "node:fs/promises";
|
|
875
875
|
import { join } from "node:path";
|
|
@@ -961,7 +961,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
961
961
|
};
|
|
962
962
|
}, "partialWriter");
|
|
963
963
|
|
|
964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
965
965
|
var NativeRecordingPartialStore = class {
|
|
966
966
|
static {
|
|
967
967
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -1068,12 +1068,12 @@ var NativeRecordingPartialStore = class {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
};
|
|
1070
1070
|
|
|
1071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
1072
1072
|
import { createHash as createHash3 } from "node:crypto";
|
|
1073
1073
|
import { link } from "node:fs/promises";
|
|
1074
1074
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
1075
1075
|
|
|
1076
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
1077
1077
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
1078
1078
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
1079
1079
|
signal?.throwIfAborted();
|
|
@@ -1108,7 +1108,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
1108
1108
|
signal?.throwIfAborted();
|
|
1109
1109
|
}, "commitPublication");
|
|
1110
1110
|
|
|
1111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
1112
1112
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
1113
1113
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
1114
1114
|
import { join as join3 } from "node:path";
|
|
@@ -1181,7 +1181,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}, "writePublicationJournal");
|
|
1183
1183
|
|
|
1184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1184
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
1185
1185
|
var NativeRecordingPublication = class {
|
|
1186
1186
|
static {
|
|
1187
1187
|
__name(this, "NativeRecordingPublication");
|
|
@@ -1254,7 +1254,7 @@ var NativeRecordingPublication = class {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
};
|
|
1256
1256
|
|
|
1257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
1258
1258
|
import { createHash as createHash4 } from "node:crypto";
|
|
1259
1259
|
import { readdir } from "node:fs/promises";
|
|
1260
1260
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -1341,7 +1341,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
1341
1341
|
beforePublish
|
|
1342
1342
|
}), "commitMediaEntry");
|
|
1343
1343
|
|
|
1344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
1345
1345
|
var validator = '"media-completed-v1"';
|
|
1346
1346
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
1347
1347
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -1442,7 +1442,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
1442
1442
|
return entry;
|
|
1443
1443
|
}, "archiveMediaFile");
|
|
1444
1444
|
|
|
1445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
1446
1446
|
import { mkdir, realpath } from "node:fs/promises";
|
|
1447
1447
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
1448
1448
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -1509,7 +1509,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory, signal, run
|
|
|
1509
1509
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
1510
1510
|
}, "withMediaArchiveLocks");
|
|
1511
1511
|
|
|
1512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
1513
1513
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
1514
1514
|
if (value === void 0)
|
|
1515
1515
|
return void 0;
|
|
@@ -1662,7 +1662,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
1662
1662
|
}, { create: true });
|
|
1663
1663
|
}, "archiveMedia");
|
|
1664
1664
|
|
|
1665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1665
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
1666
1666
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
1667
1667
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
1668
1668
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory) => {
|
|
@@ -1815,7 +1815,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
1815
1815
|
}, { additional: [target], createAdditional: !options.dryRun });
|
|
1816
1816
|
}, "moveMediaArchive");
|
|
1817
1817
|
|
|
1818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
1819
1819
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
1820
1820
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
1821
1821
|
}, "progress") }) => {
|
|
@@ -1838,7 +1838,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
1838
1838
|
}
|
|
1839
1839
|
await nativeRuntime({ env, progress });
|
|
1840
1840
|
progress(`${model.id}: loading it once to check it works`);
|
|
1841
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
1841
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-MDN7R7BA.js");
|
|
1842
1842
|
const embedder = await openEmbedder2(model, directory);
|
|
1843
1843
|
try {
|
|
1844
1844
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -1859,7 +1859,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
1859
1859
|
}
|
|
1860
1860
|
await nativeRuntime({ env, progress });
|
|
1861
1861
|
progress(`${model.id}: loading it once to check it works`);
|
|
1862
|
-
const { openReranker } = await import("./rerank-
|
|
1862
|
+
const { openReranker } = await import("./rerank-5A3JDK7O.js");
|
|
1863
1863
|
const reranker = await openReranker(model, directory);
|
|
1864
1864
|
try {
|
|
1865
1865
|
await reranker.score("check", ["check"]);
|
|
@@ -1877,7 +1877,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
1877
1877
|
await installFiles(placedImage(model, directory), { progress });
|
|
1878
1878
|
}
|
|
1879
1879
|
progress(`${model.id}: loading it once to check it works`);
|
|
1880
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
1880
|
+
const { openPictureEmbedder } = await import("./embedder-KEVEDNDJ.js");
|
|
1881
1881
|
const embedder = await openPictureEmbedder(model, directory);
|
|
1882
1882
|
try {
|
|
1883
1883
|
const vector = await embedder.embedQuery("check");
|
|
@@ -1889,7 +1889,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
1889
1889
|
return { model, directory };
|
|
1890
1890
|
}, "downloadImageModel");
|
|
1891
1891
|
|
|
1892
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
1893
1893
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
1894
1894
|
async around(ref, window2) {
|
|
1895
1895
|
const at = parseLocator(ref);
|
|
@@ -1985,7 +1985,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
1985
1985
|
};
|
|
1986
1986
|
}, "storedNeighbours");
|
|
1987
1987
|
|
|
1988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
1989
1989
|
import { createHash as createHash5 } from "node:crypto";
|
|
1990
1990
|
var DAY = 864e5;
|
|
1991
1991
|
var MAX_TIME = 864e13;
|
|
@@ -2004,7 +2004,8 @@ var BUDGETS = {
|
|
|
2004
2004
|
maxReadBytes: [2097152, 16777216],
|
|
2005
2005
|
maxPageBytes: [65536, 262144],
|
|
2006
2006
|
maxElapsedMs: [6e4, 6e5],
|
|
2007
|
-
maxItems: [100, 500]
|
|
2007
|
+
maxItems: [100, 500],
|
|
2008
|
+
maxFetchMs: [18e4, 18e5]
|
|
2008
2009
|
};
|
|
2009
2010
|
var fail = /* @__PURE__ */ __name((message, param) => {
|
|
2010
2011
|
throw new CliError("validation_error", message, param ? { param } : void 0);
|
|
@@ -2300,12 +2301,80 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
2300
2301
|
return value;
|
|
2301
2302
|
}, "decodeCheckpoint");
|
|
2302
2303
|
|
|
2303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
2304
2305
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
2305
2306
|
var PAGE = 20;
|
|
2306
2307
|
var PEOPLE = 20;
|
|
2307
2308
|
var CONTEXTS = ["person-only", "sender", "linked-chat", "project"];
|
|
2308
2309
|
var contextOf = /* @__PURE__ */ __name((lane) => lane.kinds.includes("linked-chat") ? "linked-chat" : lane.kinds.includes("sender") ? "sender" : lane.kinds.every((k) => k === "person") ? "person-only" : "project", "contextOf");
|
|
2310
|
+
var heldForWindow = /* @__PURE__ */ __name((row, after) => {
|
|
2311
|
+
if (!row)
|
|
2312
|
+
return false;
|
|
2313
|
+
const { state, upToDate, gaps } = row.completeness;
|
|
2314
|
+
if (state === "complete")
|
|
2315
|
+
return upToDate !== false;
|
|
2316
|
+
const oldest = row.held.oldestAt === null ? Number.NaN : Date.parse(row.held.oldestAt);
|
|
2317
|
+
return upToDate === true && !gaps && oldest <= after;
|
|
2318
|
+
}, "heldForWindow");
|
|
2319
|
+
var fetchLinkedChats = /* @__PURE__ */ __name(async (ports, plan, window2, now, signal) => {
|
|
2320
|
+
const wanted = [];
|
|
2321
|
+
for (const linked of plan.linkedChats) {
|
|
2322
|
+
if (linked.source === null)
|
|
2323
|
+
continue;
|
|
2324
|
+
const account2 = { provider: linked.provider, account: linked.account };
|
|
2325
|
+
const [row] = await ports.coverage(account2, [linked.chat]);
|
|
2326
|
+
if (!heldForWindow(row, window2.after))
|
|
2327
|
+
wanted.push({ ...linked, account: account2 });
|
|
2328
|
+
}
|
|
2329
|
+
const deadline = now() + plan.budgets.maxFetchMs;
|
|
2330
|
+
const results = [];
|
|
2331
|
+
for (const [index, linked] of wanted.entries()) {
|
|
2332
|
+
signal?.throwIfAborted();
|
|
2333
|
+
const started = now();
|
|
2334
|
+
const left = deadline - started;
|
|
2335
|
+
if (left <= 0) {
|
|
2336
|
+
results.push({ chat: linked.ref, state: "skipped", reason: "fetch-budget", elapsedMs: 0 });
|
|
2337
|
+
continue;
|
|
2338
|
+
}
|
|
2339
|
+
const budget = new AbortController();
|
|
2340
|
+
const timer = setTimeout(() => budget.abort(new CliError("timeout", "the fetch budget ran out")), left);
|
|
2341
|
+
const onProgress = ports.onFetchProgress;
|
|
2342
|
+
try {
|
|
2343
|
+
const answer = await ports.fetcher.fetch({
|
|
2344
|
+
account: linked.account,
|
|
2345
|
+
chatId: linked.chat,
|
|
2346
|
+
after: window2.after,
|
|
2347
|
+
before: window2.before,
|
|
2348
|
+
until: deadline,
|
|
2349
|
+
signal: signal ? AbortSignal.any([signal, budget.signal]) : budget.signal,
|
|
2350
|
+
...onProgress ? { onProgress: /* @__PURE__ */ __name((progress) => onProgress({ ...progress, chat: linked.ref, index, of: wanted.length }), "onProgress") } : {}
|
|
2351
|
+
});
|
|
2352
|
+
if (!["complete", "partial", "failed"].includes(answer?.state))
|
|
2353
|
+
throw new CliError("invalid_response", "chat fetch returned an unknown state");
|
|
2354
|
+
const cut = budget.signal.aborted || now() > deadline;
|
|
2355
|
+
results.push({
|
|
2356
|
+
chat: linked.ref,
|
|
2357
|
+
state: cut && answer.state === "complete" ? "partial" : answer.state,
|
|
2358
|
+
reason: answer.reason ?? (cut && answer.state !== "failed" ? "fetch-budget" : null),
|
|
2359
|
+
elapsedMs: now() - started
|
|
2360
|
+
});
|
|
2361
|
+
} catch (error) {
|
|
2362
|
+
signal?.throwIfAborted();
|
|
2363
|
+
if (!(error instanceof CliError))
|
|
2364
|
+
throw error;
|
|
2365
|
+
const cut = budget.signal.aborted;
|
|
2366
|
+
results.push({
|
|
2367
|
+
chat: linked.ref,
|
|
2368
|
+
state: cut ? "partial" : "failed",
|
|
2369
|
+
reason: cut ? "fetch-budget" : error.code,
|
|
2370
|
+
elapsedMs: now() - started
|
|
2371
|
+
});
|
|
2372
|
+
} finally {
|
|
2373
|
+
clearTimeout(timer);
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
return results;
|
|
2377
|
+
}, "fetchLinkedChats");
|
|
2309
2378
|
var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
2310
2379
|
if (!ports?.evidence || typeof ports.evidence.read !== "function")
|
|
2311
2380
|
throw new CliError("configuration_error", "stored context reads are unavailable in this store");
|
|
@@ -2317,34 +2386,20 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
2317
2386
|
const units2 = projectUnits(plan, window2);
|
|
2318
2387
|
if (request.budgets?.maxReads === void 0)
|
|
2319
2388
|
plan.budgets.maxReads = Math.min(512, Math.max(48, units2.length));
|
|
2320
|
-
if (previous &&
|
|
2389
|
+
if (previous && previous.units.length !== units2.length)
|
|
2321
2390
|
throw new CliError("validation_error", "invalid project gathering checkpoint", { param: "checkpoint" });
|
|
2322
2391
|
const progress = previous?.units.map((u) => ({ ...u })) ?? units2.map(() => ({ state: "pending", pages: 0, cursor: null, code: null }));
|
|
2323
|
-
|
|
2392
|
+
let fetched = previous?.fetched.map((f) => ({ ...f })) ?? [];
|
|
2324
2393
|
const seen = new Set(previous?.seen ?? []);
|
|
2325
2394
|
const signal = plan.signal;
|
|
2326
2395
|
const queries = plan.lanes.flatMap((lane) => lane.query === null ? [] : [lane.query]);
|
|
2327
|
-
if (plan.fetch === "before-read" && !ports.fetcher)
|
|
2328
|
-
throw new CliError("configuration_error", "this host cannot fetch
|
|
2396
|
+
if (plan.fetch === "before-read" && (!ports.fetcher || !ports.coverage))
|
|
2397
|
+
throw new CliError("configuration_error", "this host cannot fetch chat history; use fetch none", {
|
|
2329
2398
|
param: "fetch"
|
|
2330
2399
|
});
|
|
2331
|
-
if (plan.fetch === "before-read" && ports.fetcher)
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
continue;
|
|
2335
|
-
signal?.throwIfAborted();
|
|
2336
|
-
try {
|
|
2337
|
-
const answer = await ports.fetcher.fetch({ source, after: window2.after, before: window2.before, signal });
|
|
2338
|
-
if (!["fetched", "unsupported"].includes(answer?.status) || !["complete", "partial", "unknown"].includes(answer?.history))
|
|
2339
|
-
throw new CliError("invalid_response", "source fetch returned an unknown status");
|
|
2340
|
-
fetched[index] = { state: answer.status, history: answer.history, code: null };
|
|
2341
|
-
} catch (error) {
|
|
2342
|
-
signal?.throwIfAborted();
|
|
2343
|
-
if (!(error instanceof CliError))
|
|
2344
|
-
throw error;
|
|
2345
|
-
fetched[index] = { state: "failed", history: null, code: error.code };
|
|
2346
|
-
}
|
|
2347
|
-
}
|
|
2400
|
+
if (plan.fetch === "before-read" && ports.fetcher && ports.coverage && previous === null)
|
|
2401
|
+
fetched = await fetchLinkedChats(ports, plan, window2, now, signal);
|
|
2402
|
+
const readFrom = now();
|
|
2348
2403
|
const indexed = { state: "as-is", mail: 0, documents: 0, code: null };
|
|
2349
2404
|
const kinds = [...new Set(plan.sources.map((source) => source.kind))].filter((kind) => kind !== "message");
|
|
2350
2405
|
if (plan.index === "update" && kinds.length) {
|
|
@@ -2447,7 +2502,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
2447
2502
|
capped2.add(unit.lane.id);
|
|
2448
2503
|
continue;
|
|
2449
2504
|
}
|
|
2450
|
-
stopped = usage.reads >= plan.budgets.maxReads ? "reads" : usage.readBytes >= plan.budgets.maxReadBytes ? "read-bytes" : now() -
|
|
2505
|
+
stopped = usage.reads >= plan.budgets.maxReads ? "reads" : usage.readBytes >= plan.budgets.maxReadBytes ? "read-bytes" : now() - readFrom >= plan.budgets.maxElapsedMs ? "elapsed" : usage.items >= plan.budgets.maxItems ? "items" : null;
|
|
2451
2506
|
if (stopped)
|
|
2452
2507
|
break;
|
|
2453
2508
|
const readPage = /* @__PURE__ */ __name(async (allowance, limit) => {
|
|
@@ -2603,7 +2658,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
2603
2658
|
scope: { origin: plan.scope, sources: plan.sources },
|
|
2604
2659
|
lanes: plan.lanes,
|
|
2605
2660
|
linkedChats: linkedRows,
|
|
2606
|
-
fetch: fetched
|
|
2661
|
+
fetch: fetched,
|
|
2607
2662
|
index: indexed,
|
|
2608
2663
|
units: units2.map((unit, index) => ({
|
|
2609
2664
|
lane: unit.lane.id,
|
|
@@ -2650,7 +2705,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
2650
2705
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
2651
2706
|
}, "peopleOf");
|
|
2652
2707
|
|
|
2653
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
2654
2709
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
2655
2710
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
2656
2711
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -2715,7 +2770,7 @@ var matchProjectCandidates = /* @__PURE__ */ __name((catalog, input) => matchVoc
|
|
|
2715
2770
|
omittedMatches: omitted
|
|
2716
2771
|
})), "matchProjectCandidates");
|
|
2717
2772
|
|
|
2718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
2719
2774
|
var KINDS = ["project", "tag", "topic"];
|
|
2720
2775
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
2721
2776
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -2770,7 +2825,173 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
2770
2825
|
};
|
|
2771
2826
|
}, "findEvidenceMentions");
|
|
2772
2827
|
|
|
2773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
2829
|
+
var PROJECT_ID = /^project:[1-9]\d*$/;
|
|
2830
|
+
var canonicalProjectRef = /* @__PURE__ */ __name(async (store, reference) => {
|
|
2831
|
+
if (PROJECT_ID.test(reference)) {
|
|
2832
|
+
const catalog = await store.knowledge.vocabulary({ kind: "project" });
|
|
2833
|
+
if (!catalog.entries.some((entry2) => entry2.id === reference.slice(8)))
|
|
2834
|
+
throw new CliError("not_found", "the owner project is unavailable");
|
|
2835
|
+
return reference;
|
|
2836
|
+
}
|
|
2837
|
+
const found = await store.knowledge.resolveVocabulary(reference, { kind: "project" });
|
|
2838
|
+
const [entry] = found.matches;
|
|
2839
|
+
if (found.matches.length !== 1 || !entry)
|
|
2840
|
+
throw new CliError(found.matches.length ? "validation_error" : "not_found", found.matches.length ? `${reference} names ${found.matches.length} projects; give one by its key or project:<id>` : `no project ${reference}`, { candidates: found.matches.map((one) => ({ id: one.id, key: one.key, name: one.name })) });
|
|
2841
|
+
return `project:${entry.id}`;
|
|
2842
|
+
}, "canonicalProjectRef");
|
|
2843
|
+
var projectOf = /* @__PURE__ */ __name(async (store, reference) => {
|
|
2844
|
+
const id2 = /^(project:)?[1-9]\d*$/.test(reference);
|
|
2845
|
+
let ref;
|
|
2846
|
+
try {
|
|
2847
|
+
ref = await canonicalProjectRef(store, id2 && !reference.startsWith("project:") ? `project:${reference}` : reference);
|
|
2848
|
+
} catch (error) {
|
|
2849
|
+
if (!id2 && error instanceof CliError && error.code === "not_found")
|
|
2850
|
+
return { ref: null, name: reference, key: null, aliases: [] };
|
|
2851
|
+
throw error;
|
|
2852
|
+
}
|
|
2853
|
+
const entry = (await store.knowledge.vocabulary({ kind: "project" })).entries.find((one) => one.id === ref.slice(8));
|
|
2854
|
+
if (!entry)
|
|
2855
|
+
throw new CliError("not_found", "the owner project is unavailable");
|
|
2856
|
+
return { ref, name: entry.name, key: entry.key, aliases: entry.aliases.map((alias) => alias.name) };
|
|
2857
|
+
}, "projectOf");
|
|
2858
|
+
var withOwner = /* @__PURE__ */ __name(async (store, reference) => {
|
|
2859
|
+
if (reference.trim() !== "person:me")
|
|
2860
|
+
return reference;
|
|
2861
|
+
const owner = await store.people.owner();
|
|
2862
|
+
if (owner === void 0 || owner.identities.length === 0)
|
|
2863
|
+
throw new CliError("not_found", "person:me: no person is marked as you in the store; mark yours with `<messenger> <profile> contacts link <your id> me`", { reason: "person.no-owner" });
|
|
2864
|
+
return `person:${owner.uid}`;
|
|
2865
|
+
}, "withOwner");
|
|
2866
|
+
var sendersOf = /* @__PURE__ */ __name((person) => person.identities.map((identity) => ({ provider: identity.provider, id: String(identity.id) })), "sendersOf");
|
|
2867
|
+
var contactOf = /* @__PURE__ */ __name(async (store, contact) => {
|
|
2868
|
+
const reference = await withOwner(store, contact);
|
|
2869
|
+
if (!reference.startsWith("person:"))
|
|
2870
|
+
return [{ name: contact }];
|
|
2871
|
+
const person = await store.people.personByUid(reference.slice("person:".length));
|
|
2872
|
+
if (!person)
|
|
2873
|
+
throw new CliError("not_found", `no person ${contact}`, { param: "contact" });
|
|
2874
|
+
const senders = sendersOf(person);
|
|
2875
|
+
const aliases = /* @__PURE__ */ new Set();
|
|
2876
|
+
for (const identity of person.identities)
|
|
2877
|
+
for (const account2 of identity.accounts) {
|
|
2878
|
+
const alias = await store.people.privateContact({ provider: identity.provider, account: account2 }, identity.id).then((one) => one.alias).catch((error) => {
|
|
2879
|
+
if (error instanceof CliError && error.code === "not_found")
|
|
2880
|
+
return null;
|
|
2881
|
+
throw error;
|
|
2882
|
+
});
|
|
2883
|
+
if (alias)
|
|
2884
|
+
aliases.add(alias);
|
|
2885
|
+
}
|
|
2886
|
+
if (!senders.length && !aliases.size)
|
|
2887
|
+
throw new CliError("validation_error", `${contact} has no stored identity or alias to search by; pass a name the texts use to --contact`, { param: "contact" });
|
|
2888
|
+
const names2 = [...aliases].map((name) => ({ name, reference: contact }));
|
|
2889
|
+
return senders.length ? [{ reference: contact, senders }, ...names2] : names2;
|
|
2890
|
+
}, "contactOf");
|
|
2891
|
+
var LINKED_CHATS = 16;
|
|
2892
|
+
var CORE_LIMIT = 16;
|
|
2893
|
+
var memberRefsOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
2894
|
+
if (!project)
|
|
2895
|
+
return [];
|
|
2896
|
+
const refs = [];
|
|
2897
|
+
for (const relation of await store.knowledge.relations(null, project))
|
|
2898
|
+
if (relation.confirmed && relation.kind === "member-of" && relation.to === project && /^person:.+/.test(relation.from))
|
|
2899
|
+
refs.push(relation.from);
|
|
2900
|
+
return [...new Set(refs)].sort();
|
|
2901
|
+
}, "memberRefsOf");
|
|
2902
|
+
var memberLanesOf = /* @__PURE__ */ __name(async (store, project, given, room) => {
|
|
2903
|
+
const lanes = [];
|
|
2904
|
+
const left = [];
|
|
2905
|
+
for (const reference of (await memberRefsOf(store, project)).filter((one) => !given.has(one))) {
|
|
2906
|
+
const person = await store.people.personByUid(reference.slice("person:".length));
|
|
2907
|
+
const senders = person ? sendersOf(person) : [];
|
|
2908
|
+
if (!senders.length)
|
|
2909
|
+
left.push({ source: reference, kind: "member", reason: "no-identity" });
|
|
2910
|
+
else if (lanes.length >= room)
|
|
2911
|
+
left.push({ source: reference, kind: "member", reason: "member-limit" });
|
|
2912
|
+
else
|
|
2913
|
+
lanes.push({ reference, senders });
|
|
2914
|
+
}
|
|
2915
|
+
return { lanes, left };
|
|
2916
|
+
}, "memberLanesOf");
|
|
2917
|
+
var linkedChatsOf = /* @__PURE__ */ __name(async (store, project) => {
|
|
2918
|
+
if (!project)
|
|
2919
|
+
return [];
|
|
2920
|
+
const chats = [];
|
|
2921
|
+
for (const relation of await store.knowledge.relations(null, project)) {
|
|
2922
|
+
if (!relation.confirmed || relation.kind !== "member-of" || relation.to !== project)
|
|
2923
|
+
continue;
|
|
2924
|
+
if (!relation.from.startsWith("chat:"))
|
|
2925
|
+
continue;
|
|
2926
|
+
const reference = parseReference(relation.from);
|
|
2927
|
+
if (reference.type === "chat")
|
|
2928
|
+
chats.push(reference);
|
|
2929
|
+
}
|
|
2930
|
+
return chats.map(({ provider, account: account2, chat }) => ({ provider, account: account2, chat }));
|
|
2931
|
+
}, "linkedChatsOf");
|
|
2932
|
+
var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
2933
|
+
if (input.asOf !== void 0 && input.after !== void 0 && input.asOf <= input.after)
|
|
2934
|
+
throw new CliError("validation_error", "--before-time must be later than --since-time", { param: "before_time" });
|
|
2935
|
+
if (!store.contextEvidence)
|
|
2936
|
+
throw new CliError("configuration_error", "Stored context reads are unavailable in this store");
|
|
2937
|
+
const project = await projectOf(store, input.project);
|
|
2938
|
+
const { sources, unread, scope } = input.sources;
|
|
2939
|
+
if (sources.length === 0)
|
|
2940
|
+
throw new CliError("not_found", "no selected source holds anything to read", { param: "source" });
|
|
2941
|
+
const contacts = (await Promise.all([...new Set(input.people ?? [])].map((contact) => contactOf(store, contact)))).flat();
|
|
2942
|
+
const aliases = [.../* @__PURE__ */ new Set([...project.aliases, ...input.aliases ?? []])].filter((alias) => alias !== project.name);
|
|
2943
|
+
const searchLanes = 1 + (project.key ? 1 : 0) + aliases.length + (input.keywords?.length ?? 0) + contacts.filter((one) => one.name).length;
|
|
2944
|
+
const room = Math.min(CORE_LIMIT - contacts.length, CORE_LIMIT - searchLanes - contacts.filter((one) => one.senders).length);
|
|
2945
|
+
const members = await memberLanesOf(store, project.ref, new Set(contacts.flatMap((one) => one.reference ?? [])), room);
|
|
2946
|
+
const people = [...contacts, ...members.lanes];
|
|
2947
|
+
const linked = await linkedChatsOf(store, project.ref);
|
|
2948
|
+
const linkedChats = linked.slice(0, LINKED_CHATS);
|
|
2949
|
+
const budgets = {
|
|
2950
|
+
...input.maxReads === void 0 ? {} : { maxReads: input.maxReads },
|
|
2951
|
+
...input.limit === void 0 ? {} : { maxItems: input.limit },
|
|
2952
|
+
...input.maxFetchMs === void 0 ? {} : { maxFetchMs: input.maxFetchMs }
|
|
2953
|
+
};
|
|
2954
|
+
const gathered = await gatherProjectEvidence({
|
|
2955
|
+
evidence: store.contextEvidence,
|
|
2956
|
+
neighbours: storedNeighbours(store),
|
|
2957
|
+
coverage: /* @__PURE__ */ __name((account2, chatIds) => chatCoverage(store, account2, chatIds), "coverage"),
|
|
2958
|
+
...store.contextIndex ? { index: store.contextIndex } : {},
|
|
2959
|
+
...input.fetcher ? { fetcher: input.fetcher } : {},
|
|
2960
|
+
...input.onFetchProgress ? { onFetchProgress: input.onFetchProgress } : {}
|
|
2961
|
+
}, {
|
|
2962
|
+
project: {
|
|
2963
|
+
name: project.name,
|
|
2964
|
+
...project.key ? { key: project.key } : {},
|
|
2965
|
+
...aliases.length ? { aliases } : {}
|
|
2966
|
+
},
|
|
2967
|
+
index: input.catchUp === false ? "as-is" : "update",
|
|
2968
|
+
around: { before: input.beforeN ?? 2, after: input.afterN ?? 2 },
|
|
2969
|
+
...input.keywords?.length ? { keywords: input.keywords } : {},
|
|
2970
|
+
...people.length ? { people } : {},
|
|
2971
|
+
...linkedChats.length ? { linkedChats } : {},
|
|
2972
|
+
...input.fetcher ? { fetch: "before-read" } : {},
|
|
2973
|
+
sources,
|
|
2974
|
+
scope,
|
|
2975
|
+
...input.days === void 0 ? {} : { lookbackDays: input.days },
|
|
2976
|
+
...input.after === void 0 ? {} : { after: input.after },
|
|
2977
|
+
...input.asOf === void 0 ? {} : { asOf: input.asOf },
|
|
2978
|
+
...input.checkpoint === void 0 ? {} : { checkpoint: input.checkpoint },
|
|
2979
|
+
...Object.keys(budgets).length ? { budgets } : {},
|
|
2980
|
+
...input.signal ? { signal: input.signal } : {}
|
|
2981
|
+
});
|
|
2982
|
+
const mentions = await findEvidenceMentions(store.knowledge, gathered, { exclude: project.ref });
|
|
2983
|
+
const unreadChats = [
|
|
2984
|
+
...gathered.linkedChats.filter((one) => one.state === "out-of-scope").map((one) => ({ source: one.ref, kind: "linked-chat", reason: "out-of-scope" })),
|
|
2985
|
+
...linked.slice(LINKED_CHATS).map((one) => ({
|
|
2986
|
+
source: formatReference({ type: "chat", ...one }),
|
|
2987
|
+
kind: "linked-chat",
|
|
2988
|
+
reason: "linked-chat-limit"
|
|
2989
|
+
}))
|
|
2990
|
+
];
|
|
2991
|
+
return { projectRef: project.ref, unreadSources: [...unread, ...unreadChats, ...members.left], ...gathered, mentions };
|
|
2992
|
+
}, "gatherStoredProject");
|
|
2993
|
+
|
|
2994
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
2774
2995
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
2775
2996
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
2776
2997
|
if (key in own)
|
|
@@ -2787,12 +3008,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
2787
3008
|
return found.bind(adapter);
|
|
2788
3009
|
}, "capability");
|
|
2789
3010
|
|
|
2790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3011
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
2791
3012
|
import { randomBytes } from "node:crypto";
|
|
2792
3013
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
2793
3014
|
var newOperationId = newSendId;
|
|
2794
3015
|
|
|
2795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
2796
3017
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
2797
3018
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
2798
3019
|
if (deps.offline)
|
|
@@ -2864,7 +3085,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
2864
3085
|
};
|
|
2865
3086
|
}, "accountService");
|
|
2866
3087
|
|
|
2867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3088
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
2868
3089
|
var MINUTE = 6e4;
|
|
2869
3090
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
2870
3091
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -2883,7 +3104,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
2883
3104
|
return new Date(at - at % MINUTE).toISOString();
|
|
2884
3105
|
}, "sendTime");
|
|
2885
3106
|
|
|
2886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
2887
3108
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
2888
3109
|
try {
|
|
2889
3110
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -3130,10 +3351,10 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
3130
3351
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
3131
3352
|
}, "linkLimits");
|
|
3132
3353
|
|
|
3133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3354
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
3134
3355
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
3135
3356
|
|
|
3136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
3137
3358
|
var THREADS_PAGE = 500;
|
|
3138
3359
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
3139
3360
|
const account2 = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -3212,7 +3433,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
3212
3433
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
3213
3434
|
}, "readMail");
|
|
3214
3435
|
|
|
3215
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
3216
3437
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account2) => {
|
|
3217
3438
|
if (deps.reads !== "store")
|
|
3218
3439
|
return keptChatId(deps.messenger, reference, store, account2);
|
|
@@ -3359,7 +3580,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
3359
3580
|
}
|
|
3360
3581
|
}, "senderAmong");
|
|
3361
3582
|
|
|
3362
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3583
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
3363
3584
|
var NO_MAIL = "no_mail";
|
|
3364
3585
|
var MAIL = "email";
|
|
3365
3586
|
var listContextOf = /* @__PURE__ */ __name(async (store, account2, app, stored) => {
|
|
@@ -3406,7 +3627,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
3406
3627
|
return chosenMail.map(({ provider, account: account2 }) => ({ provider, account: account2 }));
|
|
3407
3628
|
}, "accountsOfKind");
|
|
3408
3629
|
|
|
3409
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
3410
3631
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
3411
3632
|
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");
|
|
3412
3633
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
@@ -3754,7 +3975,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
3754
3975
|
};
|
|
3755
3976
|
}, "statsLucene");
|
|
3756
3977
|
|
|
3757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
3978
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
3758
3979
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
3759
3980
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
3760
3981
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -3794,7 +4015,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
3794
4015
|
};
|
|
3795
4016
|
}, "dateWindow");
|
|
3796
4017
|
|
|
3797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
3798
4019
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
3799
4020
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
3800
4021
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -3963,7 +4184,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
3963
4184
|
};
|
|
3964
4185
|
}, "readRankingSelection");
|
|
3965
4186
|
|
|
3966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
3967
4188
|
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");
|
|
3968
4189
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
3969
4190
|
command,
|
|
@@ -3973,7 +4194,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
3973
4194
|
fieldsVersion: FIELD_VERSION
|
|
3974
4195
|
}), "searchRecordOf");
|
|
3975
4196
|
|
|
3976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
3977
4198
|
function invalid2(message) {
|
|
3978
4199
|
throw new CliError("validation_error", message);
|
|
3979
4200
|
}
|
|
@@ -4267,7 +4488,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
4267
4488
|
}, "evidence")
|
|
4268
4489
|
}), "adminStatisticsService");
|
|
4269
4490
|
|
|
4270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
4271
4492
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
4272
4493
|
if (value === void 0)
|
|
4273
4494
|
return void 0;
|
|
@@ -4277,7 +4498,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
4277
4498
|
return id2;
|
|
4278
4499
|
}, "threadIdOf");
|
|
4279
4500
|
|
|
4280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
4281
4502
|
var LINKS = /https?:\/\/\S+/g;
|
|
4282
4503
|
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");
|
|
4283
4504
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -4304,7 +4525,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
4304
4525
|
});
|
|
4305
4526
|
}, "questions");
|
|
4306
4527
|
|
|
4307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4528
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
4308
4529
|
var TOP_POSTS = 5;
|
|
4309
4530
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
4310
4531
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -4321,7 +4542,7 @@ var chatStats = /* @__PURE__ */ __name((messages, { chatId, since, until, comple
|
|
|
4321
4542
|
complete: completeness.state === "complete" && events?.more !== true,
|
|
4322
4543
|
completeness,
|
|
4323
4544
|
messages: held.length,
|
|
4324
|
-
senders:
|
|
4545
|
+
senders: sendersOf2(held),
|
|
4325
4546
|
replies: held.filter((one) => (one.replyToId ?? one.replyTo?.id) !== void 0).length,
|
|
4326
4547
|
threads: held.filter((one) => replied.has(one.id) && (one.replyToId ?? one.replyTo?.id) === void 0).length,
|
|
4327
4548
|
reactions: sum(held.map(reactionsOf)),
|
|
@@ -4339,7 +4560,7 @@ var chatStats = /* @__PURE__ */ __name((messages, { chatId, since, until, comple
|
|
|
4339
4560
|
...by ? { series: seriesOf(held, events, by, timezone) } : {}
|
|
4340
4561
|
};
|
|
4341
4562
|
}, "chatStats");
|
|
4342
|
-
var
|
|
4563
|
+
var sendersOf2 = /* @__PURE__ */ __name((messages) => new Set(messages.flatMap(({ senderId }) => senderId ?? [])).size, "sendersOf");
|
|
4343
4564
|
var reactionsOf = /* @__PURE__ */ __name(({ reactions }) => reactions?.total ?? 0, "reactionsOf");
|
|
4344
4565
|
var counted = /* @__PURE__ */ __name((message, name) => {
|
|
4345
4566
|
const value = message.providerMetadata?.[name];
|
|
@@ -4407,7 +4628,7 @@ var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
|
4407
4628
|
return [...rows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, found]) => ({
|
|
4408
4629
|
key,
|
|
4409
4630
|
messages: found.messages.length,
|
|
4410
|
-
senders:
|
|
4631
|
+
senders: sendersOf2(found.messages),
|
|
4411
4632
|
...events ? { joined: found.joined, left: found.left } : {}
|
|
4412
4633
|
}));
|
|
4413
4634
|
}, "seriesOf");
|
|
@@ -4421,7 +4642,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
4421
4642
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
4422
4643
|
}, "median");
|
|
4423
4644
|
|
|
4424
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4645
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
4425
4646
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
4426
4647
|
const events = [];
|
|
4427
4648
|
for (const stay of stays) {
|
|
@@ -4453,7 +4674,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
4453
4674
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
4454
4675
|
}, "memberEvents");
|
|
4455
4676
|
|
|
4456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4677
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
4457
4678
|
var AUDIT_PAGE = 200;
|
|
4458
4679
|
var AUDIT_BUDGET = 10;
|
|
4459
4680
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -4533,7 +4754,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
4533
4754
|
return found;
|
|
4534
4755
|
}, "burstJoins");
|
|
4535
4756
|
|
|
4536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
4757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
4537
4758
|
var EVENTS_DAYS = 7;
|
|
4538
4759
|
var TRACKED_DAYS = 30;
|
|
4539
4760
|
var STATS_PAGE = 1e3;
|
|
@@ -4828,7 +5049,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
4828
5049
|
return members.length === 0 ? null : members;
|
|
4829
5050
|
}, "storedMembers");
|
|
4830
5051
|
|
|
4831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
4832
5053
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
4833
5054
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
4834
5055
|
const name = typed.trim().toLowerCase();
|
|
@@ -4878,7 +5099,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
4878
5099
|
return best.name;
|
|
4879
5100
|
}, "categorize");
|
|
4880
5101
|
|
|
4881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5102
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
4882
5103
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}:${account2}`, "taskAccount");
|
|
4883
5104
|
var RULES_IN = {
|
|
4884
5105
|
dialog: "all",
|
|
@@ -5084,7 +5305,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account2, chatI
|
|
|
5084
5305
|
return passes;
|
|
5085
5306
|
}, "applyTaskRulesToChats");
|
|
5086
5307
|
|
|
5087
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
5088
5309
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
5089
5310
|
const tags = /* @__PURE__ */ new Map();
|
|
5090
5311
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -5093,7 +5314,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
5093
5314
|
return tags;
|
|
5094
5315
|
}, "taskTagFilters");
|
|
5095
5316
|
|
|
5096
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
5097
5318
|
var DAY2 = 864e5;
|
|
5098
5319
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
5099
5320
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -5335,10 +5556,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
5335
5556
|
};
|
|
5336
5557
|
}, "agendaItem");
|
|
5337
5558
|
|
|
5338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5559
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
5339
5560
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
5340
5561
|
|
|
5341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5562
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
5342
5563
|
var REQUEST_MS = 400;
|
|
5343
5564
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
5344
5565
|
const lowest = ranges[0];
|
|
@@ -5361,13 +5582,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
5361
5582
|
};
|
|
5362
5583
|
}, "estimateBackfill");
|
|
5363
5584
|
|
|
5364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
5365
5586
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
5366
5587
|
...error,
|
|
5367
5588
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
5368
5589
|
}), "withRecovery");
|
|
5369
5590
|
|
|
5370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
5371
5592
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
5372
5593
|
if (isCliFailure(error))
|
|
5373
5594
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -5450,7 +5671,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
5450
5671
|
};
|
|
5451
5672
|
}, "mergeBatches");
|
|
5452
5673
|
|
|
5453
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5674
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
5454
5675
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
5455
5676
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
5456
5677
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -5473,7 +5694,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
5473
5694
|
}
|
|
5474
5695
|
}, "patiently");
|
|
5475
5696
|
|
|
5476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5697
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
5477
5698
|
var RULES_VERSION = 5;
|
|
5478
5699
|
var LOOK_BACK = 50;
|
|
5479
5700
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -5563,7 +5784,7 @@ var latest = /* @__PURE__ */ __name((window2, matches) => {
|
|
|
5563
5784
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
5564
5785
|
var link2 = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
5565
5786
|
|
|
5566
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
5567
5788
|
var CONTEXT_MESSAGES = 3;
|
|
5568
5789
|
var CONTEXT_MINUTES = 10;
|
|
5569
5790
|
var MAX_CHARS = 1200;
|
|
@@ -5587,12 +5808,12 @@ var context = {
|
|
|
5587
5808
|
}, "describe")
|
|
5588
5809
|
};
|
|
5589
5810
|
|
|
5590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5811
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
5591
5812
|
var BUILT_INS = [context];
|
|
5592
5813
|
var providers = [...BUILT_INS];
|
|
5593
5814
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
5594
5815
|
|
|
5595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
5596
5817
|
var READ_PAGE = 5e3;
|
|
5597
5818
|
var CHAIN = 50;
|
|
5598
5819
|
var CONVERSATION_QUERY = {
|
|
@@ -5744,7 +5965,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
5744
5965
|
return size4;
|
|
5745
5966
|
}, "sized");
|
|
5746
5967
|
|
|
5747
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
5748
5969
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
5749
5970
|
var MESSAGE_PAGE = 5e3;
|
|
5750
5971
|
var PER_SESSION = 8;
|
|
@@ -5763,7 +5984,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
5763
5984
|
price: remote.price,
|
|
5764
5985
|
installed: true,
|
|
5765
5986
|
perBatch: PER_REQUEST * concurrency,
|
|
5766
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
5987
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-H5ZWLJHR.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
5767
5988
|
};
|
|
5768
5989
|
}
|
|
5769
5990
|
const model = textModel(choice);
|
|
@@ -5780,7 +6001,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
5780
6001
|
if (!isTextModelInstalled(model, directory))
|
|
5781
6002
|
throw notDownloaded(model.id);
|
|
5782
6003
|
if (apart) {
|
|
5783
|
-
const { openProcess } = await import("./process-
|
|
6004
|
+
const { openProcess } = await import("./process-P6TW37HQ.js");
|
|
5784
6005
|
return openProcess(model, directory, { threads: threads ?? defaultThreads() });
|
|
5785
6006
|
}
|
|
5786
6007
|
return openEmbedder(model, directory, { threads: threads ?? defaultThreads() });
|
|
@@ -6069,7 +6290,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
6069
6290
|
return { ...one, state };
|
|
6070
6291
|
}, "shaped");
|
|
6071
6292
|
|
|
6072
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
6073
6294
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
6074
6295
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
6075
6296
|
for (const [key, value, maximum] of [
|
|
@@ -6122,7 +6343,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
6122
6343
|
}
|
|
6123
6344
|
}, "catchUpSearch");
|
|
6124
6345
|
|
|
6125
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
6126
6347
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
6127
6348
|
if (deps.reads === "store") {
|
|
6128
6349
|
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`);
|
|
@@ -6251,6 +6472,8 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
6251
6472
|
...options,
|
|
6252
6473
|
catchUp: catchingUp ? options.catchUp ?? {} : false
|
|
6253
6474
|
});
|
|
6475
|
+
const finished = /* @__PURE__ */ __name(() => options.onChat?.({ chats: chats.length, done: answer.items.length, fetched: answer.fetched }), "finished");
|
|
6476
|
+
finished();
|
|
6254
6477
|
for (const chat of chats) {
|
|
6255
6478
|
if (options.stop.aborted || batch.stopped) {
|
|
6256
6479
|
answer.stopped = true;
|
|
@@ -6258,6 +6481,7 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
6258
6481
|
}
|
|
6259
6482
|
if (await upToDate(chat)) {
|
|
6260
6483
|
answer.items.push({ chat: chat.id, title: chat.title, fetched: 0, complete: true, current: true });
|
|
6484
|
+
finished();
|
|
6261
6485
|
continue;
|
|
6262
6486
|
}
|
|
6263
6487
|
try {
|
|
@@ -6284,6 +6508,7 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
6284
6508
|
const issue = batch.fail(chat.id, "history", error);
|
|
6285
6509
|
answer.items.push({ chat: chat.id, title: chat.title, fetched: 0, complete: false, error: issue.code, issue });
|
|
6286
6510
|
}
|
|
6511
|
+
finished();
|
|
6287
6512
|
}
|
|
6288
6513
|
if (batch.failed > 0)
|
|
6289
6514
|
answer.batch = batch.result();
|
|
@@ -6439,7 +6664,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account2, chatId, key, byTi
|
|
|
6439
6664
|
return message?.timestamp ?? fallback;
|
|
6440
6665
|
}, "timeOfKey");
|
|
6441
6666
|
|
|
6442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6667
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
6443
6668
|
import { createHash as createHash6, randomUUID as randomUUID4 } from "node:crypto";
|
|
6444
6669
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
6445
6670
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -6576,16 +6801,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
6576
6801
|
return { plan, repair };
|
|
6577
6802
|
}, "gapsService");
|
|
6578
6803
|
|
|
6579
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
6580
6805
|
import { createHash as createHash8 } from "node:crypto";
|
|
6581
6806
|
import { constants as constants2 } from "node:fs";
|
|
6582
6807
|
import { open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
6583
6808
|
|
|
6584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
6585
6810
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
6586
6811
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
6587
6812
|
|
|
6588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6813
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
6589
6814
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
6590
6815
|
import { open as open4, stat } from "node:fs/promises";
|
|
6591
6816
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -6787,7 +7012,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
6787
7012
|
return { name, source };
|
|
6788
7013
|
}, "readStickerFile");
|
|
6789
7014
|
|
|
6790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
6791
7016
|
var MAX_FILES = 1e4;
|
|
6792
7017
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory, app, env) => {
|
|
6793
7018
|
if (refusedPlace(directory, app, env))
|
|
@@ -7897,7 +8122,7 @@ function imageSize(input) {
|
|
|
7897
8122
|
}
|
|
7898
8123
|
__name(imageSize, "imageSize");
|
|
7899
8124
|
|
|
7900
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
7901
8126
|
var MAX_PAGES = 20;
|
|
7902
8127
|
var MAX_PIXELS = 2e7;
|
|
7903
8128
|
var cancelled = /* @__PURE__ */ __name((signal) => {
|
|
@@ -8048,7 +8273,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
8048
8273
|
}
|
|
8049
8274
|
}, "ocrPdf");
|
|
8050
8275
|
|
|
8051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8276
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
8052
8277
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
8053
8278
|
const limits = pdfPreviewLimits(env);
|
|
8054
8279
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -8125,7 +8350,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
8125
8350
|
}
|
|
8126
8351
|
}, "pdfPreview");
|
|
8127
8352
|
|
|
8128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8353
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
8129
8354
|
import { createHash as createHash7 } from "node:crypto";
|
|
8130
8355
|
import { constants } from "node:fs";
|
|
8131
8356
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -8233,7 +8458,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
8233
8458
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
8234
8459
|
}, "transferMime");
|
|
8235
8460
|
|
|
8236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
8237
8462
|
var ATTACHMENT_QUERY = {
|
|
8238
8463
|
entity: "attachment",
|
|
8239
8464
|
backend: "sql",
|
|
@@ -8614,7 +8839,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
8614
8839
|
}, "setText")
|
|
8615
8840
|
}), "attachmentsService");
|
|
8616
8841
|
|
|
8617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
8618
8843
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
8619
8844
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
8620
8845
|
const store = await accountStore(deps);
|
|
@@ -8644,7 +8869,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
8644
8869
|
}, "list")
|
|
8645
8870
|
}), "chatDocumentsService");
|
|
8646
8871
|
|
|
8647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
8648
8873
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
8649
8874
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
8650
8875
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -8731,7 +8956,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
8731
8956
|
}
|
|
8732
8957
|
}, "isRetentionSelection");
|
|
8733
8958
|
|
|
8734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
8735
8960
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
8736
8961
|
const fields = text2.split(",").map((one) => one.trim());
|
|
8737
8962
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -8938,7 +9163,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
8938
9163
|
};
|
|
8939
9164
|
}, "countersService");
|
|
8940
9165
|
|
|
8941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
8942
9167
|
var SYNC_KEY = "messages.sync-first";
|
|
8943
9168
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
8944
9169
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -9070,7 +9295,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
9070
9295
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
9071
9296
|
}), "withRefresh");
|
|
9072
9297
|
|
|
9073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
9074
9299
|
var CANDIDATES = 50;
|
|
9075
9300
|
var WORD_HITS = 200;
|
|
9076
9301
|
var RRF_K = 60;
|
|
@@ -9188,7 +9413,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
9188
9413
|
}, deps.messenger);
|
|
9189
9414
|
const eligibility = filter === void 0 ? void 0 : await store.queries.conversationEligibility(prepared.execution);
|
|
9190
9415
|
const selected = prepared.selectedChat;
|
|
9191
|
-
const
|
|
9416
|
+
const scopeOf3 = /* @__PURE__ */ __name((one) => selected ? selected.account.provider === one.provider && selected.account.account === one.account ? { chatId: selected.chatId } : null : {}, "scopeOf");
|
|
9192
9417
|
const words2 = await byWords(query, prepared, eligibility?.conversations, since);
|
|
9193
9418
|
const meaning = [];
|
|
9194
9419
|
const sources = words2.sources;
|
|
@@ -9196,7 +9421,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
9196
9421
|
await withEmbedder(deps, target, choice, {}, async (embedder) => {
|
|
9197
9422
|
const [vector] = await embedder.embed([query], "query");
|
|
9198
9423
|
for (const one of prepared.scopeAccounts) {
|
|
9199
|
-
const scope =
|
|
9424
|
+
const scope = scopeOf3(one);
|
|
9200
9425
|
if (scope === null)
|
|
9201
9426
|
continue;
|
|
9202
9427
|
const hits = await store.vectors.nearestConversations(one, {
|
|
@@ -9230,7 +9455,7 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
9230
9455
|
const scoped = [];
|
|
9231
9456
|
const elsewhere = [];
|
|
9232
9457
|
for (const one of prepared.scopeAccounts) {
|
|
9233
|
-
const scope =
|
|
9458
|
+
const scope = scopeOf3(one);
|
|
9234
9459
|
if (scope === null)
|
|
9235
9460
|
continue;
|
|
9236
9461
|
const eligibleChats = eligibility?.chats.filter(({ account: account3 }) => account3.provider === one.provider && account3.account === one.account).map(({ chat: chat2 }) => chat2);
|
|
@@ -9345,13 +9570,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
9345
9570
|
return mean.map((value) => value / length);
|
|
9346
9571
|
}, "meanOf");
|
|
9347
9572
|
|
|
9348
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9573
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
9349
9574
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
9350
9575
|
...embeddingsMaintenance(deps),
|
|
9351
9576
|
...embeddingsSearch(deps)
|
|
9352
9577
|
}), "embeddingsService");
|
|
9353
9578
|
|
|
9354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9579
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
9355
9580
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
9356
9581
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
9357
9582
|
if (deps.offline)
|
|
@@ -9492,7 +9717,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
9492
9717
|
};
|
|
9493
9718
|
}, "foldersService");
|
|
9494
9719
|
|
|
9495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
9496
9721
|
var INBOX_CHATS = 20;
|
|
9497
9722
|
var REVIEW_DAYS = 3;
|
|
9498
9723
|
var UNANSWERED_HOURS = 24;
|
|
@@ -9700,7 +9925,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
9700
9925
|
};
|
|
9701
9926
|
}, "inboxService");
|
|
9702
9927
|
|
|
9703
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
9928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
9704
9929
|
var REVIEW_COUNT = 500;
|
|
9705
9930
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
9706
9931
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -9779,7 +10004,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
9779
10004
|
};
|
|
9780
10005
|
}, "mentionsService");
|
|
9781
10006
|
|
|
9782
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
9783
10008
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
9784
10009
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
9785
10010
|
const { text: text2, spans } = formatted2;
|
|
@@ -9839,7 +10064,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
9839
10064
|
};
|
|
9840
10065
|
}, "visibleFormattedText");
|
|
9841
10066
|
|
|
9842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
9843
10068
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
9844
10069
|
if (isLocator(reference)) {
|
|
9845
10070
|
if (message !== void 0)
|
|
@@ -9886,7 +10111,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
9886
10111
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
9887
10112
|
}, "validatePermalink");
|
|
9888
10113
|
|
|
9889
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
9890
10115
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
9891
10116
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
9892
10117
|
return `${seconds / 86400}d`;
|
|
@@ -9918,7 +10143,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
9918
10143
|
return seconds;
|
|
9919
10144
|
}, "pinDurationOf");
|
|
9920
10145
|
|
|
9921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
9922
10147
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
9923
10148
|
if (sendAs === void 0) {
|
|
9924
10149
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -9943,7 +10168,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
9943
10168
|
return sendAs;
|
|
9944
10169
|
}, "typedSendAs");
|
|
9945
10170
|
|
|
9946
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10171
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
9947
10172
|
var TOTAL_CAP = 1e4;
|
|
9948
10173
|
var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
9949
10174
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -9954,7 +10179,36 @@ var totalOf = /* @__PURE__ */ __name((count2, shown, hasMore, exact = true) => {
|
|
|
9954
10179
|
return { value: count2, relation: exact ? "eq" : "gte" };
|
|
9955
10180
|
}, "totalOf");
|
|
9956
10181
|
|
|
9957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
10183
|
+
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
10184
|
+
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
10185
|
+
let narrows = false;
|
|
10186
|
+
const kept = /* @__PURE__ */ __name((node) => {
|
|
10187
|
+
if (node.kind === "boolean")
|
|
10188
|
+
return {
|
|
10189
|
+
...node,
|
|
10190
|
+
clauses: node.clauses.map(({ occur, node: node2 }) => {
|
|
10191
|
+
if (occur !== "must_not")
|
|
10192
|
+
return { occur, node: kept(node2) };
|
|
10193
|
+
narrows = true;
|
|
10194
|
+
return { occur, node: node2 };
|
|
10195
|
+
})
|
|
10196
|
+
};
|
|
10197
|
+
if (!WORD_FIELDS.has(node.field)) {
|
|
10198
|
+
narrows = true;
|
|
10199
|
+
return node;
|
|
10200
|
+
}
|
|
10201
|
+
return { ...everything, span: node.span };
|
|
10202
|
+
}, "kept");
|
|
10203
|
+
const fields = kept(root);
|
|
10204
|
+
return narrows ? fields : void 0;
|
|
10205
|
+
}, "fieldsOfQuery");
|
|
10206
|
+
var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
10207
|
+
const wanted = /* @__PURE__ */ __name((node) => node.kind === "boolean" ? node.clauses.flatMap(({ occur, node: node2 }) => occur === "must_not" ? [] : wanted(node2)) : WORD_FIELDS.has(node.field) && (node.operator === "term" || node.operator === "phrase") ? [node.value] : [], "wanted");
|
|
10208
|
+
return wanted(root).join(" ").trim();
|
|
10209
|
+
}, "meaningWords");
|
|
10210
|
+
|
|
10211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
9958
10212
|
var words = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
9959
10213
|
var scaffolding = new Set(words("what which how many much who where when is are was were do does did can could should we the a an for of to under from in on at has have \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0430\u043A\u043E\u0439 \u043A\u0430\u043A\u0430\u044F \u043A\u0430\u043A\u0438\u0435 \u043A\u0430\u043A\u043E\u0435 \u043A\u0442\u043E \u043A\u043E\u043C\u0443 \u043A\u0435\u043C \u0433\u0434\u0435 \u043A\u043E\u0433\u0434\u0430 \u043A\u0430\u043A \u0447\u0442\u043E \u0432\u043E \u043F\u043E \u043D\u0430 \u0432 \u043A \u0441 \u0443 \u0447\u0435\u0440\u0435\u0437 \u043B\u0438 \u0434\u043E\u043B\u0436\u0435\u043D \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0443\u0436\u043D\u043E \u0438\u0434\u0451\u0442 \u0438\u0434\u0435\u0442 \u043C\u043E\u0436\u043D\u043E \u043C\u043E\u0436\u0435\u0442 \u043C\u043E\u0433\u0443\u0442"));
|
|
9960
10214
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -10070,7 +10324,7 @@ function planQuestion(text2, strict = false) {
|
|
|
10070
10324
|
}
|
|
10071
10325
|
__name(planQuestion, "planQuestion");
|
|
10072
10326
|
|
|
10073
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
10074
10328
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
10075
10329
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
10076
10330
|
var searchCombined = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -10263,7 +10517,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
10263
10517
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
10264
10518
|
}, "signals");
|
|
10265
10519
|
|
|
10266
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
10267
10521
|
var MEANING_DEPTH = 100;
|
|
10268
10522
|
var RRF_K2 = 60;
|
|
10269
10523
|
var RERANK_DEPTH = 50;
|
|
@@ -10274,6 +10528,17 @@ var FOLLOW_UP_HITS = 5;
|
|
|
10274
10528
|
var FOLLOW_UPS_PER_HIT = 2;
|
|
10275
10529
|
var RARE_AT = 3;
|
|
10276
10530
|
var FOLLOW_UP_CANDIDATES = 20;
|
|
10531
|
+
var RANK_WITHIN_MESSAGES = 1e5;
|
|
10532
|
+
var EVERY_MESSAGE = {
|
|
10533
|
+
kind: "predicate",
|
|
10534
|
+
field: "date",
|
|
10535
|
+
operator: "range",
|
|
10536
|
+
value: "*",
|
|
10537
|
+
upper: "*",
|
|
10538
|
+
lower_inclusive: true,
|
|
10539
|
+
upper_inclusive: true
|
|
10540
|
+
};
|
|
10541
|
+
var scopeOf2 = /* @__PURE__ */ __name((root) => root === void 0 ? {} : { ast: { version: 1, language: "lucene-v1", root } }, "scopeOf");
|
|
10277
10542
|
var discoveryRequest = /* @__PURE__ */ __name((asked) => asked.ast !== void 0 || asked.exact || !asked.text ? asked : {
|
|
10278
10543
|
...asked,
|
|
10279
10544
|
text: asked.text.replace(new RegExp("(?<=\\p{L})\\?(?=\\s|$)", "gu"), "").replace(/"(?:[^"\\]|\\.)*"|(?<=\d):(?=\d)/gu, (found) => found === ":" ? " " : found)
|
|
@@ -10283,17 +10548,23 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10283
10548
|
const original = await prepareLucene(store, account2, request, messenger);
|
|
10284
10549
|
const text2 = request.text ?? "";
|
|
10285
10550
|
const plan = planQuestion(text2, request.ast !== void 0 || !!request.exact || !!request.newest);
|
|
10286
|
-
if (request.ast !== void 0 || request.exact || request.newest
|
|
10551
|
+
if (request.ast !== void 0 || request.exact || request.newest)
|
|
10287
10552
|
return searchLucene(store, account2, request, messenger);
|
|
10288
10553
|
const implicit = implicitTextTerms(text2);
|
|
10289
|
-
|
|
10554
|
+
const explicit = implicit.size === 0 || !plan.changed && walkQuery(original.execution.root).some((node) => (node.field === "text" || node.field === "exact") && (node.operator !== "term" || node.field === "exact" || !implicit.has(node.span.start)));
|
|
10555
|
+
const root = explicit ? validateFields(parseLucene(text2, { ...MESSAGE_PARSING, defaultField: "text" })).root : void 0;
|
|
10556
|
+
const question = root === void 0 ? text2 : meaningWords(root);
|
|
10557
|
+
if (!question)
|
|
10290
10558
|
return searchLucene(store, account2, request, messenger);
|
|
10291
|
-
const terms = [...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words(alias.split(" -> ")[1] ?? ""))))];
|
|
10559
|
+
const terms = root === void 0 ? [...new Set(plan.terms.concat(plan.aliases.flatMap((alias) => words(alias.split(" -> ")[1] ?? ""))))] : [...new Set(words(question))];
|
|
10292
10560
|
if (!terms.length)
|
|
10293
10561
|
return searchLucene(store, account2, request, messenger);
|
|
10294
10562
|
if (terms.length > 64)
|
|
10295
10563
|
exhausted("discovery terms");
|
|
10296
|
-
const
|
|
10564
|
+
const narrowing = root === void 0 ? void 0 : fieldsOfQuery(root, EVERY_MESSAGE);
|
|
10565
|
+
const scope = root === void 0 ? plan.scope ? { text: plan.scope } : {} : scopeOf2(narrowing);
|
|
10566
|
+
const within = scope.text !== void 0 || scope.ast !== void 0 ? () => filterPks(store, account2, { ...request, text: void 0, ast: void 0, ...scope }, messenger) : void 0;
|
|
10567
|
+
const lane = meaning ? await meaning(question, original.scopeAccounts, void 0, within) : void 0;
|
|
10297
10568
|
let started = performance.now();
|
|
10298
10569
|
const check = /* @__PURE__ */ __name(() => {
|
|
10299
10570
|
if (request.signal?.aborted)
|
|
@@ -10308,7 +10579,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10308
10579
|
const previous = union.get(m.locator);
|
|
10309
10580
|
union.set(m.locator, { ...previous, ...m, fused: (previous?.fused ?? 0) + 1 / (60 + rank + 1) });
|
|
10310
10581
|
}), "add");
|
|
10311
|
-
for (const query of plan.changed ? [] : plan.queries) {
|
|
10582
|
+
for (const query of plan.changed || root !== void 0 ? [] : plan.queries) {
|
|
10312
10583
|
check();
|
|
10313
10584
|
const found = await searchCombined(store, account2, { ...request, text: query, limit: 300 }, messenger, {
|
|
10314
10585
|
candidateDepth: 300,
|
|
@@ -10322,7 +10593,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10322
10593
|
truncated ||= found.hasMore || found.query.combined.truncated;
|
|
10323
10594
|
}
|
|
10324
10595
|
check();
|
|
10325
|
-
const relaxed = `(${terms.join(" OR ")})${plan.scope ? ` ${plan.scope}` : ""}
|
|
10596
|
+
const relaxed = root === void 0 ? `(${terms.join(" OR ")})${plan.scope ? ` ${plan.scope}` : ""}` : text2;
|
|
10326
10597
|
const partialRequest = { ...request, text: relaxed, ast: void 0, limit: 300, context: 0, thread: void 0 };
|
|
10327
10598
|
const partial = await searchLucene(store, account2, partialRequest, messenger);
|
|
10328
10599
|
add(partial.items);
|
|
@@ -10345,8 +10616,9 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10345
10616
|
}).filter((m) => !request.only || request.only.some((key) => key.provider === m.provider && key.account === m.account && key.chatId === m.chatId && key.id === m.id));
|
|
10346
10617
|
const eligible = await searchLucene(store, account2, {
|
|
10347
10618
|
...request,
|
|
10348
|
-
text:
|
|
10619
|
+
text: void 0,
|
|
10349
10620
|
ast: void 0,
|
|
10621
|
+
...scope,
|
|
10350
10622
|
limit: 500,
|
|
10351
10623
|
only,
|
|
10352
10624
|
context: 0,
|
|
@@ -10405,7 +10677,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10405
10677
|
candidates = candidates.map(described).sort((a, b) => (b.score ?? 0) - (a.score ?? 0) || Number(parentByLocator.has(b.locator)) - Number(parentByLocator.has(a.locator)));
|
|
10406
10678
|
let meaningCandidates = 0;
|
|
10407
10679
|
if (lane && "ranked" in lane) {
|
|
10408
|
-
const near2 = await nearEligible(store, account2, request, messenger, lane.ranked,
|
|
10680
|
+
const near2 = await nearEligible(store, account2, request, messenger, lane.ranked, scope);
|
|
10409
10681
|
meaningCandidates = near2.length;
|
|
10410
10682
|
candidates = fusedWithMeaning(candidates, near2, described);
|
|
10411
10683
|
}
|
|
@@ -10446,7 +10718,7 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10446
10718
|
started += performance.now() - opening;
|
|
10447
10719
|
}
|
|
10448
10720
|
check();
|
|
10449
|
-
const followUps = await followUpsOf(store, account2, request, messenger, candidates,
|
|
10721
|
+
const followUps = await followUpsOf(store, account2, request, messenger, candidates, scope);
|
|
10450
10722
|
const items = await Promise.all(candidates.slice(0, request.limit).map(async ({ fused: _fused, ...hit }) => {
|
|
10451
10723
|
const later = followUps.get(hit.locator);
|
|
10452
10724
|
const m = later?.length ? { ...hit, followUps: later } : hit;
|
|
@@ -10472,14 +10744,14 @@ var searchDiscovery = /* @__PURE__ */ __name(async (store, account2, asked, mess
|
|
|
10472
10744
|
query: {
|
|
10473
10745
|
...partial.query,
|
|
10474
10746
|
discovery: {
|
|
10475
|
-
method: "lexical-partial",
|
|
10747
|
+
method: root === void 0 ? "lexical-partial" : "lexical-strict",
|
|
10476
10748
|
candidateDepth: 300,
|
|
10477
10749
|
candidates: candidates.length,
|
|
10478
10750
|
repliesAdded: replyCount,
|
|
10479
10751
|
followUps: [...followUps.values()].reduce((sum2, later) => sum2 + later.length, 0),
|
|
10480
10752
|
truncated,
|
|
10481
10753
|
terms,
|
|
10482
|
-
queries: [...plan.changed ? [] : plan.queries, relaxed],
|
|
10754
|
+
queries: [...plan.changed || root !== void 0 ? [] : plan.queries, relaxed],
|
|
10483
10755
|
...lane && "ranked" in lane ? { meaning: { model: lane.model, candidates: meaningCandidates } } : {},
|
|
10484
10756
|
...reranked ? { rerank: reranked } : {}
|
|
10485
10757
|
}
|
|
@@ -10500,7 +10772,7 @@ var followUpsOf = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
10500
10772
|
const out = /* @__PURE__ */ new Map();
|
|
10501
10773
|
if (!only.length)
|
|
10502
10774
|
return out;
|
|
10503
|
-
const eligible = await searchLucene(store, account2, { ...request, text:
|
|
10775
|
+
const eligible = await searchLucene(store, account2, { ...request, text: void 0, ast: void 0, ...scope, limit: only.length, only, context: 0, thread: void 0 }, messenger);
|
|
10504
10776
|
const allowed = new Map(eligible.items.map((m) => [m.locator, m]));
|
|
10505
10777
|
const shown = /* @__PURE__ */ new Set();
|
|
10506
10778
|
head.forEach((hit, i) => {
|
|
@@ -10513,12 +10785,17 @@ var followUpsOf = /* @__PURE__ */ __name(async (store, account2, request, messen
|
|
|
10513
10785
|
});
|
|
10514
10786
|
return out;
|
|
10515
10787
|
}, "followUpsOf");
|
|
10788
|
+
var filterPks = /* @__PURE__ */ __name(async (store, account2, request, messenger) => {
|
|
10789
|
+
const { execution } = await prepareLucene(store, account2, request, messenger);
|
|
10790
|
+
const pks = await store.queries.matchingPks(execution, RANK_WITHIN_MESSAGES);
|
|
10791
|
+
return pks === void 0 || pks.length > RANK_WITHIN_MESSAGES ? void 0 : pks;
|
|
10792
|
+
}, "filterPks");
|
|
10516
10793
|
var nearEligible = /* @__PURE__ */ __name(async (store, account2, request, messenger, ranked, scope) => {
|
|
10517
10794
|
const keyOf5 = /* @__PURE__ */ __name((one) => JSON.stringify([one.provider, one.account, one.chatId, one.id]), "keyOf");
|
|
10518
10795
|
const only = ranked.slice(0, MEANING_DEPTH).filter((m) => !request.only || request.only.some((key) => keyOf5(key) === keyOf5(m))).map(({ provider, account: account3, chatId, id: id2 }) => ({ provider, account: account3, chatId, id: id2 }));
|
|
10519
10796
|
if (!only.length)
|
|
10520
10797
|
return [];
|
|
10521
|
-
const eligible = await searchLucene(store, account2, { ...request, text:
|
|
10798
|
+
const eligible = await searchLucene(store, account2, { ...request, text: void 0, ast: void 0, ...scope, limit: only.length, only, context: 0, thread: void 0 }, messenger);
|
|
10522
10799
|
const hits = new Map(eligible.items.map((hit) => {
|
|
10523
10800
|
const { provider, account: account3 } = parseLocator(hit.locator);
|
|
10524
10801
|
return [keyOf5({ provider, account: account3, chatId: hit.chatId, id: hit.id }), hit];
|
|
@@ -10568,7 +10845,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
10568
10845
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
10569
10846
|
}, "mixedWithReranker");
|
|
10570
10847
|
|
|
10571
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10848
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
10572
10849
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
10573
10850
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
10574
10851
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -10767,7 +11044,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account2, chat, mes
|
|
|
10767
11044
|
return result;
|
|
10768
11045
|
}, "readThreadContext");
|
|
10769
11046
|
|
|
10770
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
10771
11048
|
var SEARCH_FILL_MS = 200;
|
|
10772
11049
|
var statsStore = /* @__PURE__ */ __name(async (store, account2, request, messenger = {}) => {
|
|
10773
11050
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -10834,12 +11111,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
10834
11111
|
}, "accountOf");
|
|
10835
11112
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account: account2 }) => `${provider}/${account2}`, "keyOf");
|
|
10836
11113
|
|
|
10837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
10838
11115
|
import { createHash as createHash9 } from "node:crypto";
|
|
10839
11116
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
10840
11117
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
10841
11118
|
|
|
10842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
10843
11120
|
var GROUP_SETTINGS = [
|
|
10844
11121
|
"allCanPin",
|
|
10845
11122
|
"onlyAdminsAdd",
|
|
@@ -10853,7 +11130,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
10853
11130
|
var senderIsMe = /* @__PURE__ */ __name((message, account2) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account2, "senderIsMe");
|
|
10854
11131
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
10855
11132
|
|
|
10856
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
10857
11134
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
10858
11135
|
import { link as link3, rm } from "node:fs/promises";
|
|
10859
11136
|
import { basename as basename5, join as join9, resolve as resolve6 } from "node:path";
|
|
@@ -10976,7 +11253,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory, fallbackName, { uniqu
|
|
|
10976
11253
|
}
|
|
10977
11254
|
}, "save");
|
|
10978
11255
|
|
|
10979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11256
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
10980
11257
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
10981
11258
|
var PICTURE_FLOOR = 0.25;
|
|
10982
11259
|
var PAGE4 = 50;
|
|
@@ -10993,7 +11270,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
10993
11270
|
const directory = imageModelsDirectory(deps.env);
|
|
10994
11271
|
if (!isImageModelInstalled(model2, directory))
|
|
10995
11272
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
10996
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
11273
|
+
const { openPictureEmbedder } = await import("./embedder-KEVEDNDJ.js");
|
|
10997
11274
|
return openPictureEmbedder(model2, directory);
|
|
10998
11275
|
}, "open");
|
|
10999
11276
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -11190,8 +11467,8 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
11190
11467
|
}, "search")
|
|
11191
11468
|
}), "withPictures");
|
|
11192
11469
|
|
|
11193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11194
|
-
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared) => {
|
|
11470
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
11471
|
+
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
11195
11472
|
const target = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
11196
11473
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
11197
11474
|
skipped: { reason, model: target.id, ...step ? { step } : {} }
|
|
@@ -11209,10 +11486,11 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
11209
11486
|
try {
|
|
11210
11487
|
const ranked = [];
|
|
11211
11488
|
if (words2) {
|
|
11489
|
+
const pks = await within?.();
|
|
11212
11490
|
const lookUp = /* @__PURE__ */ __name(async (embedder) => {
|
|
11213
11491
|
const [query] = await embedder.embed([words2], "query");
|
|
11214
11492
|
for (const one of ready) {
|
|
11215
|
-
const near2 = await store.vectors.nearestMessages(one, {
|
|
11493
|
+
const near2 = pks ? await store.vectors.scoreMessages(one, { model: target.key, query, pks }) : await store.vectors.nearestMessages(one, {
|
|
11216
11494
|
model: target.key,
|
|
11217
11495
|
limit: MEANING_DEPTH,
|
|
11218
11496
|
query
|
|
@@ -11238,7 +11516,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
11238
11516
|
}
|
|
11239
11517
|
}, "meaningLane");
|
|
11240
11518
|
|
|
11241
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
11242
11520
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
11243
11521
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
11244
11522
|
if (choice === "off")
|
|
@@ -11250,9 +11528,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
11250
11528
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
11251
11529
|
try {
|
|
11252
11530
|
const warm = deps.embedders;
|
|
11253
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
11531
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-P6TW37HQ.js")).openRerankerProcess(model, directory, {
|
|
11254
11532
|
threads: defaultThreads()
|
|
11255
|
-
})) : await (await import("./rerank-
|
|
11533
|
+
})) : await (await import("./rerank-5A3JDK7O.js")).openReranker(model, directory);
|
|
11256
11534
|
return {
|
|
11257
11535
|
model: model.id,
|
|
11258
11536
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -11272,7 +11550,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
11272
11550
|
};
|
|
11273
11551
|
}, "rerankLane");
|
|
11274
11552
|
|
|
11275
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11553
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
11276
11554
|
import { createHash as createHash10 } from "node:crypto";
|
|
11277
11555
|
var refOf = /* @__PURE__ */ __name((target) => target.ref ?? `document:${target.documentId}`, "refOf");
|
|
11278
11556
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
@@ -11280,7 +11558,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
11280
11558
|
const directory = imageModelsDirectory(env);
|
|
11281
11559
|
if (!isImageModelInstalled(model, directory))
|
|
11282
11560
|
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 });
|
|
11283
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
11561
|
+
const { openPictureEmbedder } = await import("./embedder-KEVEDNDJ.js");
|
|
11284
11562
|
return openPictureEmbedder(model, directory);
|
|
11285
11563
|
}, "openPictureEmbedderFor");
|
|
11286
11564
|
var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options = {}) => {
|
|
@@ -11301,7 +11579,7 @@ var savePicture = /* @__PURE__ */ __name(async (store, target, bytes2, options =
|
|
|
11301
11579
|
}, "savePicture");
|
|
11302
11580
|
var removePicture = /* @__PURE__ */ __name((store, target) => store.notes.removePicture(refOf(target)), "removePicture");
|
|
11303
11581
|
|
|
11304
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
11305
11583
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
11306
11584
|
const metadata = note.frontMatter;
|
|
11307
11585
|
const account2 = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -11316,7 +11594,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
11316
11594
|
};
|
|
11317
11595
|
}, "documentSource");
|
|
11318
11596
|
|
|
11319
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
11320
11598
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
11321
11599
|
let root;
|
|
11322
11600
|
try {
|
|
@@ -11343,7 +11621,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
11343
11621
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
11344
11622
|
}, "titleTiers");
|
|
11345
11623
|
|
|
11346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11624
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
11347
11625
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
11348
11626
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
11349
11627
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -11521,33 +11799,8 @@ var noteSourceOfQuery = /* @__PURE__ */ __name((query) => {
|
|
|
11521
11799
|
}
|
|
11522
11800
|
return { source, rest };
|
|
11523
11801
|
}, "noteSourceOfQuery");
|
|
11524
|
-
var
|
|
11525
|
-
var
|
|
11526
|
-
let narrows = false;
|
|
11527
|
-
const kept = /* @__PURE__ */ __name((node) => {
|
|
11528
|
-
if (node.kind === "boolean")
|
|
11529
|
-
return {
|
|
11530
|
-
...node,
|
|
11531
|
-
clauses: node.clauses.map(({ occur, node: node2 }) => {
|
|
11532
|
-
if (occur !== "must_not")
|
|
11533
|
-
return { occur, node: kept(node2) };
|
|
11534
|
-
narrows = true;
|
|
11535
|
-
return { occur, node: node2 };
|
|
11536
|
-
})
|
|
11537
|
-
};
|
|
11538
|
-
if (!WORD_FIELDS.has(node.field)) {
|
|
11539
|
-
narrows = true;
|
|
11540
|
-
return node;
|
|
11541
|
-
}
|
|
11542
|
-
return { kind: "predicate", field: "in", operator: "term", value: "notes", span: node.span };
|
|
11543
|
-
}, "kept");
|
|
11544
|
-
const fields = kept(root);
|
|
11545
|
-
return narrows ? fields : void 0;
|
|
11546
|
-
}, "fieldsOfQuery");
|
|
11547
|
-
var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
11548
|
-
const wanted = /* @__PURE__ */ __name((node) => node.kind === "boolean" ? node.clauses.flatMap(({ occur, node: node2 }) => occur === "must_not" ? [] : wanted(node2)) : WORD_FIELDS.has(node.field) && (node.operator === "term" || node.operator === "phrase") ? [node.value] : [], "wanted");
|
|
11549
|
-
return wanted(root).join(" ").trim();
|
|
11550
|
-
}, "meaningWords");
|
|
11802
|
+
var EVERY_NOTE = { kind: "predicate", field: "in", operator: "term", value: "notes" };
|
|
11803
|
+
var fieldsOfQuery2 = /* @__PURE__ */ __name((root) => fieldsOfQuery(root, EVERY_NOTE), "fieldsOfQuery");
|
|
11551
11804
|
var allOf = /* @__PURE__ */ __name((nodes) => nodes.length <= 1 ? nodes[0] : {
|
|
11552
11805
|
kind: "boolean",
|
|
11553
11806
|
clauses: nodes.map((node) => ({ occur: "must", node })),
|
|
@@ -11556,7 +11809,7 @@ var allOf = /* @__PURE__ */ __name((nodes) => nodes.length <= 1 ? nodes[0] : {
|
|
|
11556
11809
|
var matching = /* @__PURE__ */ __name(async (store, refs, root, scope) => {
|
|
11557
11810
|
if (refs.length === 0)
|
|
11558
11811
|
return /* @__PURE__ */ new Map();
|
|
11559
|
-
const resolved = await resolvedQuery(store, root ?? {
|
|
11812
|
+
const resolved = await resolvedQuery(store, root ?? { ...EVERY_NOTE, span: { start: 0, end: 0 } }, scope.timezone);
|
|
11560
11813
|
const found = await store.notes.search({
|
|
11561
11814
|
root: resolved.root,
|
|
11562
11815
|
refs,
|
|
@@ -11620,7 +11873,7 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
11620
11873
|
const parsed = query.trim() ? parsedQuery(query, exact) : void 0;
|
|
11621
11874
|
const words2 = parsed === void 0 ? "" : meaningWords(parsed);
|
|
11622
11875
|
const narrowing = allOf([
|
|
11623
|
-
...parsed === void 0 ? [] : [
|
|
11876
|
+
...parsed === void 0 ? [] : [fieldsOfQuery2(parsed)].filter((node) => node !== void 0),
|
|
11624
11877
|
...filter === void 0 ? [] : [parsedQuery(filter)]
|
|
11625
11878
|
]);
|
|
11626
11879
|
const text2 = [query.trim() ? `(${query})` : "", filter ?? ""].filter(Boolean).join(" AND ");
|
|
@@ -11805,7 +12058,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account2, text2, { acco
|
|
|
11805
12058
|
};
|
|
11806
12059
|
}, "searchNotesOf");
|
|
11807
12060
|
|
|
11808
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12061
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
11809
12062
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
11810
12063
|
var iso = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
11811
12064
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -11917,7 +12170,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
11917
12170
|
};
|
|
11918
12171
|
}, "searchEvents");
|
|
11919
12172
|
|
|
11920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12173
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
11921
12174
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
11922
12175
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
11923
12176
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -12004,7 +12257,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
12004
12257
|
return byWords;
|
|
12005
12258
|
}
|
|
12006
12259
|
messagesBy = { by: "words and meaning", ...lane.partly ? { meaningSkipped: lane.partly } : {} };
|
|
12007
|
-
const near2 = await nearEligible(store, account2, query, messenger, lane.ranked, filters
|
|
12260
|
+
const near2 = await nearEligible(store, account2, query, messenger, lane.ranked, filters ? { text: filters } : {});
|
|
12008
12261
|
const fused2 = /* @__PURE__ */ new Map();
|
|
12009
12262
|
byWords.forEach((item, rank) => {
|
|
12010
12263
|
fused2.set(item.ref, { item, score: 1 / (RRF_K3 + rank + 1) });
|
|
@@ -12125,7 +12378,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account2, request, messenge
|
|
|
12125
12378
|
};
|
|
12126
12379
|
}, "searchAll");
|
|
12127
12380
|
|
|
12128
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
12129
12382
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
12130
12383
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
12131
12384
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -12372,7 +12625,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account2, source, r
|
|
|
12372
12625
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
12373
12626
|
}, "searchAllOfSource");
|
|
12374
12627
|
|
|
12375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12628
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
12376
12629
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
12377
12630
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
12378
12631
|
var DEFAULT_BACKEND = "both";
|
|
@@ -12561,7 +12814,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
12561
12814
|
return { report, sources };
|
|
12562
12815
|
}, "searchServer");
|
|
12563
12816
|
|
|
12564
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
12817
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
12565
12818
|
var DELETE_AT_ONCE = 10;
|
|
12566
12819
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
12567
12820
|
const { guard } = deps;
|
|
@@ -12987,7 +13240,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
12987
13240
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first]} needs a --photo or --file`);
|
|
12988
13241
|
}, "checkMediaOptions");
|
|
12989
13242
|
|
|
12990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
12991
13244
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
12992
13245
|
var RULES = {
|
|
12993
13246
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -13002,7 +13255,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
13002
13255
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
13003
13256
|
}), "classifyChannel");
|
|
13004
13257
|
|
|
13005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
13006
13259
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
13007
13260
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
13008
13261
|
const store = await deps.store();
|
|
@@ -13088,7 +13341,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
13088
13341
|
};
|
|
13089
13342
|
}, "metadataService");
|
|
13090
13343
|
|
|
13091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
13092
13345
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
13093
13346
|
var LINK2 = /https?:\/\/\S+/i;
|
|
13094
13347
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -13276,7 +13529,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
13276
13529
|
}, "nextPoint");
|
|
13277
13530
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
13278
13531
|
|
|
13279
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13532
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
13280
13533
|
import { existsSync, readFileSync } from "node:fs";
|
|
13281
13534
|
import { join as join10 } from "node:path";
|
|
13282
13535
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -13419,7 +13672,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
13419
13672
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
13420
13673
|
}, "assign");
|
|
13421
13674
|
|
|
13422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13675
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
13423
13676
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
13424
13677
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
13425
13678
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -13456,7 +13709,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
13456
13709
|
return { chatId, rows, notes };
|
|
13457
13710
|
}, "moderateWith");
|
|
13458
13711
|
|
|
13459
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
13460
13713
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
13461
13714
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
13462
13715
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -13534,7 +13787,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
13534
13787
|
}, "removePerson")
|
|
13535
13788
|
}), "moderatorOf");
|
|
13536
13789
|
|
|
13537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
13538
13791
|
var CONTEXT_MESSAGES2 = 10;
|
|
13539
13792
|
var CONTEXT_BYTES = 64 * 1024;
|
|
13540
13793
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -13790,10 +14043,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
13790
14043
|
};
|
|
13791
14044
|
}, "personMessages");
|
|
13792
14045
|
|
|
13793
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14046
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
13794
14047
|
import { createHash as createHash11 } from "node:crypto";
|
|
13795
14048
|
|
|
13796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14049
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
13797
14050
|
var missing3 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
13798
14051
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
13799
14052
|
const parsed = parseMeetingReference(reference);
|
|
@@ -13841,7 +14094,7 @@ var resolveMeetingReference = /* @__PURE__ */ __name(async (store, accountId, re
|
|
|
13841
14094
|
};
|
|
13842
14095
|
}, "resolveMeetingReference");
|
|
13843
14096
|
|
|
13844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
13845
14098
|
var hash = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
13846
14099
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
13847
14100
|
if (signal?.aborted)
|
|
@@ -14040,7 +14293,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
14040
14293
|
return { ...packet, fingerprint: hash(packet) };
|
|
14041
14294
|
}, "readMeetingEvidence");
|
|
14042
14295
|
|
|
14043
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
14044
14297
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
14045
14298
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
14046
14299
|
const requestedAccounts = options.accountIds;
|
|
@@ -14139,7 +14392,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
14139
14392
|
};
|
|
14140
14393
|
}, "personMeetingContext");
|
|
14141
14394
|
|
|
14142
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14395
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
14143
14396
|
var PREPARE_BYTES = 96 * 1024;
|
|
14144
14397
|
var MEETINGS = 5;
|
|
14145
14398
|
var CUES = 3;
|
|
@@ -14256,7 +14509,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
14256
14509
|
}
|
|
14257
14510
|
}, "meetingsOf");
|
|
14258
14511
|
|
|
14259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
14260
14513
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
14261
14514
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
14262
14515
|
const held = await storeIfOpen(deps);
|
|
@@ -14326,7 +14579,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
14326
14579
|
complete: false
|
|
14327
14580
|
})), "quiet");
|
|
14328
14581
|
|
|
14329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
14330
14583
|
var TIMELINE_ITEMS = 50;
|
|
14331
14584
|
var TIMELINE_MAX = 500;
|
|
14332
14585
|
var SCOPES = ["personal", "work"];
|
|
@@ -14381,7 +14634,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
14381
14634
|
};
|
|
14382
14635
|
}, "personTimeline");
|
|
14383
14636
|
|
|
14384
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
14385
14638
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
14386
14639
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
14387
14640
|
const held = await storeIfOpen(deps);
|
|
@@ -14608,7 +14861,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
14608
14861
|
return rest;
|
|
14609
14862
|
}, "withoutPhone");
|
|
14610
14863
|
|
|
14611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
14612
14865
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
14613
14866
|
id: note.id,
|
|
14614
14867
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -14652,7 +14905,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
14652
14905
|
};
|
|
14653
14906
|
}, "privatePeopleService");
|
|
14654
14907
|
|
|
14655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14908
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
14656
14909
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
14657
14910
|
total: 0,
|
|
14658
14911
|
population: 0,
|
|
@@ -14908,7 +15161,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
14908
15161
|
}, "evidence")
|
|
14909
15162
|
}), "rankingsService");
|
|
14910
15163
|
|
|
14911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
14912
15165
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
14913
15166
|
id: one.id,
|
|
14914
15167
|
name: one.name,
|
|
@@ -15037,7 +15290,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
15037
15290
|
};
|
|
15038
15291
|
}, "searchesService");
|
|
15039
15292
|
|
|
15040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
15041
15294
|
var TAGGING_QUERY = {
|
|
15042
15295
|
entity: "tagging",
|
|
15043
15296
|
backend: "sql",
|
|
@@ -15121,7 +15374,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
15121
15374
|
};
|
|
15122
15375
|
}, "tagsService");
|
|
15123
15376
|
|
|
15124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
15125
15378
|
var TASK_QUERY = {
|
|
15126
15379
|
entity: "task",
|
|
15127
15380
|
backend: "sql",
|
|
@@ -15601,7 +15854,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account2, task2) => {
|
|
|
15601
15854
|
};
|
|
15602
15855
|
}, "taskView");
|
|
15603
15856
|
|
|
15604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15857
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
15605
15858
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
15606
15859
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
15607
15860
|
if (title !== void 0 || set !== 1)
|
|
@@ -15786,7 +16039,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
15786
16039
|
};
|
|
15787
16040
|
}, "topicsService");
|
|
15788
16041
|
|
|
15789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
15790
16043
|
import { createHash as createHash12, randomUUID as randomUUID5 } from "node:crypto";
|
|
15791
16044
|
var hash2 = /* @__PURE__ */ __name((value) => createHash12("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
15792
16045
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -15860,7 +16113,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
15860
16113
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
15861
16114
|
}, "prepareEvidencePacket");
|
|
15862
16115
|
|
|
15863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16116
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
15864
16117
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat, limit, before: before2 }, messenger = {}) => {
|
|
15865
16118
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
15866
16119
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -15880,7 +16133,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account2, { chat,
|
|
|
15880
16133
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
15881
16134
|
}, "readEvidencePacket");
|
|
15882
16135
|
|
|
15883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
15884
16137
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
15885
16138
|
let before2 = Number.POSITIVE_INFINITY;
|
|
15886
16139
|
for (; ; ) {
|
|
@@ -15942,7 +16195,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
15942
16195
|
return { ...result, selection };
|
|
15943
16196
|
}, "searchMeetingHits");
|
|
15944
16197
|
|
|
15945
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-links.js
|
|
15946
16199
|
var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
15947
16200
|
const { maxMessages, url, ...selecting } = request;
|
|
15948
16201
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -15981,10 +16234,10 @@ var readMeetingLinks = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
15981
16234
|
};
|
|
15982
16235
|
}, "readMeetingLinks");
|
|
15983
16236
|
|
|
15984
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
15985
16238
|
import { createHash as createHash13 } from "node:crypto";
|
|
15986
16239
|
|
|
15987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-validation.js
|
|
15988
16241
|
function invalid5(field, response = false) {
|
|
15989
16242
|
throw new CliError(response ? "invalid_response" : "validation_error", `invalid project candidate ${field}`);
|
|
15990
16243
|
}
|
|
@@ -16103,7 +16356,7 @@ var candidateCatalog = /* @__PURE__ */ __name((catalog, limits) => {
|
|
|
16103
16356
|
}
|
|
16104
16357
|
}, "candidateCatalog");
|
|
16105
16358
|
|
|
16106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidates.js
|
|
16107
16360
|
var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
16108
16361
|
const fixed = snapshotMeetingScope(scope);
|
|
16109
16362
|
if (!Number.isSafeInteger(accountId) || accountId < 1 || typeof ports?.vocabulary?.vocabulary !== "function")
|
|
@@ -16156,7 +16409,7 @@ var createMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, account
|
|
|
16156
16409
|
};
|
|
16157
16410
|
}, "createMeetingProjectCandidateReader");
|
|
16158
16411
|
|
|
16159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
16160
16413
|
import { createHash as createHash14 } from "node:crypto";
|
|
16161
16414
|
var scopeKeys = [
|
|
16162
16415
|
"accountId",
|
|
@@ -16291,7 +16544,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
16291
16544
|
};
|
|
16292
16545
|
}, "readMeetingProjectDiscovery");
|
|
16293
16546
|
|
|
16294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-review.js
|
|
16295
16548
|
var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
16296
16549
|
const { limit, ...selecting } = request;
|
|
16297
16550
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -16299,7 +16552,7 @@ var readMeetingReview = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
16299
16552
|
return { ...review, selection };
|
|
16300
16553
|
}, "readMeetingReview");
|
|
16301
16554
|
|
|
16302
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-searches.js
|
|
16303
16556
|
var KIND = ["meetings-search"];
|
|
16304
16557
|
var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
16305
16558
|
const found = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -16329,7 +16582,7 @@ var meetingSearchesService = /* @__PURE__ */ __name((searches) => {
|
|
|
16329
16582
|
};
|
|
16330
16583
|
}, "meetingSearchesService");
|
|
16331
16584
|
|
|
16332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-stats.js
|
|
16333
16586
|
var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
16334
16587
|
const { timeZone, maxRows, ...selecting } = request;
|
|
16335
16588
|
const { input, selection } = await resolveMeetingSelection(store, selecting);
|
|
@@ -16341,7 +16594,7 @@ var readMeetingStats = /* @__PURE__ */ __name(async (store, request) => {
|
|
|
16341
16594
|
return { ...stats, selection };
|
|
16342
16595
|
}, "readMeetingStats");
|
|
16343
16596
|
|
|
16344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16597
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
16345
16598
|
import { createHash as createHash15 } from "node:crypto";
|
|
16346
16599
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
16347
16600
|
ref: cue.reference,
|
|
@@ -16459,7 +16712,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
16459
16712
|
return { ...packet, fingerprint: createHash15("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
16460
16713
|
}, "readMeetingHitContext");
|
|
16461
16714
|
|
|
16462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
16463
16716
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
16464
16717
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
16465
16718
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -16535,7 +16788,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
16535
16788
|
return { packet, content };
|
|
16536
16789
|
}, "readMeetingPassage");
|
|
16537
16790
|
|
|
16538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-batch.js
|
|
16539
16792
|
var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
16540
16793
|
if (!Number.isSafeInteger(accountId) || accountId < 1)
|
|
16541
16794
|
throw new CliError("validation_error", "choose a positive meeting account");
|
|
@@ -16549,10 +16802,10 @@ var createMeetingBatchReader = /* @__PURE__ */ __name((store, accountId) => {
|
|
|
16549
16802
|
};
|
|
16550
16803
|
}, "createMeetingBatchReader");
|
|
16551
16804
|
|
|
16552
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
16553
16806
|
import { createHash as createHash16 } from "node:crypto";
|
|
16554
16807
|
|
|
16555
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16808
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
16556
16809
|
var positive2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
16557
16810
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
16558
16811
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -16704,7 +16957,7 @@ var applyMeetingEmbedding = /* @__PURE__ */ __name(async (store, accountId, embe
|
|
|
16704
16957
|
};
|
|
16705
16958
|
}, "applyMeetingEmbedding");
|
|
16706
16959
|
|
|
16707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16960
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-combined.js
|
|
16708
16961
|
var DEPTH = 200;
|
|
16709
16962
|
var cursorOf3 = /* @__PURE__ */ __name((value, key) => {
|
|
16710
16963
|
if (value === void 0)
|
|
@@ -16841,7 +17094,7 @@ var searchMeetingsCombined = /* @__PURE__ */ __name(async (store, embedder, type
|
|
|
16841
17094
|
};
|
|
16842
17095
|
}, "searchMeetingsCombined");
|
|
16843
17096
|
|
|
16844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-context.js
|
|
16845
17098
|
var meetingReferences = /* @__PURE__ */ __name((values) => values.map((value) => formatMeetingReference(parseMeetingReference(value))), "meetingReferences");
|
|
16846
17099
|
var checkCancelled = /* @__PURE__ */ __name((signal) => {
|
|
16847
17100
|
if (!signal?.aborted)
|
|
@@ -16946,7 +17199,7 @@ var createMeetingContextService = /* @__PURE__ */ __name(async (store, input, op
|
|
|
16946
17199
|
};
|
|
16947
17200
|
}, "createMeetingContextService");
|
|
16948
17201
|
|
|
16949
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-model.js
|
|
16950
17203
|
var integer2 = /* @__PURE__ */ __name((value, name, max) => {
|
|
16951
17204
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
16952
17205
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -17173,7 +17426,7 @@ var openMeetingEmbedder = /* @__PURE__ */ __name(async (choice, options = {}) =>
|
|
|
17173
17426
|
};
|
|
17174
17427
|
}, "openMeetingEmbedder");
|
|
17175
17428
|
|
|
17176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17429
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
17177
17430
|
var communicationFields = {
|
|
17178
17431
|
sources: pipe(array(strictObject({
|
|
17179
17432
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -17205,7 +17458,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
17205
17458
|
return { ...input, after, before: before2 };
|
|
17206
17459
|
}, "communicationRequest");
|
|
17207
17460
|
|
|
17208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17461
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
17209
17462
|
var MEETING_PREPARATION_LIMITS = {
|
|
17210
17463
|
meetings: { min: 1, max: 20, default: 5 },
|
|
17211
17464
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -17291,7 +17544,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
17291
17544
|
return { ...input, history };
|
|
17292
17545
|
}, "preparationRequest");
|
|
17293
17546
|
|
|
17294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
17295
17548
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
17296
17549
|
const section = {
|
|
17297
17550
|
readUsage: plan.reader.usage(),
|
|
@@ -17396,7 +17649,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read) => {
|
|
|
17396
17649
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
17397
17650
|
}, "appendPreparationCommunications");
|
|
17398
17651
|
|
|
17399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17652
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
17400
17653
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
17401
17654
|
if (port === void 0)
|
|
17402
17655
|
return void 0;
|
|
@@ -17501,7 +17754,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
17501
17754
|
}
|
|
17502
17755
|
}, "validatePreparationCommunications");
|
|
17503
17756
|
|
|
17504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
17505
17758
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
17506
17759
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
17507
17760
|
}, "invalid");
|
|
@@ -17570,7 +17823,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
17570
17823
|
}
|
|
17571
17824
|
}, "appendKnowledgePreparation");
|
|
17572
17825
|
|
|
17573
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
17574
17827
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
17575
17828
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
17576
17829
|
}, "invalid");
|
|
@@ -17644,7 +17897,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
17644
17897
|
}
|
|
17645
17898
|
}, "appendNotesPreparation");
|
|
17646
17899
|
|
|
17647
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
17648
17901
|
var PAGE_LIMIT = 4;
|
|
17649
17902
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
17650
17903
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -17694,7 +17947,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
17694
17947
|
}
|
|
17695
17948
|
}, "appendProjectPreparation");
|
|
17696
17949
|
|
|
17697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
17698
17951
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
17699
17952
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
17700
17953
|
return;
|
|
@@ -17766,7 +18019,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
17766
18019
|
}
|
|
17767
18020
|
}, "appendRelatedPreparation");
|
|
17768
18021
|
|
|
17769
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
17770
18023
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
17771
18024
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
17772
18025
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -17904,7 +18157,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
17904
18157
|
};
|
|
17905
18158
|
}, "createMeetingPreparationService");
|
|
17906
18159
|
|
|
17907
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-task-proposal.js
|
|
17908
18161
|
import { createHash as createHash17 } from "node:crypto";
|
|
17909
18162
|
var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, reference, kind) => {
|
|
17910
18163
|
if (!TASK_KINDS.includes(kind))
|
|
@@ -17924,7 +18177,7 @@ var proposeMeetingTask = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
17924
18177
|
};
|
|
17925
18178
|
}, "proposeMeetingTask");
|
|
17926
18179
|
|
|
17927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/meeting-tasks.js
|
|
17928
18181
|
var accountSnapshot = /* @__PURE__ */ __name((key) => {
|
|
17929
18182
|
const { provider, account: account2, scope } = key;
|
|
17930
18183
|
if (!provider.trim() || provider.includes(":") || !account2.trim())
|
|
@@ -17987,7 +18240,7 @@ var readMeetingTask = /* @__PURE__ */ __name(async (store, account2, id2) => {
|
|
|
17987
18240
|
}
|
|
17988
18241
|
}, "readMeetingTask");
|
|
17989
18242
|
|
|
17990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
17991
18244
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check }, ports) => {
|
|
17992
18245
|
const installer = ports.installer();
|
|
17993
18246
|
const argv = updateCommand(installer, packageName);
|
|
@@ -18052,7 +18305,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
18052
18305
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
18053
18306
|
}, "dayAfter");
|
|
18054
18307
|
|
|
18055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18308
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
18056
18309
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
18057
18310
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2) => {
|
|
18058
18311
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -18081,7 +18334,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2) => {
|
|
|
18081
18334
|
return { proposal: await store.proposedActions.approve(proposal.id, { task: task2.id }), task: task2 };
|
|
18082
18335
|
}, "approveAsTask");
|
|
18083
18336
|
|
|
18084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidate-validation.js
|
|
18085
18338
|
var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, options) => {
|
|
18086
18339
|
const invalid8 = /* @__PURE__ */ __name((field) => {
|
|
18087
18340
|
throw new CliError("validation_error", `invalid stored project candidate ${field}`);
|
|
@@ -18123,7 +18376,7 @@ var storedCandidateRequest = /* @__PURE__ */ __name((reference, accountId, optio
|
|
|
18123
18376
|
return { reference, limits, after, afterTranscriptId, signal };
|
|
18124
18377
|
}, "storedCandidateRequest");
|
|
18125
18378
|
|
|
18126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/stored-meeting-project-candidates.js
|
|
18127
18380
|
var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
18128
18381
|
const fixed = snapshotMeetingScope(scope);
|
|
18129
18382
|
const store = ports?.meetings;
|
|
@@ -18215,7 +18468,7 @@ var createStoredMeetingProjectCandidateReader = /* @__PURE__ */ __name((scope, a
|
|
|
18215
18468
|
};
|
|
18216
18469
|
}, "createStoredMeetingProjectCandidateReader");
|
|
18217
18470
|
|
|
18218
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18471
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.507.0_@wirecat+cli-base@0.68.0_commander@15.0.0_esbuild@0.28.2_type_438c1bd9283d857a9e801e9b977bafec/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
18219
18472
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
18220
18473
|
const pictures = picturesService(deps);
|
|
18221
18474
|
const base = {
|
|
@@ -18284,6 +18537,8 @@ export {
|
|
|
18284
18537
|
storedNeighbours,
|
|
18285
18538
|
gatherProjectEvidence,
|
|
18286
18539
|
findEvidenceMentions,
|
|
18540
|
+
canonicalProjectRef,
|
|
18541
|
+
gatherStoredProject,
|
|
18287
18542
|
throughWrapper,
|
|
18288
18543
|
capability,
|
|
18289
18544
|
accountService,
|