@wirecat/cli-memo 0.131.58 → 0.131.59
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/memo.js +2 -2
- package/dist/bundle/{all-profiles-XWRUFNP2.js → all-profiles-LHATPBN3.js} +5 -5
- package/dist/bundle/{anthropic-266QJJGV.js → anthropic-ZCFY7X3V.js} +3 -3
- package/dist/bundle/{app-server-YV3D7PPC.js → app-server-LMNKI46N.js} +35 -35
- package/dist/bundle/auto-MWAOY7KC.js +86 -0
- package/dist/bundle/{bun-22MM6T54.js → bun-Z5XDW2UR.js} +2 -2
- package/dist/bundle/{bun-sqlite-V73FFF2C.js → bun-sqlite-GC55XSRP.js} +2 -2
- package/dist/bundle/{chunk-FU3XDL34.js → chunk-2ALNQ3ZG.js} +5 -5
- package/dist/bundle/{chunk-4XKHXETB.js → chunk-3HX5I5KX.js} +726 -517
- package/dist/bundle/{chunk-TB4IRRAC.js → chunk-3L6SQL6I.js} +1 -1
- package/dist/bundle/{chunk-2LPPNYOZ.js → chunk-4JBR277T.js} +1 -1
- package/dist/bundle/{chunk-RTROEIYE.js → chunk-5QRRSPCL.js} +2 -2
- package/dist/bundle/{chunk-V4BKQWDS.js → chunk-775KV34P.js} +227 -187
- package/dist/bundle/{chunk-NSYTJAL6.js → chunk-7FAFZQYC.js} +4 -4
- package/dist/bundle/{chunk-NEWKSMXP.js → chunk-7FY7DHFV.js} +2 -2
- package/dist/bundle/{chunk-5T7BFCDJ.js → chunk-7H45WVOV.js} +5 -5
- package/dist/bundle/{chunk-PBVG3KJR.js → chunk-7IMLRFCG.js} +3 -3
- package/dist/bundle/{chunk-F5DOQOCK.js → chunk-A6HTI2EV.js} +12 -12
- package/dist/bundle/{chunk-PHWJBFZ6.js → chunk-ABLNLLM6.js} +31 -31
- package/dist/bundle/{chunk-XC6OYACL.js → chunk-AQ44SSA2.js} +13 -9
- package/dist/bundle/{chunk-3R6YNDPC.js → chunk-BFDN7ZRX.js} +5 -5
- package/dist/bundle/{chunk-RYDNM3K2.js → chunk-BIKOHAZH.js} +1 -1
- package/dist/bundle/{chunk-2CF2R7SA.js → chunk-CBNN7VP2.js} +6 -6
- package/dist/bundle/{chunk-CQPMBTB6.js → chunk-CQ7NDIKS.js} +1 -1
- package/dist/bundle/{chunk-DQWHLOKG.js → chunk-ENVEZQ2F.js} +4 -4
- package/dist/bundle/{chunk-XLYMVYMU.js → chunk-EXIFPE4R.js} +22 -4
- package/dist/bundle/{chunk-MV6ZSBA3.js → chunk-FHTIB66O.js} +256 -256
- package/dist/bundle/{chunk-N2TGYTKE.js → chunk-FYG52VXO.js} +1 -1
- package/dist/bundle/{chunk-OROO3KYQ.js → chunk-GKRSFUAN.js} +1 -1
- package/dist/bundle/{chunk-72ZEEKOJ.js → chunk-HBY2VTP6.js} +3 -3
- package/dist/bundle/{chunk-GBOES7QS.js → chunk-HPMEODWD.js} +2 -2
- package/dist/bundle/{chunk-FG7ZGEZ6.js → chunk-IKMCUKAE.js} +4 -4
- package/dist/bundle/{chunk-6FABO4WB.js → chunk-IRFXP5R5.js} +1 -1
- package/dist/bundle/{chunk-BRT6M2TW.js → chunk-JCHC5EEV.js} +4 -4
- package/dist/bundle/{chunk-IY7GB2SJ.js → chunk-KG6HO3XP.js} +2 -2
- package/dist/bundle/{chunk-PE7RYCI4.js → chunk-LWVCZPQF.js} +12 -12
- package/dist/bundle/{chunk-HVHUHYNF.js → chunk-M36WYT62.js} +1 -1
- package/dist/bundle/{chunk-ONJNZ2RJ.js → chunk-M4C4PD6O.js} +1 -1
- package/dist/bundle/{chunk-XXOWA66S.js → chunk-MF3B3UAK.js} +32 -21
- package/dist/bundle/{chunk-EUE76Q4D.js → chunk-MIJKJNIA.js} +3 -3
- package/dist/bundle/{chunk-RJWL3NEL.js → chunk-MTIAWKHJ.js} +1 -1
- package/dist/bundle/{chunk-BLCYVRW3.js → chunk-N57QFHPJ.js} +7 -7
- package/dist/bundle/{chunk-WKMLLL2F.js → chunk-NQBV7NNO.js} +49 -49
- package/dist/bundle/{chunk-EQQIUVLP.js → chunk-OD5IBWOB.js} +4 -4
- package/dist/bundle/{chunk-KZDKFYIF.js → chunk-PPJXTU54.js} +156 -151
- package/dist/bundle/{chunk-Z6RSOFHK.js → chunk-PPZCQ6DC.js} +2 -2
- package/dist/bundle/{chunk-L3GFAQFP.js → chunk-PQEJBESM.js} +21 -21
- package/dist/bundle/{chunk-NDCURVJS.js → chunk-ROYHEBF4.js} +4 -4
- package/dist/bundle/{chunk-VEDOHZEU.js → chunk-SB44NDKV.js} +7 -7
- package/dist/bundle/{chunk-YTAQKOAW.js → chunk-SJAX32ZF.js} +1 -1
- package/dist/bundle/{chunk-4K2ECEHT.js → chunk-SK3GNZFF.js} +10 -10
- package/dist/bundle/{chunk-D7FZIH5H.js → chunk-TWHA3OB2.js} +9 -9
- package/dist/bundle/{chunk-XEQPZBIH.js → chunk-UQWLLRYP.js} +1 -1
- package/dist/bundle/{chunk-XIZPMFEC.js → chunk-UTCOTLJP.js} +4 -4
- package/dist/bundle/{chunk-6WWF4RST.js → chunk-UTLAFKFU.js} +412 -355
- package/dist/bundle/{chunk-5FYDQEM7.js → chunk-V5E55COY.js} +5 -5
- package/dist/bundle/{chunk-G3QR3IYN.js → chunk-W6HT56DV.js} +8 -8
- package/dist/bundle/{chunk-JYUNAC6P.js → chunk-WFF7X6LI.js} +6 -6
- package/dist/bundle/{chunk-ATEHG5O6.js → chunk-WJ3VJYM4.js} +2 -2
- package/dist/bundle/{chunk-QLCPRKFK.js → chunk-XGR7ND66.js} +28 -28
- package/dist/bundle/{chunk-3BWYMNWP.js → chunk-YA7YYH3E.js} +1 -1
- package/dist/bundle/{chunk-3N7LEJRT.js → chunk-YO4PT3MD.js} +1 -1
- package/dist/bundle/{chunk-HJWWZXVG.js → chunk-Z2R4SK5Q.js} +1 -1
- package/dist/bundle/{chunk-DUBGCFRO.js → chunk-ZELDY6H4.js} +2 -2
- package/dist/bundle/{command-contract-DKK56GZX.js → command-contract-XKSGEPXG.js} +11 -11
- package/dist/bundle/{decode-JHVAOF3N.js → decode-6PPIALX2.js} +2 -2
- package/dist/bundle/{echarts-KCOXA225.js → echarts-XQ7T6SKK.js} +2 -2
- package/dist/bundle/{embed-4NYYOVNS.js → embed-W56IWO4I.js} +3 -3
- package/dist/bundle/{embedder-SHPWEDIQ.js → embedder-IWJHHYLE.js} +6 -6
- package/dist/bundle/{entry-VZE4CVPX.js → entry-OZSQA6IT.js} +4 -4
- package/dist/bundle/failure-2V4YXERK.js +66 -0
- package/dist/bundle/{first-run-EKXME7UK.js → first-run-LT5QD4MA.js} +5 -5
- package/dist/bundle/{first-screen-QS5PVWDZ.js → first-screen-IMWQP24U.js} +12 -12
- package/dist/bundle/{instructions-ER3ONEOR.js → instructions-DHUIJMK4.js} +1 -1
- package/dist/bundle/{mcp-3ABYEJI3.js → mcp-3X7LMJSZ.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-DBZKVPDA.js → node-BSK32EM3.js} +2 -2
- package/dist/bundle/{node-sqlite-UZVU7EXS.js → node-sqlite-SYF7X36U.js} +3 -3
- package/dist/bundle/{oauth-VEFHKRWG.js → oauth-ZEWUPRPD.js} +4 -4
- package/dist/bundle/{open-XNRAMLOK.js → open-4EKQE47K.js} +2 -2
- package/dist/bundle/{openai-4XIX5RN2.js → openai-UGNJPON6.js} +7 -7
- package/dist/bundle/{process-EIGF77RB.js → process-KQ5PLFEX.js} +1 -1
- package/dist/bundle/{program-OM6GO5X2.js → program-WSVJK4LB.js} +82 -60
- package/dist/bundle/{prompt-V7RFTWTA.js → prompt-KA6BE6HG.js} +4 -2
- package/dist/bundle/{recognize-7PWWI67V.js → recognize-ZM75USNS.js} +1 -1
- package/dist/bundle/{remote-NOKKQ2U5.js → remote-I5MIVEGH.js} +4 -4
- package/dist/bundle/{rerank-X7UWX2ZF.js → rerank-46KI3363.js} +4 -4
- package/dist/bundle/{serve-Z6YCLXXP.js → serve-QE4CSBAB.js} +6 -6
- package/dist/bundle/{server-KHFBSBCY.js → server-EFNICTJC.js} +50 -50
- package/dist/bundle/server-J3VKU7NQ.js +48 -0
- package/dist/bundle/server-MLOQ4RS7.js +61 -0
- package/dist/bundle/{state-K5D3BMKT.js → state-2W2BFTG7.js} +3 -3
- package/dist/bundle/{store-6SZBCSUF.js → store-M4Q4BIDW.js} +14 -9
- package/dist/bundle/store-maintenance-command-KYCDTJQ2.js +48 -0
- package/dist/bundle/update-JEYA6GXL.js +69 -0
- package/dist/examples.js +1 -1
- package/dist/examples.js.map +1 -1
- package/dist/knowledge/relationships-scan.d.ts.map +1 -1
- package/dist/knowledge/relationships-scan.js +23 -2
- package/dist/knowledge/relationships-scan.js.map +1 -1
- package/dist/review/review.d.ts +1 -1
- package/dist/review/review.d.ts.map +1 -1
- package/dist/review/review.js +5 -0
- package/dist/review/review.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/cli-memo/topics/projects.md +1 -1
- package/dist/bundle/auto-3TXQDVO6.js +0 -86
- package/dist/bundle/failure-HKKLVEZA.js +0 -66
- package/dist/bundle/server-AXMJBL6J.js +0 -61
- package/dist/bundle/server-KABSY3RL.js +0 -48
- package/dist/bundle/store-maintenance-command-GTMZOLMZ.js +0 -48
- package/dist/bundle/update-DT4DCRXS.js +0 -69
- /package/dist/bundle/{chunk-SO2HNIPX.js → chunk-DZ2GIEEY.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A6HTI2EV.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
CustomTextModelShape,
|
|
@@ -53,16 +53,17 @@ import {
|
|
|
53
53
|
vectorModelKey,
|
|
54
54
|
withAttempt,
|
|
55
55
|
writeTextModelsSection
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-PPJXTU54.js";
|
|
57
57
|
import {
|
|
58
58
|
isNewer,
|
|
59
59
|
updateCommand
|
|
60
60
|
} from "./chunk-ASWLM74P.js";
|
|
61
61
|
import {
|
|
62
62
|
readOnlyLockOf
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-YA7YYH3E.js";
|
|
64
64
|
import {
|
|
65
65
|
AGENDA_COLUMNS,
|
|
66
|
+
BUSINESS_FIND_MAX,
|
|
66
67
|
CHAT_COLUMNS,
|
|
67
68
|
CHAT_LIST_KEY,
|
|
68
69
|
CHUNK_CHARS,
|
|
@@ -171,7 +172,7 @@ import {
|
|
|
171
172
|
validateFields,
|
|
172
173
|
waitingPointer,
|
|
173
174
|
withoutField
|
|
174
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-3HX5I5KX.js";
|
|
175
176
|
import {
|
|
176
177
|
EVENT_QUERY,
|
|
177
178
|
MEETING_FIELD_NAMES,
|
|
@@ -227,28 +228,28 @@ import {
|
|
|
227
228
|
validateQuery,
|
|
228
229
|
walkQuery,
|
|
229
230
|
zonedMoment
|
|
230
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-775KV34P.js";
|
|
231
232
|
import {
|
|
232
233
|
damagedFile,
|
|
233
234
|
isCliFailure,
|
|
234
235
|
sqliteCode
|
|
235
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-KG6HO3XP.js";
|
|
236
237
|
import {
|
|
237
238
|
DEFAULT_STEMMERS,
|
|
238
239
|
createStemmer,
|
|
239
240
|
fold,
|
|
240
241
|
normalize
|
|
241
|
-
} from "./chunk-
|
|
242
|
+
} from "./chunk-SB44NDKV.js";
|
|
242
243
|
import {
|
|
243
244
|
DEFAULT_TASK_CATEGORIES,
|
|
244
245
|
FALLBACK_CATEGORY
|
|
245
|
-
} from "./chunk-
|
|
246
|
+
} from "./chunk-ROYHEBF4.js";
|
|
246
247
|
import {
|
|
247
248
|
MAX_MODEL_IMAGE_BYTES
|
|
248
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-M36WYT62.js";
|
|
249
250
|
import {
|
|
250
251
|
remoteKey
|
|
251
|
-
} from "./chunk-
|
|
252
|
+
} from "./chunk-7FY7DHFV.js";
|
|
252
253
|
import {
|
|
253
254
|
Unzip,
|
|
254
255
|
UnzipInflate,
|
|
@@ -259,15 +260,15 @@ import {
|
|
|
259
260
|
placedText,
|
|
260
261
|
runEmbedders,
|
|
261
262
|
textModelsDirectory
|
|
262
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-2ALNQ3ZG.js";
|
|
263
264
|
import {
|
|
264
265
|
installFiles,
|
|
265
266
|
megabytes
|
|
266
|
-
} from "./chunk-
|
|
267
|
+
} from "./chunk-HBY2VTP6.js";
|
|
267
268
|
import {
|
|
268
269
|
storePath,
|
|
269
270
|
wirecatDirectory
|
|
270
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-GKRSFUAN.js";
|
|
271
272
|
import {
|
|
272
273
|
resolvePaths,
|
|
273
274
|
writeSecurely
|
|
@@ -16921,7 +16922,7 @@ var require_lib3 = __commonJS({
|
|
|
16921
16922
|
}
|
|
16922
16923
|
});
|
|
16923
16924
|
|
|
16924
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16925
16926
|
var RULES_VERSION = 5;
|
|
16926
16927
|
var LOOK_BACK = 50;
|
|
16927
16928
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -17011,10 +17012,10 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
17011
17012
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
17012
17013
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
17013
17014
|
|
|
17014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17015
17016
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17016
17017
|
|
|
17017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
17018
17019
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
17019
17020
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
17020
17021
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
@@ -17061,7 +17062,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
|
17061
17062
|
};
|
|
17062
17063
|
}, "explainDamage");
|
|
17063
17064
|
|
|
17064
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
17065
17066
|
import { existsSync, statSync } from "node:fs";
|
|
17066
17067
|
var JSON_COLUMNS = {
|
|
17067
17068
|
accounts: ["settings"],
|
|
@@ -17203,10 +17204,10 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
17203
17204
|
}
|
|
17204
17205
|
}, "storeHealth");
|
|
17205
17206
|
|
|
17206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
17207
17208
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
17208
17209
|
|
|
17209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17210
17211
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
17211
17212
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17212
17213
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17232,7 +17233,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
17232
17233
|
});
|
|
17233
17234
|
}, "previewProjectAnnotationSnapshot");
|
|
17234
17235
|
|
|
17235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17236
17237
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
17237
17238
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17238
17239
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17253,7 +17254,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
17253
17254
|
}
|
|
17254
17255
|
}, "snapshotProjectAnnotations");
|
|
17255
17256
|
|
|
17256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17257
17258
|
var COMMAND_NEEDS = {
|
|
17258
17259
|
"account update": ["updateProfile", "change the profile"],
|
|
17259
17260
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17303,7 +17304,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17303
17304
|
return group;
|
|
17304
17305
|
}, "hideNever");
|
|
17305
17306
|
|
|
17306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17307
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17307
17308
|
var AUDIT_PAGE = 200;
|
|
17308
17309
|
var AUDIT_BUDGET = 10;
|
|
17309
17310
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17383,7 +17384,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17383
17384
|
return found;
|
|
17384
17385
|
}, "burstJoins");
|
|
17385
17386
|
|
|
17386
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17387
17388
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17388
17389
|
command.allowUnknownOption();
|
|
17389
17390
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17403,7 +17404,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17403
17404
|
return command;
|
|
17404
17405
|
}, "queryWordsAfterOptions");
|
|
17405
17406
|
|
|
17406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17407
17408
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17408
17409
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17409
17410
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17445,7 +17446,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17445
17446
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17446
17447
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17447
17448
|
|
|
17448
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17449
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17449
17450
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17450
17451
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17451
17452
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17468,7 +17469,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17468
17469
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17469
17470
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17470
17471
|
|
|
17471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17472
17473
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17473
17474
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17474
17475
|
const zone = timezoneOf();
|
|
@@ -17554,7 +17555,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17554
17555
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17555
17556
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17556
17557
|
|
|
17557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17558
17559
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17559
17560
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17560
17561
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17698,7 +17699,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17698
17699
|
}, "addMeetingCommandsDefinition");
|
|
17699
17700
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17700
17701
|
|
|
17701
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17702
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17702
17703
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17703
17704
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17704
17705
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17731,8 +17732,8 @@ var listQuery = /* @__PURE__ */ __name((text2, registry, command, { defaultField
|
|
|
17731
17732
|
const typed = parsed && withTomorrow(parsed, registry);
|
|
17732
17733
|
if (typed)
|
|
17733
17734
|
validateQuery(typed, registry, context2);
|
|
17734
|
-
const
|
|
17735
|
-
const defaults = (registry.defaults ?? []).filter((term) => !
|
|
17735
|
+
const named4 = typed ? fieldsNamed(typed) : /* @__PURE__ */ new Set();
|
|
17736
|
+
const defaults = (registry.defaults ?? []).filter((term) => !named4.has(term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "")).map((term) => parseLucene(term, { defaultField: "none", ...context2 }).root);
|
|
17736
17737
|
const roots = [...typed ? [typed.root] : [], ...defaults];
|
|
17737
17738
|
if (roots.length === 0)
|
|
17738
17739
|
return void 0;
|
|
@@ -17831,7 +17832,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17831
17832
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17832
17833
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17833
17834
|
|
|
17834
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17835
17836
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17836
17837
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17837
17838
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17840,7 +17841,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17840
17841
|
var withPaging = /* @__PURE__ */ __name((command) => command.option("--limit <n>", "how many to show", positiveCount("--limit")).option("--page <n>", "which page, starting at 1", positiveCount("--page")).option("--all", "every row, no paging"), "withPaging");
|
|
17841
17842
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17842
17843
|
|
|
17843
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17844
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17844
17845
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17845
17846
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17846
17847
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18102,7 +18103,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18102
18103
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18103
18104
|
}), "sessionAnswer");
|
|
18104
18105
|
|
|
18105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18106
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18106
18107
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18107
18108
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18108
18109
|
if (key in own)
|
|
@@ -18119,12 +18120,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18119
18120
|
return found.bind(adapter);
|
|
18120
18121
|
}, "capability");
|
|
18121
18122
|
|
|
18122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18123
18124
|
import { randomBytes } from "node:crypto";
|
|
18124
18125
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18125
18126
|
var newOperationId = newSendId;
|
|
18126
18127
|
|
|
18127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18128
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18128
18129
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18129
18130
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18130
18131
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18199,7 +18200,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
18199
18200
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
18200
18201
|
}, "storeOnlyDeps");
|
|
18201
18202
|
|
|
18202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18203
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18203
18204
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18204
18205
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18205
18206
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -18222,10 +18223,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
18222
18223
|
}
|
|
18223
18224
|
}, "patiently");
|
|
18224
18225
|
|
|
18225
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18226
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18226
18227
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18227
18228
|
|
|
18228
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18229
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18229
18230
|
var REQUEST_MS = 400;
|
|
18230
18231
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18231
18232
|
const lowest = ranges[0];
|
|
@@ -18248,13 +18249,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18248
18249
|
};
|
|
18249
18250
|
}, "estimateBackfill");
|
|
18250
18251
|
|
|
18251
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18252
18253
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18253
18254
|
...error,
|
|
18254
18255
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18255
18256
|
}), "withRecovery");
|
|
18256
18257
|
|
|
18257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18258
18259
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18259
18260
|
if (isCliFailure(error))
|
|
18260
18261
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18337,7 +18338,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18337
18338
|
};
|
|
18338
18339
|
}, "mergeBatches");
|
|
18339
18340
|
|
|
18340
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18341
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18341
18342
|
var TAKES = {
|
|
18342
18343
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18343
18344
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18397,7 +18398,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18397
18398
|
throw wrongAccount(reference, scope, profiles);
|
|
18398
18399
|
}, "ensureAccount");
|
|
18399
18400
|
|
|
18400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18401
18402
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18402
18403
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18403
18404
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18413,9 +18414,9 @@ var pickPerson = /* @__PURE__ */ __name((reference, people) => {
|
|
|
18413
18414
|
const trimmed = reference.trim();
|
|
18414
18415
|
const contact = contactReferenceOf(trimmed, people.provider);
|
|
18415
18416
|
if (contact !== void 0) {
|
|
18416
|
-
const
|
|
18417
|
-
if (
|
|
18418
|
-
return
|
|
18417
|
+
const named4 = people.get(contact);
|
|
18418
|
+
if (named4)
|
|
18419
|
+
return named4;
|
|
18419
18420
|
throw new CliError("not_found", `no person ${contact} in what this account has seen`);
|
|
18420
18421
|
}
|
|
18421
18422
|
const known2 = people.get(trimmed);
|
|
@@ -18442,7 +18443,7 @@ ${lines3}`, { candidates });
|
|
|
18442
18443
|
}, "ambiguous");
|
|
18443
18444
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18444
18445
|
|
|
18445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18446
18447
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18447
18448
|
if (deps.reads !== "store")
|
|
18448
18449
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18515,11 +18516,11 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, {
|
|
|
18515
18516
|
if (messenger.savedChatId && ["me", "self", "saved"].includes(trimmed.toLowerCase())) {
|
|
18516
18517
|
return messenger.savedChatId(account);
|
|
18517
18518
|
}
|
|
18518
|
-
const
|
|
18519
|
-
if (
|
|
18520
|
-
await ensureAccount(
|
|
18521
|
-
if (
|
|
18522
|
-
const typed =
|
|
18519
|
+
const named4 = chatReferenceOf(trimmed, account.provider);
|
|
18520
|
+
if (named4)
|
|
18521
|
+
await ensureAccount(named4, { account: account.account }, profilesOn);
|
|
18522
|
+
if (named4 || /^-?\d+$/.test(trimmed)) {
|
|
18523
|
+
const typed = named4?.chat ?? trimmed;
|
|
18523
18524
|
const id2 = await renamed2(typed) ?? typed;
|
|
18524
18525
|
if (await left?.(id2))
|
|
18525
18526
|
throw new CliError("not_found", `you left chat ${id2}`);
|
|
@@ -18601,7 +18602,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18601
18602
|
}
|
|
18602
18603
|
}, "senderAmong");
|
|
18603
18604
|
|
|
18604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18605
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18605
18606
|
var CONTEXT_MESSAGES = 3;
|
|
18606
18607
|
var CONTEXT_MINUTES = 10;
|
|
18607
18608
|
var MAX_CHARS = 1200;
|
|
@@ -18625,12 +18626,12 @@ var context = {
|
|
|
18625
18626
|
}, "describe")
|
|
18626
18627
|
};
|
|
18627
18628
|
|
|
18628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18629
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18629
18630
|
var BUILT_INS = [context];
|
|
18630
18631
|
var providers = [...BUILT_INS];
|
|
18631
18632
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18632
18633
|
|
|
18633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18634
18635
|
var READ_PAGE = 5e3;
|
|
18635
18636
|
var CHAIN = 50;
|
|
18636
18637
|
var CONVERSATION_QUERY = {
|
|
@@ -18782,7 +18783,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
18782
18783
|
return size4;
|
|
18783
18784
|
}, "sized");
|
|
18784
18785
|
|
|
18785
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18786
18787
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18787
18788
|
var MESSAGE_PAGE = 5e3;
|
|
18788
18789
|
var PER_SESSION = 8;
|
|
@@ -18801,7 +18802,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
18801
18802
|
price: remote.price,
|
|
18802
18803
|
installed: true,
|
|
18803
18804
|
perBatch: PER_REQUEST * concurrency,
|
|
18804
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18805
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-I5MIVEGH.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18805
18806
|
};
|
|
18806
18807
|
}
|
|
18807
18808
|
const model = textModel(choice, deps.env);
|
|
@@ -18818,7 +18819,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = chosenTextModel(dep
|
|
|
18818
18819
|
if (!isTextModelInstalled(model, directory2))
|
|
18819
18820
|
throw notDownloaded(model.id);
|
|
18820
18821
|
if (apart) {
|
|
18821
|
-
const { openProcess } = await import("./process-
|
|
18822
|
+
const { openProcess } = await import("./process-KQ5PLFEX.js");
|
|
18822
18823
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18823
18824
|
}
|
|
18824
18825
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19107,7 +19108,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19107
19108
|
return { ...one2, state };
|
|
19108
19109
|
}, "shaped");
|
|
19109
19110
|
|
|
19110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19111
19112
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19112
19113
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19113
19114
|
for (const [key, value, maximum] of [
|
|
@@ -19160,7 +19161,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19160
19161
|
}
|
|
19161
19162
|
}, "catchUpSearch");
|
|
19162
19163
|
|
|
19163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19164
19165
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19165
19166
|
if (deps.reads === "store") {
|
|
19166
19167
|
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`);
|
|
@@ -19199,9 +19200,9 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
19199
19200
|
const store = await deps.store();
|
|
19200
19201
|
const account = await deps.account();
|
|
19201
19202
|
if (chats !== void 0 && chats.length > 0) {
|
|
19202
|
-
const
|
|
19203
|
+
const named4 = await Promise.all(chats.map((chat) => storedChatId(deps.messenger, chat, store, account, { includeLeft: true })));
|
|
19203
19204
|
const titles = new Map((await store.chats.chatStats(account)).map((one2) => [one2.chatId, one2.title]));
|
|
19204
|
-
return { account, chats: [...new Set(
|
|
19205
|
+
return { account, chats: [...new Set(named4)].map((id2) => ({ id: id2, title: titles.get(id2) ?? null })) };
|
|
19205
19206
|
}
|
|
19206
19207
|
const stored = (await store.chats.chats(account, {})).items;
|
|
19207
19208
|
return {
|
|
@@ -19526,7 +19527,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19526
19527
|
return message?.timestamp ?? fallback;
|
|
19527
19528
|
}, "timeOfKey");
|
|
19528
19529
|
|
|
19529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19530
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19530
19531
|
var LINKS = /https?:\/\/\S+/g;
|
|
19531
19532
|
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");
|
|
19532
19533
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19556,7 +19557,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19556
19557
|
});
|
|
19557
19558
|
}, "questions");
|
|
19558
19559
|
|
|
19559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19560
19561
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19561
19562
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19562
19563
|
const name = typed.trim().toLowerCase();
|
|
@@ -19613,7 +19614,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19613
19614
|
return best.name;
|
|
19614
19615
|
}, "categorize");
|
|
19615
19616
|
|
|
19616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19617
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19617
19618
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19618
19619
|
var RULES_IN = {
|
|
19619
19620
|
dialog: "all",
|
|
@@ -19819,7 +19820,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19819
19820
|
return passes;
|
|
19820
19821
|
}, "applyTaskRulesToChats");
|
|
19821
19822
|
|
|
19822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19823
19824
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19824
19825
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19825
19826
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -19883,7 +19884,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19883
19884
|
}
|
|
19884
19885
|
}, "validateContextEvidencePage");
|
|
19885
19886
|
|
|
19886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19887
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19887
19888
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19888
19889
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19889
19890
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19936,7 +19937,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19936
19937
|
};
|
|
19937
19938
|
}, "contextReadBudget");
|
|
19938
19939
|
|
|
19939
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19940
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
19940
19941
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19941
19942
|
if (!port || typeof port.read !== "function")
|
|
19942
19943
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19980,11 +19981,11 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19980
19981
|
};
|
|
19981
19982
|
}, "createContextEvidenceReader");
|
|
19982
19983
|
|
|
19983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/vcard.js
|
|
19984
19985
|
var AS_WORD = new RegExp(`^${WORD_BODY}$`);
|
|
19985
19986
|
var encoder = new TextEncoder();
|
|
19986
19987
|
|
|
19987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19988
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
19988
19989
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun, errors) => ({
|
|
19989
19990
|
dryRun,
|
|
19990
19991
|
source: null,
|
|
@@ -20044,7 +20045,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun =
|
|
|
20044
20045
|
return receiptOf(dryRun, source, await store.records.run(source, items, { dryRun, chunk, options, onIssue }));
|
|
20045
20046
|
}, "ingest");
|
|
20046
20047
|
|
|
20047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
20048
20049
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20049
20050
|
var DEFAULT_PURPOSES = ["work"];
|
|
20050
20051
|
var LINK_PURPOSE = "work";
|
|
@@ -20074,7 +20075,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
20074
20075
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
20075
20076
|
], "purposeList");
|
|
20076
20077
|
|
|
20077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20078
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
20078
20079
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
20079
20080
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
20080
20081
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -20114,7 +20115,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
20114
20115
|
};
|
|
20115
20116
|
}, "dateWindow");
|
|
20116
20117
|
|
|
20117
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
20118
20119
|
var DAY_MS = 864e5;
|
|
20119
20120
|
var NEW_DAYS = 30;
|
|
20120
20121
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20191,7 +20192,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20191
20192
|
};
|
|
20192
20193
|
}, "scorePerson");
|
|
20193
20194
|
|
|
20194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
20195
20196
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
20196
20197
|
const controller = new AbortController();
|
|
20197
20198
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -20207,7 +20208,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
20207
20208
|
}
|
|
20208
20209
|
}, "withTimeLimit");
|
|
20209
20210
|
|
|
20210
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20211
20212
|
var REGISTRIES = {
|
|
20212
20213
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20213
20214
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20294,7 +20295,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20294
20295
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20295
20296
|
})), "notCovered");
|
|
20296
20297
|
|
|
20297
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20298
20299
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20299
20300
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20300
20301
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20382,7 +20383,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20382
20383
|
};
|
|
20383
20384
|
}, "botCheckService");
|
|
20384
20385
|
|
|
20385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20386
20387
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20387
20388
|
if (value === void 0)
|
|
20388
20389
|
return void 0;
|
|
@@ -20392,7 +20393,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20392
20393
|
return id2;
|
|
20393
20394
|
}, "threadIdOf");
|
|
20394
20395
|
|
|
20395
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20396
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20396
20397
|
var TOP_POSTS = 5;
|
|
20397
20398
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20398
20399
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20470,7 +20471,7 @@ var membersOf = /* @__PURE__ */ __name(({ events, more }, messages, since) => {
|
|
|
20470
20471
|
}, "membersOf");
|
|
20471
20472
|
var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
20472
20473
|
const dayOf = calendarKey(timezone, "day");
|
|
20473
|
-
const
|
|
20474
|
+
const keyOf6 = /* @__PURE__ */ __name((timestamp2) => {
|
|
20474
20475
|
const day2 = dayOf(Date.parse(timestamp2));
|
|
20475
20476
|
if (by === "day")
|
|
20476
20477
|
return day2;
|
|
@@ -20485,12 +20486,12 @@ var seriesOf = /* @__PURE__ */ __name((messages, events, by, timezone) => {
|
|
|
20485
20486
|
return found;
|
|
20486
20487
|
}, "row");
|
|
20487
20488
|
for (const one2 of messages)
|
|
20488
|
-
row(
|
|
20489
|
+
row(keyOf6(one2.timestamp)).messages.push(one2);
|
|
20489
20490
|
for (const { timestamp: timestamp2, event, people } of events?.events ?? []) {
|
|
20490
20491
|
if (JOINS.has(event))
|
|
20491
|
-
row(
|
|
20492
|
+
row(keyOf6(timestamp2)).joined += people.length;
|
|
20492
20493
|
if (LEAVES.has(event))
|
|
20493
|
-
row(
|
|
20494
|
+
row(keyOf6(timestamp2)).left += people.length;
|
|
20494
20495
|
}
|
|
20495
20496
|
return [...rows.entries()].sort(([a], [b]) => a.localeCompare(b)).map(([key, found]) => ({
|
|
20496
20497
|
key,
|
|
@@ -20509,7 +20510,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20509
20510
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20510
20511
|
}, "median");
|
|
20511
20512
|
|
|
20512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20513
20514
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20514
20515
|
const events = [];
|
|
20515
20516
|
for (const stay of stays) {
|
|
@@ -20541,7 +20542,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20541
20542
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20542
20543
|
}, "memberEvents");
|
|
20543
20544
|
|
|
20544
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20545
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20545
20546
|
var EVENTS_DAYS = 7;
|
|
20546
20547
|
var TRACKED_DAYS = 30;
|
|
20547
20548
|
var STATS_PAGE = 1e3;
|
|
@@ -20836,7 +20837,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20836
20837
|
return members.length === 0 ? null : members;
|
|
20837
20838
|
}, "storedMembers");
|
|
20838
20839
|
|
|
20839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20840
20841
|
var INBOX_CHATS = 20;
|
|
20841
20842
|
var REVIEW_DAYS = 3;
|
|
20842
20843
|
var UNANSWERED_HOURS = 24;
|
|
@@ -21044,7 +21045,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
21044
21045
|
};
|
|
21045
21046
|
}, "inboxService");
|
|
21046
21047
|
|
|
21047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21048
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21048
21049
|
var CONTEXT_MESSAGES2 = 10;
|
|
21049
21050
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21050
21051
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21200,9 +21201,9 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readabl
|
|
|
21200
21201
|
const written = await store.messages.find({ account: key, senders: [identity.id], limit: messages });
|
|
21201
21202
|
theirs.push(...written.items.map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
21202
21203
|
cut ||= written.hasMore;
|
|
21203
|
-
const
|
|
21204
|
-
mentions.push(...
|
|
21205
|
-
cut ||=
|
|
21204
|
+
const named4 = await store.messages.mentioning(key, { id: identity.id, username: identity.username }, messages);
|
|
21205
|
+
mentions.push(...named4.items.filter((hit) => hit.senderId !== identity.id).map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
21206
|
+
cut ||= named4.hasMore;
|
|
21206
21207
|
}
|
|
21207
21208
|
const personId = Number(record2.uid);
|
|
21208
21209
|
const calendars = [];
|
|
@@ -21333,10 +21334,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21333
21334
|
};
|
|
21334
21335
|
}, "personMessages");
|
|
21335
21336
|
|
|
21336
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21337
21338
|
import { createHash } from "node:crypto";
|
|
21338
21339
|
|
|
21339
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21340
21341
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21341
21342
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21342
21343
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21354,7 +21355,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21354
21355
|
return { parsed, meeting };
|
|
21355
21356
|
}, "authorizedMeetingMetadata");
|
|
21356
21357
|
|
|
21357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21358
21359
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21359
21360
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21360
21361
|
if (signal?.aborted)
|
|
@@ -21553,7 +21554,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21553
21554
|
return { ...packet, fingerprint: hash(packet) };
|
|
21554
21555
|
}, "readMeetingEvidence");
|
|
21555
21556
|
|
|
21556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21557
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21557
21558
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21558
21559
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21559
21560
|
const requestedAccounts = options.accountIds;
|
|
@@ -21652,7 +21653,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21652
21653
|
};
|
|
21653
21654
|
}, "personMeetingContext");
|
|
21654
21655
|
|
|
21655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21656
21657
|
var PREPARE_BYTES = 96 * 1024;
|
|
21657
21658
|
var MEETINGS = 5;
|
|
21658
21659
|
var CUES = 3;
|
|
@@ -21768,7 +21769,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21768
21769
|
}
|
|
21769
21770
|
}, "meetingsOf");
|
|
21770
21771
|
|
|
21771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21772
21773
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21773
21774
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21774
21775
|
const held = await storeIfOpen(deps);
|
|
@@ -21838,7 +21839,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21838
21839
|
complete: false
|
|
21839
21840
|
})), "quiet");
|
|
21840
21841
|
|
|
21841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21842
21843
|
var TIMELINE_ITEMS = 50;
|
|
21843
21844
|
var TIMELINE_MAX = 500;
|
|
21844
21845
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -21893,7 +21894,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21893
21894
|
};
|
|
21894
21895
|
}, "personTimeline");
|
|
21895
21896
|
|
|
21896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21897
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21897
21898
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21898
21899
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21899
21900
|
const held = await storeIfOpen(deps);
|
|
@@ -22120,7 +22121,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22120
22121
|
return rest;
|
|
22121
22122
|
}, "withoutPhone");
|
|
22122
22123
|
|
|
22123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22124
22125
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22125
22126
|
var PERIOD_FIELD = "created";
|
|
22126
22127
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22166,10 +22167,10 @@ var taskStatsOf = /* @__PURE__ */ __name(async (store, account, { by = "chat", q
|
|
|
22166
22167
|
const closed = await store.tasks.statRows(scope, where(query && { ...query, root: renamed(query.root, PERIOD_FIELD, "closed") }, [
|
|
22167
22168
|
{ sql: "t.closed_at IS NOT NULL", params: [] }
|
|
22168
22169
|
]));
|
|
22169
|
-
const
|
|
22170
|
+
const keyOf6 = /* @__PURE__ */ __name((row) => by === "project" ? String(row.projectId) : row.group ?? "", "keyOf");
|
|
22170
22171
|
const groups = /* @__PURE__ */ new Map();
|
|
22171
22172
|
const slot = /* @__PURE__ */ __name((row) => {
|
|
22172
|
-
const key =
|
|
22173
|
+
const key = keyOf6(row);
|
|
22173
22174
|
const found = groups.get(key) ?? { open: [], created: 0, closeMs: [] };
|
|
22174
22175
|
groups.set(key, found);
|
|
22175
22176
|
return found;
|
|
@@ -22223,7 +22224,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22223
22224
|
}));
|
|
22224
22225
|
}, "meetingNames");
|
|
22225
22226
|
|
|
22226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22227
22228
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22228
22229
|
const tags = /* @__PURE__ */ new Map();
|
|
22229
22230
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22232,7 +22233,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22232
22233
|
return tags;
|
|
22233
22234
|
}, "taskTagFilters");
|
|
22234
22235
|
|
|
22235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22236
22237
|
var TASK_QUERY = {
|
|
22237
22238
|
entity: "task",
|
|
22238
22239
|
backend: "sql",
|
|
@@ -22433,8 +22434,8 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
22433
22434
|
...previews ? { previews: await Promise.all(shown.map(({ task: task2 }) => taskView(store, account, task2))) } : {}
|
|
22434
22435
|
};
|
|
22435
22436
|
}), "list"),
|
|
22436
|
-
add: /* @__PURE__ */ __name((message, type, origin, { category:
|
|
22437
|
-
const chosen =
|
|
22437
|
+
add: /* @__PURE__ */ __name((message, type, origin, { category: named4, ...plan } = {}, choice = {}, author = void 0) => inStore(async (store, account) => {
|
|
22438
|
+
const chosen = named4 === void 0 ? void 0 : await categoryOf(store, named4);
|
|
22438
22439
|
const source = message.trim();
|
|
22439
22440
|
const native = isNoteReference(source);
|
|
22440
22441
|
if (!native && !isLocator(source)) {
|
|
@@ -22724,7 +22725,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22724
22725
|
};
|
|
22725
22726
|
}, "taskView");
|
|
22726
22727
|
|
|
22727
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22728
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
22728
22729
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
22729
22730
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
22730
22731
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -22747,7 +22748,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
22747
22748
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
22748
22749
|
}, "approveAsTask");
|
|
22749
22750
|
|
|
22750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22751
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
22751
22752
|
var MAX_IDS = 500;
|
|
22752
22753
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
22753
22754
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -22789,7 +22790,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
22789
22790
|
return ids;
|
|
22790
22791
|
}, "parseProposalIds");
|
|
22791
22792
|
|
|
22792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
22793
22794
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
22794
22795
|
if (author.type === "person")
|
|
22795
22796
|
return { type: "person", id: author.id };
|
|
@@ -22861,7 +22862,7 @@ var reviewedKind = /* @__PURE__ */ __name((spec) => ({
|
|
|
22861
22862
|
}, "decide")
|
|
22862
22863
|
}), "reviewedKind");
|
|
22863
22864
|
|
|
22864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22865
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
22865
22866
|
var rowOf = /* @__PURE__ */ __name((action2) => ({
|
|
22866
22867
|
id: action2.id,
|
|
22867
22868
|
kind: "action",
|
|
@@ -22901,7 +22902,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
22901
22902
|
}, "decide")
|
|
22902
22903
|
}), "actionKind");
|
|
22903
22904
|
|
|
22904
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22905
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/contracts.js
|
|
22905
22906
|
var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
22906
22907
|
type: "contract",
|
|
22907
22908
|
list: /* @__PURE__ */ __name((options) => store.contracts.list(options), "list"),
|
|
@@ -22910,7 +22911,7 @@ var contractKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
22910
22911
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.contracts.confirm(id2, by, reason) : await store.contracts.reject(id2, by, reason)).ref, "decide")
|
|
22911
22912
|
}), "contractKind");
|
|
22912
22913
|
|
|
22913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
22914
22915
|
var STATUS = {
|
|
22915
22916
|
proposed: "proposed",
|
|
22916
22917
|
accepted: "confirmed",
|
|
@@ -22953,7 +22954,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22953
22954
|
}, "decide")
|
|
22954
22955
|
}), "factKind");
|
|
22955
22956
|
|
|
22956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
22957
22958
|
var invoiceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
22958
22959
|
type: "invoice",
|
|
22959
22960
|
list: /* @__PURE__ */ __name((options) => store.finance.invoices(options), "list"),
|
|
@@ -22969,7 +22970,7 @@ var paymentKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
22969
22970
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.finance.confirm(id2, by, reason) : await store.finance.reject(id2, by, reason)).ref, "decide")
|
|
22970
22971
|
}), "paymentKind");
|
|
22971
22972
|
|
|
22972
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22973
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22973
22974
|
var FACT_SUMMARIES = {
|
|
22974
22975
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
22975
22976
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -23041,7 +23042,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23041
23042
|
};
|
|
23042
23043
|
}, "findingsKind");
|
|
23043
23044
|
|
|
23044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
23045
23046
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
23046
23047
|
id: `key:${link4.id}`,
|
|
23047
23048
|
kind: "key_document",
|
|
@@ -23109,7 +23110,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
23109
23110
|
};
|
|
23110
23111
|
}, "keyDocumentKind");
|
|
23111
23112
|
|
|
23112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23113
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
23113
23114
|
var words = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
23114
23115
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
23115
23116
|
switch (finding.kind) {
|
|
@@ -23197,7 +23198,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23197
23198
|
};
|
|
23198
23199
|
}, "mailFindingsKind");
|
|
23199
23200
|
|
|
23200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
23201
23202
|
var rowOf5 = /* @__PURE__ */ __name((action2, batch) => {
|
|
23202
23203
|
const findings = batch.input.findings;
|
|
23203
23204
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -23261,7 +23262,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23261
23262
|
};
|
|
23262
23263
|
}, "meetingFindingsKind");
|
|
23263
23264
|
|
|
23264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
23265
23266
|
var STATUS2 = {
|
|
23266
23267
|
proposed: "proposed",
|
|
23267
23268
|
confirmed: "confirmed",
|
|
@@ -23302,7 +23303,7 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23302
23303
|
}, "decide")
|
|
23303
23304
|
}), "memoryKind");
|
|
23304
23305
|
|
|
23305
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
23306
23307
|
var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23307
23308
|
type: "order",
|
|
23308
23309
|
list: /* @__PURE__ */ __name((options) => store.orders.list(options), "list"),
|
|
@@ -23311,7 +23312,7 @@ var orderKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
23311
23312
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.orders.confirm(id2, by, reason) : await store.orders.reject(id2, by, reason)).ref, "decide")
|
|
23312
23313
|
}), "orderKind");
|
|
23313
23314
|
|
|
23314
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
23315
23316
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
23316
23317
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
23317
23318
|
var rowOf7 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23367,7 +23368,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23367
23368
|
}, "decide")
|
|
23368
23369
|
}), "organizationKind");
|
|
23369
23370
|
|
|
23370
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
23371
23372
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
23372
23373
|
id: `link:${link4.id}`,
|
|
23373
23374
|
kind: "relationship",
|
|
@@ -23426,7 +23427,8 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
23426
23427
|
const stored = await store.proposedActions.list({
|
|
23427
23428
|
kinds: ["relationship"],
|
|
23428
23429
|
...status === void 0 ? {} : { status },
|
|
23429
|
-
...pushed2(filter)
|
|
23430
|
+
...pushed2(filter),
|
|
23431
|
+
...filter.via === void 0 ? {} : { evidence: filter.via }
|
|
23430
23432
|
});
|
|
23431
23433
|
const links = (filter.status ?? "proposed") === "rejected" ? [] : await legacy();
|
|
23432
23434
|
return kept([...stored.map(storedRow2), ...links.map(linkRow2)], filter);
|
|
@@ -23441,7 +23443,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
23441
23443
|
};
|
|
23442
23444
|
}, "relationshipKind");
|
|
23443
23445
|
|
|
23444
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23446
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
23445
23447
|
var KIND = "relationship_update";
|
|
23446
23448
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
23447
23449
|
var rowOf8 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23491,7 +23493,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23491
23493
|
}, "decide")
|
|
23492
23494
|
}), "relationshipUpdateKind");
|
|
23493
23495
|
|
|
23494
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23496
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/source-review.js
|
|
23495
23497
|
var rowOf9 = /* @__PURE__ */ __name((action2) => {
|
|
23496
23498
|
const payload = action2.payload;
|
|
23497
23499
|
const sources = payload.sources.flatMap((source) => source.ref ?? []);
|
|
@@ -23534,7 +23536,7 @@ var sourceReviewKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23534
23536
|
}, "decide")
|
|
23535
23537
|
}), "sourceReviewKind");
|
|
23536
23538
|
|
|
23537
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/subscriptions.js
|
|
23538
23540
|
var subscriptionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23539
23541
|
type: "subscription",
|
|
23540
23542
|
list: /* @__PURE__ */ __name((options) => store.subscriptions.list(options), "list"),
|
|
@@ -23553,7 +23555,7 @@ var subscriptionPriceKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
23553
23555
|
}, "decide")
|
|
23554
23556
|
}), "subscriptionPriceKind");
|
|
23555
23557
|
|
|
23556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
23557
23559
|
var rowOf10 = /* @__PURE__ */ __name((task2) => {
|
|
23558
23560
|
const suggestion = task2.closeSuggestion;
|
|
23559
23561
|
if (suggestion === null)
|
|
@@ -23621,7 +23623,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23621
23623
|
};
|
|
23622
23624
|
}, "taskCloseKind");
|
|
23623
23625
|
|
|
23624
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23626
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/transactions.js
|
|
23625
23627
|
var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
23626
23628
|
type: "transaction",
|
|
23627
23629
|
list: /* @__PURE__ */ __name((options) => store.transactions.list(options), "list"),
|
|
@@ -23630,7 +23632,7 @@ var transactionKind = /* @__PURE__ */ __name((store) => reviewedKind({
|
|
|
23630
23632
|
decide: /* @__PURE__ */ __name(async (id2, confirm, { by, reason }) => (confirm ? await store.transactions.confirm(id2, by, reason) : await store.transactions.reject(id2, by, reason)).ref, "decide")
|
|
23631
23633
|
}), "transactionKind");
|
|
23632
23634
|
|
|
23633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
23634
23636
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
23635
23637
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
23636
23638
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -23670,7 +23672,7 @@ var emptyProposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23670
23672
|
throw new CliError("validation_error", "a proposal list takes a nonnegative offset");
|
|
23671
23673
|
const asked = filter.kinds === void 0 ? kinds : kinds.filter((kind) => filter.kinds?.includes(kind.kind));
|
|
23672
23674
|
const wide = { ...filter, offset: 0, limit: filter.offset + filter.limit + 1 };
|
|
23673
|
-
const rows = (await Promise.all(asked.map(async (kind) => (await kind.list(wide)).map((row) => marked(kind, row))))).flat();
|
|
23675
|
+
const rows = (await Promise.all(asked.map(async (kind) => (await kind.list(wide)).map((row) => marked(kind, row))))).flat().filter((row) => filter.via === void 0 || row.evidence.includes(filter.via));
|
|
23674
23676
|
rows.sort((a, b) => b.createdAt.localeCompare(a.createdAt) || b.id.localeCompare(a.id));
|
|
23675
23677
|
const page = rows.slice(filter.offset, filter.offset + filter.limit + 1);
|
|
23676
23678
|
return { items: page.slice(0, filter.limit), hasMore: page.length > filter.limit };
|
|
@@ -23763,7 +23765,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23763
23765
|
return registry;
|
|
23764
23766
|
}, "proposalRegistry");
|
|
23765
23767
|
|
|
23766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
23767
23769
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
23768
23770
|
if (newest === null)
|
|
23769
23771
|
return null;
|
|
@@ -23772,7 +23774,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
23772
23774
|
return newest.addressed ? "owed" : null;
|
|
23773
23775
|
}, "mailTurn");
|
|
23774
23776
|
|
|
23775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23777
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
23776
23778
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
23777
23779
|
if (error instanceof CliError && error.code === "not_found")
|
|
23778
23780
|
return void 0;
|
|
@@ -23830,7 +23832,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
23830
23832
|
};
|
|
23831
23833
|
}, "mailActivity");
|
|
23832
23834
|
|
|
23833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23835
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23834
23836
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23835
23837
|
const ids = [...new Set(chatIds)];
|
|
23836
23838
|
if (ids.length === 0)
|
|
@@ -23856,7 +23858,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23856
23858
|
}));
|
|
23857
23859
|
}, "chatCoverage");
|
|
23858
23860
|
|
|
23859
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
23860
23862
|
var DAY = 864e5;
|
|
23861
23863
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
23862
23864
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -24103,7 +24105,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24103
24105
|
};
|
|
24104
24106
|
}, "agendaItem");
|
|
24105
24107
|
|
|
24106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
24107
24109
|
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");
|
|
24108
24110
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
24109
24111
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -24119,7 +24121,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
24119
24121
|
}, "excerpt");
|
|
24120
24122
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
24121
24123
|
|
|
24122
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
24123
24125
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
24124
24126
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
24125
24127
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -24161,7 +24163,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
24161
24163
|
return found;
|
|
24162
24164
|
}, "identitiesIn");
|
|
24163
24165
|
|
|
24164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
24165
24167
|
var SEARCH_LIMIT = 500;
|
|
24166
24168
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
24167
24169
|
var aliasHits = {
|
|
@@ -24210,16 +24212,23 @@ var aliasHits = {
|
|
|
24210
24212
|
}, "candidates")
|
|
24211
24213
|
};
|
|
24212
24214
|
|
|
24213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
24214
24216
|
var WEIGHT = 0.5;
|
|
24215
24217
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
24216
24218
|
var LARGE_GROUP = 30;
|
|
24217
24219
|
var SMALL_CHAT = 10;
|
|
24218
24220
|
var MIN_MESSAGES = 5;
|
|
24219
24221
|
var READ_LIMIT = 2e3;
|
|
24222
|
+
var TITLE_WIDTH = 60;
|
|
24223
|
+
var named2 = /* @__PURE__ */ __name((title, chat) => {
|
|
24224
|
+
const flat = (title ?? "").replace(/\s+/gu, " ").trim();
|
|
24225
|
+
if (!flat)
|
|
24226
|
+
return chat;
|
|
24227
|
+
return `\xAB${flat.length > TITLE_WIDTH ? `${flat.slice(0, TITLE_WIDTH - 1)}\u2026` : flat}\xBB`;
|
|
24228
|
+
}, "named");
|
|
24220
24229
|
var chatSenders = {
|
|
24221
24230
|
id: "chat-senders",
|
|
24222
|
-
version:
|
|
24231
|
+
version: 3,
|
|
24223
24232
|
spreads: true,
|
|
24224
24233
|
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, since, owner, signal }) => {
|
|
24225
24234
|
if (!project2)
|
|
@@ -24243,6 +24252,7 @@ var chatSenders = {
|
|
|
24243
24252
|
}
|
|
24244
24253
|
const size4 = Math.max((await store.roster.members(key, reference.chat)).length, senders.size);
|
|
24245
24254
|
const weight = size4 > LARGE_GROUP ? LARGE_GROUP_WEIGHT : WEIGHT;
|
|
24255
|
+
const where = named2(await store.chats.chatTitle(key, reference.chat), chat);
|
|
24246
24256
|
for (const [id2, { count: count4, last }] of senders) {
|
|
24247
24257
|
if (size4 > SMALL_CHAT && count4 < MIN_MESSAGES)
|
|
24248
24258
|
continue;
|
|
@@ -24254,8 +24264,8 @@ var chatSenders = {
|
|
|
24254
24264
|
to: project2.ref,
|
|
24255
24265
|
kind: "member-of",
|
|
24256
24266
|
weight,
|
|
24257
|
-
why:
|
|
24258
|
-
evidence: [formatReference({ ...reference, type: "message", message: last })],
|
|
24267
|
+
why: `wrote ${count4} message${count4 === 1 ? "" : "s"} in ${where} (${size4} people) since ${since.slice(0, 10)}`,
|
|
24268
|
+
evidence: [chat, formatReference({ ...reference, type: "message", message: last })],
|
|
24259
24269
|
identity: contactRef2(key.provider, id2)
|
|
24260
24270
|
});
|
|
24261
24271
|
}
|
|
@@ -24264,7 +24274,7 @@ var chatSenders = {
|
|
|
24264
24274
|
}, "candidates")
|
|
24265
24275
|
};
|
|
24266
24276
|
|
|
24267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24277
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
24268
24278
|
var WEIGHT2 = 0.7;
|
|
24269
24279
|
var chatTitle = {
|
|
24270
24280
|
id: "chat-title",
|
|
@@ -24303,7 +24313,7 @@ var chatTitle = {
|
|
|
24303
24313
|
}, "candidates")
|
|
24304
24314
|
};
|
|
24305
24315
|
|
|
24306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
24307
24317
|
var WEIGHT3 = 0.3;
|
|
24308
24318
|
var CONTACTS = 500;
|
|
24309
24319
|
var MOST_PAIRS = 200;
|
|
@@ -24364,7 +24374,7 @@ var emailDomain = {
|
|
|
24364
24374
|
}, "candidates")
|
|
24365
24375
|
};
|
|
24366
24376
|
|
|
24367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
24368
24378
|
var NAMED = 0.7;
|
|
24369
24379
|
var MEMBER_ONLY = 0.3;
|
|
24370
24380
|
var READ_LIMIT2 = 500;
|
|
@@ -24407,7 +24417,7 @@ var mailThread = {
|
|
|
24407
24417
|
const thread = (await store.mail.thread(id2))?.thread;
|
|
24408
24418
|
if (!thread)
|
|
24409
24419
|
continue;
|
|
24410
|
-
const
|
|
24420
|
+
const named4 = names2(thread.subject ?? subject) !== void 0;
|
|
24411
24421
|
const chat = formatReference({
|
|
24412
24422
|
type: "chat",
|
|
24413
24423
|
provider: "email",
|
|
@@ -24419,8 +24429,8 @@ var mailThread = {
|
|
|
24419
24429
|
from: chat,
|
|
24420
24430
|
to: project2.ref,
|
|
24421
24431
|
kind: "member-of",
|
|
24422
|
-
weight:
|
|
24423
|
-
why: `a thread with ${who2.length > 1 ? `${who2.length} members` : `a member (${who2[0]})`}${
|
|
24432
|
+
weight: named4 ? NAMED : MEMBER_ONLY,
|
|
24433
|
+
why: `a thread with ${who2.length > 1 ? `${who2.length} members` : `a member (${who2[0]})`}${named4 ? "; its subject names the project" : ""}`,
|
|
24424
24434
|
evidence: [
|
|
24425
24435
|
formatReference({
|
|
24426
24436
|
type: "message",
|
|
@@ -24438,7 +24448,7 @@ var mailThread = {
|
|
|
24438
24448
|
}, "candidates")
|
|
24439
24449
|
};
|
|
24440
24450
|
|
|
24441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
24442
24452
|
var WEIGHT4 = 0.5;
|
|
24443
24453
|
var memberChats = {
|
|
24444
24454
|
id: "member-chats",
|
|
@@ -24464,14 +24474,14 @@ var memberChats = {
|
|
|
24464
24474
|
for (const [chat, held] of members) {
|
|
24465
24475
|
if (held.size < 2)
|
|
24466
24476
|
continue;
|
|
24467
|
-
const
|
|
24477
|
+
const named4 = [...held].sort();
|
|
24468
24478
|
found.push({
|
|
24469
24479
|
from: chatRef2(key, chat),
|
|
24470
24480
|
to: project2.ref,
|
|
24471
24481
|
kind: "member-of",
|
|
24472
24482
|
weight: WEIGHT4,
|
|
24473
|
-
why: `a group with ${held.size} confirmed members (${
|
|
24474
|
-
evidence:
|
|
24483
|
+
why: `a group with ${held.size} confirmed members (${named4.slice(0, 3).join(", ")}${held.size > 3 ? ", \u2026" : ""})`,
|
|
24484
|
+
evidence: named4.slice(0, 5)
|
|
24475
24485
|
});
|
|
24476
24486
|
}
|
|
24477
24487
|
}
|
|
@@ -24479,7 +24489,7 @@ var memberChats = {
|
|
|
24479
24489
|
}, "candidates")
|
|
24480
24490
|
};
|
|
24481
24491
|
|
|
24482
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24492
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
24483
24493
|
var WEIGHT5 = 0.6;
|
|
24484
24494
|
var memberDialog = {
|
|
24485
24495
|
id: "member-dialog",
|
|
@@ -24514,7 +24524,7 @@ var memberDialog = {
|
|
|
24514
24524
|
}, "candidates")
|
|
24515
24525
|
};
|
|
24516
24526
|
|
|
24517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
24518
24528
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
24519
24529
|
async around(ref, window3) {
|
|
24520
24530
|
const at = parseLocator(ref);
|
|
@@ -24610,7 +24620,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
24610
24620
|
};
|
|
24611
24621
|
}, "storedNeighbours");
|
|
24612
24622
|
|
|
24613
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24623
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
24614
24624
|
import { createHash as createHash2 } from "node:crypto";
|
|
24615
24625
|
var DAY2 = 864e5;
|
|
24616
24626
|
var MAX_TIME = 864e13;
|
|
@@ -24926,7 +24936,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
24926
24936
|
return value;
|
|
24927
24937
|
}, "decodeCheckpoint");
|
|
24928
24938
|
|
|
24929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
24930
24940
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
24931
24941
|
var PAGE2 = 20;
|
|
24932
24942
|
var PEOPLE = 20;
|
|
@@ -25330,7 +25340,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
25330
25340
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
25331
25341
|
}, "peopleOf");
|
|
25332
25342
|
|
|
25333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
25334
25344
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
25335
25345
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
25336
25346
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -25374,7 +25384,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
25374
25384
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
25375
25385
|
}, "matchVocabularyTerms");
|
|
25376
25386
|
|
|
25377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
25378
25388
|
var KINDS = ["project", "tag", "topic"];
|
|
25379
25389
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
25380
25390
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -25429,7 +25439,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
25429
25439
|
};
|
|
25430
25440
|
}, "findEvidenceMentions");
|
|
25431
25441
|
|
|
25432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
25433
25443
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
25434
25444
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
25435
25445
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -25735,7 +25745,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
25735
25745
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
25736
25746
|
}, "purposeHintOf");
|
|
25737
25747
|
|
|
25738
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
25739
25749
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
25740
25750
|
var PERSON_SCORERS = [emailDomain];
|
|
25741
25751
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -25983,18 +25993,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
25983
25993
|
}, "referenceOf");
|
|
25984
25994
|
var rejectedReversed = /* @__PURE__ */ __name(async (store, candidate) => candidate.kind === "related-to" && candidate.to.startsWith("person:") && ((await store.knowledge.relationState(null, { from: candidate.to, to: candidate.from, kind: candidate.kind }))?.rejected ?? false), "rejectedReversed");
|
|
25985
25995
|
|
|
25986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25987
25997
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25988
25998
|
|
|
25989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25990
26000
|
import { lstat } from "node:fs/promises";
|
|
25991
26001
|
|
|
25992
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25993
26003
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
25994
26004
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25995
26005
|
import { join as join2 } from "node:path";
|
|
25996
26006
|
|
|
25997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26007
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25998
26008
|
import { createHash as createHash3 } from "node:crypto";
|
|
25999
26009
|
var metadataLimit = 16384;
|
|
26000
26010
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -26054,7 +26064,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
26054
26064
|
}
|
|
26055
26065
|
}, "readPartialMetadata");
|
|
26056
26066
|
|
|
26057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26067
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
26058
26068
|
import { randomUUID } from "node:crypto";
|
|
26059
26069
|
import { open, rename, unlink } from "node:fs/promises";
|
|
26060
26070
|
import { join } from "node:path";
|
|
@@ -26146,7 +26156,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
26146
26156
|
};
|
|
26147
26157
|
}, "partialWriter");
|
|
26148
26158
|
|
|
26149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26159
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
26150
26160
|
var NativeRecordingPartialStore = class {
|
|
26151
26161
|
static {
|
|
26152
26162
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -26253,12 +26263,12 @@ var NativeRecordingPartialStore = class {
|
|
|
26253
26263
|
}
|
|
26254
26264
|
};
|
|
26255
26265
|
|
|
26256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26257
26267
|
import { createHash as createHash5 } from "node:crypto";
|
|
26258
26268
|
import { link as link2 } from "node:fs/promises";
|
|
26259
26269
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
26260
26270
|
|
|
26261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
26262
26272
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
26263
26273
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
26264
26274
|
signal?.throwIfAborted();
|
|
@@ -26293,7 +26303,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
26293
26303
|
signal?.throwIfAborted();
|
|
26294
26304
|
}, "commitPublication");
|
|
26295
26305
|
|
|
26296
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
26297
26307
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
26298
26308
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
26299
26309
|
import { join as join3 } from "node:path";
|
|
@@ -26366,7 +26376,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
26366
26376
|
}
|
|
26367
26377
|
}, "writePublicationJournal");
|
|
26368
26378
|
|
|
26369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26370
26380
|
var NativeRecordingPublication = class {
|
|
26371
26381
|
static {
|
|
26372
26382
|
__name(this, "NativeRecordingPublication");
|
|
@@ -26439,7 +26449,7 @@ var NativeRecordingPublication = class {
|
|
|
26439
26449
|
}
|
|
26440
26450
|
};
|
|
26441
26451
|
|
|
26442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26452
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26443
26453
|
import { createHash as createHash6 } from "node:crypto";
|
|
26444
26454
|
import { readdir } from "node:fs/promises";
|
|
26445
26455
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -26526,7 +26536,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
26526
26536
|
beforePublish
|
|
26527
26537
|
}), "commitMediaEntry");
|
|
26528
26538
|
|
|
26529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26539
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26530
26540
|
var validator = '"media-completed-v1"';
|
|
26531
26541
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26532
26542
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -26627,7 +26637,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
26627
26637
|
return entry;
|
|
26628
26638
|
}, "archiveMediaFile");
|
|
26629
26639
|
|
|
26630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26640
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
26631
26641
|
import { mkdir, realpath } from "node:fs/promises";
|
|
26632
26642
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
26633
26643
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -26694,7 +26704,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
26694
26704
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
26695
26705
|
}, "withMediaArchiveLocks");
|
|
26696
26706
|
|
|
26697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26698
26708
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
26699
26709
|
if (value === void 0)
|
|
26700
26710
|
return void 0;
|
|
@@ -26847,7 +26857,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26847
26857
|
}, { create: true });
|
|
26848
26858
|
}, "archiveMedia");
|
|
26849
26859
|
|
|
26850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26860
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
26851
26861
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
26852
26862
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
26853
26863
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -27000,7 +27010,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
27000
27010
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
27001
27011
|
}, "moveMediaArchive");
|
|
27002
27012
|
|
|
27003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27013
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
27004
27014
|
var bytesOf2 = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
27005
27015
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
27006
27016
|
}, "progress") }) => {
|
|
@@ -27023,7 +27033,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
27023
27033
|
}
|
|
27024
27034
|
await nativeRuntime({ env, progress });
|
|
27025
27035
|
progress(`${model.id}: loading it once to check it works`);
|
|
27026
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
27036
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-W56IWO4I.js");
|
|
27027
27037
|
const embedder = await openEmbedder2(model, directory2);
|
|
27028
27038
|
try {
|
|
27029
27039
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -27044,7 +27054,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
27044
27054
|
}
|
|
27045
27055
|
await nativeRuntime({ env, progress });
|
|
27046
27056
|
progress(`${model.id}: loading it once to check it works`);
|
|
27047
|
-
const { openReranker } = await import("./rerank-
|
|
27057
|
+
const { openReranker } = await import("./rerank-46KI3363.js");
|
|
27048
27058
|
const reranker = await openReranker(model, directory2);
|
|
27049
27059
|
try {
|
|
27050
27060
|
await reranker.score("check", ["check"]);
|
|
@@ -27062,7 +27072,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
27062
27072
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
27063
27073
|
}
|
|
27064
27074
|
progress(`${model.id}: loading it once to check it works`);
|
|
27065
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
27075
|
+
const { openPictureEmbedder } = await import("./embedder-IWJHHYLE.js");
|
|
27066
27076
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
27067
27077
|
try {
|
|
27068
27078
|
const vector = await embedder.embedQuery("check");
|
|
@@ -27074,7 +27084,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
27074
27084
|
return { model, directory: directory2 };
|
|
27075
27085
|
}, "downloadImageModel");
|
|
27076
27086
|
|
|
27077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
27078
27088
|
var MONEY_REQUEST = "money-request";
|
|
27079
27089
|
var MONEY_DONE = "money-done";
|
|
27080
27090
|
var PROMISE = "promise";
|
|
@@ -27108,10 +27118,10 @@ var MONEY_WORDS = [
|
|
|
27108
27118
|
}
|
|
27109
27119
|
];
|
|
27110
27120
|
|
|
27111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
27112
27122
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
27113
27123
|
|
|
27114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27124
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
27115
27125
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
27116
27126
|
var MONEY_DONE_FORMS = words2([
|
|
27117
27127
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -27151,7 +27161,7 @@ var PROMISE_FORMS = words2([
|
|
|
27151
27161
|
"estar\xE1 listo"
|
|
27152
27162
|
]);
|
|
27153
27163
|
|
|
27154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27164
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
27155
27165
|
var EXCERPT_CHARS = 80;
|
|
27156
27166
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
27157
27167
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -27173,7 +27183,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
27173
27183
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
27174
27184
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
27175
27185
|
|
|
27176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
27177
27187
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
27178
27188
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
27179
27189
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -27184,8 +27194,8 @@ var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
|
27184
27194
|
return classes.includes(MONEY_REQUEST) ? "request" : "none";
|
|
27185
27195
|
}, "verbOf");
|
|
27186
27196
|
var roleDirection = /* @__PURE__ */ __name((role) => {
|
|
27187
|
-
const
|
|
27188
|
-
return
|
|
27197
|
+
const named4 = role?.trim().toLowerCase();
|
|
27198
|
+
return named4 === "client" ? "to_us" : named4 === "contractor" ? "from_us" : "unknown";
|
|
27189
27199
|
}, "roleDirection");
|
|
27190
27200
|
var directionOf = /* @__PURE__ */ __name((verb, owner, role) => {
|
|
27191
27201
|
if (verb === "request")
|
|
@@ -27254,7 +27264,7 @@ var amounts = {
|
|
|
27254
27264
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
27255
27265
|
};
|
|
27256
27266
|
|
|
27257
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27267
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
27258
27268
|
var children = {
|
|
27259
27269
|
id: "children",
|
|
27260
27270
|
version: 1,
|
|
@@ -27283,7 +27293,7 @@ var children = {
|
|
|
27283
27293
|
}, "read")
|
|
27284
27294
|
};
|
|
27285
27295
|
|
|
27286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
27287
27297
|
var coverage = {
|
|
27288
27298
|
id: "coverage",
|
|
27289
27299
|
version: 1,
|
|
@@ -27312,7 +27322,7 @@ var coverage = {
|
|
|
27312
27322
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state !== "complete" && item2.data.beforeHeld ? [{ chat: item2.chat, weight: 3, why: "held in part" }] : []), "attention")
|
|
27313
27323
|
};
|
|
27314
27324
|
|
|
27315
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
27316
27326
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
27317
27327
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
27318
27328
|
signal: "payments",
|
|
@@ -27362,7 +27372,7 @@ var payments = {
|
|
|
27362
27372
|
}, "read")
|
|
27363
27373
|
};
|
|
27364
27374
|
|
|
27365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
27366
27376
|
var PATTERNS_PER_CHAT = 3;
|
|
27367
27377
|
var DAY3 = 864e5;
|
|
27368
27378
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -27451,7 +27461,7 @@ var promises = {
|
|
|
27451
27461
|
}, "read")
|
|
27452
27462
|
};
|
|
27453
27463
|
|
|
27454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27464
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
27455
27465
|
var PER_SIDE = 5;
|
|
27456
27466
|
var WEEK = 7 * 864e5;
|
|
27457
27467
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -27482,7 +27492,7 @@ var questions2 = {
|
|
|
27482
27492
|
}, "attention")
|
|
27483
27493
|
};
|
|
27484
27494
|
|
|
27485
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
27486
27496
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
27487
27497
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
27488
27498
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27497,8 +27507,8 @@ var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
|
27497
27507
|
return void 0;
|
|
27498
27508
|
if (owners.has(mentioned2))
|
|
27499
27509
|
return { owner: true, id: mentioned2, name: null };
|
|
27500
|
-
const
|
|
27501
|
-
return { owner: false, id: mentioned2, name:
|
|
27510
|
+
const named4 = chat.messages.find((one2) => one2.senderId === mentioned2);
|
|
27511
|
+
return { owner: false, id: mentioned2, name: named4?.senderName ?? null };
|
|
27502
27512
|
}, "targetOf");
|
|
27503
27513
|
var asksSomething = /* @__PURE__ */ __name((message) => message.text.includes("?"), "asksSomething");
|
|
27504
27514
|
var replyNext = {
|
|
@@ -27550,7 +27560,7 @@ var replyNext = {
|
|
|
27550
27560
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27551
27561
|
};
|
|
27552
27562
|
|
|
27553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27554
27564
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27555
27565
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27556
27566
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27596,7 +27606,7 @@ var topics = {
|
|
|
27596
27606
|
}, "read")
|
|
27597
27607
|
};
|
|
27598
27608
|
|
|
27599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27609
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27600
27610
|
var STATUS_SIGNALS = [
|
|
27601
27611
|
replyNext,
|
|
27602
27612
|
questions2,
|
|
@@ -27608,7 +27618,7 @@ var STATUS_SIGNALS = [
|
|
|
27608
27618
|
children
|
|
27609
27619
|
];
|
|
27610
27620
|
|
|
27611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27612
27622
|
var DAY4 = 864e5;
|
|
27613
27623
|
var STATUS_WINDOW = 300;
|
|
27614
27624
|
var STATUS_CHATS = 16;
|
|
@@ -27797,7 +27807,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27797
27807
|
};
|
|
27798
27808
|
}, "projectStatus");
|
|
27799
27809
|
|
|
27800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
27801
27811
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
27802
27812
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27803
27813
|
if (deps.offline)
|
|
@@ -27869,7 +27879,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
27869
27879
|
};
|
|
27870
27880
|
}, "accountService");
|
|
27871
27881
|
|
|
27872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
27873
27883
|
var MINUTE = 6e4;
|
|
27874
27884
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
27875
27885
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -27888,7 +27898,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
27888
27898
|
return new Date(at - at % MINUTE).toISOString();
|
|
27889
27899
|
}, "sendTime");
|
|
27890
27900
|
|
|
27891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27901
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
27892
27902
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
27893
27903
|
try {
|
|
27894
27904
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -28135,7 +28145,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
28135
28145
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
28136
28146
|
}, "linkLimits");
|
|
28137
28147
|
|
|
28138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28148
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
28139
28149
|
var THREADS_PAGE = 500;
|
|
28140
28150
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
28141
28151
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -28214,7 +28224,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
28214
28224
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
28215
28225
|
}, "readMail");
|
|
28216
28226
|
|
|
28217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
28218
28228
|
var NO_MAIL = "no_mail";
|
|
28219
28229
|
var MAIL = "email";
|
|
28220
28230
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -28261,7 +28271,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
28261
28271
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
28262
28272
|
}, "accountsOfKind");
|
|
28263
28273
|
|
|
28264
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
28265
28275
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
28266
28276
|
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");
|
|
28267
28277
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -28583,10 +28593,10 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28583
28593
|
const groups = prepared.scopeAccounts.length ? await count4(prepared.execution, calendar ? "time" : by) : [];
|
|
28584
28594
|
let rows;
|
|
28585
28595
|
if (calendar) {
|
|
28586
|
-
const
|
|
28596
|
+
const keyOf6 = calendarKey(prepared.timezone, by);
|
|
28587
28597
|
const totals = /* @__PURE__ */ new Map();
|
|
28588
28598
|
for (const { id: id2, count: count5 } of groups) {
|
|
28589
|
-
const key =
|
|
28599
|
+
const key = keyOf6(Number(id2));
|
|
28590
28600
|
totals.set(key, (totals.get(key) ?? 0) + count5);
|
|
28591
28601
|
}
|
|
28592
28602
|
rows = [...totals].sort(([a], [b]) => a.localeCompare(b)).map(([key, count5]) => ({ key, name: null, count: count5 }));
|
|
@@ -28609,7 +28619,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28609
28619
|
};
|
|
28610
28620
|
}, "statsLucene");
|
|
28611
28621
|
|
|
28612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28613
28623
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28614
28624
|
var object2 = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28615
28625
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -28778,7 +28788,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28778
28788
|
};
|
|
28779
28789
|
}, "readRankingSelection");
|
|
28780
28790
|
|
|
28781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
28782
28792
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one2) => canonical(one2, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one2]) => one2 !== void 0 && (nested || one2 !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one2]) => [key, canonical(one2, true)])) : value, "canonical");
|
|
28783
28793
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
28784
28794
|
command,
|
|
@@ -28788,7 +28798,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
28788
28798
|
fieldsVersion: FIELD_VERSION
|
|
28789
28799
|
}), "searchRecordOf");
|
|
28790
28800
|
|
|
28791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
28792
28802
|
function invalid2(message) {
|
|
28793
28803
|
throw new CliError("validation_error", message);
|
|
28794
28804
|
}
|
|
@@ -29082,7 +29092,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
29082
29092
|
}, "evidence")
|
|
29083
29093
|
}), "adminStatisticsService");
|
|
29084
29094
|
|
|
29085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
29086
29096
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
29087
29097
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
29088
29098
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -29219,16 +29229,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29219
29229
|
return { plan, repair };
|
|
29220
29230
|
}, "gapsService");
|
|
29221
29231
|
|
|
29222
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29223
29233
|
import { createHash as createHash9 } from "node:crypto";
|
|
29224
29234
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
29225
29235
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
29226
29236
|
|
|
29227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29237
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29228
29238
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
29229
29239
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
29230
29240
|
|
|
29231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
29232
29242
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
29233
29243
|
import { open as open4, stat } from "node:fs/promises";
|
|
29234
29244
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -29342,12 +29352,12 @@ var refusedPlace = /* @__PURE__ */ __name((path, app, env, platform = process.pl
|
|
|
29342
29352
|
const fold2 = /* @__PURE__ */ __name((text2) => folded2 ? text2.toLowerCase() : text2, "fold");
|
|
29343
29353
|
const parts = new Set([...CREDENTIAL_PARTS].map(fold2));
|
|
29344
29354
|
const runs = CREDENTIAL_RUNS.map((run) => run.map(fold2));
|
|
29345
|
-
const
|
|
29355
|
+
const named4 = /* @__PURE__ */ __name((candidate) => {
|
|
29346
29356
|
const names2 = candidate.split(sep).map(fold2);
|
|
29347
29357
|
return names2.some((name, index) => parts.has(name) || /^\.env\./.test(name) || runs.some((run) => run.every((part, offset) => names2[index + offset] === part)));
|
|
29348
29358
|
}, "named");
|
|
29349
29359
|
const same2 = /* @__PURE__ */ __name((a, b) => fold2(a) === fold2(b), "same");
|
|
29350
|
-
return [resolve5(path), real].some((candidate) =>
|
|
29360
|
+
return [resolve5(path), real].some((candidate) => named4(candidate) || own.some((dir) => inside(fold2(candidate), fold2(dir))) || [store, `${store}-wal`, `${store}-shm`].some((file2) => same2(candidate, file2)));
|
|
29351
29361
|
}, "refusedPlace");
|
|
29352
29362
|
var inside = /* @__PURE__ */ __name((path, dir) => {
|
|
29353
29363
|
const way = relative(resolve5(dir), path);
|
|
@@ -29430,7 +29440,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
29430
29440
|
return { name, source };
|
|
29431
29441
|
}, "readStickerFile");
|
|
29432
29442
|
|
|
29433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29434
29444
|
var MAX_FILES = 1e4;
|
|
29435
29445
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
29436
29446
|
if (refusedPlace(directory2, app, env))
|
|
@@ -29483,11 +29493,11 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29483
29493
|
const complete = candidates.every((paths) => paths.length === 1);
|
|
29484
29494
|
group.forEach((file2, index) => {
|
|
29485
29495
|
const own = file2.name === null ? void 0 : basename4(file2.name);
|
|
29486
|
-
const
|
|
29496
|
+
const named4 = own && counts.get(own) === 1 ? files.get(own) : void 0;
|
|
29487
29497
|
const canonical2 = complete ? candidates[index]?.[0] : void 0;
|
|
29488
|
-
if (
|
|
29498
|
+
if (named4 && canonical2 && named4 !== canonical2 || !complete && own && files.has(own) && (counts.get(own) ?? 0) > 1)
|
|
29489
29499
|
throw new CliError("validation_error", "directory file names are ambiguous; use complete message-prefixed downloads");
|
|
29490
|
-
choices.set(file2.pk, canonical2 ??
|
|
29500
|
+
choices.set(file2.pk, canonical2 ?? named4 ?? null);
|
|
29491
29501
|
});
|
|
29492
29502
|
}
|
|
29493
29503
|
const uses = /* @__PURE__ */ new Map();
|
|
@@ -29499,15 +29509,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29499
29509
|
return choices;
|
|
29500
29510
|
}, "directoryPaths");
|
|
29501
29511
|
|
|
29502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29503
29513
|
import { posix } from "node:path";
|
|
29504
29514
|
|
|
29505
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29515
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29506
29516
|
import { setImmediate as tick } from "node:timers/promises";
|
|
29507
29517
|
import { crc32 } from "node:zlib";
|
|
29508
29518
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
29509
29519
|
|
|
29510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29520
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
29511
29521
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
29512
29522
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
29513
29523
|
var SAMPLE = 65536;
|
|
@@ -29609,7 +29619,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29609
29619
|
return result.text;
|
|
29610
29620
|
}, "decodeXml");
|
|
29611
29621
|
|
|
29612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29613
29623
|
var MAX_PART = 10 * 1024 * 1024;
|
|
29614
29624
|
var MAX_ENTRIES = 1e3;
|
|
29615
29625
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -29824,7 +29834,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29824
29834
|
return found;
|
|
29825
29835
|
}, "elements");
|
|
29826
29836
|
|
|
29827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29828
29838
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29829
29839
|
let name = "";
|
|
29830
29840
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -29879,7 +29889,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
29879
29889
|
return { text: parts.join("").trim(), truncated: false };
|
|
29880
29890
|
}, "sheetText");
|
|
29881
29891
|
|
|
29882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29883
29893
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
29884
29894
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
29885
29895
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -30279,10 +30289,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
30279
30289
|
}
|
|
30280
30290
|
}, "readDocument");
|
|
30281
30291
|
|
|
30282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30283
30293
|
import { extname as extname3 } from "node:path";
|
|
30284
30294
|
|
|
30285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
30286
30296
|
import { readFileSync } from "node:fs";
|
|
30287
30297
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
30288
30298
|
import { fileURLToPath } from "node:url";
|
|
@@ -30343,7 +30353,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
30343
30353
|
}
|
|
30344
30354
|
}, "derived");
|
|
30345
30355
|
|
|
30346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
30347
30357
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
30348
30358
|
var image2 = {
|
|
30349
30359
|
id: "image",
|
|
@@ -30352,7 +30362,7 @@ var image2 = {
|
|
|
30352
30362
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
30353
30363
|
};
|
|
30354
30364
|
|
|
30355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30365
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
30356
30366
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
30357
30367
|
var doc = {
|
|
30358
30368
|
id: "doc",
|
|
@@ -30364,7 +30374,7 @@ var doc = {
|
|
|
30364
30374
|
}), "read")
|
|
30365
30375
|
};
|
|
30366
30376
|
|
|
30367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
30368
30378
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
30369
30379
|
var docx = {
|
|
30370
30380
|
id: "docx",
|
|
@@ -30377,7 +30387,7 @@ var docx = {
|
|
|
30377
30387
|
}), "read")
|
|
30378
30388
|
};
|
|
30379
30389
|
|
|
30380
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30390
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30381
30391
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
30382
30392
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
30383
30393
|
"fonttbl",
|
|
@@ -30553,7 +30563,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
30553
30563
|
}, "htmlText");
|
|
30554
30564
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
30555
30565
|
|
|
30556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
30557
30567
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
30558
30568
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
30559
30569
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -30609,7 +30619,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
30609
30619
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
30610
30620
|
}, "markdownSections");
|
|
30611
30621
|
|
|
30612
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
30613
30623
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
30614
30624
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
30615
30625
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -30680,7 +30690,7 @@ var html = {
|
|
|
30680
30690
|
}, "read")
|
|
30681
30691
|
};
|
|
30682
30692
|
|
|
30683
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
30684
30694
|
var office = {
|
|
30685
30695
|
id: "office",
|
|
30686
30696
|
version: documentExtractor("odt"),
|
|
@@ -30691,7 +30701,7 @@ var office = {
|
|
|
30691
30701
|
}, "read")
|
|
30692
30702
|
};
|
|
30693
30703
|
|
|
30694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
30695
30705
|
var pdf = {
|
|
30696
30706
|
id: "pdf",
|
|
30697
30707
|
version: "unpdf",
|
|
@@ -30758,7 +30768,7 @@ var pdf = {
|
|
|
30758
30768
|
}), "read")
|
|
30759
30769
|
};
|
|
30760
30770
|
|
|
30761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30771
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30762
30772
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30763
30773
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30764
30774
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30778,7 +30788,7 @@ var plain = {
|
|
|
30778
30788
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30779
30789
|
};
|
|
30780
30790
|
|
|
30781
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30782
30792
|
var rtf = {
|
|
30783
30793
|
id: "rtf",
|
|
30784
30794
|
version: "v1",
|
|
@@ -30786,10 +30796,10 @@ var rtf = {
|
|
|
30786
30796
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30787
30797
|
};
|
|
30788
30798
|
|
|
30789
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30790
30800
|
import { basename as basename5 } from "node:path";
|
|
30791
30801
|
|
|
30792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30793
30803
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
30794
30804
|
const cells = [];
|
|
30795
30805
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -30827,7 +30837,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
30827
30837
|
return { cells, truncated };
|
|
30828
30838
|
}, "delimitedSpans");
|
|
30829
30839
|
|
|
30830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30840
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30831
30841
|
var DELIMITED = {
|
|
30832
30842
|
".csv": ",",
|
|
30833
30843
|
".tsv": " ",
|
|
@@ -30866,7 +30876,7 @@ var sheets = {
|
|
|
30866
30876
|
}, "read")
|
|
30867
30877
|
};
|
|
30868
30878
|
|
|
30869
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
30870
30880
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
30871
30881
|
var HEAD_BYTES = 1024;
|
|
30872
30882
|
var readers = [...BUILT_INS2];
|
|
@@ -30876,7 +30886,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
30876
30886
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
30877
30887
|
}, "readWithRegistry");
|
|
30878
30888
|
|
|
30879
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30880
30890
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
30881
30891
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
30882
30892
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -31955,7 +31965,7 @@ function imageSize(input) {
|
|
|
31955
31965
|
}
|
|
31956
31966
|
__name(imageSize, "imageSize");
|
|
31957
31967
|
|
|
31958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31968
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
31959
31969
|
var MAX_PAGES = 20;
|
|
31960
31970
|
var MAX_PIXELS = 2e7;
|
|
31961
31971
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -32106,7 +32116,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
32106
32116
|
}
|
|
32107
32117
|
}, "ocrPdf");
|
|
32108
32118
|
|
|
32109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32119
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
32110
32120
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
32111
32121
|
const limits = pdfPreviewLimits(env);
|
|
32112
32122
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -32183,7 +32193,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
32183
32193
|
}
|
|
32184
32194
|
}, "pdfPreview");
|
|
32185
32195
|
|
|
32186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
32187
32197
|
import { createHash as createHash8 } from "node:crypto";
|
|
32188
32198
|
import { constants } from "node:fs";
|
|
32189
32199
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -32291,7 +32301,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
32291
32301
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
32292
32302
|
}, "transferMime");
|
|
32293
32303
|
|
|
32294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32304
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
32295
32305
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
32296
32306
|
import { link as link3, rm } from "node:fs/promises";
|
|
32297
32307
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -32405,7 +32415,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
32405
32415
|
}
|
|
32406
32416
|
}, "save");
|
|
32407
32417
|
|
|
32408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
32409
32419
|
var ATTACHMENT_QUERY = {
|
|
32410
32420
|
entity: "attachment",
|
|
32411
32421
|
backend: "sql",
|
|
@@ -32828,7 +32838,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32828
32838
|
}, "setText")
|
|
32829
32839
|
}), "attachmentsService");
|
|
32830
32840
|
|
|
32831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32841
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32832
32842
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32833
32843
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32834
32844
|
const store = await accountStore(deps);
|
|
@@ -32858,7 +32868,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32858
32868
|
}, "list")
|
|
32859
32869
|
}), "chatDocumentsService");
|
|
32860
32870
|
|
|
32861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32871
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32862
32872
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32863
32873
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32864
32874
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32945,7 +32955,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32945
32955
|
}
|
|
32946
32956
|
}, "isRetentionSelection");
|
|
32947
32957
|
|
|
32948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32958
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32949
32959
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32950
32960
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
32951
32961
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -33152,7 +33162,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33152
33162
|
};
|
|
33153
33163
|
}, "countersService");
|
|
33154
33164
|
|
|
33155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
33156
33166
|
var SYNC_KEY = "messages.sync-first";
|
|
33157
33167
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
33158
33168
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -33284,7 +33294,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
33284
33294
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
33285
33295
|
}), "withRefresh");
|
|
33286
33296
|
|
|
33287
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
33288
33298
|
var CANDIDATES = 50;
|
|
33289
33299
|
var WORD_HITS = 200;
|
|
33290
33300
|
var RRF_K = 60;
|
|
@@ -33559,13 +33569,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33559
33569
|
return mean2.map((value) => value / length);
|
|
33560
33570
|
}, "meanOf");
|
|
33561
33571
|
|
|
33562
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
33563
33573
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33564
33574
|
...embeddingsMaintenance(deps),
|
|
33565
33575
|
...embeddingsSearch(deps)
|
|
33566
33576
|
}), "embeddingsService");
|
|
33567
33577
|
|
|
33568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
33569
33579
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33570
33580
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33571
33581
|
if (deps.offline)
|
|
@@ -33618,7 +33628,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33618
33628
|
const known2 = /* @__PURE__ */ new Map();
|
|
33619
33629
|
for (const one2 of held ? (await held.store.chats.chats(held.account, {})).items : [])
|
|
33620
33630
|
known2.set(one2.id, { id: one2.id, title: one2.title, kind: one2.kind });
|
|
33621
|
-
const
|
|
33631
|
+
const named4 = /* @__PURE__ */ __name(async (ids2) => {
|
|
33622
33632
|
const chats = [];
|
|
33623
33633
|
for (const id2 of ids2) {
|
|
33624
33634
|
let found = known2.get(id2);
|
|
@@ -33636,9 +33646,9 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33636
33646
|
}, "named");
|
|
33637
33647
|
return {
|
|
33638
33648
|
...folder,
|
|
33639
|
-
chats: await
|
|
33640
|
-
pinned: await
|
|
33641
|
-
excluded: await
|
|
33649
|
+
chats: await named4(chatIds),
|
|
33650
|
+
pinned: await named4(pinnedChatIds),
|
|
33651
|
+
excluded: await named4(excludedChatIds)
|
|
33642
33652
|
};
|
|
33643
33653
|
}, "show"),
|
|
33644
33654
|
create: /* @__PURE__ */ __name(async (title, chats, edit = {}) => {
|
|
@@ -33681,15 +33691,15 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33681
33691
|
throw new CliError("validation_error", "name the folders in the order you want them");
|
|
33682
33692
|
const connection = await online("chats folders order");
|
|
33683
33693
|
const reorder = capability(connection, "orderFolders", "order folders");
|
|
33684
|
-
const
|
|
33694
|
+
const named4 = [];
|
|
33685
33695
|
for (const one2 of typed) {
|
|
33686
33696
|
const folder = await folderOf(connection, one2);
|
|
33687
|
-
if (
|
|
33697
|
+
if (named4.some((seen2) => seen2.id === folder.id))
|
|
33688
33698
|
throw new CliError("validation_error", `"${one2}" is named twice`);
|
|
33689
|
-
|
|
33699
|
+
named4.push(folder);
|
|
33690
33700
|
}
|
|
33691
33701
|
const all = await capability(connection, "folders", "list its folders")();
|
|
33692
|
-
const folders = [...
|
|
33702
|
+
const folders = [...named4, ...all.filter((one2) => !named4.some((seen2) => seen2.id === one2.id))];
|
|
33693
33703
|
const operationId = newOperationId();
|
|
33694
33704
|
await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: "folder-order" }, () => reorder(folders.map((one2) => one2.id)));
|
|
33695
33705
|
return { operationId, folders: folders.map(({ id: id2, title }) => ({ id: id2, title })) };
|
|
@@ -33706,7 +33716,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33706
33716
|
};
|
|
33707
33717
|
}, "foldersService");
|
|
33708
33718
|
|
|
33709
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33710
33720
|
var REVIEW_COUNT = 500;
|
|
33711
33721
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33712
33722
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33785,7 +33795,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33785
33795
|
};
|
|
33786
33796
|
}, "mentionsService");
|
|
33787
33797
|
|
|
33788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
33789
33799
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
33790
33800
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
33791
33801
|
const { text: text2, spans } = formatted2;
|
|
@@ -33845,7 +33855,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
33845
33855
|
};
|
|
33846
33856
|
}, "visibleFormattedText");
|
|
33847
33857
|
|
|
33848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33849
33859
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33850
33860
|
position,
|
|
33851
33861
|
kind,
|
|
@@ -33854,18 +33864,18 @@ var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).ma
|
|
|
33854
33864
|
reason: "unsupported_provider"
|
|
33855
33865
|
})), "fileLinks");
|
|
33856
33866
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
33857
|
-
const
|
|
33858
|
-
if (
|
|
33867
|
+
const named4 = chatReferenceOf(reference, provider, "message");
|
|
33868
|
+
if (named4?.message !== void 0) {
|
|
33859
33869
|
if (message !== void 0)
|
|
33860
33870
|
throw new CliError("validation_error", "a locator already names the message");
|
|
33861
|
-
validMessageId(
|
|
33862
|
-
return { chat:
|
|
33871
|
+
validMessageId(named4.message);
|
|
33872
|
+
return { chat: named4.chat, message: named4.message, account: named4.account, text: named4.text };
|
|
33863
33873
|
}
|
|
33864
33874
|
if (message === void 0)
|
|
33865
33875
|
throw new CliError("validation_error", "which message? give its id after the chat");
|
|
33866
33876
|
validMessageId(message);
|
|
33867
|
-
if (
|
|
33868
|
-
return { chat:
|
|
33877
|
+
if (named4)
|
|
33878
|
+
return { chat: named4.chat, message, account: named4.account, text: named4.text };
|
|
33869
33879
|
if (!reference.trim())
|
|
33870
33880
|
throw new CliError("validation_error", "which chat? give its id or title");
|
|
33871
33881
|
return { chat: reference, message, account: void 0, text: reference };
|
|
@@ -33894,7 +33904,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33894
33904
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33895
33905
|
}, "validatePermalink");
|
|
33896
33906
|
|
|
33897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33898
33908
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33899
33909
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33900
33910
|
return `${seconds / 86400}d`;
|
|
@@ -33926,7 +33936,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33926
33936
|
return seconds;
|
|
33927
33937
|
}, "pinDurationOf");
|
|
33928
33938
|
|
|
33929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33930
33940
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33931
33941
|
if (sendAs === void 0) {
|
|
33932
33942
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33951,7 +33961,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33951
33961
|
return sendAs;
|
|
33952
33962
|
}, "typedSendAs");
|
|
33953
33963
|
|
|
33954
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33955
33965
|
var TOTAL_CAP = 1e4;
|
|
33956
33966
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33957
33967
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33962,7 +33972,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33962
33972
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33963
33973
|
}, "totalOf");
|
|
33964
33974
|
|
|
33965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33966
33976
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33967
33977
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33968
33978
|
let narrows = false;
|
|
@@ -33991,7 +34001,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33991
34001
|
return wanted(root).join(" ").trim();
|
|
33992
34002
|
}, "meaningWords");
|
|
33993
34003
|
|
|
33994
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33995
34005
|
var words3 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33996
34006
|
var scaffolding = new Set(words3("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"));
|
|
33997
34007
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -34124,7 +34134,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
34124
34134
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
34125
34135
|
}, "questionLookup");
|
|
34126
34136
|
|
|
34127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34137
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
34128
34138
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
34129
34139
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
34130
34140
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -34317,7 +34327,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
34317
34327
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
34318
34328
|
}, "signals");
|
|
34319
34329
|
|
|
34320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
34321
34331
|
var MEANING_DEPTH = 100;
|
|
34322
34332
|
var RRF_K2 = 60;
|
|
34323
34333
|
var RERANK_DEPTH = 50;
|
|
@@ -34588,17 +34598,17 @@ var filterPks = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34588
34598
|
return pks === void 0 || pks.length > RANK_WITHIN_MESSAGES ? void 0 : pks;
|
|
34589
34599
|
}, "filterPks");
|
|
34590
34600
|
var nearEligible = /* @__PURE__ */ __name(async (store, account, request, messenger, ranked, scope) => {
|
|
34591
|
-
const
|
|
34592
|
-
const only = ranked.slice(0, MEANING_DEPTH).filter((m) => !request.only || request.only.some((key) =>
|
|
34601
|
+
const keyOf6 = /* @__PURE__ */ __name((one2) => JSON.stringify([one2.provider, one2.account, one2.chatId, one2.id]), "keyOf");
|
|
34602
|
+
const only = ranked.slice(0, MEANING_DEPTH).filter((m) => !request.only || request.only.some((key) => keyOf6(key) === keyOf6(m))).map(({ provider, account: account2, chatId, id: id2 }) => ({ provider, account: account2, chatId, id: id2 }));
|
|
34593
34603
|
if (!only.length)
|
|
34594
34604
|
return [];
|
|
34595
34605
|
const eligible = await searchLucene(store, account, { ...request, text: void 0, ast: void 0, ...scope, limit: only.length, only, context: 0, thread: void 0 }, messenger);
|
|
34596
34606
|
const hits = new Map(eligible.items.map((hit) => {
|
|
34597
34607
|
const { provider, account: account2 } = parseLocator(hit.locator);
|
|
34598
|
-
return [
|
|
34608
|
+
return [keyOf6({ provider, account: account2, chatId: hit.chatId, id: hit.id }), hit];
|
|
34599
34609
|
}));
|
|
34600
34610
|
return ranked.flatMap((m) => {
|
|
34601
|
-
const hit = hits.get(
|
|
34611
|
+
const hit = hits.get(keyOf6(m));
|
|
34602
34612
|
return hit ? [{ ...hit, cosine: m.score }] : [];
|
|
34603
34613
|
});
|
|
34604
34614
|
}, "nearEligible");
|
|
@@ -34642,7 +34652,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
34642
34652
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
34643
34653
|
}, "mixedWithReranker");
|
|
34644
34654
|
|
|
34645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
34646
34656
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
34647
34657
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
34648
34658
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -34841,7 +34851,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34841
34851
|
return result;
|
|
34842
34852
|
}, "readThreadContext");
|
|
34843
34853
|
|
|
34844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34845
34855
|
var SEARCH_FILL_MS = 200;
|
|
34846
34856
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34847
34857
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34910,12 +34920,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34910
34920
|
}, "accountOf");
|
|
34911
34921
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34912
34922
|
|
|
34913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34923
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34914
34924
|
import { createHash as createHash10 } from "node:crypto";
|
|
34915
34925
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
34916
34926
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
34917
34927
|
|
|
34918
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
34919
34929
|
var GROUP_SETTINGS = [
|
|
34920
34930
|
"allCanPin",
|
|
34921
34931
|
"onlyAdminsAdd",
|
|
@@ -34929,7 +34939,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
34929
34939
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
34930
34940
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
34931
34941
|
|
|
34932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34933
34943
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
34934
34944
|
var PICTURE_FLOOR = 0.25;
|
|
34935
34945
|
var PAGE4 = 50;
|
|
@@ -34946,7 +34956,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34946
34956
|
const directory2 = imageModelsDirectory(deps.env);
|
|
34947
34957
|
if (!isImageModelInstalled(model2, directory2))
|
|
34948
34958
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
34949
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34959
|
+
const { openPictureEmbedder } = await import("./embedder-IWJHHYLE.js");
|
|
34950
34960
|
return openPictureEmbedder(model2, directory2);
|
|
34951
34961
|
}, "open");
|
|
34952
34962
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -35143,7 +35153,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
35143
35153
|
}, "search")
|
|
35144
35154
|
}), "withPictures");
|
|
35145
35155
|
|
|
35146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
35147
35157
|
var meaningText = /* @__PURE__ */ __name((question) => {
|
|
35148
35158
|
try {
|
|
35149
35159
|
const text2 = questionLookup(question) === void 0 ? question : questionText(question);
|
|
@@ -35223,7 +35233,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35223
35233
|
}
|
|
35224
35234
|
}, "meaningLane");
|
|
35225
35235
|
|
|
35226
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35236
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
35227
35237
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
35228
35238
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
35229
35239
|
if (choice === "off")
|
|
@@ -35235,9 +35245,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35235
35245
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
35236
35246
|
try {
|
|
35237
35247
|
const warm = deps.embedders;
|
|
35238
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
35248
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-KQ5PLFEX.js")).openRerankerProcess(model, directory2, {
|
|
35239
35249
|
threads: defaultThreads()
|
|
35240
|
-
})) : await (await import("./rerank-
|
|
35250
|
+
})) : await (await import("./rerank-46KI3363.js")).openReranker(model, directory2);
|
|
35241
35251
|
return {
|
|
35242
35252
|
model: model.id,
|
|
35243
35253
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -35257,22 +35267,22 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35257
35267
|
};
|
|
35258
35268
|
}, "rerankLane");
|
|
35259
35269
|
|
|
35260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35270
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
35261
35271
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
35262
35272
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
35263
35273
|
const directory2 = imageModelsDirectory(env);
|
|
35264
35274
|
if (!isImageModelInstalled(model, directory2))
|
|
35265
35275
|
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 });
|
|
35266
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
35276
|
+
const { openPictureEmbedder } = await import("./embedder-IWJHHYLE.js");
|
|
35267
35277
|
return openPictureEmbedder(model, directory2);
|
|
35268
35278
|
}, "openPictureEmbedderFor");
|
|
35269
35279
|
|
|
35270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
35271
35281
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
35272
35282
|
const metadata = note2.frontMatter;
|
|
35273
35283
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
35274
35284
|
const remote = note2.source === "file" && (account !== void 0 && kindIn(account.provider) === "documents" || metadata?.source === "google-drive");
|
|
35275
|
-
const profile = remote && account ? Object.entries(profiles).flatMap(([command,
|
|
35285
|
+
const profile = remote && account ? Object.entries(profiles).flatMap(([command, named4]) => Object.entries(named4).map(([name, key]) => ({ command, name, key }))).find(({ key }) => key.provider === account.provider && key.account === account.account || isFolderProvider(key.provider) && key.account === account.name) : void 0;
|
|
35276
35286
|
const url = file2?.url ?? (remote && typeof metadata?.sourceUrl === "string" ? metadata.sourceUrl : void 0);
|
|
35277
35287
|
return {
|
|
35278
35288
|
kind: remote ? "document" : "note",
|
|
@@ -35282,7 +35292,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
35282
35292
|
};
|
|
35283
35293
|
}, "documentSource");
|
|
35284
35294
|
|
|
35285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
35286
35296
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
35287
35297
|
let root;
|
|
35288
35298
|
try {
|
|
@@ -35309,7 +35319,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
|
35309
35319
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
35310
35320
|
}, "titleTiers");
|
|
35311
35321
|
|
|
35312
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
35313
35323
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
35314
35324
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
35315
35325
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35739,9 +35749,9 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35739
35749
|
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
35740
35750
|
...[await store.notes.addedAccount()].flatMap((added) => added ? [{ provider: "notes", account: added.id }] : [])
|
|
35741
35751
|
];
|
|
35742
|
-
const
|
|
35752
|
+
const named4 = list3 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list3, await listContextOf(store, account, app)), ["notes", "documents"], what);
|
|
35743
35753
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
35744
|
-
const typed =
|
|
35754
|
+
const typed = named4.accounts.filter(({ account: account2 }) => source === void 0 || account2 === INTERNAL_NOTES === (source === "internal"));
|
|
35745
35755
|
if (!typed.length && list3 !== void 0)
|
|
35746
35756
|
throw new CliError("validation_error", source === "internal" ? "the query's source:internal keeps the notes written in memo, and the --source list names none of them: add notes:internal to --source, or drop source:internal from the query" : "the query's source:file keeps the files from notes folders, and the --source list names none of them: add notes:<folder id> to --source, or drop source:file from the query");
|
|
35747
35757
|
const scope = list3 === void 0 ? {} : notesScopeOf(typed);
|
|
@@ -35753,11 +35763,11 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35753
35763
|
return {
|
|
35754
35764
|
...found,
|
|
35755
35765
|
accounts: typed.map(({ account: account2 }) => ({ resource: "notes", provider: "notes", account: account2 })),
|
|
35756
|
-
skipped:
|
|
35766
|
+
skipped: named4.skipped
|
|
35757
35767
|
};
|
|
35758
35768
|
}, "searchNotesOf");
|
|
35759
35769
|
|
|
35760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35770
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35761
35771
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35762
35772
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35763
35773
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -35875,8 +35885,39 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35875
35885
|
};
|
|
35876
35886
|
}, "searchEvents");
|
|
35877
35887
|
|
|
35878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35879
|
-
var
|
|
35888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-all-business.js
|
|
35889
|
+
var OWN_BUSINESS = { provider: "business", account: INTERNAL_NOTES };
|
|
35890
|
+
var BUSINESS_WORDS_ONLY = "invoices, payments, orders, contracts, subscriptions, products and wallets are found by the words of their numbers and names only";
|
|
35891
|
+
var placeOf = /* @__PURE__ */ __name(({ source, imported }) => source ?? (imported === void 0 ? OWN_BUSINESS : { provider: imported, account: "" }), "placeOf");
|
|
35892
|
+
var searchBusiness = /* @__PURE__ */ __name(async (store, { words: words4, anyWord, window: window3, accounts }) => {
|
|
35893
|
+
const asked = Math.min(window3 + 1, BUSINESS_FIND_MAX);
|
|
35894
|
+
const found = await store.business.find({
|
|
35895
|
+
words: words4,
|
|
35896
|
+
anyWord,
|
|
35897
|
+
limit: asked,
|
|
35898
|
+
...accounts === void 0 ? {} : { accounts }
|
|
35899
|
+
});
|
|
35900
|
+
const page = found.slice(0, window3);
|
|
35901
|
+
const titles = await store.refs.summaries(page.map(({ ref }) => ref));
|
|
35902
|
+
return {
|
|
35903
|
+
items: page.map((hit) => ({
|
|
35904
|
+
kind: hit.kind,
|
|
35905
|
+
ref: hit.ref,
|
|
35906
|
+
...placeOf(hit),
|
|
35907
|
+
title: titles.get(hit.ref)?.title ?? null,
|
|
35908
|
+
timestamp: new Date(hit.updatedAt).toISOString(),
|
|
35909
|
+
text: hit.text,
|
|
35910
|
+
review: hit.review,
|
|
35911
|
+
...hit.source === void 0 ? {} : { sourceRecord: hit.source },
|
|
35912
|
+
foundBy: ["title"]
|
|
35913
|
+
})),
|
|
35914
|
+
hasMore: found.length > window3 || asked < window3 + 1 && found.length === asked,
|
|
35915
|
+
read: accounts ?? [...await store.business.accounts(), OWN_BUSINESS]
|
|
35916
|
+
};
|
|
35917
|
+
}, "searchBusiness");
|
|
35918
|
+
|
|
35919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
35920
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm", "business"];
|
|
35880
35921
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
35881
35922
|
const { reason, span } = error.details ?? {};
|
|
35882
35923
|
const why = typeof reason === "string" ? reason : void 0;
|
|
@@ -35890,14 +35931,14 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
35890
35931
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
35891
35932
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
35892
35933
|
}, "filtersBeside");
|
|
35893
|
-
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
35934
|
+
var titleWords = /* @__PURE__ */ __name((text2, refused = "deals and leads are found by the words of their title only") => {
|
|
35894
35935
|
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
35895
35936
|
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
35896
35937
|
const words4 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? (
|
|
35897
35938
|
// A title holds "invoice", not the question mark of "invoice?".
|
|
35898
35939
|
node.value.replace(/\?+$/u, "") || node.value
|
|
35899
35940
|
) : (() => {
|
|
35900
|
-
throw new CliError("validation_error",
|
|
35941
|
+
throw new CliError("validation_error", refused);
|
|
35901
35942
|
})());
|
|
35902
35943
|
return { words: words4, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
35903
35944
|
}, "titleWords");
|
|
@@ -36116,6 +36157,18 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, asked, messenger =
|
|
|
36116
36157
|
const read2 = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
36117
36158
|
for (const { provider, account: account2 } of read2)
|
|
36118
36159
|
accounts.push({ resource, provider, account: account2 });
|
|
36160
|
+
} else if (resource === "business") {
|
|
36161
|
+
const { words: words4, anyWord } = titleWords(request.text, BUSINESS_WORDS_ONLY);
|
|
36162
|
+
const found = await searchBusiness(store, {
|
|
36163
|
+
words: words4,
|
|
36164
|
+
anyWord: anyWord || discover,
|
|
36165
|
+
window: window3,
|
|
36166
|
+
accounts: request.scope?.business
|
|
36167
|
+
});
|
|
36168
|
+
hasMore ||= found.hasMore;
|
|
36169
|
+
lists.push(found.items);
|
|
36170
|
+
for (const { provider, account: account2 } of found.read)
|
|
36171
|
+
accounts.push({ resource, provider, account: account2 });
|
|
36119
36172
|
} else
|
|
36120
36173
|
lists.push(await messagesOf(resource));
|
|
36121
36174
|
searched.push(resource);
|
|
@@ -36168,7 +36221,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
36168
36221
|
return [...place.values()].sort((a, b) => head(a.rank) - head(b.rank) || cosine(b.item.ref) - cosine(a.item.ref) || a.rank - b.rank).map(({ item: item2 }) => item2);
|
|
36169
36222
|
}, "oneList");
|
|
36170
36223
|
|
|
36171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
36172
36225
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
36173
36226
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
36174
36227
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -36377,44 +36430,48 @@ var searchAllWithMeetings = /* @__PURE__ */ __name(async (store, account, reques
|
|
|
36377
36430
|
skipped: [...found.skipped, { resource: "meetings", code: "validation_error", reason: MEETINGS_UNNAMED }]
|
|
36378
36431
|
} : found;
|
|
36379
36432
|
}, "searchAllWithMeetings");
|
|
36380
|
-
var holdingMeetings = /* @__PURE__ */ __name(async (store,
|
|
36381
|
-
if (
|
|
36382
|
-
return
|
|
36433
|
+
var holdingMeetings = /* @__PURE__ */ __name(async (store, named4) => {
|
|
36434
|
+
if (named4.length < 2)
|
|
36435
|
+
return named4;
|
|
36383
36436
|
const holding2 = [];
|
|
36384
|
-
for (const key of
|
|
36437
|
+
for (const key of named4) {
|
|
36385
36438
|
const { id: id2 } = await store.accounts.storedAccount(key);
|
|
36386
36439
|
if ((await store.meetings.meetings({ accountId: id2, limit: 1 })).length)
|
|
36387
36440
|
holding2.push(key);
|
|
36388
36441
|
}
|
|
36389
|
-
return holding2.length ? holding2 :
|
|
36442
|
+
return holding2.length ? holding2 : named4;
|
|
36390
36443
|
}, "holdingMeetings");
|
|
36444
|
+
var keyOf5 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}\0${account}`, "keyOf");
|
|
36391
36445
|
var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, request, messenger, searchMessages, meaning) => {
|
|
36392
36446
|
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
36393
36447
|
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
36394
|
-
const
|
|
36395
|
-
const
|
|
36396
|
-
|
|
36448
|
+
const imported = only.includes("business") ? new Set((await store.business.accounts()).map(keyOf5)) : /* @__PURE__ */ new Set();
|
|
36449
|
+
const holdsBusiness = /* @__PURE__ */ __name((one2) => imported.has(keyOf5(one2)), "holdsBusiness");
|
|
36450
|
+
const { skipped } = fitting(entries, only.filter((one2) => one2 !== "business"), "search all", (kind) => `--only leaves ${kind} out`, holdsBusiness);
|
|
36451
|
+
const named4 = /* @__PURE__ */ __name((resource) => [
|
|
36452
|
+
...new Map(entries.flatMap(({ accounts }) => accounts).filter((one2) => resource === "business" ? holdsBusiness(one2) : listedHolds(one2, resource)).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
36397
36453
|
], "named");
|
|
36398
|
-
const meetings = await holdingMeetings(store,
|
|
36399
|
-
const empty2 =
|
|
36454
|
+
const meetings = await holdingMeetings(store, named4("meetings"));
|
|
36455
|
+
const empty2 = named4("meetings").filter((one2) => !meetings.some(({ provider, account: account2 }) => provider === one2.provider && account2 === one2.account)).map(({ provider, account: account2 }) => ({
|
|
36400
36456
|
source: `${provider}:${account2}`,
|
|
36401
36457
|
code: "not_found",
|
|
36402
36458
|
reason: "no meetings stored for it"
|
|
36403
36459
|
}));
|
|
36404
36460
|
if (only.includes("meetings") && meetings.length > 1)
|
|
36405
36461
|
throw new CliError("validation_error", `--source names several meeting accounts; search all reads one: ${meetings.map(({ provider, account: account2 }) => `${provider}:${account2}`).join(", ")}`);
|
|
36406
|
-
const read2 = only.filter((resource) =>
|
|
36462
|
+
const read2 = only.filter((resource) => named4(resource).length > 0);
|
|
36407
36463
|
if (read2.includes("meetings") && request.offset !== void 0)
|
|
36408
36464
|
throw new CliError("validation_error", "--offset pages messages, mail and notes; not with a meeting account yet");
|
|
36409
36465
|
const found = await searchAllIncludingMeetings(store, account, {
|
|
36410
36466
|
...request,
|
|
36411
36467
|
only: read2,
|
|
36412
36468
|
scope: {
|
|
36413
|
-
messages:
|
|
36414
|
-
mail:
|
|
36415
|
-
notes:
|
|
36416
|
-
events:
|
|
36417
|
-
crm:
|
|
36469
|
+
messages: named4("messages"),
|
|
36470
|
+
mail: named4("mail"),
|
|
36471
|
+
notes: named4("notes"),
|
|
36472
|
+
events: named4("events"),
|
|
36473
|
+
crm: named4("crm"),
|
|
36474
|
+
business: named4("business")
|
|
36418
36475
|
},
|
|
36419
36476
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
36420
36477
|
}, messenger, searchMessages, meaning);
|
|
@@ -36422,7 +36479,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
36422
36479
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
36423
36480
|
}, "searchAllOfSource");
|
|
36424
36481
|
|
|
36425
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36482
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36426
36483
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36427
36484
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36428
36485
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36611,7 +36668,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36611
36668
|
return { report, sources };
|
|
36612
36669
|
}, "searchServer");
|
|
36613
36670
|
|
|
36614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36615
36672
|
var DELETE_AT_ONCE = 10;
|
|
36616
36673
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36617
36674
|
const files = fileLinks(attachments);
|
|
@@ -37052,7 +37109,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
37052
37109
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
37053
37110
|
}, "checkMediaOptions");
|
|
37054
37111
|
|
|
37055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37112
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
37056
37113
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
37057
37114
|
var RULES = {
|
|
37058
37115
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -37067,7 +37124,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
37067
37124
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
37068
37125
|
}), "classifyChannel");
|
|
37069
37126
|
|
|
37070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37127
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
37071
37128
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
37072
37129
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
37073
37130
|
const store = await deps.store();
|
|
@@ -37153,7 +37210,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
37153
37210
|
};
|
|
37154
37211
|
}, "metadataService");
|
|
37155
37212
|
|
|
37156
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
37157
37214
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
37158
37215
|
var LINK2 = /https?:\/\/\S+/i;
|
|
37159
37216
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -37341,7 +37398,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
37341
37398
|
}, "nextPoint");
|
|
37342
37399
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
37343
37400
|
|
|
37344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
37345
37402
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
37346
37403
|
import { join as join11 } from "node:path";
|
|
37347
37404
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -37484,7 +37541,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
37484
37541
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
37485
37542
|
}, "assign");
|
|
37486
37543
|
|
|
37487
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37488
37545
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37489
37546
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
37490
37547
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -37521,7 +37578,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
37521
37578
|
return { chatId, rows, notes };
|
|
37522
37579
|
}, "moderateWith");
|
|
37523
37580
|
|
|
37524
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37581
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37525
37582
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37526
37583
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37527
37584
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37599,7 +37656,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37599
37656
|
}, "removePerson")
|
|
37600
37657
|
}), "moderatorOf");
|
|
37601
37658
|
|
|
37602
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37659
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37603
37660
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
37604
37661
|
id: note2.id,
|
|
37605
37662
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -37643,7 +37700,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37643
37700
|
};
|
|
37644
37701
|
}, "privatePeopleService");
|
|
37645
37702
|
|
|
37646
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37647
37704
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37648
37705
|
total: 0,
|
|
37649
37706
|
population: 0,
|
|
@@ -37899,7 +37956,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37899
37956
|
}, "evidence")
|
|
37900
37957
|
}), "rankingsService");
|
|
37901
37958
|
|
|
37902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37903
37960
|
var FIELDS = ["date", "chat", "kind"];
|
|
37904
37961
|
var WAITING_TAIL = 100;
|
|
37905
37962
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37993,9 +38050,9 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37993
38050
|
}
|
|
37994
38051
|
const days = /* @__PURE__ */ new Map();
|
|
37995
38052
|
if (by === "day") {
|
|
37996
|
-
const
|
|
38053
|
+
const keyOf6 = calendarKey(timezone, "day");
|
|
37997
38054
|
for (const { repliedAt, delayMs } of delays) {
|
|
37998
|
-
const key =
|
|
38055
|
+
const key = keyOf6(repliedAt);
|
|
37999
38056
|
const list3 = days.get(key) ?? [];
|
|
38000
38057
|
list3.push(delayMs);
|
|
38001
38058
|
days.set(key, list3);
|
|
@@ -38026,7 +38083,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38026
38083
|
};
|
|
38027
38084
|
}, "replyStatsService");
|
|
38028
38085
|
|
|
38029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
38030
38087
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
38031
38088
|
id: one2.id,
|
|
38032
38089
|
name: one2.name,
|
|
@@ -38062,7 +38119,7 @@ var checked = /* @__PURE__ */ __name((params) => {
|
|
|
38062
38119
|
validateFields(parseLucene(params.text, { ...MESSAGE_PARSING, defaultField: params.exact ? "exact" : "text" }));
|
|
38063
38120
|
return params;
|
|
38064
38121
|
}, "checked");
|
|
38065
|
-
var
|
|
38122
|
+
var named3 = /* @__PURE__ */ __name((search, check2) => {
|
|
38066
38123
|
try {
|
|
38067
38124
|
check2();
|
|
38068
38125
|
} catch (error) {
|
|
@@ -38136,7 +38193,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
38136
38193
|
...inherited,
|
|
38137
38194
|
...Object.fromEntries(Object.entries(typed).filter(([, one2]) => one2 !== void 0))
|
|
38138
38195
|
};
|
|
38139
|
-
|
|
38196
|
+
named3(search, () => {
|
|
38140
38197
|
if (search.language !== "lucene-v1")
|
|
38141
38198
|
throw new CliError("validation_error", "the legacy search and --regex are gone; save it again as Lucene");
|
|
38142
38199
|
checked(stored);
|
|
@@ -38155,7 +38212,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
38155
38212
|
};
|
|
38156
38213
|
}, "searchesService");
|
|
38157
38214
|
|
|
38158
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
38159
38216
|
var TAGGING_QUERY = {
|
|
38160
38217
|
entity: "tagging",
|
|
38161
38218
|
backend: "sql",
|
|
@@ -38239,7 +38296,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38239
38296
|
};
|
|
38240
38297
|
}, "tagsService");
|
|
38241
38298
|
|
|
38242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38243
38300
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38244
38301
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
38245
38302
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38438,7 +38495,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38438
38495
|
};
|
|
38439
38496
|
}, "topicsService");
|
|
38440
38497
|
|
|
38441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38498
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38442
38499
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
38443
38500
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38444
38501
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38512,7 +38569,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38512
38569
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
38513
38570
|
}, "prepareEvidencePacket");
|
|
38514
38571
|
|
|
38515
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38516
38573
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38517
38574
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38518
38575
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38532,7 +38589,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38532
38589
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38533
38590
|
}, "readEvidencePacket");
|
|
38534
38591
|
|
|
38535
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38592
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
38536
38593
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
38537
38594
|
let before2 = Number.POSITIVE_INFINITY;
|
|
38538
38595
|
for (; ; ) {
|
|
@@ -38594,7 +38651,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
38594
38651
|
return { ...result, selection };
|
|
38595
38652
|
}, "searchMeetingHits");
|
|
38596
38653
|
|
|
38597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38654
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38598
38655
|
import { createHash as createHash12 } from "node:crypto";
|
|
38599
38656
|
var scopeKeys = [
|
|
38600
38657
|
"accountId",
|
|
@@ -38729,7 +38786,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
38729
38786
|
};
|
|
38730
38787
|
}, "readMeetingProjectDiscovery");
|
|
38731
38788
|
|
|
38732
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/text-model-choice.js
|
|
38733
38790
|
import { createHash as createHash13 } from "node:crypto";
|
|
38734
38791
|
import { existsSync as existsSync3 } from "node:fs";
|
|
38735
38792
|
var useTextModel = /* @__PURE__ */ __name(async (id2, { env, command }) => {
|
|
@@ -38860,7 +38917,7 @@ var addCustomTextModel = /* @__PURE__ */ __name(async (id2, payload, { env, fetc
|
|
|
38860
38917
|
return { ...checked2.output, custom: true };
|
|
38861
38918
|
}, "addCustomTextModel");
|
|
38862
38919
|
|
|
38863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38920
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
38864
38921
|
import { createHash as createHash14 } from "node:crypto";
|
|
38865
38922
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
38866
38923
|
ref: cue.reference,
|
|
@@ -38978,7 +39035,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
38978
39035
|
return { ...packet, fingerprint: createHash14("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
38979
39036
|
}, "readMeetingHitContext");
|
|
38980
39037
|
|
|
38981
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
38982
39039
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
38983
39040
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
38984
39041
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -39054,7 +39111,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
39054
39111
|
return { packet, content };
|
|
39055
39112
|
}, "readMeetingPassage");
|
|
39056
39113
|
|
|
39057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
39058
39115
|
var communicationFields = {
|
|
39059
39116
|
sources: pipe(array(strictObject({
|
|
39060
39117
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -39086,7 +39143,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
39086
39143
|
return { ...input, after, before: before2 };
|
|
39087
39144
|
}, "communicationRequest");
|
|
39088
39145
|
|
|
39089
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
39090
39147
|
var MEETING_PREPARATION_LIMITS = {
|
|
39091
39148
|
meetings: { min: 1, max: 20, default: 5 },
|
|
39092
39149
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -39172,7 +39229,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
39172
39229
|
return { ...input, history };
|
|
39173
39230
|
}, "preparationRequest");
|
|
39174
39231
|
|
|
39175
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
39176
39233
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
39177
39234
|
const section = {
|
|
39178
39235
|
readUsage: plan.reader.usage(),
|
|
@@ -39277,7 +39334,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
39277
39334
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
39278
39335
|
}, "appendPreparationCommunications");
|
|
39279
39336
|
|
|
39280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
39281
39338
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
39282
39339
|
if (port === void 0)
|
|
39283
39340
|
return void 0;
|
|
@@ -39382,7 +39439,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
39382
39439
|
}
|
|
39383
39440
|
}, "validatePreparationCommunications");
|
|
39384
39441
|
|
|
39385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
39386
39443
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
39387
39444
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
39388
39445
|
}, "invalid");
|
|
@@ -39451,7 +39508,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
39451
39508
|
}
|
|
39452
39509
|
}, "appendKnowledgePreparation");
|
|
39453
39510
|
|
|
39454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
39455
39512
|
var invalid7 = /* @__PURE__ */ __name(() => {
|
|
39456
39513
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
39457
39514
|
}, "invalid");
|
|
@@ -39525,7 +39582,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
39525
39582
|
}
|
|
39526
39583
|
}, "appendNotesPreparation");
|
|
39527
39584
|
|
|
39528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
39529
39586
|
var PAGE_LIMIT = 4;
|
|
39530
39587
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39531
39588
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -39575,7 +39632,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
39575
39632
|
}
|
|
39576
39633
|
}, "appendProjectPreparation");
|
|
39577
39634
|
|
|
39578
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39635
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
39579
39636
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
39580
39637
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
39581
39638
|
return;
|
|
@@ -39647,7 +39704,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
39647
39704
|
}
|
|
39648
39705
|
}, "appendRelatedPreparation");
|
|
39649
39706
|
|
|
39650
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
39651
39708
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39652
39709
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
39653
39710
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -39785,7 +39842,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
39785
39842
|
};
|
|
39786
39843
|
}, "createMeetingPreparationService");
|
|
39787
39844
|
|
|
39788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
39789
39846
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
39790
39847
|
const installer = ports.installer();
|
|
39791
39848
|
const argv = updateCommand(installer, packageName);
|
|
@@ -39850,7 +39907,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
39850
39907
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
39851
39908
|
}, "dayAfter");
|
|
39852
39909
|
|
|
39853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39854
39911
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39855
39912
|
const pictures = picturesService(deps);
|
|
39856
39913
|
const base = {
|
|
@@ -39887,7 +39944,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
39887
39944
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
39888
39945
|
}, "servicesFor");
|
|
39889
39946
|
|
|
39890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
39891
39948
|
import { createHash as createHash15 } from "node:crypto";
|
|
39892
39949
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
39893
39950
|
import { createConnection, createServer } from "node:net";
|
|
@@ -40035,7 +40092,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
40035
40092
|
}
|
|
40036
40093
|
}, "serve");
|
|
40037
40094
|
|
|
40038
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40095
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.610.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_e6c13ef962427cb2333deb6e4530ac73/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
40039
40096
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
40040
40097
|
close: /* @__PURE__ */ __name(async () => {
|
|
40041
40098
|
}, "close"),
|