@wirecat/cli-memo 0.131.51 → 0.131.52
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-3R3VE3W2.js → all-profiles-ZFVBLT2D.js} +5 -5
- package/dist/bundle/{anthropic-QVYJRACM.js → anthropic-UG2YHOT7.js} +3 -3
- package/dist/bundle/{app-server-T3D2PIGZ.js → app-server-AQYA4TB6.js} +35 -35
- package/dist/bundle/auto-2AY6K6DI.js +86 -0
- package/dist/bundle/{bun-DTDD2OHK.js → bun-QJUFWKEZ.js} +2 -2
- package/dist/bundle/{bun-sqlite-DWICJAH3.js → bun-sqlite-GWVRHYF4.js} +2 -2
- package/dist/bundle/{chunk-SXVPRYEF.js → chunk-2CBOPOC7.js} +15 -12
- package/dist/bundle/{chunk-ECLBZGWI.js → chunk-2GEV2TXW.js} +3 -3
- package/dist/bundle/{chunk-PX2B5ZRL.js → chunk-3O46NA2H.js} +102 -60
- package/dist/bundle/{chunk-6MEVHKIO.js → chunk-4ISZPK6D.js} +1 -1
- package/dist/bundle/{chunk-JBSMBHTM.js → chunk-55GFDV24.js} +5 -5
- package/dist/bundle/{chunk-QIFK3EZM.js → chunk-5WT6SEXS.js} +25 -9
- package/dist/bundle/{chunk-4MWP6Z3W.js → chunk-65576OCE.js} +1 -1
- package/dist/bundle/{chunk-5ZGOT57S.js → chunk-6BVWU2UM.js} +2 -2
- package/dist/bundle/{chunk-REROHDUR.js → chunk-6GF4TIVM.js} +1 -1
- package/dist/bundle/{chunk-RL2DSQCD.js → chunk-6PQIXQFD.js} +8 -8
- package/dist/bundle/{chunk-PWYCF76F.js → chunk-6ZQK3L35.js} +2 -2
- package/dist/bundle/{chunk-E3WIMCV5.js → chunk-7SVHEGRO.js} +1 -1
- package/dist/bundle/{chunk-XN5YDZY7.js → chunk-A36ASW3I.js} +1 -1
- package/dist/bundle/{chunk-ZC2LNXGO.js → chunk-A7DXLOMS.js} +1 -1
- package/dist/bundle/{chunk-6O37NSG6.js → chunk-AGOUP5AH.js} +4 -4
- package/dist/bundle/{chunk-OBVKXHOH.js → chunk-AU5GAMGM.js} +413 -357
- package/dist/bundle/{chunk-H65NWA3X.js → chunk-EEEZGK2J.js} +1 -1
- package/dist/bundle/{chunk-O5Z74SBZ.js → chunk-EKQNL6VJ.js} +23 -21
- package/dist/bundle/{chunk-7C3MP5LH.js → chunk-EQUPZVV6.js} +5 -5
- package/dist/bundle/{chunk-LYUVULFK.js → chunk-ERZBEQAY.js} +267 -259
- package/dist/bundle/{chunk-HRLQQLVD.js → chunk-ETYAJPIT.js} +20 -20
- package/dist/bundle/{chunk-GSCGRBEQ.js → chunk-FWCFEJWD.js} +173 -153
- package/dist/bundle/{chunk-E7TMOUWZ.js → chunk-G4Z4WSIG.js} +1 -1
- package/dist/bundle/{chunk-56BBTOS2.js → chunk-G52Y3KOO.js} +1 -1
- package/dist/bundle/{chunk-GBWOMPZ7.js → chunk-G7K4J3NS.js} +3 -3
- package/dist/bundle/{chunk-ROP27ZJU.js → chunk-GJWNHWG7.js} +31 -31
- package/dist/bundle/{chunk-4A6JOJLR.js → chunk-I4LXP4HQ.js} +4 -4
- package/dist/bundle/{chunk-XGNNI3S3.js → chunk-IALGFO44.js} +2 -2
- package/dist/bundle/{chunk-MVV32ZTO.js → chunk-IKG2OPHU.js} +7 -15
- package/dist/bundle/{chunk-JCNBJ3FN.js → chunk-KGPD3OCD.js} +170 -57
- package/dist/bundle/{chunk-PNNM72BO.js → chunk-LUHMRW3P.js} +7 -4
- package/dist/bundle/{chunk-YPLKNKAD.js → chunk-LX65W7IK.js} +4 -4
- package/dist/bundle/{chunk-OJFRMK2W.js → chunk-M64NVDB4.js} +3 -3
- package/dist/bundle/{chunk-5JY464PN.js → chunk-MICF3K6S.js} +12 -12
- package/dist/bundle/{chunk-AEVTXHTY.js → chunk-N5J6GT7C.js} +4 -4
- package/dist/bundle/{chunk-4RHIJMRX.js → chunk-NIUWQP7F.js} +30 -28
- package/dist/bundle/{chunk-O5UP2KZL.js → chunk-NNUP36UQ.js} +1 -1
- package/dist/bundle/{chunk-UDAATSWZ.js → chunk-NOEXRGYH.js} +10 -10
- package/dist/bundle/{chunk-CZOBBAXM.js → chunk-NUQ3N3V3.js} +7 -7
- package/dist/bundle/{chunk-ETD2DRJD.js → chunk-NZKDNBYE.js} +6 -6
- package/dist/bundle/{chunk-CPLYNBAJ.js → chunk-OIPJYDLZ.js} +1 -1
- package/dist/bundle/{chunk-526KVXRI.js → chunk-OWS67HTV.js} +2 -2
- package/dist/bundle/{chunk-FZ4GVE36.js → chunk-PBM5GH7S.js} +2 -2
- package/dist/bundle/{chunk-4GWFRZ2U.js → chunk-PKVXZZTM.js} +58 -1
- package/dist/bundle/{chunk-QFC7V5VW.js → chunk-RYY4YRKQ.js} +5 -5
- package/dist/bundle/{chunk-WPW6ULD7.js → chunk-S7X5ZMQN.js} +2 -2
- package/dist/bundle/{chunk-BUHTAMPF.js → chunk-TM6R3Z45.js} +1 -1
- package/dist/bundle/{chunk-H7RSMNHL.js → chunk-TQS6ZKC3.js} +483 -402
- package/dist/bundle/{chunk-V3TELYLZ.js → chunk-U4ZD5SYO.js} +1 -1
- package/dist/bundle/{chunk-N3UA5PO4.js → chunk-U6E3BGHO.js} +9 -9
- package/dist/bundle/{chunk-FJ3DAE4M.js → chunk-VOWEZBOJ.js} +1 -1
- package/dist/bundle/{chunk-3OL3QRFS.js → chunk-X6XIW76O.js} +5 -5
- package/dist/bundle/{chunk-JINNS3FI.js → chunk-XIHQOSCT.js} +1 -1
- package/dist/bundle/{chunk-UQ2OA6EM.js → chunk-ZKXIZD4C.js} +4 -4
- package/dist/bundle/{chunk-AWLAMVNY.js → chunk-ZVJAZXME.js} +4 -4
- package/dist/bundle/{chunk-66A646SL.js → chunk-ZVR6S4XB.js} +7 -7
- package/dist/bundle/{chunk-YZB5IL4L.js → chunk-ZYQEWB6P.js} +2 -2
- package/dist/bundle/{command-contract-OTVOQLZS.js → command-contract-7AADJ3UC.js} +11 -11
- package/dist/bundle/{decode-ISKRNDDM.js → decode-XMIBTI5O.js} +2 -2
- package/dist/bundle/{echarts-TINXXXCB.js → echarts-W7DPDJA5.js} +2 -2
- package/dist/bundle/{embed-R2KJDGEX.js → embed-EP3KKO6Y.js} +3 -3
- package/dist/bundle/{embedder-X2Y5RLKE.js → embedder-ENGCALJ7.js} +6 -6
- package/dist/bundle/{entry-2MUKT36Z.js → entry-BGSKREOS.js} +4 -4
- package/dist/bundle/failure-ZKQVXWAB.js +66 -0
- package/dist/bundle/{first-run-6BSAM4BD.js → first-run-4EBMV2EM.js} +5 -5
- package/dist/bundle/{first-screen-ALXB4ONR.js → first-screen-2TM3BF2Y.js} +12 -12
- package/dist/bundle/{instructions-E5NBM2NJ.js → instructions-A42XETMK.js} +1 -1
- package/dist/bundle/{mcp-YUPBMZPV.js → mcp-5LAWRSJK.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-NBHZ4XWV.js → node-IRL66JK2.js} +2 -2
- package/dist/bundle/{node-sqlite-3CBWCPNC.js → node-sqlite-SOGTH72B.js} +3 -3
- package/dist/bundle/{oauth-L5XC2THD.js → oauth-RB5W3AC7.js} +4 -4
- package/dist/bundle/{open-WR6QQPVB.js → open-552EJ4JC.js} +2 -2
- package/dist/bundle/{openai-MCPELYCJ.js → openai-ZLOHEEDH.js} +7 -7
- package/dist/bundle/{process-EAEC2FBD.js → process-46SUXGWW.js} +1 -1
- package/dist/bundle/{program-WKKBFQIW.js → program-ZLWKMT65.js} +59 -57
- package/dist/bundle/{prompt-M4Z35LQ5.js → prompt-2NHJSYKX.js} +2 -2
- package/dist/bundle/{recognize-VT6NKW6D.js → recognize-2LDM6KHL.js} +1 -1
- package/dist/bundle/{remote-6QTPH5PJ.js → remote-DBYHHENF.js} +4 -4
- package/dist/bundle/{rerank-MJYLXZ4K.js → rerank-N5T2TIIY.js} +4 -4
- package/dist/bundle/{serve-KQ6OL3OH.js → serve-S6B54R2F.js} +6 -6
- package/dist/bundle/server-KZZHFPTZ.js +61 -0
- package/dist/bundle/{server-UJIH2SBV.js → server-QH6AKPRV.js} +50 -50
- package/dist/bundle/server-WAIPBBM7.js +48 -0
- package/dist/bundle/{state-2PDCOSJN.js → state-ZXZGIIJW.js} +3 -3
- package/dist/bundle/{store-SXYAS5EI.js → store-PNJNDMQ4.js} +9 -9
- package/dist/bundle/store-maintenance-command-2ZVV3DGA.js +48 -0
- package/dist/bundle/update-6HXLLGTQ.js +69 -0
- package/dist/doctor/command.d.ts +30 -0
- package/dist/doctor/command.d.ts.map +1 -1
- package/dist/doctor/command.js +1 -1
- package/dist/doctor/command.js.map +1 -1
- package/dist/failure.js +2 -2
- package/dist/failure.js.map +1 -1
- package/dist/knowledge/relationships-scan.d.ts.map +1 -1
- package/dist/knowledge/relationships-scan.js +4 -3
- package/dist/knowledge/relationships-scan.js.map +1 -1
- package/dist/run/import.d.ts.map +1 -1
- package/dist/run/import.js +3 -2
- package/dist/run/import.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/auto-XJCSM7WE.js +0 -86
- package/dist/bundle/failure-KYUARIL2.js +0 -66
- package/dist/bundle/server-AVAJTC5G.js +0 -61
- package/dist/bundle/server-QAFF3RP5.js +0 -48
- package/dist/bundle/store-maintenance-command-ARTXRVYD.js +0 -48
- package/dist/bundle/update-MOZKRB2Z.js +0 -69
- /package/dist/bundle/{chunk-4ZSY3MKL.js → chunk-DPRGC5YX.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MICF3K6S.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -49,17 +49,14 @@ import {
|
|
|
49
49
|
typedCommand,
|
|
50
50
|
vectorModelKey,
|
|
51
51
|
withAttempt
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import {
|
|
54
|
-
isCliFailure
|
|
55
|
-
} from "./chunk-MVV32ZTO.js";
|
|
52
|
+
} from "./chunk-FWCFEJWD.js";
|
|
56
53
|
import {
|
|
57
54
|
isNewer,
|
|
58
55
|
updateCommand
|
|
59
56
|
} from "./chunk-MZMJALJT.js";
|
|
60
57
|
import {
|
|
61
58
|
readOnlyLockOf
|
|
62
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-G52Y3KOO.js";
|
|
63
60
|
import {
|
|
64
61
|
AGENDA_COLUMNS,
|
|
65
62
|
CHAT_COLUMNS,
|
|
@@ -163,7 +160,7 @@ import {
|
|
|
163
160
|
validateAst,
|
|
164
161
|
validateFields,
|
|
165
162
|
withoutField
|
|
166
|
-
} from "./chunk-
|
|
163
|
+
} from "./chunk-AU5GAMGM.js";
|
|
167
164
|
import {
|
|
168
165
|
EVENT_QUERY,
|
|
169
166
|
MEETING_FIELD_NAMES,
|
|
@@ -218,23 +215,28 @@ import {
|
|
|
218
215
|
validateQuery,
|
|
219
216
|
walkQuery,
|
|
220
217
|
zonedMoment
|
|
221
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-KGPD3OCD.js";
|
|
219
|
+
import {
|
|
220
|
+
damagedFile,
|
|
221
|
+
isCliFailure,
|
|
222
|
+
sqliteCode
|
|
223
|
+
} from "./chunk-PKVXZZTM.js";
|
|
222
224
|
import {
|
|
223
225
|
DEFAULT_STEMMERS,
|
|
224
226
|
createStemmer,
|
|
225
227
|
fold,
|
|
226
228
|
normalize
|
|
227
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-NUQ3N3V3.js";
|
|
228
230
|
import {
|
|
229
231
|
DEFAULT_TASK_CATEGORIES,
|
|
230
232
|
FALLBACK_CATEGORY
|
|
231
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-ZVJAZXME.js";
|
|
232
234
|
import {
|
|
233
235
|
MAX_MODEL_IMAGE_BYTES
|
|
234
|
-
} from "./chunk-
|
|
236
|
+
} from "./chunk-XIHQOSCT.js";
|
|
235
237
|
import {
|
|
236
238
|
remoteKey
|
|
237
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-ZYQEWB6P.js";
|
|
238
240
|
import {
|
|
239
241
|
Unzip,
|
|
240
242
|
UnzipInflate,
|
|
@@ -245,15 +247,15 @@ import {
|
|
|
245
247
|
placedText,
|
|
246
248
|
runEmbedders,
|
|
247
249
|
textModelsDirectory
|
|
248
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-RYY4YRKQ.js";
|
|
249
251
|
import {
|
|
250
252
|
installFiles,
|
|
251
253
|
megabytes
|
|
252
|
-
} from "./chunk-
|
|
254
|
+
} from "./chunk-G7K4J3NS.js";
|
|
253
255
|
import {
|
|
254
256
|
storePath,
|
|
255
257
|
wirecatDirectory
|
|
256
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-65576OCE.js";
|
|
257
259
|
import {
|
|
258
260
|
resolvePaths,
|
|
259
261
|
writeSecurely
|
|
@@ -16906,7 +16908,7 @@ var require_lib3 = __commonJS({
|
|
|
16906
16908
|
}
|
|
16907
16909
|
});
|
|
16908
16910
|
|
|
16909
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16910
16912
|
var RULES_VERSION = 5;
|
|
16911
16913
|
var LOOK_BACK = 50;
|
|
16912
16914
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16996,16 +16998,17 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16996
16998
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16997
16999
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16998
17000
|
|
|
16999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17001
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
17000
17002
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
17001
17003
|
|
|
17002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17004
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
17003
17005
|
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
17004
17006
|
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
17005
17007
|
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
17006
17008
|
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
17007
|
-
var
|
|
17008
|
-
|
|
17009
|
+
var seen = /* @__PURE__ */ __name((mark) => `\`${mark.command}\` found the store damaged at ${mark.at} (${mark.error})`, "seen");
|
|
17010
|
+
var explainDamage = /* @__PURE__ */ __name((health, command, mark = null) => {
|
|
17011
|
+
if (health.ok && !mark)
|
|
17009
17012
|
return null;
|
|
17010
17013
|
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
17011
17014
|
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
@@ -17014,12 +17017,13 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
17014
17017
|
const derived2 = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
17015
17018
|
const unopened = health.error !== void 0;
|
|
17016
17019
|
const json = (health.invalidJson ?? []).map(({ table, column }) => `${table}.${column}`);
|
|
17017
|
-
const
|
|
17020
|
+
const checked2 = health.ok ? `${seen(mark)}; the quick check reads too little to see it, and a deep check that passes clears it` : unopened ? `the store file cannot be opened: ${health.error}` : health.checked === "quick" ? "the store file's header or schema is damaged" : `the store file is damaged: ${health.problems ?? 0} problems` + (sources.length ? ` in the data of ${named(sources)}` : "") + (derived2.length ? `${sources.length ? ", and" : " in"} the search data of ${named(derived2)}` : "") + (json.length ? `; values that are not valid JSON in ${named(json)}` : "");
|
|
17021
|
+
const what = mark && !health.ok ? `${checked2}; ${seen(mark)}` : checked2;
|
|
17018
17022
|
const impact = [
|
|
17019
17023
|
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
17020
17024
|
...derived2.length ? [`searches may miss results or fail; ${named(derived2)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
17021
17025
|
...json.length ? [`a read of a row with a broken JSON value fails ("malformed JSON"); a recovery clears those values`] : [],
|
|
17022
|
-
"reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
17026
|
+
mark ? "reads that do not touch a damaged page work; every command that writes the store refuses until it is recovered" : "reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
17023
17027
|
];
|
|
17024
17028
|
return {
|
|
17025
17029
|
what,
|
|
@@ -17032,7 +17036,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
17032
17036
|
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
17033
17037
|
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
17034
17038
|
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
17035
|
-
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
17039
|
+
...health.checked === "quick" || health.ok ? [`${command} store recover`] : []
|
|
17036
17040
|
],
|
|
17037
17041
|
impact,
|
|
17038
17042
|
externalUnaffected: "only this computer's copy is damaged: Telegram, MAX, the mail servers and Google Drive keep their own data, so whatever is lost here can be fetched again by a sync",
|
|
@@ -17044,7 +17048,7 @@ var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
|
17044
17048
|
};
|
|
17045
17049
|
}, "explainDamage");
|
|
17046
17050
|
|
|
17047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
17048
17052
|
import { existsSync, statSync } from "node:fs";
|
|
17049
17053
|
var JSON_COLUMNS = {
|
|
17050
17054
|
accounts: ["settings"],
|
|
@@ -17186,10 +17190,10 @@ var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) =>
|
|
|
17186
17190
|
}
|
|
17187
17191
|
}, "storeHealth");
|
|
17188
17192
|
|
|
17189
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
17190
17194
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
17191
17195
|
|
|
17192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17193
17197
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
17194
17198
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17195
17199
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17203,15 +17207,19 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
17203
17207
|
if (typeof options.project !== "string" || !/^project:[1-9]\d*$/.test(options.project) || !Number.isSafeInteger(Number(options.project.slice(8))))
|
|
17204
17208
|
throw new CliError("validation_error", "project preview project is a project:<safe integer id> reference");
|
|
17205
17209
|
const budget = new SnapshotBudget(options.maxReadBytes ?? 4 * 1024 * 1024);
|
|
17206
|
-
const
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17210
|
+
const target2 = options.target;
|
|
17211
|
+
const project2 = options.project;
|
|
17212
|
+
return damagedFile([target2], async () => {
|
|
17213
|
+
const context2 = await openStoreContext({ path: target2, env: options.env, readOnly: true });
|
|
17214
|
+
try {
|
|
17215
|
+
return previewAnnotationSnapshot(context2.database, Number(project2.slice(8)), snapshot, options.bindings, budget);
|
|
17216
|
+
} finally {
|
|
17217
|
+
context2.database.close();
|
|
17218
|
+
}
|
|
17219
|
+
});
|
|
17212
17220
|
}, "previewProjectAnnotationSnapshot");
|
|
17213
17221
|
|
|
17214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17222
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17215
17223
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
17216
17224
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17217
17225
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17232,7 +17240,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
17232
17240
|
}
|
|
17233
17241
|
}, "snapshotProjectAnnotations");
|
|
17234
17242
|
|
|
17235
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17236
17244
|
var COMMAND_NEEDS = {
|
|
17237
17245
|
"account update": ["updateProfile", "change the profile"],
|
|
17238
17246
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17282,7 +17290,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17282
17290
|
return group;
|
|
17283
17291
|
}, "hideNever");
|
|
17284
17292
|
|
|
17285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17293
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17286
17294
|
var AUDIT_PAGE = 200;
|
|
17287
17295
|
var AUDIT_BUDGET = 10;
|
|
17288
17296
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17362,7 +17370,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17362
17370
|
return found;
|
|
17363
17371
|
}, "burstJoins");
|
|
17364
17372
|
|
|
17365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17366
17374
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17367
17375
|
command.allowUnknownOption();
|
|
17368
17376
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17382,7 +17390,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17382
17390
|
return command;
|
|
17383
17391
|
}, "queryWordsAfterOptions");
|
|
17384
17392
|
|
|
17385
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17386
17394
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17387
17395
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17388
17396
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17424,7 +17432,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17424
17432
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17425
17433
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17426
17434
|
|
|
17427
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17428
17436
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17429
17437
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17430
17438
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17447,7 +17455,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17447
17455
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17448
17456
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17449
17457
|
|
|
17450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17451
17459
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17452
17460
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17453
17461
|
const zone = timezoneOf();
|
|
@@ -17533,7 +17541,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17533
17541
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17534
17542
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17535
17543
|
|
|
17536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17544
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17537
17545
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17538
17546
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17539
17547
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17677,7 +17685,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17677
17685
|
}, "addMeetingCommandsDefinition");
|
|
17678
17686
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17679
17687
|
|
|
17680
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17681
17689
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17682
17690
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17683
17691
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17810,7 +17818,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17810
17818
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17811
17819
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17812
17820
|
|
|
17813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17821
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17814
17822
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17815
17823
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17816
17824
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17819,7 +17827,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17819
17827
|
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");
|
|
17820
17828
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17821
17829
|
|
|
17822
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17823
17831
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17824
17832
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17825
17833
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18081,7 +18089,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18081
18089
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18082
18090
|
}), "sessionAnswer");
|
|
18083
18091
|
|
|
18084
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18085
18093
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18086
18094
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18087
18095
|
if (key in own)
|
|
@@ -18098,12 +18106,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18098
18106
|
return found.bind(adapter);
|
|
18099
18107
|
}, "capability");
|
|
18100
18108
|
|
|
18101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
18102
18110
|
import { randomBytes } from "node:crypto";
|
|
18103
18111
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
18104
18112
|
var newOperationId = newSendId;
|
|
18105
18113
|
|
|
18106
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18107
18115
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18108
18116
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18109
18117
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18111,9 +18119,7 @@ var SQLITE_BUSY = 5;
|
|
|
18111
18119
|
var storeAbsent = /* @__PURE__ */ __name((error) => {
|
|
18112
18120
|
if (isCliFailure(error))
|
|
18113
18121
|
return error.code === "validation_error" && error.message === NO_LOCAL_STORE;
|
|
18114
|
-
|
|
18115
|
-
const code = errcode ?? errno;
|
|
18116
|
-
return error instanceof Error && typeof code === "number" && (code & 255) === SQLITE_BUSY;
|
|
18122
|
+
return error instanceof Error && sqliteCode(error) === SQLITE_BUSY;
|
|
18117
18123
|
}, "storeAbsent");
|
|
18118
18124
|
var accountUnknown = /* @__PURE__ */ __name((error) => isCliFailure(error) && (error.code === "not_found" || error.code === "authentication_error"), "accountUnknown");
|
|
18119
18125
|
var unless = /* @__PURE__ */ __name(async (work, expected2) => {
|
|
@@ -18180,7 +18186,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
18180
18186
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
18181
18187
|
}, "storeOnlyDeps");
|
|
18182
18188
|
|
|
18183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18184
18190
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18185
18191
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18186
18192
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -18203,10 +18209,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
18203
18209
|
}
|
|
18204
18210
|
}, "patiently");
|
|
18205
18211
|
|
|
18206
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18207
18213
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18208
18214
|
|
|
18209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18210
18216
|
var REQUEST_MS = 400;
|
|
18211
18217
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18212
18218
|
const lowest = ranges[0];
|
|
@@ -18229,13 +18235,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18229
18235
|
};
|
|
18230
18236
|
}, "estimateBackfill");
|
|
18231
18237
|
|
|
18232
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18238
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18233
18239
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18234
18240
|
...error,
|
|
18235
18241
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18236
18242
|
}), "withRecovery");
|
|
18237
18243
|
|
|
18238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18239
18245
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18240
18246
|
if (isCliFailure(error))
|
|
18241
18247
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18318,7 +18324,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18318
18324
|
};
|
|
18319
18325
|
}, "mergeBatches");
|
|
18320
18326
|
|
|
18321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18327
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18322
18328
|
var TAKES = {
|
|
18323
18329
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18324
18330
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18378,7 +18384,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18378
18384
|
throw wrongAccount(reference, scope, profiles);
|
|
18379
18385
|
}, "ensureAccount");
|
|
18380
18386
|
|
|
18381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18387
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18382
18388
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18383
18389
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase().replaceAll("\u0451", "\u0435"), "foldName");
|
|
18384
18390
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18423,7 +18429,7 @@ ${lines3}`, { candidates });
|
|
|
18423
18429
|
}, "ambiguous");
|
|
18424
18430
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18425
18431
|
|
|
18426
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18432
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18427
18433
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18428
18434
|
if (deps.reads !== "store")
|
|
18429
18435
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18582,7 +18588,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18582
18588
|
}
|
|
18583
18589
|
}, "senderAmong");
|
|
18584
18590
|
|
|
18585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18591
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18586
18592
|
var CONTEXT_MESSAGES = 3;
|
|
18587
18593
|
var CONTEXT_MINUTES = 10;
|
|
18588
18594
|
var MAX_CHARS = 1200;
|
|
@@ -18606,12 +18612,12 @@ var context = {
|
|
|
18606
18612
|
}, "describe")
|
|
18607
18613
|
};
|
|
18608
18614
|
|
|
18609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18610
18616
|
var BUILT_INS = [context];
|
|
18611
18617
|
var providers = [...BUILT_INS];
|
|
18612
18618
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18613
18619
|
|
|
18614
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18615
18621
|
var READ_PAGE = 5e3;
|
|
18616
18622
|
var CHAIN = 50;
|
|
18617
18623
|
var CONVERSATION_QUERY = {
|
|
@@ -18763,7 +18769,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
18763
18769
|
return size4;
|
|
18764
18770
|
}, "sized");
|
|
18765
18771
|
|
|
18766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18767
18773
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18768
18774
|
var MESSAGE_PAGE = 5e3;
|
|
18769
18775
|
var PER_SESSION = 8;
|
|
@@ -18782,7 +18788,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18782
18788
|
price: remote.price,
|
|
18783
18789
|
installed: true,
|
|
18784
18790
|
perBatch: PER_REQUEST * concurrency,
|
|
18785
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18791
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-DBYHHENF.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18786
18792
|
};
|
|
18787
18793
|
}
|
|
18788
18794
|
const model = textModel(choice);
|
|
@@ -18799,7 +18805,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18799
18805
|
if (!isTextModelInstalled(model, directory2))
|
|
18800
18806
|
throw notDownloaded(model.id);
|
|
18801
18807
|
if (apart) {
|
|
18802
|
-
const { openProcess } = await import("./process-
|
|
18808
|
+
const { openProcess } = await import("./process-46SUXGWW.js");
|
|
18803
18809
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18804
18810
|
}
|
|
18805
18811
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19088,7 +19094,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19088
19094
|
return { ...one2, state };
|
|
19089
19095
|
}, "shaped");
|
|
19090
19096
|
|
|
19091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19092
19098
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19093
19099
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19094
19100
|
for (const [key, value, maximum] of [
|
|
@@ -19141,7 +19147,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19141
19147
|
}
|
|
19142
19148
|
}, "catchUpSearch");
|
|
19143
19149
|
|
|
19144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19145
19151
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19146
19152
|
if (deps.reads === "store") {
|
|
19147
19153
|
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`);
|
|
@@ -19385,7 +19391,7 @@ var fetchInto = /* @__PURE__ */ __name(async ({ history, store, account, fetchin
|
|
|
19385
19391
|
let chatId;
|
|
19386
19392
|
let top;
|
|
19387
19393
|
let fetched = 0;
|
|
19388
|
-
const
|
|
19394
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
19389
19395
|
let idle = 0;
|
|
19390
19396
|
let reachedStart = false;
|
|
19391
19397
|
let reachedSince = false;
|
|
@@ -19423,9 +19429,9 @@ var fetchInto = /* @__PURE__ */ __name(async ({ history, store, account, fetchin
|
|
|
19423
19429
|
}
|
|
19424
19430
|
const low = Math.min(...keys);
|
|
19425
19431
|
top ??= window3?.to ?? Math.max(...keys);
|
|
19426
|
-
const fresh = page.items.filter((message) => !
|
|
19432
|
+
const fresh = page.items.filter((message) => !seen2.has(message.id)).length;
|
|
19427
19433
|
for (const message of page.items)
|
|
19428
|
-
|
|
19434
|
+
seen2.add(message.id);
|
|
19429
19435
|
fetched += fresh;
|
|
19430
19436
|
const coveredFrom = window3 === void 0 ? low : Math.max(window3.from, low + (byTime && page.hasMore ? 1 : 0));
|
|
19431
19437
|
const held = coveredFrom <= top ? await store.sync.markRange(account, chatId, coveredFrom, top) : { from: low, to: top };
|
|
@@ -19507,7 +19513,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19507
19513
|
return message?.timestamp ?? fallback;
|
|
19508
19514
|
}, "timeOfKey");
|
|
19509
19515
|
|
|
19510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19511
19517
|
var LINKS = /https?:\/\/\S+/g;
|
|
19512
19518
|
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");
|
|
19513
19519
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19537,7 +19543,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19537
19543
|
});
|
|
19538
19544
|
}, "questions");
|
|
19539
19545
|
|
|
19540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19541
19547
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19542
19548
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19543
19549
|
const name = typed.trim().toLowerCase();
|
|
@@ -19594,7 +19600,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19594
19600
|
return best.name;
|
|
19595
19601
|
}, "categorize");
|
|
19596
19602
|
|
|
19597
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19598
19604
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19599
19605
|
var RULES_IN = {
|
|
19600
19606
|
dialog: "all",
|
|
@@ -19800,7 +19806,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19800
19806
|
return passes;
|
|
19801
19807
|
}, "applyTaskRulesToChats");
|
|
19802
19808
|
|
|
19803
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19804
19810
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19805
19811
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19806
19812
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -19864,7 +19870,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19864
19870
|
}
|
|
19865
19871
|
}, "validateContextEvidencePage");
|
|
19866
19872
|
|
|
19867
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19868
19874
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19869
19875
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19870
19876
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19917,7 +19923,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19917
19923
|
};
|
|
19918
19924
|
}, "contextReadBudget");
|
|
19919
19925
|
|
|
19920
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19926
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
19921
19927
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19922
19928
|
if (!port || typeof port.read !== "function")
|
|
19923
19929
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19961,7 +19967,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19961
19967
|
};
|
|
19962
19968
|
}, "createContextEvidenceReader");
|
|
19963
19969
|
|
|
19964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
19965
19971
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
19966
19972
|
dryRun,
|
|
19967
19973
|
source: null,
|
|
@@ -20036,7 +20042,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun =
|
|
|
20036
20042
|
return receipt;
|
|
20037
20043
|
}, "ingest");
|
|
20038
20044
|
|
|
20039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
20040
20046
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
20041
20047
|
var DEFAULT_PURPOSES = ["work"];
|
|
20042
20048
|
var LINK_PURPOSE = "work";
|
|
@@ -20066,7 +20072,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
20066
20072
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
20067
20073
|
], "purposeList");
|
|
20068
20074
|
|
|
20069
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
20070
20076
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
20071
20077
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
20072
20078
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -20106,7 +20112,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
20106
20112
|
};
|
|
20107
20113
|
}, "dateWindow");
|
|
20108
20114
|
|
|
20109
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
20110
20116
|
var DAY_MS = 864e5;
|
|
20111
20117
|
var NEW_DAYS = 30;
|
|
20112
20118
|
var SAME_TEXT_MIN = 20;
|
|
@@ -20183,7 +20189,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
20183
20189
|
};
|
|
20184
20190
|
}, "scorePerson");
|
|
20185
20191
|
|
|
20186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
20187
20193
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
20188
20194
|
const controller = new AbortController();
|
|
20189
20195
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -20199,7 +20205,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
20199
20205
|
}
|
|
20200
20206
|
}, "withTimeLimit");
|
|
20201
20207
|
|
|
20202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20203
20209
|
var REGISTRIES = {
|
|
20204
20210
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20205
20211
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20286,7 +20292,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20286
20292
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20287
20293
|
})), "notCovered");
|
|
20288
20294
|
|
|
20289
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20295
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20290
20296
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20291
20297
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20292
20298
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20374,7 +20380,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20374
20380
|
};
|
|
20375
20381
|
}, "botCheckService");
|
|
20376
20382
|
|
|
20377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20378
20384
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20379
20385
|
if (value === void 0)
|
|
20380
20386
|
return void 0;
|
|
@@ -20384,7 +20390,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20384
20390
|
return id2;
|
|
20385
20391
|
}, "threadIdOf");
|
|
20386
20392
|
|
|
20387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20388
20394
|
var TOP_POSTS = 5;
|
|
20389
20395
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20390
20396
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20501,7 +20507,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20501
20507
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20502
20508
|
}, "median");
|
|
20503
20509
|
|
|
20504
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20505
20511
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20506
20512
|
const events = [];
|
|
20507
20513
|
for (const stay of stays) {
|
|
@@ -20533,7 +20539,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20533
20539
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20534
20540
|
}, "memberEvents");
|
|
20535
20541
|
|
|
20536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20542
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20537
20543
|
var EVENTS_DAYS = 7;
|
|
20538
20544
|
var TRACKED_DAYS = 30;
|
|
20539
20545
|
var STATS_PAGE = 1e3;
|
|
@@ -20828,7 +20834,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20828
20834
|
return members.length === 0 ? null : members;
|
|
20829
20835
|
}, "storedMembers");
|
|
20830
20836
|
|
|
20831
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20832
20838
|
var INBOX_CHATS = 20;
|
|
20833
20839
|
var REVIEW_DAYS = 3;
|
|
20834
20840
|
var UNANSWERED_HOURS = 24;
|
|
@@ -21036,7 +21042,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
21036
21042
|
};
|
|
21037
21043
|
}, "inboxService");
|
|
21038
21044
|
|
|
21039
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21040
21046
|
var CONTEXT_MESSAGES2 = 10;
|
|
21041
21047
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21042
21048
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21112,18 +21118,34 @@ var eventsOnce = /* @__PURE__ */ __name(async (store, filter, limit) => {
|
|
|
21112
21118
|
}
|
|
21113
21119
|
return { items, cut: true };
|
|
21114
21120
|
}, "eventsOnce");
|
|
21115
|
-
var
|
|
21121
|
+
var nameOf = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "nameOf");
|
|
21122
|
+
var readableAccounts = /* @__PURE__ */ __name(async (store, asked, scopes) => {
|
|
21123
|
+
const stored = await store.accounts.storedAccounts();
|
|
21124
|
+
const own = stored.find((one2) => nameOf(one2) === nameOf(asked));
|
|
21125
|
+
if (!own || asked.scope !== void 0 && asked.scope !== own.scope)
|
|
21126
|
+
throw new CliError("not_found", `no ${asked.provider} account ${asked.account} in the store`);
|
|
21127
|
+
const allowed = scopes ?? [own.scope];
|
|
21128
|
+
return stored.filter((one2) => allowed.includes(one2.scope));
|
|
21129
|
+
}, "readableAccounts");
|
|
21130
|
+
var readsOf = /* @__PURE__ */ __name((record2, asked, readable) => {
|
|
21131
|
+
const scopeOf4 = new Map(readable.map((one2) => [nameOf(one2), one2.scope]));
|
|
21132
|
+
return record2.identities.flatMap((identity) => (identity.provider === asked.provider ? [asked.account] : identity.accounts).flatMap((account) => {
|
|
21133
|
+
const scope = scopeOf4.get(nameOf({ provider: identity.provider, account }));
|
|
21134
|
+
return identity.accounts.includes(account) && scope !== void 0 ? [{ key: { provider: identity.provider, account }, scope, identity }] : [];
|
|
21135
|
+
}));
|
|
21136
|
+
}, "readsOf");
|
|
21116
21137
|
var personContext = /* @__PURE__ */ __name(async (store, asked, reference, options = {}) => {
|
|
21117
21138
|
const found = pickPerson(reference, await store.people.people(asked.provider, { account: asked.account }));
|
|
21118
21139
|
const record2 = await store.people.personOf({ provider: asked.provider, id: found.id });
|
|
21119
21140
|
if (!record2)
|
|
21120
21141
|
throw new CliError("not_found", `no person ${found.id} in the store`);
|
|
21142
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21121
21143
|
return {
|
|
21122
21144
|
person: { ...record2, provider: asked.provider, id: found.id },
|
|
21123
|
-
...await recordContext(store, record2, readsOf(record2, asked), options)
|
|
21145
|
+
...await recordContext(store, record2, readsOf(record2, asked, readable), readable, options)
|
|
21124
21146
|
};
|
|
21125
21147
|
}, "personContext");
|
|
21126
|
-
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21148
|
+
var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, readable, { messages = CONTEXT_MESSAGES2, bytes: bytes2 = CONTEXT_BYTES, since, now = Date.now() } = {}) => {
|
|
21127
21149
|
const recent = /* @__PURE__ */ __name((message) => since === void 0 || Date.parse(message.timestamp) >= since, "recent");
|
|
21128
21150
|
const shared = [];
|
|
21129
21151
|
const notRead = [];
|
|
@@ -21181,9 +21203,15 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21181
21203
|
cut ||= named3.hasMore;
|
|
21182
21204
|
}
|
|
21183
21205
|
const personId = Number(record2.uid);
|
|
21184
|
-
const
|
|
21206
|
+
const calendars = [];
|
|
21207
|
+
for (const one2 of readable)
|
|
21208
|
+
if ((await store.calendar.calendars(one2.id)).length)
|
|
21209
|
+
calendars.push(one2);
|
|
21210
|
+
const accountIds = calendars.map(({ id: id2 }) => id2);
|
|
21211
|
+
const nothing = { items: [], cut: false };
|
|
21212
|
+
const upcoming = accountIds.length ? await eventsOnce(store, { personId, accountIds, from: now }, messages) : nothing;
|
|
21185
21213
|
const upcomingIds = new Set(upcoming.items.map(({ id: id2 }) => id2));
|
|
21186
|
-
const past = await eventsOnce(store, { personId, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages);
|
|
21214
|
+
const past = accountIds.length ? await eventsOnce(store, { personId, accountIds, to: now, newest: true, ...since === void 0 ? {} : { from: since } }, messages) : nothing;
|
|
21187
21215
|
cut ||= upcoming.cut || past.cut;
|
|
21188
21216
|
direct.sort(newestFirst);
|
|
21189
21217
|
const each = [...direct, ...beyond].sort(newestFirst);
|
|
@@ -21199,7 +21227,13 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
21199
21227
|
};
|
|
21200
21228
|
cut ||= direct.length > messages || groups.length > messages || mentions.length > messages;
|
|
21201
21229
|
const kept2 = withinBytes(lists, bytes2);
|
|
21230
|
+
const read2 = [
|
|
21231
|
+
...reads.map(({ key, scope }) => ({ ...key, scope })),
|
|
21232
|
+
...calendars.map(({ provider, account, scope }) => ({ provider, account, scope }))
|
|
21233
|
+
];
|
|
21234
|
+
const accounts = [...new Map(read2.map((one2) => [nameOf(one2), one2])).values()].sort((a, b) => nameOf(a).localeCompare(nameOf(b)));
|
|
21202
21235
|
return {
|
|
21236
|
+
accounts,
|
|
21203
21237
|
shared: shared.sort((a, b) => Date.parse(b.lastMessageAt ?? "") - Date.parse(a.lastMessageAt ?? "")),
|
|
21204
21238
|
last: {
|
|
21205
21239
|
fromThem: each.find((message) => !message.outgoing) ?? null,
|
|
@@ -21246,12 +21280,12 @@ var identityOfPerson = /* @__PURE__ */ __name(async (store, asked, uid) => {
|
|
|
21246
21280
|
if (!person)
|
|
21247
21281
|
throw new CliError("not_found", `no person:${uid} in the store`);
|
|
21248
21282
|
const here = person.identities.filter(({ provider }) => provider === asked.provider);
|
|
21249
|
-
const
|
|
21250
|
-
const [only] =
|
|
21251
|
-
if (
|
|
21283
|
+
const seen2 = here.length > 1 ? here.filter(({ accounts }) => accounts.includes(asked.account)) : here;
|
|
21284
|
+
const [only] = seen2;
|
|
21285
|
+
if (seen2.length === 1 && only)
|
|
21252
21286
|
return { provider: only.provider, id: only.id };
|
|
21253
21287
|
const all = person.identities.map(({ provider, id: id2 }) => `${provider}:${id2}`).join(", ");
|
|
21254
|
-
throw new CliError(
|
|
21288
|
+
throw new CliError(seen2.length === 0 ? "not_found" : "validation_error", seen2.length === 0 ? `person:${uid} has no ${asked.provider} identity \u2014 they are ${all || "nobody linked"}` : `person:${uid} has ${seen2.length} ${asked.provider} identities \u2014 name one: ${seen2.map(({ id: id2 }) => `${asked.provider}:${id2}`).join(", ")}`);
|
|
21255
21289
|
}, "identityOfPerson");
|
|
21256
21290
|
var CHAT_MESSAGES = 20;
|
|
21257
21291
|
var heardText = /* @__PURE__ */ __name((message) => "transcript" in message && typeof message.transcript === "string" ? message.transcript : void 0, "heardText");
|
|
@@ -21297,10 +21331,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21297
21331
|
};
|
|
21298
21332
|
}, "personMessages");
|
|
21299
21333
|
|
|
21300
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21301
21335
|
import { createHash } from "node:crypto";
|
|
21302
21336
|
|
|
21303
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21337
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21304
21338
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21305
21339
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21306
21340
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21318,7 +21352,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21318
21352
|
return { parsed, meeting };
|
|
21319
21353
|
}, "authorizedMeetingMetadata");
|
|
21320
21354
|
|
|
21321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21322
21356
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21323
21357
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21324
21358
|
if (signal?.aborted)
|
|
@@ -21517,7 +21551,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21517
21551
|
return { ...packet, fingerprint: hash(packet) };
|
|
21518
21552
|
}, "readMeetingEvidence");
|
|
21519
21553
|
|
|
21520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21554
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21521
21555
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21522
21556
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21523
21557
|
const requestedAccounts = options.accountIds;
|
|
@@ -21616,7 +21650,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21616
21650
|
};
|
|
21617
21651
|
}, "personMeetingContext");
|
|
21618
21652
|
|
|
21619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21653
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21620
21654
|
var PREPARE_BYTES = 96 * 1024;
|
|
21621
21655
|
var MEETINGS = 5;
|
|
21622
21656
|
var CUES = 3;
|
|
@@ -21644,7 +21678,6 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21644
21678
|
coverage: { included: items.length, hasMore: over || cut, cutBy: cut ? "bytes" : over ? "limit" : null }
|
|
21645
21679
|
};
|
|
21646
21680
|
}, "budgeted");
|
|
21647
|
-
const reads = readsOf(context2.person, asked);
|
|
21648
21681
|
const partial = new Set(context2.notRead.map((chat) => `${chat.provider}/${chat.account}/${chat.chatId}`));
|
|
21649
21682
|
const waiting = [];
|
|
21650
21683
|
for (const chat of context2.shared.filter((one2) => one2.kind === "dialog")) {
|
|
@@ -21661,10 +21694,10 @@ var personPreparation = /* @__PURE__ */ __name(async (store, asked, reference, o
|
|
|
21661
21694
|
});
|
|
21662
21695
|
}
|
|
21663
21696
|
waiting.sort((a, b) => Date.parse(b.message.timestamp) - Date.parse(a.message.timestamp));
|
|
21664
|
-
const accounts =
|
|
21697
|
+
const accounts = context2.accounts.map(({ provider, account }) => ({ provider, account }));
|
|
21665
21698
|
const held = await store.people.preparation(context2.person.uid, { accounts, limit });
|
|
21666
|
-
const
|
|
21667
|
-
const meetings = await meetingsOf(store, context2.person.uid,
|
|
21699
|
+
const readable = await readableAccounts(store, asked, options.scopes);
|
|
21700
|
+
const meetings = await meetingsOf(store, context2.person.uid, readable, options.since, () => left);
|
|
21668
21701
|
const sections = {
|
|
21669
21702
|
waiting: budgeted({ items: waiting, hasMore: false }),
|
|
21670
21703
|
tasks: budgeted(held.tasks),
|
|
@@ -21733,7 +21766,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21733
21766
|
}
|
|
21734
21767
|
}, "meetingsOf");
|
|
21735
21768
|
|
|
21736
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21737
21770
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21738
21771
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21739
21772
|
const held = await storeIfOpen(deps);
|
|
@@ -21803,7 +21836,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21803
21836
|
complete: false
|
|
21804
21837
|
})), "quiet");
|
|
21805
21838
|
|
|
21806
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21839
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21807
21840
|
var TIMELINE_ITEMS = 50;
|
|
21808
21841
|
var TIMELINE_MAX = 500;
|
|
21809
21842
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -21858,7 +21891,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21858
21891
|
};
|
|
21859
21892
|
}, "personTimeline");
|
|
21860
21893
|
|
|
21861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21862
21895
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21863
21896
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21864
21897
|
const held = await storeIfOpen(deps);
|
|
@@ -22085,7 +22118,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22085
22118
|
return rest;
|
|
22086
22119
|
}, "withoutPhone");
|
|
22087
22120
|
|
|
22088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22121
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22089
22122
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22090
22123
|
var PERIOD_FIELD = "created";
|
|
22091
22124
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22188,7 +22221,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22188
22221
|
}));
|
|
22189
22222
|
}, "meetingNames");
|
|
22190
22223
|
|
|
22191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22192
22225
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22193
22226
|
const tags = /* @__PURE__ */ new Map();
|
|
22194
22227
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22197,7 +22230,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22197
22230
|
return tags;
|
|
22198
22231
|
}, "taskTagFilters");
|
|
22199
22232
|
|
|
22200
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22201
22234
|
var TASK_QUERY = {
|
|
22202
22235
|
entity: "task",
|
|
22203
22236
|
backend: "sql",
|
|
@@ -22689,7 +22722,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22689
22722
|
};
|
|
22690
22723
|
}, "taskView");
|
|
22691
22724
|
|
|
22692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
22693
22726
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
22694
22727
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
22695
22728
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -22712,7 +22745,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
22712
22745
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
22713
22746
|
}, "approveAsTask");
|
|
22714
22747
|
|
|
22715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22748
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
22716
22749
|
var MAX_IDS = 500;
|
|
22717
22750
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
22718
22751
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -22754,7 +22787,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
22754
22787
|
return ids;
|
|
22755
22788
|
}, "parseProposalIds");
|
|
22756
22789
|
|
|
22757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
22758
22791
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
22759
22792
|
if (author.type === "person")
|
|
22760
22793
|
return { type: "person", id: author.id };
|
|
@@ -22796,7 +22829,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
22796
22829
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
22797
22830
|
}, "storedStatus");
|
|
22798
22831
|
|
|
22799
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22832
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
22800
22833
|
var rowOf = /* @__PURE__ */ __name((action2) => ({
|
|
22801
22834
|
id: action2.id,
|
|
22802
22835
|
kind: "action",
|
|
@@ -22836,7 +22869,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
22836
22869
|
}, "decide")
|
|
22837
22870
|
}), "actionKind");
|
|
22838
22871
|
|
|
22839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22872
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
22840
22873
|
var STATUS = {
|
|
22841
22874
|
proposed: "proposed",
|
|
22842
22875
|
accepted: "confirmed",
|
|
@@ -22879,7 +22912,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22879
22912
|
}, "decide")
|
|
22880
22913
|
}), "factKind");
|
|
22881
22914
|
|
|
22882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22915
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
22883
22916
|
var rowOf3 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
22884
22917
|
id: entry.ref,
|
|
22885
22918
|
kind,
|
|
@@ -22914,7 +22947,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
22914
22947
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
22915
22948
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
22916
22949
|
|
|
22917
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22918
22951
|
var FACT_SUMMARIES = {
|
|
22919
22952
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
22920
22953
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -22986,7 +23019,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
22986
23019
|
};
|
|
22987
23020
|
}, "findingsKind");
|
|
22988
23021
|
|
|
22989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23022
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
22990
23023
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
22991
23024
|
id: `key:${link4.id}`,
|
|
22992
23025
|
kind: "key_document",
|
|
@@ -23054,7 +23087,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
23054
23087
|
};
|
|
23055
23088
|
}, "keyDocumentKind");
|
|
23056
23089
|
|
|
23057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23090
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
23058
23091
|
var words = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
23059
23092
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
23060
23093
|
switch (finding.kind) {
|
|
@@ -23142,7 +23175,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23142
23175
|
};
|
|
23143
23176
|
}, "mailFindingsKind");
|
|
23144
23177
|
|
|
23145
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
23146
23179
|
var rowOf6 = /* @__PURE__ */ __name((action2, batch) => {
|
|
23147
23180
|
const findings = batch.input.findings;
|
|
23148
23181
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -23206,7 +23239,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23206
23239
|
};
|
|
23207
23240
|
}, "meetingFindingsKind");
|
|
23208
23241
|
|
|
23209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
23210
23243
|
var STATUS2 = {
|
|
23211
23244
|
proposed: "proposed",
|
|
23212
23245
|
confirmed: "confirmed",
|
|
@@ -23247,7 +23280,7 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23247
23280
|
}, "decide")
|
|
23248
23281
|
}), "memoryKind");
|
|
23249
23282
|
|
|
23250
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23283
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
23251
23284
|
var rowOf8 = /* @__PURE__ */ __name((order) => ({
|
|
23252
23285
|
id: order.ref,
|
|
23253
23286
|
kind: "order",
|
|
@@ -23279,7 +23312,7 @@ var orderKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23279
23312
|
}, "decide")
|
|
23280
23313
|
}), "orderKind");
|
|
23281
23314
|
|
|
23282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23315
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
23283
23316
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
23284
23317
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
23285
23318
|
var rowOf9 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23335,7 +23368,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23335
23368
|
}, "decide")
|
|
23336
23369
|
}), "organizationKind");
|
|
23337
23370
|
|
|
23338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
23339
23372
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
23340
23373
|
id: `link:${link4.id}`,
|
|
23341
23374
|
kind: "relationship",
|
|
@@ -23409,7 +23442,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
23409
23442
|
};
|
|
23410
23443
|
}, "relationshipKind");
|
|
23411
23444
|
|
|
23412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
23413
23446
|
var KIND = "relationship_update";
|
|
23414
23447
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
23415
23448
|
var rowOf10 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23459,7 +23492,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23459
23492
|
}, "decide")
|
|
23460
23493
|
}), "relationshipUpdateKind");
|
|
23461
23494
|
|
|
23462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23495
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
23463
23496
|
var rowOf11 = /* @__PURE__ */ __name((task2) => {
|
|
23464
23497
|
const suggestion = task2.closeSuggestion;
|
|
23465
23498
|
if (suggestion === null)
|
|
@@ -23527,7 +23560,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23527
23560
|
};
|
|
23528
23561
|
}, "taskCloseKind");
|
|
23529
23562
|
|
|
23530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
23531
23564
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
23532
23565
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
23533
23566
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -23655,7 +23688,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23655
23688
|
return registry;
|
|
23656
23689
|
}, "proposalRegistry");
|
|
23657
23690
|
|
|
23658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23691
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
23659
23692
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
23660
23693
|
if (newest === null)
|
|
23661
23694
|
return null;
|
|
@@ -23664,7 +23697,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
23664
23697
|
return newest.addressed ? "owed" : null;
|
|
23665
23698
|
}, "mailTurn");
|
|
23666
23699
|
|
|
23667
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23700
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
23668
23701
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
23669
23702
|
if (error instanceof CliError && error.code === "not_found")
|
|
23670
23703
|
return void 0;
|
|
@@ -23722,7 +23755,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
23722
23755
|
};
|
|
23723
23756
|
}, "mailActivity");
|
|
23724
23757
|
|
|
23725
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23726
23759
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23727
23760
|
const ids = [...new Set(chatIds)];
|
|
23728
23761
|
if (ids.length === 0)
|
|
@@ -23748,7 +23781,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23748
23781
|
}));
|
|
23749
23782
|
}, "chatCoverage");
|
|
23750
23783
|
|
|
23751
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23784
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
23752
23785
|
var DAY = 864e5;
|
|
23753
23786
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
23754
23787
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23995,7 +24028,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23995
24028
|
};
|
|
23996
24029
|
}, "agendaItem");
|
|
23997
24030
|
|
|
23998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24031
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23999
24032
|
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");
|
|
24000
24033
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
24001
24034
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -24011,7 +24044,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
24011
24044
|
}, "excerpt");
|
|
24012
24045
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
24013
24046
|
|
|
24014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
24015
24048
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
24016
24049
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
24017
24050
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -24038,7 +24071,10 @@ var personRefOf = /* @__PURE__ */ __name(async (store, provider, id2) => {
|
|
|
24038
24071
|
const person = await store.people.personOf({ provider, id: id2 });
|
|
24039
24072
|
return person ? `person:${person.uid}` : void 0;
|
|
24040
24073
|
}, "personRefOf");
|
|
24041
|
-
var projectsOf = /* @__PURE__ */ __name(async (store, person
|
|
24074
|
+
var projectsOf = /* @__PURE__ */ __name(async (store, person, project2) => (/* @__PURE__ */ new Set([
|
|
24075
|
+
project2,
|
|
24076
|
+
...(await store.knowledge.relations(null, person)).filter((one2) => one2.confirmed && one2.kind === "member-of" && one2.from === person && one2.to.startsWith("project:")).map((one2) => one2.to)
|
|
24077
|
+
])).size, "projectsOf");
|
|
24042
24078
|
var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
24043
24079
|
const found = [];
|
|
24044
24080
|
for (const person of people) {
|
|
@@ -24050,7 +24086,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
24050
24086
|
return found;
|
|
24051
24087
|
}, "identitiesIn");
|
|
24052
24088
|
|
|
24053
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
24054
24090
|
var SEARCH_LIMIT = 500;
|
|
24055
24091
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
24056
24092
|
var aliasHits = {
|
|
@@ -24099,15 +24135,17 @@ var aliasHits = {
|
|
|
24099
24135
|
}, "candidates")
|
|
24100
24136
|
};
|
|
24101
24137
|
|
|
24102
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
24103
24139
|
var WEIGHT = 0.5;
|
|
24104
24140
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
24105
24141
|
var LARGE_GROUP = 30;
|
|
24142
|
+
var SMALL_CHAT = 10;
|
|
24106
24143
|
var MIN_MESSAGES = 5;
|
|
24107
24144
|
var READ_LIMIT = 2e3;
|
|
24108
24145
|
var chatSenders = {
|
|
24109
24146
|
id: "chat-senders",
|
|
24110
|
-
version:
|
|
24147
|
+
version: 2,
|
|
24148
|
+
spreads: true,
|
|
24111
24149
|
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, since, owner, signal }) => {
|
|
24112
24150
|
if (!project2)
|
|
24113
24151
|
return [];
|
|
@@ -24131,7 +24169,7 @@ var chatSenders = {
|
|
|
24131
24169
|
const size4 = Math.max((await store.roster.members(key, reference.chat)).length, senders.size);
|
|
24132
24170
|
const weight = size4 > LARGE_GROUP ? LARGE_GROUP_WEIGHT : WEIGHT;
|
|
24133
24171
|
for (const [id2, { count: count4, last }] of senders) {
|
|
24134
|
-
if (count4 < MIN_MESSAGES)
|
|
24172
|
+
if (size4 > SMALL_CHAT && count4 < MIN_MESSAGES)
|
|
24135
24173
|
continue;
|
|
24136
24174
|
const person = await personRefOf(store, key.provider, id2);
|
|
24137
24175
|
if (!person || person === owner)
|
|
@@ -24151,7 +24189,7 @@ var chatSenders = {
|
|
|
24151
24189
|
}, "candidates")
|
|
24152
24190
|
};
|
|
24153
24191
|
|
|
24154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24192
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
24155
24193
|
var WEIGHT2 = 0.7;
|
|
24156
24194
|
var chatTitle = {
|
|
24157
24195
|
id: "chat-title",
|
|
@@ -24190,7 +24228,7 @@ var chatTitle = {
|
|
|
24190
24228
|
}, "candidates")
|
|
24191
24229
|
};
|
|
24192
24230
|
|
|
24193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
24194
24232
|
var WEIGHT3 = 0.3;
|
|
24195
24233
|
var CONTACTS = 500;
|
|
24196
24234
|
var MOST_PAIRS = 200;
|
|
@@ -24251,13 +24289,14 @@ var emailDomain = {
|
|
|
24251
24289
|
}, "candidates")
|
|
24252
24290
|
};
|
|
24253
24291
|
|
|
24254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
24255
24293
|
var NAMED = 0.7;
|
|
24256
24294
|
var MEMBER_ONLY = 0.3;
|
|
24257
24295
|
var READ_LIMIT2 = 500;
|
|
24258
24296
|
var mailThread = {
|
|
24259
24297
|
id: "mail-thread",
|
|
24260
24298
|
version: 1,
|
|
24299
|
+
spreads: true,
|
|
24261
24300
|
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, since, owner, signal }) => {
|
|
24262
24301
|
if (!project2)
|
|
24263
24302
|
return [];
|
|
@@ -24324,11 +24363,12 @@ var mailThread = {
|
|
|
24324
24363
|
}, "candidates")
|
|
24325
24364
|
};
|
|
24326
24365
|
|
|
24327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
24328
24367
|
var WEIGHT4 = 0.5;
|
|
24329
24368
|
var memberChats = {
|
|
24330
24369
|
id: "member-chats",
|
|
24331
24370
|
version: 1,
|
|
24371
|
+
spreads: true,
|
|
24332
24372
|
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, owner, signal }) => {
|
|
24333
24373
|
if (!project2)
|
|
24334
24374
|
return [];
|
|
@@ -24364,11 +24404,12 @@ var memberChats = {
|
|
|
24364
24404
|
}, "candidates")
|
|
24365
24405
|
};
|
|
24366
24406
|
|
|
24367
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24407
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
24368
24408
|
var WEIGHT5 = 0.6;
|
|
24369
24409
|
var memberDialog = {
|
|
24370
24410
|
id: "member-dialog",
|
|
24371
|
-
version:
|
|
24411
|
+
version: 2,
|
|
24412
|
+
spreads: true,
|
|
24372
24413
|
candidates: /* @__PURE__ */ __name(async ({ store, project: project2, confirmed, sources, owner, signal }) => {
|
|
24373
24414
|
if (!project2)
|
|
24374
24415
|
return [];
|
|
@@ -24382,7 +24423,7 @@ var memberDialog = {
|
|
|
24382
24423
|
if (chat.kind !== "dialog")
|
|
24383
24424
|
continue;
|
|
24384
24425
|
if (!projects.has(person))
|
|
24385
|
-
projects.set(person,
|
|
24426
|
+
projects.set(person, await projectsOf(store, person, project2.ref));
|
|
24386
24427
|
const shared = projects.get(person) ?? 1;
|
|
24387
24428
|
found.push({
|
|
24388
24429
|
from: chatRef2(key, chat.id),
|
|
@@ -24398,7 +24439,7 @@ var memberDialog = {
|
|
|
24398
24439
|
}, "candidates")
|
|
24399
24440
|
};
|
|
24400
24441
|
|
|
24401
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
24402
24443
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
24403
24444
|
async around(ref, window3) {
|
|
24404
24445
|
const at = parseLocator(ref);
|
|
@@ -24494,7 +24535,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
24494
24535
|
};
|
|
24495
24536
|
}, "storedNeighbours");
|
|
24496
24537
|
|
|
24497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24538
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
24498
24539
|
import { createHash as createHash2 } from "node:crypto";
|
|
24499
24540
|
var DAY2 = 864e5;
|
|
24500
24541
|
var MAX_TIME = 864e13;
|
|
@@ -24810,7 +24851,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
24810
24851
|
return value;
|
|
24811
24852
|
}, "decodeCheckpoint");
|
|
24812
24853
|
|
|
24813
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
24814
24855
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
24815
24856
|
var PAGE2 = 20;
|
|
24816
24857
|
var PEOPLE = 20;
|
|
@@ -24899,7 +24940,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
24899
24940
|
throw new CliError("validation_error", "invalid project gathering checkpoint", { param: "checkpoint" });
|
|
24900
24941
|
const progress = previous?.units.map((u) => ({ ...u })) ?? units2.map(() => ({ state: "pending", pages: 0, cursor: null, code: null }));
|
|
24901
24942
|
let fetched = previous?.fetched.map((f) => ({ ...f })) ?? [];
|
|
24902
|
-
const
|
|
24943
|
+
const seen2 = new Set(previous?.seen ?? []);
|
|
24903
24944
|
const signal = plan.signal;
|
|
24904
24945
|
const queries = plan.lanes.flatMap((lane) => lane.query === null ? [] : [lane.query]);
|
|
24905
24946
|
if (plan.fetch === "before-read" && (!ports.fetcher || !ports.coverage))
|
|
@@ -24952,7 +24993,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
24952
24993
|
known2.context = context2;
|
|
24953
24994
|
return true;
|
|
24954
24995
|
}
|
|
24955
|
-
if (!
|
|
24996
|
+
if (!seen2.has(seenKey(ref)))
|
|
24956
24997
|
return false;
|
|
24957
24998
|
matchedAgain.set(ref, (matchedAgain.get(ref) ?? /* @__PURE__ */ new Set()).add(lane.id));
|
|
24958
24999
|
return true;
|
|
@@ -24960,7 +25001,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
24960
25001
|
const take = /* @__PURE__ */ __name((item2, lane, kind, source) => {
|
|
24961
25002
|
if (again(item2.ref, lane))
|
|
24962
25003
|
return;
|
|
24963
|
-
|
|
25004
|
+
seen2.add(seenKey(item2.ref));
|
|
24964
25005
|
const short = excerpt(item2.text, lane.query ?? "", 300, { literal: true });
|
|
24965
25006
|
const fingerprint = contextEvidenceFingerprint(item2);
|
|
24966
25007
|
const { sender, ...stored } = item2;
|
|
@@ -25091,7 +25132,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
25091
25132
|
usage.aroundBytes += bytes2;
|
|
25092
25133
|
}, "charge")
|
|
25093
25134
|
},
|
|
25094
|
-
(ref) => byRef.has(ref) ||
|
|
25135
|
+
(ref) => byRef.has(ref) || seen2.has(seenKey(ref)),
|
|
25095
25136
|
signal
|
|
25096
25137
|
);
|
|
25097
25138
|
const people = peopleOf(items, senderOf);
|
|
@@ -25126,7 +25167,7 @@ var gatherProjectEvidence = /* @__PURE__ */ __name(async (ports, request) => {
|
|
|
25126
25167
|
fetched,
|
|
25127
25168
|
units: progress.map((u) => u.state === "read-limited" ? { ...u, state: "partial" } : u),
|
|
25128
25169
|
...plan.linkedKey === void 0 ? {} : { linkedChats: plan.linkedKey },
|
|
25129
|
-
seen: [...
|
|
25170
|
+
seen: [...seen2],
|
|
25130
25171
|
totals
|
|
25131
25172
|
};
|
|
25132
25173
|
const linkedRows = plan.linkedChats.map(({ provider, account, chat, ref, source, lane }) => {
|
|
@@ -25214,7 +25255,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
25214
25255
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
25215
25256
|
}, "peopleOf");
|
|
25216
25257
|
|
|
25217
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25258
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
25218
25259
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
25219
25260
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
25220
25261
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -25235,12 +25276,12 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
25235
25276
|
for (const entry of catalog.entries) {
|
|
25236
25277
|
const matches = [];
|
|
25237
25278
|
let omitted = 0;
|
|
25238
|
-
const
|
|
25279
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
25239
25280
|
for (const term of termsOf(entry)) {
|
|
25240
25281
|
const normalized2 = normalizeVocabularyName(term.name);
|
|
25241
|
-
if (
|
|
25282
|
+
if (seen2.has(normalized2))
|
|
25242
25283
|
continue;
|
|
25243
|
-
|
|
25284
|
+
seen2.add(normalized2);
|
|
25244
25285
|
const pattern = new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${normalized2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}(?![\\p{L}\\p{N}\\p{M}_])`, "u");
|
|
25245
25286
|
for (const { text: text2, source } of sources) {
|
|
25246
25287
|
if (!pattern.test(text2))
|
|
@@ -25258,7 +25299,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
25258
25299
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
25259
25300
|
}, "matchVocabularyTerms");
|
|
25260
25301
|
|
|
25261
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25302
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
25262
25303
|
var KINDS = ["project", "tag", "topic"];
|
|
25263
25304
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
25264
25305
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -25313,7 +25354,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
25313
25354
|
};
|
|
25314
25355
|
}, "findEvidenceMentions");
|
|
25315
25356
|
|
|
25316
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
25317
25358
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
25318
25359
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
25319
25360
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -25619,13 +25660,14 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
25619
25660
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
25620
25661
|
}, "purposeHintOf");
|
|
25621
25662
|
|
|
25622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
25623
25664
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
25624
25665
|
var PERSON_SCORERS = [emailDomain];
|
|
25625
25666
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
25626
25667
|
var DEFAULT_THRESHOLD = 0.5;
|
|
25627
25668
|
var PERSON_THRESHOLD = 0.3;
|
|
25628
25669
|
var DEFAULT_LIMIT = 20;
|
|
25670
|
+
var MAX_HOPS = 4;
|
|
25629
25671
|
var projectOf3 = /* @__PURE__ */ __name(async (store, reference) => {
|
|
25630
25672
|
const ref = await canonicalProjectRef(store, reference);
|
|
25631
25673
|
const entry = (await store.knowledge.vocabulary({ kind: "project" })).entries.find((one2) => one2.id === ref.slice(8));
|
|
@@ -25692,56 +25734,28 @@ var scanProjectLinks = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
25692
25734
|
nameOnly: 0,
|
|
25693
25735
|
unresolved: 0
|
|
25694
25736
|
};
|
|
25695
|
-
const
|
|
25696
|
-
const
|
|
25697
|
-
|
|
25698
|
-
|
|
25699
|
-
|
|
25700
|
-
|
|
25701
|
-
|
|
25702
|
-
|
|
25703
|
-
|
|
25704
|
-
|
|
25705
|
-
|
|
25706
|
-
|
|
25707
|
-
|
|
25708
|
-
|
|
25709
|
-
|
|
25710
|
-
|
|
25711
|
-
skipped.unresolved++;
|
|
25712
|
-
continue;
|
|
25713
|
-
}
|
|
25714
|
-
const weight = Math.min(1, Math.max(0, candidate.weight));
|
|
25715
|
-
const held = pairs.get(key) ?? { candidate, signals: /* @__PURE__ */ new Map() };
|
|
25716
|
-
const scorerId = `${scorer.id}@${scorer.version}`;
|
|
25717
|
-
const before2 = held.signals.get(scorerId);
|
|
25718
|
-
if (!before2 || before2.weight < weight)
|
|
25719
|
-
held.signals.set(scorerId, {
|
|
25720
|
-
scorer: scorerId,
|
|
25721
|
-
weight,
|
|
25722
|
-
why: candidate.why.slice(0, 500),
|
|
25723
|
-
...candidate.purpose && scorerInput.purposes.includes(candidate.purpose) ? { purpose: candidate.purpose } : {}
|
|
25724
|
-
});
|
|
25725
|
-
held.candidate = {
|
|
25726
|
-
...held.candidate,
|
|
25727
|
-
evidence: [.../* @__PURE__ */ new Set([...held.candidate.evidence, ...candidate.evidence])]
|
|
25728
|
-
};
|
|
25729
|
-
pairs.set(key, held);
|
|
25730
|
-
}
|
|
25737
|
+
const fixed = /* @__PURE__ */ new Map();
|
|
25738
|
+
const candidatesOf = /* @__PURE__ */ __name(async (scorer, seeds2) => {
|
|
25739
|
+
if (scorer.spreads)
|
|
25740
|
+
return scorer.candidates({ ...scorerInput, confirmed: seeds2 });
|
|
25741
|
+
const held = fixed.get(scorer) ?? await scorer.candidates(scorerInput);
|
|
25742
|
+
fixed.set(scorer, held);
|
|
25743
|
+
return held;
|
|
25744
|
+
}, "candidatesOf");
|
|
25745
|
+
let seeds = scorerInput.confirmed;
|
|
25746
|
+
let collected = await collect(store, scorerInput, scorers, (scorer) => candidatesOf(scorer, seeds));
|
|
25747
|
+
for (let hop = 0; hop < MAX_HOPS && scorers.some((one2) => one2.spreads); hop++) {
|
|
25748
|
+
const grown = await seedsOf(store, seeds, collected.scored, threshold);
|
|
25749
|
+
if (!grown)
|
|
25750
|
+
break;
|
|
25751
|
+
seeds = grown;
|
|
25752
|
+
collected = await collect(store, scorerInput, scorers, (scorer) => candidatesOf(scorer, seeds));
|
|
25731
25753
|
}
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
const purpose = list3.find((one2) => one2.purpose)?.purpose;
|
|
25735
|
-
return {
|
|
25736
|
-
candidate,
|
|
25737
|
-
purpose,
|
|
25738
|
-
signals: list3.map(({ scorer, weight, why }) => ({ scorer, weight, why })),
|
|
25739
|
-
score: combinedScore(list3.map((one2) => one2.weight))
|
|
25740
|
-
};
|
|
25741
|
-
}).sort((a, b) => b.score - a.score || a.candidate.from.localeCompare(b.candidate.from));
|
|
25754
|
+
skipped.nameOnly = collected.nameOnly;
|
|
25755
|
+
skipped.unresolved = collected.unresolved;
|
|
25742
25756
|
const proposals = [];
|
|
25743
25757
|
let fresh = 0;
|
|
25744
|
-
for (const { candidate, purpose, signals: signals2, score } of scored) {
|
|
25758
|
+
for (const { candidate, purpose, signals: signals2, score } of collected.scored) {
|
|
25745
25759
|
const state = await store.knowledge.relationState(null, candidate);
|
|
25746
25760
|
if (!state) {
|
|
25747
25761
|
skipped.unresolved++;
|
|
@@ -25798,6 +25812,73 @@ var scanProjectLinks = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
25798
25812
|
}
|
|
25799
25813
|
return { project: project2?.ref ?? null, proposals, skipped };
|
|
25800
25814
|
}, "scanProjectLinks");
|
|
25815
|
+
var collect = /* @__PURE__ */ __name(async (store, input, scorers, candidatesOf) => {
|
|
25816
|
+
const pairs = /* @__PURE__ */ new Map();
|
|
25817
|
+
const nameOnly = /* @__PURE__ */ new Set();
|
|
25818
|
+
let unresolved = 0;
|
|
25819
|
+
for (const scorer of scorers) {
|
|
25820
|
+
input.signal?.throwIfAborted();
|
|
25821
|
+
for (const candidate of await candidatesOf(scorer)) {
|
|
25822
|
+
const key = pairKey(candidate);
|
|
25823
|
+
const verdict = await admissible(store, input, candidate);
|
|
25824
|
+
if (verdict === "owner")
|
|
25825
|
+
continue;
|
|
25826
|
+
if (verdict === "name-only") {
|
|
25827
|
+
nameOnly.add(key);
|
|
25828
|
+
continue;
|
|
25829
|
+
}
|
|
25830
|
+
if (verdict !== "ok") {
|
|
25831
|
+
unresolved++;
|
|
25832
|
+
continue;
|
|
25833
|
+
}
|
|
25834
|
+
const weight = Math.min(1, Math.max(0, candidate.weight));
|
|
25835
|
+
const held = pairs.get(key) ?? { candidate, signals: /* @__PURE__ */ new Map() };
|
|
25836
|
+
const scorerId = `${scorer.id}@${scorer.version}`;
|
|
25837
|
+
const before2 = held.signals.get(scorerId);
|
|
25838
|
+
if (!before2 || before2.weight < weight)
|
|
25839
|
+
held.signals.set(scorerId, {
|
|
25840
|
+
scorer: scorerId,
|
|
25841
|
+
weight,
|
|
25842
|
+
why: candidate.why.slice(0, 500),
|
|
25843
|
+
...candidate.purpose && input.purposes.includes(candidate.purpose) ? { purpose: candidate.purpose } : {}
|
|
25844
|
+
});
|
|
25845
|
+
held.candidate = {
|
|
25846
|
+
...held.candidate,
|
|
25847
|
+
evidence: [.../* @__PURE__ */ new Set([...held.candidate.evidence, ...candidate.evidence])]
|
|
25848
|
+
};
|
|
25849
|
+
pairs.set(key, held);
|
|
25850
|
+
}
|
|
25851
|
+
}
|
|
25852
|
+
const scored = [...pairs.values()].map(({ candidate, signals: signals2 }) => {
|
|
25853
|
+
const list3 = [...signals2.values()].sort((a, b) => b.weight - a.weight || a.scorer.localeCompare(b.scorer));
|
|
25854
|
+
const purpose = list3.find((one2) => one2.purpose)?.purpose;
|
|
25855
|
+
return {
|
|
25856
|
+
candidate,
|
|
25857
|
+
purpose,
|
|
25858
|
+
signals: list3.map(({ scorer, weight, why }) => ({ scorer, weight, why })),
|
|
25859
|
+
score: combinedScore(list3.map((one2) => one2.weight))
|
|
25860
|
+
};
|
|
25861
|
+
}).sort((a, b) => b.score - a.score || a.candidate.from.localeCompare(b.candidate.from));
|
|
25862
|
+
return { scored, nameOnly: nameOnly.size, unresolved };
|
|
25863
|
+
}, "collect");
|
|
25864
|
+
var seedsOf = /* @__PURE__ */ __name(async (store, seeds, scored, threshold) => {
|
|
25865
|
+
const chats = new Set(seeds.chats);
|
|
25866
|
+
const people = new Set(seeds.people);
|
|
25867
|
+
const size4 = chats.size + people.size;
|
|
25868
|
+
for (const { candidate, score } of scored) {
|
|
25869
|
+
if (score < threshold || candidate.kind !== "member-of")
|
|
25870
|
+
continue;
|
|
25871
|
+
if (chats.has(candidate.from) || people.has(candidate.from))
|
|
25872
|
+
continue;
|
|
25873
|
+
if ((await store.knowledge.relationState(null, candidate))?.rejected !== false)
|
|
25874
|
+
continue;
|
|
25875
|
+
if (candidate.from.startsWith("chat:"))
|
|
25876
|
+
chats.add(candidate.from);
|
|
25877
|
+
else if (candidate.from.startsWith("person:"))
|
|
25878
|
+
people.add(candidate.from);
|
|
25879
|
+
}
|
|
25880
|
+
return chats.size + people.size === size4 ? void 0 : { chats: [...chats].sort(), people: [...people].sort() };
|
|
25881
|
+
}, "seedsOf");
|
|
25801
25882
|
var admissible = /* @__PURE__ */ __name(async (store, input, candidate) => {
|
|
25802
25883
|
if (candidate.from === candidate.to || !Number.isFinite(candidate.weight))
|
|
25803
25884
|
return "unresolved";
|
|
@@ -25827,18 +25908,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
25827
25908
|
}, "referenceOf");
|
|
25828
25909
|
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");
|
|
25829
25910
|
|
|
25830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25911
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25831
25912
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25832
25913
|
|
|
25833
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25914
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25834
25915
|
import { lstat } from "node:fs/promises";
|
|
25835
25916
|
|
|
25836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25917
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25837
25918
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
25838
25919
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25839
25920
|
import { join as join2 } from "node:path";
|
|
25840
25921
|
|
|
25841
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25922
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25842
25923
|
import { createHash as createHash3 } from "node:crypto";
|
|
25843
25924
|
var metadataLimit = 16384;
|
|
25844
25925
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -25898,7 +25979,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
25898
25979
|
}
|
|
25899
25980
|
}, "readPartialMetadata");
|
|
25900
25981
|
|
|
25901
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25982
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
25902
25983
|
import { randomUUID } from "node:crypto";
|
|
25903
25984
|
import { open, rename, unlink } from "node:fs/promises";
|
|
25904
25985
|
import { join } from "node:path";
|
|
@@ -25990,7 +26071,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
25990
26071
|
};
|
|
25991
26072
|
}, "partialWriter");
|
|
25992
26073
|
|
|
25993
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26074
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25994
26075
|
var NativeRecordingPartialStore = class {
|
|
25995
26076
|
static {
|
|
25996
26077
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -26097,12 +26178,12 @@ var NativeRecordingPartialStore = class {
|
|
|
26097
26178
|
}
|
|
26098
26179
|
};
|
|
26099
26180
|
|
|
26100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26101
26182
|
import { createHash as createHash5 } from "node:crypto";
|
|
26102
26183
|
import { link as link2 } from "node:fs/promises";
|
|
26103
26184
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
26104
26185
|
|
|
26105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
26106
26187
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
26107
26188
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
26108
26189
|
signal?.throwIfAborted();
|
|
@@ -26137,7 +26218,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
26137
26218
|
signal?.throwIfAborted();
|
|
26138
26219
|
}, "commitPublication");
|
|
26139
26220
|
|
|
26140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26221
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
26141
26222
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
26142
26223
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
26143
26224
|
import { join as join3 } from "node:path";
|
|
@@ -26210,7 +26291,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
26210
26291
|
}
|
|
26211
26292
|
}, "writePublicationJournal");
|
|
26212
26293
|
|
|
26213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26294
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26214
26295
|
var NativeRecordingPublication = class {
|
|
26215
26296
|
static {
|
|
26216
26297
|
__name(this, "NativeRecordingPublication");
|
|
@@ -26283,7 +26364,7 @@ var NativeRecordingPublication = class {
|
|
|
26283
26364
|
}
|
|
26284
26365
|
};
|
|
26285
26366
|
|
|
26286
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26367
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26287
26368
|
import { createHash as createHash6 } from "node:crypto";
|
|
26288
26369
|
import { readdir } from "node:fs/promises";
|
|
26289
26370
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -26370,7 +26451,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
26370
26451
|
beforePublish
|
|
26371
26452
|
}), "commitMediaEntry");
|
|
26372
26453
|
|
|
26373
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26454
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26374
26455
|
var validator = '"media-completed-v1"';
|
|
26375
26456
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26376
26457
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -26471,7 +26552,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
26471
26552
|
return entry;
|
|
26472
26553
|
}, "archiveMediaFile");
|
|
26473
26554
|
|
|
26474
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
26475
26556
|
import { mkdir, realpath } from "node:fs/promises";
|
|
26476
26557
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
26477
26558
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -26538,7 +26619,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
26538
26619
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
26539
26620
|
}, "withMediaArchiveLocks");
|
|
26540
26621
|
|
|
26541
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26622
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26542
26623
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
26543
26624
|
if (value === void 0)
|
|
26544
26625
|
return void 0;
|
|
@@ -26620,7 +26701,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26620
26701
|
const account = await ports.chats.account();
|
|
26621
26702
|
let saved = 0, existing = 0, chats = 0;
|
|
26622
26703
|
const walk = /* @__PURE__ */ __name(async (chat) => {
|
|
26623
|
-
const
|
|
26704
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
26624
26705
|
let before2;
|
|
26625
26706
|
for (; ; ) {
|
|
26626
26707
|
await beforeWrite();
|
|
@@ -26638,9 +26719,9 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26638
26719
|
reachedSince = true;
|
|
26639
26720
|
continue;
|
|
26640
26721
|
}
|
|
26641
|
-
if (
|
|
26722
|
+
if (seen2.has(message.id))
|
|
26642
26723
|
continue;
|
|
26643
|
-
|
|
26724
|
+
seen2.add(message.id);
|
|
26644
26725
|
fresh++;
|
|
26645
26726
|
const one2 = await saveMessage(root, account, message, ports, known2, beforeWrite, options);
|
|
26646
26727
|
saved += one2.saved;
|
|
@@ -26666,15 +26747,15 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26666
26747
|
}
|
|
26667
26748
|
}
|
|
26668
26749
|
} else {
|
|
26669
|
-
const
|
|
26750
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
26670
26751
|
let offset = 0;
|
|
26671
26752
|
for (; ; ) {
|
|
26672
26753
|
await beforeWrite();
|
|
26673
26754
|
const page = await ports.chats.list({ offset, limit: 100 });
|
|
26674
26755
|
let fresh = 0;
|
|
26675
26756
|
for (const chat of page.items)
|
|
26676
|
-
if (!
|
|
26677
|
-
|
|
26757
|
+
if (!seen2.has(chat.id)) {
|
|
26758
|
+
seen2.add(chat.id);
|
|
26678
26759
|
fresh++;
|
|
26679
26760
|
await walk(chat.id);
|
|
26680
26761
|
}
|
|
@@ -26691,7 +26772,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26691
26772
|
}, { create: true });
|
|
26692
26773
|
}, "archiveMedia");
|
|
26693
26774
|
|
|
26694
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
26695
26776
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
26696
26777
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
26697
26778
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -26844,7 +26925,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
26844
26925
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
26845
26926
|
}, "moveMediaArchive");
|
|
26846
26927
|
|
|
26847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26928
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
26848
26929
|
var bytesOf2 = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
26849
26930
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
26850
26931
|
}, "progress") }) => {
|
|
@@ -26867,7 +26948,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26867
26948
|
}
|
|
26868
26949
|
await nativeRuntime({ env, progress });
|
|
26869
26950
|
progress(`${model.id}: loading it once to check it works`);
|
|
26870
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
26951
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-EP3KKO6Y.js");
|
|
26871
26952
|
const embedder = await openEmbedder2(model, directory2);
|
|
26872
26953
|
try {
|
|
26873
26954
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -26888,7 +26969,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
26888
26969
|
}
|
|
26889
26970
|
await nativeRuntime({ env, progress });
|
|
26890
26971
|
progress(`${model.id}: loading it once to check it works`);
|
|
26891
|
-
const { openReranker } = await import("./rerank-
|
|
26972
|
+
const { openReranker } = await import("./rerank-N5T2TIIY.js");
|
|
26892
26973
|
const reranker = await openReranker(model, directory2);
|
|
26893
26974
|
try {
|
|
26894
26975
|
await reranker.score("check", ["check"]);
|
|
@@ -26906,7 +26987,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26906
26987
|
await installFiles(placedImage(model, directory2), { progress, ...bytes2 ? { bytes: bytes2 } : {} });
|
|
26907
26988
|
}
|
|
26908
26989
|
progress(`${model.id}: loading it once to check it works`);
|
|
26909
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
26990
|
+
const { openPictureEmbedder } = await import("./embedder-ENGCALJ7.js");
|
|
26910
26991
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
26911
26992
|
try {
|
|
26912
26993
|
const vector = await embedder.embedQuery("check");
|
|
@@ -26918,7 +26999,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26918
26999
|
return { model, directory: directory2 };
|
|
26919
27000
|
}, "downloadImageModel");
|
|
26920
27001
|
|
|
26921
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
26922
27003
|
var MONEY_REQUEST = "money-request";
|
|
26923
27004
|
var MONEY_DONE = "money-done";
|
|
26924
27005
|
var PROMISE = "promise";
|
|
@@ -26952,10 +27033,10 @@ var MONEY_WORDS = [
|
|
|
26952
27033
|
}
|
|
26953
27034
|
];
|
|
26954
27035
|
|
|
26955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
26956
27037
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
26957
27038
|
|
|
26958
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27039
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
26959
27040
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
26960
27041
|
var MONEY_DONE_FORMS = words2([
|
|
26961
27042
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -26995,7 +27076,7 @@ var PROMISE_FORMS = words2([
|
|
|
26995
27076
|
"estar\xE1 listo"
|
|
26996
27077
|
]);
|
|
26997
27078
|
|
|
26998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27079
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
26999
27080
|
var EXCERPT_CHARS = 80;
|
|
27000
27081
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
27001
27082
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -27017,7 +27098,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
27017
27098
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
27018
27099
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
27019
27100
|
|
|
27020
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
27021
27102
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
27022
27103
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
27023
27104
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -27098,7 +27179,7 @@ var amounts = {
|
|
|
27098
27179
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
27099
27180
|
};
|
|
27100
27181
|
|
|
27101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
27102
27183
|
var children = {
|
|
27103
27184
|
id: "children",
|
|
27104
27185
|
version: 1,
|
|
@@ -27127,7 +27208,7 @@ var children = {
|
|
|
27127
27208
|
}, "read")
|
|
27128
27209
|
};
|
|
27129
27210
|
|
|
27130
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
27131
27212
|
var coverage = {
|
|
27132
27213
|
id: "coverage",
|
|
27133
27214
|
version: 1,
|
|
@@ -27156,7 +27237,7 @@ var coverage = {
|
|
|
27156
27237
|
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")
|
|
27157
27238
|
};
|
|
27158
27239
|
|
|
27159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
27160
27241
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
27161
27242
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
27162
27243
|
signal: "payments",
|
|
@@ -27206,7 +27287,7 @@ var payments = {
|
|
|
27206
27287
|
}, "read")
|
|
27207
27288
|
};
|
|
27208
27289
|
|
|
27209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
27210
27291
|
var PATTERNS_PER_CHAT = 3;
|
|
27211
27292
|
var DAY3 = 864e5;
|
|
27212
27293
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -27295,7 +27376,7 @@ var promises = {
|
|
|
27295
27376
|
}, "read")
|
|
27296
27377
|
};
|
|
27297
27378
|
|
|
27298
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27379
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
27299
27380
|
var PER_SIDE = 5;
|
|
27300
27381
|
var WEEK = 7 * 864e5;
|
|
27301
27382
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -27326,7 +27407,7 @@ var questions2 = {
|
|
|
27326
27407
|
}, "attention")
|
|
27327
27408
|
};
|
|
27328
27409
|
|
|
27329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
27330
27411
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
27331
27412
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
27332
27413
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27394,7 +27475,7 @@ var replyNext = {
|
|
|
27394
27475
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27395
27476
|
};
|
|
27396
27477
|
|
|
27397
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27398
27479
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27399
27480
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27400
27481
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27440,7 +27521,7 @@ var topics = {
|
|
|
27440
27521
|
}, "read")
|
|
27441
27522
|
};
|
|
27442
27523
|
|
|
27443
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27524
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27444
27525
|
var STATUS_SIGNALS = [
|
|
27445
27526
|
replyNext,
|
|
27446
27527
|
questions2,
|
|
@@ -27452,7 +27533,7 @@ var STATUS_SIGNALS = [
|
|
|
27452
27533
|
children
|
|
27453
27534
|
];
|
|
27454
27535
|
|
|
27455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27456
27537
|
var DAY4 = 864e5;
|
|
27457
27538
|
var STATUS_WINDOW = 300;
|
|
27458
27539
|
var STATUS_CHATS = 16;
|
|
@@ -27462,7 +27543,7 @@ var projectsCatalog = /* @__PURE__ */ __name(async (store) => new Map((await sto
|
|
|
27462
27543
|
var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
27463
27544
|
const children2 = [];
|
|
27464
27545
|
const cut = [];
|
|
27465
|
-
const
|
|
27546
|
+
const seen2 = /* @__PURE__ */ new Set([root.ref]);
|
|
27466
27547
|
let level2 = [root.ref];
|
|
27467
27548
|
for (let depth = 1; level2.length > 0; depth++) {
|
|
27468
27549
|
const below = [];
|
|
@@ -27476,12 +27557,12 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
27476
27557
|
const entry = catalog.get(ref);
|
|
27477
27558
|
if (!entry)
|
|
27478
27559
|
continue;
|
|
27479
|
-
if (
|
|
27560
|
+
if (seen2.has(ref)) {
|
|
27480
27561
|
if (!cut.some((one2) => one2.ref === ref) && !children2.some((one2) => one2.ref === ref))
|
|
27481
27562
|
cut.push({ ref, reason: "cycle" });
|
|
27482
27563
|
continue;
|
|
27483
27564
|
}
|
|
27484
|
-
|
|
27565
|
+
seen2.add(ref);
|
|
27485
27566
|
if (depth > CHILD_DEPTH)
|
|
27486
27567
|
cut.push({ ref, reason: "depth" });
|
|
27487
27568
|
else if (children2.length >= CHILDREN)
|
|
@@ -27641,7 +27722,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27641
27722
|
};
|
|
27642
27723
|
}, "projectStatus");
|
|
27643
27724
|
|
|
27644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
27645
27726
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
27646
27727
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27647
27728
|
if (deps.offline)
|
|
@@ -27713,7 +27794,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
27713
27794
|
};
|
|
27714
27795
|
}, "accountService");
|
|
27715
27796
|
|
|
27716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27797
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
27717
27798
|
var MINUTE = 6e4;
|
|
27718
27799
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
27719
27800
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -27732,7 +27813,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
27732
27813
|
return new Date(at - at % MINUTE).toISOString();
|
|
27733
27814
|
}, "sendTime");
|
|
27734
27815
|
|
|
27735
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
27736
27817
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
27737
27818
|
try {
|
|
27738
27819
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -27979,7 +28060,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
27979
28060
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
27980
28061
|
}, "linkLimits");
|
|
27981
28062
|
|
|
27982
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
27983
28064
|
var THREADS_PAGE = 500;
|
|
27984
28065
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
27985
28066
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -28058,7 +28139,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
28058
28139
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
28059
28140
|
}, "readMail");
|
|
28060
28141
|
|
|
28061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
28062
28143
|
var NO_MAIL = "no_mail";
|
|
28063
28144
|
var MAIL = "email";
|
|
28064
28145
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -28105,7 +28186,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
28105
28186
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
28106
28187
|
}, "accountsOfKind");
|
|
28107
28188
|
|
|
28108
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28189
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
28109
28190
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
28110
28191
|
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");
|
|
28111
28192
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -28453,7 +28534,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28453
28534
|
};
|
|
28454
28535
|
}, "statsLucene");
|
|
28455
28536
|
|
|
28456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28457
28538
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28458
28539
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28459
28540
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -28622,7 +28703,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28622
28703
|
};
|
|
28623
28704
|
}, "readRankingSelection");
|
|
28624
28705
|
|
|
28625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
28626
28707
|
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");
|
|
28627
28708
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
28628
28709
|
command,
|
|
@@ -28632,7 +28713,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
28632
28713
|
fieldsVersion: FIELD_VERSION
|
|
28633
28714
|
}), "searchRecordOf");
|
|
28634
28715
|
|
|
28635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28716
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
28636
28717
|
function invalid2(message) {
|
|
28637
28718
|
throw new CliError("validation_error", message);
|
|
28638
28719
|
}
|
|
@@ -28926,7 +29007,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28926
29007
|
}, "evidence")
|
|
28927
29008
|
}), "adminStatisticsService");
|
|
28928
29009
|
|
|
28929
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29010
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
28930
29011
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
28931
29012
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
28932
29013
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -29063,16 +29144,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29063
29144
|
return { plan, repair };
|
|
29064
29145
|
}, "gapsService");
|
|
29065
29146
|
|
|
29066
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29147
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
29067
29148
|
import { createHash as createHash9 } from "node:crypto";
|
|
29068
29149
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
29069
29150
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
29070
29151
|
|
|
29071
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29072
29153
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
29073
29154
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
29074
29155
|
|
|
29075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
29076
29157
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
29077
29158
|
import { open as open4, stat } from "node:fs/promises";
|
|
29078
29159
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -29274,7 +29355,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
29274
29355
|
return { name, source };
|
|
29275
29356
|
}, "readStickerFile");
|
|
29276
29357
|
|
|
29277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29278
29359
|
var MAX_FILES = 1e4;
|
|
29279
29360
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
29280
29361
|
if (refusedPlace(directory2, app, env))
|
|
@@ -29343,15 +29424,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29343
29424
|
return choices;
|
|
29344
29425
|
}, "directoryPaths");
|
|
29345
29426
|
|
|
29346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29427
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29347
29428
|
import { posix } from "node:path";
|
|
29348
29429
|
|
|
29349
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29350
29431
|
import { setImmediate as tick } from "node:timers/promises";
|
|
29351
29432
|
import { crc32 } from "node:zlib";
|
|
29352
29433
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
29353
29434
|
|
|
29354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
29355
29436
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
29356
29437
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
29357
29438
|
var SAMPLE = 65536;
|
|
@@ -29453,7 +29534,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29453
29534
|
return result.text;
|
|
29454
29535
|
}, "decodeXml");
|
|
29455
29536
|
|
|
29456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29457
29538
|
var MAX_PART = 10 * 1024 * 1024;
|
|
29458
29539
|
var MAX_ENTRIES = 1e3;
|
|
29459
29540
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -29528,14 +29609,14 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
29528
29609
|
cancelled(signal);
|
|
29529
29610
|
const entries = directory(bytes2);
|
|
29530
29611
|
const result = /* @__PURE__ */ new Map();
|
|
29531
|
-
const
|
|
29612
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
29532
29613
|
const done2 = /* @__PURE__ */ new Set();
|
|
29533
29614
|
let expanded = 0;
|
|
29534
29615
|
const archive = new Unzip((file2) => {
|
|
29535
29616
|
const expected2 = entries.get(file2.name);
|
|
29536
|
-
if (!expected2 ||
|
|
29617
|
+
if (!expected2 || seen2.has(file2.name))
|
|
29537
29618
|
throw new Error("invalid_zip");
|
|
29538
|
-
|
|
29619
|
+
seen2.add(file2.name);
|
|
29539
29620
|
const keep2 = /\.(xml|rels|opf|xhtml|html)$/i.test(file2.name) || file2.name === "mimetype";
|
|
29540
29621
|
let size4 = 0;
|
|
29541
29622
|
let checksum = 0;
|
|
@@ -29576,7 +29657,7 @@ var readContainer = /* @__PURE__ */ __name(async (bytes2, signal) => {
|
|
|
29576
29657
|
await tick();
|
|
29577
29658
|
}
|
|
29578
29659
|
cancelled(signal);
|
|
29579
|
-
if (
|
|
29660
|
+
if (seen2.size !== entries.size || done2.size !== entries.size)
|
|
29580
29661
|
throw new Error("incomplete_zip");
|
|
29581
29662
|
return result;
|
|
29582
29663
|
}, "readContainer");
|
|
@@ -29668,7 +29749,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29668
29749
|
return found;
|
|
29669
29750
|
}, "elements");
|
|
29670
29751
|
|
|
29671
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29672
29753
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29673
29754
|
let name = "";
|
|
29674
29755
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -29723,7 +29804,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
29723
29804
|
return { text: parts.join("").trim(), truncated: false };
|
|
29724
29805
|
}, "sheetText");
|
|
29725
29806
|
|
|
29726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29807
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29727
29808
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
29728
29809
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
29729
29810
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -30123,10 +30204,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
30123
30204
|
}
|
|
30124
30205
|
}, "readDocument");
|
|
30125
30206
|
|
|
30126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30127
30208
|
import { extname as extname3 } from "node:path";
|
|
30128
30209
|
|
|
30129
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
30130
30211
|
import { readFileSync } from "node:fs";
|
|
30131
30212
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
30132
30213
|
import { fileURLToPath } from "node:url";
|
|
@@ -30187,7 +30268,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
30187
30268
|
}
|
|
30188
30269
|
}, "derived");
|
|
30189
30270
|
|
|
30190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30271
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
30191
30272
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
30192
30273
|
var image2 = {
|
|
30193
30274
|
id: "image",
|
|
@@ -30196,7 +30277,7 @@ var image2 = {
|
|
|
30196
30277
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
30197
30278
|
};
|
|
30198
30279
|
|
|
30199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
30200
30281
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
30201
30282
|
var doc = {
|
|
30202
30283
|
id: "doc",
|
|
@@ -30208,7 +30289,7 @@ var doc = {
|
|
|
30208
30289
|
}), "read")
|
|
30209
30290
|
};
|
|
30210
30291
|
|
|
30211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
30212
30293
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
30213
30294
|
var docx = {
|
|
30214
30295
|
id: "docx",
|
|
@@ -30221,7 +30302,7 @@ var docx = {
|
|
|
30221
30302
|
}), "read")
|
|
30222
30303
|
};
|
|
30223
30304
|
|
|
30224
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30305
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30225
30306
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
30226
30307
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
30227
30308
|
"fonttbl",
|
|
@@ -30397,7 +30478,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
30397
30478
|
}, "htmlText");
|
|
30398
30479
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
30399
30480
|
|
|
30400
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
30401
30482
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
30402
30483
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
30403
30484
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -30453,7 +30534,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
30453
30534
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
30454
30535
|
}, "markdownSections");
|
|
30455
30536
|
|
|
30456
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30537
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
30457
30538
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
30458
30539
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
30459
30540
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -30524,7 +30605,7 @@ var html = {
|
|
|
30524
30605
|
}, "read")
|
|
30525
30606
|
};
|
|
30526
30607
|
|
|
30527
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
30528
30609
|
var office = {
|
|
30529
30610
|
id: "office",
|
|
30530
30611
|
version: documentExtractor("odt"),
|
|
@@ -30535,7 +30616,7 @@ var office = {
|
|
|
30535
30616
|
}, "read")
|
|
30536
30617
|
};
|
|
30537
30618
|
|
|
30538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30619
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
30539
30620
|
var pdf = {
|
|
30540
30621
|
id: "pdf",
|
|
30541
30622
|
version: "unpdf",
|
|
@@ -30602,7 +30683,7 @@ var pdf = {
|
|
|
30602
30683
|
}), "read")
|
|
30603
30684
|
};
|
|
30604
30685
|
|
|
30605
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30606
30687
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30607
30688
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30608
30689
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30622,7 +30703,7 @@ var plain = {
|
|
|
30622
30703
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30623
30704
|
};
|
|
30624
30705
|
|
|
30625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30626
30707
|
var rtf = {
|
|
30627
30708
|
id: "rtf",
|
|
30628
30709
|
version: "v1",
|
|
@@ -30630,10 +30711,10 @@ var rtf = {
|
|
|
30630
30711
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30631
30712
|
};
|
|
30632
30713
|
|
|
30633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30634
30715
|
import { basename as basename5 } from "node:path";
|
|
30635
30716
|
|
|
30636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30637
30718
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
30638
30719
|
const cells = [];
|
|
30639
30720
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -30671,7 +30752,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
30671
30752
|
return { cells, truncated };
|
|
30672
30753
|
}, "delimitedSpans");
|
|
30673
30754
|
|
|
30674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30675
30756
|
var DELIMITED = {
|
|
30676
30757
|
".csv": ",",
|
|
30677
30758
|
".tsv": " ",
|
|
@@ -30710,7 +30791,7 @@ var sheets = {
|
|
|
30710
30791
|
}, "read")
|
|
30711
30792
|
};
|
|
30712
30793
|
|
|
30713
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
30714
30795
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
30715
30796
|
var HEAD_BYTES = 1024;
|
|
30716
30797
|
var readers = [...BUILT_INS2];
|
|
@@ -30720,7 +30801,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
30720
30801
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
30721
30802
|
}, "readWithRegistry");
|
|
30722
30803
|
|
|
30723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30724
30805
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
30725
30806
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
30726
30807
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -31799,7 +31880,7 @@ function imageSize(input) {
|
|
|
31799
31880
|
}
|
|
31800
31881
|
__name(imageSize, "imageSize");
|
|
31801
31882
|
|
|
31802
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
31803
31884
|
var MAX_PAGES = 20;
|
|
31804
31885
|
var MAX_PIXELS = 2e7;
|
|
31805
31886
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -31950,7 +32031,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
31950
32031
|
}
|
|
31951
32032
|
}, "ocrPdf");
|
|
31952
32033
|
|
|
31953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
31954
32035
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
31955
32036
|
const limits = pdfPreviewLimits(env);
|
|
31956
32037
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -32027,7 +32108,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
32027
32108
|
}
|
|
32028
32109
|
}, "pdfPreview");
|
|
32029
32110
|
|
|
32030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
32031
32112
|
import { createHash as createHash8 } from "node:crypto";
|
|
32032
32113
|
import { constants } from "node:fs";
|
|
32033
32114
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -32062,42 +32143,42 @@ var retainedBytes = /* @__PURE__ */ __name(async (path, options, captureFile = f
|
|
|
32062
32143
|
const capturedFile = captureFile ? Buffer.alloc(opened.size) : void 0;
|
|
32063
32144
|
const head = Buffer.alloc(32);
|
|
32064
32145
|
const hash3 = createHash8("sha256");
|
|
32065
|
-
let
|
|
32146
|
+
let seen2 = 0;
|
|
32066
32147
|
let copied = 0;
|
|
32067
32148
|
const scratch = Buffer.alloc(65536);
|
|
32068
32149
|
while (true) {
|
|
32069
32150
|
cancelled4();
|
|
32070
|
-
const { bytesRead } = await handle.read(scratch, 0, scratch.length,
|
|
32151
|
+
const { bytesRead } = await handle.read(scratch, 0, scratch.length, seen2);
|
|
32071
32152
|
if (bytesRead === 0)
|
|
32072
32153
|
break;
|
|
32073
32154
|
const chunk = scratch.subarray(0, bytesRead);
|
|
32074
|
-
if (
|
|
32155
|
+
if (seen2 + chunk.length > maxBytes || seen2 + chunk.length > opened.size)
|
|
32075
32156
|
throw new CliError("validation_error", "the retained attachment changed; restart its transfer");
|
|
32076
32157
|
hash3.update(chunk);
|
|
32077
32158
|
if (capturedFile)
|
|
32078
|
-
chunk.copy(capturedFile,
|
|
32079
|
-
if (
|
|
32080
|
-
chunk.copy(head,
|
|
32081
|
-
const start = Math.max(0, offsetBytes -
|
|
32082
|
-
const end = Math.min(chunk.length, offsetBytes + bytes2.length -
|
|
32159
|
+
chunk.copy(capturedFile, seen2);
|
|
32160
|
+
if (seen2 < head.length)
|
|
32161
|
+
chunk.copy(head, seen2, 0, Math.min(chunk.length, head.length - seen2));
|
|
32162
|
+
const start = Math.max(0, offsetBytes - seen2);
|
|
32163
|
+
const end = Math.min(chunk.length, offsetBytes + bytes2.length - seen2);
|
|
32083
32164
|
if (end > start)
|
|
32084
|
-
copied += chunk.copy(bytes2,
|
|
32085
|
-
|
|
32165
|
+
copied += chunk.copy(bytes2, seen2 + start - offsetBytes, start, end);
|
|
32166
|
+
seen2 += chunk.length;
|
|
32086
32167
|
}
|
|
32087
32168
|
cancelled4();
|
|
32088
32169
|
const after = await handle.stat();
|
|
32089
|
-
if (
|
|
32170
|
+
if (seen2 !== opened.size || copied !== bytes2.length || after.size !== opened.size || after.mtimeMs !== opened.mtimeMs || after.ctimeMs !== opened.ctimeMs)
|
|
32090
32171
|
throw new CliError("validation_error", "the retained attachment changed; restart its transfer");
|
|
32091
32172
|
const sha256 = hash3.digest("hex");
|
|
32092
32173
|
if (options.ifSha256 !== void 0 && options.ifSha256.toLowerCase() !== sha256)
|
|
32093
32174
|
throw new CliError("validation_error", "the attachment SHA-256 changed; restart its transfer");
|
|
32094
32175
|
return {
|
|
32095
|
-
totalBytes:
|
|
32176
|
+
totalBytes: seen2,
|
|
32096
32177
|
sha256,
|
|
32097
32178
|
offsetBytes,
|
|
32098
32179
|
readBytes: bytes2.length,
|
|
32099
|
-
nextOffsetBytes: offsetBytes + bytes2.length <
|
|
32100
|
-
complete: offsetBytes === 0 && bytes2.length ===
|
|
32180
|
+
nextOffsetBytes: offsetBytes + bytes2.length < seen2 ? offsetBytes + bytes2.length : null,
|
|
32181
|
+
complete: offsetBytes === 0 && bytes2.length === seen2,
|
|
32101
32182
|
base64: bytes2.toString("base64"),
|
|
32102
32183
|
head,
|
|
32103
32184
|
capturedFile
|
|
@@ -32135,7 +32216,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
32135
32216
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
32136
32217
|
}, "transferMime");
|
|
32137
32218
|
|
|
32138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32219
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
32139
32220
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
32140
32221
|
import { link as link3, rm } from "node:fs/promises";
|
|
32141
32222
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -32249,7 +32330,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
32249
32330
|
}
|
|
32250
32331
|
}, "save");
|
|
32251
32332
|
|
|
32252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32333
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
32253
32334
|
var ATTACHMENT_QUERY = {
|
|
32254
32335
|
entity: "attachment",
|
|
32255
32336
|
backend: "sql",
|
|
@@ -32672,7 +32753,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32672
32753
|
}, "setText")
|
|
32673
32754
|
}), "attachmentsService");
|
|
32674
32755
|
|
|
32675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32756
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32676
32757
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32677
32758
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32678
32759
|
const store = await accountStore(deps);
|
|
@@ -32702,7 +32783,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32702
32783
|
}, "list")
|
|
32703
32784
|
}), "chatDocumentsService");
|
|
32704
32785
|
|
|
32705
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32706
32787
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32707
32788
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32708
32789
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32789,7 +32870,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32789
32870
|
}
|
|
32790
32871
|
}, "isRetentionSelection");
|
|
32791
32872
|
|
|
32792
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32873
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32793
32874
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32794
32875
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
32795
32876
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -32996,7 +33077,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32996
33077
|
};
|
|
32997
33078
|
}, "countersService");
|
|
32998
33079
|
|
|
32999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
33000
33081
|
var SYNC_KEY = "messages.sync-first";
|
|
33001
33082
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
33002
33083
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -33128,7 +33209,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
33128
33209
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
33129
33210
|
}), "withRefresh");
|
|
33130
33211
|
|
|
33131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
33132
33213
|
var CANDIDATES = 50;
|
|
33133
33214
|
var WORD_HITS = 200;
|
|
33134
33215
|
var RRF_K = 60;
|
|
@@ -33206,11 +33287,11 @@ var embeddingsSearch = /* @__PURE__ */ __name((deps) => {
|
|
|
33206
33287
|
}
|
|
33207
33288
|
ranked.sort((a, b) => (b.score ?? Number.NEGATIVE_INFINITY) - (a.score ?? Number.NEGATIVE_INFINITY));
|
|
33208
33289
|
}
|
|
33209
|
-
const
|
|
33290
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
33210
33291
|
const hits = ranked.flatMap(({ summary, chunk }) => {
|
|
33211
|
-
if (
|
|
33292
|
+
if (seen2.has(summary.id))
|
|
33212
33293
|
return [];
|
|
33213
|
-
|
|
33294
|
+
seen2.add(summary.id);
|
|
33214
33295
|
return [{ summary, chunk }];
|
|
33215
33296
|
});
|
|
33216
33297
|
return { hits, outside, sources };
|
|
@@ -33403,13 +33484,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33403
33484
|
return mean2.map((value) => value / length);
|
|
33404
33485
|
}, "meanOf");
|
|
33405
33486
|
|
|
33406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33487
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
33407
33488
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33408
33489
|
...embeddingsMaintenance(deps),
|
|
33409
33490
|
...embeddingsSearch(deps)
|
|
33410
33491
|
}), "embeddingsService");
|
|
33411
33492
|
|
|
33412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
33413
33494
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33414
33495
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33415
33496
|
if (deps.offline)
|
|
@@ -33528,12 +33609,12 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33528
33609
|
const named3 = [];
|
|
33529
33610
|
for (const one2 of typed) {
|
|
33530
33611
|
const folder = await folderOf(connection, one2);
|
|
33531
|
-
if (named3.some((
|
|
33612
|
+
if (named3.some((seen2) => seen2.id === folder.id))
|
|
33532
33613
|
throw new CliError("validation_error", `"${one2}" is named twice`);
|
|
33533
33614
|
named3.push(folder);
|
|
33534
33615
|
}
|
|
33535
33616
|
const all = await capability(connection, "folders", "list its folders")();
|
|
33536
|
-
const folders = [...named3, ...all.filter((one2) => !named3.some((
|
|
33617
|
+
const folders = [...named3, ...all.filter((one2) => !named3.some((seen2) => seen2.id === one2.id))];
|
|
33537
33618
|
const operationId = newOperationId();
|
|
33538
33619
|
await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: "folder-order" }, () => reorder(folders.map((one2) => one2.id)));
|
|
33539
33620
|
return { operationId, folders: folders.map(({ id: id2, title }) => ({ id: id2, title })) };
|
|
@@ -33550,7 +33631,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33550
33631
|
};
|
|
33551
33632
|
}, "foldersService");
|
|
33552
33633
|
|
|
33553
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33554
33635
|
var REVIEW_COUNT = 500;
|
|
33555
33636
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33556
33637
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33629,7 +33710,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33629
33710
|
};
|
|
33630
33711
|
}, "mentionsService");
|
|
33631
33712
|
|
|
33632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33713
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
33633
33714
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
33634
33715
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
33635
33716
|
const { text: text2, spans } = formatted2;
|
|
@@ -33689,7 +33770,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
33689
33770
|
};
|
|
33690
33771
|
}, "visibleFormattedText");
|
|
33691
33772
|
|
|
33692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33773
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33693
33774
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33694
33775
|
position,
|
|
33695
33776
|
kind,
|
|
@@ -33738,7 +33819,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33738
33819
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33739
33820
|
}, "validatePermalink");
|
|
33740
33821
|
|
|
33741
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33822
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33742
33823
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33743
33824
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33744
33825
|
return `${seconds / 86400}d`;
|
|
@@ -33770,7 +33851,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33770
33851
|
return seconds;
|
|
33771
33852
|
}, "pinDurationOf");
|
|
33772
33853
|
|
|
33773
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33774
33855
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33775
33856
|
if (sendAs === void 0) {
|
|
33776
33857
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33795,7 +33876,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33795
33876
|
return sendAs;
|
|
33796
33877
|
}, "typedSendAs");
|
|
33797
33878
|
|
|
33798
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33879
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33799
33880
|
var TOTAL_CAP = 1e4;
|
|
33800
33881
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33801
33882
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33806,7 +33887,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33806
33887
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33807
33888
|
}, "totalOf");
|
|
33808
33889
|
|
|
33809
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33890
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33810
33891
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33811
33892
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33812
33893
|
let narrows = false;
|
|
@@ -33835,7 +33916,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33835
33916
|
return wanted(root).join(" ").trim();
|
|
33836
33917
|
}, "meaningWords");
|
|
33837
33918
|
|
|
33838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33919
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33839
33920
|
var words3 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33840
33921
|
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"));
|
|
33841
33922
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -33967,7 +34048,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
33967
34048
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
33968
34049
|
}, "questionLookup");
|
|
33969
34050
|
|
|
33970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
33971
34052
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
33972
34053
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
33973
34054
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -34160,7 +34241,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
34160
34241
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
34161
34242
|
}, "signals");
|
|
34162
34243
|
|
|
34163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34244
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
34164
34245
|
var MEANING_DEPTH = 100;
|
|
34165
34246
|
var RRF_K2 = 60;
|
|
34166
34247
|
var RERANK_DEPTH = 50;
|
|
@@ -34485,7 +34566,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
34485
34566
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
34486
34567
|
}, "mixedWithReranker");
|
|
34487
34568
|
|
|
34488
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34569
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
34489
34570
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
34490
34571
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
34491
34572
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -34671,20 +34752,20 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34671
34752
|
}
|
|
34672
34753
|
}
|
|
34673
34754
|
const held = new Set(result.items.map(({ id: id2 }) => id2));
|
|
34674
|
-
const
|
|
34755
|
+
const seen2 = /* @__PURE__ */ new Set([message]);
|
|
34675
34756
|
for (let parent = parents.get(message); parent !== void 0 && held.has(parent); parent = parents.get(parent)) {
|
|
34676
|
-
if (
|
|
34757
|
+
if (seen2.has(parent)) {
|
|
34677
34758
|
stopped("cycle");
|
|
34678
34759
|
break;
|
|
34679
34760
|
}
|
|
34680
|
-
|
|
34761
|
+
seen2.add(parent);
|
|
34681
34762
|
result.chain.push(parent);
|
|
34682
34763
|
}
|
|
34683
34764
|
result.items.sort((a, b) => a.timestamp.localeCompare(b.timestamp) || a.id.localeCompare(b.id));
|
|
34684
34765
|
return result;
|
|
34685
34766
|
}, "readThreadContext");
|
|
34686
34767
|
|
|
34687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34768
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34688
34769
|
var SEARCH_FILL_MS = 200;
|
|
34689
34770
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34690
34771
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34753,12 +34834,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34753
34834
|
}, "accountOf");
|
|
34754
34835
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34755
34836
|
|
|
34756
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34837
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34757
34838
|
import { createHash as createHash10 } from "node:crypto";
|
|
34758
34839
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
34759
34840
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
34760
34841
|
|
|
34761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
34762
34843
|
var GROUP_SETTINGS = [
|
|
34763
34844
|
"allCanPin",
|
|
34764
34845
|
"onlyAdminsAdd",
|
|
@@ -34772,7 +34853,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
34772
34853
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
34773
34854
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
34774
34855
|
|
|
34775
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34856
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34776
34857
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
34777
34858
|
var PICTURE_FLOOR = 0.25;
|
|
34778
34859
|
var PAGE4 = 50;
|
|
@@ -34789,7 +34870,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34789
34870
|
const directory2 = imageModelsDirectory(deps.env);
|
|
34790
34871
|
if (!isImageModelInstalled(model2, directory2))
|
|
34791
34872
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
34792
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34873
|
+
const { openPictureEmbedder } = await import("./embedder-ENGCALJ7.js");
|
|
34793
34874
|
return openPictureEmbedder(model2, directory2);
|
|
34794
34875
|
}, "open");
|
|
34795
34876
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -34844,13 +34925,13 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34844
34925
|
await store.vectors.savePictures(account, model.key, model.dims, pending.splice(0));
|
|
34845
34926
|
}, "flush");
|
|
34846
34927
|
let after = 0;
|
|
34847
|
-
let
|
|
34928
|
+
let seen2 = 0;
|
|
34848
34929
|
try {
|
|
34849
|
-
while (
|
|
34930
|
+
while (seen2 < limit) {
|
|
34850
34931
|
const page = await store.vectors.picturesToEmbed(account, {
|
|
34851
34932
|
...chatId === void 0 ? {} : { chatId },
|
|
34852
34933
|
after,
|
|
34853
|
-
limit: Math.min(PAGE4, limit -
|
|
34934
|
+
limit: Math.min(PAGE4, limit - seen2)
|
|
34854
34935
|
});
|
|
34855
34936
|
if (page.length === 0)
|
|
34856
34937
|
break;
|
|
@@ -34859,7 +34940,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34859
34940
|
if (signal?.aborted)
|
|
34860
34941
|
throw new CliError("cancelled", "picture embedding cancelled");
|
|
34861
34942
|
after = picture.attachmentPk;
|
|
34862
|
-
|
|
34943
|
+
seen2 += 1;
|
|
34863
34944
|
const files = /* @__PURE__ */ __name(() => {
|
|
34864
34945
|
if (downloaded?.message !== `${picture.chatId}/${picture.messageId}`) {
|
|
34865
34946
|
downloaded = {
|
|
@@ -34904,7 +34985,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34904
34985
|
});
|
|
34905
34986
|
}
|
|
34906
34987
|
}
|
|
34907
|
-
result.more =
|
|
34988
|
+
result.more = seen2 >= limit && (await store.vectors.picturesToEmbed(account, {
|
|
34908
34989
|
after,
|
|
34909
34990
|
limit: 1,
|
|
34910
34991
|
...chatId === void 0 ? {} : { chatId }
|
|
@@ -34986,7 +35067,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
34986
35067
|
}, "search")
|
|
34987
35068
|
}), "withPictures");
|
|
34988
35069
|
|
|
34989
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35070
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
34990
35071
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
34991
35072
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
34992
35073
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -35054,7 +35135,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
35054
35135
|
}
|
|
35055
35136
|
}, "meaningLane");
|
|
35056
35137
|
|
|
35057
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35138
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
35058
35139
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
35059
35140
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
35060
35141
|
if (choice === "off")
|
|
@@ -35066,9 +35147,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35066
35147
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
35067
35148
|
try {
|
|
35068
35149
|
const warm = deps.embedders;
|
|
35069
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
35150
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-46SUXGWW.js")).openRerankerProcess(model, directory2, {
|
|
35070
35151
|
threads: defaultThreads()
|
|
35071
|
-
})) : await (await import("./rerank-
|
|
35152
|
+
})) : await (await import("./rerank-N5T2TIIY.js")).openReranker(model, directory2);
|
|
35072
35153
|
return {
|
|
35073
35154
|
model: model.id,
|
|
35074
35155
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -35088,17 +35169,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
35088
35169
|
};
|
|
35089
35170
|
}, "rerankLane");
|
|
35090
35171
|
|
|
35091
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
35092
35173
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
35093
35174
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
35094
35175
|
const directory2 = imageModelsDirectory(env);
|
|
35095
35176
|
if (!isImageModelInstalled(model, directory2))
|
|
35096
35177
|
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 });
|
|
35097
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
35178
|
+
const { openPictureEmbedder } = await import("./embedder-ENGCALJ7.js");
|
|
35098
35179
|
return openPictureEmbedder(model, directory2);
|
|
35099
35180
|
}, "openPictureEmbedderFor");
|
|
35100
35181
|
|
|
35101
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35182
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
35102
35183
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
35103
35184
|
const metadata = note2.frontMatter;
|
|
35104
35185
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
@@ -35113,7 +35194,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
35113
35194
|
};
|
|
35114
35195
|
}, "documentSource");
|
|
35115
35196
|
|
|
35116
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35197
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
35117
35198
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
35118
35199
|
let root;
|
|
35119
35200
|
try {
|
|
@@ -35140,7 +35221,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
|
35140
35221
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
35141
35222
|
}, "titleTiers");
|
|
35142
35223
|
|
|
35143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
35144
35225
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
35145
35226
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
35146
35227
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35587,7 +35668,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35587
35668
|
};
|
|
35588
35669
|
}, "searchNotesOf");
|
|
35589
35670
|
|
|
35590
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35591
35672
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35592
35673
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35593
35674
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -35705,7 +35786,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35705
35786
|
};
|
|
35706
35787
|
}, "searchEvents");
|
|
35707
35788
|
|
|
35708
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35789
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
35709
35790
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
35710
35791
|
var refusal = /* @__PURE__ */ __name((error, text2) => {
|
|
35711
35792
|
const { reason, span } = error.details ?? {};
|
|
@@ -35976,7 +36057,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
35976
36057
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
35977
36058
|
}, "oneList");
|
|
35978
36059
|
|
|
35979
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36060
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
35980
36061
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
35981
36062
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
35982
36063
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -36029,7 +36110,7 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, que
|
|
|
36029
36110
|
coverage: { accountId: selected.id, by: "word-prefixes", meetingsScanned: 0, complete: false },
|
|
36030
36111
|
after: position()
|
|
36031
36112
|
};
|
|
36032
|
-
const
|
|
36113
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
36033
36114
|
const most = request.maxMeetings === "all" ? Number.POSITIVE_INFINITY : request.maxMeetings ?? 100;
|
|
36034
36115
|
while (collected.coverage.meetingsScanned < most) {
|
|
36035
36116
|
cancelled3(request.signal);
|
|
@@ -36052,9 +36133,9 @@ var collectMeetings = /* @__PURE__ */ __name(async (store, account, request, que
|
|
|
36052
36133
|
for (; hitOffset < hits.length; hitOffset++) {
|
|
36053
36134
|
const hit = hits[hitOffset];
|
|
36054
36135
|
const key = JSON.stringify([selected.id, hit.meetingId, hit.scope, hit.id]);
|
|
36055
|
-
if (
|
|
36136
|
+
if (seen2.has(key))
|
|
36056
36137
|
continue;
|
|
36057
|
-
|
|
36138
|
+
seen2.add(key);
|
|
36058
36139
|
collected.items.push({
|
|
36059
36140
|
before: position(),
|
|
36060
36141
|
item: {
|
|
@@ -36230,7 +36311,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
36230
36311
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
36231
36312
|
}, "searchAllOfSource");
|
|
36232
36313
|
|
|
36233
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36314
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36234
36315
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36235
36316
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36236
36317
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36419,7 +36500,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36419
36500
|
return { report, sources };
|
|
36420
36501
|
}, "searchServer");
|
|
36421
36502
|
|
|
36422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36423
36504
|
var DELETE_AT_ONCE = 10;
|
|
36424
36505
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36425
36506
|
const files = fileLinks(attachments);
|
|
@@ -36533,8 +36614,8 @@ var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
|
36533
36614
|
const { beforeTime: _first, ...rest } = window3;
|
|
36534
36615
|
const next = forward ? { ...rest, limit: window3.limit - items.length, after: { id: edge.id } } : { ...rest, limit: window3.limit - items.length, before: edge.id };
|
|
36535
36616
|
page = await listPage(chat, next);
|
|
36536
|
-
const
|
|
36537
|
-
const fresh = page.items.filter((one2) => !
|
|
36617
|
+
const seen2 = new Set(items.map((one2) => one2.id));
|
|
36618
|
+
const fresh = page.items.filter((one2) => !seen2.has(one2.id));
|
|
36538
36619
|
if (fresh.length === 0)
|
|
36539
36620
|
break;
|
|
36540
36621
|
items = forward ? [...items, ...fresh] : [...fresh, ...items];
|
|
@@ -36860,7 +36941,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
36860
36941
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
36861
36942
|
}, "checkMediaOptions");
|
|
36862
36943
|
|
|
36863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
36864
36945
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
36865
36946
|
var RULES = {
|
|
36866
36947
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -36875,7 +36956,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
36875
36956
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
36876
36957
|
}), "classifyChannel");
|
|
36877
36958
|
|
|
36878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36959
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
36879
36960
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
36880
36961
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
36881
36962
|
const store = await deps.store();
|
|
@@ -36961,7 +37042,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
36961
37042
|
};
|
|
36962
37043
|
}, "metadataService");
|
|
36963
37044
|
|
|
36964
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37045
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
36965
37046
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
36966
37047
|
var LINK2 = /https?:\/\/\S+/i;
|
|
36967
37048
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -37149,7 +37230,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
37149
37230
|
}, "nextPoint");
|
|
37150
37231
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
37151
37232
|
|
|
37152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
37153
37234
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
37154
37235
|
import { join as join11 } from "node:path";
|
|
37155
37236
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -37292,7 +37373,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
37292
37373
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
37293
37374
|
}, "assign");
|
|
37294
37375
|
|
|
37295
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37296
37377
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37297
37378
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
37298
37379
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -37329,7 +37410,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
37329
37410
|
return { chatId, rows, notes };
|
|
37330
37411
|
}, "moderateWith");
|
|
37331
37412
|
|
|
37332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37333
37414
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37334
37415
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37335
37416
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37407,7 +37488,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37407
37488
|
}, "removePerson")
|
|
37408
37489
|
}), "moderatorOf");
|
|
37409
37490
|
|
|
37410
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37491
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37411
37492
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
37412
37493
|
id: note2.id,
|
|
37413
37494
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -37451,7 +37532,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37451
37532
|
};
|
|
37452
37533
|
}, "privatePeopleService");
|
|
37453
37534
|
|
|
37454
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37535
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37455
37536
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37456
37537
|
total: 0,
|
|
37457
37538
|
population: 0,
|
|
@@ -37707,7 +37788,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37707
37788
|
}, "evidence")
|
|
37708
37789
|
}), "rankingsService");
|
|
37709
37790
|
|
|
37710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37711
37792
|
var FIELDS = ["date", "chat", "kind"];
|
|
37712
37793
|
var WAITING_TAIL = 100;
|
|
37713
37794
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37834,7 +37915,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37834
37915
|
};
|
|
37835
37916
|
}, "replyStatsService");
|
|
37836
37917
|
|
|
37837
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37838
37919
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
37839
37920
|
id: one2.id,
|
|
37840
37921
|
name: one2.name,
|
|
@@ -37855,7 +37936,7 @@ var MESSAGE_SEARCH_COMMANDS = [
|
|
|
37855
37936
|
"admin-statistics"
|
|
37856
37937
|
];
|
|
37857
37938
|
var NAME = /^[a-z0-9][a-z0-9-]{0,63}$/;
|
|
37858
|
-
var
|
|
37939
|
+
var nameOf2 = /* @__PURE__ */ __name((value) => {
|
|
37859
37940
|
const name = value.trim().toLowerCase();
|
|
37860
37941
|
if (!NAME.test(name) || /^\d+$/.test(name))
|
|
37861
37942
|
throw new CliError("validation_error", `"${singleLine(value)}" cannot name a saved search \u2014 use up to 64 letters a\u2013z, digits and hyphens, not only digits`, { reason: "name.invalid" });
|
|
@@ -37910,13 +37991,13 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37910
37991
|
if (isAdminSelection(params.selection)) {
|
|
37911
37992
|
const selected = await readAdminSelection(store, params.selection);
|
|
37912
37993
|
const normalized2 = typeof params.selection === "string" ? JSON.parse(params.selection) : params.selection;
|
|
37913
|
-
return store.searches.saveSearch(
|
|
37994
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf("admin-statistics", {
|
|
37914
37995
|
adminReport: selected.options.report,
|
|
37915
37996
|
selection: normalized2,
|
|
37916
37997
|
timezone: selected.base.timezone
|
|
37917
37998
|
}), { replace });
|
|
37918
37999
|
}
|
|
37919
|
-
return store.searches.saveSearch(
|
|
38000
|
+
return store.searches.saveSearch(nameOf2(name), searchRecordOf(params.target ? params.target === "messages" ? "message-top" : "author-top" : params.by === void 0 ? "search" : "stats", checked(params)), {
|
|
37920
38001
|
replace
|
|
37921
38002
|
});
|
|
37922
38003
|
}), "create"),
|
|
@@ -37963,7 +38044,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37963
38044
|
};
|
|
37964
38045
|
}, "searchesService");
|
|
37965
38046
|
|
|
37966
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
37967
38048
|
var TAGGING_QUERY = {
|
|
37968
38049
|
entity: "tagging",
|
|
37969
38050
|
backend: "sql",
|
|
@@ -38047,7 +38128,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38047
38128
|
};
|
|
38048
38129
|
}, "tagsService");
|
|
38049
38130
|
|
|
38050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38131
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
38051
38132
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
38052
38133
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
38053
38134
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38246,7 +38327,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38246
38327
|
};
|
|
38247
38328
|
}, "topicsService");
|
|
38248
38329
|
|
|
38249
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38250
38331
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
38251
38332
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38252
38333
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38320,7 +38401,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38320
38401
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
38321
38402
|
}, "prepareEvidencePacket");
|
|
38322
38403
|
|
|
38323
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38404
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38324
38405
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38325
38406
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38326
38407
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38340,7 +38421,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38340
38421
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38341
38422
|
}, "readEvidencePacket");
|
|
38342
38423
|
|
|
38343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
38344
38425
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
38345
38426
|
let before2 = Number.POSITIVE_INFINITY;
|
|
38346
38427
|
for (; ; ) {
|
|
@@ -38402,7 +38483,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
38402
38483
|
return { ...result, selection };
|
|
38403
38484
|
}, "searchMeetingHits");
|
|
38404
38485
|
|
|
38405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38406
38487
|
import { createHash as createHash12 } from "node:crypto";
|
|
38407
38488
|
var scopeKeys = [
|
|
38408
38489
|
"accountId",
|
|
@@ -38485,12 +38566,12 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
38485
38566
|
return fail2("project vocabulary exceeds the supported alias budget");
|
|
38486
38567
|
const project2 = { id: entry.id, name: entry.name, key: entry.key };
|
|
38487
38568
|
const terms = [];
|
|
38488
|
-
const
|
|
38569
|
+
const seen2 = /* @__PURE__ */ new Set();
|
|
38489
38570
|
const add = /* @__PURE__ */ __name((term2) => {
|
|
38490
38571
|
const normalized2 = normalizeVocabularyName(term2.name);
|
|
38491
|
-
if (
|
|
38572
|
+
if (seen2.has(normalized2) || !/[\p{L}\p{N}]/u.test(normalized2))
|
|
38492
38573
|
return;
|
|
38493
|
-
|
|
38574
|
+
seen2.add(normalized2);
|
|
38494
38575
|
terms.push({ ...term2, name: term2.name.trim() });
|
|
38495
38576
|
}, "add");
|
|
38496
38577
|
add({ name: project2.name, kind: "canonical" });
|
|
@@ -38537,7 +38618,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
38537
38618
|
};
|
|
38538
38619
|
}, "readMeetingProjectDiscovery");
|
|
38539
38620
|
|
|
38540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
38541
38622
|
import { createHash as createHash13 } from "node:crypto";
|
|
38542
38623
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
38543
38624
|
ref: cue.reference,
|
|
@@ -38655,7 +38736,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
38655
38736
|
return { ...packet, fingerprint: createHash13("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
38656
38737
|
}, "readMeetingHitContext");
|
|
38657
38738
|
|
|
38658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38739
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
38659
38740
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
38660
38741
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
38661
38742
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -38731,7 +38812,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
38731
38812
|
return { packet, content };
|
|
38732
38813
|
}, "readMeetingPassage");
|
|
38733
38814
|
|
|
38734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
38735
38816
|
var communicationFields = {
|
|
38736
38817
|
sources: pipe(array(strictObject({
|
|
38737
38818
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -38763,7 +38844,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
38763
38844
|
return { ...input, after, before: before2 };
|
|
38764
38845
|
}, "communicationRequest");
|
|
38765
38846
|
|
|
38766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38847
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
38767
38848
|
var MEETING_PREPARATION_LIMITS = {
|
|
38768
38849
|
meetings: { min: 1, max: 20, default: 5 },
|
|
38769
38850
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -38849,7 +38930,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
38849
38930
|
return { ...input, history };
|
|
38850
38931
|
}, "preparationRequest");
|
|
38851
38932
|
|
|
38852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
38853
38934
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
38854
38935
|
const section = {
|
|
38855
38936
|
readUsage: plan.reader.usage(),
|
|
@@ -38954,7 +39035,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
38954
39035
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
38955
39036
|
}, "appendPreparationCommunications");
|
|
38956
39037
|
|
|
38957
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
38958
39039
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
38959
39040
|
if (port === void 0)
|
|
38960
39041
|
return void 0;
|
|
@@ -39059,7 +39140,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
39059
39140
|
}
|
|
39060
39141
|
}, "validatePreparationCommunications");
|
|
39061
39142
|
|
|
39062
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39143
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
39063
39144
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
39064
39145
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
39065
39146
|
}, "invalid");
|
|
@@ -39128,7 +39209,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
39128
39209
|
}
|
|
39129
39210
|
}, "appendKnowledgePreparation");
|
|
39130
39211
|
|
|
39131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39212
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
39132
39213
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
39133
39214
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
39134
39215
|
}, "invalid");
|
|
@@ -39202,7 +39283,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
39202
39283
|
}
|
|
39203
39284
|
}, "appendNotesPreparation");
|
|
39204
39285
|
|
|
39205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39286
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
39206
39287
|
var PAGE_LIMIT = 4;
|
|
39207
39288
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39208
39289
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -39252,7 +39333,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
39252
39333
|
}
|
|
39253
39334
|
}, "appendProjectPreparation");
|
|
39254
39335
|
|
|
39255
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
39256
39337
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
39257
39338
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
39258
39339
|
return;
|
|
@@ -39324,7 +39405,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
39324
39405
|
}
|
|
39325
39406
|
}, "appendRelatedPreparation");
|
|
39326
39407
|
|
|
39327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39408
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
39328
39409
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39329
39410
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
39330
39411
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -39462,7 +39543,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
39462
39543
|
};
|
|
39463
39544
|
}, "createMeetingPreparationService");
|
|
39464
39545
|
|
|
39465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
39466
39547
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
39467
39548
|
const installer = ports.installer();
|
|
39468
39549
|
const argv = updateCommand(installer, packageName);
|
|
@@ -39527,7 +39608,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
39527
39608
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
39528
39609
|
}, "dayAfter");
|
|
39529
39610
|
|
|
39530
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39531
39612
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39532
39613
|
const pictures = picturesService(deps);
|
|
39533
39614
|
const base = {
|
|
@@ -39564,7 +39645,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
39564
39645
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
39565
39646
|
}, "servicesFor");
|
|
39566
39647
|
|
|
39567
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39648
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
39568
39649
|
import { createHash as createHash14 } from "node:crypto";
|
|
39569
39650
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
39570
39651
|
import { createConnection, createServer } from "node:net";
|
|
@@ -39712,7 +39793,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
39712
39793
|
}
|
|
39713
39794
|
}, "serve");
|
|
39714
39795
|
|
|
39715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.605.0_@wirecat+cli-base@0.82.0_commander@15.0.0_esbuild@0.28.2_type_eae6fabbffc2c6fec7070a9f7231a4be/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
39716
39797
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
39717
39798
|
close: /* @__PURE__ */ __name(async () => {
|
|
39718
39799
|
}, "close"),
|