@wirecat/tg-cli 0.116.0 → 0.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/tg.js +2 -2
- package/dist/bot/transport.d.ts +1 -1
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +42 -30
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-6CLMTQOV.js → adapter-VNQ72MBK.js} +70 -61
- package/dist/bundle/{all-profiles-R2UZMH24.js → all-profiles-3W2UQTCK.js} +10 -10
- package/dist/bundle/{anthropic-QKIPHV2Z.js → anthropic-DFUW2KTG.js} +6 -6
- package/dist/bundle/{app-server-AZB2MFK6.js → app-server-5XJIMLHB.js} +49 -46
- package/dist/bundle/{bot-api-2IM243J4.js → bot-api-HRRBF3W6.js} +49 -49
- package/dist/bundle/{bot-history-G6CRVCL2.js → bot-history-GBH5XE4N.js} +18 -18
- package/dist/bundle/{bun-JDKPISPX.js → bun-ZMOYGG6F.js} +2 -2
- package/dist/bundle/{bun-sqlite-X5PY5IQT.js → bun-sqlite-6FZFMA7K.js} +5 -5
- package/dist/bundle/{chunk-577MFPCP.js → chunk-2452HCIV.js} +3 -3
- package/dist/bundle/{chunk-H72UEHNG.js → chunk-2XLKZL6K.js} +34 -28
- package/dist/bundle/{chunk-RSDIPQXP.js → chunk-3GRX7WP6.js} +2 -2
- package/dist/bundle/{chunk-PPLFOIYX.js → chunk-3MQOLYAN.js} +4 -4
- package/dist/bundle/{chunk-JFTCOV37.js → chunk-3RJYLN5V.js} +73 -21
- package/dist/bundle/{chunk-BGMV66FC.js → chunk-4JDGN6OD.js} +1 -1
- package/dist/bundle/{chunk-MQ7MCVZV.js → chunk-56Q5JV3Z.js} +2 -2
- package/dist/bundle/{chunk-4IQZRW4O.js → chunk-66FZBLRJ.js} +13 -13
- package/dist/bundle/{chunk-QHBVGKC3.js → chunk-6GFUL4OU.js} +206 -81
- package/dist/bundle/{chunk-5FCONCJO.js → chunk-6HRN7BW6.js} +1 -1
- package/dist/bundle/{chunk-I6JF43YP.js → chunk-7NBUT62O.js} +3 -3
- package/dist/bundle/{chunk-VQPLHOVQ.js → chunk-7Y3RUEVY.js} +6 -6
- package/dist/bundle/chunk-AG6HWPQP.js +64 -0
- package/dist/bundle/{chunk-HK6SIIGG.js → chunk-AUBRELCM.js} +3 -3
- package/dist/bundle/{chunk-4D5AUWAY.js → chunk-B2YPB5AE.js} +43 -25
- package/dist/bundle/{chunk-EB2IULWB.js → chunk-BXTDAGM4.js} +2 -2
- package/dist/bundle/{chunk-QGL2UGML.js → chunk-C6TUVV7E.js} +466 -224
- package/dist/bundle/{chunk-42GK3XRS.js → chunk-EA2PGDER.js} +2 -2
- package/dist/bundle/{chunk-N6TIFJHW.js → chunk-EL6I4WTB.js} +1 -1
- package/dist/bundle/{chunk-76CX2YPT.js → chunk-EPCFXKTX.js} +8 -8
- package/dist/bundle/{chunk-Y6VWGJ4Q.js → chunk-EZTYJ43A.js} +4 -2
- package/dist/bundle/{chunk-T7CDLV33.js → chunk-F6KBVIJP.js} +4 -4
- package/dist/bundle/{chunk-PXMHBTK3.js → chunk-FAHHERJ7.js} +4 -4
- package/dist/bundle/{chunk-DP5LRU7K.js → chunk-FEKXHILZ.js} +1 -1
- package/dist/bundle/chunk-G7B5UIE7.js +182 -0
- package/dist/bundle/{chunk-YLRTLZF6.js → chunk-GFHNQBD2.js} +1 -1
- package/dist/bundle/{chunk-SD5PUYKF.js → chunk-HORGORHK.js} +12 -12
- package/dist/bundle/{chunk-N42VUNTO.js → chunk-HWYSRB64.js} +2 -2
- package/dist/bundle/{chunk-5VFPUOJO.js → chunk-HZZGOLGP.js} +11 -11
- package/dist/bundle/{chunk-B4UOCWM4.js → chunk-JWIUK3SK.js} +2 -2
- package/dist/bundle/{chunk-NL3PAFAE.js → chunk-KVTLT4V7.js} +6 -6
- package/dist/bundle/{chunk-KA6EGOJY.js → chunk-L5WNE4WS.js} +2 -2
- package/dist/bundle/{chunk-PPSUA3IZ.js → chunk-M7V5XRM6.js} +3 -3
- package/dist/bundle/{chunk-XQUTJITP.js → chunk-MLHKQDUN.js} +647 -129
- package/dist/bundle/{chunk-RSNGMNU5.js → chunk-MP7M6FFU.js} +6 -6
- package/dist/bundle/{chunk-5ZIBAYIZ.js → chunk-NUCDEOFC.js} +2 -2
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-QAKL3GXB.js → chunk-PTIB7NEE.js} +1 -1
- package/dist/bundle/{chunk-TZVL4U7U.js → chunk-Q7O4CQDO.js} +4 -2
- package/dist/bundle/{chunk-XBIPSSKI.js → chunk-QOGYHU3Q.js} +4 -4
- package/dist/bundle/{chunk-R52RMHWF.js → chunk-RDH2QBUE.js} +3 -3
- package/dist/bundle/{chunk-NUYRMU56.js → chunk-RDSLSV4M.js} +2 -2
- package/dist/bundle/{chunk-UCSFO5GW.js → chunk-SQXB5ZUZ.js} +3 -3
- package/dist/bundle/{chunk-K62YATVD.js → chunk-TFBHDIGY.js} +4 -4
- package/dist/bundle/{chunk-IR4S7POE.js → chunk-TG6ZYL4B.js} +8 -8
- package/dist/bundle/{chunk-FDI4GOIP.js → chunk-UGPZCNYC.js} +329 -291
- package/dist/bundle/{chunk-GV7ZJ33M.js → chunk-UYK5AXSW.js} +4 -4
- package/dist/bundle/{chunk-HUOXUI2M.js → chunk-V2T7NYNU.js} +55 -46
- package/dist/bundle/{chunk-HBUJNNZD.js → chunk-V47NPSSV.js} +28 -28
- package/dist/bundle/{chunk-YYKJN6H5.js → chunk-VMCQGZIA.js} +1390 -690
- package/dist/bundle/{chunk-LXH3SKY3.js → chunk-VRDVXXXD.js} +8 -8
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-LFKEKSI5.js → chunk-X3CD475M.js} +470 -234
- package/dist/bundle/{chunk-SKZ2E3WC.js → chunk-XW5C4TI7.js} +1 -1
- package/dist/bundle/{chunk-OX6EWGSG.js → chunk-YHZFGUAP.js} +19 -19
- package/dist/bundle/{chunk-HLNYJPAB.js → chunk-YIXXH74F.js} +2 -2
- package/dist/bundle/{chunk-LSKGCJWD.js → chunk-Z4QKLHJW.js} +13617 -1795
- package/dist/bundle/{chunk-JJMQA272.js → chunk-ZPILMEFY.js} +9 -9
- package/dist/bundle/command-contract-KMMHARMR.js +33 -0
- package/dist/bundle/{decode-W6YPTGJA.js → decode-YMSOY2AY.js} +5 -5
- package/dist/bundle/{dispatch-H7EFNBEH.js → dispatch-OP27MWX5.js} +8 -8
- package/dist/bundle/{echarts-YAWDIC5D.js → echarts-7XS55TQY.js} +2 -2
- package/dist/bundle/{embed-EN4UTLV5.js → embed-QTOE7NN3.js} +6 -6
- package/dist/bundle/{embedder-HEKHRL7E.js → embedder-KBBRYSNH.js} +9 -9
- package/dist/bundle/{entry-2KB6MTCG.js → entry-HGEUYYMX.js} +7 -7
- package/dist/bundle/{failure-3DU3HLBQ.js → failure-4JUQFXJT.js} +2 -2
- package/dist/bundle/{first-run-LBG26WWO.js → first-run-CSGMEJXY.js} +11 -11
- package/dist/bundle/first-screen-K2PBNJNE.js +31 -0
- package/dist/bundle/{instructions-HA62QNPR.js → instructions-S6ZXCTFH.js} +1 -1
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{node-MZ2VWSQQ.js → node-LCIUWXXG.js} +2 -2
- package/dist/bundle/{node-sqlite-KNNS6DCM.js → node-sqlite-HL4WY4N2.js} +6 -6
- package/dist/bundle/{oauth-KWUABBSQ.js → oauth-U4KIMDKG.js} +7 -7
- package/dist/bundle/{open-JXMCYCIV.js → open-EH7OS7M7.js} +5 -5
- package/dist/bundle/{openai-HL3IR4VT.js → openai-W5TB3NA5.js} +14 -14
- package/dist/bundle/{process-K2FICLWY.js → process-3CVLTCTA.js} +1 -1
- package/dist/bundle/{program-IFOMT4JS.js → program-LOIZTK2P.js} +51 -51
- package/dist/bundle/{prompt-HVD3Q77P.js → prompt-IDNH7N3W.js} +5 -5
- package/dist/bundle/{proxy-transport-PA5SGMRY.js → proxy-transport-4DPZB2W2.js} +5 -5
- package/dist/bundle/{recognize-HHLVETKI.js → recognize-G5EWYXIF.js} +4 -4
- package/dist/bundle/{remote-HUAKXJCS.js → remote-4XTBZVZD.js} +7 -7
- package/dist/bundle/{rerank-NWFIV7OF.js → rerank-OWSTDLZN.js} +7 -7
- package/dist/bundle/{serve-ANUKAJJN.js → serve-YCPSEWP3.js} +9 -9
- package/dist/bundle/server-KELKX6S3.js +60 -0
- package/dist/bundle/{server-7Q7WAOHO.js → server-ODG4A2KK.js} +35 -35
- package/dist/bundle/{state-Y2AJ5XTP.js → state-OL2235G5.js} +6 -6
- package/dist/bundle/{store-S3IG5KWL.js → store-5AACYNDM.js} +15 -13
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +50 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/account.d.ts.map +1 -1
- package/dist/telegram/account.js +4 -1
- package/dist/telegram/account.js.map +1 -1
- package/dist/telegram/errors.d.ts.map +1 -1
- package/dist/telegram/errors.js +2 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/telegram/feature.d.ts +4 -1
- package/dist/telegram/feature.d.ts.map +1 -1
- package/dist/telegram/feature.js +5 -2
- package/dist/telegram/feature.js.map +1 -1
- package/dist/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +24 -10
- package/dist/telegram/sending.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-K2RYCCTP.js +0 -48
- package/dist/bundle/chunk-ZDIAPICE.js +0 -132
- package/dist/bundle/command-contract-DPXM4SZT.js +0 -33
- package/dist/bundle/first-screen-TGTSLUI6.js +0 -31
- package/dist/bundle/server-HCQS4YDQ.js +0 -60
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +0 -50
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-66FZBLRJ.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-X3CD475M.js";
|
|
52
52
|
import {
|
|
53
53
|
isCliFailure
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-ZPILMEFY.js";
|
|
55
55
|
import {
|
|
56
56
|
isNewer,
|
|
57
57
|
updateCommand
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-3MQOLYAN.js";
|
|
59
59
|
import {
|
|
60
60
|
readOnlyLockOf
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-Q7O4CQDO.js";
|
|
62
62
|
import {
|
|
63
63
|
AGENDA_COLUMNS,
|
|
64
64
|
CHAT_COLUMNS,
|
|
@@ -141,7 +141,7 @@ import {
|
|
|
141
141
|
validateAst,
|
|
142
142
|
validateFields,
|
|
143
143
|
withoutField
|
|
144
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-Z4QKLHJW.js";
|
|
145
145
|
import {
|
|
146
146
|
EVENT_QUERY,
|
|
147
147
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -186,23 +186,23 @@ import {
|
|
|
186
186
|
validateQuery,
|
|
187
187
|
walkQuery,
|
|
188
188
|
zonedMoment
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-C6TUVV7E.js";
|
|
190
190
|
import {
|
|
191
191
|
DEFAULT_STEMMERS,
|
|
192
192
|
createStemmer,
|
|
193
193
|
fold,
|
|
194
194
|
normalize
|
|
195
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-TG6ZYL4B.js";
|
|
196
196
|
import {
|
|
197
197
|
DEFAULT_TASK_CATEGORIES,
|
|
198
198
|
FALLBACK_CATEGORY
|
|
199
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-7Y3RUEVY.js";
|
|
200
200
|
import {
|
|
201
201
|
MAX_MODEL_IMAGE_BYTES
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-56Q5JV3Z.js";
|
|
203
203
|
import {
|
|
204
204
|
remoteKey
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-2452HCIV.js";
|
|
206
206
|
import {
|
|
207
207
|
Unzip,
|
|
208
208
|
UnzipInflate,
|
|
@@ -213,19 +213,19 @@ import {
|
|
|
213
213
|
placedText,
|
|
214
214
|
runEmbedders,
|
|
215
215
|
textModelsDirectory
|
|
216
|
-
} from "./chunk-
|
|
216
|
+
} from "./chunk-KVTLT4V7.js";
|
|
217
217
|
import {
|
|
218
218
|
installFiles,
|
|
219
219
|
megabytes
|
|
220
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-F6KBVIJP.js";
|
|
221
221
|
import {
|
|
222
222
|
storePath,
|
|
223
223
|
wirecatDirectory
|
|
224
|
-
} from "./chunk-
|
|
224
|
+
} from "./chunk-3GRX7WP6.js";
|
|
225
225
|
import {
|
|
226
226
|
resolvePaths,
|
|
227
227
|
writeSecurely
|
|
228
|
-
} from "./chunk-
|
|
228
|
+
} from "./chunk-YHZFGUAP.js";
|
|
229
229
|
import {
|
|
230
230
|
array,
|
|
231
231
|
boolean,
|
|
@@ -248,7 +248,7 @@ import {
|
|
|
248
248
|
string,
|
|
249
249
|
transform,
|
|
250
250
|
unknown
|
|
251
|
-
} from "./chunk-
|
|
251
|
+
} from "./chunk-EPCFXKTX.js";
|
|
252
252
|
import {
|
|
253
253
|
importFrom,
|
|
254
254
|
resolveFrom
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
isCliError,
|
|
259
259
|
singleLine,
|
|
260
260
|
visibleControls
|
|
261
|
-
} from "./chunk-
|
|
261
|
+
} from "./chunk-BXTDAGM4.js";
|
|
262
262
|
import {
|
|
263
263
|
__commonJS,
|
|
264
264
|
__name,
|
|
@@ -16874,7 +16874,7 @@ var require_lib3 = __commonJS({
|
|
|
16874
16874
|
}
|
|
16875
16875
|
});
|
|
16876
16876
|
|
|
16877
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16877
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16878
16878
|
var RULES_VERSION = 5;
|
|
16879
16879
|
var LOOK_BACK = 50;
|
|
16880
16880
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16964,15 +16964,15 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16964
16964
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16965
16965
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16966
16966
|
|
|
16967
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16967
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16968
16968
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16969
16969
|
|
|
16970
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16970
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
16971
16971
|
import { randomBytes } from "node:crypto";
|
|
16972
16972
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
16973
16973
|
var newOperationId = newSendId;
|
|
16974
16974
|
|
|
16975
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16975
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
16976
16976
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
16977
16977
|
import { open, stat } from "node:fs/promises";
|
|
16978
16978
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17193,7 +17193,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17193
17193
|
return { name, source };
|
|
17194
17194
|
}, "readStickerFile");
|
|
17195
17195
|
|
|
17196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17196
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17197
17197
|
var COMMAND_NEEDS = {
|
|
17198
17198
|
"account update": ["updateProfile", "change the profile"],
|
|
17199
17199
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17243,7 +17243,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17243
17243
|
return group;
|
|
17244
17244
|
}, "hideNever");
|
|
17245
17245
|
|
|
17246
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17247
17247
|
var AUDIT_PAGE = 200;
|
|
17248
17248
|
var AUDIT_BUDGET = 10;
|
|
17249
17249
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17323,7 +17323,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17323
17323
|
return found;
|
|
17324
17324
|
}, "burstJoins");
|
|
17325
17325
|
|
|
17326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17326
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17327
17327
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17328
17328
|
command.allowUnknownOption();
|
|
17329
17329
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17343,7 +17343,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17343
17343
|
return command;
|
|
17344
17344
|
}, "queryWordsAfterOptions");
|
|
17345
17345
|
|
|
17346
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17346
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17347
17347
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17348
17348
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17349
17349
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17385,7 +17385,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17385
17385
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17386
17386
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17387
17387
|
|
|
17388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17388
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17389
17389
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17390
17390
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17391
17391
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17408,7 +17408,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17408
17408
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17409
17409
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17410
17410
|
|
|
17411
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17412
17412
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17413
17413
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17414
17414
|
const zone = timezoneOf();
|
|
@@ -17494,7 +17494,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17494
17494
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17495
17495
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17496
17496
|
|
|
17497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17498
17498
|
var integer4 = /* @__PURE__ */ __name((text2) => {
|
|
17499
17499
|
if (!/^[1-9]\d*$/.test(text2) || !Number.isSafeInteger(Number(text2)))
|
|
17500
17500
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17573,14 +17573,15 @@ ${fieldsHelp(MEETING_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17573
17573
|
offline: false,
|
|
17574
17574
|
output: { entity: "meeting_ingestion" }
|
|
17575
17575
|
}).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) => {
|
|
17576
|
-
|
|
17576
|
+
const source = deps.source;
|
|
17577
|
+
if (!source)
|
|
17577
17578
|
throw new MeetingError("configuration_error", "meeting source is unavailable");
|
|
17578
|
-
print(await pull(
|
|
17579
|
+
await deps.inRun(command, async () => print(await pull(source, deps.store, {
|
|
17579
17580
|
accountId: deps.accountId,
|
|
17580
17581
|
since: opts.sinceTime === void 0 ? void 0 : new Date(opts.sinceTime).toISOString(),
|
|
17581
17582
|
now: deps.now?.(),
|
|
17582
17583
|
lookbackMs: opts.lookbackDays * 864e5
|
|
17583
|
-
}), command);
|
|
17584
|
+
}), command));
|
|
17584
17585
|
});
|
|
17585
17586
|
const importCommand = annotate(group.command("import"), {
|
|
17586
17587
|
effects: LOCAL_WRITE,
|
|
@@ -17626,7 +17627,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17626
17627
|
}, "addMeetingCommandsDefinition");
|
|
17627
17628
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17628
17629
|
|
|
17629
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17630
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17630
17631
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17631
17632
|
var QUERY_ARGUMENT = "field:value terms that narrow the list \u2014 the fields are below";
|
|
17632
17633
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
@@ -17759,7 +17760,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17759
17760
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17760
17761
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17761
17762
|
|
|
17762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17763
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17763
17764
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17764
17765
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17765
17766
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17768,7 +17769,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17768
17769
|
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");
|
|
17769
17770
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17770
17771
|
|
|
17771
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17772
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17772
17773
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17773
17774
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17774
17775
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -18030,7 +18031,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
18030
18031
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
18031
18032
|
}), "sessionAnswer");
|
|
18032
18033
|
|
|
18033
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18034
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18034
18035
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18035
18036
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18036
18037
|
if (key in own)
|
|
@@ -18047,7 +18048,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18047
18048
|
return found.bind(adapter);
|
|
18048
18049
|
}, "capability");
|
|
18049
18050
|
|
|
18050
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18051
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/ref-arguments.js
|
|
18051
18052
|
var TAKES = {
|
|
18052
18053
|
chat: "a chat: chat:<provider>/<account>/<chat>, its id or its title",
|
|
18053
18054
|
message: "a message: msg:<provider>/<account>/<chat>/<message>, or a chat and the message's id"
|
|
@@ -18107,7 +18108,7 @@ var ensureAccount = /* @__PURE__ */ __name(async (reference, scope, profilesOn)
|
|
|
18107
18108
|
throw wrongAccount(reference, scope, profiles);
|
|
18108
18109
|
}, "ensureAccount");
|
|
18109
18110
|
|
|
18110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
18111
18112
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
18112
18113
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18113
18114
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18152,7 +18153,7 @@ ${lines3}`, { candidates });
|
|
|
18152
18153
|
}, "ambiguous");
|
|
18153
18154
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18154
18155
|
|
|
18155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
18156
18157
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
18157
18158
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
18158
18159
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -18216,7 +18217,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
18216
18217
|
}), "storedDeps");
|
|
18217
18218
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
18218
18219
|
|
|
18219
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
18220
18221
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
18221
18222
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
18222
18223
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -18239,10 +18240,10 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
18239
18240
|
}
|
|
18240
18241
|
}, "patiently");
|
|
18241
18242
|
|
|
18242
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18243
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
18243
18244
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
18244
18245
|
|
|
18245
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18246
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
18246
18247
|
var REQUEST_MS = 400;
|
|
18247
18248
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
18248
18249
|
const lowest = ranges[0];
|
|
@@ -18265,13 +18266,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
18265
18266
|
};
|
|
18266
18267
|
}, "estimateBackfill");
|
|
18267
18268
|
|
|
18268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18269
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
18269
18270
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
18270
18271
|
...error,
|
|
18271
18272
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
18272
18273
|
}), "withRecovery");
|
|
18273
18274
|
|
|
18274
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18275
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
18275
18276
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
18276
18277
|
if (isCliFailure(error))
|
|
18277
18278
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -18354,7 +18355,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
18354
18355
|
};
|
|
18355
18356
|
}, "mergeBatches");
|
|
18356
18357
|
|
|
18357
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18358
18359
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18359
18360
|
if (deps.reads !== "store")
|
|
18360
18361
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18513,7 +18514,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18513
18514
|
}
|
|
18514
18515
|
}, "senderAmong");
|
|
18515
18516
|
|
|
18516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
18517
18518
|
var CONTEXT_MESSAGES = 3;
|
|
18518
18519
|
var CONTEXT_MINUTES = 10;
|
|
18519
18520
|
var MAX_CHARS = 1200;
|
|
@@ -18537,12 +18538,12 @@ var context = {
|
|
|
18537
18538
|
}, "describe")
|
|
18538
18539
|
};
|
|
18539
18540
|
|
|
18540
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
18541
18542
|
var BUILT_INS = [context];
|
|
18542
18543
|
var providers = [...BUILT_INS];
|
|
18543
18544
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
18544
18545
|
|
|
18545
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18546
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
18546
18547
|
var READ_PAGE = 5e3;
|
|
18547
18548
|
var CHAIN = 50;
|
|
18548
18549
|
var CONVERSATION_QUERY = {
|
|
@@ -18694,7 +18695,7 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
18694
18695
|
return size2;
|
|
18695
18696
|
}, "sized");
|
|
18696
18697
|
|
|
18697
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18698
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
18698
18699
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
18699
18700
|
var MESSAGE_PAGE = 5e3;
|
|
18700
18701
|
var PER_SESSION = 8;
|
|
@@ -18713,7 +18714,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18713
18714
|
price: remote.price,
|
|
18714
18715
|
installed: true,
|
|
18715
18716
|
perBatch: PER_REQUEST * concurrency,
|
|
18716
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18717
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-4XTBZVZD.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18717
18718
|
};
|
|
18718
18719
|
}
|
|
18719
18720
|
const model = textModel(choice);
|
|
@@ -18730,7 +18731,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18730
18731
|
if (!isTextModelInstalled(model, directory2))
|
|
18731
18732
|
throw notDownloaded(model.id);
|
|
18732
18733
|
if (apart) {
|
|
18733
|
-
const { openProcess } = await import("./process-
|
|
18734
|
+
const { openProcess } = await import("./process-3CVLTCTA.js");
|
|
18734
18735
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
18735
18736
|
}
|
|
18736
18737
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -19019,7 +19020,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
19019
19020
|
return { ...one, state };
|
|
19020
19021
|
}, "shaped");
|
|
19021
19022
|
|
|
19022
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
19023
19024
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
19024
19025
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
19025
19026
|
for (const [key, value, maximum] of [
|
|
@@ -19072,7 +19073,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
19072
19073
|
}
|
|
19073
19074
|
}, "catchUpSearch");
|
|
19074
19075
|
|
|
19075
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19076
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
19076
19077
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
19077
19078
|
if (deps.reads === "store") {
|
|
19078
19079
|
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`);
|
|
@@ -19438,7 +19439,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
19438
19439
|
return message?.timestamp ?? fallback;
|
|
19439
19440
|
}, "timeOfKey");
|
|
19440
19441
|
|
|
19441
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19442
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19442
19443
|
var LINKS = /https?:\/\/\S+/g;
|
|
19443
19444
|
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");
|
|
19444
19445
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker = "others" }) => {
|
|
@@ -19468,7 +19469,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2, asker
|
|
|
19468
19469
|
});
|
|
19469
19470
|
}, "questions");
|
|
19470
19471
|
|
|
19471
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19472
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19472
19473
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19473
19474
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19474
19475
|
const name = typed.trim().toLowerCase();
|
|
@@ -19502,7 +19503,7 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
19502
19503
|
const stem = stemmersOf();
|
|
19503
19504
|
const english = stem.english.stemTokens(text2);
|
|
19504
19505
|
const spanish = readsSpanish(text2) ? stem.spanish.stemTokens(text2) : [];
|
|
19505
|
-
const
|
|
19506
|
+
const counted2 = [];
|
|
19506
19507
|
for (const triggers of triggerStems(categories)) {
|
|
19507
19508
|
const hit = /* @__PURE__ */ new Set();
|
|
19508
19509
|
english.forEach((word, at) => {
|
|
@@ -19512,20 +19513,20 @@ var hitsByList = /* @__PURE__ */ __name((text2, categories) => {
|
|
|
19512
19513
|
else if (other !== void 0 && triggers.spanish.has(other))
|
|
19513
19514
|
hit.add(other);
|
|
19514
19515
|
});
|
|
19515
|
-
|
|
19516
|
+
counted2.push({ name: triggers.name, hits: hit.size });
|
|
19516
19517
|
}
|
|
19517
|
-
return
|
|
19518
|
+
return counted2;
|
|
19518
19519
|
}, "hitsByList");
|
|
19519
19520
|
var listsHit = /* @__PURE__ */ __name((text2, categories) => hitsByList(text2, categories).filter(({ hits }) => hits > 0).map(({ name }) => name), "listsHit");
|
|
19520
19521
|
var categorize = /* @__PURE__ */ __name((text2, categories = DEFAULT_TASK_CATEGORIES) => {
|
|
19521
19522
|
let best = { name: FALLBACK_CATEGORY, hits: 0 };
|
|
19522
|
-
for (const
|
|
19523
|
-
if (
|
|
19524
|
-
best =
|
|
19523
|
+
for (const counted2 of hitsByList(text2, categories))
|
|
19524
|
+
if (counted2.hits > best.hits)
|
|
19525
|
+
best = counted2;
|
|
19525
19526
|
return best.name;
|
|
19526
19527
|
}, "categorize");
|
|
19527
19528
|
|
|
19528
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19529
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19529
19530
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19530
19531
|
var RULES_IN = {
|
|
19531
19532
|
dialog: "all",
|
|
@@ -19731,7 +19732,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19731
19732
|
return passes;
|
|
19732
19733
|
}, "applyTaskRulesToChats");
|
|
19733
19734
|
|
|
19734
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19735
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19735
19736
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19736
19737
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19737
19738
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19771,7 +19772,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19771
19772
|
};
|
|
19772
19773
|
}, "dateWindow");
|
|
19773
19774
|
|
|
19774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19775
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19775
19776
|
var DAY_MS = 864e5;
|
|
19776
19777
|
var NEW_DAYS = 30;
|
|
19777
19778
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19848,7 +19849,23 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19848
19849
|
};
|
|
19849
19850
|
}, "scorePerson");
|
|
19850
19851
|
|
|
19851
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19852
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/http/time-limit.js
|
|
19853
|
+
var timeLimit = /* @__PURE__ */ __name((ms) => {
|
|
19854
|
+
const controller = new AbortController();
|
|
19855
|
+
const timer = setTimeout(() => controller.abort(new DOMException("The operation timed out.", "TimeoutError")), ms);
|
|
19856
|
+
timer.unref();
|
|
19857
|
+
return { signal: controller.signal, clear: /* @__PURE__ */ __name(() => clearTimeout(timer), "clear") };
|
|
19858
|
+
}, "timeLimit");
|
|
19859
|
+
var withTimeLimit = /* @__PURE__ */ __name(async (ms, run) => {
|
|
19860
|
+
const limit = timeLimit(ms);
|
|
19861
|
+
try {
|
|
19862
|
+
return await run(limit.signal);
|
|
19863
|
+
} finally {
|
|
19864
|
+
limit.clear();
|
|
19865
|
+
}
|
|
19866
|
+
}, "withTimeLimit");
|
|
19867
|
+
|
|
19868
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19852
19869
|
var REGISTRIES = {
|
|
19853
19870
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19854
19871
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -19857,16 +19874,18 @@ var TIMEOUT_MS = 1e4;
|
|
|
19857
19874
|
var askRegistries = /* @__PURE__ */ __name(async (id2, options = {}) => Promise.all([askCas(id2, options), askLols(id2, options)]), "askRegistries");
|
|
19858
19875
|
var getJson = /* @__PURE__ */ __name(async (url, headers, { fetch: fetchFn = fetch, timeoutMs = TIMEOUT_MS }) => {
|
|
19859
19876
|
try {
|
|
19860
|
-
const
|
|
19861
|
-
|
|
19862
|
-
|
|
19863
|
-
|
|
19877
|
+
const { status, text: text2 } = await withTimeLimit(timeoutMs, async (signal) => {
|
|
19878
|
+
const response = await fetchFn(url, {
|
|
19879
|
+
headers: { accept: "application/json", ...headers },
|
|
19880
|
+
signal,
|
|
19881
|
+
redirect: "error"
|
|
19882
|
+
});
|
|
19883
|
+
return { status: response.status, text: await response.text() };
|
|
19864
19884
|
});
|
|
19865
|
-
const text2 = await response.text();
|
|
19866
19885
|
try {
|
|
19867
|
-
return { status
|
|
19886
|
+
return { status, body: JSON.parse(text2) };
|
|
19868
19887
|
} catch {
|
|
19869
|
-
return { failed: `answered ${
|
|
19888
|
+
return { failed: `answered ${status} with something that is not JSON` };
|
|
19870
19889
|
}
|
|
19871
19890
|
} catch (error) {
|
|
19872
19891
|
return {
|
|
@@ -19933,7 +19952,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
19933
19952
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
19934
19953
|
})), "notCovered");
|
|
19935
19954
|
|
|
19936
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
19937
19956
|
var ACTIVITY_MESSAGES = 1e3;
|
|
19938
19957
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
19939
19958
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -20021,7 +20040,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
20021
20040
|
};
|
|
20022
20041
|
}, "botCheckService");
|
|
20023
20042
|
|
|
20024
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20043
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
20025
20044
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
20026
20045
|
if (value === void 0)
|
|
20027
20046
|
return void 0;
|
|
@@ -20031,7 +20050,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
20031
20050
|
return id2;
|
|
20032
20051
|
}, "threadIdOf");
|
|
20033
20052
|
|
|
20034
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
20035
20054
|
var TOP_POSTS = 5;
|
|
20036
20055
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
20037
20056
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -20148,7 +20167,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
20148
20167
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
20149
20168
|
}, "median");
|
|
20150
20169
|
|
|
20151
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20170
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
20152
20171
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
20153
20172
|
const events = [];
|
|
20154
20173
|
for (const stay of stays) {
|
|
@@ -20180,7 +20199,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
20180
20199
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
20181
20200
|
}, "memberEvents");
|
|
20182
20201
|
|
|
20183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20202
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
20184
20203
|
var EVENTS_DAYS = 7;
|
|
20185
20204
|
var TRACKED_DAYS = 30;
|
|
20186
20205
|
var STATS_PAGE = 1e3;
|
|
@@ -20298,8 +20317,8 @@ var chatsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
20298
20317
|
});
|
|
20299
20318
|
const counts = await store.roster.memberCounts(chatId, { since: new Date(from).toISOString().slice(0, 10) });
|
|
20300
20319
|
const known2 = unrecorded ? { ...stats, complete: false, membersUnrecorded: true } : stats;
|
|
20301
|
-
const
|
|
20302
|
-
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ?
|
|
20320
|
+
const counted2 = counts.length > 0 ? { ...known2, memberCounts: counts } : known2;
|
|
20321
|
+
return completeness.state === "complete" || !syncsOneChat(deps.messenger) ? counted2 : { ...counted2, fetch: typedCommand(deps.messenger.app.command, `messages sync ${chatId}`) };
|
|
20303
20322
|
}, "stats"),
|
|
20304
20323
|
sendAs: /* @__PURE__ */ __name(async (chat) => {
|
|
20305
20324
|
if (deps.offline) {
|
|
@@ -20475,7 +20494,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20475
20494
|
return members.length === 0 ? null : members;
|
|
20476
20495
|
}, "storedMembers");
|
|
20477
20496
|
|
|
20478
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20497
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20479
20498
|
var INBOX_CHATS = 20;
|
|
20480
20499
|
var REVIEW_DAYS = 3;
|
|
20481
20500
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20683,7 +20702,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20683
20702
|
};
|
|
20684
20703
|
}, "inboxService");
|
|
20685
20704
|
|
|
20686
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
20687
20706
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
20688
20707
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
20689
20708
|
const { text: text2, spans } = formatted2;
|
|
@@ -20743,7 +20762,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
20743
20762
|
};
|
|
20744
20763
|
}, "visibleFormattedText");
|
|
20745
20764
|
|
|
20746
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20765
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
20747
20766
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
20748
20767
|
var LINK2 = /https?:\/\/\S+/i;
|
|
20749
20768
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -20931,7 +20950,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
20931
20950
|
}, "nextPoint");
|
|
20932
20951
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
20933
20952
|
|
|
20934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
20935
20954
|
import { existsSync, readFileSync } from "node:fs";
|
|
20936
20955
|
import { join } from "node:path";
|
|
20937
20956
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -21074,7 +21093,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
21074
21093
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
21075
21094
|
}, "assign");
|
|
21076
21095
|
|
|
21077
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21096
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
21078
21097
|
var CONTEXT_MESSAGES2 = 10;
|
|
21079
21098
|
var CONTEXT_BYTES = 64 * 1024;
|
|
21080
21099
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle2) => ({
|
|
@@ -21335,10 +21354,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
21335
21354
|
};
|
|
21336
21355
|
}, "personMessages");
|
|
21337
21356
|
|
|
21338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21357
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21339
21358
|
import { createHash } from "node:crypto";
|
|
21340
21359
|
|
|
21341
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
21342
21361
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
21343
21362
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
21344
21363
|
const parsed = parseMeetingReference(reference);
|
|
@@ -21356,7 +21375,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
21356
21375
|
return { parsed, meeting };
|
|
21357
21376
|
}, "authorizedMeetingMetadata");
|
|
21358
21377
|
|
|
21359
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21378
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
21360
21379
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
21361
21380
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
21362
21381
|
if (signal?.aborted)
|
|
@@ -21555,7 +21574,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
21555
21574
|
return { ...packet, fingerprint: hash(packet) };
|
|
21556
21575
|
}, "readMeetingEvidence");
|
|
21557
21576
|
|
|
21558
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21577
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
21559
21578
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
21560
21579
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
21561
21580
|
const requestedAccounts = options.accountIds;
|
|
@@ -21654,7 +21673,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
21654
21673
|
};
|
|
21655
21674
|
}, "personMeetingContext");
|
|
21656
21675
|
|
|
21657
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21676
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
21658
21677
|
var PREPARE_BYTES = 96 * 1024;
|
|
21659
21678
|
var MEETINGS = 5;
|
|
21660
21679
|
var CUES = 3;
|
|
@@ -21771,7 +21790,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
21771
21790
|
}
|
|
21772
21791
|
}, "meetingsOf");
|
|
21773
21792
|
|
|
21774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21793
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
21775
21794
|
var personProfile = /* @__PURE__ */ __name(async (deps, person, known2) => {
|
|
21776
21795
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
21777
21796
|
const held = await storeIfOpen(deps);
|
|
@@ -21841,7 +21860,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
21841
21860
|
complete: false
|
|
21842
21861
|
})), "quiet");
|
|
21843
21862
|
|
|
21844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
21845
21864
|
var TIMELINE_ITEMS = 50;
|
|
21846
21865
|
var TIMELINE_MAX = 500;
|
|
21847
21866
|
var SCOPES = ["personal", "work"];
|
|
@@ -21896,7 +21915,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
21896
21915
|
};
|
|
21897
21916
|
}, "personTimeline");
|
|
21898
21917
|
|
|
21899
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21918
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
21900
21919
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
21901
21920
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
21902
21921
|
const held = await storeIfOpen(deps);
|
|
@@ -22123,7 +22142,7 @@ var withoutPhone = /* @__PURE__ */ __name((answer) => {
|
|
|
22123
22142
|
return rest;
|
|
22124
22143
|
}, "withoutPhone");
|
|
22125
22144
|
|
|
22126
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/task-stats.js
|
|
22127
22146
|
var TASK_STATS_BY = ["chat", "meeting", "project"];
|
|
22128
22147
|
var PERIOD_FIELD = "created";
|
|
22129
22148
|
var refuseNestedPeriod = /* @__PURE__ */ __name((node, top = true) => {
|
|
@@ -22226,7 +22245,7 @@ var meetingNames = /* @__PURE__ */ __name(async (store, groups) => {
|
|
|
22226
22245
|
}));
|
|
22227
22246
|
}, "meetingNames");
|
|
22228
22247
|
|
|
22229
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22248
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
22230
22249
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
22231
22250
|
const tags = /* @__PURE__ */ new Map();
|
|
22232
22251
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -22235,7 +22254,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
22235
22254
|
return tags;
|
|
22236
22255
|
}, "taskTagFilters");
|
|
22237
22256
|
|
|
22238
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
22239
22258
|
var TASK_QUERY = {
|
|
22240
22259
|
entity: "task",
|
|
22241
22260
|
backend: "sql",
|
|
@@ -22727,7 +22746,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
22727
22746
|
};
|
|
22728
22747
|
}, "taskView");
|
|
22729
22748
|
|
|
22730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22749
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/mail/owed.js
|
|
22731
22750
|
var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
22732
22751
|
if (newest === null)
|
|
22733
22752
|
return null;
|
|
@@ -22736,7 +22755,7 @@ var mailTurn = /* @__PURE__ */ __name((newest) => {
|
|
|
22736
22755
|
return newest.addressed ? "owed" : null;
|
|
22737
22756
|
}, "mailTurn");
|
|
22738
22757
|
|
|
22739
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/agenda-mail.js
|
|
22740
22759
|
var absent = /* @__PURE__ */ __name((error) => {
|
|
22741
22760
|
if (error instanceof CliError && error.code === "not_found")
|
|
22742
22761
|
return void 0;
|
|
@@ -22794,7 +22813,7 @@ var mailActivity = /* @__PURE__ */ __name(async (store, account, since, chats) =
|
|
|
22794
22813
|
};
|
|
22795
22814
|
}, "mailActivity");
|
|
22796
22815
|
|
|
22797
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/chat-coverage.js
|
|
22798
22817
|
var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
22799
22818
|
const ids = [...new Set(chatIds)];
|
|
22800
22819
|
if (ids.length === 0)
|
|
@@ -22820,7 +22839,7 @@ var chatCoverage = /* @__PURE__ */ __name(async (store, account, chatIds) => {
|
|
|
22820
22839
|
}));
|
|
22821
22840
|
}, "chatCoverage");
|
|
22822
22841
|
|
|
22823
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22842
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
22824
22843
|
var DAY = 864e5;
|
|
22825
22844
|
var AGENDA_DEFAULTS = { unanswered: DAY, waiting: 7 * DAY };
|
|
22826
22845
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
@@ -23067,7 +23086,7 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
23067
23086
|
};
|
|
23068
23087
|
}, "agendaItem");
|
|
23069
23088
|
|
|
23070
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23089
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/context/evidence-response.js
|
|
23071
23090
|
var contextSourceKey = /* @__PURE__ */ __name((source) => JSON.stringify([source.kind, source.accountId, source.provider, source.account]), "contextSourceKey");
|
|
23072
23091
|
var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
23073
23092
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
@@ -23131,7 +23150,7 @@ var validateContextEvidencePage = /* @__PURE__ */ __name((page, request) => {
|
|
|
23131
23150
|
}
|
|
23132
23151
|
}, "validateContextEvidencePage");
|
|
23133
23152
|
|
|
23134
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/context/read-budget.js
|
|
23135
23154
|
var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
23136
23155
|
if (!limits || typeof limits !== "object" || Array.isArray(limits))
|
|
23137
23156
|
throw new CliError("validation_error", "limits needs a context read allowance");
|
|
@@ -23184,7 +23203,7 @@ var contextReadBudget = /* @__PURE__ */ __name((limits = {}) => {
|
|
|
23184
23203
|
};
|
|
23185
23204
|
}, "contextReadBudget");
|
|
23186
23205
|
|
|
23187
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23206
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/context-evidence.js
|
|
23188
23207
|
var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits) => {
|
|
23189
23208
|
if (!port || typeof port.read !== "function")
|
|
23190
23209
|
throw new CliError("configuration_error", "context evidence reader is unavailable");
|
|
@@ -23228,7 +23247,7 @@ var createContextEvidenceReader = /* @__PURE__ */ __name((port, allowed, limits)
|
|
|
23228
23247
|
};
|
|
23229
23248
|
}, "createContextEvidenceReader");
|
|
23230
23249
|
|
|
23231
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23250
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
23232
23251
|
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");
|
|
23233
23252
|
var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) => {
|
|
23234
23253
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -23244,7 +23263,7 @@ var excerpt = /* @__PURE__ */ __name((text2, query, size2 = 240, options = {}) =
|
|
|
23244
23263
|
}, "excerpt");
|
|
23245
23264
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
23246
23265
|
|
|
23247
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23266
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-purposes.js
|
|
23248
23267
|
var BUILT_IN_PURPOSES = ["work", "sales", "support", "other"];
|
|
23249
23268
|
var DEFAULT_PURPOSES = ["work"];
|
|
23250
23269
|
var LINK_PURPOSE = "work";
|
|
@@ -23274,7 +23293,7 @@ var purposeList = /* @__PURE__ */ __name((value, previous = []) => [
|
|
|
23274
23293
|
...value.split(",").map((one) => one.trim()).filter(Boolean)
|
|
23275
23294
|
], "purposeList");
|
|
23276
23295
|
|
|
23277
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23296
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-gathering-around.js
|
|
23278
23297
|
var storedMessageNeighbours = /* @__PURE__ */ __name((messages) => ({
|
|
23279
23298
|
async around(ref, window3) {
|
|
23280
23299
|
const at = parseLocator(ref);
|
|
@@ -23369,7 +23388,7 @@ var storedNeighbours = /* @__PURE__ */ __name((store) => {
|
|
|
23369
23388
|
};
|
|
23370
23389
|
}, "storedNeighbours");
|
|
23371
23390
|
|
|
23372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-gathering-request.js
|
|
23373
23392
|
import { createHash as createHash2 } from "node:crypto";
|
|
23374
23393
|
var DAY2 = 864e5;
|
|
23375
23394
|
var MAX_TIME = 864e13;
|
|
@@ -23685,7 +23704,7 @@ var decodeCheckpoint = /* @__PURE__ */ __name((text2, plan) => {
|
|
|
23685
23704
|
return value;
|
|
23686
23705
|
}, "decodeCheckpoint");
|
|
23687
23706
|
|
|
23688
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23707
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-gathering.js
|
|
23689
23708
|
var terminal = /* @__PURE__ */ new Set(["done", "unavailable", "failed"]);
|
|
23690
23709
|
var PAGE3 = 20;
|
|
23691
23710
|
var PEOPLE = 20;
|
|
@@ -24089,7 +24108,7 @@ var peopleOf = /* @__PURE__ */ __name((items, senderOf) => {
|
|
|
24089
24108
|
return [...byKey.values()].sort((a, b) => b.items - a.items || a.name.localeCompare(b.name));
|
|
24090
24109
|
}, "peopleOf");
|
|
24091
24110
|
|
|
24092
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24111
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-project-candidate-matching.js
|
|
24093
24112
|
var normalizedText = /* @__PURE__ */ __name((text2) => text2.normalize("NFKC").toLowerCase().replace(/\s+/gu, " "), "normalizedText");
|
|
24094
24113
|
var termsOf = /* @__PURE__ */ __name((entry) => [
|
|
24095
24114
|
{ name: entry.name, kind: "canonical" },
|
|
@@ -24133,7 +24152,7 @@ var matchVocabularyTerms = /* @__PURE__ */ __name((catalog, texts) => {
|
|
|
24133
24152
|
return result.sort((a, b) => Number(a.entry.id) - Number(b.entry.id));
|
|
24134
24153
|
}, "matchVocabularyTerms");
|
|
24135
24154
|
|
|
24136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-gathering-mentions.js
|
|
24137
24156
|
var KINDS = ["project", "tag", "topic"];
|
|
24138
24157
|
var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering, options = {}) => {
|
|
24139
24158
|
if (typeof vocabulary?.vocabulary !== "function")
|
|
@@ -24188,7 +24207,7 @@ var findEvidenceMentions = /* @__PURE__ */ __name(async (vocabulary, gathering,
|
|
|
24188
24207
|
};
|
|
24189
24208
|
}, "findEvidenceMentions");
|
|
24190
24209
|
|
|
24191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/stored-project-gathering.js
|
|
24192
24211
|
var storedChatCount = /* @__PURE__ */ __name((store) => async (account, chatId, { since, until }) => {
|
|
24193
24212
|
const window3 = { since: new Date(since).toISOString(), until: new Date(until - 1).toISOString() };
|
|
24194
24213
|
const [messages, newest, oldest] = await Promise.all([
|
|
@@ -24456,7 +24475,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24456
24475
|
const leftOut = [];
|
|
24457
24476
|
for (const one of all.filter((chat) => !purposeRead(purposes, chat.purpose))) {
|
|
24458
24477
|
const account = { provider: one.provider, account: one.account };
|
|
24459
|
-
const [
|
|
24478
|
+
const [counted2, [held]] = await Promise.all([
|
|
24460
24479
|
count4(account, one.chat, { since: gathered.window.after, until: gathered.window.before }),
|
|
24461
24480
|
chatCoverage(store, account, [one.chat])
|
|
24462
24481
|
]);
|
|
@@ -24469,7 +24488,7 @@ var gatherStoredProject = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
24469
24488
|
purpose: one.purpose ?? LINK_PURPOSE,
|
|
24470
24489
|
relationship: one.relationship,
|
|
24471
24490
|
...one.proposed ? { proposed: one.proposed } : {},
|
|
24472
|
-
...
|
|
24491
|
+
...counted2
|
|
24473
24492
|
});
|
|
24474
24493
|
}
|
|
24475
24494
|
return {
|
|
@@ -24494,18 +24513,18 @@ var purposeHintOf = /* @__PURE__ */ __name((linked, rows, of) => {
|
|
|
24494
24513
|
return { chat: top.ref, relationship: link4.relationship, items, of };
|
|
24495
24514
|
}, "purposeHintOf");
|
|
24496
24515
|
|
|
24497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24516
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
24498
24517
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24499
24518
|
|
|
24500
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24519
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
24501
24520
|
import { lstat } from "node:fs/promises";
|
|
24502
24521
|
|
|
24503
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24504
24523
|
import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
|
|
24505
24524
|
import { open as open3, rename as rename2, unlink as unlink2 } from "node:fs/promises";
|
|
24506
24525
|
import { join as join3 } from "node:path";
|
|
24507
24526
|
|
|
24508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
24509
24528
|
import { createHash as createHash3 } from "node:crypto";
|
|
24510
24529
|
var metadataLimit = 16384;
|
|
24511
24530
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -24565,7 +24584,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
24565
24584
|
}
|
|
24566
24585
|
}, "readPartialMetadata");
|
|
24567
24586
|
|
|
24568
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
24569
24588
|
import { randomUUID } from "node:crypto";
|
|
24570
24589
|
import { open as open2, rename, unlink } from "node:fs/promises";
|
|
24571
24590
|
import { join as join2 } from "node:path";
|
|
@@ -24657,7 +24676,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
24657
24676
|
};
|
|
24658
24677
|
}, "partialWriter");
|
|
24659
24678
|
|
|
24660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24679
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
24661
24680
|
var NativeRecordingPartialStore = class {
|
|
24662
24681
|
static {
|
|
24663
24682
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -24764,12 +24783,12 @@ var NativeRecordingPartialStore = class {
|
|
|
24764
24783
|
}
|
|
24765
24784
|
};
|
|
24766
24785
|
|
|
24767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24768
24787
|
import { createHash as createHash5 } from "node:crypto";
|
|
24769
24788
|
import { link as link2 } from "node:fs/promises";
|
|
24770
24789
|
import { basename as basename2, dirname as dirname2, join as join5, resolve as resolve2 } from "node:path";
|
|
24771
24790
|
|
|
24772
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24791
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
24773
24792
|
import { unlink as unlink3 } from "node:fs/promises";
|
|
24774
24793
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected2, signal, writable = false) => {
|
|
24775
24794
|
signal?.throwIfAborted();
|
|
@@ -24804,7 +24823,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
24804
24823
|
signal?.throwIfAborted();
|
|
24805
24824
|
}, "commitPublication");
|
|
24806
24825
|
|
|
24807
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24826
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
24808
24827
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
24809
24828
|
import { open as open4, rename as rename3, unlink as unlink4 } from "node:fs/promises";
|
|
24810
24829
|
import { join as join4 } from "node:path";
|
|
@@ -24877,7 +24896,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
24877
24896
|
}
|
|
24878
24897
|
}, "writePublicationJournal");
|
|
24879
24898
|
|
|
24880
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24899
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
24881
24900
|
var NativeRecordingPublication = class {
|
|
24882
24901
|
static {
|
|
24883
24902
|
__name(this, "NativeRecordingPublication");
|
|
@@ -24950,7 +24969,7 @@ var NativeRecordingPublication = class {
|
|
|
24950
24969
|
}
|
|
24951
24970
|
};
|
|
24952
24971
|
|
|
24953
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24972
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
24954
24973
|
import { createHash as createHash6 } from "node:crypto";
|
|
24955
24974
|
import { readdir } from "node:fs/promises";
|
|
24956
24975
|
import { isAbsolute as isAbsolute2, join as join6, resolve as resolve3 } from "node:path";
|
|
@@ -25037,7 +25056,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
25037
25056
|
beforePublish
|
|
25038
25057
|
}), "commitMediaEntry");
|
|
25039
25058
|
|
|
25040
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25059
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
25041
25060
|
var validator = '"media-completed-v1"';
|
|
25042
25061
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
25043
25062
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -25138,7 +25157,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
25138
25157
|
return entry;
|
|
25139
25158
|
}, "archiveMediaFile");
|
|
25140
25159
|
|
|
25141
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25160
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
25142
25161
|
import { mkdir, realpath } from "node:fs/promises";
|
|
25143
25162
|
import { join as join7, resolve as resolve4 } from "node:path";
|
|
25144
25163
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -25205,7 +25224,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
25205
25224
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
25206
25225
|
}, "withMediaArchiveLocks");
|
|
25207
25226
|
|
|
25208
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25227
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
25209
25228
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
25210
25229
|
if (value === void 0)
|
|
25211
25230
|
return void 0;
|
|
@@ -25358,7 +25377,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
25358
25377
|
}, { create: true });
|
|
25359
25378
|
}, "archiveMedia");
|
|
25360
25379
|
|
|
25361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
25362
25381
|
import { realpath as realpath2, unlink as unlink5 } from "node:fs/promises";
|
|
25363
25382
|
import { basename as basename3, dirname as dirname3, join as join8, resolve as resolve5 } from "node:path";
|
|
25364
25383
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -25511,7 +25530,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
25511
25530
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
25512
25531
|
}, "moveMediaArchive");
|
|
25513
25532
|
|
|
25514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
25515
25534
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
25516
25535
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
25517
25536
|
}, "progress") }) => {
|
|
@@ -25534,7 +25553,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25534
25553
|
}
|
|
25535
25554
|
await nativeRuntime({ env, progress });
|
|
25536
25555
|
progress(`${model.id}: loading it once to check it works`);
|
|
25537
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
25556
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-QTOE7NN3.js");
|
|
25538
25557
|
const embedder = await openEmbedder2(model, directory2);
|
|
25539
25558
|
try {
|
|
25540
25559
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -25555,7 +25574,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
25555
25574
|
}
|
|
25556
25575
|
await nativeRuntime({ env, progress });
|
|
25557
25576
|
progress(`${model.id}: loading it once to check it works`);
|
|
25558
|
-
const { openReranker } = await import("./rerank-
|
|
25577
|
+
const { openReranker } = await import("./rerank-OWSTDLZN.js");
|
|
25559
25578
|
const reranker = await openReranker(model, directory2);
|
|
25560
25579
|
try {
|
|
25561
25580
|
await reranker.score("check", ["check"]);
|
|
@@ -25573,7 +25592,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25573
25592
|
await installFiles(placedImage(model, directory2), { progress });
|
|
25574
25593
|
}
|
|
25575
25594
|
progress(`${model.id}: loading it once to check it works`);
|
|
25576
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
25595
|
+
const { openPictureEmbedder } = await import("./embedder-KBBRYSNH.js");
|
|
25577
25596
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
25578
25597
|
try {
|
|
25579
25598
|
const vector = await embedder.embedQuery("check");
|
|
@@ -25585,7 +25604,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25585
25604
|
return { model, directory: directory2 };
|
|
25586
25605
|
}, "downloadImageModel");
|
|
25587
25606
|
|
|
25588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25607
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/money-words.js
|
|
25589
25608
|
var MONEY_REQUEST = "money-request";
|
|
25590
25609
|
var MONEY_DONE = "money-done";
|
|
25591
25610
|
var PROMISE = "promise";
|
|
@@ -25619,10 +25638,10 @@ var MONEY_WORDS = [
|
|
|
25619
25638
|
}
|
|
25620
25639
|
];
|
|
25621
25640
|
|
|
25622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25641
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/money-words.js
|
|
25623
25642
|
var moneyClassesOf = /* @__PURE__ */ __name((text2) => listsHit(text2, MONEY_WORDS), "moneyClassesOf");
|
|
25624
25643
|
|
|
25625
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25644
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/status-words.js
|
|
25626
25645
|
var words = /* @__PURE__ */ __name((forms) => new RegExp(`(?<![\\p{L}\\p{N}])(?:${forms.join("|")})(?![\\p{L}\\p{N}])`, "iu"), "words");
|
|
25627
25646
|
var MONEY_DONE_FORMS = words([
|
|
25628
25647
|
"\u043E\u043F\u043B\u0430\u0442\u0438\u043B[\u0430\u0438]?",
|
|
@@ -25662,7 +25681,7 @@ var PROMISE_FORMS = words([
|
|
|
25662
25681
|
"estar\xE1 listo"
|
|
25663
25682
|
]);
|
|
25664
25683
|
|
|
25665
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25684
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/items.js
|
|
25666
25685
|
var EXCERPT_CHARS = 80;
|
|
25667
25686
|
var excerpt2 = /* @__PURE__ */ __name((text2) => {
|
|
25668
25687
|
const flat = text2.replace(/\s+/g, " ").trim();
|
|
@@ -25684,7 +25703,7 @@ var whoOf = /* @__PURE__ */ __name((message) => ({
|
|
|
25684
25703
|
var fromOwner = /* @__PURE__ */ __name((message) => message.outgoing === true, "fromOwner");
|
|
25685
25704
|
var day = /* @__PURE__ */ __name((at) => new Date(at).toISOString().slice(0, 10), "day");
|
|
25686
25705
|
|
|
25687
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/amounts.js
|
|
25688
25707
|
var MONEY = DEFAULT_TASK_CATEGORIES.filter((category) => category.name === "money");
|
|
25689
25708
|
var verbOf = /* @__PURE__ */ __name((text2) => {
|
|
25690
25709
|
if (MONEY_DONE_FORMS.test(text2))
|
|
@@ -25724,10 +25743,10 @@ var rowsOf = /* @__PURE__ */ __name((chat) => chat.messages.flatMap((message) =>
|
|
|
25724
25743
|
var centsText = /* @__PURE__ */ __name((cents) => `${Math.floor(cents / 100)}.${String(cents % 100).padStart(2, "0")}`, "centsText");
|
|
25725
25744
|
var amounts = {
|
|
25726
25745
|
id: "amounts",
|
|
25727
|
-
version:
|
|
25746
|
+
version: 3,
|
|
25728
25747
|
scope: "chat",
|
|
25729
|
-
read: /* @__PURE__ */ __name(async (
|
|
25730
|
-
if (!chat)
|
|
25748
|
+
read: /* @__PURE__ */ __name(async (context2, chat) => {
|
|
25749
|
+
if (!chat || context2.books)
|
|
25731
25750
|
return [];
|
|
25732
25751
|
const groups = /* @__PURE__ */ new Map();
|
|
25733
25752
|
for (const row of rowsOf(chat)) {
|
|
@@ -25740,7 +25759,8 @@ var amounts = {
|
|
|
25740
25759
|
const lastAsk = asks.at(-1);
|
|
25741
25760
|
const first2 = asks[0] ?? done2[0] ?? rows[0];
|
|
25742
25761
|
const paidAfter = done2.some((row) => !lastAsk || Date.parse(row.message.timestamp) >= Date.parse(lastAsk.message.timestamp));
|
|
25743
|
-
const
|
|
25762
|
+
const paid2 = asks.length ? paidAfter : done2.length > 0;
|
|
25763
|
+
const state = paid2 ? "paid-mentioned" : asks.length ? "asked" : "mentioned";
|
|
25744
25764
|
const cited = asks.length ? [...asks, ...paidAfter ? done2.slice(-1) : []] : rows;
|
|
25745
25765
|
return {
|
|
25746
25766
|
signal: "amounts",
|
|
@@ -25761,10 +25781,10 @@ var amounts = {
|
|
|
25761
25781
|
};
|
|
25762
25782
|
});
|
|
25763
25783
|
}, "read"),
|
|
25764
|
-
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "
|
|
25784
|
+
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.state === "asked" ? [{ chat: item2.chat, weight: 2, why: "money asked" }] : []), "attention")
|
|
25765
25785
|
};
|
|
25766
25786
|
|
|
25767
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25787
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/children.js
|
|
25768
25788
|
var children = {
|
|
25769
25789
|
id: "children",
|
|
25770
25790
|
version: 1,
|
|
@@ -25793,7 +25813,7 @@ var children = {
|
|
|
25793
25813
|
}, "read")
|
|
25794
25814
|
};
|
|
25795
25815
|
|
|
25796
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/coverage.js
|
|
25797
25817
|
var coverage = {
|
|
25798
25818
|
id: "coverage",
|
|
25799
25819
|
version: 1,
|
|
@@ -25822,29 +25842,7 @@ var coverage = {
|
|
|
25822
25842
|
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")
|
|
25823
25843
|
};
|
|
25824
25844
|
|
|
25825
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25826
|
-
var lastMessage = {
|
|
25827
|
-
id: "last-message",
|
|
25828
|
-
version: 1,
|
|
25829
|
-
scope: "chat",
|
|
25830
|
-
read: /* @__PURE__ */ __name(async (_context, chat) => {
|
|
25831
|
-
const last = chat?.messages.at(-1);
|
|
25832
|
-
if (!chat || !last)
|
|
25833
|
-
return [];
|
|
25834
|
-
const item2 = {
|
|
25835
|
-
signal: "last-message",
|
|
25836
|
-
chat: chat.ref,
|
|
25837
|
-
at: last.timestamp,
|
|
25838
|
-
who: whoOf(last),
|
|
25839
|
-
evidence: evidenceOf(chat, last),
|
|
25840
|
-
basis: "store",
|
|
25841
|
-
data: {}
|
|
25842
|
-
};
|
|
25843
|
-
return [item2];
|
|
25844
|
-
}, "read")
|
|
25845
|
-
};
|
|
25846
|
-
|
|
25847
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25845
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/payments.js
|
|
25848
25846
|
var holding = /* @__PURE__ */ __name((row) => row.review !== "rejected", "holding");
|
|
25849
25847
|
var item = /* @__PURE__ */ __name((row, at, data) => ({
|
|
25850
25848
|
signal: "payments",
|
|
@@ -25894,7 +25892,7 @@ var payments = {
|
|
|
25894
25892
|
}, "read")
|
|
25895
25893
|
};
|
|
25896
25894
|
|
|
25897
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25895
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/promises.js
|
|
25898
25896
|
var PATTERNS_PER_CHAT = 3;
|
|
25899
25897
|
var DAY3 = 864e5;
|
|
25900
25898
|
var KINDS2 = /* @__PURE__ */ new Set(["promise", "request"]);
|
|
@@ -25983,7 +25981,7 @@ var promises = {
|
|
|
25983
25981
|
}, "read")
|
|
25984
25982
|
};
|
|
25985
25983
|
|
|
25986
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25984
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/questions.js
|
|
25987
25985
|
var PER_SIDE = 5;
|
|
25988
25986
|
var WEEK = 7 * 864e5;
|
|
25989
25987
|
var NOBODY = /* @__PURE__ */ new Set();
|
|
@@ -26014,7 +26012,7 @@ var questions2 = {
|
|
|
26014
26012
|
}, "attention")
|
|
26015
26013
|
};
|
|
26016
26014
|
|
|
26017
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26015
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/reply-next.js
|
|
26018
26016
|
var targetOf = /* @__PURE__ */ __name((message, chat, owners) => {
|
|
26019
26017
|
const byId2 = /* @__PURE__ */ __name((id2) => chat.messages.find((one) => one.id === id2), "byId");
|
|
26020
26018
|
const quoted = message.replyTo ?? (message.replyToId === void 0 ? void 0 : byId2(message.replyToId));
|
|
@@ -26082,7 +26080,7 @@ var replyNext = {
|
|
|
26082
26080
|
attention: /* @__PURE__ */ __name((items) => items.flatMap((item2) => item2.chat !== null && item2.data.next === "owner" ? [{ chat: item2.chat, weight: 2, why: "your move" }] : []), "attention")
|
|
26083
26081
|
};
|
|
26084
26082
|
|
|
26085
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26083
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/topics.js
|
|
26086
26084
|
var escaped = /* @__PURE__ */ __name((text2) => text2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escaped");
|
|
26087
26085
|
var wholeWord = /* @__PURE__ */ __name((word) => new RegExp(`(?<![\\p{L}\\p{N}])${escaped(word)}(?![\\p{L}\\p{N}])`, "u"), "wholeWord");
|
|
26088
26086
|
var matcherOf = /* @__PURE__ */ __name((query) => {
|
|
@@ -26128,9 +26126,8 @@ var topics = {
|
|
|
26128
26126
|
}, "read")
|
|
26129
26127
|
};
|
|
26130
26128
|
|
|
26131
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26129
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/signals/index.js
|
|
26132
26130
|
var STATUS_SIGNALS = [
|
|
26133
|
-
lastMessage,
|
|
26134
26131
|
replyNext,
|
|
26135
26132
|
questions2,
|
|
26136
26133
|
promises,
|
|
@@ -26141,7 +26138,7 @@ var STATUS_SIGNALS = [
|
|
|
26141
26138
|
children
|
|
26142
26139
|
];
|
|
26143
26140
|
|
|
26144
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26141
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/project-status/index.js
|
|
26145
26142
|
var DAY4 = 864e5;
|
|
26146
26143
|
var STATUS_WINDOW = 300;
|
|
26147
26144
|
var STATUS_CHATS = 16;
|
|
@@ -26186,17 +26183,23 @@ var childrenOf = /* @__PURE__ */ __name(async (store, root, catalog) => {
|
|
|
26186
26183
|
}, "childrenOf");
|
|
26187
26184
|
var inAccounts = /* @__PURE__ */ __name((accounts, provider, account) => accounts === void 0 || accounts.some((one) => one.provider === provider && one.account === account), "inAccounts");
|
|
26188
26185
|
var failure = /* @__PURE__ */ __name((error) => error instanceof Error ? error.message : String(error), "failure");
|
|
26189
|
-
var
|
|
26190
|
-
const
|
|
26191
|
-
|
|
26192
|
-
|
|
26193
|
-
|
|
26186
|
+
var owed = /* @__PURE__ */ __name((item2) => {
|
|
26187
|
+
const data = item2.data;
|
|
26188
|
+
return item2.signal === "payments" && data.state === "expected" && data.status === "confirmed";
|
|
26189
|
+
}, "owed");
|
|
26190
|
+
var keepsBooks = /* @__PURE__ */ __name(async (store, projects) => {
|
|
26191
|
+
for (const project of projects) {
|
|
26192
|
+
const filter = { project, review: "confirmed", limit: 1 };
|
|
26193
|
+
if ((await store.finance.invoices(filter)).length || (await store.finance.payments(filter)).length)
|
|
26194
|
+
return true;
|
|
26195
|
+
}
|
|
26196
|
+
return false;
|
|
26197
|
+
}, "keepsBooks");
|
|
26194
26198
|
var totalsOf = /* @__PURE__ */ __name((items) => {
|
|
26195
26199
|
const totals = /* @__PURE__ */ new Map();
|
|
26196
|
-
const open7 = counted2(items);
|
|
26197
26200
|
for (const item2 of items) {
|
|
26198
26201
|
const data = item2.data;
|
|
26199
|
-
if (!
|
|
26202
|
+
if (!owed(item2) || data.amount === void 0)
|
|
26200
26203
|
continue;
|
|
26201
26204
|
const key = `${data.direction}|${data.currency ?? ""}`;
|
|
26202
26205
|
const total = totals.get(key) ?? {
|
|
@@ -26279,6 +26282,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26279
26282
|
chats,
|
|
26280
26283
|
project: { ...root, children: children2, cut },
|
|
26281
26284
|
store,
|
|
26285
|
+
books: await keepsBooks(store, [root.ref, ...children2.map((child) => child.ref)]),
|
|
26282
26286
|
contextQueries: input.contextQueries ?? []
|
|
26283
26287
|
};
|
|
26284
26288
|
const items = [];
|
|
@@ -26323,7 +26327,7 @@ var projectStatus = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
26323
26327
|
};
|
|
26324
26328
|
}, "projectStatus");
|
|
26325
26329
|
|
|
26326
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26330
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
26327
26331
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
26328
26332
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
26329
26333
|
if (deps.offline)
|
|
@@ -26395,7 +26399,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
26395
26399
|
};
|
|
26396
26400
|
}, "accountService");
|
|
26397
26401
|
|
|
26398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
26399
26403
|
var MINUTE = 6e4;
|
|
26400
26404
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
26401
26405
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -26414,7 +26418,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
26414
26418
|
return new Date(at - at % MINUTE).toISOString();
|
|
26415
26419
|
}, "sendTime");
|
|
26416
26420
|
|
|
26417
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
26418
26422
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
26419
26423
|
try {
|
|
26420
26424
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -26560,21 +26564,21 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
26560
26564
|
const answerAll = capability(connection, "answerAllJoinRequests", "answer every join request at once");
|
|
26561
26565
|
const { id: chatId } = await connection.resolve(chat);
|
|
26562
26566
|
const page = await list3(chatId, { limit: 100, ...link4 === void 0 ? {} : { link: link4 } });
|
|
26563
|
-
const
|
|
26567
|
+
const counted2 = page.total ?? page.items.length;
|
|
26564
26568
|
if (page.total === void 0 && page.hasMore)
|
|
26565
26569
|
throw new CliError("validation_error", "too many requests to count; answer them by person, or by --link");
|
|
26566
|
-
if (
|
|
26567
|
-
return { chatId, accepted: accept, counted:
|
|
26570
|
+
if (counted2 === 0)
|
|
26571
|
+
return { chatId, accepted: accept, counted: counted2 };
|
|
26568
26572
|
const operationId = newOperationId();
|
|
26569
26573
|
await guardedWrite(deps.guard, {
|
|
26570
26574
|
operationId,
|
|
26571
26575
|
chatId,
|
|
26572
26576
|
kind: "chat",
|
|
26573
26577
|
action: accept ? "requests.accept" : "requests.decline",
|
|
26574
|
-
count:
|
|
26575
|
-
people:
|
|
26578
|
+
count: counted2,
|
|
26579
|
+
people: counted2
|
|
26576
26580
|
}, () => answerAll(chatId, accept, link4));
|
|
26577
|
-
return { operationId, chatId, accepted: accept, counted:
|
|
26581
|
+
return { operationId, chatId, accepted: accept, counted: counted2 };
|
|
26578
26582
|
}, "answerAllRequests"),
|
|
26579
26583
|
links: /* @__PURE__ */ __name(async (chat, window3) => {
|
|
26580
26584
|
if (deps.offline)
|
|
@@ -26661,7 +26665,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
26661
26665
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
26662
26666
|
}, "linkLimits");
|
|
26663
26667
|
|
|
26664
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
26665
26669
|
var THREADS_PAGE = 500;
|
|
26666
26670
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
26667
26671
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -26740,7 +26744,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
26740
26744
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
26741
26745
|
}, "readMail");
|
|
26742
26746
|
|
|
26743
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26747
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
26744
26748
|
var NO_MAIL = "no_mail";
|
|
26745
26749
|
var MAIL = "email";
|
|
26746
26750
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -26787,7 +26791,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
26787
26791
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
26788
26792
|
}, "accountsOfKind");
|
|
26789
26793
|
|
|
26790
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26794
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
26791
26795
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
26792
26796
|
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");
|
|
26793
26797
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -27135,7 +27139,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
27135
27139
|
};
|
|
27136
27140
|
}, "statsLucene");
|
|
27137
27141
|
|
|
27138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27142
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
27139
27143
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
27140
27144
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
27141
27145
|
function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -27304,7 +27308,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
27304
27308
|
};
|
|
27305
27309
|
}, "readRankingSelection");
|
|
27306
27310
|
|
|
27307
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27311
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
27308
27312
|
var canonical = /* @__PURE__ */ __name((value, nested = false) => Array.isArray(value) ? value.map((one) => canonical(one, true)) : value !== null && typeof value === "object" ? Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0 && (nested || one !== false)).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0).map(([key, one]) => [key, canonical(one, true)])) : value, "canonical");
|
|
27309
27313
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
27310
27314
|
command,
|
|
@@ -27314,7 +27318,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
27314
27318
|
fieldsVersion: FIELD_VERSION
|
|
27315
27319
|
}), "searchRecordOf");
|
|
27316
27320
|
|
|
27317
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27321
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
27318
27322
|
function invalid4(message) {
|
|
27319
27323
|
throw new CliError("validation_error", message);
|
|
27320
27324
|
}
|
|
@@ -27608,7 +27612,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
27608
27612
|
}, "evidence")
|
|
27609
27613
|
}), "adminStatisticsService");
|
|
27610
27614
|
|
|
27611
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27615
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
27612
27616
|
import { createHash as createHash7, randomUUID as randomUUID4 } from "node:crypto";
|
|
27613
27617
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
27614
27618
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -27745,12 +27749,12 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
27745
27749
|
return { plan, repair };
|
|
27746
27750
|
}, "gapsService");
|
|
27747
27751
|
|
|
27748
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27752
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
27749
27753
|
import { createHash as createHash9 } from "node:crypto";
|
|
27750
27754
|
import { constants as constants2, mkdirSync as mkdirSync2 } from "node:fs";
|
|
27751
27755
|
import { lstat as lstat4, open as open6, readFile, stat as stat2 } from "node:fs/promises";
|
|
27752
27756
|
|
|
27753
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27757
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
27754
27758
|
import { lstat as lstat2, readdir as readdir2, realpath as realpath3 } from "node:fs/promises";
|
|
27755
27759
|
import { basename as basename4, join as join9, relative as relative2, sep as sep2 } from "node:path";
|
|
27756
27760
|
var MAX_FILES = 1e4;
|
|
@@ -27821,15 +27825,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
27821
27825
|
return choices;
|
|
27822
27826
|
}, "directoryPaths");
|
|
27823
27827
|
|
|
27824
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27828
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
27825
27829
|
import { posix } from "node:path";
|
|
27826
27830
|
|
|
27827
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27831
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27828
27832
|
import { setImmediate as tick } from "node:timers/promises";
|
|
27829
27833
|
import { crc32 } from "node:zlib";
|
|
27830
27834
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
27831
27835
|
|
|
27832
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27836
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
27833
27837
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
27834
27838
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
27835
27839
|
var SAMPLE = 65536;
|
|
@@ -27931,7 +27935,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
27931
27935
|
return result.text;
|
|
27932
27936
|
}, "decodeXml");
|
|
27933
27937
|
|
|
27934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
27935
27939
|
var MAX_PART = 10 * 1024 * 1024;
|
|
27936
27940
|
var MAX_ENTRIES = 1e3;
|
|
27937
27941
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -28146,7 +28150,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
28146
28150
|
return found;
|
|
28147
28151
|
}, "elements");
|
|
28148
28152
|
|
|
28149
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
28150
28154
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
28151
28155
|
let name = "";
|
|
28152
28156
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -28201,7 +28205,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
28201
28205
|
return { text: parts.join("").trim(), truncated: false };
|
|
28202
28206
|
}, "sheetText");
|
|
28203
28207
|
|
|
28204
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28208
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
28205
28209
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
28206
28210
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
28207
28211
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -28601,10 +28605,10 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
28601
28605
|
}
|
|
28602
28606
|
}, "readDocument");
|
|
28603
28607
|
|
|
28604
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
28605
28609
|
import { extname as extname3 } from "node:path";
|
|
28606
28610
|
|
|
28607
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
28608
28612
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
28609
28613
|
import { dirname as dirname4, extname as extname2, join as join10 } from "node:path";
|
|
28610
28614
|
import { fileURLToPath } from "node:url";
|
|
@@ -28665,7 +28669,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
28665
28669
|
}
|
|
28666
28670
|
}, "derived");
|
|
28667
28671
|
|
|
28668
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28672
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
28669
28673
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
28670
28674
|
var image2 = {
|
|
28671
28675
|
id: "image",
|
|
@@ -28674,7 +28678,7 @@ var image2 = {
|
|
|
28674
28678
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
28675
28679
|
};
|
|
28676
28680
|
|
|
28677
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28681
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
28678
28682
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
28679
28683
|
var doc = {
|
|
28680
28684
|
id: "doc",
|
|
@@ -28686,7 +28690,7 @@ var doc = {
|
|
|
28686
28690
|
}), "read")
|
|
28687
28691
|
};
|
|
28688
28692
|
|
|
28689
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28693
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
28690
28694
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
28691
28695
|
var docx = {
|
|
28692
28696
|
id: "docx",
|
|
@@ -28699,7 +28703,7 @@ var docx = {
|
|
|
28699
28703
|
}), "read")
|
|
28700
28704
|
};
|
|
28701
28705
|
|
|
28702
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
28703
28707
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
28704
28708
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
28705
28709
|
"fonttbl",
|
|
@@ -28875,7 +28879,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
28875
28879
|
}, "htmlText");
|
|
28876
28880
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
28877
28881
|
|
|
28878
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
28879
28883
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
28880
28884
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
28881
28885
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -28931,7 +28935,7 @@ var markdownSections = /* @__PURE__ */ __name((text2) => {
|
|
|
28931
28935
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text2.length }));
|
|
28932
28936
|
}, "markdownSections");
|
|
28933
28937
|
|
|
28934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28938
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
28935
28939
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
28936
28940
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
28937
28941
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -29002,7 +29006,7 @@ var html = {
|
|
|
29002
29006
|
}, "read")
|
|
29003
29007
|
};
|
|
29004
29008
|
|
|
29005
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29009
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
29006
29010
|
var office = {
|
|
29007
29011
|
id: "office",
|
|
29008
29012
|
version: documentExtractor("odt"),
|
|
@@ -29013,7 +29017,7 @@ var office = {
|
|
|
29013
29017
|
}, "read")
|
|
29014
29018
|
};
|
|
29015
29019
|
|
|
29016
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29020
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
29017
29021
|
var pdf = {
|
|
29018
29022
|
id: "pdf",
|
|
29019
29023
|
version: "unpdf",
|
|
@@ -29080,7 +29084,7 @@ var pdf = {
|
|
|
29080
29084
|
}), "read")
|
|
29081
29085
|
};
|
|
29082
29086
|
|
|
29083
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29087
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
29084
29088
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
29085
29089
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
29086
29090
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -29100,7 +29104,7 @@ var plain = {
|
|
|
29100
29104
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
29101
29105
|
};
|
|
29102
29106
|
|
|
29103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29107
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
29104
29108
|
var rtf = {
|
|
29105
29109
|
id: "rtf",
|
|
29106
29110
|
version: "v1",
|
|
@@ -29108,10 +29112,10 @@ var rtf = {
|
|
|
29108
29112
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
29109
29113
|
};
|
|
29110
29114
|
|
|
29111
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29112
29116
|
import { basename as basename5 } from "node:path";
|
|
29113
29117
|
|
|
29114
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29118
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
29115
29119
|
var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) => {
|
|
29116
29120
|
const cells = [];
|
|
29117
29121
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -29149,7 +29153,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text2, delimiter, maxCells = 1e4) =
|
|
|
29149
29153
|
return { cells, truncated };
|
|
29150
29154
|
}, "delimitedSpans");
|
|
29151
29155
|
|
|
29152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29156
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
29153
29157
|
var DELIMITED = {
|
|
29154
29158
|
".csv": ",",
|
|
29155
29159
|
".tsv": " ",
|
|
@@ -29188,7 +29192,7 @@ var sheets = {
|
|
|
29188
29192
|
}, "read")
|
|
29189
29193
|
};
|
|
29190
29194
|
|
|
29191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
29192
29196
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
29193
29197
|
var HEAD_BYTES = 1024;
|
|
29194
29198
|
var readers = [...BUILT_INS2];
|
|
@@ -29198,7 +29202,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
29198
29202
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
29199
29203
|
}, "readWithRegistry");
|
|
29200
29204
|
|
|
29201
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29205
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
29202
29206
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
29203
29207
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
29204
29208
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -30277,7 +30281,7 @@ function imageSize(input) {
|
|
|
30277
30281
|
}
|
|
30278
30282
|
__name(imageSize, "imageSize");
|
|
30279
30283
|
|
|
30280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
30281
30285
|
var MAX_PAGES = 20;
|
|
30282
30286
|
var MAX_PIXELS = 2e7;
|
|
30283
30287
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -30428,7 +30432,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
30428
30432
|
}
|
|
30429
30433
|
}, "ocrPdf");
|
|
30430
30434
|
|
|
30431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30435
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
30432
30436
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
30433
30437
|
const limits = pdfPreviewLimits(env);
|
|
30434
30438
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -30505,7 +30509,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
30505
30509
|
}
|
|
30506
30510
|
}, "pdfPreview");
|
|
30507
30511
|
|
|
30508
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30512
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
30509
30513
|
import { createHash as createHash8 } from "node:crypto";
|
|
30510
30514
|
import { constants } from "node:fs";
|
|
30511
30515
|
import { lstat as lstat3, open as open5 } from "node:fs/promises";
|
|
@@ -30613,7 +30617,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
30613
30617
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
30614
30618
|
}, "transferMime");
|
|
30615
30619
|
|
|
30616
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30620
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
30617
30621
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
30618
30622
|
import { link as link3, rm } from "node:fs/promises";
|
|
30619
30623
|
import { join as join11, resolve as resolve6 } from "node:path";
|
|
@@ -30727,7 +30731,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30727
30731
|
}
|
|
30728
30732
|
}, "save");
|
|
30729
30733
|
|
|
30730
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30734
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
30731
30735
|
var ATTACHMENT_QUERY = {
|
|
30732
30736
|
entity: "attachment",
|
|
30733
30737
|
backend: "sql",
|
|
@@ -31150,7 +31154,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31150
31154
|
}, "setText")
|
|
31151
31155
|
}), "attachmentsService");
|
|
31152
31156
|
|
|
31153
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31157
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
31154
31158
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
31155
31159
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
31156
31160
|
const store = await accountStore(deps);
|
|
@@ -31180,7 +31184,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
31180
31184
|
}, "list")
|
|
31181
31185
|
}), "chatDocumentsService");
|
|
31182
31186
|
|
|
31183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31187
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
31184
31188
|
var observationDuration = /* @__PURE__ */ __name((text2, flag) => {
|
|
31185
31189
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text2);
|
|
31186
31190
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -31267,7 +31271,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
31267
31271
|
}
|
|
31268
31272
|
}, "isRetentionSelection");
|
|
31269
31273
|
|
|
31270
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31274
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
31271
31275
|
var counterFields = /* @__PURE__ */ __name((text2 = "views,reactions,comments") => {
|
|
31272
31276
|
const fields = text2.split(",").map((one) => one.trim());
|
|
31273
31277
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -31474,7 +31478,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
31474
31478
|
};
|
|
31475
31479
|
}, "countersService");
|
|
31476
31480
|
|
|
31477
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
31478
31482
|
var SYNC_KEY = "messages.sync-first";
|
|
31479
31483
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
31480
31484
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -31566,7 +31570,7 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
31566
31570
|
}
|
|
31567
31571
|
try {
|
|
31568
31572
|
const newest = (await store.messages.messages(account, chatId, { limit: 1 })).items[0];
|
|
31569
|
-
let
|
|
31573
|
+
let counted2 = 0;
|
|
31570
31574
|
const fetched = await archiveService(deps).fetch(chatId, {
|
|
31571
31575
|
limit: options.maxMessages - result.messages,
|
|
31572
31576
|
pageSize: Math.min(100, deps.messenger.fetching?.maxPageSize ?? 100),
|
|
@@ -31575,11 +31579,11 @@ var refreshSearch = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
31575
31579
|
stop,
|
|
31576
31580
|
note,
|
|
31577
31581
|
onPage: /* @__PURE__ */ __name(({ fetched: fetched2 }) => {
|
|
31578
|
-
result.messages += fetched2 -
|
|
31579
|
-
|
|
31582
|
+
result.messages += fetched2 - counted2;
|
|
31583
|
+
counted2 = fetched2;
|
|
31580
31584
|
}, "onPage")
|
|
31581
31585
|
});
|
|
31582
|
-
result.messages += fetched.fetched -
|
|
31586
|
+
result.messages += fetched.fetched - counted2;
|
|
31583
31587
|
if (fetched.stopped || !fetched.complete && !fetched.reachedSince) {
|
|
31584
31588
|
result.complete = false;
|
|
31585
31589
|
result.failed.push({
|
|
@@ -31606,7 +31610,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
31606
31610
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
31607
31611
|
}), "withRefresh");
|
|
31608
31612
|
|
|
31609
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31613
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
31610
31614
|
var CANDIDATES = 50;
|
|
31611
31615
|
var WORD_HITS = 200;
|
|
31612
31616
|
var RRF_K = 60;
|
|
@@ -31881,13 +31885,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
31881
31885
|
return mean2.map((value) => value / length);
|
|
31882
31886
|
}, "meanOf");
|
|
31883
31887
|
|
|
31884
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
31885
31889
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
31886
31890
|
...embeddingsMaintenance(deps),
|
|
31887
31891
|
...embeddingsSearch(deps)
|
|
31888
31892
|
}), "embeddingsService");
|
|
31889
31893
|
|
|
31890
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31894
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
31891
31895
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
31892
31896
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
31893
31897
|
if (deps.offline)
|
|
@@ -32028,7 +32032,7 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
32028
32032
|
};
|
|
32029
32033
|
}, "foldersService");
|
|
32030
32034
|
|
|
32031
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
32032
32036
|
var REVIEW_COUNT = 500;
|
|
32033
32037
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
32034
32038
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -32107,7 +32111,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
32107
32111
|
};
|
|
32108
32112
|
}, "mentionsService");
|
|
32109
32113
|
|
|
32110
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32114
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
32111
32115
|
var fileLinks = /* @__PURE__ */ __name((attachments) => hitFiles(attachments).map(({ position, kind, name }) => ({
|
|
32112
32116
|
position,
|
|
32113
32117
|
kind,
|
|
@@ -32156,7 +32160,7 @@ var validatePermalink = /* @__PURE__ */ __name((link4) => {
|
|
|
32156
32160
|
return { url: link4.url, access: link4.access, reason: link4.reason };
|
|
32157
32161
|
}, "validatePermalink");
|
|
32158
32162
|
|
|
32159
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32163
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
32160
32164
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
32161
32165
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
32162
32166
|
return `${seconds / 86400}d`;
|
|
@@ -32188,7 +32192,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
32188
32192
|
return seconds;
|
|
32189
32193
|
}, "pinDurationOf");
|
|
32190
32194
|
|
|
32191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
32192
32196
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
32193
32197
|
if (sendAs === void 0) {
|
|
32194
32198
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -32213,7 +32217,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
32213
32217
|
return sendAs;
|
|
32214
32218
|
}, "typedSendAs");
|
|
32215
32219
|
|
|
32216
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32220
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/search/total.js
|
|
32217
32221
|
var TOTAL_CAP = 1e4;
|
|
32218
32222
|
var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
32219
32223
|
const least = shown + (hasMore ? 1 : 0);
|
|
@@ -32224,7 +32228,7 @@ var totalOf = /* @__PURE__ */ __name((count4, shown, hasMore, exact = true) => {
|
|
|
32224
32228
|
return { value: count4, relation: exact ? "eq" : "gte" };
|
|
32225
32229
|
}, "totalOf");
|
|
32226
32230
|
|
|
32227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32231
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/search/lucene/meaning-parts.js
|
|
32228
32232
|
var WORD_FIELDS = /* @__PURE__ */ new Set(["text", "exact"]);
|
|
32229
32233
|
var fieldsOfQuery = /* @__PURE__ */ __name((root, everything) => {
|
|
32230
32234
|
let narrows = false;
|
|
@@ -32253,7 +32257,7 @@ var meaningWords = /* @__PURE__ */ __name((root) => {
|
|
|
32253
32257
|
return wanted(root).join(" ").trim();
|
|
32254
32258
|
}, "meaningWords");
|
|
32255
32259
|
|
|
32256
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32260
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
32257
32261
|
var words2 = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
32258
32262
|
var scaffolding = new Set(words2("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"));
|
|
32259
32263
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -32385,7 +32389,7 @@ var questionLookup = /* @__PURE__ */ __name((text2) => {
|
|
|
32385
32389
|
return terms.length ? anyOfTerms(terms, plan.scope) : void 0;
|
|
32386
32390
|
}, "questionLookup");
|
|
32387
32391
|
|
|
32388
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32392
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
32389
32393
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
32390
32394
|
var tokensOf = /* @__PURE__ */ __name((text2) => normalize(text2).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
32391
32395
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -32578,7 +32582,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
32578
32582
|
return mode === "coverage" ? coverage2 * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage2 * 4 + proximity + phrase;
|
|
32579
32583
|
}, "signals");
|
|
32580
32584
|
|
|
32581
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
32582
32586
|
var MEANING_DEPTH = 100;
|
|
32583
32587
|
var RRF_K2 = 60;
|
|
32584
32588
|
var RERANK_DEPTH = 50;
|
|
@@ -32903,7 +32907,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
32903
32907
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
32904
32908
|
}, "mixedWithReranker");
|
|
32905
32909
|
|
|
32906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
32907
32911
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
32908
32912
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
32909
32913
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -33102,7 +33106,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
33102
33106
|
return result;
|
|
33103
33107
|
}, "readThreadContext");
|
|
33104
33108
|
|
|
33105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33109
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
33106
33110
|
var SEARCH_FILL_MS = 200;
|
|
33107
33111
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
33108
33112
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -33169,12 +33173,12 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
33169
33173
|
}, "accountOf");
|
|
33170
33174
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
33171
33175
|
|
|
33172
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33176
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33173
33177
|
import { createHash as createHash10 } from "node:crypto";
|
|
33174
33178
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
33175
33179
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
33176
33180
|
|
|
33177
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/models.js
|
|
33178
33182
|
var GROUP_SETTINGS = [
|
|
33179
33183
|
"allCanPin",
|
|
33180
33184
|
"onlyAdminsAdd",
|
|
@@ -33188,7 +33192,7 @@ var ADMIN_RIGHTS = ["read", "members", "admins", "info", "pin", "link", "post",
|
|
|
33188
33192
|
var senderIsMe = /* @__PURE__ */ __name((message, account) => message.outgoing === true || message.senderId !== null && String(message.senderId) === account, "senderIsMe");
|
|
33189
33193
|
var MEDIA_KINDS = ["photo", "video", "file", "audio", "link"];
|
|
33190
33194
|
|
|
33191
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33195
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
33192
33196
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
33193
33197
|
var PICTURE_FLOOR = 0.25;
|
|
33194
33198
|
var PAGE5 = 50;
|
|
@@ -33205,7 +33209,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33205
33209
|
const directory2 = imageModelsDirectory(deps.env);
|
|
33206
33210
|
if (!isImageModelInstalled(model2, directory2))
|
|
33207
33211
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
33208
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33212
|
+
const { openPictureEmbedder } = await import("./embedder-KBBRYSNH.js");
|
|
33209
33213
|
return openPictureEmbedder(model2, directory2);
|
|
33210
33214
|
}, "open");
|
|
33211
33215
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33402,7 +33406,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
33402
33406
|
}, "search")
|
|
33403
33407
|
}), "withPictures");
|
|
33404
33408
|
|
|
33405
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33409
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
33406
33410
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared, within) => {
|
|
33407
33411
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
33408
33412
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -33470,7 +33474,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
33470
33474
|
}
|
|
33471
33475
|
}, "meaningLane");
|
|
33472
33476
|
|
|
33473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33477
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
33474
33478
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
33475
33479
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
33476
33480
|
if (choice === "off")
|
|
@@ -33482,9 +33486,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33482
33486
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
33483
33487
|
try {
|
|
33484
33488
|
const warm = deps.embedders;
|
|
33485
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
33489
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-3CVLTCTA.js")).openRerankerProcess(model, directory2, {
|
|
33486
33490
|
threads: defaultThreads()
|
|
33487
|
-
})) : await (await import("./rerank-
|
|
33491
|
+
})) : await (await import("./rerank-OWSTDLZN.js")).openReranker(model, directory2);
|
|
33488
33492
|
return {
|
|
33489
33493
|
model: model.id,
|
|
33490
33494
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33504,17 +33508,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33504
33508
|
};
|
|
33505
33509
|
}, "rerankLane");
|
|
33506
33510
|
|
|
33507
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
33508
33512
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
33509
33513
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
33510
33514
|
const directory2 = imageModelsDirectory(env);
|
|
33511
33515
|
if (!isImageModelInstalled(model, directory2))
|
|
33512
33516
|
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 });
|
|
33513
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33517
|
+
const { openPictureEmbedder } = await import("./embedder-KBBRYSNH.js");
|
|
33514
33518
|
return openPictureEmbedder(model, directory2);
|
|
33515
33519
|
}, "openPictureEmbedderFor");
|
|
33516
33520
|
|
|
33517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
33518
33522
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
33519
33523
|
const metadata = note.frontMatter;
|
|
33520
33524
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -33529,7 +33533,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
33529
33533
|
};
|
|
33530
33534
|
}, "documentSource");
|
|
33531
33535
|
|
|
33532
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
33533
33537
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
33534
33538
|
let root;
|
|
33535
33539
|
try {
|
|
@@ -33556,7 +33560,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words3) => {
|
|
|
33556
33560
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
33557
33561
|
}, "titleTiers");
|
|
33558
33562
|
|
|
33559
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33563
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
33560
33564
|
var storeQuery = /* @__PURE__ */ __name(async (store, text2, { exact, timezone } = {}) => resolvedQuery(store, parsedQuery(text2, exact), timezone), "storeQuery");
|
|
33561
33565
|
var parsedQuery = /* @__PURE__ */ __name((text2, exact) => validateFields(parseLucene(text2, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" })).root, "parsedQuery");
|
|
33562
33566
|
var resolvedQuery = /* @__PURE__ */ __name(async (store, root, timezone) => {
|
|
@@ -33835,13 +33839,13 @@ var searchNotes = /* @__PURE__ */ __name(async (store, query, { limit = 20, offs
|
|
|
33835
33839
|
meaningSkipped = error.message;
|
|
33836
33840
|
}
|
|
33837
33841
|
}
|
|
33838
|
-
const
|
|
33839
|
-
const titled =
|
|
33840
|
-
text: [titleQuery(
|
|
33842
|
+
const titleWords2 = plainQueryWords(rest);
|
|
33843
|
+
const titled = titleWords2 === void 0 ? { items: [], hasMore: false } : await searchNotesQuery(store, {
|
|
33844
|
+
text: [titleQuery(titleWords2), filter ?? ""].filter(Boolean).join(" AND "),
|
|
33841
33845
|
limit: Math.max(window3, CANDIDATES2),
|
|
33842
33846
|
...scope
|
|
33843
33847
|
});
|
|
33844
|
-
const tier =
|
|
33848
|
+
const tier = titleWords2 === void 0 ? [] : titleTiers(titled.items, titleWords2);
|
|
33845
33849
|
const tierRefs = new Set(tier.map(({ ref }) => ref));
|
|
33846
33850
|
const slice = meaning === void 0 && tier.length === 0;
|
|
33847
33851
|
const matched = await searchNotesQuery(store, {
|
|
@@ -33973,7 +33977,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text2, { accou
|
|
|
33973
33977
|
};
|
|
33974
33978
|
}, "searchNotesOf");
|
|
33975
33979
|
|
|
33976
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33980
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
33977
33981
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
33978
33982
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
33979
33983
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -34090,8 +34094,8 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
34090
34094
|
};
|
|
34091
34095
|
}, "searchEvents");
|
|
34092
34096
|
|
|
34093
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34094
|
-
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
34097
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
34098
|
+
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events", "crm"];
|
|
34095
34099
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
34096
34100
|
var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
34097
34101
|
const { root } = parseLucene(text2, MESSAGE_PARSING);
|
|
@@ -34099,6 +34103,15 @@ var filtersBeside = /* @__PURE__ */ __name((text2) => {
|
|
|
34099
34103
|
const top = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34100
34104
|
return top.every(({ node, occur }) => occur !== "must_not" && followable(node, occur === "must")) ? planQuestion(text2).scope : void 0;
|
|
34101
34105
|
}, "filtersBeside");
|
|
34106
|
+
var titleWords = /* @__PURE__ */ __name((text2) => {
|
|
34107
|
+
const { root } = parseLucene(text2, SEARCH_QUERY);
|
|
34108
|
+
const clauses = root.kind === "boolean" ? root.clauses : [{ node: root, occur: "must" }];
|
|
34109
|
+
const words3 = clauses.map(({ node, occur }) => occur !== "must_not" && node.kind === "predicate" && node.field === "text" && (node.operator === "term" || node.operator === "phrase") ? node.value : (() => {
|
|
34110
|
+
throw new CliError("validation_error", "deals and leads are found by the words of their title only");
|
|
34111
|
+
})());
|
|
34112
|
+
return { words: words3, anyWord: clauses.length > 1 && clauses.every(({ occur }) => occur === "should") };
|
|
34113
|
+
}, "titleWords");
|
|
34114
|
+
var crmAccounts = /* @__PURE__ */ __name(async (store) => (await store.accounts.accounts()).filter(({ provider }) => kindIn(provider) === "crm"), "crmAccounts");
|
|
34102
34115
|
var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, searchMessages = (query) => searchStore(store, account, query, messenger), meaning) => {
|
|
34103
34116
|
if (!request.text.trim())
|
|
34104
34117
|
throw new CliError("validation_error", "say what to find");
|
|
@@ -34277,6 +34290,29 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
34277
34290
|
foundBy: hit.found_by
|
|
34278
34291
|
})));
|
|
34279
34292
|
accounts.push(...read.map(({ provider, account: account2 }) => ({ resource, provider, account: account2 })));
|
|
34293
|
+
} else if (resource === "crm") {
|
|
34294
|
+
const { words: words3, anyWord } = titleWords(request.text);
|
|
34295
|
+
const chosen = request.scope?.crm;
|
|
34296
|
+
const found = await store.deals.find({
|
|
34297
|
+
words: words3,
|
|
34298
|
+
anyWord: anyWord || discover,
|
|
34299
|
+
limit: Math.min(window3 + 1, 500),
|
|
34300
|
+
...chosen === void 0 ? {} : { accounts: chosen }
|
|
34301
|
+
});
|
|
34302
|
+
hasMore ||= found.length > window3;
|
|
34303
|
+
lists.push(found.slice(0, window3).map((deal) => ({
|
|
34304
|
+
kind: deal.kind,
|
|
34305
|
+
ref: deal.ref,
|
|
34306
|
+
provider: deal.account?.provider ?? "crm",
|
|
34307
|
+
account: deal.account?.account ?? INTERNAL_NOTES,
|
|
34308
|
+
title: deal.title,
|
|
34309
|
+
timestamp: deal.updatedAt,
|
|
34310
|
+
text: deal.summary,
|
|
34311
|
+
foundBy: ["title"]
|
|
34312
|
+
})));
|
|
34313
|
+
const read = chosen ?? [...await crmAccounts(store), { provider: "crm", account: INTERNAL_NOTES }];
|
|
34314
|
+
for (const { provider, account: account2 } of read)
|
|
34315
|
+
accounts.push({ resource, provider, account: account2 });
|
|
34280
34316
|
} else
|
|
34281
34317
|
lists.push(await messagesOf(resource));
|
|
34282
34318
|
searched.push(resource);
|
|
@@ -34319,7 +34355,7 @@ var oneList = /* @__PURE__ */ __name((lists, cosines) => {
|
|
|
34319
34355
|
return [...place.values()].sort((a, b) => a.rank - b.rank || cosine(b.item.ref) - cosine(a.item.ref)).map(({ item: item2 }) => item2);
|
|
34320
34356
|
}, "oneList");
|
|
34321
34357
|
|
|
34322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34358
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
34323
34359
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
34324
34360
|
var whole3 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
34325
34361
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -34564,7 +34600,8 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34564
34600
|
messages: named2("messages"),
|
|
34565
34601
|
mail: named2("mail"),
|
|
34566
34602
|
notes: named2("notes"),
|
|
34567
|
-
events: named2("events")
|
|
34603
|
+
events: named2("events"),
|
|
34604
|
+
crm: named2("crm")
|
|
34568
34605
|
},
|
|
34569
34606
|
...meetings[0] ? { meetingAccount: meetings[0] } : {}
|
|
34570
34607
|
}, messenger, searchMessages, meaning);
|
|
@@ -34572,7 +34609,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
34572
34609
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
34573
34610
|
}, "searchAllOfSource");
|
|
34574
34611
|
|
|
34575
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34612
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
34576
34613
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
34577
34614
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3, textBytes: 262144 };
|
|
34578
34615
|
var DEFAULT_BACKEND = "both";
|
|
@@ -34761,7 +34798,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
34761
34798
|
return { report, sources };
|
|
34762
34799
|
}, "searchServer");
|
|
34763
34800
|
|
|
34764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34801
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
34765
34802
|
var DELETE_AT_ONCE = 10;
|
|
34766
34803
|
var filesOf = /* @__PURE__ */ __name(({ attachments }) => {
|
|
34767
34804
|
const files = fileLinks(attachments);
|
|
@@ -35202,7 +35239,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
35202
35239
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
35203
35240
|
}, "checkMediaOptions");
|
|
35204
35241
|
|
|
35205
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35242
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
35206
35243
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
35207
35244
|
var RULES = {
|
|
35208
35245
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -35217,7 +35254,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
35217
35254
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
35218
35255
|
}), "classifyChannel");
|
|
35219
35256
|
|
|
35220
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35257
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
35221
35258
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
35222
35259
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
35223
35260
|
const store = await deps.store();
|
|
@@ -35303,7 +35340,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
35303
35340
|
};
|
|
35304
35341
|
}, "metadataService");
|
|
35305
35342
|
|
|
35306
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35343
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
35307
35344
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
35308
35345
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
35309
35346
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -35340,7 +35377,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
35340
35377
|
return { chatId, rows, notes };
|
|
35341
35378
|
}, "moderateWith");
|
|
35342
35379
|
|
|
35343
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35380
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
35344
35381
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
35345
35382
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
35346
35383
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -35418,7 +35455,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
35418
35455
|
}, "removePerson")
|
|
35419
35456
|
}), "moderatorOf");
|
|
35420
35457
|
|
|
35421
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35458
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
35422
35459
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
35423
35460
|
id: note.id,
|
|
35424
35461
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -35462,7 +35499,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
35462
35499
|
};
|
|
35463
35500
|
}, "privatePeopleService");
|
|
35464
35501
|
|
|
35465
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35502
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
35466
35503
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
35467
35504
|
total: 0,
|
|
35468
35505
|
population: 0,
|
|
@@ -35718,7 +35755,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
35718
35755
|
}, "evidence")
|
|
35719
35756
|
}), "rankingsService");
|
|
35720
35757
|
|
|
35721
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35758
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/reply-stats.js
|
|
35722
35759
|
var FIELDS = ["date", "chat", "kind"];
|
|
35723
35760
|
var WAITING_TAIL = 100;
|
|
35724
35761
|
var plainOnly = /* @__PURE__ */ __name((text2, command) => {
|
|
@@ -35845,7 +35882,7 @@ var replyStatsService = /* @__PURE__ */ __name((deps) => {
|
|
|
35845
35882
|
};
|
|
35846
35883
|
}, "replyStatsService");
|
|
35847
35884
|
|
|
35848
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
35885
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
35849
35886
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
35850
35887
|
id: one.id,
|
|
35851
35888
|
name: one.name,
|
|
@@ -35974,7 +36011,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
35974
36011
|
};
|
|
35975
36012
|
}, "searchesService");
|
|
35976
36013
|
|
|
35977
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36014
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
35978
36015
|
var TAGGING_QUERY = {
|
|
35979
36016
|
entity: "tagging",
|
|
35980
36017
|
backend: "sql",
|
|
@@ -36058,7 +36095,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36058
36095
|
};
|
|
36059
36096
|
}, "tagsService");
|
|
36060
36097
|
|
|
36061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36098
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
36062
36099
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden, icon }) => {
|
|
36063
36100
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
36064
36101
|
if (title !== void 0 || icon !== void 0 || set !== 1)
|
|
@@ -36257,7 +36294,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
36257
36294
|
};
|
|
36258
36295
|
}, "topicsService");
|
|
36259
36296
|
|
|
36260
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36297
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
36261
36298
|
import { createHash as createHash11, randomUUID as randomUUID5 } from "node:crypto";
|
|
36262
36299
|
var hash2 = /* @__PURE__ */ __name((value) => createHash11("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
36263
36300
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -36331,7 +36368,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
36331
36368
|
return { ...content, id: randomUUID5(), fingerprint: hash2(content) };
|
|
36332
36369
|
}, "prepareEvidencePacket");
|
|
36333
36370
|
|
|
36334
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36371
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
36335
36372
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
36336
36373
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
36337
36374
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -36351,7 +36388,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
36351
36388
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
36352
36389
|
}, "readEvidencePacket");
|
|
36353
36390
|
|
|
36354
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36391
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
36355
36392
|
var scopeKeys = [
|
|
36356
36393
|
"accountId",
|
|
36357
36394
|
"meetingId",
|
|
@@ -36373,7 +36410,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
36373
36410
|
"maxVocabularyReadBytes"
|
|
36374
36411
|
]);
|
|
36375
36412
|
|
|
36376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
36377
36414
|
var communicationFields = {
|
|
36378
36415
|
sources: pipe(array(strictObject({
|
|
36379
36416
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -36405,7 +36442,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
36405
36442
|
return { ...input, after, before: before2 };
|
|
36406
36443
|
}, "communicationRequest");
|
|
36407
36444
|
|
|
36408
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36445
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
36409
36446
|
var MEETING_PREPARATION_LIMITS = {
|
|
36410
36447
|
meetings: { min: 1, max: 20, default: 5 },
|
|
36411
36448
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -36478,7 +36515,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
36478
36515
|
};
|
|
36479
36516
|
}, "validateMeetingPreparationRequest");
|
|
36480
36517
|
|
|
36481
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36518
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
36482
36519
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
36483
36520
|
const fail2 = /* @__PURE__ */ __name(() => {
|
|
36484
36521
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -36526,7 +36563,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
36526
36563
|
}
|
|
36527
36564
|
}, "validatePreparationCommunications");
|
|
36528
36565
|
|
|
36529
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
36530
36567
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
36531
36568
|
const installer = ports.installer();
|
|
36532
36569
|
const argv = updateCommand(installer, packageName);
|
|
@@ -36591,7 +36628,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
36591
36628
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
36592
36629
|
}, "dayAfter");
|
|
36593
36630
|
|
|
36594
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36631
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
36595
36632
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
36596
36633
|
const pictures = picturesService(deps);
|
|
36597
36634
|
const base = {
|
|
@@ -36628,7 +36665,7 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
36628
36665
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
36629
36666
|
}, "servicesFor");
|
|
36630
36667
|
|
|
36631
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36668
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
36632
36669
|
import { createHash as createHash12 } from "node:crypto";
|
|
36633
36670
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync3, rmSync } from "node:fs";
|
|
36634
36671
|
import { createConnection, createServer } from "node:net";
|
|
@@ -36849,7 +36886,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
36849
36886
|
}, () => finish({ error: stopped() }));
|
|
36850
36887
|
}), "relayCommand");
|
|
36851
36888
|
|
|
36852
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36889
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.600.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._6a3165a3e9bffd3483d86046d9ef2956/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
36853
36890
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
36854
36891
|
close: /* @__PURE__ */ __name(async () => {
|
|
36855
36892
|
}, "close"),
|
|
@@ -36939,6 +36976,7 @@ export {
|
|
|
36939
36976
|
syncsOneChat,
|
|
36940
36977
|
throughWrapper,
|
|
36941
36978
|
capability,
|
|
36979
|
+
withTimeLimit,
|
|
36942
36980
|
newSendId,
|
|
36943
36981
|
newOperationId,
|
|
36944
36982
|
batchProgress,
|