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