@wirecat/tg-cli 0.102.0 → 0.103.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 +31 -19
- package/dist/bundle/{adapter-M2HRSFFL.js → adapter-QG3YFFOY.js} +49 -48
- package/dist/bundle/{all-profiles-GOD2QNTK.js → all-profiles-ECXH3TBF.js} +13 -13
- package/dist/bundle/{anthropic-LKU7RWMA.js → anthropic-5MKO3QX7.js} +10 -10
- package/dist/bundle/{bot-api-X3MPFVPL.js → bot-api-4DQPIOMK.js} +50 -49
- package/dist/bundle/{bot-history-OUMVVG22.js → bot-history-UN74XXLU.js} +19 -19
- package/dist/bundle/{bun-LIZ6MKFS.js → bun-PS73VF2C.js} +5 -5
- package/dist/bundle/{bun-sqlite-2IFQYQ44.js → bun-sqlite-RAWGPH23.js} +8 -8
- package/dist/bundle/{chunk-ZZLKX62Z.js → chunk-2ABQZVK4.js} +3 -3
- package/dist/bundle/{chunk-5D6OJREA.js → chunk-3CP7RK5R.js} +4 -4
- package/dist/bundle/{chunk-QL7CQ6VZ.js → chunk-3IXKDIPH.js} +48 -48
- package/dist/bundle/{chunk-F2TG3BA2.js → chunk-3QX6SOEO.js} +9 -9
- package/dist/bundle/{chunk-MGG7JSNO.js → chunk-537O7OVE.js} +6 -6
- package/dist/bundle/{chunk-M5UH5CF3.js → chunk-57XGUIXA.js} +8 -8
- package/dist/bundle/{chunk-WMOEOVWZ.js → chunk-5D4AEUVA.js} +3 -3
- package/dist/bundle/{chunk-ENE5CSVY.js → chunk-5HPAPVCB.js} +276 -260
- package/dist/bundle/{chunk-OEJ5DMCX.js → chunk-67SRVSPU.js} +10 -10
- package/dist/bundle/{chunk-CLWYQNSC.js → chunk-6N25NZOE.js} +9 -9
- package/dist/bundle/{chunk-4QB4WDLT.js → chunk-AAMJZJYC.js} +15 -15
- package/dist/bundle/{chunk-AVWK4NCW.js → chunk-ADLS6FVG.js} +13 -13
- package/dist/bundle/{chunk-2SUTCDGO.js → chunk-AUKAZRF6.js} +5 -5
- package/dist/bundle/{chunk-OHBHHBYL.js → chunk-BV4N333Y.js} +6 -6
- package/dist/bundle/{chunk-UR6ASUSG.js → chunk-BYYSVINK.js} +6 -6
- package/dist/bundle/{chunk-Y4XSWI22.js → chunk-CMQ34EZL.js} +6 -6
- package/dist/bundle/{chunk-ERQDBK5I.js → chunk-COZ74WW4.js} +4 -4
- package/dist/bundle/{chunk-7BFO3DY6.js → chunk-DFDN6AUB.js} +2 -2
- package/dist/bundle/{chunk-264DAFJV.js → chunk-DLF3H6NP.js} +7 -7
- package/dist/bundle/{chunk-BQYTIYGB.js → chunk-DWQ4QT6X.js} +96 -96
- package/dist/bundle/{chunk-DE7LFMY2.js → chunk-EMC57SOZ.js} +11 -11
- package/dist/bundle/{chunk-GSKFAE3I.js → chunk-EQHQ2AX3.js} +148 -55
- package/dist/bundle/{chunk-XXTJUZMB.js → chunk-F27OI4J2.js} +4 -4
- package/dist/bundle/{chunk-2XBSVRT2.js → chunk-FG2QTYEF.js} +4 -4
- package/dist/bundle/{chunk-334UBWOB.js → chunk-FSPDODVT.js} +14 -14
- package/dist/bundle/{chunk-YHB57PFN.js → chunk-G5IMOOPB.js} +4 -4
- package/dist/bundle/{chunk-AUOXTGTU.js → chunk-GO354DJ5.js} +4 -4
- package/dist/bundle/{chunk-FOUE7XLK.js → chunk-H2UTBYFC.js} +4 -4
- package/dist/bundle/{chunk-V52SBQYF.js → chunk-HCDZWFXO.js} +17 -17
- package/dist/bundle/{chunk-5VSR5ENL.js → chunk-KCVDWZWS.js} +11 -11
- package/dist/bundle/{chunk-TV5DGHBT.js → chunk-KQ5BUI5T.js} +248 -248
- package/dist/bundle/{chunk-U4RRZUNP.js → chunk-LAYPLF7G.js} +35 -282
- package/dist/bundle/{chunk-5KU4UQBM.js → chunk-MFS52LTZ.js} +4 -4
- package/dist/bundle/{chunk-FBWOQMPE.js → chunk-MHHDVR4G.js} +227 -283
- package/dist/bundle/{chunk-VUJ34PEQ.js → chunk-NIVZHTN4.js} +15 -15
- package/dist/bundle/{chunk-JFSVXMN6.js → chunk-NKN54EDN.js} +6 -6
- package/dist/bundle/chunk-O5EHUB2V.js +2 -0
- package/dist/bundle/{chunk-PSH7K6TL.js → chunk-OGVBRRWY.js} +25 -25
- package/dist/bundle/{chunk-Q2NYEX4A.js → chunk-Q2LBOPKO.js} +57 -27
- package/dist/bundle/{chunk-UK3GAN7Q.js → chunk-QF7VVIF4.js} +11 -11
- package/dist/bundle/{chunk-WVEHUKCZ.js → chunk-RD7SSY7H.js} +4 -4
- package/dist/bundle/{chunk-TXBUDJ3P.js → chunk-RKQIEJFR.js} +5 -5
- package/dist/bundle/chunk-RMC2S3F4.js +264 -0
- package/dist/bundle/{chunk-4PDEQL6T.js → chunk-S5M4HFOZ.js} +6 -6
- package/dist/bundle/{chunk-BBC546ZA.js → chunk-SSALGKMJ.js} +6 -6
- package/dist/bundle/{chunk-QEPZUFPL.js → chunk-SSV37M5T.js} +59 -59
- package/dist/bundle/{chunk-DG62L57H.js → chunk-T4SDOYPY.js} +20 -20
- package/dist/bundle/{chunk-HLAZ65AW.js → chunk-TEO2KP52.js} +5 -5
- package/dist/bundle/{chunk-ZRNRQFTF.js → chunk-TPFLD4OM.js} +5 -5
- package/dist/bundle/{chunk-PYTOIDSM.js → chunk-VMU4SGCE.js} +7 -7
- package/dist/bundle/{chunk-W5EB4JLV.js → chunk-VZN5LD26.js} +6 -6
- package/dist/bundle/{chunk-ZJVZXJOG.js → chunk-WAGDZB62.js} +5 -5
- package/dist/bundle/{chunk-CRZPQQHE.js → chunk-WULARSC4.js} +26 -26
- package/dist/bundle/{chunk-BJG6JA5U.js → chunk-Y5E2WNWB.js} +4 -4
- package/dist/bundle/{chunk-OCWARAFE.js → chunk-YI72UVTJ.js} +5 -5
- package/dist/bundle/{chunk-SRU3OF4R.js → chunk-Z2DPNTSU.js} +5 -5
- package/dist/bundle/{chunk-5DFGJPT6.js → chunk-ZHXSRYJ5.js} +6 -6
- package/dist/bundle/{chunk-AFV74GK3.js → chunk-ZVVMGPBJ.js} +2 -2
- package/dist/bundle/command-contract-ZGFJTLB2.js +32 -0
- package/dist/bundle/{dist-RJMT44PL.js → dist-I7OZPHAZ.js} +3 -3
- package/dist/bundle/{echarts-27W2CIBD.js → echarts-UEQDIHVQ.js} +5 -5
- package/dist/bundle/{embed-FGJ273X2.js → embed-5DPZKRW5.js} +9 -8
- package/dist/bundle/{embedder-7ELL3CQ3.js → embedder-NBQXDXAO.js} +12 -11
- package/dist/bundle/entry-EE6YRAP4.js +14 -0
- package/dist/bundle/first-run-OSEVVWNT.js +24 -0
- package/dist/bundle/first-screen-753THOU6.js +30 -0
- package/dist/bundle/identity-LNH33PN3.js +11 -0
- package/dist/bundle/instructions-PYGVIT7I.js +9 -0
- package/dist/bundle/{mcp-4Y37G2UY.js → mcp-OQBZXELQ.js} +5 -5
- package/dist/bundle/{node-RSL3HANO.js → node-3OBKCX6M.js} +5 -5
- package/dist/bundle/{node-IUL5HSYI.js → node-P4E63KXA.js} +5 -5
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/{node-sqlite-7R3PYQGJ.js → node-sqlite-DMMTDRFB.js} +8 -8
- package/dist/bundle/oauth-FX5DDCRS.js +18 -0
- package/dist/bundle/open-G6QRQAAL.js +20 -0
- package/dist/bundle/{process-RMV3AKLB.js → process-47MMIFIJ.js} +5 -5
- package/dist/bundle/{program-PIUYQHBF.js → program-LBHBWRK5.js} +52 -51
- package/dist/bundle/prompt-CJ6Y4JYC.js +13 -0
- package/dist/bundle/proxy-transport-YSBYG26I.js +17 -0
- package/dist/bundle/{recognize-3GMOLZF4.js → recognize-7BLTOI45.js} +9 -9
- package/dist/bundle/remote-Q4A4JY6U.js +27 -0
- package/dist/bundle/{rerank-W3OSXXBN.js → rerank-CQAR46L3.js} +10 -9
- package/dist/bundle/{serve-ZCPO44NO.js → serve-2UO2YMMG.js} +13 -13
- package/dist/bundle/{server-YWL4HDOP.js → server-6XYURULQ.js} +53 -50
- package/dist/bundle/{server-FXU4QFRB.js → server-FMKC4RLL.js} +37 -35
- package/dist/bundle/{state-MJPTDIB5.js → state-RNWN2RDY.js} +9 -9
- package/dist/bundle/{store-6VNQG56O.js → store-BBHTR477.js} +14 -14
- package/dist/bundle/store-maintenance-command-GD6OLRXH.js +44 -0
- package/dist/bundle/tg.js +8 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -4
- package/dist/bundle/chunk-2SJOUK6J.js +0 -2
- package/dist/bundle/command-contract-A6VZN3ZR.js +0 -31
- package/dist/bundle/entry-SEE5YWIX.js +0 -14
- package/dist/bundle/first-run-BD7FEC3W.js +0 -24
- package/dist/bundle/first-screen-ASZV6LSA.js +0 -29
- package/dist/bundle/identity-QR4F42T6.js +0 -11
- package/dist/bundle/instructions-L74K64PV.js +0 -9
- package/dist/bundle/node-UPPL626U.js +0 -21
- package/dist/bundle/oauth-4ESGXF6U.js +0 -18
- package/dist/bundle/open-DFYEUGTA.js +0 -20
- package/dist/bundle/prompt-H7GYQQLL.js +0 -13
- package/dist/bundle/proxy-transport-G4MA6BGU.js +0 -17
- package/dist/bundle/remote-IRWTCI2B.js +0 -26
- package/dist/bundle/store-maintenance-command-62TQTMER.js +0 -43
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { createRequire as
|
|
2
|
-
const require =
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
Command,
|
|
5
|
+
DEFAULT_IMAGE_MODEL,
|
|
5
6
|
DEFAULT_RERANK_MODEL,
|
|
6
7
|
DEFAULT_TEXT_MODEL,
|
|
7
8
|
InvalidArgumentError,
|
|
@@ -16,12 +17,16 @@ import {
|
|
|
16
17
|
conversation,
|
|
17
18
|
environmentOf,
|
|
18
19
|
guardedWrite,
|
|
20
|
+
imageModel,
|
|
21
|
+
imageModelsDirectory,
|
|
22
|
+
isImageModelInstalled,
|
|
19
23
|
itemOf,
|
|
20
24
|
listOf,
|
|
21
25
|
meaningFloor,
|
|
22
26
|
nextStep,
|
|
23
27
|
oddName,
|
|
24
28
|
parseDuration,
|
|
29
|
+
placedImage,
|
|
25
30
|
renderAnswer,
|
|
26
31
|
rerankModel,
|
|
27
32
|
sentIds,
|
|
@@ -33,38 +38,38 @@ import {
|
|
|
33
38
|
typedCommand,
|
|
34
39
|
vectorModelKey,
|
|
35
40
|
withAttempt
|
|
36
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-EQHQ2AX3.js";
|
|
37
42
|
import {
|
|
38
43
|
isCliFailure
|
|
39
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EMC57SOZ.js";
|
|
40
45
|
import {
|
|
41
46
|
isNewer,
|
|
42
47
|
updateCommand
|
|
43
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VMU4SGCE.js";
|
|
44
49
|
import {
|
|
45
50
|
readOnlyLockOf
|
|
46
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-AUKAZRF6.js";
|
|
47
52
|
import {
|
|
48
53
|
MAX_MODEL_IMAGE_BYTES
|
|
49
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-YI72UVTJ.js";
|
|
50
55
|
import {
|
|
51
56
|
remoteKey
|
|
52
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-NKN54EDN.js";
|
|
53
58
|
import {
|
|
54
59
|
Unzip,
|
|
55
60
|
UnzipInflate,
|
|
56
61
|
defaultThreads,
|
|
57
|
-
filesPresent,
|
|
58
|
-
installFiles,
|
|
59
62
|
installNativeRuntime,
|
|
60
63
|
isTextModelInstalled,
|
|
61
|
-
megabytes,
|
|
62
64
|
openEmbedder,
|
|
63
65
|
placedText,
|
|
64
66
|
runEmbedders,
|
|
65
|
-
sharedModelsDirectory,
|
|
66
67
|
textModelsDirectory
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-LAYPLF7G.js";
|
|
69
|
+
import {
|
|
70
|
+
installFiles,
|
|
71
|
+
megabytes
|
|
72
|
+
} from "./chunk-RMC2S3F4.js";
|
|
68
73
|
import {
|
|
69
74
|
AGENDA_COLUMNS,
|
|
70
75
|
CHAT_COLUMNS,
|
|
@@ -132,7 +137,7 @@ import {
|
|
|
132
137
|
threadConversation,
|
|
133
138
|
validateAst,
|
|
134
139
|
validateFields
|
|
135
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-KQ5BUI5T.js";
|
|
136
141
|
import {
|
|
137
142
|
EVENT_QUERY,
|
|
138
143
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -176,27 +181,27 @@ import {
|
|
|
176
181
|
validateQuery,
|
|
177
182
|
walkQuery,
|
|
178
183
|
zonedMoment
|
|
179
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-SSV37M5T.js";
|
|
180
185
|
import {
|
|
181
186
|
DEFAULT_STEMMERS,
|
|
182
187
|
createStemmer,
|
|
183
188
|
fold,
|
|
184
189
|
normalize
|
|
185
|
-
} from "./chunk-
|
|
190
|
+
} from "./chunk-KCVDWZWS.js";
|
|
186
191
|
import {
|
|
187
192
|
DEFAULT_TASK_CATEGORIES,
|
|
188
193
|
FALLBACK_CATEGORY
|
|
189
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-3QX6SOEO.js";
|
|
190
195
|
import {
|
|
191
196
|
storePath,
|
|
192
197
|
wirecatDirectory
|
|
193
|
-
} from "./chunk-
|
|
198
|
+
} from "./chunk-TPFLD4OM.js";
|
|
194
199
|
import {
|
|
195
200
|
resolvePaths,
|
|
196
201
|
singleLine,
|
|
197
202
|
visibleControls,
|
|
198
203
|
writeSecurely
|
|
199
|
-
} from "./chunk-
|
|
204
|
+
} from "./chunk-T4SDOYPY.js";
|
|
200
205
|
import {
|
|
201
206
|
CliError,
|
|
202
207
|
array,
|
|
@@ -221,17 +226,17 @@ import {
|
|
|
221
226
|
string,
|
|
222
227
|
transform,
|
|
223
228
|
unknown
|
|
224
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-67SRVSPU.js";
|
|
225
230
|
import {
|
|
226
231
|
importFrom,
|
|
227
232
|
resolveFrom
|
|
228
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
229
234
|
import {
|
|
230
235
|
__commonJS,
|
|
231
236
|
__name,
|
|
232
237
|
__require,
|
|
233
238
|
__toESM
|
|
234
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
235
240
|
|
|
236
241
|
// node_modules/.pnpm/@xmldom+xmldom@0.9.12/node_modules/@xmldom/xmldom/lib/conventions.js
|
|
237
242
|
var require_conventions = __commonJS({
|
|
@@ -16841,7 +16846,7 @@ var require_lib3 = __commonJS({
|
|
|
16841
16846
|
}
|
|
16842
16847
|
});
|
|
16843
16848
|
|
|
16844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16849
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/conversations/link.js
|
|
16845
16850
|
var RULES_VERSION = 5;
|
|
16846
16851
|
var LOOK_BACK = 50;
|
|
16847
16852
|
var SAME_SENDER_WITHIN = 10;
|
|
@@ -16931,15 +16936,15 @@ var latest = /* @__PURE__ */ __name((window3, matches) => {
|
|
|
16931
16936
|
var sameThread = /* @__PURE__ */ __name((a, b) => a.threadId === b.threadId, "sameThread");
|
|
16932
16937
|
var link = /* @__PURE__ */ __name((message, parentId, source, kind, confidence, method) => ({ messageId: message.id, parentId, source, kind, confidence, method }), "link");
|
|
16933
16938
|
|
|
16934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16939
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/ports/traits.js
|
|
16935
16940
|
var syncsOneChat = /* @__PURE__ */ __name((messenger) => messenger.history !== "store" || messenger.historyOnDemand === true, "syncsOneChat");
|
|
16936
16941
|
|
|
16937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16942
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/sends/send-id.js
|
|
16938
16943
|
import { randomBytes } from "node:crypto";
|
|
16939
16944
|
var newSendId = /* @__PURE__ */ __name(() => randomBytes(8).readBigInt64BE().toString(), "newSendId");
|
|
16940
16945
|
var newOperationId = newSendId;
|
|
16941
16946
|
|
|
16942
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16947
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/sends/upload.js
|
|
16943
16948
|
import { openAsBlob, realpathSync } from "node:fs";
|
|
16944
16949
|
import { open, stat } from "node:fs/promises";
|
|
16945
16950
|
import { basename, dirname, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
@@ -17160,7 +17165,7 @@ var readStickerFile = /* @__PURE__ */ __name(async (path, maxBytes, read) => {
|
|
|
17160
17165
|
return { name, source };
|
|
17161
17166
|
}, "readStickerFile");
|
|
17162
17167
|
|
|
17163
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17168
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/messenger/lacks.js
|
|
17164
17169
|
var COMMAND_NEEDS = {
|
|
17165
17170
|
"account update": ["updateProfile", "change the profile"],
|
|
17166
17171
|
"account sessions list": ["sessions", "list the account's sessions"],
|
|
@@ -17210,7 +17215,7 @@ var hideNever = /* @__PURE__ */ __name((messenger, group) => {
|
|
|
17210
17215
|
return group;
|
|
17211
17216
|
}, "hideNever");
|
|
17212
17217
|
|
|
17213
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17218
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/members-audit.js
|
|
17214
17219
|
var AUDIT_PAGE = 200;
|
|
17215
17220
|
var AUDIT_BUDGET = 10;
|
|
17216
17221
|
var AUDIT_PAUSE_MS = 1e3;
|
|
@@ -17290,7 +17295,7 @@ var burstJoins = /* @__PURE__ */ __name((members) => {
|
|
|
17290
17295
|
return found;
|
|
17291
17296
|
}, "burstJoins");
|
|
17292
17297
|
|
|
17293
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17298
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/meetings/cli/query-options.js
|
|
17294
17299
|
var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
17295
17300
|
command.allowUnknownOption();
|
|
17296
17301
|
const parse = command.parseOptions.bind(command);
|
|
@@ -17310,7 +17315,7 @@ var queryWordsAfterOptions = /* @__PURE__ */ __name((command) => {
|
|
|
17310
17315
|
return command;
|
|
17311
17316
|
}, "queryWordsAfterOptions");
|
|
17312
17317
|
|
|
17313
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17318
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/meetings/cli/passage.js
|
|
17314
17319
|
var count = /* @__PURE__ */ __name((value) => {
|
|
17315
17320
|
if (!/^(0|[1-9]\d*)$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17316
17321
|
throw new CliError("validation_error", "expected a nonnegative safe integer");
|
|
@@ -17352,7 +17357,7 @@ var addMeetingPassageCommandDefinition = /* @__PURE__ */ __name((program, deps)
|
|
|
17352
17357
|
var createMeetingPassageCommand = sharedCommand(createMeetingPassageCommandDefinition);
|
|
17353
17358
|
var addMeetingPassageCommand = sharedCommand(addMeetingPassageCommandDefinition);
|
|
17354
17359
|
|
|
17355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17360
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/meetings/cli/project-evidence.js
|
|
17356
17361
|
var integer2 = /* @__PURE__ */ __name((value) => {
|
|
17357
17362
|
if (!/^[1-9]\d*$/.test(value) || !Number.isSafeInteger(Number(value)))
|
|
17358
17363
|
throw new CliError("validation_error", "expected a positive safe integer");
|
|
@@ -17375,7 +17380,7 @@ ${fieldsHelp(MEETING_PROJECT_EVIDENCE_QUERY)}`).option("--limit <n>", "hits in o
|
|
|
17375
17380
|
}, "addMeetingProjectEvidenceCommandDefinition");
|
|
17376
17381
|
var addMeetingProjectEvidenceCommand = sharedCommand(addMeetingProjectEvidenceCommandDefinition);
|
|
17377
17382
|
|
|
17378
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17383
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/meetings/cli/search.js
|
|
17379
17384
|
var ZONED = /(?:Z|[+-]\d{2}:?\d{2})$/i;
|
|
17380
17385
|
var moment = /* @__PURE__ */ __name((flag, end, readIn) => (value) => {
|
|
17381
17386
|
const zone = timezoneOf();
|
|
@@ -17461,7 +17466,7 @@ var addMeetingSearchCommandDefinition = /* @__PURE__ */ __name((program, deps) =
|
|
|
17461
17466
|
var createMeetingSearchCommand = sharedCommand(createMeetingSearchCommandDefinition);
|
|
17462
17467
|
var addMeetingSearchCommand = sharedCommand(addMeetingSearchCommandDefinition);
|
|
17463
17468
|
|
|
17464
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17469
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/meetings/cli/index.js
|
|
17465
17470
|
var integer4 = /* @__PURE__ */ __name((text) => {
|
|
17466
17471
|
if (!/^[1-9]\d*$/.test(text) || !Number.isSafeInteger(Number(text)))
|
|
17467
17472
|
throw new InvalidArgumentError("expected a positive integer");
|
|
@@ -17581,7 +17586,7 @@ ${fieldsHelp(EVENT_QUERY, MEETING_QUERY_GUIDE)}`);
|
|
|
17581
17586
|
}, "addMeetingCommandsDefinition");
|
|
17582
17587
|
var addMeetingCommands = sharedCommand(addMeetingCommandsDefinition);
|
|
17583
17588
|
|
|
17584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/list-query.js
|
|
17585
17590
|
var LIST_QUERY_GUIDE = "https://github.com/WireCatLabs/cli-core/blob/main/docs/search/query-language.md";
|
|
17586
17591
|
var withQuery = /* @__PURE__ */ __name((command, registry) => {
|
|
17587
17592
|
const query = defineQuery(registry);
|
|
@@ -17695,7 +17700,7 @@ var termField = /* @__PURE__ */ __name((name, type, example, more = {}) => nativ
|
|
|
17695
17700
|
var queryHelp = /* @__PURE__ */ __name((registry) => `
|
|
17696
17701
|
${fieldsHelp(registry, LIST_QUERY_GUIDE)}`, "queryHelp");
|
|
17697
17702
|
|
|
17698
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17703
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/paging.js
|
|
17699
17704
|
var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
17700
17705
|
if (!/^\d+$/.test(value.trim()) || Number(value) < 1)
|
|
17701
17706
|
throw new CliError("validation_error", `${flag} takes a whole number from 1 upwards, not "${value}"`);
|
|
@@ -17704,7 +17709,7 @@ var positiveCount = /* @__PURE__ */ __name((flag) => (value) => {
|
|
|
17704
17709
|
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");
|
|
17705
17710
|
var window = /* @__PURE__ */ __name(({ limit, page, all }) => all ? { offset: 0 } : { limit, offset: (page - 1) * limit }, "window");
|
|
17706
17711
|
|
|
17707
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17712
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/messenger/chat-answers.js
|
|
17708
17713
|
var defined = /* @__PURE__ */ __name((record2) => Object.fromEntries(Object.entries(record2).filter(([, value]) => value !== void 0)), "defined");
|
|
17709
17714
|
var chatRef = /* @__PURE__ */ __name((account, chat) => formatReference({ type: "chat", provider: account.provider, account: account.account, chat }), "chatRef");
|
|
17710
17715
|
var settingsOf = /* @__PURE__ */ __name((settings) => defined({
|
|
@@ -17929,7 +17934,7 @@ var sessionAnswer = /* @__PURE__ */ __name(({ current, client, device, location,
|
|
|
17929
17934
|
...createdAt === void 0 ? {} : { created_at: createdAt }
|
|
17930
17935
|
}), "sessionAnswer");
|
|
17931
17936
|
|
|
17932
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17937
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/deps.js
|
|
17933
17938
|
var accountStore = /* @__PURE__ */ __name(async (deps) => (await deps.store()).forAccount(await deps.account()), "accountStore");
|
|
17934
17939
|
var crossAccount = /* @__PURE__ */ __name((deps, _reason) => deps.store(), "crossAccount");
|
|
17935
17940
|
var NO_LOCAL_STORE = "this answer comes from the messenger, not from the local store";
|
|
@@ -17994,7 +17999,7 @@ var storedDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({
|
|
|
17994
17999
|
}), "storedDeps");
|
|
17995
18000
|
var storeModeDeps = /* @__PURE__ */ __name((messenger, store, account, guard) => ({ ...storedDeps(messenger, store, account, guard), offline: false, reads: "store" }), "storeModeDeps");
|
|
17996
18001
|
|
|
17997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18002
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/resolve.js
|
|
17998
18003
|
var isId = /* @__PURE__ */ __name((reference) => /^-?\d+$/.test(reference.trim()), "isId");
|
|
17999
18004
|
var foldName = /* @__PURE__ */ __name((name) => name.normalize("NFC").replace(/[\uFE0E\uFE0F\u200D]/g, "").toLowerCase(), "foldName");
|
|
18000
18005
|
var pickChat = /* @__PURE__ */ __name((reference, chats) => {
|
|
@@ -18032,7 +18037,7 @@ ${lines3}`, { candidates });
|
|
|
18032
18037
|
}, "ambiguous");
|
|
18033
18038
|
var isPresent = /* @__PURE__ */ __name((value) => value !== null && value !== void 0, "isPresent");
|
|
18034
18039
|
|
|
18035
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18040
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/ports/messenger.js
|
|
18036
18041
|
var throughWrapper = /* @__PURE__ */ __name((inner, handled, wrap = (_, call) => call) => new Proxy(handled, {
|
|
18037
18042
|
get: /* @__PURE__ */ __name((own, key) => {
|
|
18038
18043
|
if (key in own)
|
|
@@ -18049,7 +18054,7 @@ var capability = /* @__PURE__ */ __name((adapter, method, what) => {
|
|
|
18049
18054
|
return found.bind(adapter);
|
|
18050
18055
|
}, "capability");
|
|
18051
18056
|
|
|
18052
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18057
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/message-resolution.js
|
|
18053
18058
|
var readChatId = /* @__PURE__ */ __name(async (deps, reference, store, account) => {
|
|
18054
18059
|
if (deps.reads !== "store")
|
|
18055
18060
|
return keptChatId(deps.messenger, reference, store, account);
|
|
@@ -18196,7 +18201,7 @@ var senderAmong = /* @__PURE__ */ __name(async (store, accounts, reference) => {
|
|
|
18196
18201
|
}
|
|
18197
18202
|
}, "senderAmong");
|
|
18198
18203
|
|
|
18199
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18204
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/person-context.js
|
|
18200
18205
|
var CONTEXT_MESSAGES = 10;
|
|
18201
18206
|
var CONTEXT_BYTES = 64 * 1024;
|
|
18202
18207
|
var toContext = /* @__PURE__ */ __name((key, message, chatTitle) => ({
|
|
@@ -18452,10 +18457,10 @@ var personMessages = /* @__PURE__ */ __name(async (store, asked, reference, { ch
|
|
|
18452
18457
|
};
|
|
18453
18458
|
}, "personMessages");
|
|
18454
18459
|
|
|
18455
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18460
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
18456
18461
|
import { createHash } from "node:crypto";
|
|
18457
18462
|
|
|
18458
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18463
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-reference.js
|
|
18459
18464
|
var missing2 = /* @__PURE__ */ __name(() => new CliError("not_found", "the meeting evidence is unavailable for this account"), "missing");
|
|
18460
18465
|
var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId, reference, options = {}) => {
|
|
18461
18466
|
const parsed = parseMeetingReference(reference);
|
|
@@ -18473,7 +18478,7 @@ var authorizedMeetingMetadata = /* @__PURE__ */ __name(async (store, accountId,
|
|
|
18473
18478
|
return { parsed, meeting };
|
|
18474
18479
|
}, "authorizedMeetingMetadata");
|
|
18475
18480
|
|
|
18476
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18481
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-evidence.js
|
|
18477
18482
|
var hash = /* @__PURE__ */ __name((value) => createHash("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
18478
18483
|
var checkMeetingCancelled = /* @__PURE__ */ __name((signal) => {
|
|
18479
18484
|
if (signal?.aborted)
|
|
@@ -18672,7 +18677,7 @@ var readMeetingEvidence = /* @__PURE__ */ __name(async (store, accountId, refere
|
|
|
18672
18677
|
return { ...packet, fingerprint: hash(packet) };
|
|
18673
18678
|
}, "readMeetingEvidence");
|
|
18674
18679
|
|
|
18675
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18680
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/person-meeting-context.js
|
|
18676
18681
|
var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference, options) => {
|
|
18677
18682
|
const { meetings = 10, cues = 5, bytes: bytes2 = 64 * 1024, scanLimit = 1e3, since, signal } = options;
|
|
18678
18683
|
const requestedAccounts = options.accountIds;
|
|
@@ -18771,7 +18776,7 @@ var personMeetingContext = /* @__PURE__ */ __name(async (store, personReference,
|
|
|
18771
18776
|
};
|
|
18772
18777
|
}, "personMeetingContext");
|
|
18773
18778
|
|
|
18774
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/person-preparation.js
|
|
18775
18780
|
var PREPARE_BYTES = 96 * 1024;
|
|
18776
18781
|
var MEETINGS = 5;
|
|
18777
18782
|
var CUES = 3;
|
|
@@ -18888,7 +18893,7 @@ var meetingsOf = /* @__PURE__ */ __name(async (store, uid, stored, since, left)
|
|
|
18888
18893
|
}
|
|
18889
18894
|
}, "meetingsOf");
|
|
18890
18895
|
|
|
18891
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18896
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/person-profile.js
|
|
18892
18897
|
var personProfile = /* @__PURE__ */ __name(async (deps, person) => {
|
|
18893
18898
|
const online = deps.offline ? void 0 : await deps.connection();
|
|
18894
18899
|
const held = await storeIfOpen(deps);
|
|
@@ -18945,7 +18950,7 @@ var quiet = /* @__PURE__ */ __name((facts) => facts.chats.map(({ id: id2, title,
|
|
|
18945
18950
|
complete: false
|
|
18946
18951
|
})), "quiet");
|
|
18947
18952
|
|
|
18948
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18953
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/person-timeline.js
|
|
18949
18954
|
var TIMELINE_ITEMS = 50;
|
|
18950
18955
|
var TIMELINE_MAX = 500;
|
|
18951
18956
|
var SCOPES = ["personal", "work"];
|
|
@@ -19000,7 +19005,7 @@ var personTimeline = /* @__PURE__ */ __name(async (store, asked, reference, { sc
|
|
|
19000
19005
|
};
|
|
19001
19006
|
}, "personTimeline");
|
|
19002
19007
|
|
|
19003
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19008
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/people.js
|
|
19004
19009
|
var peopleService = /* @__PURE__ */ __name((deps) => {
|
|
19005
19010
|
const localCard = /* @__PURE__ */ __name(async (card, includeNotes = false) => {
|
|
19006
19011
|
const held = await storeIfOpen(deps);
|
|
@@ -19224,7 +19229,7 @@ var byRecency = /* @__PURE__ */ __name((a, b) => (b.lastMessagedAt ?? "").locale
|
|
|
19224
19229
|
var byName = /* @__PURE__ */ __name((a, b) => (a.name ?? "").localeCompare(b.name ?? ""), "byName");
|
|
19225
19230
|
var maskedAccount = /* @__PURE__ */ __name((account) => account.phone ? { ...account, phone: `***${account.phone.replace(/\D/g, "").slice(-4)}` } : account, "maskedAccount");
|
|
19226
19231
|
|
|
19227
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19232
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/moment.js
|
|
19228
19233
|
var AGO = /^(\d+)(m|h|d)$/;
|
|
19229
19234
|
var AGO_MS = { m: 6e4, h: 36e5, d: 864e5 };
|
|
19230
19235
|
var DATE = /^\d{4}-\d{2}-\d{2}/;
|
|
@@ -19264,7 +19269,7 @@ var dateWindow = /* @__PURE__ */ __name(({ sinceTime, untilTime, zone, now = Dat
|
|
|
19264
19269
|
};
|
|
19265
19270
|
}, "dateWindow");
|
|
19266
19271
|
|
|
19267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19272
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/questions.js
|
|
19268
19273
|
var LINKS = /https?:\/\/\S+/g;
|
|
19269
19274
|
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");
|
|
19270
19275
|
var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) => {
|
|
@@ -19291,7 +19296,7 @@ var questions = /* @__PURE__ */ __name((messages, { answerers: answerers2 }) =>
|
|
|
19291
19296
|
});
|
|
19292
19297
|
}, "questions");
|
|
19293
19298
|
|
|
19294
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/task-categories.js
|
|
19295
19300
|
var names = /* @__PURE__ */ __name((categories) => categories.map(({ name }) => name).join(", "), "names");
|
|
19296
19301
|
var taskCategoryOf = /* @__PURE__ */ __name((categories = DEFAULT_TASK_CATEGORIES, flag = "--category") => (typed) => {
|
|
19297
19302
|
const name = typed.trim().toLowerCase();
|
|
@@ -19341,7 +19346,7 @@ var categorize = /* @__PURE__ */ __name((text, categories = DEFAULT_TASK_CATEGOR
|
|
|
19341
19346
|
return best.name;
|
|
19342
19347
|
}, "categorize");
|
|
19343
19348
|
|
|
19344
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19349
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/task-rules.js
|
|
19345
19350
|
var taskAccount = /* @__PURE__ */ __name(({ provider, account }) => `${provider}:${account}`, "taskAccount");
|
|
19346
19351
|
var RULES_IN = {
|
|
19347
19352
|
dialog: "all",
|
|
@@ -19547,7 +19552,7 @@ var applyTaskRulesToChats = /* @__PURE__ */ __name(async (store, account, chatId
|
|
|
19547
19552
|
return passes;
|
|
19548
19553
|
}, "applyTaskRulesToChats");
|
|
19549
19554
|
|
|
19550
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19555
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/botcheck/check.js
|
|
19551
19556
|
var DAY_MS = 864e5;
|
|
19552
19557
|
var NEW_DAYS = 30;
|
|
19553
19558
|
var SAME_TEXT_MIN = 20;
|
|
@@ -19624,7 +19629,7 @@ var scorePerson = /* @__PURE__ */ __name(({ subject, provider, activity, photos,
|
|
|
19624
19629
|
};
|
|
19625
19630
|
}, "scorePerson");
|
|
19626
19631
|
|
|
19627
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/botcheck/registries.js
|
|
19628
19633
|
var REGISTRIES = {
|
|
19629
19634
|
cas: { title: "Combot Anti-Spam (CAS)", docs: "https://cas.chat/api" },
|
|
19630
19635
|
lols: { title: "lols.bot", docs: "https://api.lols.bot/lols-bot.json" }
|
|
@@ -19709,7 +19714,7 @@ var notCovered = /* @__PURE__ */ __name((messenger, now = /* @__PURE__ */ new Da
|
|
|
19709
19714
|
detail: `lists Telegram accounts only, not ${messenger} ones`
|
|
19710
19715
|
})), "notCovered");
|
|
19711
19716
|
|
|
19712
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19717
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/botcheck/service.js
|
|
19713
19718
|
var ACTIVITY_MESSAGES = 1e3;
|
|
19714
19719
|
var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
19715
19720
|
const subjectOf = /* @__PURE__ */ __name(async (reference) => {
|
|
@@ -19797,7 +19802,7 @@ var botCheckService = /* @__PURE__ */ __name((deps) => {
|
|
|
19797
19802
|
};
|
|
19798
19803
|
}, "botCheckService");
|
|
19799
19804
|
|
|
19800
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19805
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/thread.js
|
|
19801
19806
|
var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
19802
19807
|
if (value === void 0)
|
|
19803
19808
|
return void 0;
|
|
@@ -19807,7 +19812,7 @@ var threadIdOf = /* @__PURE__ */ __name((value) => {
|
|
|
19807
19812
|
return id2;
|
|
19808
19813
|
}, "threadIdOf");
|
|
19809
19814
|
|
|
19810
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19815
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/chat-stats.js
|
|
19811
19816
|
var TOP_POSTS = 5;
|
|
19812
19817
|
var JOINS = /* @__PURE__ */ new Set(["join", "add"]);
|
|
19813
19818
|
var LEAVES = /* @__PURE__ */ new Set(["leave", "remove"]);
|
|
@@ -19924,7 +19929,7 @@ var median = /* @__PURE__ */ __name((values) => {
|
|
|
19924
19929
|
return Math.round(sorted.length % 2 === 0 ? ((sorted[middle - 1] ?? upper) + upper) / 2 : upper);
|
|
19925
19930
|
}, "median");
|
|
19926
19931
|
|
|
19927
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19932
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/member-history.js
|
|
19928
19933
|
var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
19929
19934
|
const events = [];
|
|
19930
19935
|
for (const stay of stays) {
|
|
@@ -19956,7 +19961,7 @@ var memberEvents = /* @__PURE__ */ __name((stays, revisions, since = 0) => {
|
|
|
19956
19961
|
return events.filter(({ at }) => Date.parse(at) >= since).sort((a, b) => Date.parse(a.at) - Date.parse(b.at) || a.id.localeCompare(b.id));
|
|
19957
19962
|
}, "memberEvents");
|
|
19958
19963
|
|
|
19959
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19964
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/chats.js
|
|
19960
19965
|
var EVENTS_DAYS = 7;
|
|
19961
19966
|
var TRACKED_DAYS = 30;
|
|
19962
19967
|
var STATS_PAGE = 1e3;
|
|
@@ -20251,7 +20256,7 @@ var storedMembers = /* @__PURE__ */ __name(async (store, chatId) => {
|
|
|
20251
20256
|
return members.length === 0 ? null : members;
|
|
20252
20257
|
}, "storedMembers");
|
|
20253
20258
|
|
|
20254
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20259
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/inbox.js
|
|
20255
20260
|
var INBOX_CHATS = 20;
|
|
20256
20261
|
var REVIEW_DAYS = 3;
|
|
20257
20262
|
var UNANSWERED_HOURS = 24;
|
|
@@ -20459,7 +20464,7 @@ var inboxService = /* @__PURE__ */ __name((deps) => {
|
|
|
20459
20464
|
};
|
|
20460
20465
|
}, "inboxService");
|
|
20461
20466
|
|
|
20462
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/formatting.js
|
|
20463
20468
|
var invalid = /* @__PURE__ */ __name(() => new CliError("validation_error", "the messenger formatter returned invalid text spans"), "invalid");
|
|
20464
20469
|
var validateFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
20465
20470
|
const { text, spans } = formatted2;
|
|
@@ -20519,7 +20524,7 @@ var visibleFormattedText = /* @__PURE__ */ __name((formatted2) => {
|
|
|
20519
20524
|
};
|
|
20520
20525
|
}, "visibleFormattedText");
|
|
20521
20526
|
|
|
20522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20527
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/moderation/check.js
|
|
20523
20528
|
var INVITE = /max\.ru\/join\/|(t|telegram)\.me\/(\+|joinchat\/)|tg:\/\/join/i;
|
|
20524
20529
|
var LINK2 = /https?:\/\/\S+/i;
|
|
20525
20530
|
var STRENGTH = { report: 0, delete: 1, remove: 2 };
|
|
@@ -20707,7 +20712,7 @@ var nextPoint = /* @__PURE__ */ __name((rows, found) => {
|
|
|
20707
20712
|
}, "nextPoint");
|
|
20708
20713
|
var someUndone = /* @__PURE__ */ __name((rows) => rows.some(undone), "someUndone");
|
|
20709
20714
|
|
|
20710
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20715
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/moderation/rules.js
|
|
20711
20716
|
import { existsSync, readFileSync } from "node:fs";
|
|
20712
20717
|
import { join } from "node:path";
|
|
20713
20718
|
var RULE_ACTIONS = ["report", "delete", "remove"];
|
|
@@ -20850,7 +20855,7 @@ var assign = /* @__PURE__ */ __name((rules, key, value) => {
|
|
|
20850
20855
|
return { ...rules, [head]: { ...rules[head], [tail]: value } };
|
|
20851
20856
|
}, "assign");
|
|
20852
20857
|
|
|
20853
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/task-tag-filters.js
|
|
20854
20859
|
var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
20855
20860
|
const tags = /* @__PURE__ */ new Map();
|
|
20856
20861
|
for (const node of query ? walkQuery(query.root) : [])
|
|
@@ -20859,7 +20864,7 @@ var taskTagFilters = /* @__PURE__ */ __name(async (store, query) => {
|
|
|
20859
20864
|
return tags;
|
|
20860
20865
|
}, "taskTagFilters");
|
|
20861
20866
|
|
|
20862
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
20867
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/tasks.js
|
|
20863
20868
|
var TASK_QUERY = {
|
|
20864
20869
|
entity: "task",
|
|
20865
20870
|
backend: "sql",
|
|
@@ -21339,7 +21344,7 @@ var taskView = /* @__PURE__ */ __name(async (store, account, task2) => {
|
|
|
21339
21344
|
};
|
|
21340
21345
|
}, "taskView");
|
|
21341
21346
|
|
|
21342
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21347
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/excerpt.js
|
|
21343
21348
|
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");
|
|
21344
21349
|
var excerpt = /* @__PURE__ */ __name((text, query, size2 = 240, options = {}) => {
|
|
21345
21350
|
const flat = text.replace(/\s+/g, " ").trim();
|
|
@@ -21355,18 +21360,18 @@ var excerpt = /* @__PURE__ */ __name((text, query, size2 = 240, options = {}) =>
|
|
|
21355
21360
|
}, "excerpt");
|
|
21356
21361
|
var withExcerpt = /* @__PURE__ */ __name(({ matchedText, ...hit }, query) => ({ ...hit, excerpt: excerpt(matchedText ?? hit.text, query) }), "withExcerpt");
|
|
21357
21362
|
|
|
21358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21363
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
21359
21364
|
import { setTimeout as sleep } from "node:timers/promises";
|
|
21360
21365
|
|
|
21361
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21366
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
21362
21367
|
import { lstat as lstat4 } from "node:fs/promises";
|
|
21363
21368
|
|
|
21364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21365
21370
|
import { createHash as createHash3, randomUUID as randomUUID4 } from "node:crypto";
|
|
21366
21371
|
import { open as open6, rename as rename3, unlink as unlink6 } from "node:fs/promises";
|
|
21367
21372
|
import { join as join6 } from "node:path";
|
|
21368
21373
|
|
|
21369
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21374
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/atomic-write.js
|
|
21370
21375
|
import { randomUUID } from "node:crypto";
|
|
21371
21376
|
import { constants } from "node:fs";
|
|
21372
21377
|
import { link as link2, open as open2, realpath, rename, unlink } from "node:fs/promises";
|
|
@@ -21404,7 +21409,7 @@ var writeFileAtomic = /* @__PURE__ */ __name(async (path, content, { mode = 384,
|
|
|
21404
21409
|
}
|
|
21405
21410
|
}, "writeFileAtomic");
|
|
21406
21411
|
|
|
21407
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21412
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/ordinary-file.js
|
|
21408
21413
|
import { constants as constants2 } from "node:fs";
|
|
21409
21414
|
import { lstat, open as open3 } from "node:fs/promises";
|
|
21410
21415
|
var deviceOf = /* @__PURE__ */ __name((dev) => process.platform === "win32" ? BigInt.asUintN(32, dev) : dev, "deviceOf");
|
|
@@ -21470,7 +21475,7 @@ var syncDirectory = /* @__PURE__ */ __name(async (path) => {
|
|
|
21470
21475
|
}
|
|
21471
21476
|
}, "syncDirectory");
|
|
21472
21477
|
|
|
21473
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21478
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/bounded-utf8.js
|
|
21474
21479
|
var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
21475
21480
|
if (!Number.isSafeInteger(maxBytes) || maxBytes < 1 || maxBytes > 16 * 1024 * 1024)
|
|
21476
21481
|
throw new CliError("validation_error", "file maxBytes takes 1\u201316777216 bytes");
|
|
@@ -21499,21 +21504,21 @@ var readBoundedUtf8File = /* @__PURE__ */ __name(async (path, { maxBytes }) => {
|
|
|
21499
21504
|
}
|
|
21500
21505
|
}, "readBoundedUtf8File");
|
|
21501
21506
|
|
|
21502
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21507
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
21503
21508
|
import { mkdir as mkdir2 } from "node:fs/promises";
|
|
21504
21509
|
import { basename as basename3, dirname as dirname3 } from "node:path";
|
|
21505
21510
|
|
|
21506
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21511
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
21507
21512
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
21508
21513
|
import { lstat as lstat3, mkdir, open as open4, realpath as realpath3, rmdir as rmdir2, unlink as unlink4 } from "node:fs/promises";
|
|
21509
21514
|
import { hostname as hostname2 } from "node:os";
|
|
21510
21515
|
import { join as join4 } from "node:path";
|
|
21511
21516
|
|
|
21512
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21517
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
21513
21518
|
import { lstat as lstat2, readdir, realpath as realpath2, unlink as unlink2 } from "node:fs/promises";
|
|
21514
21519
|
import { join as join3 } from "node:path";
|
|
21515
21520
|
|
|
21516
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21521
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-lease-owner.js
|
|
21517
21522
|
import { hostname } from "node:os";
|
|
21518
21523
|
var missingLeaseFile = /* @__PURE__ */ __name((error) => typeof error === "object" && error !== null && "code" in error && error.code === "ENOENT", "missingLeaseFile");
|
|
21519
21524
|
var readLeaseOwner = /* @__PURE__ */ __name(async (path, name, signal) => {
|
|
@@ -21558,7 +21563,7 @@ var leaseOwnerStatus = /* @__PURE__ */ __name((owner) => {
|
|
|
21558
21563
|
}
|
|
21559
21564
|
}, "leaseOwnerStatus");
|
|
21560
21565
|
|
|
21561
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21566
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-lease-inspection.js
|
|
21562
21567
|
var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
21563
21568
|
const inspect = /* @__PURE__ */ __name(async (destination, options = {}) => {
|
|
21564
21569
|
options.signal?.throwIfAborted();
|
|
@@ -21617,7 +21622,7 @@ var leaseInspection = /* @__PURE__ */ __name((markerDirectory) => {
|
|
|
21617
21622
|
return { inspect, recover };
|
|
21618
21623
|
}, "leaseInspection");
|
|
21619
21624
|
|
|
21620
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-lease-release.js
|
|
21621
21626
|
import { rmdir, unlink as unlink3 } from "node:fs/promises";
|
|
21622
21627
|
var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identity) => {
|
|
21623
21628
|
let releasing;
|
|
@@ -21642,7 +21647,7 @@ var ownedNativeLease = /* @__PURE__ */ __name((path, name, owner, folder, identi
|
|
|
21642
21647
|
};
|
|
21643
21648
|
}, "ownedNativeLease");
|
|
21644
21649
|
|
|
21645
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21650
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/native-writer-lease.js
|
|
21646
21651
|
var validName = /* @__PURE__ */ __name((value) => typeof value === "string" && value.length > 0 && value !== "." && value !== ".." && !/[\\/\0:]/.test(value), "validName");
|
|
21647
21652
|
var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
21648
21653
|
const { markerDirectory, legacyMarker } = layout;
|
|
@@ -21713,7 +21718,7 @@ var nativeWriterLeaseStore = /* @__PURE__ */ __name((layout) => {
|
|
|
21713
21718
|
};
|
|
21714
21719
|
}, "nativeWriterLeaseStore");
|
|
21715
21720
|
|
|
21716
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21721
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/files/lock.js
|
|
21717
21722
|
var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
21718
21723
|
const folder = dirname3(path);
|
|
21719
21724
|
await mkdir2(folder, { recursive: true, mode: 448 });
|
|
@@ -21728,7 +21733,7 @@ var acquireLock = /* @__PURE__ */ __name(async (path, { signal } = {}) => {
|
|
|
21728
21733
|
});
|
|
21729
21734
|
}, "acquireLock");
|
|
21730
21735
|
|
|
21731
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-metadata.js
|
|
21732
21737
|
import { createHash as createHash2 } from "node:crypto";
|
|
21733
21738
|
var metadataLimit = 16384;
|
|
21734
21739
|
var partialIdentity = /* @__PURE__ */ __name((locator) => JSON.stringify([locator.provider, locator.account, locator.occurrenceId, locator.assetId]), "partialIdentity");
|
|
@@ -21788,7 +21793,7 @@ var readPartialMetadata = /* @__PURE__ */ __name(async (path, locator, maxBytes,
|
|
|
21788
21793
|
}
|
|
21789
21794
|
}, "readPartialMetadata");
|
|
21790
21795
|
|
|
21791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21796
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-writer.js
|
|
21792
21797
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
21793
21798
|
import { open as open5, rename as rename2, unlink as unlink5 } from "node:fs/promises";
|
|
21794
21799
|
import { join as join5 } from "node:path";
|
|
@@ -21880,7 +21885,7 @@ var partialWriter = /* @__PURE__ */ __name(async (input) => {
|
|
|
21880
21885
|
};
|
|
21881
21886
|
}, "partialWriter");
|
|
21882
21887
|
|
|
21883
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-partial-store.js
|
|
21884
21889
|
var NativeRecordingPartialStore = class {
|
|
21885
21890
|
static {
|
|
21886
21891
|
__name(this, "NativeRecordingPartialStore");
|
|
@@ -21987,12 +21992,12 @@ var NativeRecordingPartialStore = class {
|
|
|
21987
21992
|
}
|
|
21988
21993
|
};
|
|
21989
21994
|
|
|
21990
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21995
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
21991
21996
|
import { createHash as createHash4 } from "node:crypto";
|
|
21992
21997
|
import { link as link3 } from "node:fs/promises";
|
|
21993
21998
|
import { basename as basename4, dirname as dirname4, join as join8, resolve as resolve2 } from "node:path";
|
|
21994
21999
|
|
|
21995
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22000
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-files.js
|
|
21996
22001
|
import { unlink as unlink7 } from "node:fs/promises";
|
|
21997
22002
|
var verifiedPublicationFile = /* @__PURE__ */ __name(async (path, expected, signal, writable = false) => {
|
|
21998
22003
|
signal?.throwIfAborted();
|
|
@@ -22027,7 +22032,7 @@ var commitPublication = /* @__PURE__ */ __name(async (root, partialPath, finalPa
|
|
|
22027
22032
|
signal?.throwIfAborted();
|
|
22028
22033
|
}, "commitPublication");
|
|
22029
22034
|
|
|
22030
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22035
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication-journal.js
|
|
22031
22036
|
import { randomUUID as randomUUID5 } from "node:crypto";
|
|
22032
22037
|
import { open as open7, rename as rename4, unlink as unlink8 } from "node:fs/promises";
|
|
22033
22038
|
import { join as join7 } from "node:path";
|
|
@@ -22100,7 +22105,7 @@ var writePublicationJournal = /* @__PURE__ */ __name(async (root, path, prefix,
|
|
|
22100
22105
|
}
|
|
22101
22106
|
}, "writePublicationJournal");
|
|
22102
22107
|
|
|
22103
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22108
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/persistence/native/recording-publication.js
|
|
22104
22109
|
var NativeRecordingPublication = class {
|
|
22105
22110
|
static {
|
|
22106
22111
|
__name(this, "NativeRecordingPublication");
|
|
@@ -22173,7 +22178,7 @@ var NativeRecordingPublication = class {
|
|
|
22173
22178
|
}
|
|
22174
22179
|
};
|
|
22175
22180
|
|
|
22176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22181
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive-manifest.js
|
|
22177
22182
|
import { createHash as createHash5 } from "node:crypto";
|
|
22178
22183
|
import { readdir as readdir2 } from "node:fs/promises";
|
|
22179
22184
|
import { isAbsolute as isAbsolute2, join as join9, resolve as resolve3 } from "node:path";
|
|
@@ -22260,7 +22265,7 @@ var commitMediaEntry = /* @__PURE__ */ __name((root, one, beforePublish) => writ
|
|
|
22260
22265
|
beforePublish
|
|
22261
22266
|
}), "commitMediaEntry");
|
|
22262
22267
|
|
|
22263
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive-files.js
|
|
22264
22269
|
var validator = '"media-completed-v1"';
|
|
22265
22270
|
var maximumFileBytes = 64 * 1024 * 1024 * 1024;
|
|
22266
22271
|
var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2, beforeWrite, signal, metadata = {}) => {
|
|
@@ -22361,7 +22366,7 @@ var archiveMediaFile = /* @__PURE__ */ __name(async (root, identity, kind, file2
|
|
|
22361
22366
|
return entry;
|
|
22362
22367
|
}, "archiveMediaFile");
|
|
22363
22368
|
|
|
22364
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22369
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive-locks.js
|
|
22365
22370
|
import { mkdir as mkdir3, realpath as realpath4 } from "node:fs/promises";
|
|
22366
22371
|
import { join as join10, resolve as resolve4 } from "node:path";
|
|
22367
22372
|
var archiveLocations = /* @__PURE__ */ __name(async (initial, signal) => {
|
|
@@ -22428,7 +22433,7 @@ var withMediaArchiveLocks = /* @__PURE__ */ __name(async (directory2, signal, ru
|
|
|
22428
22433
|
throw new CliError("validation_error", "archive locations changed during locking; run the command again");
|
|
22429
22434
|
}, "withMediaArchiveLocks");
|
|
22430
22435
|
|
|
22431
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22436
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive.js
|
|
22432
22437
|
var validateMediaSince = /* @__PURE__ */ __name((value, flag = "--since-time") => {
|
|
22433
22438
|
if (value === void 0)
|
|
22434
22439
|
return void 0;
|
|
@@ -22581,7 +22586,7 @@ var archiveMedia = /* @__PURE__ */ __name(async (ports, options) => {
|
|
|
22581
22586
|
}, { create: true });
|
|
22582
22587
|
}, "archiveMedia");
|
|
22583
22588
|
|
|
22584
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/media-archive-move.js
|
|
22585
22590
|
import { realpath as realpath5, unlink as unlink9 } from "node:fs/promises";
|
|
22586
22591
|
import { basename as basename5, dirname as dirname5, join as join11, resolve as resolve5 } from "node:path";
|
|
22587
22592
|
var canonicalDestination = /* @__PURE__ */ __name(async (directory2) => {
|
|
@@ -22734,61 +22739,7 @@ var moveMediaArchive = /* @__PURE__ */ __name(async (options) => {
|
|
|
22734
22739
|
}, { additional: [target2], createAdditional: !options.dryRun });
|
|
22735
22740
|
}, "moveMediaArchive");
|
|
22736
22741
|
|
|
22737
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22738
|
-
import { join as join12 } from "node:path";
|
|
22739
|
-
var clip = /* @__PURE__ */ __name((name) => `https://huggingface.co/Xenova/clip-vit-base-patch32/resolve/d15189d7028b43f1d3e65039190477f6af591c2a/${name}`, "clip");
|
|
22740
|
-
var IMAGE_MODELS = [
|
|
22741
|
-
{
|
|
22742
|
-
id: "clip-b32",
|
|
22743
|
-
title: "CLIP ViT-B/32, 8-bit",
|
|
22744
|
-
languages: "English only: translate a query before searching",
|
|
22745
|
-
licence: "MIT",
|
|
22746
|
-
dims: 512,
|
|
22747
|
-
key: "local:clip-b32:512",
|
|
22748
|
-
maxTokens: 77,
|
|
22749
|
-
vision: "onnx/vision_model_quantized.onnx",
|
|
22750
|
-
text: "onnx/text_model_quantized.onnx",
|
|
22751
|
-
files: [
|
|
22752
|
-
{
|
|
22753
|
-
name: "onnx/vision_model_quantized.onnx",
|
|
22754
|
-
url: clip("onnx/vision_model_quantized.onnx"),
|
|
22755
|
-
sha256: "583fd1110a514667812fee7d684952aaf82a99b959760c8d7dca7e0ab9839299",
|
|
22756
|
-
bytes: 89117001
|
|
22757
|
-
},
|
|
22758
|
-
{
|
|
22759
|
-
name: "onnx/text_model_quantized.onnx",
|
|
22760
|
-
url: clip("onnx/text_model_quantized.onnx"),
|
|
22761
|
-
sha256: "73baab855d406190da9faa498cfedf65f15cf309f4cc7385b7b032e6d08e5c3a",
|
|
22762
|
-
bytes: 64504507
|
|
22763
|
-
},
|
|
22764
|
-
{
|
|
22765
|
-
name: "tokenizer.json",
|
|
22766
|
-
url: clip("tokenizer.json"),
|
|
22767
|
-
sha256: "f7f3b7af117d467b58374797691a6438d3e6b9e9cef800dfd5dced7f697a90cd",
|
|
22768
|
-
bytes: 2224119
|
|
22769
|
-
},
|
|
22770
|
-
{
|
|
22771
|
-
name: "tokenizer_config.json",
|
|
22772
|
-
url: clip("tokenizer_config.json"),
|
|
22773
|
-
sha256: "60ba2912bc6344c94bc16bbdec27fa1209409167b6f2fdf3cfe9e65462ea3967",
|
|
22774
|
-
bytes: 775
|
|
22775
|
-
}
|
|
22776
|
-
]
|
|
22777
|
-
}
|
|
22778
|
-
];
|
|
22779
|
-
var DEFAULT_IMAGE_MODEL = "clip-b32";
|
|
22780
|
-
var imageModel = /* @__PURE__ */ __name((id2) => {
|
|
22781
|
-
const found = IMAGE_MODELS.find((model) => model.id === id2);
|
|
22782
|
-
if (!found) {
|
|
22783
|
-
throw new CliError("validation_error", `no image model ${id2} \u2014 one of: ${IMAGE_MODELS.map((model) => model.id).join(", ")}`);
|
|
22784
|
-
}
|
|
22785
|
-
return found;
|
|
22786
|
-
}, "imageModel");
|
|
22787
|
-
var imageModelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("image", env), "imageModelsDirectory");
|
|
22788
|
-
var placedImage = /* @__PURE__ */ __name((model, directory2) => model.files.map((file2) => [file2, join12(directory2, model.id, file2.name)]), "placedImage");
|
|
22789
|
-
var isImageModelInstalled = /* @__PURE__ */ __name((model, directory2) => filesPresent(placedImage(model, directory2)), "isImageModelInstalled");
|
|
22790
|
-
|
|
22791
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
22742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/model-downloads.js
|
|
22792
22743
|
var bytesOf = /* @__PURE__ */ __name((model) => model.files.reduce((sum2, file2) => sum2 + file2.bytes, 0), "bytesOf");
|
|
22793
22744
|
var nativeRuntime = /* @__PURE__ */ __name(async ({ env, progress = /* @__PURE__ */ __name(() => {
|
|
22794
22745
|
}, "progress") }) => {
|
|
@@ -22811,7 +22762,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22811
22762
|
}
|
|
22812
22763
|
await nativeRuntime({ env, progress });
|
|
22813
22764
|
progress(`${model.id}: loading it once to check it works`);
|
|
22814
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
22765
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-5DPZKRW5.js");
|
|
22815
22766
|
const embedder = await openEmbedder2(model, directory2);
|
|
22816
22767
|
try {
|
|
22817
22768
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -22832,7 +22783,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
22832
22783
|
}
|
|
22833
22784
|
await nativeRuntime({ env, progress });
|
|
22834
22785
|
progress(`${model.id}: loading it once to check it works`);
|
|
22835
|
-
const { openReranker } = await import("./rerank-
|
|
22786
|
+
const { openReranker } = await import("./rerank-CQAR46L3.js");
|
|
22836
22787
|
const reranker = await openReranker(model, directory2);
|
|
22837
22788
|
try {
|
|
22838
22789
|
await reranker.score("check", ["check"]);
|
|
@@ -22850,7 +22801,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22850
22801
|
await installFiles(placedImage(model, directory2), { progress });
|
|
22851
22802
|
}
|
|
22852
22803
|
progress(`${model.id}: loading it once to check it works`);
|
|
22853
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
22804
|
+
const { openPictureEmbedder } = await import("./embedder-NBQXDXAO.js");
|
|
22854
22805
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
22855
22806
|
try {
|
|
22856
22807
|
const vector = await embedder.embedQuery("check");
|
|
@@ -22862,7 +22813,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
22862
22813
|
return { model, directory: directory2 };
|
|
22863
22814
|
}, "downloadImageModel");
|
|
22864
22815
|
|
|
22865
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22816
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/account.js
|
|
22866
22817
|
var accountService = /* @__PURE__ */ __name((deps) => {
|
|
22867
22818
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
22868
22819
|
if (deps.offline)
|
|
@@ -22934,7 +22885,7 @@ var accountService = /* @__PURE__ */ __name((deps) => {
|
|
|
22934
22885
|
};
|
|
22935
22886
|
}, "accountService");
|
|
22936
22887
|
|
|
22937
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/send-time.js
|
|
22938
22889
|
var MINUTE = 6e4;
|
|
22939
22890
|
var YEAR = 365 * 24 * 60 * MINUTE;
|
|
22940
22891
|
var DELAY = /^(\d+)(m|h|d)$/;
|
|
@@ -22953,7 +22904,7 @@ var sendTime = /* @__PURE__ */ __name((value, now = Date.now(), flag = "--at-tim
|
|
|
22953
22904
|
return new Date(at - at % MINUTE).toISOString();
|
|
22954
22905
|
}, "sendTime");
|
|
22955
22906
|
|
|
22956
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22907
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/admin.js
|
|
22957
22908
|
var recordMembership = /* @__PURE__ */ __name(async (deps, operationId, done2, change, fix, write) => {
|
|
22958
22909
|
try {
|
|
22959
22910
|
const held = await accountStoreIfOpen(deps);
|
|
@@ -22984,9 +22935,9 @@ var adminService = /* @__PURE__ */ __name((deps) => {
|
|
|
22984
22935
|
}, "create"),
|
|
22985
22936
|
join: /* @__PURE__ */ __name(async (link5) => {
|
|
22986
22937
|
const connection = await online("chats join");
|
|
22987
|
-
const
|
|
22938
|
+
const join16 = capability(connection, "join", "join a chat by its link");
|
|
22988
22939
|
const operationId = newOperationId();
|
|
22989
|
-
const joined = await guardedWrite(deps.guard, { operationId, chatId: null, kind: "chat", action: "join" }, () =>
|
|
22940
|
+
const joined = await guardedWrite(deps.guard, { operationId, chatId: null, kind: "chat", action: "join" }, () => join16(link5.trim()), (answer) => "requested" in answer ? {} : { chatId: answer.id });
|
|
22990
22941
|
if ("requested" in joined)
|
|
22991
22942
|
return { operationId, requested: true };
|
|
22992
22943
|
const fix = deps.reads === "store" ? reportedFix(deps, joined.id, "left", "join") : `an online \`${typedCommand(deps.messenger.app.command, "chats list")}\` that shows the chat corrects it`;
|
|
@@ -23200,7 +23151,7 @@ var linkLimits = /* @__PURE__ */ __name(({ approval, expires, maxUses }) => {
|
|
|
23200
23151
|
return expires === void 0 ? void 0 : sendTime(expires, Date.now(), "--expire-time");
|
|
23201
23152
|
}, "linkLimits");
|
|
23202
23153
|
|
|
23203
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23154
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/mail-search.js
|
|
23204
23155
|
var THREADS_PAGE = 500;
|
|
23205
23156
|
var threadsOf = /* @__PURE__ */ __name(async (store, key) => {
|
|
23206
23157
|
const account = await store.accounts.storedAccount(key).catch(() => void 0);
|
|
@@ -23279,7 +23230,7 @@ var readMail = /* @__PURE__ */ __name(async (store, locator, { before: before2 =
|
|
|
23279
23230
|
return thread.slice(Math.max(0, at - before2), at + after + 1).map((hit) => hit.id === message ? { ...hit, anchor: true } : hit);
|
|
23280
23231
|
}, "readMail");
|
|
23281
23232
|
|
|
23282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23233
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-kind.js
|
|
23283
23234
|
var NO_MAIL = "no_mail";
|
|
23284
23235
|
var MAIL = "email";
|
|
23285
23236
|
var listContextOf = /* @__PURE__ */ __name(async (store, account, app, stored) => {
|
|
@@ -23326,7 +23277,7 @@ var accountsOfKind = /* @__PURE__ */ __name((kind, chosen, held, explicit, comma
|
|
|
23326
23277
|
return chosenMail.map(({ provider, account }) => ({ provider, account }));
|
|
23327
23278
|
}, "accountsOfKind");
|
|
23328
23279
|
|
|
23329
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23280
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-search.js
|
|
23330
23281
|
var MAIL_FIELDS = /* @__PURE__ */ new Set(["to", "cc", "bcc", "subject", "mailbox", "label", "is"]);
|
|
23331
23282
|
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");
|
|
23332
23283
|
var prepareLucene = /* @__PURE__ */ __name(async (store, account, request, messenger) => {
|
|
@@ -23657,7 +23608,7 @@ var statsLucene = /* @__PURE__ */ __name(async (store, account, request, messeng
|
|
|
23657
23608
|
};
|
|
23658
23609
|
}, "statsLucene");
|
|
23659
23610
|
|
|
23660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23611
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/rankings-selection.js
|
|
23661
23612
|
var RANKING_SELECTION_BYTES = 64 * 1024;
|
|
23662
23613
|
var object = /* @__PURE__ */ __name((value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : void 0, "object");
|
|
23663
23614
|
function invalid3(message = "ranking selection is invalid \u2014 obtain a new drilldown from stats top") {
|
|
@@ -23826,7 +23777,7 @@ var readRankingSelection = /* @__PURE__ */ __name(async (store, input) => {
|
|
|
23826
23777
|
};
|
|
23827
23778
|
}, "readRankingSelection");
|
|
23828
23779
|
|
|
23829
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23780
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-record.js
|
|
23830
23781
|
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");
|
|
23831
23782
|
var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
23832
23783
|
command,
|
|
@@ -23836,7 +23787,7 @@ var searchRecordOf = /* @__PURE__ */ __name((command, params) => ({
|
|
|
23836
23787
|
fieldsVersion: FIELD_VERSION
|
|
23837
23788
|
}), "searchRecordOf");
|
|
23838
23789
|
|
|
23839
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23790
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/admin-statistics.js
|
|
23840
23791
|
function invalid4(message) {
|
|
23841
23792
|
throw new CliError("validation_error", message);
|
|
23842
23793
|
}
|
|
@@ -24130,7 +24081,7 @@ var adminStatisticsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
24130
24081
|
}, "evidence")
|
|
24131
24082
|
}), "adminStatisticsService");
|
|
24132
24083
|
|
|
24133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24084
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/agenda.js
|
|
24134
24085
|
var DAY = 864e5;
|
|
24135
24086
|
var CLAIMS = ["none", "mine", "others", "any"];
|
|
24136
24087
|
var TASK_FIELDS = /* @__PURE__ */ new Set(["tag", "category", "claimed"]);
|
|
@@ -24352,10 +24303,10 @@ var agendaItem = /* @__PURE__ */ __name((shown) => {
|
|
|
24352
24303
|
};
|
|
24353
24304
|
}, "agendaItem");
|
|
24354
24305
|
|
|
24355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24306
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
24356
24307
|
import { setTimeout as sleep3 } from "node:timers/promises";
|
|
24357
24308
|
|
|
24358
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24309
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/backfill-estimate.js
|
|
24359
24310
|
var REQUEST_MS = 400;
|
|
24360
24311
|
var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, maxPages, pauseMs }) => {
|
|
24361
24312
|
const lowest = ranges[0];
|
|
@@ -24378,13 +24329,13 @@ var estimateBackfill = /* @__PURE__ */ __name(({ ranges, held, newest, page, max
|
|
|
24378
24329
|
};
|
|
24379
24330
|
}, "estimateBackfill");
|
|
24380
24331
|
|
|
24381
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24332
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/recovery.js
|
|
24382
24333
|
var withRecovery = /* @__PURE__ */ __name((error) => ({
|
|
24383
24334
|
...error,
|
|
24384
24335
|
retryable: typeof error.retryable === "boolean" ? error.retryable : error.code === "rate_limited" || error.status === 429
|
|
24385
24336
|
}), "withRecovery");
|
|
24386
24337
|
|
|
24387
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24338
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/batch.js
|
|
24388
24339
|
var actionable = /* @__PURE__ */ __name((error) => {
|
|
24389
24340
|
if (isCliFailure(error))
|
|
24390
24341
|
return withRecovery({ code: error.code, message: error.message, ...error.details });
|
|
@@ -24467,7 +24418,7 @@ var mergeBatches = /* @__PURE__ */ __name((a, b) => {
|
|
|
24467
24418
|
};
|
|
24468
24419
|
}, "mergeBatches");
|
|
24469
24420
|
|
|
24470
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24421
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/patience.js
|
|
24471
24422
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
24472
24423
|
var LONGEST_WAIT_MS = 5 * 60 * 1e3;
|
|
24473
24424
|
var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
@@ -24490,7 +24441,7 @@ var patiently = /* @__PURE__ */ __name(async (request, note, stop) => {
|
|
|
24490
24441
|
}
|
|
24491
24442
|
}, "patiently");
|
|
24492
24443
|
|
|
24493
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/images/context/index.js
|
|
24494
24445
|
var CONTEXT_MESSAGES2 = 3;
|
|
24495
24446
|
var CONTEXT_MINUTES = 10;
|
|
24496
24447
|
var MAX_CHARS = 1200;
|
|
@@ -24514,12 +24465,12 @@ var context = {
|
|
|
24514
24465
|
}, "describe")
|
|
24515
24466
|
};
|
|
24516
24467
|
|
|
24517
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24468
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/images/registry.js
|
|
24518
24469
|
var BUILT_INS = [context];
|
|
24519
24470
|
var providers = [...BUILT_INS];
|
|
24520
24471
|
var registeredImageProviders = /* @__PURE__ */ __name(() => providers, "registeredImageProviders");
|
|
24521
24472
|
|
|
24522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24473
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/conversations.js
|
|
24523
24474
|
var READ_PAGE = 5e3;
|
|
24524
24475
|
var CHAIN = 50;
|
|
24525
24476
|
var CONVERSATION_QUERY = {
|
|
@@ -24671,16 +24622,13 @@ var sized = /* @__PURE__ */ __name((size2) => {
|
|
|
24671
24622
|
return size2;
|
|
24672
24623
|
}, "sized");
|
|
24673
24624
|
|
|
24674
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24625
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/embeddings-maintenance.js
|
|
24675
24626
|
var REFRESH_BOUNDS = { maxChats: 20, maxChunks: 2e3 };
|
|
24676
24627
|
var MESSAGE_PAGE = 5e3;
|
|
24677
24628
|
var PER_SESSION = 8;
|
|
24678
24629
|
var PER_REQUEST = 256;
|
|
24679
24630
|
var CHARS_PER_TOKEN_AT_LEAST = 3;
|
|
24680
|
-
var notDownloaded = /* @__PURE__ */ __name((
|
|
24681
|
-
reason: "model.not-downloaded",
|
|
24682
|
-
model: id2
|
|
24683
|
-
}), "notDownloaded");
|
|
24631
|
+
var notDownloaded = /* @__PURE__ */ __name((id2) => new CliError("not_found", `${id2} is not downloaded on this machine`, { reason: "model.not-downloaded", model: id2 }), "notDownloaded");
|
|
24684
24632
|
var notBuiltError = /* @__PURE__ */ __name((deps, chatId) => new CliError("not_found", `chat ${chatId} has no conversations yet \u2014 \`${typedCommand(deps.messenger.app.command, `conversations links rebuild --chat ${chatId}`)}\``), "notBuiltError");
|
|
24685
24633
|
var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL) => {
|
|
24686
24634
|
if (typeof choice !== "string") {
|
|
@@ -24693,7 +24641,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24693
24641
|
price: remote.price,
|
|
24694
24642
|
installed: true,
|
|
24695
24643
|
perBatch: PER_REQUEST * concurrency,
|
|
24696
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
24644
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-Q4A4JY6U.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
24697
24645
|
};
|
|
24698
24646
|
}
|
|
24699
24647
|
const model = textModel(choice);
|
|
@@ -24708,9 +24656,9 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
24708
24656
|
perBatch: PER_SESSION,
|
|
24709
24657
|
open: /* @__PURE__ */ __name(async ({ threads, apart = false } = {}) => {
|
|
24710
24658
|
if (!isTextModelInstalled(model, directory2))
|
|
24711
|
-
throw notDownloaded(
|
|
24659
|
+
throw notDownloaded(model.id);
|
|
24712
24660
|
if (apart) {
|
|
24713
|
-
const { openProcess } = await import("./process-
|
|
24661
|
+
const { openProcess } = await import("./process-47MMIFIJ.js");
|
|
24714
24662
|
return openProcess(model, directory2, { threads: threads ?? defaultThreads() });
|
|
24715
24663
|
}
|
|
24716
24664
|
return openEmbedder(model, directory2, { threads: threads ?? defaultThreads() });
|
|
@@ -24909,7 +24857,7 @@ ${text}`),
|
|
|
24909
24857
|
const account = await deps.account();
|
|
24910
24858
|
const target2 = embeddingTarget(deps, choice);
|
|
24911
24859
|
if (embed && !build && !target2.installed)
|
|
24912
|
-
throw notDownloaded(
|
|
24860
|
+
throw notDownloaded(target2.id);
|
|
24913
24861
|
const chatId = chat === void 0 ? void 0 : await storedChatId(deps.messenger, chat, store, account, { includeLeft: true });
|
|
24914
24862
|
const scan = /* @__PURE__ */ __name(async () => ({
|
|
24915
24863
|
chats: (await readinessOf(deps, chatId, target2.key)).sort(byOldestBuild),
|
|
@@ -24999,7 +24947,7 @@ var shaped = /* @__PURE__ */ __name(({ chatId, builtAt, algorithmVersion, pendin
|
|
|
24999
24947
|
return { ...one, state };
|
|
25000
24948
|
}, "shaped");
|
|
25001
24949
|
|
|
25002
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24950
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-catchup.js
|
|
25003
24951
|
var CATCH_UP_BOUNDS = { maxChunks: 500, maxMessages: 1e4, timeMs: 3e4 };
|
|
25004
24952
|
var validateCatchUpBounds = /* @__PURE__ */ __name((options) => {
|
|
25005
24953
|
for (const [key, value, maximum] of [
|
|
@@ -25052,7 +25000,7 @@ var catchUpSearch = /* @__PURE__ */ __name(async (deps, chat, options, signal, c
|
|
|
25052
25000
|
}
|
|
25053
25001
|
}, "catchUpSearch");
|
|
25054
25002
|
|
|
25055
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25003
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/archive.js
|
|
25056
25004
|
var pushed = /* @__PURE__ */ __name((deps, what) => {
|
|
25057
25005
|
if (deps.reads === "store") {
|
|
25058
25006
|
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`);
|
|
@@ -25369,7 +25317,7 @@ var timeOfKey = /* @__PURE__ */ __name(async (store, account, chatId, key, byTim
|
|
|
25369
25317
|
return message?.timestamp ?? fallback;
|
|
25370
25318
|
}, "timeOfKey");
|
|
25371
25319
|
|
|
25372
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25320
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/archive-gaps.js
|
|
25373
25321
|
import { createHash as createHash6, randomUUID as randomUUID6 } from "node:crypto";
|
|
25374
25322
|
var GAP_BOUNDS = { maxGaps: 5, limit: 500, timeMs: 3e4 };
|
|
25375
25323
|
var validateRepair = /* @__PURE__ */ __name((messenger, options) => {
|
|
@@ -25506,14 +25454,14 @@ var gapsService = /* @__PURE__ */ __name((deps) => {
|
|
|
25506
25454
|
return { plan, repair };
|
|
25507
25455
|
}, "gapsService");
|
|
25508
25456
|
|
|
25509
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25457
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
25510
25458
|
import { createHash as createHash8 } from "node:crypto";
|
|
25511
25459
|
import { constants as constants4 } from "node:fs";
|
|
25512
25460
|
import { open as open9, readFile, stat as stat2 } from "node:fs/promises";
|
|
25513
25461
|
|
|
25514
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25462
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/directory.js
|
|
25515
25463
|
import { lstat as lstat5, readdir as readdir3, realpath as realpath6 } from "node:fs/promises";
|
|
25516
|
-
import { basename as basename6, join as
|
|
25464
|
+
import { basename as basename6, join as join12, relative as relative2, sep as sep2 } from "node:path";
|
|
25517
25465
|
var MAX_FILES = 1e4;
|
|
25518
25466
|
var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app, env) => {
|
|
25519
25467
|
if (refusedPlace(directory2, app, env))
|
|
@@ -25528,7 +25476,7 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
25528
25476
|
throw new CliError("validation_error", "--from-dir holds too many files; use a smaller directory");
|
|
25529
25477
|
const files = /* @__PURE__ */ new Map();
|
|
25530
25478
|
for (const name of names2) {
|
|
25531
|
-
const path =
|
|
25479
|
+
const path = join12(root, name);
|
|
25532
25480
|
const info = await lstat5(path);
|
|
25533
25481
|
if (info.isSymbolicLink())
|
|
25534
25482
|
throw new CliError("validation_error", "--from-dir cannot read symbolic links");
|
|
@@ -25582,15 +25530,15 @@ var directoryPaths = /* @__PURE__ */ __name(async (store, chat, directory2, app,
|
|
|
25582
25530
|
return choices;
|
|
25583
25531
|
}, "directoryPaths");
|
|
25584
25532
|
|
|
25585
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25533
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25586
25534
|
import { posix } from "node:path";
|
|
25587
25535
|
|
|
25588
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25536
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25589
25537
|
import { setImmediate as tick } from "node:timers/promises";
|
|
25590
25538
|
import { crc32 } from "node:zlib";
|
|
25591
25539
|
var import_xmldom = __toESM(require_lib(), 1);
|
|
25592
25540
|
|
|
25593
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25541
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/encoding.js
|
|
25594
25542
|
var import_chardet = __toESM(require_lib2(), 1);
|
|
25595
25543
|
var import_iconv_lite = __toESM(require_lib3(), 1);
|
|
25596
25544
|
var SAMPLE = 65536;
|
|
@@ -25692,7 +25640,7 @@ var decodeXml = /* @__PURE__ */ __name((bytes2) => {
|
|
|
25692
25640
|
return result.text;
|
|
25693
25641
|
}, "decodeXml");
|
|
25694
25642
|
|
|
25695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/container.js
|
|
25696
25644
|
var MAX_PART = 10 * 1024 * 1024;
|
|
25697
25645
|
var MAX_ENTRIES = 1e3;
|
|
25698
25646
|
var decoder = new TextDecoder("utf-8", { fatal: true });
|
|
@@ -25907,7 +25855,7 @@ var elements = /* @__PURE__ */ __name((node, name, namespace) => {
|
|
|
25907
25855
|
return found;
|
|
25908
25856
|
}, "elements");
|
|
25909
25857
|
|
|
25910
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25858
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/sheets.js
|
|
25911
25859
|
var columnName = /* @__PURE__ */ __name((column) => {
|
|
25912
25860
|
let name = "";
|
|
25913
25861
|
for (let rest = column; rest > 0; rest = Math.floor((rest - 1) / 26))
|
|
@@ -25962,7 +25910,7 @@ var sheetText = /* @__PURE__ */ __name((sheets2, maxChars = MAX_TEXT_CHARS) => {
|
|
|
25962
25910
|
return { text: parts.join("").trim(), truncated: false };
|
|
25963
25911
|
}, "sheetText");
|
|
25964
25912
|
|
|
25965
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25913
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/documents.js
|
|
25966
25914
|
var OFFICE = "urn:oasis:names:tc:opendocument:xmlns:office:1.0";
|
|
25967
25915
|
var TEXT = "urn:oasis:names:tc:opendocument:xmlns:text:1.0";
|
|
25968
25916
|
var TABLE = "urn:oasis:names:tc:opendocument:xmlns:table:1.0";
|
|
@@ -26362,12 +26310,12 @@ var readDocument = /* @__PURE__ */ __name(async (bytes2, kind, signal) => {
|
|
|
26362
26310
|
}
|
|
26363
26311
|
}, "readDocument");
|
|
26364
26312
|
|
|
26365
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26313
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26366
26314
|
import { extname as extname3 } from "node:path";
|
|
26367
26315
|
|
|
26368
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26316
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/engine.js
|
|
26369
26317
|
import { readFileSync as readFileSync2 } from "node:fs";
|
|
26370
|
-
import { dirname as dirname6, extname as extname2, join as
|
|
26318
|
+
import { dirname as dirname6, extname as extname2, join as join13 } from "node:path";
|
|
26371
26319
|
import { fileURLToPath } from "node:url";
|
|
26372
26320
|
var BUILT_IN = ["unpdf", "mammoth", "word-extractor", "linkedom", "defuddle/node"];
|
|
26373
26321
|
var ENGINES = [...BUILT_IN, "@napi-rs/canvas"];
|
|
@@ -26377,7 +26325,7 @@ var versionOf = /* @__PURE__ */ __name((name) => {
|
|
|
26377
26325
|
let directory2 = dirname6(fileURLToPath(resolveFrom(new URL("readers/engine.js", import.meta.resolve("@wirecat/cli-core")).href, name)));
|
|
26378
26326
|
for (let depth = 0; depth < 6; depth += 1) {
|
|
26379
26327
|
try {
|
|
26380
|
-
const manifest = JSON.parse(readFileSync2(
|
|
26328
|
+
const manifest = JSON.parse(readFileSync2(join13(directory2, "package.json"), "utf8"));
|
|
26381
26329
|
if (manifest.name === name && manifest.version)
|
|
26382
26330
|
return `${name}@${manifest.version}`;
|
|
26383
26331
|
} catch {
|
|
@@ -26426,7 +26374,7 @@ var derived = /* @__PURE__ */ __name((bytes2, extractor, read) => {
|
|
|
26426
26374
|
}
|
|
26427
26375
|
}, "derived");
|
|
26428
26376
|
|
|
26429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26377
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/image/index.js
|
|
26430
26378
|
var IMAGES = /* @__PURE__ */ new Set([".jpg", ".jpeg", ".png", ".webp", ".gif", ".heic", ".tif", ".tiff", ".bmp"]);
|
|
26431
26379
|
var image2 = {
|
|
26432
26380
|
id: "image",
|
|
@@ -26435,7 +26383,7 @@ var image2 = {
|
|
|
26435
26383
|
read: /* @__PURE__ */ __name(async () => ({ status: "needs-agent" }), "read")
|
|
26436
26384
|
};
|
|
26437
26385
|
|
|
26438
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26386
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/doc/index.js
|
|
26439
26387
|
var OLE = "\xD0\xCF\xE0\xA1\xB1\xE1";
|
|
26440
26388
|
var doc = {
|
|
26441
26389
|
id: "doc",
|
|
@@ -26447,7 +26395,7 @@ var doc = {
|
|
|
26447
26395
|
}), "read")
|
|
26448
26396
|
};
|
|
26449
26397
|
|
|
26450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/docx/index.js
|
|
26451
26399
|
var DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
26452
26400
|
var docx = {
|
|
26453
26401
|
id: "docx",
|
|
@@ -26460,7 +26408,7 @@ var docx = {
|
|
|
26460
26408
|
}), "read")
|
|
26461
26409
|
};
|
|
26462
26410
|
|
|
26463
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26411
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/markup.js
|
|
26464
26412
|
var import_iconv_lite2 = __toESM(require_lib3(), 1);
|
|
26465
26413
|
var RTF_SKIPPED = /* @__PURE__ */ new Set([
|
|
26466
26414
|
"fonttbl",
|
|
@@ -26636,7 +26584,7 @@ var htmlText = /* @__PURE__ */ __name((source) => {
|
|
|
26636
26584
|
}, "htmlText");
|
|
26637
26585
|
var safeChar = /* @__PURE__ */ __name((code, fallback) => code > 0 && code <= 1114111 ? String.fromCodePoint(code) : fallback, "safeChar");
|
|
26638
26586
|
|
|
26639
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26587
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/html/page.js
|
|
26640
26588
|
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" ? value.replace(/\s+/g, " ").trim() : "", "clean");
|
|
26641
26589
|
var namesIn = /* @__PURE__ */ __name((value) => [value].flat().map((entry) => typeof entry === "string" ? clean(entry) : clean(entry?.name)).filter(Boolean).join(", "), "namesIn");
|
|
26642
26590
|
var jsonLdNodes = /* @__PURE__ */ __name((document) => {
|
|
@@ -26692,7 +26640,7 @@ var markdownSections = /* @__PURE__ */ __name((text) => {
|
|
|
26692
26640
|
return found.map((section, index) => ({ ...section, end: found[index + 1]?.start ?? text.length }));
|
|
26693
26641
|
}, "markdownSections");
|
|
26694
26642
|
|
|
26695
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26643
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/html/index.js
|
|
26696
26644
|
var HTML = /* @__PURE__ */ new Set([".html", ".htm", ".xhtml"]);
|
|
26697
26645
|
var first = /* @__PURE__ */ __name((...values) => values.find((value) => typeof value === "string" && value !== ""), "first");
|
|
26698
26646
|
var loaded = /* @__PURE__ */ __name(async (load, name) => {
|
|
@@ -26763,7 +26711,7 @@ var html = {
|
|
|
26763
26711
|
}, "read")
|
|
26764
26712
|
};
|
|
26765
26713
|
|
|
26766
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26714
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/office/index.js
|
|
26767
26715
|
var office = {
|
|
26768
26716
|
id: "office",
|
|
26769
26717
|
version: documentExtractor("odt"),
|
|
@@ -26774,7 +26722,7 @@ var office = {
|
|
|
26774
26722
|
}, "read")
|
|
26775
26723
|
};
|
|
26776
26724
|
|
|
26777
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26725
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/pdf/index.js
|
|
26778
26726
|
var pdf = {
|
|
26779
26727
|
id: "pdf",
|
|
26780
26728
|
version: "unpdf",
|
|
@@ -26841,7 +26789,7 @@ var pdf = {
|
|
|
26841
26789
|
}), "read")
|
|
26842
26790
|
};
|
|
26843
26791
|
|
|
26844
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26792
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/plain/index.js
|
|
26845
26793
|
var PLAIN = /* @__PURE__ */ new Set([".txt", ".md", ".markdown", ".csv", ".tsv", ".json", ".log"]);
|
|
26846
26794
|
var isPlain = /* @__PURE__ */ __name((hint) => PLAIN.has(extensionOf(hint)) || hint.mime?.startsWith("text/") || hint.mime === "application/json", "isPlain");
|
|
26847
26795
|
var readPlain = /* @__PURE__ */ __name((bytes2) => {
|
|
@@ -26861,7 +26809,7 @@ var plain = {
|
|
|
26861
26809
|
read: /* @__PURE__ */ __name(async (bytes2) => readPlain(bytes2), "read")
|
|
26862
26810
|
};
|
|
26863
26811
|
|
|
26864
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26812
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/rtf/index.js
|
|
26865
26813
|
var rtf = {
|
|
26866
26814
|
id: "rtf",
|
|
26867
26815
|
version: "v1",
|
|
@@ -26869,10 +26817,10 @@ var rtf = {
|
|
|
26869
26817
|
read: /* @__PURE__ */ __name(async (bytes2) => derived(bytes2, "rtf:v1", rtfText), "read")
|
|
26870
26818
|
};
|
|
26871
26819
|
|
|
26872
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26873
26821
|
import { basename as basename7 } from "node:path";
|
|
26874
26822
|
|
|
26875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/csv-spans.js
|
|
26876
26824
|
var delimitedSpans = /* @__PURE__ */ __name((text, delimiter, maxCells = 1e4) => {
|
|
26877
26825
|
const cells = [];
|
|
26878
26826
|
let row = 1, column = 1, start = 0, quoted = false, truncated = false;
|
|
@@ -26910,7 +26858,7 @@ var delimitedSpans = /* @__PURE__ */ __name((text, delimiter, maxCells = 1e4) =>
|
|
|
26910
26858
|
return { cells, truncated };
|
|
26911
26859
|
}, "delimitedSpans");
|
|
26912
26860
|
|
|
26913
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26861
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/sheets/index.js
|
|
26914
26862
|
var DELIMITED = {
|
|
26915
26863
|
".csv": ",",
|
|
26916
26864
|
".tsv": " ",
|
|
@@ -26949,7 +26897,7 @@ var sheets = {
|
|
|
26949
26897
|
}, "read")
|
|
26950
26898
|
};
|
|
26951
26899
|
|
|
26952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26900
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/readers/registry.js
|
|
26953
26901
|
var BUILT_INS2 = [office, pdf, docx, doc, rtf, html, sheets, plain, image2];
|
|
26954
26902
|
var HEAD_BYTES = 1024;
|
|
26955
26903
|
var readers = [...BUILT_INS2];
|
|
@@ -26959,7 +26907,7 @@ var readWithRegistry = /* @__PURE__ */ __name(async (bytes2, hint, context2) =>
|
|
|
26959
26907
|
return reader ? reader.read(bytes2, hint, context2) : { status: "unsupported" };
|
|
26960
26908
|
}, "readWithRegistry");
|
|
26961
26909
|
|
|
26962
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26910
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/extract.js
|
|
26963
26911
|
var importEngine = /* @__PURE__ */ __name((name) => importFrom(new URL("attachments/extract.js", import.meta.resolve("@wirecat/cli-core")).href, name), "importEngine");
|
|
26964
26912
|
var extensionOf2 = /* @__PURE__ */ __name(({ name, path }) => extname3(name ?? path).toLowerCase(), "extensionOf");
|
|
26965
26913
|
var extractText = /* @__PURE__ */ __name(async (bytes2, hint, load, signal, env = process.env) => {
|
|
@@ -28038,7 +27986,7 @@ function imageSize(input) {
|
|
|
28038
27986
|
}
|
|
28039
27987
|
__name(imageSize, "imageSize");
|
|
28040
27988
|
|
|
28041
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27989
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/ocr.js
|
|
28042
27990
|
var MAX_PAGES = 20;
|
|
28043
27991
|
var MAX_PIXELS = 2e7;
|
|
28044
27992
|
var cancelled2 = /* @__PURE__ */ __name((signal) => {
|
|
@@ -28189,7 +28137,7 @@ var ocrPdf = /* @__PURE__ */ __name(async (bytes2, pipeline2, load, signal) => {
|
|
|
28189
28137
|
}
|
|
28190
28138
|
}, "ocrPdf");
|
|
28191
28139
|
|
|
28192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/pdf-preview.js
|
|
28193
28141
|
var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = importEngine, env = process.env) => {
|
|
28194
28142
|
const limits = pdfPreviewLimits(env);
|
|
28195
28143
|
const cancelled4 = /* @__PURE__ */ __name(() => {
|
|
@@ -28266,7 +28214,7 @@ var pdfPreview = /* @__PURE__ */ __name(async (bytes2, page, signal, load = impo
|
|
|
28266
28214
|
}
|
|
28267
28215
|
}, "pdfPreview");
|
|
28268
28216
|
|
|
28269
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28217
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/attachments/transfer.js
|
|
28270
28218
|
import { createHash as createHash7 } from "node:crypto";
|
|
28271
28219
|
import { constants as constants3 } from "node:fs";
|
|
28272
28220
|
import { lstat as lstat6, open as open8 } from "node:fs/promises";
|
|
@@ -28374,7 +28322,7 @@ var transferMime = /* @__PURE__ */ __name((head, hint, name = null) => {
|
|
|
28374
28322
|
return hint !== null && /^[a-z0-9.+-]+\/[a-z0-9.+-]+$/i.test(hint) ? hint : "application/octet-stream";
|
|
28375
28323
|
}, "transferMime");
|
|
28376
28324
|
|
|
28377
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28325
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/attachments.js
|
|
28378
28326
|
var ATTACHMENT_QUERY = {
|
|
28379
28327
|
entity: "attachment",
|
|
28380
28328
|
backend: "sql",
|
|
@@ -28755,7 +28703,7 @@ var attachmentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28755
28703
|
}, "setText")
|
|
28756
28704
|
}), "attachmentsService");
|
|
28757
28705
|
|
|
28758
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28706
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/chat-documents.js
|
|
28759
28707
|
var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
28760
28708
|
list: /* @__PURE__ */ __name(async (chat, { limit, offset, ref }) => {
|
|
28761
28709
|
const store = await accountStore(deps);
|
|
@@ -28785,7 +28733,7 @@ var chatDocumentsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
28785
28733
|
}, "list")
|
|
28786
28734
|
}), "chatDocumentsService");
|
|
28787
28735
|
|
|
28788
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28736
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/retention.js
|
|
28789
28737
|
var observationDuration = /* @__PURE__ */ __name((text, flag) => {
|
|
28790
28738
|
const match = /^(\d+(?:\.\d+)?)([smhdw])$/.exec(text);
|
|
28791
28739
|
const units2 = { s: 1e3, m: 6e4, h: 36e5, d: 864e5, w: 6048e5 };
|
|
@@ -28872,7 +28820,7 @@ var isRetentionSelection = /* @__PURE__ */ __name((selection) => {
|
|
|
28872
28820
|
}
|
|
28873
28821
|
}, "isRetentionSelection");
|
|
28874
28822
|
|
|
28875
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
28823
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/counters.js
|
|
28876
28824
|
var counterFields = /* @__PURE__ */ __name((text = "views,reactions,comments") => {
|
|
28877
28825
|
const fields = text.split(",").map((one) => one.trim());
|
|
28878
28826
|
if (!fields.length || fields.some((one) => !COUNTER_FIELDS.includes(one)) || new Set(fields).size !== fields.length)
|
|
@@ -29079,7 +29027,7 @@ var countersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29079
29027
|
};
|
|
29080
29028
|
}, "countersService");
|
|
29081
29029
|
|
|
29082
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29030
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-refresh.js
|
|
29083
29031
|
var SYNC_KEY = "messages.sync-first";
|
|
29084
29032
|
var SYNC_BOUNDS = { maxChats: 5, timeMs: 3e4, maxMessages: 500 };
|
|
29085
29033
|
var keyOf2 = /* @__PURE__ */ __name((chat) => JSON.stringify([chat.account.provider, chat.account.account, chat.chatId]), "keyOf");
|
|
@@ -29211,7 +29159,7 @@ var withRefresh = /* @__PURE__ */ __name((found, refreshed) => ({
|
|
|
29211
29159
|
...!refreshed || refreshed.complete ? {} : { coverage: { ...found.coverage, state: "stale" } }
|
|
29212
29160
|
}), "withRefresh");
|
|
29213
29161
|
|
|
29214
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29162
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/embeddings-search.js
|
|
29215
29163
|
var CANDIDATES = 50;
|
|
29216
29164
|
var WORD_HITS = 200;
|
|
29217
29165
|
var RRF_K = 60;
|
|
@@ -29486,13 +29434,13 @@ var meanOf = /* @__PURE__ */ __name((vectors) => {
|
|
|
29486
29434
|
return mean.map((value) => value / length);
|
|
29487
29435
|
}, "meanOf");
|
|
29488
29436
|
|
|
29489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/embeddings.js
|
|
29490
29438
|
var embeddingsService = /* @__PURE__ */ __name((deps) => ({
|
|
29491
29439
|
...embeddingsMaintenance(deps),
|
|
29492
29440
|
...embeddingsSearch(deps)
|
|
29493
29441
|
}), "embeddingsService");
|
|
29494
29442
|
|
|
29495
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29443
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/folders.js
|
|
29496
29444
|
var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
29497
29445
|
const online = /* @__PURE__ */ __name(async (command) => {
|
|
29498
29446
|
if (deps.offline)
|
|
@@ -29625,15 +29573,15 @@ var foldersService = /* @__PURE__ */ __name((deps) => {
|
|
|
29625
29573
|
if (link5.trim() === "")
|
|
29626
29574
|
throw new CliError("validation_error", "give the folder's link");
|
|
29627
29575
|
const connection = await online("chats folders join");
|
|
29628
|
-
const
|
|
29576
|
+
const join16 = capability(connection, "joinFolder", "join a shared folder");
|
|
29629
29577
|
const operationId = newOperationId();
|
|
29630
|
-
const folder = await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: "folder-join" }, () =>
|
|
29578
|
+
const folder = await guardedWrite(deps.guard, { operationId, chatId: null, kind: "account", action: "folder-join" }, () => join16(link5.trim()));
|
|
29631
29579
|
return { operationId, folder };
|
|
29632
29580
|
}, "join")
|
|
29633
29581
|
};
|
|
29634
29582
|
}, "foldersService");
|
|
29635
29583
|
|
|
29636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29584
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/mentions.js
|
|
29637
29585
|
var REVIEW_COUNT = 500;
|
|
29638
29586
|
var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
29639
29587
|
const located = /* @__PURE__ */ __name(async () => {
|
|
@@ -29712,7 +29660,7 @@ var mentionsService = /* @__PURE__ */ __name((deps) => {
|
|
|
29712
29660
|
};
|
|
29713
29661
|
}, "mentionsService");
|
|
29714
29662
|
|
|
29715
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29663
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/message-link.js
|
|
29716
29664
|
var messageLinkTarget = /* @__PURE__ */ __name((reference, message, provider) => {
|
|
29717
29665
|
if (isLocator(reference)) {
|
|
29718
29666
|
if (message !== void 0)
|
|
@@ -29759,7 +29707,7 @@ var validatePermalink = /* @__PURE__ */ __name((link5) => {
|
|
|
29759
29707
|
return { url: link5.url, access: link5.access, reason: link5.reason };
|
|
29760
29708
|
}, "validatePermalink");
|
|
29761
29709
|
|
|
29762
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29710
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/pin-duration.js
|
|
29763
29711
|
var spokenSeconds = /* @__PURE__ */ __name((seconds) => {
|
|
29764
29712
|
if (seconds % 86400 === 0 && seconds > 86400)
|
|
29765
29713
|
return `${seconds / 86400}d`;
|
|
@@ -29791,7 +29739,7 @@ var pinDurationOf = /* @__PURE__ */ __name((value, allowed, flag = "--expire-tim
|
|
|
29791
29739
|
return seconds;
|
|
29792
29740
|
}, "pinDurationOf");
|
|
29793
29741
|
|
|
29794
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29742
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/sends/send-as.js
|
|
29795
29743
|
var sendAsCheck = /* @__PURE__ */ __name((connection, sendAs) => {
|
|
29796
29744
|
if (sendAs === void 0) {
|
|
29797
29745
|
const saved = connection.savedSender?.bind(connection);
|
|
@@ -29816,7 +29764,7 @@ var typedSendAs = /* @__PURE__ */ __name((typed) => {
|
|
|
29816
29764
|
return sendAs;
|
|
29817
29765
|
}, "typedSendAs");
|
|
29818
29766
|
|
|
29819
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29767
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/search/question-plan.js
|
|
29820
29768
|
var words = /* @__PURE__ */ __name((text) => normalize(text).match(/[\p{L}\p{N}]+/gu) ?? [], "words");
|
|
29821
29769
|
var scaffolding = new Set(words("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"));
|
|
29822
29770
|
var questionWord = /\b(?:what|which|how|who|where|when|can|could|should)\b|(?:^|\s)(?:сколько|какой|какая|какие|какое|кто|кому|кем|где|когда|как|что|можно|может|могут|ли)(?:\s|$)/iu;
|
|
@@ -29931,7 +29879,7 @@ function planQuestion(text, strict = false) {
|
|
|
29931
29879
|
}
|
|
29932
29880
|
__name(planQuestion, "planQuestion");
|
|
29933
29881
|
|
|
29934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29882
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-combined.js
|
|
29935
29883
|
var COMBINED_DEFAULTS = { candidateDepth: 300, rrfK: 60, rerank: "all", chatCap: 0 };
|
|
29936
29884
|
var tokensOf = /* @__PURE__ */ __name((text) => normalize(text).match(/[\p{L}\p{N}\p{Co}\p{M}]+/gu) ?? [], "tokensOf");
|
|
29937
29885
|
var searchCombined = /* @__PURE__ */ __name(async (store, account, request, messenger = {}, options = COMBINED_DEFAULTS) => {
|
|
@@ -30124,7 +30072,7 @@ var signals = /* @__PURE__ */ __name((hit, terms, corrections, execution, mode,
|
|
|
30124
30072
|
return mode === "coverage" ? coverage * 4 : mode === "proximity" ? proximity : mode === "phrase" ? phrase : coverage * 4 + proximity + phrase;
|
|
30125
30073
|
}, "signals");
|
|
30126
30074
|
|
|
30127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-discovery.js
|
|
30128
30076
|
var MEANING_DEPTH = 100;
|
|
30129
30077
|
var RRF_K2 = 60;
|
|
30130
30078
|
var RERANK_DEPTH = 50;
|
|
@@ -30393,7 +30341,7 @@ var mixedWithReranker = /* @__PURE__ */ __name((head, scores) => {
|
|
|
30393
30341
|
})).sort((a, b) => b.mixed - a.mixed).map(({ hit }) => hit);
|
|
30394
30342
|
}, "mixedWithReranker");
|
|
30395
30343
|
|
|
30396
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30344
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/thread-context.js
|
|
30397
30345
|
var THREAD_BOUNDS = { maxHops: 8, maxMessages: 50, maxBytes: 65536, withinMs: 864e5 };
|
|
30398
30346
|
var bytes = /* @__PURE__ */ __name((items, links) => Buffer.byteLength(JSON.stringify({ items, links }), "utf8"), "bytes");
|
|
30399
30347
|
var threadBounds = /* @__PURE__ */ __name((options = {}) => {
|
|
@@ -30592,7 +30540,7 @@ var readThreadContext = /* @__PURE__ */ __name(async (store, account, chat, mess
|
|
|
30592
30540
|
return result;
|
|
30593
30541
|
}, "readThreadContext");
|
|
30594
30542
|
|
|
30595
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30543
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-archive-search.js
|
|
30596
30544
|
var SEARCH_FILL_MS = 200;
|
|
30597
30545
|
var statsStore = /* @__PURE__ */ __name(async (store, account, request, messenger = {}) => {
|
|
30598
30546
|
const stop = Date.now() + SEARCH_FILL_MS;
|
|
@@ -30652,15 +30600,15 @@ var accountOf2 = /* @__PURE__ */ __name((hit) => {
|
|
|
30652
30600
|
}, "accountOf");
|
|
30653
30601
|
var keyOf3 = /* @__PURE__ */ __name(({ provider, account }) => `${provider}/${account}`, "keyOf");
|
|
30654
30602
|
|
|
30655
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30603
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30656
30604
|
import { createHash as createHash9 } from "node:crypto";
|
|
30657
30605
|
import { readFile as readFile2, stat as stat3 } from "node:fs/promises";
|
|
30658
30606
|
import { setTimeout as sleep4 } from "node:timers/promises";
|
|
30659
30607
|
|
|
30660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30608
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/file-download.js
|
|
30661
30609
|
import { createWriteStream, mkdirSync } from "node:fs";
|
|
30662
30610
|
import { link as link4, rm } from "node:fs/promises";
|
|
30663
|
-
import { basename as basename8, join as
|
|
30611
|
+
import { basename as basename8, join as join14, resolve as resolve6 } from "node:path";
|
|
30664
30612
|
import { Readable, Transform } from "node:stream";
|
|
30665
30613
|
import { pipeline } from "node:stream/promises";
|
|
30666
30614
|
var refreshedFiles = /* @__PURE__ */ __name((files) => files.flatMap(({ kind, name, position, providerRef }) => providerRef === void 0 || Object.keys(providerRef).length === 0 ? [] : [
|
|
@@ -30749,7 +30697,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30749
30697
|
const extension = EXTENSIONS[file2.mime ?? ""] ?? BY_KIND[file2.kind];
|
|
30750
30698
|
return own ?? (extension ? `${fallbackName}.${extension}` : fallbackName);
|
|
30751
30699
|
}, "fileName");
|
|
30752
|
-
const partial =
|
|
30700
|
+
const partial = join14(directory2, `.${fileName()}.${process.pid}.part`);
|
|
30753
30701
|
let bytes2 = 0;
|
|
30754
30702
|
const counting = new Transform({
|
|
30755
30703
|
transform(chunk, _encoding, done2) {
|
|
@@ -30762,7 +30710,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30762
30710
|
const name = fileName();
|
|
30763
30711
|
const names2 = unique && own ? [name, `${fallbackName}-${own}`] : [name];
|
|
30764
30712
|
for (const candidate of names2) {
|
|
30765
|
-
const path2 = resolve6(
|
|
30713
|
+
const path2 = resolve6(join14(directory2, candidate));
|
|
30766
30714
|
const taken = await link4(partial, path2).then(() => false, (error) => {
|
|
30767
30715
|
if (error.code === "EEXIST")
|
|
30768
30716
|
return true;
|
|
@@ -30771,7 +30719,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30771
30719
|
if (!taken)
|
|
30772
30720
|
return { kind: file2.kind, path: path2, bytes: bytes2 };
|
|
30773
30721
|
}
|
|
30774
|
-
const path = resolve6(
|
|
30722
|
+
const path = resolve6(join14(directory2, names2.at(-1) ?? name));
|
|
30775
30723
|
if (unique)
|
|
30776
30724
|
return { kind: file2.kind, path, bytes: bytes2, existing: true };
|
|
30777
30725
|
throw new CliError("validation_error", `${path} already exists \u2014 nothing was overwritten; choose --output-dir`);
|
|
@@ -30780,7 +30728,7 @@ var save = /* @__PURE__ */ __name(async (file2, directory2, fallbackName, { uniq
|
|
|
30780
30728
|
}
|
|
30781
30729
|
}, "save");
|
|
30782
30730
|
|
|
30783
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30731
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/pictures.js
|
|
30784
30732
|
var PICTURE_MAX_BYTES = 25 * 1024 * 1024;
|
|
30785
30733
|
var PICTURE_FLOOR = 0.25;
|
|
30786
30734
|
var PAGE4 = 50;
|
|
@@ -30797,7 +30745,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
30797
30745
|
const directory2 = imageModelsDirectory(deps.env);
|
|
30798
30746
|
if (!isImageModelInstalled(model2, directory2))
|
|
30799
30747
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
30800
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
30748
|
+
const { openPictureEmbedder } = await import("./embedder-NBQXDXAO.js");
|
|
30801
30749
|
return openPictureEmbedder(model2, directory2);
|
|
30802
30750
|
}, "open");
|
|
30803
30751
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -30993,7 +30941,7 @@ var withPictures = /* @__PURE__ */ __name((messages, pictures) => ({
|
|
|
30993
30941
|
}, "search")
|
|
30994
30942
|
}), "withPictures");
|
|
30995
30943
|
|
|
30996
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30944
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-meaning.js
|
|
30997
30945
|
var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, shared) => {
|
|
30998
30946
|
const target2 = embeddingTarget(deps, DEFAULT_TEXT_MODEL);
|
|
30999
30947
|
const skipped = /* @__PURE__ */ __name((reason, step) => ({
|
|
@@ -31041,7 +30989,7 @@ var meaningLane = /* @__PURE__ */ __name((deps) => async (question, accounts, sh
|
|
|
31041
30989
|
}
|
|
31042
30990
|
}, "meaningLane");
|
|
31043
30991
|
|
|
31044
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
30992
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages-rerank.js
|
|
31045
30993
|
var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
31046
30994
|
const choice = deps.reranker ?? DEFAULT_RERANK_MODEL;
|
|
31047
30995
|
if (choice === "off")
|
|
@@ -31053,9 +31001,9 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31053
31001
|
return { skipped: { reason: `${model.id} is not downloaded`, step: "models.download", model: model.id } };
|
|
31054
31002
|
try {
|
|
31055
31003
|
const warm = deps.embedders;
|
|
31056
|
-
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-
|
|
31004
|
+
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-47MMIFIJ.js")).openRerankerProcess(model, directory2, {
|
|
31057
31005
|
threads: defaultThreads()
|
|
31058
|
-
})) : await (await import("./rerank-
|
|
31006
|
+
})) : await (await import("./rerank-CQAR46L3.js")).openReranker(model, directory2);
|
|
31059
31007
|
return {
|
|
31060
31008
|
model: model.id,
|
|
31061
31009
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -31075,17 +31023,17 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
31075
31023
|
};
|
|
31076
31024
|
}, "rerankLane");
|
|
31077
31025
|
|
|
31078
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31026
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/document-pictures.js
|
|
31079
31027
|
var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}) => {
|
|
31080
31028
|
const model = imageModel(DEFAULT_IMAGE_MODEL);
|
|
31081
31029
|
const directory2 = imageModelsDirectory(env);
|
|
31082
31030
|
if (!isImageModelInstalled(model, directory2))
|
|
31083
31031
|
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 });
|
|
31084
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
31032
|
+
const { openPictureEmbedder } = await import("./embedder-NBQXDXAO.js");
|
|
31085
31033
|
return openPictureEmbedder(model, directory2);
|
|
31086
31034
|
}, "openPictureEmbedderFor");
|
|
31087
31035
|
|
|
31088
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31036
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/document-source.js
|
|
31089
31037
|
var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) => {
|
|
31090
31038
|
const metadata = note.frontMatter;
|
|
31091
31039
|
const account = accounts.find(({ id: id2 }) => String(id2) === note.folderId);
|
|
@@ -31102,7 +31050,7 @@ var documentSource = /* @__PURE__ */ __name((note, accounts, profiles, file2) =>
|
|
|
31102
31050
|
};
|
|
31103
31051
|
}, "documentSource");
|
|
31104
31052
|
|
|
31105
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31053
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/notes-title-tier.js
|
|
31106
31054
|
var plainQueryWords = /* @__PURE__ */ __name((query) => {
|
|
31107
31055
|
let root;
|
|
31108
31056
|
try {
|
|
@@ -31129,7 +31077,7 @@ var titleTiers = /* @__PURE__ */ __name((hits, words2) => {
|
|
|
31129
31077
|
return [...hits].sort((a, b) => rank(a) - rank(b));
|
|
31130
31078
|
}, "titleTiers");
|
|
31131
31079
|
|
|
31132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31080
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/notes-search.js
|
|
31133
31081
|
var storeQuery = /* @__PURE__ */ __name(async (store, text, { exact, timezone } = {}) => {
|
|
31134
31082
|
const ast = validateFields(parseLucene(text, { ...SEARCH_QUERY, defaultField: exact ? "exact" : "text" }));
|
|
31135
31083
|
const zone = timezoneOf(timezone);
|
|
@@ -31442,7 +31390,7 @@ var searchNotesOf = /* @__PURE__ */ __name(async (store, account, text, { accoun
|
|
|
31442
31390
|
};
|
|
31443
31391
|
}, "searchNotesOf");
|
|
31444
31392
|
|
|
31445
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/events-search.js
|
|
31446
31394
|
var MAX_EVENTS_OFFSET = 1e3;
|
|
31447
31395
|
var iso3 = /* @__PURE__ */ __name((at) => at === null ? null : new Date(at).toISOString(), "iso");
|
|
31448
31396
|
var accountIdsOf = /* @__PURE__ */ __name(async (store, accounts) => {
|
|
@@ -31554,7 +31502,7 @@ var searchEvents = /* @__PURE__ */ __name(async (store, query, { limit = 20, off
|
|
|
31554
31502
|
};
|
|
31555
31503
|
}, "searchEvents");
|
|
31556
31504
|
|
|
31557
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31505
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-all.js
|
|
31558
31506
|
var RESOURCES_SEARCHED = ["messages", "mail", "notes", "events"];
|
|
31559
31507
|
var skippable = /* @__PURE__ */ __name((error) => error instanceof CliError && (error.code === "validation_error" || error.code === "not_found"), "skippable");
|
|
31560
31508
|
var filtersBeside = /* @__PURE__ */ __name((text) => {
|
|
@@ -31757,7 +31705,7 @@ var searchAll = /* @__PURE__ */ __name(async (store, account, request, messenger
|
|
|
31757
31705
|
};
|
|
31758
31706
|
}, "searchAll");
|
|
31759
31707
|
|
|
31760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/search-all-meetings.js
|
|
31761
31709
|
var RESOURCES_SEARCHED_WITH_MEETINGS = [...RESOURCES_SEARCHED, "meetings"];
|
|
31762
31710
|
var whole2 = /* @__PURE__ */ __name((value, minimum, maximum, label) => {
|
|
31763
31711
|
if (!Number.isSafeInteger(value) || value < minimum || value > maximum)
|
|
@@ -32004,7 +31952,7 @@ var searchAllOfSource = /* @__PURE__ */ __name(async (store, account, source, re
|
|
|
32004
31952
|
return { ...found, skipped: [...skipped, ...empty2, ...unnamed, ...found.skipped] };
|
|
32005
31953
|
}, "searchAllOfSource");
|
|
32006
31954
|
|
|
32007
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
31955
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/server-search.js
|
|
32008
31956
|
var SERVER_SEARCH_KEY = "messages.server-search";
|
|
32009
31957
|
var SERVER_BOUNDS = { timeMs: 5e3, perCall: 100, maxCalls: 3 };
|
|
32010
31958
|
var DEFAULT_BACKEND = "both";
|
|
@@ -32193,7 +32141,7 @@ var searchServer = /* @__PURE__ */ __name(async (deps, request) => {
|
|
|
32193
32141
|
return { report, sources };
|
|
32194
32142
|
}, "searchServer");
|
|
32195
32143
|
|
|
32196
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32144
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/messages.js
|
|
32197
32145
|
var DELETE_AT_ONCE = 10;
|
|
32198
32146
|
var messagesService = /* @__PURE__ */ __name((deps) => {
|
|
32199
32147
|
const { guard } = deps;
|
|
@@ -32619,7 +32567,7 @@ var checkMediaOptions = /* @__PURE__ */ __name((messenger, asked, attachments) =
|
|
|
32619
32567
|
throw new CliError("validation_error", `${MEDIA_FLAGS[first2]} needs a --photo or --file`);
|
|
32620
32568
|
}, "checkMediaOptions");
|
|
32621
32569
|
|
|
32622
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32570
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/domain/channel-tags.js
|
|
32623
32571
|
var CHANNEL_TAG_RULES_VERSION = "keywords-v1";
|
|
32624
32572
|
var RULES = {
|
|
32625
32573
|
ai: [/\b(ai|gpt|llm|machine learning|artificial intelligence)\b/iu, /нейросет|искусственн/iu],
|
|
@@ -32634,7 +32582,7 @@ var classifyChannel = /* @__PURE__ */ __name((metadata) => Object.entries(RULES)
|
|
|
32634
32582
|
return fields.length ? [{ tag, score: fields.length / 3, fields }] : [];
|
|
32635
32583
|
}), "classifyChannel");
|
|
32636
32584
|
|
|
32637
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32585
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/metadata.js
|
|
32638
32586
|
var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
32639
32587
|
const held = /* @__PURE__ */ __name(async (reference, { includeLeft = false } = {}) => {
|
|
32640
32588
|
const store = await deps.store();
|
|
@@ -32720,7 +32668,7 @@ var metadataService = /* @__PURE__ */ __name((deps) => {
|
|
|
32720
32668
|
};
|
|
32721
32669
|
}, "metadataService");
|
|
32722
32670
|
|
|
32723
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32671
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/moderation/run.js
|
|
32724
32672
|
var FIRST_LOOK_MS = 24 * 36e5;
|
|
32725
32673
|
var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
32726
32674
|
const { chatId, title, rules, point, since, dryRun } = run;
|
|
@@ -32757,7 +32705,7 @@ var moderateWith = /* @__PURE__ */ __name(async (run) => {
|
|
|
32757
32705
|
return { chatId, rows, notes };
|
|
32758
32706
|
}, "moderateWith");
|
|
32759
32707
|
|
|
32760
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32708
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/moderation.js
|
|
32761
32709
|
var moderationService = /* @__PURE__ */ __name((deps) => {
|
|
32762
32710
|
const file2 = /* @__PURE__ */ __name(() => new ModerationRules(moderationPathFor(deps.messenger.app, deps.profile ?? "default", deps.env ?? process.env)), "file");
|
|
32763
32711
|
const group = /* @__PURE__ */ __name(async (chat) => {
|
|
@@ -32835,7 +32783,7 @@ var moderatorOf = /* @__PURE__ */ __name((adapter, deps) => ({
|
|
|
32835
32783
|
}, "removePerson")
|
|
32836
32784
|
}), "moderatorOf");
|
|
32837
32785
|
|
|
32838
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32786
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/private-people.js
|
|
32839
32787
|
var noteItem = /* @__PURE__ */ __name((provider, note) => ({
|
|
32840
32788
|
id: note.id,
|
|
32841
32789
|
contact: formatReference({ type: "contact", provider, id: note.personId }),
|
|
@@ -32879,7 +32827,7 @@ var privatePeopleService = /* @__PURE__ */ __name((deps) => {
|
|
|
32879
32827
|
};
|
|
32880
32828
|
}, "privatePeopleService");
|
|
32881
32829
|
|
|
32882
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32830
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/rankings.js
|
|
32883
32831
|
var empty = /* @__PURE__ */ __name(() => ({
|
|
32884
32832
|
total: 0,
|
|
32885
32833
|
population: 0,
|
|
@@ -33135,7 +33083,7 @@ var rankingsService = /* @__PURE__ */ __name((deps) => ({
|
|
|
33135
33083
|
}, "evidence")
|
|
33136
33084
|
}), "rankingsService");
|
|
33137
33085
|
|
|
33138
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33086
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/searches.js
|
|
33139
33087
|
var savedSearchItem = /* @__PURE__ */ __name((one) => ({
|
|
33140
33088
|
id: one.id,
|
|
33141
33089
|
name: one.name,
|
|
@@ -33264,7 +33212,7 @@ var searchesService = /* @__PURE__ */ __name((deps) => {
|
|
|
33264
33212
|
};
|
|
33265
33213
|
}, "searchesService");
|
|
33266
33214
|
|
|
33267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33215
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/tags.js
|
|
33268
33216
|
var TAGGING_QUERY = {
|
|
33269
33217
|
entity: "tagging",
|
|
33270
33218
|
backend: "sql",
|
|
@@ -33348,7 +33296,7 @@ var tagsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33348
33296
|
};
|
|
33349
33297
|
}, "tagsService");
|
|
33350
33298
|
|
|
33351
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33299
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/topics.js
|
|
33352
33300
|
var actionOf = /* @__PURE__ */ __name(({ title, closed, pinned, hidden }) => {
|
|
33353
33301
|
const set = [closed, pinned, hidden].filter((one) => one !== void 0).length;
|
|
33354
33302
|
if (title !== void 0 || set !== 1)
|
|
@@ -33533,7 +33481,7 @@ var topicsService = /* @__PURE__ */ __name((deps) => {
|
|
|
33533
33481
|
};
|
|
33534
33482
|
}, "topicsService");
|
|
33535
33483
|
|
|
33536
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33484
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/evidence.js
|
|
33537
33485
|
import { createHash as createHash10, randomUUID as randomUUID7 } from "node:crypto";
|
|
33538
33486
|
var hash2 = /* @__PURE__ */ __name((value) => createHash10("sha256").update(JSON.stringify(value)).digest("hex"), "hash");
|
|
33539
33487
|
var positive = /* @__PURE__ */ __name((value, name, minimum = 1) => {
|
|
@@ -33607,7 +33555,7 @@ var prepareEvidencePacket = /* @__PURE__ */ __name(({ kind, source, page, limits
|
|
|
33607
33555
|
return { ...content, id: randomUUID7(), fingerprint: hash2(content) };
|
|
33608
33556
|
}, "prepareEvidencePacket");
|
|
33609
33557
|
|
|
33610
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/evidence-read.js
|
|
33611
33559
|
var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, limit, before: before2 }, messenger = {}) => {
|
|
33612
33560
|
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 100)
|
|
33613
33561
|
throw new CliError("validation_error", "evidence message limit must be an integer from 1 to 100");
|
|
@@ -33627,7 +33575,7 @@ var readEvidencePacket = /* @__PURE__ */ __name(async (store, account, { chat, l
|
|
|
33627
33575
|
return { ...packet, nextBeforeId: older && last ? last.id : null };
|
|
33628
33576
|
}, "readEvidencePacket");
|
|
33629
33577
|
|
|
33630
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33578
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-project-discovery.js
|
|
33631
33579
|
var scopeKeys = [
|
|
33632
33580
|
"accountId",
|
|
33633
33581
|
"meetingId",
|
|
@@ -33649,7 +33597,7 @@ var optionKeys = /* @__PURE__ */ new Set([
|
|
|
33649
33597
|
"maxVocabularyReadBytes"
|
|
33650
33598
|
]);
|
|
33651
33599
|
|
|
33652
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33600
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/context/communication-selection.js
|
|
33653
33601
|
var communicationFields = {
|
|
33654
33602
|
sources: pipe(array(strictObject({
|
|
33655
33603
|
id: pipe(string(), regex(/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/)),
|
|
@@ -33681,7 +33629,7 @@ var communicationRequest = /* @__PURE__ */ __name((value, preparationAfter) => {
|
|
|
33681
33629
|
return { ...input, after, before: before2 };
|
|
33682
33630
|
}, "communicationRequest");
|
|
33683
33631
|
|
|
33684
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33632
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-preparation-validation.js
|
|
33685
33633
|
var MEETING_PREPARATION_LIMITS = {
|
|
33686
33634
|
meetings: { min: 1, max: 20, default: 5 },
|
|
33687
33635
|
cues: { min: 1, max: 100, default: 10 },
|
|
@@ -33754,7 +33702,7 @@ var validateMeetingPreparationRequest = /* @__PURE__ */ __name((externalId, orig
|
|
|
33754
33702
|
};
|
|
33755
33703
|
}, "validateMeetingPreparationRequest");
|
|
33756
33704
|
|
|
33757
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33705
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/meeting-communications-selection.js
|
|
33758
33706
|
var validatePreparationCommunications = /* @__PURE__ */ __name((section, request, after) => {
|
|
33759
33707
|
const fail = /* @__PURE__ */ __name(() => {
|
|
33760
33708
|
throw new CliError("invalid_response", "Preparation communications returned another selection or invalid evidence");
|
|
@@ -33802,7 +33750,7 @@ var validatePreparationCommunications = /* @__PURE__ */ __name((section, request
|
|
|
33802
33750
|
}
|
|
33803
33751
|
}, "validatePreparationCommunications");
|
|
33804
33752
|
|
|
33805
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33753
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/package-upgrade.js
|
|
33806
33754
|
var upgradePackage = /* @__PURE__ */ __name(async ({ current, command, packageName, check: check2 }, ports) => {
|
|
33807
33755
|
const installer = ports.installer();
|
|
33808
33756
|
const argv = updateCommand(installer, packageName);
|
|
@@ -33867,7 +33815,7 @@ var dayAfter = /* @__PURE__ */ __name((published) => {
|
|
|
33867
33815
|
return Number.isNaN(time) ? null : new Date(time + 24 * 60 * 60 * 1e3).toISOString();
|
|
33868
33816
|
}, "dayAfter");
|
|
33869
33817
|
|
|
33870
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33818
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/services/index.js
|
|
33871
33819
|
var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
33872
33820
|
const pictures = picturesService(deps);
|
|
33873
33821
|
const base = {
|
|
@@ -33903,12 +33851,12 @@ var servicesFor = /* @__PURE__ */ __name((deps) => {
|
|
|
33903
33851
|
return deps.messenger.services ? { ...base, ...deps.messenger.services(base, deps) } : base;
|
|
33904
33852
|
}, "servicesFor");
|
|
33905
33853
|
|
|
33906
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33854
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/background/relay.js
|
|
33907
33855
|
import { createHash as createHash11 } from "node:crypto";
|
|
33908
33856
|
import { chmodSync, lstatSync, mkdirSync as mkdirSync2, rmSync } from "node:fs";
|
|
33909
33857
|
import { createConnection, createServer } from "node:net";
|
|
33910
33858
|
import { tmpdir } from "node:os";
|
|
33911
|
-
import { dirname as dirname7, isAbsolute as isAbsolute3, join as
|
|
33859
|
+
import { dirname as dirname7, isAbsolute as isAbsolute3, join as join15 } from "node:path";
|
|
33912
33860
|
import { PassThrough, Writable } from "node:stream";
|
|
33913
33861
|
var RELAY_PROTOCOL = 1;
|
|
33914
33862
|
var requestSchema = strictObject({
|
|
@@ -33926,11 +33874,11 @@ var relayPath = /* @__PURE__ */ __name((lockPath) => {
|
|
|
33926
33874
|
if (beside.length <= MAX_SOCKET_PATH)
|
|
33927
33875
|
return beside;
|
|
33928
33876
|
const hash3 = createHash11("sha256").update(beside).digest("hex").slice(0, 16);
|
|
33929
|
-
const name =
|
|
33930
|
-
const temporary =
|
|
33877
|
+
const name = join15(`wirecat-relay-${process.getuid?.() ?? "user"}`, `${hash3}.sock`);
|
|
33878
|
+
const temporary = join15(tmpdir(), name);
|
|
33931
33879
|
if (temporary.length <= MAX_SOCKET_PATH || process.platform === "win32")
|
|
33932
33880
|
return temporary;
|
|
33933
|
-
return
|
|
33881
|
+
return join15("/tmp", name);
|
|
33934
33882
|
}, "relayPath");
|
|
33935
33883
|
var privateDirectory = /* @__PURE__ */ __name((dir) => {
|
|
33936
33884
|
mkdirSync2(dir, { recursive: true, mode: 448 });
|
|
@@ -34124,7 +34072,7 @@ var relayCommand = /* @__PURE__ */ __name((path, request, options) => new Promis
|
|
|
34124
34072
|
}, () => finish({ error: stopped() }));
|
|
34125
34073
|
}), "relayCommand");
|
|
34126
34074
|
|
|
34127
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34075
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.469.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._2a6ca8de460e41c79b470c9aa59440d5/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-relay.js
|
|
34128
34076
|
var lentConnection = /* @__PURE__ */ __name((connection, watchers) => throughWrapper(connection, {
|
|
34129
34077
|
close: /* @__PURE__ */ __name(async () => {
|
|
34130
34078
|
}, "close"),
|
|
@@ -34233,10 +34181,6 @@ export {
|
|
|
34233
34181
|
checkMediaArchive,
|
|
34234
34182
|
archiveMedia,
|
|
34235
34183
|
moveMediaArchive,
|
|
34236
|
-
IMAGE_MODELS,
|
|
34237
|
-
DEFAULT_IMAGE_MODEL,
|
|
34238
|
-
imageModelsDirectory,
|
|
34239
|
-
isImageModelInstalled,
|
|
34240
34184
|
downloadTextModel,
|
|
34241
34185
|
downloadRerankModel,
|
|
34242
34186
|
downloadImageModel,
|