@wirecat/cli-memo 0.131.45 → 0.131.47
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-ZBASDAVU.js → all-profiles-75EGCXK3.js} +5 -5
- package/dist/bundle/{anthropic-3ZS3RCUH.js → anthropic-PTAYBCPR.js} +3 -3
- package/dist/bundle/{app-server-PQF22PMD.js → app-server-YSUBXGGB.js} +41 -38
- package/dist/bundle/auto-GB35FRTV.js +86 -0
- package/dist/bundle/{bun-3CGVV3V2.js → bun-3AIG5ML4.js} +2 -2
- package/dist/bundle/{bun-sqlite-D6T3ESTG.js → bun-sqlite-5FCGI6EO.js} +2 -2
- package/dist/bundle/{chunk-CAPDRDQU.js → chunk-25RDNYKZ.js} +5 -5
- package/dist/bundle/{chunk-L45FSDH3.js → chunk-32QM6X5H.js} +1 -1
- package/dist/bundle/{chunk-NB267XRJ.js → chunk-3HPFTKDH.js} +4 -4
- package/dist/bundle/{chunk-UP2K5XUA.js → chunk-4LWX2WOB.js} +3 -3
- package/dist/bundle/{chunk-TVZEELSS.js → chunk-5N6HWFXN.js} +508 -338
- package/dist/bundle/{chunk-SK3TPK5Y.js → chunk-6IVHND3S.js} +4 -4
- package/dist/bundle/{chunk-75EEQB2R.js → chunk-6QNPOBR5.js} +11 -11
- package/dist/bundle/{chunk-75RJJQ2Q.js → chunk-6TKWJKPS.js} +10 -10
- package/dist/bundle/{chunk-CH37NCAP.js → chunk-BNIWLVWG.js} +3 -3
- package/dist/bundle/{chunk-IQ2MW47B.js → chunk-CODD5SXC.js} +27 -27
- package/dist/bundle/{chunk-HAPE26JK.js → chunk-DDADFHR7.js} +12 -12
- package/dist/bundle/{chunk-CGJFYMVZ.js → chunk-DMTLG2GD.js} +7 -7
- package/dist/bundle/{chunk-GOJZ3FQY.js → chunk-DS4DOK75.js} +22 -21
- package/dist/bundle/{chunk-PMUAUR5S.js → chunk-DWBTCOF2.js} +4 -4
- package/dist/bundle/{chunk-5IYS3BWO.js → chunk-EFQCDCLY.js} +56 -56
- package/dist/bundle/{chunk-IYJGFBNN.js → chunk-ELKK5M66.js} +5 -5
- package/dist/bundle/{chunk-YDNM5KYV.js → chunk-EVZI54B5.js} +4 -4
- package/dist/bundle/{chunk-GTPWWGQI.js → chunk-F4HMPMET.js} +7 -7
- package/dist/bundle/{chunk-2OYB4PWV.js → chunk-FSAMZHIM.js} +5 -5
- package/dist/bundle/{chunk-G3FRUKAD.js → chunk-G3YSCD77.js} +182 -158
- package/dist/bundle/{chunk-NTFEJ52I.js → chunk-G4W42RGE.js} +1 -1
- package/dist/bundle/{chunk-7EA6M6RA.js → chunk-GA3KFYEZ.js} +4 -4
- package/dist/bundle/{chunk-CXRCADXS.js → chunk-GOFPCOEI.js} +9 -9
- package/dist/bundle/{chunk-65MK55RS.js → chunk-GQLSVXS2.js} +20 -20
- package/dist/bundle/{chunk-YWTWDX4F.js → chunk-HCZV537M.js} +1 -1
- package/dist/bundle/{chunk-OMBFF6Z6.js → chunk-HVTW2M6T.js} +1 -1
- package/dist/bundle/{chunk-EJ2PEYQU.js → chunk-HYEYRFWX.js} +1 -1
- package/dist/bundle/{chunk-AOSSO4YI.js → chunk-I2RDACUF.js} +6 -6
- package/dist/bundle/{chunk-KE3CYUON.js → chunk-ILK5BCBB.js} +1 -1
- package/dist/bundle/{chunk-U4J7TAOW.js → chunk-IPLPMD6H.js} +1 -1
- package/dist/bundle/{chunk-7WJEQ36E.js → chunk-IPMBB6W5.js} +2 -2
- package/dist/bundle/{chunk-ZJXAYYLF.js → chunk-J324GKJM.js} +1 -1
- package/dist/bundle/{chunk-PXSGUVZP.js → chunk-KLBZJZD2.js} +637 -119
- package/dist/bundle/{chunk-FMMIPFTU.js → chunk-KWM7HLAI.js} +4 -4
- package/dist/bundle/{chunk-CRLYBXV5.js → chunk-LE7NROV6.js} +43 -36
- package/dist/bundle/{chunk-25MS26SH.js → chunk-MCMEBL3C.js} +23 -10
- package/dist/bundle/{chunk-FRT7URL7.js → chunk-MMJDQQFX.js} +483 -282
- package/dist/bundle/{chunk-TKFG75MJ.js → chunk-MSBRZ5QD.js} +2 -2
- package/dist/bundle/{chunk-IJBJ47GI.js → chunk-N5QQFDNV.js} +2 -2
- package/dist/bundle/{chunk-B4PZQYGP.js → chunk-N63KZFH4.js} +8 -8
- package/dist/bundle/{chunk-NBA3GJBR.js → chunk-OSCRP52P.js} +805 -347
- package/dist/bundle/{chunk-GBRK3WXY.js → chunk-PGVADNDD.js} +2 -2
- package/dist/bundle/{chunk-HXCSD2XV.js → chunk-R44PUK7G.js} +1 -1
- package/dist/bundle/{chunk-F2VTAFIT.js → chunk-SYTYLLYO.js} +1 -1
- package/dist/bundle/{chunk-MKVUBQEG.js → chunk-U35N3EC7.js} +1 -1
- package/dist/bundle/{chunk-5ZHM6SZW.js → chunk-U75ANK5K.js} +1 -1
- package/dist/bundle/{chunk-7G7N3IUO.js → chunk-UE4GMPBY.js} +4 -2
- package/dist/bundle/{chunk-OTOKJAYR.js → chunk-UFVGAFID.js} +3 -3
- package/dist/bundle/{chunk-OT4CLMVF.js → chunk-V3B5COFP.js} +3 -3
- package/dist/bundle/{chunk-6NQTGFAL.js → chunk-V6OYLCCM.js} +2 -2
- package/dist/bundle/{chunk-IAPKZSC5.js → chunk-W2JVP7GK.js} +1 -1
- package/dist/bundle/{chunk-LL3Z6KA3.js → chunk-W3T45MMN.js} +5 -5
- package/dist/bundle/{chunk-EJ4X6XH2.js → chunk-XRRPQCTS.js} +1 -1
- package/dist/bundle/{chunk-G6TRTDHB.js → chunk-Y4ZXDJQF.js} +2 -2
- package/dist/bundle/{chunk-WGX73SAA.js → chunk-YMK35KVV.js} +2 -2
- package/dist/bundle/{chunk-7G63XPDR.js → chunk-ZKH6LC5P.js} +7 -7
- package/dist/bundle/{chunk-C6GSSMDG.js → chunk-ZLIARJU4.js} +1 -1
- package/dist/bundle/{command-contract-K3GJRRXT.js → command-contract-YYILWWYQ.js} +11 -11
- package/dist/bundle/{decode-TTMBMSGQ.js → decode-F2A2BLIA.js} +2 -2
- package/dist/bundle/{echarts-7XN2RLJT.js → echarts-JL55HJCM.js} +2 -2
- package/dist/bundle/{embed-UKTHDQH5.js → embed-74KVORNN.js} +3 -3
- package/dist/bundle/{embedder-SCKLAVKW.js → embedder-GACNPCZN.js} +6 -6
- package/dist/bundle/{entry-VQRYB2HE.js → entry-7FI2H4RQ.js} +4 -4
- package/dist/bundle/failure-AHPPXHAW.js +66 -0
- package/dist/bundle/{first-run-RL6ZRY3Y.js → first-run-D4VBIJ7H.js} +5 -5
- package/dist/bundle/{first-screen-CRURWNKP.js → first-screen-D7Q2U7VP.js} +12 -12
- package/dist/bundle/{instructions-KGU67SPR.js → instructions-QNPIVGKX.js} +1 -1
- package/dist/bundle/{mcp-CSN7BDNG.js → mcp-AFXHH33V.js} +35 -35
- package/dist/bundle/memo.js +6 -6
- package/dist/bundle/{node-S5LQLVMO.js → node-SPFML2D5.js} +2 -2
- package/dist/bundle/{node-sqlite-PFCIEDPX.js → node-sqlite-T3KILRCP.js} +3 -3
- package/dist/bundle/{oauth-KJOGYDPV.js → oauth-ZOGSHZF3.js} +4 -4
- package/dist/bundle/{open-TPBENKAD.js → open-XXFVCGCA.js} +2 -2
- package/dist/bundle/{openai-UOYTHO32.js → openai-JRHZLFKD.js} +7 -7
- package/dist/bundle/{process-JWKE7GPV.js → process-OGYYVVLG.js} +1 -1
- package/dist/bundle/{program-RJ6X4DXE.js → program-EFCQACPD.js} +138 -61
- package/dist/bundle/{prompt-5HQ3Z7ZS.js → prompt-53D5WVD3.js} +2 -2
- package/dist/bundle/{recognize-5ILXEPII.js → recognize-7GYZKJCD.js} +1 -1
- package/dist/bundle/{remote-WIN3HJII.js → remote-V5GUFZCG.js} +4 -4
- package/dist/bundle/{rerank-JKHDSEBI.js → rerank-FUNVBYFI.js} +4 -4
- package/dist/bundle/{serve-VMHFRDYH.js → serve-ZLUYFAXC.js} +6 -6
- package/dist/bundle/server-4OJC7ZWM.js +61 -0
- package/dist/bundle/server-CGUUZBLB.js +48 -0
- package/dist/bundle/{server-TKWVP4OJ.js → server-HJRMD3XD.js} +50 -50
- package/dist/bundle/{state-OWOLD7JI.js → state-4P7H6KBM.js} +3 -3
- package/dist/bundle/{store-6GFFSNRY.js → store-NILJK24C.js} +11 -9
- package/dist/bundle/store-maintenance-command-VP7CIBSS.js +48 -0
- package/dist/bundle/update-NPK4DT2E.js +69 -0
- package/dist/contract-overrides/doctor.d.ts.map +1 -1
- package/dist/contract-overrides/doctor.js +6 -0
- package/dist/contract-overrides/doctor.js.map +1 -1
- package/dist/doctor/command.d.ts +23 -2
- package/dist/doctor/command.d.ts.map +1 -1
- package/dist/doctor/command.js +13 -5
- package/dist/doctor/command.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +2 -0
- package/dist/examples.js.map +1 -1
- package/dist/schedule/command.d.ts.map +1 -1
- package/dist/schedule/command.js +2 -0
- package/dist/schedule/command.js.map +1 -1
- package/dist/schedule/mail-triage-input.d.ts +24 -0
- package/dist/schedule/mail-triage-input.d.ts.map +1 -0
- package/dist/schedule/mail-triage-input.js +53 -0
- package/dist/schedule/mail-triage-input.js.map +1 -0
- package/dist/store/info-command.d.ts.map +1 -1
- package/dist/store/info-command.js +23 -1
- package/dist/store/info-command.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/mail-triage/SKILL.md +25 -27
- package/dist/bundle/auto-NW7IP4ST.js +0 -86
- package/dist/bundle/failure-JHW2U2OF.js +0 -66
- package/dist/bundle/server-IBJ23GCB.js +0 -48
- package/dist/bundle/server-SNWCFMJN.js +0 -61
- package/dist/bundle/store-maintenance-command-7DMPWFT4.js +0 -48
- package/dist/bundle/update-KSB7VYAW.js +0 -69
- /package/dist/bundle/{chunk-DL5LDAOS.js → chunk-JPGEFBRW.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DDADFHR7.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -48,17 +48,17 @@ import {
|
|
|
48
48
|
typedCommand,
|
|
49
49
|
vectorModelKey,
|
|
50
50
|
withAttempt
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-G3YSCD77.js";
|
|
52
52
|
import {
|
|
53
53
|
isCliFailure
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ZKH6LC5P.js";
|
|
55
55
|
import {
|
|
56
56
|
isNewer,
|
|
57
57
|
updateCommand
|
|
58
58
|
} from "./chunk-JY34MQW4.js";
|
|
59
59
|
import {
|
|
60
60
|
readOnlyLockOf
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-SYTYLLYO.js";
|
|
62
62
|
import {
|
|
63
63
|
AGENDA_COLUMNS,
|
|
64
64
|
CHAT_COLUMNS,
|
|
@@ -136,6 +136,7 @@ import {
|
|
|
136
136
|
mayDecide,
|
|
137
137
|
messageOfEmail,
|
|
138
138
|
normalizeVocabularyName,
|
|
139
|
+
openSqlite,
|
|
139
140
|
openStoreContext,
|
|
140
141
|
outOfTime,
|
|
141
142
|
parseLocator,
|
|
@@ -160,7 +161,7 @@ import {
|
|
|
160
161
|
validateAst,
|
|
161
162
|
validateFields,
|
|
162
163
|
withoutField
|
|
163
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-OSCRP52P.js";
|
|
164
165
|
import {
|
|
165
166
|
EVENT_QUERY,
|
|
166
167
|
MEETING_FINDINGS_KIND,
|
|
@@ -214,23 +215,23 @@ import {
|
|
|
214
215
|
validateQuery,
|
|
215
216
|
walkQuery,
|
|
216
217
|
zonedMoment
|
|
217
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-EFQCDCLY.js";
|
|
218
219
|
import {
|
|
219
220
|
DEFAULT_STEMMERS,
|
|
220
221
|
createStemmer,
|
|
221
222
|
fold,
|
|
222
223
|
normalize
|
|
223
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-DMTLG2GD.js";
|
|
224
225
|
import {
|
|
225
226
|
DEFAULT_TASK_CATEGORIES,
|
|
226
227
|
FALLBACK_CATEGORY
|
|
227
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-EVZI54B5.js";
|
|
228
229
|
import {
|
|
229
230
|
MAX_MODEL_IMAGE_BYTES
|
|
230
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-U35N3EC7.js";
|
|
231
232
|
import {
|
|
232
233
|
remoteKey
|
|
233
|
-
} from "./chunk-
|
|
234
|
+
} from "./chunk-N5QQFDNV.js";
|
|
234
235
|
import {
|
|
235
236
|
Unzip,
|
|
236
237
|
UnzipInflate,
|
|
@@ -241,15 +242,15 @@ import {
|
|
|
241
242
|
placedText,
|
|
242
243
|
runEmbedders,
|
|
243
244
|
textModelsDirectory
|
|
244
|
-
} from "./chunk-
|
|
245
|
+
} from "./chunk-ELKK5M66.js";
|
|
245
246
|
import {
|
|
246
247
|
installFiles,
|
|
247
248
|
megabytes
|
|
248
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-UFVGAFID.js";
|
|
249
250
|
import {
|
|
250
251
|
storePath,
|
|
251
252
|
wirecatDirectory
|
|
252
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-IPLPMD6H.js";
|
|
253
254
|
import {
|
|
254
255
|
resolvePaths,
|
|
255
256
|
writeSecurely
|
|
@@ -16902,7 +16903,7 @@ var require_lib3 = __commonJS({
|
|
|
16902
16903
|
}
|
|
16903
16904
|
});
|
|
16904
16905
|
|
|
16905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16906
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16906
16907
|
var RULES_VERSION = 5;
|
|
16907
16908
|
var LOOK_BACK = 50;
|
|
16908
16909
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16992,13 +16993,177 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16992
16993
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16993
16994
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16994
16995
|
|
|
16995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16996
16997
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16997
16998
|
|
|
16998
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16999
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/damage.js
|
|
17000
|
+
var DERIVED = /* @__PURE__ */ new Set(["mentions", "involvements", "embeddings"]);
|
|
17001
|
+
var named = /* @__PURE__ */ __name((tables) => tables.length <= 5 ? tables.join(", ") : `${tables.slice(0, 5).join(", ")} and ${tables.length - 5} more`, "named");
|
|
17002
|
+
var isDerivedTable = /* @__PURE__ */ __name((table, searchIndexes) => DERIVED.has(table) || table.startsWith("vector_index_") || searchIndexes.some((index) => table === index || table.startsWith(`${index}_`)), "isDerivedTable");
|
|
17003
|
+
var WIRECAT_UNITS = ["memo-*", "mail-*", "tg-*", "max-*", "wirecat-*"];
|
|
17004
|
+
var explainDamage = /* @__PURE__ */ __name((health, command) => {
|
|
17005
|
+
if (health.ok)
|
|
17006
|
+
return null;
|
|
17007
|
+
const indexNames = (health.searchIndexes ?? []).map((index) => index.name);
|
|
17008
|
+
const badIndexes = (health.searchIndexes ?? []).filter((index) => !index.ok).map((index) => index.name);
|
|
17009
|
+
const tables = (health.damagedTables ?? []).map((one2) => one2.table).filter((table) => table !== null);
|
|
17010
|
+
const sources = tables.filter((table) => !isDerivedTable(table, indexNames));
|
|
17011
|
+
const derived2 = [.../* @__PURE__ */ new Set([...tables.filter((table) => isDerivedTable(table, indexNames)), ...badIndexes])];
|
|
17012
|
+
const unopened = health.error !== void 0;
|
|
17013
|
+
const what = 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)}` : "");
|
|
17014
|
+
const impact = [
|
|
17015
|
+
...sources.length ? [`some rows of ${named(sources)} cannot be read; a recovery keeps every row it can read and names the rest`] : [],
|
|
17016
|
+
...derived2.length ? [`searches may miss results or fail; ${named(derived2)} hold nothing that is not elsewhere, and are rebuilt`] : [],
|
|
17017
|
+
"reads that do not touch a damaged page work; a write that touches one fails until the store is recovered"
|
|
17018
|
+
];
|
|
17019
|
+
return {
|
|
17020
|
+
what,
|
|
17021
|
+
causes: [
|
|
17022
|
+
"the computer lost power or crashed, or the disk filled up, while a tool was writing",
|
|
17023
|
+
"the file was copied, restored or synced while a tool had it open, or it sits in a synced or network folder",
|
|
17024
|
+
"a fault of the disk itself"
|
|
17025
|
+
],
|
|
17026
|
+
investigate: [
|
|
17027
|
+
`journalctl --user ${WIRECAT_UNITS.map((unit) => `-u '${unit}'`).join(" ")} --since -14d | grep -i -e malformed -e corrupt -e 'disk full'`,
|
|
17028
|
+
"journalctl -k --since -14d | grep -i -e 'I/O error' -e nvme -e ata",
|
|
17029
|
+
`df -h ${health.path.replace(/\/[^/]*$/, "")}`,
|
|
17030
|
+
...health.checked === "quick" ? [`${command} store recover`] : []
|
|
17031
|
+
],
|
|
17032
|
+
impact,
|
|
17033
|
+
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",
|
|
17034
|
+
steps: [
|
|
17035
|
+
"stop every timer and server of the WireCat tools; `store recover run` lists the ones still running",
|
|
17036
|
+
`${command} store recover run`,
|
|
17037
|
+
"run the fetch commands it prints, then start the timers again"
|
|
17038
|
+
]
|
|
17039
|
+
};
|
|
17040
|
+
}, "explainDamage");
|
|
17041
|
+
|
|
17042
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/health.js
|
|
17043
|
+
import { existsSync, statSync } from "node:fs";
|
|
17044
|
+
var QUICK_CHECK_LIMIT = 1e4;
|
|
17045
|
+
var QUICK_HEALTH_CHECKS = "the file header, its size against its page count, and the schema's own pages";
|
|
17046
|
+
var FTS5 = /^\s*CREATE\s+VIRTUAL\s+TABLE\s+\S+\s+USING\s+fts5\s*\(/i;
|
|
17047
|
+
var fts5Tables = /* @__PURE__ */ __name((database) => database.prepare("SELECT name, sql FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%' ORDER BY name").all().filter((row) => FTS5.test(String(row.sql))).map((row) => {
|
|
17048
|
+
const sql = String(row.sql);
|
|
17049
|
+
return { name: String(row.name), sql, external: /content\s*=\s*'[^']+'/i.test(sql) };
|
|
17050
|
+
}), "fts5Tables");
|
|
17051
|
+
var messageOf = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "messageOf");
|
|
17052
|
+
var bytesOf = /* @__PURE__ */ __name((path) => statSync(path, { throwIfNoEntry: false })?.size ?? 0, "bytesOf");
|
|
17053
|
+
var damagedTables = /* @__PURE__ */ __name((database, lines3) => {
|
|
17054
|
+
const roots = new Map(database.prepare("SELECT rootpage, tbl_name FROM sqlite_master WHERE rootpage > 0").all().map((row) => [Number(row.rootpage), String(row.tbl_name)]));
|
|
17055
|
+
const owners = new Map(database.prepare("SELECT name, tbl_name FROM sqlite_master WHERE type = 'index'").all().map((row) => [String(row.name), String(row.tbl_name)]));
|
|
17056
|
+
const virtual = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND sql LIKE 'CREATE VIRTUAL TABLE%'").all().map((row) => String(row.name));
|
|
17057
|
+
const ownerOf = /* @__PURE__ */ __name((table) => table === null ? null : virtual.find((name) => table.startsWith(`${name}_`)) ?? table, "ownerOf");
|
|
17058
|
+
const tables = /* @__PURE__ */ new Map();
|
|
17059
|
+
for (const raw of lines3) {
|
|
17060
|
+
const line2 = raw.replace(/^\*\*\* in database \w+ \*\*\*\s*/, "");
|
|
17061
|
+
const tree = /^Tree (\d+) /.exec(line2);
|
|
17062
|
+
const column = /value in (\w+)\.\w+/.exec(line2) ?? /^table (\w+): /.exec(line2);
|
|
17063
|
+
const index = /index (\w+)/.exec(line2)?.[1];
|
|
17064
|
+
const table = ownerOf(tree ? roots.get(Number(tree[1])) ?? null : column ? column[1] ?? null : index ? owners.get(index) ?? null : null);
|
|
17065
|
+
const known2 = tables.get(table);
|
|
17066
|
+
if (known2)
|
|
17067
|
+
known2.problems += 1;
|
|
17068
|
+
else
|
|
17069
|
+
tables.set(table, { table, problems: 1, sample: line2.slice(0, 200) });
|
|
17070
|
+
}
|
|
17071
|
+
return [...tables.values()].sort((a, b) => b.problems - a.problems);
|
|
17072
|
+
}, "damagedTables");
|
|
17073
|
+
var searchIndexHealth = /* @__PURE__ */ __name((database) => fts5Tables(database).map(({ name }) => {
|
|
17074
|
+
try {
|
|
17075
|
+
database.exec("BEGIN");
|
|
17076
|
+
try {
|
|
17077
|
+
database.exec(`INSERT INTO "${name}" ("${name}", rank) VALUES ('integrity-check', 0)`);
|
|
17078
|
+
} finally {
|
|
17079
|
+
database.exec("ROLLBACK");
|
|
17080
|
+
}
|
|
17081
|
+
return { name, ok: true };
|
|
17082
|
+
} catch (error) {
|
|
17083
|
+
return { name, ok: false, error: messageOf(error) };
|
|
17084
|
+
}
|
|
17085
|
+
}), "searchIndexHealth");
|
|
17086
|
+
var pragmaLines = /* @__PURE__ */ __name((database, sql) => database.prepare(sql).all().flatMap((row) => String(Object.values(row)[0]).split("\n")), "pragmaLines");
|
|
17087
|
+
var checkLines = /* @__PURE__ */ __name((database) => {
|
|
17088
|
+
try {
|
|
17089
|
+
return pragmaLines(database, `PRAGMA quick_check(${QUICK_CHECK_LIMIT})`);
|
|
17090
|
+
} catch {
|
|
17091
|
+
const tables = database.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND rootpage > 0 ORDER BY name").all().map((row) => String(row.name));
|
|
17092
|
+
return tables.flatMap((table) => {
|
|
17093
|
+
try {
|
|
17094
|
+
return pragmaLines(database, `PRAGMA quick_check("${table}")`).filter((line2) => line2 !== "ok");
|
|
17095
|
+
} catch (error) {
|
|
17096
|
+
return [`table ${table}: ${messageOf(error)}`];
|
|
17097
|
+
}
|
|
17098
|
+
});
|
|
17099
|
+
}
|
|
17100
|
+
}, "checkLines");
|
|
17101
|
+
var quickHealth = /* @__PURE__ */ __name((database, path) => {
|
|
17102
|
+
const pragma = /* @__PURE__ */ __name((name) => Number(Object.values(database.prepare(`PRAGMA ${name}`).get() ?? {})[0] ?? 0), "pragma");
|
|
17103
|
+
const file2 = {
|
|
17104
|
+
bytes: bytesOf(path),
|
|
17105
|
+
pages: pragma("page_count"),
|
|
17106
|
+
pageSize: pragma("page_size"),
|
|
17107
|
+
freePages: pragma("freelist_count")
|
|
17108
|
+
};
|
|
17109
|
+
const schema2 = database.prepare("PRAGMA quick_check('sqlite_schema')").all().map((row) => String(Object.values(row)[0]));
|
|
17110
|
+
const walFrames = existsSync(`${path}-wal`) && bytesOf(`${path}-wal`) > 0;
|
|
17111
|
+
const sized2 = walFrames || file2.bytes === file2.pages * file2.pageSize;
|
|
17112
|
+
const problems = [
|
|
17113
|
+
...schema2.length === 1 && schema2[0] === "ok" ? [] : schema2,
|
|
17114
|
+
...sized2 ? [] : [`the file holds ${file2.bytes} bytes, its header says ${file2.pages * file2.pageSize}`]
|
|
17115
|
+
];
|
|
17116
|
+
return { file: file2, problems };
|
|
17117
|
+
}, "quickHealth");
|
|
17118
|
+
var storeHealth = /* @__PURE__ */ __name(async (path, { deep = false } = {}) => {
|
|
17119
|
+
const started = Date.now();
|
|
17120
|
+
const checked2 = deep ? "deep" : "quick";
|
|
17121
|
+
const done2 = /* @__PURE__ */ __name((health) => ({
|
|
17122
|
+
path,
|
|
17123
|
+
checked: checked2,
|
|
17124
|
+
...health,
|
|
17125
|
+
ms: Date.now() - started
|
|
17126
|
+
}), "done");
|
|
17127
|
+
let database;
|
|
17128
|
+
try {
|
|
17129
|
+
database = (await openSqlite(path, { readOnly: !deep })).database;
|
|
17130
|
+
} catch (error) {
|
|
17131
|
+
return done2({ ok: false, error: messageOf(error) });
|
|
17132
|
+
}
|
|
17133
|
+
try {
|
|
17134
|
+
const { file: file2, problems } = quickHealth(database, path);
|
|
17135
|
+
if (!deep) {
|
|
17136
|
+
return done2({
|
|
17137
|
+
ok: problems.length === 0,
|
|
17138
|
+
file: file2,
|
|
17139
|
+
...problems.length ? {
|
|
17140
|
+
problems: problems.length,
|
|
17141
|
+
damagedTables: [{ table: null, problems: problems.length, sample: problems[0] }]
|
|
17142
|
+
} : {}
|
|
17143
|
+
});
|
|
17144
|
+
}
|
|
17145
|
+
database.exec("PRAGMA busy_timeout = 30000");
|
|
17146
|
+
const lines3 = checkLines(database);
|
|
17147
|
+
const pagesOk = lines3.length === 1 && lines3[0] === "ok";
|
|
17148
|
+
const indexes = searchIndexHealth(database);
|
|
17149
|
+
return done2({
|
|
17150
|
+
ok: pagesOk && problems.length === 0 && indexes.every((index) => index.ok),
|
|
17151
|
+
file: file2,
|
|
17152
|
+
problems: pagesOk ? 0 : lines3.length,
|
|
17153
|
+
damagedTables: pagesOk ? [] : damagedTables(database, lines3),
|
|
17154
|
+
searchIndexes: indexes
|
|
17155
|
+
});
|
|
17156
|
+
} catch (error) {
|
|
17157
|
+
return done2({ ok: false, error: messageOf(error) });
|
|
17158
|
+
} finally {
|
|
17159
|
+
database.close();
|
|
17160
|
+
}
|
|
17161
|
+
}, "storeHealth");
|
|
17162
|
+
|
|
17163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
16999
17164
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
17000
17165
|
|
|
17001
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17166
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/preview.js
|
|
17002
17167
|
var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) => {
|
|
17003
17168
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17004
17169
|
throw new CliError("validation_error", "project preview options are required");
|
|
@@ -17020,7 +17185,7 @@ var previewProjectAnnotationSnapshot = /* @__PURE__ */ __name(async (options) =>
|
|
|
17020
17185
|
}
|
|
17021
17186
|
}, "previewProjectAnnotationSnapshot");
|
|
17022
17187
|
|
|
17023
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17188
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/store/project-transfer/snapshot.js
|
|
17024
17189
|
var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
17025
17190
|
if (!options || typeof options !== "object" || Array.isArray(options))
|
|
17026
17191
|
throw new CliError("validation_error", "snapshot options are required");
|
|
@@ -17041,7 +17206,7 @@ var snapshotProjectAnnotations = /* @__PURE__ */ __name(async (options) => {
|
|
|
17041
17206
|
}
|
|
17042
17207
|
}, "snapshotProjectAnnotations");
|
|
17043
17208
|
|
|
17044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17209
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17045
17210
|
var COMMAND_NEEDS = {
|
|
17046
17211
|
"account update": ["updateProfile", "change the profile"],
|
|
17047
17212
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17091,7 +17256,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17091
17256
|
return group;
|
|
17092
17257
|
}, "hideNever");
|
|
17093
17258
|
|
|
17094
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17095
17260
|
var AUDIT_PAGE = 200;
|
|
17096
17261
|
var AUDIT_BUDGET = 10;
|
|
17097
17262
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17171,7 +17336,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17171
17336
|
return found;
|
|
17172
17337
|
}, "burstJoins");
|
|
17173
17338
|
|
|
17174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17175
17340
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17176
17341
|
command.allowUnknownOption();
|
|
17177
17342
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17191,7 +17356,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17191
17356
|
return command;
|
|
17192
17357
|
}, "queryWordsAfterOptions");
|
|
17193
17358
|
|
|
17194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17359
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17195
17360
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17196
17361
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17197
17362
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17233,7 +17398,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17233
17398
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17234
17399
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17235
17400
|
|
|
17236
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17237
17402
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17238
17403
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17239
17404
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17256,7 +17421,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17256
17421
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17257
17422
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17258
17423
|
|
|
17259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17424
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17260
17425
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17261
17426
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17262
17427
|
const zone = timezoneOf();
|
|
@@ -17342,7 +17507,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17342
17507
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17343
17508
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17344
17509
|
|
|
17345
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17510
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17346
17511
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17347
17512
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17348
17513
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17421,14 +17586,15 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17421
17586
|
offline: false,
|
|
17422
17587
|
output: { entity: "meeting_ingestion" }
|
|
17423
17588
|
}).description("bring the stored meetings up to date from the connected account")).option("--since-time <time>", "fetch meetings starting at or after this ISO 8601 date or time", date).option("--lookback-days <days>", "revisit recent occurrences for late transcripts (0\u201331)", lookbackDays, 0).action(async (opts, command) => {
|
|
17424
|
-
|
|
17589
|
+
const source = deps.source;
|
|
17590
|
+
if (!source)
|
|
17425
17591
|
throw new MeetingError("configuration_error", "meeting source is unavailable");
|
|
17426
|
-
print(await pull(
|
|
17592
|
+
await deps.inRun(command, async () => print(await pull(source, deps.store, {
|
|
17427
17593
|
accountId: deps.accountId,
|
|
17428
17594
|
since: opts.sinceTime === void 0 ? void 0 : new Date(opts.sinceTime).toISOString(),
|
|
17429
17595
|
now: deps.now?.(),
|
|
17430
17596
|
lookbackMs: opts.lookbackDays * 864e5
|
|
17431
|
-
}), command);
|
|
17597
|
+
}), command));
|
|
17432
17598
|
});
|
|
17433
17599
|
const importCommand = annotate(group.command("import"), {
|
|
17434
17600
|
effects: LOCAL_WRITE,
|
|
@@ -17474,7 +17640,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17474
17640
|
}, "addMeetingCommandsDefinition");
|
|
17475
17641
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17476
17642
|
|
|
17477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17478
17644
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17479
17645
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17480
17646
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17507,8 +17673,8 @@ var listQuery = /* @__PURE__ */ __name((text2, registry, command, { defaultField
|
|
|
17507
17673
|
const typed = parsed && withTomorrow(parsed, registry);
|
|
17508
17674
|
if (typed)
|
|
17509
17675
|
validateQuery(typed, registry, context2);
|
|
17510
|
-
const
|
|
17511
|
-
const defaults = (registry.defaults ?? []).filter((term) => !
|
|
17676
|
+
const named3 = typed ? fieldsNamed(typed) : /* @__PURE__ */ new Set();
|
|
17677
|
+
const defaults = (registry.defaults ?? []).filter((term) => !named3.has(term.replace(/^-/, "").split(/[:<>=]/)[0] ?? "")).map((term) => parseLucene(term, { defaultField: "none", ...context2 }).root);
|
|
17512
17678
|
const roots = [...typed ? [typed.root] : [], ...defaults];
|
|
17513
17679
|
if (roots.length === 0)
|
|
17514
17680
|
return void 0;
|
|
@@ -17607,7 +17773,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17607
17773
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17608
17774
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17609
17775
|
|
|
17610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17611
17777
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17612
17778
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17613
17779
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17616,7 +17782,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17616
17782
|
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");
|
|
17617
17783
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17618
17784
|
|
|
17619
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17785
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17620
17786
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17621
17787
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17622
17788
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17878,7 +18044,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17878
18044
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17879
18045
|
}), "sessionAnswer");
|
|
17880
18046
|
|
|
17881
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18047
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
17882
18048
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
17883
18049
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
17884
18050
|
if (key in own)
|
|
@@ -17895,12 +18061,12 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
17895
18061
|
return found.bind(adapter);
|
|
17896
18062
|
}, "capability");
|
|
17897
18063
|
|
|
17898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
17899
18065
|
import { randomBytes } from "node:crypto";
|
|
17900
18066
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
17901
18067
|
var newOperationId = newSendId;
|
|
17902
18068
|
|
|
17903
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18069
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17904
18070
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17905
18071
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17906
18072
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17977,7 +18143,7 @@ var storeOnlyDeps = /* @__PURE__ */ __name((store, account, { app, env }) => {
|
|
|
17977
18143
|
return { ...storedDeps(messenger, store, account, guard), ...env === void 0 ? {} : { env } };
|
|
17978
18144
|
}, "storeOnlyDeps");
|
|
17979
18145
|
|
|
17980
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18146
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
17981
18147
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
17982
18148
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
17983
18149
|
var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
@@ -18000,10 +18166,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note2, stop) => {
|
|
|
18000
18166
|
}
|
|
18001
18167
|
}, "patiently");
|
|
18002
18168
|
|
|
18003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18169
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18004
18170
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18005
18171
|
|
|
18006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18007
18173
|
var REQUEST_MS = 400;
|
|
18008
18174
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18009
18175
|
const lowest = ranges[0];
|
|
@@ -18026,13 +18192,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18026
18192
|
};
|
|
18027
18193
|
}, "estimateBackfill");
|
|
18028
18194
|
|
|
18029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18030
18196
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18031
18197
|
...error,
|
|
18032
18198
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18033
18199
|
}), "withRecovery");
|
|
18034
18200
|
|
|
18035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18036
18202
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18037
18203
|
if (isCliFailure(error))
|
|
18038
18204
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18115,7 +18281,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18115
18281
|
};
|
|
18116
18282
|
}, "mergeBatches");
|
|
18117
18283
|
|
|
18118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18119
18285
|
var TAKES = {
|
|
18120
18286
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18121
18287
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18175,7 +18341,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18175
18341
|
throw wrongAccount(reference, scope, profiles);
|
|
18176
18342
|
}, "ensureAccount");
|
|
18177
18343
|
|
|
18178
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18179
18345
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18180
18346
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18181
18347
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18191,9 +18357,9 @@ var pickPerson = /* @__PURE__ */ __name((reference, people) => {
|
|
|
18191
18357
|
const trimmed = reference.trim();
|
|
18192
18358
|
const contact = contactReferenceOf(trimmed, people.provider);
|
|
18193
18359
|
if (contact !== void 0) {
|
|
18194
|
-
const
|
|
18195
|
-
if (
|
|
18196
|
-
return
|
|
18360
|
+
const named3 = people.get(contact);
|
|
18361
|
+
if (named3)
|
|
18362
|
+
return named3;
|
|
18197
18363
|
throw new CliError("not_found", `no person ${contact} in what this account has seen`);
|
|
18198
18364
|
}
|
|
18199
18365
|
const known2 = people.get(trimmed);
|
|
@@ -18220,7 +18386,7 @@ ${lines3}`, { candidates });
|
|
|
18220
18386
|
}, "ambiguous");
|
|
18221
18387
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18222
18388
|
|
|
18223
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18389
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18224
18390
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18225
18391
|
if (deps.reads !== "store")
|
|
18226
18392
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18293,11 +18459,11 @@ var chatIdAmong = /* @__PURE__ */ __name(async (messenger, reference, account, {
|
|
|
18293
18459
|
if (messenger.savedChatId && ["me", "self", "saved"].includes(trimmed.toLowerCase())) {
|
|
18294
18460
|
return messenger.savedChatId(account);
|
|
18295
18461
|
}
|
|
18296
|
-
const
|
|
18297
|
-
if (
|
|
18298
|
-
await ensureAccount(
|
|
18299
|
-
if (
|
|
18300
|
-
const typed =
|
|
18462
|
+
const named3 = chatReferenceOf(trimmed, account.provider);
|
|
18463
|
+
if (named3)
|
|
18464
|
+
await ensureAccount(named3, { account: account.account }, profilesOn);
|
|
18465
|
+
if (named3 || /^-?\d+$/.test(trimmed)) {
|
|
18466
|
+
const typed = named3?.chat ?? trimmed;
|
|
18301
18467
|
const id2 = await renamed2(typed) ?? typed;
|
|
18302
18468
|
if (await left?.(id2))
|
|
18303
18469
|
throw new CliError("not_found", `you left chat ${id2}`);
|
|
@@ -18379,7 +18545,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18379
18545
|
}
|
|
18380
18546
|
}, "senderAmong");
|
|
18381
18547
|
|
|
18382
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18548
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18383
18549
|
var CONTEXT_MESSAGES = 3;
|
|
18384
18550
|
var CONTEXT_MINUTES = 10;
|
|
18385
18551
|
var MAX_CHARS = 1200;
|
|
@@ -18403,12 +18569,12 @@ var context = {
|
|
|
18403
18569
|
}, "describe")
|
|
18404
18570
|
};
|
|
18405
18571
|
|
|
18406
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18572
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18407
18573
|
var BUILT_INS = [context];
|
|
18408
18574
|
var providers = [...BUILT_INS];
|
|
18409
18575
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18410
18576
|
|
|
18411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18412
18578
|
var READ_PAGE = 5e3;
|
|
18413
18579
|
var CHAIN = 50;
|
|
18414
18580
|
var CONVERSATION_QUERY = {
|
|
@@ -18560,7 +18726,7 @@ var sized = /* @__PURE__ */ __name((size4) => {
|
|
|
18560
18726
|
return size4;
|
|
18561
18727
|
}, "sized");
|
|
18562
18728
|
|
|
18563
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18729
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18564
18730
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18565
18731
|
var MESSAGE_PAGE = 5e3;
|
|
18566
18732
|
var PER_SESSION = 8;
|
|
@@ -18579,7 +18745,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18579
18745
|
price: remote.price,
|
|
18580
18746
|
installed: true,
|
|
18581
18747
|
perBatch: PER_REQUEST * concurrency,
|
|
18582
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18748
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-V5GUFZCG.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18583
18749
|
};
|
|
18584
18750
|
}
|
|
18585
18751
|
const model = textModel(choice);
|
|
@@ -18596,7 +18762,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18596
18762
|
if (!isTextModelInstalled(model, directory2))
|
|
18597
18763
|
throw notDownloaded(model.id);
|
|
18598
18764
|
if (apart) {
|
|
18599
|
-
const { openProcess } = await import("./process-
|
|
18765
|
+
const { openProcess } = await import("./process-OGYYVVLG.js");
|
|
18600
18766
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18601
18767
|
}
|
|
18602
18768
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -18885,7 +19051,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
18885
19051
|
return { ...one2, state };
|
|
18886
19052
|
}, "shaped");
|
|
18887
19053
|
|
|
18888
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19054
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
18889
19055
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
18890
19056
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
18891
19057
|
for (const [key, value, maximum] of [
|
|
@@ -18938,7 +19104,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
18938
19104
|
}
|
|
18939
19105
|
}, "catchUpSearch");
|
|
18940
19106
|
|
|
18941
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18942
19108
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
18943
19109
|
if (deps.reads === "store") {
|
|
18944
19110
|
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`);
|
|
@@ -18977,9 +19143,9 @@ var archiveService = /* @__PURE__ */ __name((deps) => {
|
|
|
18977
19143
|
const store = await deps.store();
|
|
18978
19144
|
const account = await deps.account();
|
|
18979
19145
|
if (chats !== void 0 && chats.length > 0) {
|
|
18980
|
-
const
|
|
19146
|
+
const named3 = await Promise.all(chats.map((chat) => storedChatId(deps.messenger, chat, store, account, { includeLeft: true })));
|
|
18981
19147
|
const titles = new Map((await store.chats.chatStats(account)).map((one2) => [one2.chatId, one2.title]));
|
|
18982
|
-
return { account, chats: [...new Set(
|
|
19148
|
+
return { account, chats: [...new Set(named3)].map((id2) => ({ id: id2, title: titles.get(id2) ?? null })) };
|
|
18983
19149
|
}
|
|
18984
19150
|
const stored = (await store.chats.chats(account, {})).items;
|
|
18985
19151
|
return {
|
|
@@ -19304,7 +19470,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19304
19470
|
return message?.timestamp ?? fallback;
|
|
19305
19471
|
}, "timeOfKey");
|
|
19306
19472
|
|
|
19307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19308
19474
|
var LINKS = /https?:\/\/\S+/g;
|
|
19309
19475
|
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");
|
|
19310
19476
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19334,7 +19500,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19334
19500
|
});
|
|
19335
19501
|
}, "questions");
|
|
19336
19502
|
|
|
19337
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19338
19504
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19339
19505
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19340
19506
|
const name = typed.trim().toLowerCase();
|
|
@@ -19391,7 +19557,7 @@ var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGO
|
|
|
19391
19557
|
return best.name;
|
|
19392
19558
|
}, "categorize");
|
|
19393
19559
|
|
|
19394
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19560
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19395
19561
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19396
19562
|
var RULES_IN = {
|
|
19397
19563
|
dialog: "all",
|
|
@@ -19597,7 +19763,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19597
19763
|
return passes;
|
|
19598
19764
|
}, "applyTaskRulesToChats");
|
|
19599
19765
|
|
|
19600
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
19601
19767
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
19602
19768
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
19603
19769
|
const fail3 = /* @__PURE__ */ __name(() => {
|
|
@@ -19661,7 +19827,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
19661
19827
|
}
|
|
19662
19828
|
}, "validateContextEvidencePage");
|
|
19663
19829
|
|
|
19664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
19665
19831
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
19666
19832
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
19667
19833
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -19714,7 +19880,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
19714
19880
|
};
|
|
19715
19881
|
}, "contextReadBudget");
|
|
19716
19882
|
|
|
19717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19883
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
19718
19884
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
19719
19885
|
if (!port || typeof port.read !== "function")
|
|
19720
19886
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -19758,7 +19924,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
19758
19924
|
};
|
|
19759
19925
|
}, "createContextEvidenceReader");
|
|
19760
19926
|
|
|
19761
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19927
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/ingest.js
|
|
19762
19928
|
var emptyReceipt = /* @__PURE__ */ __name((dryRun) => ({
|
|
19763
19929
|
dryRun,
|
|
19764
19930
|
source: null,
|
|
@@ -19833,7 +19999,7 @@ var ingest = /* @__PURE__ */ __name(async (store, envelope, { account, dryRun =
|
|
|
19833
19999
|
return receipt;
|
|
19834
20000
|
}, "ingest");
|
|
19835
20001
|
|
|
19836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
19837
20003
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
19838
20004
|
var DEFAULT_PURPOSES = ["work"];
|
|
19839
20005
|
var LINK_PURPOSE = "work";
|
|
@@ -19863,7 +20029,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
19863
20029
|
...value.split(",").map((one2) => one2.trim()).filter(Boolean)
|
|
19864
20030
|
], "purposeList");
|
|
19865
20031
|
|
|
19866
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20032
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19867
20033
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19868
20034
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19869
20035
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19903,7 +20069,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19903
20069
|
};
|
|
19904
20070
|
}, "dateWindow");
|
|
19905
20071
|
|
|
19906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20072
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19907
20073
|
var DAY_MS = 864e5;
|
|
19908
20074
|
var NEW_DAYS = 30;
|
|
19909
20075
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19980,7 +20146,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19980
20146
|
};
|
|
19981
20147
|
}, "scorePerson");
|
|
19982
20148
|
|
|
19983
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20149
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
19984
20150
|
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
19985
20151
|
const controller = new AbortController();
|
|
19986
20152
|
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
@@ -19996,7 +20162,7 @@ var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
|
19996
20162
|
}
|
|
19997
20163
|
}, "withTimeLimit");
|
|
19998
20164
|
|
|
19999
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20165
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
20000
20166
|
var REGISTRIES = {
|
|
20001
20167
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
20002
20168
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -20083,7 +20249,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
20083
20249
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
20084
20250
|
})), "notCovered");
|
|
20085
20251
|
|
|
20086
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20252
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
20087
20253
|
var ACTIVITY_MESSAGES = 1e3;
|
|
20088
20254
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
20089
20255
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20171,7 +20337,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20171
20337
|
};
|
|
20172
20338
|
}, "botCheckService");
|
|
20173
20339
|
|
|
20174
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20340
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20175
20341
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20176
20342
|
if (value === void 0)
|
|
20177
20343
|
return void 0;
|
|
@@ -20181,7 +20347,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20181
20347
|
return id2;
|
|
20182
20348
|
}, "threadIdOf");
|
|
20183
20349
|
|
|
20184
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20350
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20185
20351
|
var TOP_POSTS = 5;
|
|
20186
20352
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20187
20353
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20298,7 +20464,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20298
20464
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20299
20465
|
}, "median");
|
|
20300
20466
|
|
|
20301
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20302
20468
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20303
20469
|
const events = [];
|
|
20304
20470
|
for (const stay of stays) {
|
|
@@ -20330,7 +20496,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20330
20496
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20331
20497
|
}, "memberEvents");
|
|
20332
20498
|
|
|
20333
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20334
20500
|
var EVENTS_DAYS = 7;
|
|
20335
20501
|
var TRACKED_DAYS = 30;
|
|
20336
20502
|
var STATS_PAGE = 1e3;
|
|
@@ -20625,7 +20791,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20625
20791
|
return members.length === 0 ? null : members;
|
|
20626
20792
|
}, "storedMembers");
|
|
20627
20793
|
|
|
20628
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20629
20795
|
var INBOX_CHATS = 20;
|
|
20630
20796
|
var REVIEW_DAYS = 3;
|
|
20631
20797
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20833,7 +20999,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20833
20999
|
};
|
|
20834
21000
|
}, "inboxService");
|
|
20835
21001
|
|
|
20836
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
20837
21003
|
var CONTEXT_MESSAGES2 = 10;
|
|
20838
21004
|
var CONTEXT_BYTES = 64 * 1024;
|
|
20839
21005
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -20973,9 +21139,9 @@ var recordContext = /* @__PURE__ */ __name(async (store, record2, reads, { messa
|
|
|
20973
21139
|
const written = await store.messages.find({ account: key, senders: [identity.id], limit: messages });
|
|
20974
21140
|
theirs.push(...written.items.map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
20975
21141
|
cut ||= written.hasMore;
|
|
20976
|
-
const
|
|
20977
|
-
mentions.push(...
|
|
20978
|
-
cut ||=
|
|
21142
|
+
const named3 = await store.messages.mentioning(key, { id: identity.id, username: identity.username }, messages);
|
|
21143
|
+
mentions.push(...named3.items.filter((hit) => hit.senderId !== identity.id).map((hit) => toContext(key, hit, hit.chatTitle ?? null)).filter(recent));
|
|
21144
|
+
cut ||= named3.hasMore;
|
|
20979
21145
|
}
|
|
20980
21146
|
const personId = Number(record2.uid);
|
|
20981
21147
|
const upcoming = await eventsOnce(store, { personId, from: now }, messages);
|
|
@@ -21094,10 +21260,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21094
21260
|
};
|
|
21095
21261
|
}, "personMessages");
|
|
21096
21262
|
|
|
21097
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21263
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21098
21264
|
import { createHash } from "node:crypto";
|
|
21099
21265
|
|
|
21100
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21101
21267
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21102
21268
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21103
21269
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21115,7 +21281,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21115
21281
|
return { parsed, meeting };
|
|
21116
21282
|
}, "authorizedMeetingMetadata");
|
|
21117
21283
|
|
|
21118
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21119
21285
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21120
21286
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21121
21287
|
if (signal?.aborted)
|
|
@@ -21314,7 +21480,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21314
21480
|
return { ...packet, fingerprint: hash(packet) };
|
|
21315
21481
|
}, "readMeetingEvidence");
|
|
21316
21482
|
|
|
21317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21483
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21318
21484
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21319
21485
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21320
21486
|
const requestedAccounts = options.accountIds;
|
|
@@ -21413,7 +21579,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21413
21579
|
};
|
|
21414
21580
|
}, "personMeetingContext");
|
|
21415
21581
|
|
|
21416
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21582
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21417
21583
|
var PREPARE_BYTES = 96 * 1024;
|
|
21418
21584
|
var MEETINGS = 5;
|
|
21419
21585
|
var CUES = 3;
|
|
@@ -21530,7 +21696,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21530
21696
|
}
|
|
21531
21697
|
}, "meetingsOf");
|
|
21532
21698
|
|
|
21533
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21699
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21534
21700
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21535
21701
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21536
21702
|
const held = await storeIfOpen(deps);
|
|
@@ -21600,7 +21766,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21600
21766
|
complete: false
|
|
21601
21767
|
})), "quiet");
|
|
21602
21768
|
|
|
21603
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21769
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21604
21770
|
var TIMELINE_ITEMS = 50;
|
|
21605
21771
|
var TIMELINE_MAX = 500;
|
|
21606
21772
|
var SCOPES2 = ["personal", "work"];
|
|
@@ -21655,7 +21821,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21655
21821
|
};
|
|
21656
21822
|
}, "personTimeline");
|
|
21657
21823
|
|
|
21658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21659
21825
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21660
21826
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21661
21827
|
const held = await storeIfOpen(deps);
|
|
@@ -21882,7 +22048,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
21882
22048
|
return rest;
|
|
21883
22049
|
}, "withoutPhone");
|
|
21884
22050
|
|
|
21885
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
21886
22052
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
21887
22053
|
var PERIOD_FIELD = "created";
|
|
21888
22054
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -21985,7 +22151,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
21985
22151
|
}));
|
|
21986
22152
|
}, "meetingNames");
|
|
21987
22153
|
|
|
21988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
21989
22155
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
21990
22156
|
const tags = /* @__PURE__ */ new Map();
|
|
21991
22157
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -21994,7 +22160,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
21994
22160
|
return tags;
|
|
21995
22161
|
}, "taskTagFilters");
|
|
21996
22162
|
|
|
21997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
21998
22164
|
var TASK_QUERY = {
|
|
21999
22165
|
entity: "task",
|
|
22000
22166
|
backend: "sql",
|
|
@@ -22195,8 +22361,8 @@ var tasksService = /* @__PURE__ */ __name((deps, categories) => {
|
|
|
22195
22361
|
...previews ? { previews: await Promise.all(shown.map(({ task: task2 }) => taskView(store, account, task2))) } : {}
|
|
22196
22362
|
};
|
|
22197
22363
|
}), "list"),
|
|
22198
|
-
add: /* @__PURE__ */ __name((message, type, origin, { category:
|
|
22199
|
-
const chosen =
|
|
22364
|
+
add: /* @__PURE__ */ __name((message, type, origin, { category: named3, ...plan } = {}, choice = {}, author = void 0) => inStore(async (store, account) => {
|
|
22365
|
+
const chosen = named3 === void 0 ? void 0 : await categoryOf(store, named3);
|
|
22200
22366
|
const source = message.trim();
|
|
22201
22367
|
const native = isNoteReference(source);
|
|
22202
22368
|
if (!native && !isLocator(source)) {
|
|
@@ -22486,7 +22652,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22486
22652
|
};
|
|
22487
22653
|
}, "taskView");
|
|
22488
22654
|
|
|
22489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposal-tasks.js
|
|
22490
22656
|
var proposalSource = /* @__PURE__ */ __name((id2) => `proposed-action:${id2}`, "proposalSource");
|
|
22491
22657
|
var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
22492
22658
|
const proposal = await store.proposedActions.get(id2);
|
|
@@ -22509,7 +22675,7 @@ var approveAsTask = /* @__PURE__ */ __name(async (store, id2, by) => {
|
|
|
22509
22675
|
return { proposal: await store.proposedActions.approve(proposal.id, by, { task: task2.id }), task: task2 };
|
|
22510
22676
|
}, "approveAsTask");
|
|
22511
22677
|
|
|
22512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22678
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/ids.js
|
|
22513
22679
|
var MAX_IDS = 500;
|
|
22514
22680
|
var refuse = /* @__PURE__ */ __name((message) => {
|
|
22515
22681
|
throw new CliError("validation_error", message, { reason: "proposal.ids" });
|
|
@@ -22551,7 +22717,7 @@ var parseProposalIds = /* @__PURE__ */ __name((text2) => {
|
|
|
22551
22717
|
return ids;
|
|
22552
22718
|
}, "parseProposalIds");
|
|
22553
22719
|
|
|
22554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22720
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/shared.js
|
|
22555
22721
|
var proposerOfAuthor = /* @__PURE__ */ __name((author) => {
|
|
22556
22722
|
if (author.type === "person")
|
|
22557
22723
|
return { type: "person", id: author.id };
|
|
@@ -22593,7 +22759,7 @@ var storedStatus = /* @__PURE__ */ __name((filter) => {
|
|
|
22593
22759
|
return status === "proposed" || status === "rejected" ? status : void 0;
|
|
22594
22760
|
}, "storedStatus");
|
|
22595
22761
|
|
|
22596
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22762
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/action.js
|
|
22597
22763
|
var rowOf = /* @__PURE__ */ __name((action2) => ({
|
|
22598
22764
|
id: action2.id,
|
|
22599
22765
|
kind: "action",
|
|
@@ -22633,7 +22799,7 @@ var actionKind = /* @__PURE__ */ __name((store, claimed) => ({
|
|
|
22633
22799
|
}, "decide")
|
|
22634
22800
|
}), "actionKind");
|
|
22635
22801
|
|
|
22636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22802
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/fact.js
|
|
22637
22803
|
var STATUS = {
|
|
22638
22804
|
proposed: "proposed",
|
|
22639
22805
|
accepted: "confirmed",
|
|
@@ -22676,7 +22842,7 @@ var factKind = /* @__PURE__ */ __name((store) => ({
|
|
|
22676
22842
|
}, "decide")
|
|
22677
22843
|
}), "factKind");
|
|
22678
22844
|
|
|
22679
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/finance.js
|
|
22680
22846
|
var rowOf3 = /* @__PURE__ */ __name((kind, entry) => ({
|
|
22681
22847
|
id: entry.ref,
|
|
22682
22848
|
kind,
|
|
@@ -22711,7 +22877,7 @@ var financeKind = /* @__PURE__ */ __name((store, kind) => ({
|
|
|
22711
22877
|
var invoiceKind = /* @__PURE__ */ __name((store) => financeKind(store, "invoice"), "invoiceKind");
|
|
22712
22878
|
var paymentKind = /* @__PURE__ */ __name((store) => financeKind(store, "payment"), "paymentKind");
|
|
22713
22879
|
|
|
22714
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22880
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/findings.js
|
|
22715
22881
|
var FACT_SUMMARIES = {
|
|
22716
22882
|
fact: /* @__PURE__ */ __name((finding) => finding.statement, "fact"),
|
|
22717
22883
|
task: /* @__PURE__ */ __name((finding) => finding.title, "task"),
|
|
@@ -22783,7 +22949,7 @@ var findingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
22783
22949
|
};
|
|
22784
22950
|
}, "findingsKind");
|
|
22785
22951
|
|
|
22786
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22952
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/key-document.js
|
|
22787
22953
|
var linkRow = /* @__PURE__ */ __name((link4) => ({
|
|
22788
22954
|
id: `key:${link4.id}`,
|
|
22789
22955
|
kind: "key_document",
|
|
@@ -22851,7 +23017,7 @@ var keyDocumentKind = /* @__PURE__ */ __name((store) => {
|
|
|
22851
23017
|
};
|
|
22852
23018
|
}, "keyDocumentKind");
|
|
22853
23019
|
|
|
22854
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/mail-findings.js
|
|
22855
23021
|
var words = /* @__PURE__ */ __name((...parts) => parts.filter(Boolean).join(" "), "words");
|
|
22856
23022
|
var summaryOf = /* @__PURE__ */ __name((finding) => {
|
|
22857
23023
|
switch (finding.kind) {
|
|
@@ -22939,7 +23105,7 @@ var mailFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
22939
23105
|
};
|
|
22940
23106
|
}, "mailFindingsKind");
|
|
22941
23107
|
|
|
22942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/meeting-findings.js
|
|
22943
23109
|
var rowOf6 = /* @__PURE__ */ __name((action2, batch) => {
|
|
22944
23110
|
const findings = batch.input.findings;
|
|
22945
23111
|
const projects = [...new Set(findings.map((one2) => "project" in one2 ? one2.project : void 0))];
|
|
@@ -23003,7 +23169,7 @@ var meetingFindingsKind = /* @__PURE__ */ __name((store) => {
|
|
|
23003
23169
|
};
|
|
23004
23170
|
}, "meetingFindingsKind");
|
|
23005
23171
|
|
|
23006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/memory.js
|
|
23007
23173
|
var STATUS2 = {
|
|
23008
23174
|
proposed: "proposed",
|
|
23009
23175
|
confirmed: "confirmed",
|
|
@@ -23044,7 +23210,7 @@ var memoryKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23044
23210
|
}, "decide")
|
|
23045
23211
|
}), "memoryKind");
|
|
23046
23212
|
|
|
23047
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23213
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/orders.js
|
|
23048
23214
|
var rowOf8 = /* @__PURE__ */ __name((order) => ({
|
|
23049
23215
|
id: order.ref,
|
|
23050
23216
|
kind: "order",
|
|
@@ -23076,7 +23242,7 @@ var orderKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23076
23242
|
}, "decide")
|
|
23077
23243
|
}), "orderKind");
|
|
23078
23244
|
|
|
23079
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23245
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/organization.js
|
|
23080
23246
|
var ORGANIZATION_ADD_KIND = "organization_add";
|
|
23081
23247
|
var ORGANIZATION_RENAME_KIND = "organization_rename";
|
|
23082
23248
|
var rowOf9 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23132,7 +23298,7 @@ var organizationKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23132
23298
|
}, "decide")
|
|
23133
23299
|
}), "organizationKind");
|
|
23134
23300
|
|
|
23135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23301
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship.js
|
|
23136
23302
|
var linkRow2 = /* @__PURE__ */ __name((link4) => ({
|
|
23137
23303
|
id: `link:${link4.id}`,
|
|
23138
23304
|
kind: "relationship",
|
|
@@ -23206,7 +23372,7 @@ var relationshipKind = /* @__PURE__ */ __name((store) => {
|
|
|
23206
23372
|
};
|
|
23207
23373
|
}, "relationshipKind");
|
|
23208
23374
|
|
|
23209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/relationship-update.js
|
|
23210
23376
|
var KIND = "relationship_update";
|
|
23211
23377
|
var summaryOf2 = /* @__PURE__ */ __name(({ changes }) => Object.entries(changes).map(([field, value]) => `${field} ${value ?? "cleared"}`).join(", "), "summaryOf");
|
|
23212
23378
|
var rowOf10 = /* @__PURE__ */ __name((action2) => {
|
|
@@ -23256,7 +23422,7 @@ var relationshipUpdateKind = /* @__PURE__ */ __name((store) => ({
|
|
|
23256
23422
|
}, "decide")
|
|
23257
23423
|
}), "relationshipUpdateKind");
|
|
23258
23424
|
|
|
23259
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23425
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/kinds/task-close.js
|
|
23260
23426
|
var rowOf11 = /* @__PURE__ */ __name((task2) => {
|
|
23261
23427
|
const suggestion = task2.closeSuggestion;
|
|
23262
23428
|
if (suggestion === null)
|
|
@@ -23324,7 +23490,7 @@ var taskCloseKind = /* @__PURE__ */ __name((store) => {
|
|
|
23324
23490
|
};
|
|
23325
23491
|
}, "taskCloseKind");
|
|
23326
23492
|
|
|
23327
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23493
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/proposals/registry.js
|
|
23328
23494
|
var PREFIX = /^([a-z][a-z_]*):/;
|
|
23329
23495
|
var marked = /* @__PURE__ */ __name((kind, row) => kind.ownerOnly ? { ...row, ownerOnly: true } : row, "marked");
|
|
23330
23496
|
var refusalOf = /* @__PURE__ */ __name((id2, error) => {
|
|
@@ -23452,7 +23618,7 @@ var proposalRegistry = /* @__PURE__ */ __name((store) => {
|
|
|
23452
23618
|
return registry;
|
|
23453
23619
|
}, "proposalRegistry");
|
|
23454
23620
|
|
|
23455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23621
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
23456
23622
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
23457
23623
|
if (newest === null)
|
|
23458
23624
|
return null;
|
|
@@ -23461,7 +23627,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
23461
23627
|
return newest.addressed ? "owed" : null;
|
|
23462
23628
|
}, "mailTurn");
|
|
23463
23629
|
|
|
23464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
23465
23631
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
23466
23632
|
if (error instanceof CliError && error.code === "not_found")
|
|
23467
23633
|
return void 0;
|
|
@@ -23519,7 +23685,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
23519
23685
|
};
|
|
23520
23686
|
}, "mailActivity");
|
|
23521
23687
|
|
|
23522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23688
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
23523
23689
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
23524
23690
|
const ids = [...new Set(chatIds)];
|
|
23525
23691
|
if (ids.length === 0)
|
|
@@ -23545,7 +23711,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
23545
23711
|
}));
|
|
23546
23712
|
}, "chatCoverage");
|
|
23547
23713
|
|
|
23548
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
23549
23715
|
var DAY = 864e5;
|
|
23550
23716
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
23551
23717
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23792,7 +23958,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23792
23958
|
};
|
|
23793
23959
|
}, "agendaItem");
|
|
23794
23960
|
|
|
23795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23796
23962
|
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");
|
|
23797
23963
|
var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) => {
|
|
23798
23964
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23808,7 +23974,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size4 = 240, options = {}) =
|
|
|
23808
23974
|
}, "excerpt");
|
|
23809
23975
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
23810
23976
|
|
|
23811
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23977
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/shared.js
|
|
23812
23978
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
23813
23979
|
var folded = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "folded");
|
|
23814
23980
|
var wholeWords = /* @__PURE__ */ __name((term) => new RegExp(`(?<![\\p{L}\\p{N}\\p{M}_])${escaped(normalizeVocabularyName(term))}(?![\\p{L}\\p{N}\\p{M}_])`, "u"), "wholeWords");
|
|
@@ -23847,7 +24013,7 @@ var identitiesIn = /* @__PURE__ */ __name(async (store, people, provider) => {
|
|
|
23847
24013
|
return found;
|
|
23848
24014
|
}, "identitiesIn");
|
|
23849
24015
|
|
|
23850
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24016
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/alias-hits.js
|
|
23851
24017
|
var SEARCH_LIMIT = 500;
|
|
23852
24018
|
var aliasWeight = /* @__PURE__ */ __name((hits) => hits >= 10 ? 0.55 : hits >= 3 ? 0.35 : 0, "aliasWeight");
|
|
23853
24019
|
var aliasHits = {
|
|
@@ -23896,7 +24062,7 @@ var aliasHits = {
|
|
|
23896
24062
|
}, "candidates")
|
|
23897
24063
|
};
|
|
23898
24064
|
|
|
23899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24065
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-senders.js
|
|
23900
24066
|
var WEIGHT = 0.5;
|
|
23901
24067
|
var LARGE_GROUP_WEIGHT = 0.2;
|
|
23902
24068
|
var LARGE_GROUP = 30;
|
|
@@ -23948,7 +24114,7 @@ var chatSenders = {
|
|
|
23948
24114
|
}, "candidates")
|
|
23949
24115
|
};
|
|
23950
24116
|
|
|
23951
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24117
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/chat-title.js
|
|
23952
24118
|
var WEIGHT2 = 0.7;
|
|
23953
24119
|
var chatTitle = {
|
|
23954
24120
|
id: "chat-title",
|
|
@@ -23987,7 +24153,7 @@ var chatTitle = {
|
|
|
23987
24153
|
}, "candidates")
|
|
23988
24154
|
};
|
|
23989
24155
|
|
|
23990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/email-domain.js
|
|
23991
24157
|
var WEIGHT3 = 0.3;
|
|
23992
24158
|
var CONTACTS = 500;
|
|
23993
24159
|
var MOST_PAIRS = 200;
|
|
@@ -24048,7 +24214,7 @@ var emailDomain = {
|
|
|
24048
24214
|
}, "candidates")
|
|
24049
24215
|
};
|
|
24050
24216
|
|
|
24051
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/mail-thread.js
|
|
24052
24218
|
var NAMED = 0.7;
|
|
24053
24219
|
var MEMBER_ONLY = 0.3;
|
|
24054
24220
|
var READ_LIMIT2 = 500;
|
|
@@ -24090,7 +24256,7 @@ var mailThread = {
|
|
|
24090
24256
|
const thread = (await store.mail.thread(id2))?.thread;
|
|
24091
24257
|
if (!thread)
|
|
24092
24258
|
continue;
|
|
24093
|
-
const
|
|
24259
|
+
const named3 = names2(thread.subject ?? subject) !== void 0;
|
|
24094
24260
|
const chat = formatReference({
|
|
24095
24261
|
type: "chat",
|
|
24096
24262
|
provider: "email",
|
|
@@ -24102,8 +24268,8 @@ var mailThread = {
|
|
|
24102
24268
|
from: chat,
|
|
24103
24269
|
to: project2.ref,
|
|
24104
24270
|
kind: "member-of",
|
|
24105
|
-
weight:
|
|
24106
|
-
why: `a thread with ${who2.length > 1 ? `${who2.length} members` : `a member (${who2[0]})`}${
|
|
24271
|
+
weight: named3 ? NAMED : MEMBER_ONLY,
|
|
24272
|
+
why: `a thread with ${who2.length > 1 ? `${who2.length} members` : `a member (${who2[0]})`}${named3 ? "; its subject names the project" : ""}`,
|
|
24107
24273
|
evidence: [
|
|
24108
24274
|
formatReference({
|
|
24109
24275
|
type: "message",
|
|
@@ -24121,7 +24287,7 @@ var mailThread = {
|
|
|
24121
24287
|
}, "candidates")
|
|
24122
24288
|
};
|
|
24123
24289
|
|
|
24124
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24290
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-chats.js
|
|
24125
24291
|
var WEIGHT4 = 0.5;
|
|
24126
24292
|
var memberChats = {
|
|
24127
24293
|
id: "member-chats",
|
|
@@ -24146,14 +24312,14 @@ var memberChats = {
|
|
|
24146
24312
|
for (const [chat, held] of members) {
|
|
24147
24313
|
if (held.size < 2)
|
|
24148
24314
|
continue;
|
|
24149
|
-
const
|
|
24315
|
+
const named3 = [...held].sort();
|
|
24150
24316
|
found.push({
|
|
24151
24317
|
from: chatRef2(key, chat),
|
|
24152
24318
|
to: project2.ref,
|
|
24153
24319
|
kind: "member-of",
|
|
24154
24320
|
weight: WEIGHT4,
|
|
24155
|
-
why: `a group with ${held.size} confirmed members (${
|
|
24156
|
-
evidence:
|
|
24321
|
+
why: `a group with ${held.size} confirmed members (${named3.slice(0, 3).join(", ")}${held.size > 3 ? ", \u2026" : ""})`,
|
|
24322
|
+
evidence: named3.slice(0, 5)
|
|
24157
24323
|
});
|
|
24158
24324
|
}
|
|
24159
24325
|
}
|
|
@@ -24161,7 +24327,7 @@ var memberChats = {
|
|
|
24161
24327
|
}, "candidates")
|
|
24162
24328
|
};
|
|
24163
24329
|
|
|
24164
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/member-dialog.js
|
|
24165
24331
|
var WEIGHT5 = 0.6;
|
|
24166
24332
|
var memberDialog = {
|
|
24167
24333
|
id: "member-dialog",
|
|
@@ -24195,7 +24361,7 @@ var memberDialog = {
|
|
|
24195
24361
|
}, "candidates")
|
|
24196
24362
|
};
|
|
24197
24363
|
|
|
24198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24364
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
24199
24365
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
24200
24366
|
async around(ref, window3) {
|
|
24201
24367
|
const at = parseLocator(ref);
|
|
@@ -24291,7 +24457,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
24291
24457
|
};
|
|
24292
24458
|
}, "storedNeighbours");
|
|
24293
24459
|
|
|
24294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
24295
24461
|
import { createHash as createHash2 } from "node:crypto";
|
|
24296
24462
|
var DAY2 = 864e5;
|
|
24297
24463
|
var MAX_TIME = 864e13;
|
|
@@ -24607,7 +24773,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
24607
24773
|
return value;
|
|
24608
24774
|
}, "decodeCheckpoint");
|
|
24609
24775
|
|
|
24610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24776
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
24611
24777
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
24612
24778
|
var PAGE2 = 20;
|
|
24613
24779
|
var PEOPLE = 20;
|
|
@@ -25011,7 +25177,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
25011
25177
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
25012
25178
|
}, "peopleOf");
|
|
25013
25179
|
|
|
25014
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25180
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
25015
25181
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
25016
25182
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
25017
25183
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -25055,7 +25221,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
25055
25221
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
25056
25222
|
}, "matchVocabularyTerms");
|
|
25057
25223
|
|
|
25058
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25224
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
25059
25225
|
var KINDS = ["project", "tag", "topic"];
|
|
25060
25226
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
25061
25227
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -25110,7 +25276,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
25110
25276
|
};
|
|
25111
25277
|
}, "findEvidenceMentions");
|
|
25112
25278
|
|
|
25113
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25279
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
25114
25280
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
25115
25281
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
25116
25282
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -25416,7 +25582,7 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
25416
25582
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
25417
25583
|
}, "purposeHintOf");
|
|
25418
25584
|
|
|
25419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/link-scorers/scan.js
|
|
25420
25586
|
var SCORERS = [chatTitle, aliasHits, memberChats, memberDialog, chatSenders, mailThread];
|
|
25421
25587
|
var PERSON_SCORERS = [emailDomain];
|
|
25422
25588
|
var SCAN_BOT = { bot: "memo-scan", kind: "rule" };
|
|
@@ -25624,18 +25790,18 @@ var referenceOf = /* @__PURE__ */ __name((text2) => {
|
|
|
25624
25790
|
}, "referenceOf");
|
|
25625
25791
|
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");
|
|
25626
25792
|
|
|
25627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25628
25794
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
25629
25795
|
|
|
25630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25631
25797
|
import { lstat } from "node:fs/promises";
|
|
25632
25798
|
|
|
25633
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25799
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25634
25800
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
25635
25801
|
import { open as open2, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
25636
25802
|
import { join as join2 } from "node:path";
|
|
25637
25803
|
|
|
25638
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25804
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
25639
25805
|
import { createHash as createHash3 } from "node:crypto";
|
|
25640
25806
|
var metadataLimit = 16384;
|
|
25641
25807
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -25695,7 +25861,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
25695
25861
|
}
|
|
25696
25862
|
}, "readPartialMetadata");
|
|
25697
25863
|
|
|
25698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25864
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
25699
25865
|
import { randomUUID } from "node:crypto";
|
|
25700
25866
|
import { open, rename, unlink } from "node:fs/promises";
|
|
25701
25867
|
import { join } from "node:path";
|
|
@@ -25787,7 +25953,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
25787
25953
|
};
|
|
25788
25954
|
}, "partialWriter");
|
|
25789
25955
|
|
|
25790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25956
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
25791
25957
|
var NativeRecordingPartialStore = class {
|
|
25792
25958
|
static {
|
|
25793
25959
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -25894,12 +26060,12 @@ var NativeRecordingPartialStore = class {
|
|
|
25894
26060
|
}
|
|
25895
26061
|
};
|
|
25896
26062
|
|
|
25897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
25898
26064
|
import { createHash as createHash5 } from "node:crypto";
|
|
25899
26065
|
import { link as link2 } from "node:fs/promises";
|
|
25900
26066
|
import { basename, dirname, join as join4, resolve } from "node:path";
|
|
25901
26067
|
|
|
25902
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26068
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
25903
26069
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
25904
26070
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
25905
26071
|
signal?.throwIfAborted();
|
|
@@ -25934,7 +26100,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
25934
26100
|
signal?.throwIfAborted();
|
|
25935
26101
|
}, "commitPublication");
|
|
25936
26102
|
|
|
25937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26103
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
25938
26104
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
25939
26105
|
import { open as open3, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
25940
26106
|
import { join as join3 } from "node:path";
|
|
@@ -26007,7 +26173,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
26007
26173
|
}
|
|
26008
26174
|
}, "writePublicationJournal");
|
|
26009
26175
|
|
|
26010
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
26011
26177
|
var NativeRecordingPublication = class {
|
|
26012
26178
|
static {
|
|
26013
26179
|
__name(this, "NativeRecordingPublication");
|
|
@@ -26080,7 +26246,7 @@ var NativeRecordingPublication = class {
|
|
|
26080
26246
|
}
|
|
26081
26247
|
};
|
|
26082
26248
|
|
|
26083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26249
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
26084
26250
|
import { createHash as createHash6 } from "node:crypto";
|
|
26085
26251
|
import { readdir } from "node:fs/promises";
|
|
26086
26252
|
import { isAbsolute, join as join5, resolve as resolve2 } from "node:path";
|
|
@@ -26167,7 +26333,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one2, beforePublish) => wri
|
|
|
26167
26333
|
beforePublish
|
|
26168
26334
|
}), "commitMediaEntry");
|
|
26169
26335
|
|
|
26170
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26336
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
26171
26337
|
var validator = '"media-completed-v1"';
|
|
26172
26338
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
26173
26339
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -26268,7 +26434,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
26268
26434
|
return entry;
|
|
26269
26435
|
}, "archiveMediaFile");
|
|
26270
26436
|
|
|
26271
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
26272
26438
|
import { mkdir, realpath } from "node:fs/promises";
|
|
26273
26439
|
import { join as join6, resolve as resolve3 } from "node:path";
|
|
26274
26440
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -26335,7 +26501,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
26335
26501
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
26336
26502
|
}, "withMediaArchiveLocks");
|
|
26337
26503
|
|
|
26338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26504
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
26339
26505
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
26340
26506
|
if (value === void 0)
|
|
26341
26507
|
return void 0;
|
|
@@ -26488,7 +26654,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
26488
26654
|
}, { create: true });
|
|
26489
26655
|
}, "archiveMedia");
|
|
26490
26656
|
|
|
26491
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26657
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
26492
26658
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
26493
26659
|
import { basename as basename2, dirname as dirname2, join as join7, resolve as resolve4 } from "node:path";
|
|
26494
26660
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -26641,8 +26807,8 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
26641
26807
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
26642
26808
|
}, "moveMediaArchive");
|
|
26643
26809
|
|
|
26644
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26645
|
-
var
|
|
26810
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
26811
|
+
var bytesOf2 = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
26646
26812
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
26647
26813
|
}, "progress") }) => {
|
|
26648
26814
|
try {
|
|
@@ -26659,12 +26825,12 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26659
26825
|
}
|
|
26660
26826
|
const directory2 = textModelsDirectory(env);
|
|
26661
26827
|
if (!isTextModelInstalled(model, directory2)) {
|
|
26662
|
-
progress(`${model.id}: ${megabytes(
|
|
26828
|
+
progress(`${model.id}: ${megabytes(bytesOf2(model))} from Hugging Face`);
|
|
26663
26829
|
await installFiles(placedText(model, directory2), { progress });
|
|
26664
26830
|
}
|
|
26665
26831
|
await nativeRuntime({ env, progress });
|
|
26666
26832
|
progress(`${model.id}: loading it once to check it works`);
|
|
26667
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
26833
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-74KVORNN.js");
|
|
26668
26834
|
const embedder = await openEmbedder2(model, directory2);
|
|
26669
26835
|
try {
|
|
26670
26836
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -26680,12 +26846,12 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
26680
26846
|
const model = rerankModel(id2);
|
|
26681
26847
|
const directory2 = textModelsDirectory(env);
|
|
26682
26848
|
if (!isTextModelInstalled(model, directory2)) {
|
|
26683
|
-
progress(`${model.id}: ${megabytes(
|
|
26849
|
+
progress(`${model.id}: ${megabytes(bytesOf2(model))} from Hugging Face`);
|
|
26684
26850
|
await installFiles(placedText(model, directory2), { progress });
|
|
26685
26851
|
}
|
|
26686
26852
|
await nativeRuntime({ env, progress });
|
|
26687
26853
|
progress(`${model.id}: loading it once to check it works`);
|
|
26688
|
-
const { openReranker } = await import("./rerank-
|
|
26854
|
+
const { openReranker } = await import("./rerank-FUNVBYFI.js");
|
|
26689
26855
|
const reranker = await openReranker(model, directory2);
|
|
26690
26856
|
try {
|
|
26691
26857
|
await reranker.score("check", ["check"]);
|
|
@@ -26699,11 +26865,11 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26699
26865
|
const model = imageModel(id2);
|
|
26700
26866
|
const directory2 = imageModelsDirectory(env);
|
|
26701
26867
|
if (!isImageModelInstalled(model, directory2)) {
|
|
26702
|
-
progress(`${model.id}: ${megabytes(
|
|
26868
|
+
progress(`${model.id}: ${megabytes(bytesOf2(model))} from Hugging Face`);
|
|
26703
26869
|
await installFiles(placedImage(model, directory2), { progress });
|
|
26704
26870
|
}
|
|
26705
26871
|
progress(`${model.id}: loading it once to check it works`);
|
|
26706
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
26872
|
+
const { openPictureEmbedder } = await import("./embedder-GACNPCZN.js");
|
|
26707
26873
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
26708
26874
|
try {
|
|
26709
26875
|
const vector = await embedder.embedQuery("check");
|
|
@@ -26715,7 +26881,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
26715
26881
|
return { model, directory: directory2 };
|
|
26716
26882
|
}, "downloadImageModel");
|
|
26717
26883
|
|
|
26718
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26884
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
26719
26885
|
var MONEY_REQUEST = "money-request";
|
|
26720
26886
|
var MONEY_DONE = "money-done";
|
|
26721
26887
|
var PROMISE = "promise";
|
|
@@ -26749,10 +26915,10 @@ var MONEY_WORDS = [
|
|
|
26749
26915
|
}
|
|
26750
26916
|
];
|
|
26751
26917
|
|
|
26752
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
26753
26919
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
26754
26920
|
|
|
26755
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26921
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
26756
26922
|
var words2 = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
26757
26923
|
var MONEY_DONE_FORMS = words2([
|
|
26758
26924
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -26792,7 +26958,7 @@ var PROMISE_FORMS = words2([
|
|
|
26792
26958
|
"estar\xE1 listo"
|
|
26793
26959
|
]);
|
|
26794
26960
|
|
|
26795
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26961
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
26796
26962
|
var EXCERPT_CHARS = 80;
|
|
26797
26963
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
26798
26964
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -26814,7 +26980,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
26814
26980
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
26815
26981
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
26816
26982
|
|
|
26817
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26983
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
26818
26984
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
26819
26985
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
26820
26986
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -26825,8 +26991,8 @@ var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
|
26825
26991
|
return classes.includes(MONEY_REQUEST) ? "request" : "none";
|
|
26826
26992
|
}, "verbOf");
|
|
26827
26993
|
var roleDirection = /* @__PURE__ */ __name((role) => {
|
|
26828
|
-
const
|
|
26829
|
-
return
|
|
26994
|
+
const named3 = role?.trim().toLowerCase();
|
|
26995
|
+
return named3 === "client" ? "to_us" : named3 === "contractor" ? "from_us" : "unknown";
|
|
26830
26996
|
}, "roleDirection");
|
|
26831
26997
|
var directionOf = /* @__PURE__ */ __name((verb, owner, role) => {
|
|
26832
26998
|
if (verb === "request")
|
|
@@ -26895,7 +27061,7 @@ var amounts = {
|
|
|
26895
27061
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
26896
27062
|
};
|
|
26897
27063
|
|
|
26898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27064
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
26899
27065
|
var children = {
|
|
26900
27066
|
id: "children",
|
|
26901
27067
|
version: 1,
|
|
@@ -26924,7 +27090,7 @@ var children = {
|
|
|
26924
27090
|
}, "read")
|
|
26925
27091
|
};
|
|
26926
27092
|
|
|
26927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27093
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
26928
27094
|
var coverage = {
|
|
26929
27095
|
id: "coverage",
|
|
26930
27096
|
version: 1,
|
|
@@ -26953,7 +27119,7 @@ var coverage = {
|
|
|
26953
27119
|
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")
|
|
26954
27120
|
};
|
|
26955
27121
|
|
|
26956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27122
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
26957
27123
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
26958
27124
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
26959
27125
|
signal: "payments",
|
|
@@ -27003,7 +27169,7 @@ var payments = {
|
|
|
27003
27169
|
}, "read")
|
|
27004
27170
|
};
|
|
27005
27171
|
|
|
27006
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
27007
27173
|
var PATTERNS_PER_CHAT = 3;
|
|
27008
27174
|
var DAY3 = 864e5;
|
|
27009
27175
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -27092,7 +27258,7 @@ var promises = {
|
|
|
27092
27258
|
}, "read")
|
|
27093
27259
|
};
|
|
27094
27260
|
|
|
27095
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27261
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
27096
27262
|
var PER_SIDE = 5;
|
|
27097
27263
|
var WEEK = 7 * 864e5;
|
|
27098
27264
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -27123,7 +27289,7 @@ var questions2 = {
|
|
|
27123
27289
|
}, "attention")
|
|
27124
27290
|
};
|
|
27125
27291
|
|
|
27126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27292
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
27127
27293
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
27128
27294
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one2) => one2.id === id2), "byId");
|
|
27129
27295
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -27138,8 +27304,8 @@ var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
|
27138
27304
|
return void 0;
|
|
27139
27305
|
if (owners.has(mentioned2))
|
|
27140
27306
|
return { owner: true, id: mentioned2, name: null };
|
|
27141
|
-
const
|
|
27142
|
-
return { owner: false, id: mentioned2, name:
|
|
27307
|
+
const named3 = chat.messages.find((one2) => one2.senderId === mentioned2);
|
|
27308
|
+
return { owner: false, id: mentioned2, name: named3?.senderName ?? null };
|
|
27143
27309
|
}, "targetOf");
|
|
27144
27310
|
var asksSomething = /* @__PURE__ */ __name((message) => message.text.includes("?"), "asksSomething");
|
|
27145
27311
|
var replyNext = {
|
|
@@ -27191,7 +27357,7 @@ var replyNext = {
|
|
|
27191
27357
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
27192
27358
|
};
|
|
27193
27359
|
|
|
27194
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
27195
27361
|
var escaped2 = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
27196
27362
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped2(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
27197
27363
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -27237,7 +27403,7 @@ var topics = {
|
|
|
27237
27403
|
}, "read")
|
|
27238
27404
|
};
|
|
27239
27405
|
|
|
27240
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27406
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
27241
27407
|
var STATUS_SIGNALS = [
|
|
27242
27408
|
replyNext,
|
|
27243
27409
|
questions2,
|
|
@@ -27249,7 +27415,7 @@ var STATUS_SIGNALS = [
|
|
|
27249
27415
|
children
|
|
27250
27416
|
];
|
|
27251
27417
|
|
|
27252
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27418
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
27253
27419
|
var DAY4 = 864e5;
|
|
27254
27420
|
var STATUS_WINDOW = 300;
|
|
27255
27421
|
var STATUS_CHATS = 16;
|
|
@@ -27438,7 +27604,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27438
27604
|
};
|
|
27439
27605
|
}, "projectStatus");
|
|
27440
27606
|
|
|
27441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
27442
27608
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
27443
27609
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
27444
27610
|
if (deps.offline)
|
|
@@ -27510,7 +27676,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
27510
27676
|
};
|
|
27511
27677
|
}, "accountService");
|
|
27512
27678
|
|
|
27513
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
27514
27680
|
var MINUTE = 6e4;
|
|
27515
27681
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
27516
27682
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -27529,7 +27695,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
27529
27695
|
return new Date(at - at % MINUTE).toISOString();
|
|
27530
27696
|
}, "sendTime");
|
|
27531
27697
|
|
|
27532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
27533
27699
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write2) => {
|
|
27534
27700
|
try {
|
|
27535
27701
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -27776,7 +27942,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
27776
27942
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
27777
27943
|
}, "linkLimits");
|
|
27778
27944
|
|
|
27779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27945
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
27780
27946
|
var THREADS_PAGE = 500;
|
|
27781
27947
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
27782
27948
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -27855,7 +28021,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
27855
28021
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
27856
28022
|
}, "readMail");
|
|
27857
28023
|
|
|
27858
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28024
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
27859
28025
|
var NO_MAIL = "no_mail";
|
|
27860
28026
|
var MAIL = "email";
|
|
27861
28027
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -27902,7 +28068,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
27902
28068
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
27903
28069
|
}, "accountsOfKind");
|
|
27904
28070
|
|
|
27905
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28071
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
27906
28072
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
27907
28073
|
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");
|
|
27908
28074
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -28250,7 +28416,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
28250
28416
|
};
|
|
28251
28417
|
}, "statsLucene");
|
|
28252
28418
|
|
|
28253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
28254
28420
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
28255
28421
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
28256
28422
|
function invalid(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -28419,7 +28585,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
28419
28585
|
};
|
|
28420
28586
|
}, "readRankingSelection");
|
|
28421
28587
|
|
|
28422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
28423
28589
|
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");
|
|
28424
28590
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
28425
28591
|
command,
|
|
@@ -28429,7 +28595,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
28429
28595
|
fieldsVersion: FIELD_VERSION
|
|
28430
28596
|
}), "searchRecordOf");
|
|
28431
28597
|
|
|
28432
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28598
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
28433
28599
|
function invalid2(message) {
|
|
28434
28600
|
throw new CliError("validation_error", message);
|
|
28435
28601
|
}
|
|
@@ -28723,7 +28889,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28723
28889
|
}, "evidence")
|
|
28724
28890
|
}), "adminStatisticsService");
|
|
28725
28891
|
|
|
28726
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28892
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
28727
28893
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
28728
28894
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
28729
28895
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -28860,16 +29026,16 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
28860
29026
|
return { plan, repair };
|
|
28861
29027
|
}, "gapsService");
|
|
28862
29028
|
|
|
28863
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29029
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28864
29030
|
import { createHash as createHash9 } from "node:crypto";
|
|
28865
29031
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
28866
29032
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
28867
29033
|
|
|
28868
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
28869
29035
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
28870
29036
|
import { basename as basename4, join as join8, relative as relative2, sep as sep2 } from "node:path";
|
|
28871
29037
|
|
|
28872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29038
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
28873
29039
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
28874
29040
|
import { open as open4, stat } from "node:fs/promises";
|
|
28875
29041
|
import { basename as basename3, dirname as dirname3, extname, isAbsolute as isAbsolute2, relative, resolve as resolve5, sep } from "node:path";
|
|
@@ -28983,12 +29149,12 @@ var refusedPlace = /* @__PURE__ */ __name((path, app, env, platform = process.pl
|
|
|
28983
29149
|
const fold2 = /* @__PURE__ */ __name((text2) => folded2 ? text2.toLowerCase() : text2, "fold");
|
|
28984
29150
|
const parts = new Set([...CREDENTIAL_PARTS].map(fold2));
|
|
28985
29151
|
const runs = CREDENTIAL_RUNS.map((run) => run.map(fold2));
|
|
28986
|
-
const
|
|
29152
|
+
const named3 = /* @__PURE__ */ __name((candidate) => {
|
|
28987
29153
|
const names2 = candidate.split(sep).map(fold2);
|
|
28988
29154
|
return names2.some((name, index) => parts.has(name) || /^\.env\./.test(name) || runs.some((run) => run.every((part, offset) => names2[index + offset] === part)));
|
|
28989
29155
|
}, "named");
|
|
28990
29156
|
const same2 = /* @__PURE__ */ __name((a, b) => fold2(a) === fold2(b), "same");
|
|
28991
|
-
return [resolve5(path), real].some((candidate) =>
|
|
29157
|
+
return [resolve5(path), real].some((candidate) => named3(candidate) || own.some((dir) => inside(fold2(candidate), fold2(dir))) || [store, `${store}-wal`, `${store}-shm`].some((file2) => same2(candidate, file2)));
|
|
28992
29158
|
}, "refusedPlace");
|
|
28993
29159
|
var inside = /* @__PURE__ */ __name((path, dir) => {
|
|
28994
29160
|
const way = relative(resolve5(dir), path);
|
|
@@ -29071,7 +29237,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read2) => {
|
|
|
29071
29237
|
return { name, source };
|
|
29072
29238
|
}, "readStickerFile");
|
|
29073
29239
|
|
|
29074
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29240
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
29075
29241
|
var MAX_FILES = 1e4;
|
|
29076
29242
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
29077
29243
|
if (refusedPlace(directory2, app, env))
|
|
@@ -29124,11 +29290,11 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29124
29290
|
const complete = candidates.every((paths) => paths.length === 1);
|
|
29125
29291
|
group.forEach((file2, index) => {
|
|
29126
29292
|
const own = file2.name === null ? void 0 : basename4(file2.name);
|
|
29127
|
-
const
|
|
29293
|
+
const named3 = own && counts.get(own) === 1 ? files.get(own) : void 0;
|
|
29128
29294
|
const canonical2 = complete ? candidates[index]?.[0] : void 0;
|
|
29129
|
-
if (
|
|
29295
|
+
if (named3 && canonical2 && named3 !== canonical2 || !complete && own && files.has(own) && (counts.get(own) ?? 0) > 1)
|
|
29130
29296
|
throw new CliError("validation_error", "directory file names are ambiguous; use complete message-prefixed downloads");
|
|
29131
|
-
choices.set(file2.pk, canonical2 ??
|
|
29297
|
+
choices.set(file2.pk, canonical2 ?? named3 ?? null);
|
|
29132
29298
|
});
|
|
29133
29299
|
}
|
|
29134
29300
|
const uses = /* @__PURE__ */ new Map();
|
|
@@ -29140,15 +29306,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
29140
29306
|
return choices;
|
|
29141
29307
|
}, "directoryPaths");
|
|
29142
29308
|
|
|
29143
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29144
29310
|
import { posix } from "node:path";
|
|
29145
29311
|
|
|
29146
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29312
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29147
29313
|
import { setImmediate as tick } from "node:timers/promises";
|
|
29148
29314
|
import { crc32 } from "node:zlib";
|
|
29149
29315
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
29150
29316
|
|
|
29151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29317
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
29152
29318
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
29153
29319
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
29154
29320
|
var SAMPLE = 65536;
|
|
@@ -29250,7 +29416,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
29250
29416
|
return result.text;
|
|
29251
29417
|
}, "decodeXml");
|
|
29252
29418
|
|
|
29253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
29254
29420
|
var MAX_PART = 10 * 1024 * 1024;
|
|
29255
29421
|
var MAX_ENTRIES = 1e3;
|
|
29256
29422
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -29465,7 +29631,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
29465
29631
|
return found;
|
|
29466
29632
|
}, "elements");
|
|
29467
29633
|
|
|
29468
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
29469
29635
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
29470
29636
|
let name = "";
|
|
29471
29637
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -29520,7 +29686,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
29520
29686
|
return { text: parts.join("").trim(), truncated: false };
|
|
29521
29687
|
}, "sheetText");
|
|
29522
29688
|
|
|
29523
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29689
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
29524
29690
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
29525
29691
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
29526
29692
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -29920,10 +30086,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
29920
30086
|
}
|
|
29921
30087
|
}, "readDocument");
|
|
29922
30088
|
|
|
29923
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29924
30090
|
import { extname as extname3 } from "node:path";
|
|
29925
30091
|
|
|
29926
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30092
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
29927
30093
|
import { readFileSync } from "node:fs";
|
|
29928
30094
|
import { dirname as dirname4, extname as extname2, join as join9 } from "node:path";
|
|
29929
30095
|
import { fileURLToPath } from "node:url";
|
|
@@ -29984,7 +30150,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read2) => {
|
|
|
29984
30150
|
}
|
|
29985
30151
|
}, "derived");
|
|
29986
30152
|
|
|
29987
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
29988
30154
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
29989
30155
|
var image2 = {
|
|
29990
30156
|
id: "image",
|
|
@@ -29993,7 +30159,7 @@ var image2 = {
|
|
|
29993
30159
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
29994
30160
|
};
|
|
29995
30161
|
|
|
29996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
29997
30163
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
29998
30164
|
var doc = {
|
|
29999
30165
|
id: "doc",
|
|
@@ -30005,7 +30171,7 @@ var doc = {
|
|
|
30005
30171
|
}), "read")
|
|
30006
30172
|
};
|
|
30007
30173
|
|
|
30008
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30174
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
30009
30175
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
30010
30176
|
var docx = {
|
|
30011
30177
|
id: "docx",
|
|
@@ -30018,7 +30184,7 @@ var docx = {
|
|
|
30018
30184
|
}), "read")
|
|
30019
30185
|
};
|
|
30020
30186
|
|
|
30021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
30022
30188
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
30023
30189
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
30024
30190
|
"fonttbl",
|
|
@@ -30194,7 +30360,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
30194
30360
|
}, "htmlText");
|
|
30195
30361
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
30196
30362
|
|
|
30197
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
30198
30364
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
30199
30365
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
30200
30366
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -30250,7 +30416,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
30250
30416
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
30251
30417
|
}, "markdownSections");
|
|
30252
30418
|
|
|
30253
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30419
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
30254
30420
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
30255
30421
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
30256
30422
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -30321,7 +30487,7 @@ var html = {
|
|
|
30321
30487
|
}, "read")
|
|
30322
30488
|
};
|
|
30323
30489
|
|
|
30324
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30490
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
30325
30491
|
var office = {
|
|
30326
30492
|
id: "office",
|
|
30327
30493
|
version: documentExtractor("odt"),
|
|
@@ -30332,7 +30498,7 @@ var office = {
|
|
|
30332
30498
|
}, "read")
|
|
30333
30499
|
};
|
|
30334
30500
|
|
|
30335
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30501
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
30336
30502
|
var pdf = {
|
|
30337
30503
|
id: "pdf",
|
|
30338
30504
|
version: "unpdf",
|
|
@@ -30399,7 +30565,7 @@ var pdf = {
|
|
|
30399
30565
|
}), "read")
|
|
30400
30566
|
};
|
|
30401
30567
|
|
|
30402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30568
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
30403
30569
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
30404
30570
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
30405
30571
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -30419,7 +30585,7 @@ var plain = {
|
|
|
30419
30585
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
30420
30586
|
};
|
|
30421
30587
|
|
|
30422
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30588
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
30423
30589
|
var rtf = {
|
|
30424
30590
|
id: "rtf",
|
|
30425
30591
|
version: "v1",
|
|
@@ -30427,10 +30593,10 @@ var rtf = {
|
|
|
30427
30593
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
30428
30594
|
};
|
|
30429
30595
|
|
|
30430
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30596
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30431
30597
|
import { basename as basename5 } from "node:path";
|
|
30432
30598
|
|
|
30433
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30599
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
30434
30600
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
30435
30601
|
const cells = [];
|
|
30436
30602
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -30468,7 +30634,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
30468
30634
|
return { cells, truncated };
|
|
30469
30635
|
}, "delimitedSpans");
|
|
30470
30636
|
|
|
30471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30637
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
30472
30638
|
var DELIMITED = {
|
|
30473
30639
|
".csv": ",",
|
|
30474
30640
|
".tsv": " ",
|
|
@@ -30507,7 +30673,7 @@ var sheets = {
|
|
|
30507
30673
|
}, "read")
|
|
30508
30674
|
};
|
|
30509
30675
|
|
|
30510
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
30511
30677
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
30512
30678
|
var HEAD_BYTES = 1024;
|
|
30513
30679
|
var readers = [...BUILT_INS2];
|
|
@@ -30517,7 +30683,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
30517
30683
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
30518
30684
|
}, "readWithRegistry");
|
|
30519
30685
|
|
|
30520
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30686
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
30521
30687
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
30522
30688
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
30523
30689
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -31596,7 +31762,7 @@ function imageSize(input) {
|
|
|
31596
31762
|
}
|
|
31597
31763
|
__name(imageSize, "imageSize");
|
|
31598
31764
|
|
|
31599
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
31600
31766
|
var MAX_PAGES = 20;
|
|
31601
31767
|
var MAX_PIXELS = 2e7;
|
|
31602
31768
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -31747,7 +31913,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
31747
31913
|
}
|
|
31748
31914
|
}, "ocrPdf");
|
|
31749
31915
|
|
|
31750
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31916
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
31751
31917
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
31752
31918
|
const limits = pdfPreviewLimits(env);
|
|
31753
31919
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -31824,7 +31990,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
31824
31990
|
}
|
|
31825
31991
|
}, "pdfPreview");
|
|
31826
31992
|
|
|
31827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31993
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
31828
31994
|
import { createHash as createHash8 } from "node:crypto";
|
|
31829
31995
|
import { constants } from "node:fs";
|
|
31830
31996
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -31932,7 +32098,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
31932
32098
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
31933
32099
|
}, "transferMime");
|
|
31934
32100
|
|
|
31935
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32101
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
31936
32102
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
31937
32103
|
import { link as link3, rm } from "node:fs/promises";
|
|
31938
32104
|
import { join as join10, resolve as resolve6 } from "node:path";
|
|
@@ -32046,7 +32212,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
32046
32212
|
}
|
|
32047
32213
|
}, "save");
|
|
32048
32214
|
|
|
32049
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
32050
32216
|
var ATTACHMENT_QUERY = {
|
|
32051
32217
|
entity: "attachment",
|
|
32052
32218
|
backend: "sql",
|
|
@@ -32152,7 +32318,7 @@ var itemOf2 = /* @__PURE__ */ __name((account, view) => ({
|
|
|
32152
32318
|
},
|
|
32153
32319
|
...view.localPath === null ? {} : { local_path: view.localPath }
|
|
32154
32320
|
}), "itemOf");
|
|
32155
|
-
var
|
|
32321
|
+
var messageOf2 = /* @__PURE__ */ __name(async (deps, store, chat, message) => {
|
|
32156
32322
|
const { account } = store;
|
|
32157
32323
|
if (isLocator(chat)) {
|
|
32158
32324
|
if (message !== void 0)
|
|
@@ -32359,7 +32525,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32359
32525
|
throw new CliError("validation_error", "attachment must be a position from 1");
|
|
32360
32526
|
const store = await accountStore(deps);
|
|
32361
32527
|
const { account } = store;
|
|
32362
|
-
const { chatId, messageId } = await
|
|
32528
|
+
const { chatId, messageId } = await messageOf2(deps, store, chat, message);
|
|
32363
32529
|
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
32364
32530
|
const chosen = attachment2 === void 0 ? files.length === 1 ? files[0] : void 0 : files.find(({ position }) => position === attachment2 - 1);
|
|
32365
32531
|
if (!chosen)
|
|
@@ -32406,7 +32572,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32406
32572
|
throw new CliError("validation_error", "attachment must be a position from 1");
|
|
32407
32573
|
const store = await accountStore(deps);
|
|
32408
32574
|
const { account } = store;
|
|
32409
|
-
const { chatId, messageId } = await
|
|
32575
|
+
const { chatId, messageId } = await messageOf2(deps, store, chat, message);
|
|
32410
32576
|
const ref = formatLocator({ ...account, chat: chatId, message: messageId });
|
|
32411
32577
|
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
32412
32578
|
if (files.length === 0)
|
|
@@ -32450,7 +32616,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32450
32616
|
throw new CliError("validation_error", `the text is over ${MAX_TEXT_CHARS} characters \u2014 keep the part worth searching`);
|
|
32451
32617
|
const store = await accountStore(deps);
|
|
32452
32618
|
const { account } = store;
|
|
32453
|
-
const { chatId, messageId } = await
|
|
32619
|
+
const { chatId, messageId } = await messageOf2(deps, store, chat, message);
|
|
32454
32620
|
const files = (await store.attachments.attachments({ chatId, messageId, limit: 1e3 })).filter(({ kind }) => !NOT_FILES.has(kind));
|
|
32455
32621
|
if (files.length === 0)
|
|
32456
32622
|
throw new CliError("not_found", `the local store holds no message ${messageId} with a file in chat ${chatId}`);
|
|
@@ -32469,7 +32635,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32469
32635
|
}, "setText")
|
|
32470
32636
|
}), "attachmentsService");
|
|
32471
32637
|
|
|
32472
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
32473
32639
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
32474
32640
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
32475
32641
|
const store = await accountStore(deps);
|
|
@@ -32499,7 +32665,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
32499
32665
|
}, "list")
|
|
32500
32666
|
}), "chatDocumentsService");
|
|
32501
32667
|
|
|
32502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
32503
32669
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
32504
32670
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
32505
32671
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -32586,7 +32752,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
32586
32752
|
}
|
|
32587
32753
|
}, "isRetentionSelection");
|
|
32588
32754
|
|
|
32589
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32755
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
32590
32756
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
32591
32757
|
const fields = text2.split(",").map((one2) => one2.trim());
|
|
32592
32758
|
if (!fields.length || fields.some((one2) => !COUNTER_FIELDS.includes(one2)) || new Set(fields).size !== fields.length)
|
|
@@ -32793,7 +32959,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32793
32959
|
};
|
|
32794
32960
|
}, "countersService");
|
|
32795
32961
|
|
|
32796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32962
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
32797
32963
|
var SYNC_KEY = "messages.sync-first";
|
|
32798
32964
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
32799
32965
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -32925,7 +33091,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
32925
33091
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
32926
33092
|
}), "withRefresh");
|
|
32927
33093
|
|
|
32928
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33094
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
32929
33095
|
var CANDIDATES = 50;
|
|
32930
33096
|
var WORD_HITS = 200;
|
|
32931
33097
|
var RRF_K = 60;
|
|
@@ -33200,13 +33366,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
33200
33366
|
return mean2.map((value) => value / length);
|
|
33201
33367
|
}, "meanOf");
|
|
33202
33368
|
|
|
33203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
33204
33370
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
33205
33371
|
...embeddingsMaintenance(deps),
|
|
33206
33372
|
...embeddingsSearch(deps)
|
|
33207
33373
|
}), "embeddingsService");
|
|
33208
33374
|
|
|
33209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33375
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
33210
33376
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
33211
33377
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
33212
33378
|
if (deps.offline)
|
|
@@ -33259,7 +33425,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33259
33425
|
const known2 = /* @__PURE__ */ new Map();
|
|
33260
33426
|
for (const one2 of held ? (await held.store.chats.chats(held.account, {})).items : [])
|
|
33261
33427
|
known2.set(one2.id, { id: one2.id, title: one2.title, kind: one2.kind });
|
|
33262
|
-
const
|
|
33428
|
+
const named3 = /* @__PURE__ */ __name(async (ids2) => {
|
|
33263
33429
|
const chats = [];
|
|
33264
33430
|
for (const id2 of ids2) {
|
|
33265
33431
|
let found = known2.get(id2);
|
|
@@ -33277,9 +33443,9 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33277
33443
|
}, "named");
|
|
33278
33444
|
return {
|
|
33279
33445
|
...folder,
|
|
33280
|
-
chats: await
|
|
33281
|
-
pinned: await
|
|
33282
|
-
excluded: await
|
|
33446
|
+
chats: await named3(chatIds),
|
|
33447
|
+
pinned: await named3(pinnedChatIds),
|
|
33448
|
+
excluded: await named3(excludedChatIds)
|
|
33283
33449
|
};
|
|
33284
33450
|
}, "show"),
|
|
33285
33451
|
create: /* @__PURE__ */ __name(async (title, chats, edit = {}) => {
|
|
@@ -33322,15 +33488,15 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33322
33488
|
throw new CliError("validation_error", "name the folders in the order you want them");
|
|
33323
33489
|
const connection = await online("chats folders order");
|
|
33324
33490
|
const reorder = capability(connection, "orderFolders", "order folders");
|
|
33325
|
-
const
|
|
33491
|
+
const named3 = [];
|
|
33326
33492
|
for (const one2 of typed) {
|
|
33327
33493
|
const folder = await folderOf(connection, one2);
|
|
33328
|
-
if (
|
|
33494
|
+
if (named3.some((seen) => seen.id === folder.id))
|
|
33329
33495
|
throw new CliError("validation_error", `"${one2}" is named twice`);
|
|
33330
|
-
|
|
33496
|
+
named3.push(folder);
|
|
33331
33497
|
}
|
|
33332
33498
|
const all = await capability(connection, "folders", "list its folders")();
|
|
33333
|
-
const folders = [...
|
|
33499
|
+
const folders = [...named3, ...all.filter((one2) => !named3.some((seen) => seen.id === one2.id))];
|
|
33334
33500
|
const operationId = newOperationId();
|
|
33335
33501
|
await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: "folder-order" }, () => reorder(folders.map((one2) => one2.id)));
|
|
33336
33502
|
return { operationId, folders: folders.map(({ id: id2, title }) => ({ id: id2, title })) };
|
|
@@ -33347,7 +33513,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
33347
33513
|
};
|
|
33348
33514
|
}, "foldersService");
|
|
33349
33515
|
|
|
33350
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
33351
33517
|
var REVIEW_COUNT = 500;
|
|
33352
33518
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
33353
33519
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -33426,7 +33592,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33426
33592
|
};
|
|
33427
33593
|
}, "mentionsService");
|
|
33428
33594
|
|
|
33429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33595
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
33430
33596
|
var invalid3 = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
33431
33597
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
33432
33598
|
const { text: text2, spans } = formatted2;
|
|
@@ -33486,7 +33652,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
33486
33652
|
};
|
|
33487
33653
|
}, "visibleFormattedText");
|
|
33488
33654
|
|
|
33489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33655
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
33490
33656
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
33491
33657
|
position,
|
|
33492
33658
|
kind,
|
|
@@ -33495,18 +33661,18 @@ var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).ma
|
|
|
33495
33661
|
reason: "unsupported_provider"
|
|
33496
33662
|
})), "fileLinks");
|
|
33497
33663
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
33498
|
-
const
|
|
33499
|
-
if (
|
|
33664
|
+
const named3 = chatReferenceOf(reference, provider, "message");
|
|
33665
|
+
if (named3?.message !== void 0) {
|
|
33500
33666
|
if (message !== void 0)
|
|
33501
33667
|
throw new CliError("validation_error", "a locator already names the message");
|
|
33502
|
-
validMessageId(
|
|
33503
|
-
return { chat:
|
|
33668
|
+
validMessageId(named3.message);
|
|
33669
|
+
return { chat: named3.chat, message: named3.message, account: named3.account, text: named3.text };
|
|
33504
33670
|
}
|
|
33505
33671
|
if (message === void 0)
|
|
33506
33672
|
throw new CliError("validation_error", "which message? give its id after the chat");
|
|
33507
33673
|
validMessageId(message);
|
|
33508
|
-
if (
|
|
33509
|
-
return { chat:
|
|
33674
|
+
if (named3)
|
|
33675
|
+
return { chat: named3.chat, message, account: named3.account, text: named3.text };
|
|
33510
33676
|
if (!reference.trim())
|
|
33511
33677
|
throw new CliError("validation_error", "which chat? give its id or title");
|
|
33512
33678
|
return { chat: reference, message, account: void 0, text: reference };
|
|
@@ -33535,7 +33701,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
33535
33701
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
33536
33702
|
}, "validatePermalink");
|
|
33537
33703
|
|
|
33538
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33704
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
33539
33705
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
33540
33706
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
33541
33707
|
return `${seconds / 86400}d`;
|
|
@@ -33567,7 +33733,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
33567
33733
|
return seconds;
|
|
33568
33734
|
}, "pinDurationOf");
|
|
33569
33735
|
|
|
33570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
33571
33737
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
33572
33738
|
if (sendAs === void 0) {
|
|
33573
33739
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -33592,7 +33758,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
33592
33758
|
return sendAs;
|
|
33593
33759
|
}, "typedSendAs");
|
|
33594
33760
|
|
|
33595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33761
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
33596
33762
|
var TOTAL_CAP = 1e4;
|
|
33597
33763
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
33598
33764
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -33603,7 +33769,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
33603
33769
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
33604
33770
|
}, "totalOf");
|
|
33605
33771
|
|
|
33606
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
33607
33773
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
33608
33774
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
33609
33775
|
let narrows = false;
|
|
@@ -33632,7 +33798,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
33632
33798
|
return wanted(root).join(" ").trim();
|
|
33633
33799
|
}, "meaningWords");
|
|
33634
33800
|
|
|
33635
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
33636
33802
|
var words3 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
33637
33803
|
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"));
|
|
33638
33804
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -33764,7 +33930,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
33764
33930
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
33765
33931
|
}, "questionLookup");
|
|
33766
33932
|
|
|
33767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33933
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
33768
33934
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
33769
33935
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
33770
33936
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -33957,7 +34123,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
33957
34123
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
33958
34124
|
}, "signals");
|
|
33959
34125
|
|
|
33960
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34126
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
33961
34127
|
var MEANING_DEPTH = 100;
|
|
33962
34128
|
var RRF_K2 = 60;
|
|
33963
34129
|
var RERANK_DEPTH = 50;
|
|
@@ -34282,7 +34448,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
34282
34448
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
34283
34449
|
}, "mixedWithReranker");
|
|
34284
34450
|
|
|
34285
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34451
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
34286
34452
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
34287
34453
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
34288
34454
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -34481,7 +34647,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
34481
34647
|
return result;
|
|
34482
34648
|
}, "readThreadContext");
|
|
34483
34649
|
|
|
34484
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
34485
34651
|
var SEARCH_FILL_MS = 200;
|
|
34486
34652
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
34487
34653
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -34548,12 +34714,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
34548
34714
|
}, "accountOf");
|
|
34549
34715
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
34550
34716
|
|
|
34551
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34552
34718
|
import { createHash as createHash10 } from "node:crypto";
|
|
34553
34719
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
34554
34720
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
34555
34721
|
|
|
34556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34722
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
34557
34723
|
var GROUP_SETTINGS = [
|
|
34558
34724
|
"allCanPin",
|
|
34559
34725
|
"onlyAdminsAdd",
|
|
@@ -34567,7 +34733,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
34567
34733
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
34568
34734
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
34569
34735
|
|
|
34570
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
34571
34737
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
34572
34738
|
var PICTURE_FLOOR = 0.25;
|
|
34573
34739
|
var PAGE4 = 50;
|
|
@@ -34584,7 +34750,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34584
34750
|
const directory2 = imageModelsDirectory(deps.env);
|
|
34585
34751
|
if (!isImageModelInstalled(model2, directory2))
|
|
34586
34752
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
34587
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
34753
|
+
const { openPictureEmbedder } = await import("./embedder-GACNPCZN.js");
|
|
34588
34754
|
return openPictureEmbedder(model2, directory2);
|
|
34589
34755
|
}, "open");
|
|
34590
34756
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -34595,7 +34761,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34595
34761
|
return opened;
|
|
34596
34762
|
}, "embedder");
|
|
34597
34763
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
34598
|
-
const
|
|
34764
|
+
const bytesOf3 = /* @__PURE__ */ __name(async (picture, files, read2) => {
|
|
34599
34765
|
if (picture.localPath) {
|
|
34600
34766
|
try {
|
|
34601
34767
|
if ((await stat3(picture.localPath)).size <= PICTURE_MAX_BYTES)
|
|
@@ -34668,7 +34834,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
34668
34834
|
return downloaded.files;
|
|
34669
34835
|
}, "files");
|
|
34670
34836
|
try {
|
|
34671
|
-
const bytes2 = await
|
|
34837
|
+
const bytes2 = await bytesOf3(picture, files, async (file2) => {
|
|
34672
34838
|
const refreshed = refreshedFiles([file2]);
|
|
34673
34839
|
if (refreshed.length === 0)
|
|
34674
34840
|
return;
|
|
@@ -34781,7 +34947,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
34781
34947
|
}, "search")
|
|
34782
34948
|
}), "withPictures");
|
|
34783
34949
|
|
|
34784
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
34785
34951
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
34786
34952
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
34787
34953
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -34849,7 +35015,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
34849
35015
|
}
|
|
34850
35016
|
}, "meaningLane");
|
|
34851
35017
|
|
|
34852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35018
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
34853
35019
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
34854
35020
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
34855
35021
|
if (choice === "off")
|
|
@@ -34861,9 +35027,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34861
35027
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
34862
35028
|
try {
|
|
34863
35029
|
const warm = deps.embedders;
|
|
34864
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
35030
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-OGYYVVLG.js")).openRerankerProcess(model, directory2, {
|
|
34865
35031
|
threads: defaultThreads()
|
|
34866
|
-
})) : await (await import("./rerank-
|
|
35032
|
+
})) : await (await import("./rerank-FUNVBYFI.js")).openReranker(model, directory2);
|
|
34867
35033
|
return {
|
|
34868
35034
|
model: model.id,
|
|
34869
35035
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -34883,22 +35049,22 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
34883
35049
|
};
|
|
34884
35050
|
}, "rerankLane");
|
|
34885
35051
|
|
|
34886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35052
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
34887
35053
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
34888
35054
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
34889
35055
|
const directory2 = imageModelsDirectory(env);
|
|
34890
35056
|
if (!isImageModelInstalled(model, directory2))
|
|
34891
35057
|
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 });
|
|
34892
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
35058
|
+
const { openPictureEmbedder } = await import("./embedder-GACNPCZN.js");
|
|
34893
35059
|
return openPictureEmbedder(model, directory2);
|
|
34894
35060
|
}, "openPictureEmbedderFor");
|
|
34895
35061
|
|
|
34896
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35062
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
34897
35063
|
var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) => {
|
|
34898
35064
|
const metadata = note2.frontMatter;
|
|
34899
35065
|
const account = accounts.find(({ id: id2 }) => String(id2) === note2.folderId);
|
|
34900
35066
|
const remote = note2.source === "file" && (account !== void 0 && kindIn(account.provider) === "documents" || metadata?.source === "google-drive");
|
|
34901
|
-
const profile = remote && account ? Object.entries(profiles).flatMap(([command,
|
|
35067
|
+
const profile = remote && account ? Object.entries(profiles).flatMap(([command, named3]) => Object.entries(named3).map(([name, key]) => ({ command, name, key }))).find(({ key }) => key.provider === account.provider && key.account === account.account || isFolderProvider(key.provider) && key.account === account.name) : void 0;
|
|
34902
35068
|
const url = file2?.url ?? (remote && typeof metadata?.sourceUrl === "string" ? metadata.sourceUrl : void 0);
|
|
34903
35069
|
return {
|
|
34904
35070
|
kind: remote ? "document" : "note",
|
|
@@ -34908,7 +35074,7 @@ var documentSource = /* @__PURE__ */ __name((note2, accounts, profiles, file2) =
|
|
|
34908
35074
|
};
|
|
34909
35075
|
}, "documentSource");
|
|
34910
35076
|
|
|
34911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
34912
35078
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
34913
35079
|
let root;
|
|
34914
35080
|
try {
|
|
@@ -34935,7 +35101,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words4) => {
|
|
|
34935
35101
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
34936
35102
|
}, "titleTiers");
|
|
34937
35103
|
|
|
34938
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35104
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
34939
35105
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
34940
35106
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
34941
35107
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -35360,9 +35526,9 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35360
35526
|
...(await store.notes.folders()).map(({ id: id2 }) => ({ provider: "notes", account: id2 })),
|
|
35361
35527
|
...(await store.notes.documentsAccounts()).map(({ id: id2 }) => ({ provider: "notes", account: id2 }))
|
|
35362
35528
|
];
|
|
35363
|
-
const
|
|
35529
|
+
const named3 = list3 === void 0 ? { accounts: held, skipped: [] } : fitting(entriesOfList(list3, await listContextOf(store, account, app)), ["notes", "documents"], what);
|
|
35364
35530
|
const source = query.source ?? noteSourceOfQuery(text2).source;
|
|
35365
|
-
const typed =
|
|
35531
|
+
const typed = named3.accounts.filter(({ account: account2 }) => source === void 0 || account2 === INTERNAL_NOTES === (source === "internal"));
|
|
35366
35532
|
if (!typed.length && list3 !== void 0)
|
|
35367
35533
|
throw new CliError("validation_error", source === "internal" ? "the query's source:internal keeps the notes written in memo, and the --source list names none of them: add notes:internal to --source, or drop source:internal from the query" : "the query's source:file keeps the files from notes folders, and the --source list names none of them: add notes:<folder id> to --source, or drop source:file from the query");
|
|
35368
35534
|
const scope = list3 === void 0 ? {} : notesScopeOf(typed);
|
|
@@ -35374,11 +35540,11 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
35374
35540
|
return {
|
|
35375
35541
|
...found,
|
|
35376
35542
|
accounts: typed.map(({ account: account2 }) => ({ resource: "notes", provider: "notes", account: account2 })),
|
|
35377
|
-
skipped:
|
|
35543
|
+
skipped: named3.skipped
|
|
35378
35544
|
};
|
|
35379
35545
|
}, "searchNotesOf");
|
|
35380
35546
|
|
|
35381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35547
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
35382
35548
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
35383
35549
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
35384
35550
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -35495,7 +35661,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
35495
35661
|
};
|
|
35496
35662
|
}, "searchEvents");
|
|
35497
35663
|
|
|
35498
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35664
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
35499
35665
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
35500
35666
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
35501
35667
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
@@ -35756,7 +35922,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
35756
35922
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
35757
35923
|
}, "oneList");
|
|
35758
35924
|
|
|
35759
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35925
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
35760
35926
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
35761
35927
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
35762
35928
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -35965,44 +36131,44 @@ var searchAllWithMeetings = /* @__PURE__ */ __name(async (store, account, reques
|
|
|
35965
36131
|
skipped: [...found.skipped, { resource: "meetings", code: "validation_error", reason: MEETINGS_UNNAMED }]
|
|
35966
36132
|
} : found;
|
|
35967
36133
|
}, "searchAllWithMeetings");
|
|
35968
|
-
var holdingMeetings = /* @__PURE__ */ __name(async (store,
|
|
35969
|
-
if (
|
|
35970
|
-
return
|
|
36134
|
+
var holdingMeetings = /* @__PURE__ */ __name(async (store, named3) => {
|
|
36135
|
+
if (named3.length < 2)
|
|
36136
|
+
return named3;
|
|
35971
36137
|
const holding2 = [];
|
|
35972
|
-
for (const key of
|
|
36138
|
+
for (const key of named3) {
|
|
35973
36139
|
const { id: id2 } = await store.accounts.storedAccount(key);
|
|
35974
36140
|
if ((await store.meetings.meetings({ accountId: id2, limit: 1 })).length)
|
|
35975
36141
|
holding2.push(key);
|
|
35976
36142
|
}
|
|
35977
|
-
return holding2.length ? holding2 :
|
|
36143
|
+
return holding2.length ? holding2 : named3;
|
|
35978
36144
|
}, "holdingMeetings");
|
|
35979
36145
|
var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, request, messenger, searchMessages, meaning) => {
|
|
35980
36146
|
const only = request.only ?? RESOURCES_SEARCHED_WITH_MEETINGS;
|
|
35981
36147
|
const entries = entriesOfList(source, await listContextOf(store, account, messenger.app));
|
|
35982
36148
|
const { skipped } = fitting(entries, only, "search all", (kind) => `--only leaves ${kind} out`);
|
|
35983
|
-
const
|
|
36149
|
+
const named3 = /* @__PURE__ */ __name((resource) => [
|
|
35984
36150
|
...new Map(entries.flatMap(({ accounts }) => accounts).filter(({ kind }) => kind === resource).map(({ provider, account: account2 }) => [`${provider}\0${account2}`, { provider, account: account2 }])).values()
|
|
35985
36151
|
], "named");
|
|
35986
|
-
const meetings = await holdingMeetings(store,
|
|
35987
|
-
const empty2 =
|
|
36152
|
+
const meetings = await holdingMeetings(store, named3("meetings"));
|
|
36153
|
+
const empty2 = named3("meetings").filter((one2) => !meetings.some(({ provider, account: account2 }) => provider === one2.provider && account2 === one2.account)).map(({ provider, account: account2 }) => ({
|
|
35988
36154
|
source: `${provider}:${account2}`,
|
|
35989
36155
|
code: "not_found",
|
|
35990
36156
|
reason: "no meetings stored for it"
|
|
35991
36157
|
}));
|
|
35992
36158
|
if (only.includes("meetings") && meetings.length > 1)
|
|
35993
36159
|
throw new CliError("validation_error", `--source names several meeting accounts; search all reads one: ${meetings.map(({ provider, account: account2 }) => `${provider}:${account2}`).join(", ")}`);
|
|
35994
|
-
const read2 = only.filter((resource) =>
|
|
36160
|
+
const read2 = only.filter((resource) => named3(resource).length > 0);
|
|
35995
36161
|
if (read2.includes("meetings") && request.offset !== void 0)
|
|
35996
36162
|
throw new CliError("validation_error", "--offset pages messages, mail and notes; not with a meeting account yet");
|
|
35997
36163
|
const found = await searchAllIncludingMeetings(store, account, {
|
|
35998
36164
|
...request,
|
|
35999
36165
|
only: read2,
|
|
36000
36166
|
scope: {
|
|
36001
|
-
messages:
|
|
36002
|
-
mail:
|
|
36003
|
-
notes:
|
|
36004
|
-
events:
|
|
36005
|
-
crm:
|
|
36167
|
+
messages: named3("messages"),
|
|
36168
|
+
mail: named3("mail"),
|
|
36169
|
+
notes: named3("notes"),
|
|
36170
|
+
events: named3("events"),
|
|
36171
|
+
crm: named3("crm")
|
|
36006
36172
|
},
|
|
36007
36173
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
36008
36174
|
}, messenger, searchMessages, meaning);
|
|
@@ -36010,7 +36176,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
36010
36176
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
36011
36177
|
}, "searchAllOfSource");
|
|
36012
36178
|
|
|
36013
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36179
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
36014
36180
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
36015
36181
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
36016
36182
|
var DEFAULT_BACKEND = "both";
|
|
@@ -36199,7 +36365,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
36199
36365
|
return { report, sources };
|
|
36200
36366
|
}, "searchServer");
|
|
36201
36367
|
|
|
36202
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36368
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
36203
36369
|
var DELETE_AT_ONCE = 10;
|
|
36204
36370
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
36205
36371
|
const files = fileLinks(attachments);
|
|
@@ -36640,7 +36806,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
36640
36806
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
36641
36807
|
}, "checkMediaOptions");
|
|
36642
36808
|
|
|
36643
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36809
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
36644
36810
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
36645
36811
|
var RULES = {
|
|
36646
36812
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -36655,7 +36821,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
36655
36821
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
36656
36822
|
}), "classifyChannel");
|
|
36657
36823
|
|
|
36658
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36824
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
36659
36825
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
36660
36826
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
36661
36827
|
const store = await deps.store();
|
|
@@ -36741,7 +36907,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
36741
36907
|
};
|
|
36742
36908
|
}, "metadataService");
|
|
36743
36909
|
|
|
36744
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
36745
36911
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
36746
36912
|
var LINK2 = /https?:\/\/\S+/i;
|
|
36747
36913
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -36929,8 +37095,8 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
36929
37095
|
}, "nextPoint");
|
|
36930
37096
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
36931
37097
|
|
|
36932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36933
|
-
import { existsSync, readFileSync as readFileSync2 } from "node:fs";
|
|
37098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
37099
|
+
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
36934
37100
|
import { join as join11 } from "node:path";
|
|
36935
37101
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
36936
37102
|
var OLD_LEVELS = { forbid: "deny", flag: "ask", confirm: "ask", allow: "allow" };
|
|
@@ -37042,7 +37208,7 @@ var ModerationRules = class {
|
|
|
37042
37208
|
this.#write({ ...saved, checkedUntil: { ...saved.checkedUntil, [chatId]: at } });
|
|
37043
37209
|
}
|
|
37044
37210
|
#file() {
|
|
37045
|
-
if (!
|
|
37211
|
+
if (!existsSync2(this.path))
|
|
37046
37212
|
return { groups: {} };
|
|
37047
37213
|
let parsed;
|
|
37048
37214
|
try {
|
|
@@ -37072,7 +37238,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
37072
37238
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
37073
37239
|
}, "assign");
|
|
37074
37240
|
|
|
37075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37241
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
37076
37242
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
37077
37243
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
37078
37244
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -37109,7 +37275,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
37109
37275
|
return { chatId, rows, notes };
|
|
37110
37276
|
}, "moderateWith");
|
|
37111
37277
|
|
|
37112
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
37113
37279
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
37114
37280
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
37115
37281
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -37187,7 +37353,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
37187
37353
|
}, "removePerson")
|
|
37188
37354
|
}), "moderatorOf");
|
|
37189
37355
|
|
|
37190
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37356
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
37191
37357
|
var noteItem = /* @__PURE__ */ __name((provider, note2) => ({
|
|
37192
37358
|
id: note2.id,
|
|
37193
37359
|
contact: formatReference({ type: "contact", provider, id: note2.personId }),
|
|
@@ -37231,7 +37397,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
37231
37397
|
};
|
|
37232
37398
|
}, "privatePeopleService");
|
|
37233
37399
|
|
|
37234
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37400
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
37235
37401
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
37236
37402
|
total: 0,
|
|
37237
37403
|
population: 0,
|
|
@@ -37487,7 +37653,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
37487
37653
|
}, "evidence")
|
|
37488
37654
|
}), "rankingsService");
|
|
37489
37655
|
|
|
37490
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37656
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
37491
37657
|
var FIELDS = ["date", "chat", "kind"];
|
|
37492
37658
|
var WAITING_TAIL = 100;
|
|
37493
37659
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -37614,7 +37780,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37614
37780
|
};
|
|
37615
37781
|
}, "replyStatsService");
|
|
37616
37782
|
|
|
37617
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37783
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
37618
37784
|
var savedSearchItem = /* @__PURE__ */ __name((one2) => ({
|
|
37619
37785
|
id: one2.id,
|
|
37620
37786
|
name: one2.name,
|
|
@@ -37650,7 +37816,7 @@ var checked = /* @__PURE__ */ __name((params) => {
|
|
|
37650
37816
|
validateFields(parseLucene(params.text, { ...MESSAGE_PARSING, defaultField: params.exact ? "exact" : "text" }));
|
|
37651
37817
|
return params;
|
|
37652
37818
|
}, "checked");
|
|
37653
|
-
var
|
|
37819
|
+
var named2 = /* @__PURE__ */ __name((search, check2) => {
|
|
37654
37820
|
try {
|
|
37655
37821
|
check2();
|
|
37656
37822
|
} catch (error) {
|
|
@@ -37724,7 +37890,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37724
37890
|
...inherited,
|
|
37725
37891
|
...Object.fromEntries(Object.entries(typed).filter(([, one2]) => one2 !== void 0))
|
|
37726
37892
|
};
|
|
37727
|
-
|
|
37893
|
+
named2(search, () => {
|
|
37728
37894
|
if (search.language !== "lucene-v1")
|
|
37729
37895
|
throw new CliError("validation_error", "the legacy search and --regex are gone; save it again as Lucene");
|
|
37730
37896
|
checked(stored);
|
|
@@ -37743,7 +37909,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
37743
37909
|
};
|
|
37744
37910
|
}, "searchesService");
|
|
37745
37911
|
|
|
37746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37912
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
37747
37913
|
var TAGGING_QUERY = {
|
|
37748
37914
|
entity: "tagging",
|
|
37749
37915
|
backend: "sql",
|
|
@@ -37827,7 +37993,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
37827
37993
|
};
|
|
37828
37994
|
}, "tagsService");
|
|
37829
37995
|
|
|
37830
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
37996
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
37831
37997
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
37832
37998
|
const set = [closed, pinned, hidden].filter((one2) => one2 !== void 0).length;
|
|
37833
37999
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -38026,7 +38192,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
38026
38192
|
};
|
|
38027
38193
|
}, "topicsService");
|
|
38028
38194
|
|
|
38029
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
38030
38196
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
38031
38197
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
38032
38198
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -38100,7 +38266,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
38100
38266
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
38101
38267
|
}, "prepareEvidencePacket");
|
|
38102
38268
|
|
|
38103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
38104
38270
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
38105
38271
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
38106
38272
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -38120,7 +38286,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
38120
38286
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
38121
38287
|
}, "readEvidencePacket");
|
|
38122
38288
|
|
|
38123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38289
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-hit-search.js
|
|
38124
38290
|
var refreshMeetingIndex = /* @__PURE__ */ __name(async (meetings, accountId, signal) => {
|
|
38125
38291
|
let before2 = Number.POSITIVE_INFINITY;
|
|
38126
38292
|
for (; ; ) {
|
|
@@ -38182,7 +38348,7 @@ var searchMeetingHits = /* @__PURE__ */ __name(async (store, query, request, opt
|
|
|
38182
38348
|
return { ...result, selection };
|
|
38183
38349
|
}, "searchMeetingHits");
|
|
38184
38350
|
|
|
38185
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38351
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
38186
38352
|
import { createHash as createHash12 } from "node:crypto";
|
|
38187
38353
|
var scopeKeys = [
|
|
38188
38354
|
"accountId",
|
|
@@ -38317,7 +38483,7 @@ var readMeetingProjectDiscovery = /* @__PURE__ */ __name(async (ports, projectNa
|
|
|
38317
38483
|
};
|
|
38318
38484
|
}, "readMeetingProjectDiscovery");
|
|
38319
38485
|
|
|
38320
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38486
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-hit-context.js
|
|
38321
38487
|
import { createHash as createHash13 } from "node:crypto";
|
|
38322
38488
|
var contextCue = /* @__PURE__ */ __name((cue) => ({
|
|
38323
38489
|
ref: cue.reference,
|
|
@@ -38435,7 +38601,7 @@ var readMeetingHitContext = /* @__PURE__ */ __name(async (store, accountId, refe
|
|
|
38435
38601
|
return { ...packet, fingerprint: createHash13("sha256").update(JSON.stringify(packet)).digest("hex") };
|
|
38436
38602
|
}, "readMeetingHitContext");
|
|
38437
38603
|
|
|
38438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38604
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-passage-format.js
|
|
38439
38605
|
var visible = /* @__PURE__ */ __name((text2) => text2.replace(/[\p{Cc}\p{Cf}]/gu, (value) => value === "\n" || value === " " ? value : `\\u{${value.codePointAt(0)?.toString(16)}}`), "visible");
|
|
38440
38606
|
var markdown = /* @__PURE__ */ __name((text2) => visible(text2).replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replace(/[\\`*_[\]#|~]/g, "\\$&"), "markdown");
|
|
38441
38607
|
var timestamp = /* @__PURE__ */ __name((ms) => {
|
|
@@ -38511,7 +38677,7 @@ var readMeetingPassage = /* @__PURE__ */ __name(async (store, accountId, referen
|
|
|
38511
38677
|
return { packet, content };
|
|
38512
38678
|
}, "readMeetingPassage");
|
|
38513
38679
|
|
|
38514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
38515
38681
|
var communicationFields = {
|
|
38516
38682
|
sources: pipe(array(strictObject({
|
|
38517
38683
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -38543,7 +38709,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
38543
38709
|
return { ...input, after, before: before2 };
|
|
38544
38710
|
}, "communicationRequest");
|
|
38545
38711
|
|
|
38546
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
38547
38713
|
var MEETING_PREPARATION_LIMITS = {
|
|
38548
38714
|
meetings: { min: 1, max: 20, default: 5 },
|
|
38549
38715
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -38629,7 +38795,7 @@ var preparationRequest = /* @__PURE__ */ __name((accountId, externalId, original
|
|
|
38629
38795
|
return { ...input, history };
|
|
38630
38796
|
}, "preparationRequest");
|
|
38631
38797
|
|
|
38632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38798
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-communications-preparation.js
|
|
38633
38799
|
var readPreparationCommunications = /* @__PURE__ */ __name(async (plan, signal) => {
|
|
38634
38800
|
const section = {
|
|
38635
38801
|
readUsage: plan.reader.usage(),
|
|
@@ -38734,7 +38900,7 @@ var appendPreparationCommunications = /* @__PURE__ */ __name((result, read2) =>
|
|
|
38734
38900
|
result.knowledge.coverage.otherSources = "see-communications";
|
|
38735
38901
|
}, "appendPreparationCommunications");
|
|
38736
38902
|
|
|
38737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38903
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
38738
38904
|
var captureCommunicationSelections = /* @__PURE__ */ __name((port) => {
|
|
38739
38905
|
if (port === void 0)
|
|
38740
38906
|
return void 0;
|
|
@@ -38839,7 +39005,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
38839
39005
|
}
|
|
38840
39006
|
}, "validatePreparationCommunications");
|
|
38841
39007
|
|
|
38842
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-knowledge-preparation.js
|
|
38843
39009
|
var invalid5 = /* @__PURE__ */ __name(() => {
|
|
38844
39010
|
throw new CliError("invalid_response", "Preparation knowledge returned an invalid selection");
|
|
38845
39011
|
}, "invalid");
|
|
@@ -38908,7 +39074,7 @@ var appendKnowledgePreparation = /* @__PURE__ */ __name(async (store, result, in
|
|
|
38908
39074
|
}
|
|
38909
39075
|
}, "appendKnowledgePreparation");
|
|
38910
39076
|
|
|
38911
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39077
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-notes-preparation.js
|
|
38912
39078
|
var invalid6 = /* @__PURE__ */ __name(() => {
|
|
38913
39079
|
throw new CliError("invalid_response", "Preparation notes returned an invalid selection");
|
|
38914
39080
|
}, "invalid");
|
|
@@ -38982,7 +39148,7 @@ var appendNotesPreparation = /* @__PURE__ */ __name(async (store, result, input)
|
|
|
38982
39148
|
}
|
|
38983
39149
|
}, "appendNotesPreparation");
|
|
38984
39150
|
|
|
38985
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39151
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-project-preparation.js
|
|
38986
39152
|
var PAGE_LIMIT = 4;
|
|
38987
39153
|
var size2 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
38988
39154
|
var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, input) => {
|
|
@@ -39032,7 +39198,7 @@ var appendProjectPreparation = /* @__PURE__ */ __name(async (ports, result, inpu
|
|
|
39032
39198
|
}
|
|
39033
39199
|
}, "appendProjectPreparation");
|
|
39034
39200
|
|
|
39035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39201
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-related-preparation.js
|
|
39036
39202
|
var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, input) => {
|
|
39037
39203
|
if (!result.series || !result.items.length || result.coverage.outputLimited)
|
|
39038
39204
|
return;
|
|
@@ -39104,7 +39270,7 @@ var appendRelatedPreparation = /* @__PURE__ */ __name(async (store, result, inpu
|
|
|
39104
39270
|
}
|
|
39105
39271
|
}, "appendRelatedPreparation");
|
|
39106
39272
|
|
|
39107
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39273
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/meeting-preparation.js
|
|
39108
39274
|
var size3 = /* @__PURE__ */ __name((value) => Buffer.byteLength(JSON.stringify(value), "utf8"), "size");
|
|
39109
39275
|
var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId, ports) => {
|
|
39110
39276
|
const fixed = snapshotMeetingScope(scope);
|
|
@@ -39242,7 +39408,7 @@ var createMeetingPreparationService = /* @__PURE__ */ __name((scope, accountId,
|
|
|
39242
39408
|
};
|
|
39243
39409
|
}, "createMeetingPreparationService");
|
|
39244
39410
|
|
|
39245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
39246
39412
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
39247
39413
|
const installer = ports.installer();
|
|
39248
39414
|
const argv = updateCommand(installer, packageName);
|
|
@@ -39307,7 +39473,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
39307
39473
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
39308
39474
|
}, "dayAfter");
|
|
39309
39475
|
|
|
39310
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39476
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
39311
39477
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
39312
39478
|
const pictures = picturesService(deps);
|
|
39313
39479
|
const base = {
|
|
@@ -39344,7 +39510,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
39344
39510
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
39345
39511
|
}, "servicesFor");
|
|
39346
39512
|
|
|
39347
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39513
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
39348
39514
|
import { createHash as createHash14 } from "node:crypto";
|
|
39349
39515
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
39350
39516
|
import { createConnection, createServer } from "node:net";
|
|
@@ -39492,7 +39658,7 @@ var serve = /* @__PURE__ */ __name(async (socket, request, stdin, signal, run) =
|
|
|
39492
39658
|
}
|
|
39493
39659
|
}, "serve");
|
|
39494
39660
|
|
|
39495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39661
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.599.0_@wirecat+cli-base@0.78.0_commander@15.0.0_esbuild@0.28.2_type_9abdd607bcc42461f37eac6c77838a67/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
39496
39662
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
39497
39663
|
close: /* @__PURE__ */ __name(async () => {
|
|
39498
39664
|
}, "close"),
|
|
@@ -39580,6 +39746,10 @@ var serveRelay = /* @__PURE__ */ __name((command, messenger) => {
|
|
|
39580
39746
|
export {
|
|
39581
39747
|
RULES_VERSION,
|
|
39582
39748
|
syncsOneChat,
|
|
39749
|
+
explainDamage,
|
|
39750
|
+
QUICK_HEALTH_CHECKS,
|
|
39751
|
+
fts5Tables,
|
|
39752
|
+
storeHealth,
|
|
39583
39753
|
throughWrapper,
|
|
39584
39754
|
capability,
|
|
39585
39755
|
withTimeLimit,
|