@wirecat/tg-cli 0.102.0 → 0.104.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/README.md +1 -0
- package/dist/bin/tg.js +31 -19
- package/dist/bundle/{adapter-M2HRSFFL.js → adapter-QTAHA2JC.js} +49 -48
- package/dist/bundle/{all-profiles-GOD2QNTK.js → all-profiles-7CXBVRFU.js} +13 -13
- package/dist/bundle/{anthropic-LKU7RWMA.js → anthropic-FWBQ7JHT.js} +10 -10
- package/dist/bundle/app-server-XF4GY2Y6.js +222 -0
- package/dist/bundle/{bot-api-X3MPFVPL.js → bot-api-XDMMWRYI.js} +50 -49
- package/dist/bundle/{bot-history-OUMVVG22.js → bot-history-TU2X7RNN.js} +19 -19
- package/dist/bundle/{bun-LIZ6MKFS.js → bun-6GSDPKNZ.js} +5 -5
- package/dist/bundle/{bun-sqlite-2IFQYQ44.js → bun-sqlite-AO27E35V.js} +8 -8
- package/dist/bundle/{chunk-ZZLKX62Z.js → chunk-2ABQZVK4.js} +3 -3
- package/dist/bundle/{chunk-5DFGJPT6.js → chunk-3GGU65YR.js} +9 -7
- package/dist/bundle/{chunk-QEPZUFPL.js → chunk-3XZQQGCB.js} +59 -59
- package/dist/bundle/{chunk-W5EB4JLV.js → chunk-54RJDS3X.js} +6 -6
- package/dist/bundle/{chunk-WMOEOVWZ.js → chunk-5D4AEUVA.js} +3 -3
- package/dist/bundle/{chunk-BBC546ZA.js → chunk-5K7E36ND.js} +6 -6
- package/dist/bundle/{chunk-OEJ5DMCX.js → chunk-67SRVSPU.js} +10 -10
- package/dist/bundle/{chunk-TXBUDJ3P.js → chunk-6K4QGBXU.js} +5 -5
- package/dist/bundle/{chunk-264DAFJV.js → chunk-6YUFPSSE.js} +7 -7
- package/dist/bundle/{chunk-HLAZ65AW.js → chunk-7WHM3KNI.js} +5 -5
- package/dist/bundle/{chunk-AVWK4NCW.js → chunk-ADLS6FVG.js} +13 -13
- package/dist/bundle/{chunk-M5UH5CF3.js → chunk-ADMV4WGV.js} +8 -8
- package/dist/bundle/{chunk-WVEHUKCZ.js → chunk-B7TTM75D.js} +4 -4
- package/dist/bundle/{chunk-OHBHHBYL.js → chunk-BI2AXVHY.js} +6 -6
- package/dist/bundle/{chunk-XXTJUZMB.js → chunk-BIWJK5YU.js} +4 -4
- package/dist/bundle/{chunk-Q2NYEX4A.js → chunk-BKVJNPA6.js} +71 -30
- package/dist/bundle/{chunk-5D6OJREA.js → chunk-C5N7G6UH.js} +4 -4
- package/dist/bundle/{chunk-UK3GAN7Q.js → chunk-DANCAYRP.js} +16 -11
- package/dist/bundle/{chunk-7BFO3DY6.js → chunk-DFDN6AUB.js} +2 -2
- package/dist/bundle/{chunk-2XBSVRT2.js → chunk-FG2QTYEF.js} +4 -4
- package/dist/bundle/{chunk-DE7LFMY2.js → chunk-FRZHF2X6.js} +13 -11
- package/dist/bundle/{chunk-VUJ34PEQ.js → chunk-FUWSIEYY.js} +15 -15
- package/dist/bundle/{chunk-GSKFAE3I.js → chunk-GE22MYA6.js} +158 -56
- package/dist/bundle/{chunk-5VSR5ENL.js → chunk-GZ5CR5QB.js} +11 -11
- package/dist/bundle/{chunk-PSH7K6TL.js → chunk-HOR7DS3P.js} +25 -25
- package/dist/bundle/{chunk-CLWYQNSC.js → chunk-KRLCUBII.js} +9 -9
- package/dist/bundle/chunk-LJCGQMGN.js +264 -0
- package/dist/bundle/{chunk-OCWARAFE.js → chunk-LOFG3Q35.js} +5 -5
- package/dist/bundle/{chunk-SRU3OF4R.js → chunk-LSQUNABH.js} +5 -5
- package/dist/bundle/{chunk-MGG7JSNO.js → chunk-MB3PCNRL.js} +6 -6
- package/dist/bundle/{chunk-U4RRZUNP.js → chunk-MCD2GANK.js} +35 -282
- package/dist/bundle/{chunk-5KU4UQBM.js → chunk-MFS52LTZ.js} +4 -4
- package/dist/bundle/{chunk-ENE5CSVY.js → chunk-MR4LW4EC.js} +2176 -1927
- package/dist/bundle/{chunk-2SUTCDGO.js → chunk-N6VHHMSZ.js} +5 -5
- package/dist/bundle/chunk-O5EHUB2V.js +2 -0
- package/dist/bundle/{chunk-FBWOQMPE.js → chunk-P3WU6UYJ.js} +227 -283
- package/dist/bundle/{chunk-F2TG3BA2.js → chunk-PHQTSF44.js} +9 -9
- package/dist/bundle/{chunk-AUOXTGTU.js → chunk-PWIE7VBL.js} +4 -4
- package/dist/bundle/{chunk-TV5DGHBT.js → chunk-QVTCOBN5.js} +263 -249
- package/dist/bundle/{chunk-JFSVXMN6.js → chunk-QY7MW7HK.js} +6 -6
- package/dist/bundle/{chunk-V52SBQYF.js → chunk-RRWMYR2H.js} +18 -17
- package/dist/bundle/{chunk-4QB4WDLT.js → chunk-RTAV5XNT.js} +15 -15
- package/dist/bundle/{server-YWL4HDOP.js → chunk-SZE6425L.js} +54 -67
- package/dist/bundle/{chunk-DG62L57H.js → chunk-T4SDOYPY.js} +20 -20
- package/dist/bundle/{chunk-334UBWOB.js → chunk-TJR37WKA.js} +14 -14
- package/dist/bundle/{chunk-ERQDBK5I.js → chunk-U2AK4QXY.js} +23 -5
- package/dist/bundle/{chunk-BQYTIYGB.js → chunk-UDXRDFHN.js} +97 -96
- package/dist/bundle/{chunk-Y4XSWI22.js → chunk-UT6G2X7T.js} +7 -6
- package/dist/bundle/{chunk-4PDEQL6T.js → chunk-UTVANQN5.js} +6 -6
- package/dist/bundle/{chunk-FOUE7XLK.js → chunk-UVYY5EIS.js} +4 -4
- package/dist/bundle/{chunk-PYTOIDSM.js → chunk-VMU4SGCE.js} +7 -7
- package/dist/bundle/{chunk-ZJVZXJOG.js → chunk-WAGDZB62.js} +5 -5
- package/dist/bundle/{chunk-YHB57PFN.js → chunk-Y3VNNLUT.js} +4 -4
- package/dist/bundle/{chunk-BJG6JA5U.js → chunk-Y5E2WNWB.js} +4 -4
- package/dist/bundle/{chunk-ZRNRQFTF.js → chunk-Y5PJQPMQ.js} +5 -5
- package/dist/bundle/{chunk-CRZPQQHE.js → chunk-YBQ753RP.js} +26 -26
- package/dist/bundle/{chunk-QL7CQ6VZ.js → chunk-YD6ZQ6LM.js} +50 -48
- package/dist/bundle/{chunk-UR6ASUSG.js → chunk-ZBH7Z6WX.js} +6 -6
- package/dist/bundle/{chunk-AFV74GK3.js → chunk-ZVVMGPBJ.js} +2 -2
- package/dist/bundle/command-contract-RICU4OWW.js +32 -0
- package/dist/bundle/{dist-RJMT44PL.js → dist-I7OZPHAZ.js} +3 -3
- package/dist/bundle/{echarts-27W2CIBD.js → echarts-2YP32GX5.js} +5 -5
- package/dist/bundle/{embed-FGJ273X2.js → embed-QNWVBCL5.js} +9 -8
- package/dist/bundle/{embedder-7ELL3CQ3.js → embedder-ENS7ARPP.js} +12 -11
- package/dist/bundle/entry-MPYSQPZO.js +14 -0
- package/dist/bundle/first-run-YLB7RNGP.js +24 -0
- package/dist/bundle/first-screen-AYOE4JFC.js +30 -0
- package/dist/bundle/identity-XQLO7NYW.js +11 -0
- package/dist/bundle/instructions-5F4XG3B6.js +11 -0
- package/dist/bundle/{mcp-4Y37G2UY.js → mcp-OQBZXELQ.js} +5 -5
- package/dist/bundle/{node-RSL3HANO.js → node-JOUDFPFN.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-ZY6ZFFXS.js} +8 -8
- package/dist/bundle/oauth-KOR3ZNTA.js +18 -0
- package/dist/bundle/open-JACXAGY5.js +20 -0
- package/dist/bundle/{process-RMV3AKLB.js → process-7W3X5VME.js} +5 -5
- package/dist/bundle/{program-PIUYQHBF.js → program-NSZWGHNJ.js} +52 -51
- package/dist/bundle/prompt-CRRG5UB6.js +13 -0
- package/dist/bundle/proxy-transport-YSBYG26I.js +17 -0
- package/dist/bundle/{recognize-3GMOLZF4.js → recognize-ASXEB45M.js} +9 -9
- package/dist/bundle/remote-CB3GAXGJ.js +27 -0
- package/dist/bundle/{rerank-W3OSXXBN.js → rerank-PDD5BPID.js} +10 -9
- package/dist/bundle/{serve-ZCPO44NO.js → serve-M4XFAYUM.js} +13 -13
- package/dist/bundle/{server-FXU4QFRB.js → server-IN673OYO.js} +37 -35
- package/dist/bundle/server-ISWPSKQ6.js +55 -0
- package/dist/bundle/{state-MJPTDIB5.js → state-626GOOVZ.js} +9 -9
- package/dist/bundle/{store-6VNQG56O.js → store-6JM4HJU5.js} +14 -14
- package/dist/bundle/store-maintenance-command-DI2UX4V3.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/skills/tg-cli/SKILL.md +1 -0
- 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,13 +1,13 @@
|
|
|
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
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-67SRVSPU.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/languages.js
|
|
11
11
|
var LANGUAGES = [
|
|
12
12
|
{ name: "russian", code: "ru", label: "Russian", script: "cyrillic", dictionary: "dictionary-ru" },
|
|
13
13
|
{ name: "english", code: "en", label: "English", script: "latin", dictionary: "dictionary-en" },
|
|
@@ -15,12 +15,12 @@ var LANGUAGES = [
|
|
|
15
15
|
];
|
|
16
16
|
var languagesOf = /* @__PURE__ */ __name((script) => LANGUAGES.filter((one) => one.script === script).map(({ name }) => name), "languagesOf");
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/store/normalize.js
|
|
19
19
|
var NORMALIZER_VERSION = 1;
|
|
20
20
|
var fold = /* @__PURE__ */ __name((text) => text.normalize("NFKD").replace(new RegExp("\\p{M}+", "gu"), "").normalize("NFC").toLowerCase(), "fold");
|
|
21
21
|
var normalize = /* @__PURE__ */ __name((text) => fold(text).replace(new RegExp("\\p{Cc}", "gu"), " ").replace(/\s+/gu, " ").trim(), "normalize");
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/snowball/base-stemmer.js
|
|
24
24
|
var BaseStemmer = class {
|
|
25
25
|
static {
|
|
26
26
|
__name(this, "BaseStemmer");
|
|
@@ -395,7 +395,7 @@ var BaseStemmer = class {
|
|
|
395
395
|
}
|
|
396
396
|
};
|
|
397
397
|
|
|
398
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
398
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/snowball/english-stemmer.js
|
|
399
399
|
var a_0 = [
|
|
400
400
|
["arsen", -1],
|
|
401
401
|
["commun", -1],
|
|
@@ -1096,7 +1096,7 @@ var english_stemmer_default = class extends BaseStemmer {
|
|
|
1096
1096
|
stemWord = this.stem;
|
|
1097
1097
|
};
|
|
1098
1098
|
|
|
1099
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1099
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/snowball/russian-stemmer.js
|
|
1100
1100
|
var a_02 = [
|
|
1101
1101
|
["\u0432", 1],
|
|
1102
1102
|
["\u0438\u0432", 2, 1],
|
|
@@ -1519,7 +1519,7 @@ var russian_stemmer_default = class extends BaseStemmer {
|
|
|
1519
1519
|
stemWord = this.stem;
|
|
1520
1520
|
};
|
|
1521
1521
|
|
|
1522
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1522
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/snowball/spanish-stemmer.js
|
|
1523
1523
|
var a_03 = [
|
|
1524
1524
|
["", 6],
|
|
1525
1525
|
["\xE1", 1, 1],
|
|
@@ -2195,7 +2195,7 @@ var spanish_stemmer_default = class extends BaseStemmer {
|
|
|
2195
2195
|
stemWord = this.stem;
|
|
2196
2196
|
};
|
|
2197
2197
|
|
|
2198
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
2198
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/search/stem.js
|
|
2199
2199
|
var SNOWBALL_VERSION = "3.1.1";
|
|
2200
2200
|
var CYRILLIC_STEMMERS = [...languagesOf("cyrillic"), "none"];
|
|
2201
2201
|
var LATIN_STEMMERS = [...languagesOf("latin"), "none"];
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
OFFLINE,
|
|
5
5
|
capability,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
refuseLacking,
|
|
11
11
|
servicesFor,
|
|
12
12
|
throughWrapper
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P3WU6UYJ.js";
|
|
14
14
|
import {
|
|
15
15
|
CEILING_KEY,
|
|
16
16
|
LOG_ATTRIBUTES,
|
|
@@ -34,35 +34,35 @@ import {
|
|
|
34
34
|
rememberAccount,
|
|
35
35
|
rootOf2 as rootOf,
|
|
36
36
|
skipFlagFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GE22MYA6.js";
|
|
38
38
|
import {
|
|
39
39
|
isCliFailure,
|
|
40
40
|
providerErrorKey
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-FRZHF2X6.js";
|
|
42
42
|
import {
|
|
43
43
|
MESSENGER_CHANGE_REFUSAL,
|
|
44
44
|
readOnlyRefusal
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-N6VHHMSZ.js";
|
|
46
46
|
import {
|
|
47
47
|
servingProfiles
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-54RJDS3X.js";
|
|
49
49
|
import {
|
|
50
50
|
openStore
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QVTCOBN5.js";
|
|
52
52
|
import {
|
|
53
53
|
logRecordOf,
|
|
54
54
|
realSleep,
|
|
55
55
|
resolvePaths,
|
|
56
56
|
writeSecurely
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-T4SDOYPY.js";
|
|
58
58
|
import {
|
|
59
59
|
CliError
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-67SRVSPU.js";
|
|
61
61
|
import {
|
|
62
62
|
__name
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
66
66
|
import { openSync } from "node:fs";
|
|
67
67
|
import { createInterface } from "node:readline";
|
|
68
68
|
import { ReadStream } from "node:tty";
|
|
@@ -117,10 +117,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
117
117
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
118
118
|
}, "terminalAsker");
|
|
119
119
|
|
|
120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
121
121
|
import { randomUUID } from "node:crypto";
|
|
122
122
|
|
|
123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
124
124
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
125
125
|
import { dirname, join } from "node:path";
|
|
126
126
|
var MOST_DEADLINES = 50;
|
|
@@ -204,11 +204,11 @@ var FloodMemory = class {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
208
208
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
209
209
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
210
210
|
|
|
211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
212
212
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
213
213
|
import { dirname as dirname2 } from "node:path";
|
|
214
214
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -275,7 +275,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
275
275
|
}
|
|
276
276
|
}, "lockTime");
|
|
277
277
|
|
|
278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
279
279
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
280
280
|
var SendJournal = class {
|
|
281
281
|
static {
|
|
@@ -352,7 +352,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
352
352
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
353
353
|
}, "withSendId");
|
|
354
354
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
356
356
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
357
357
|
import { join as join3 } from "node:path";
|
|
358
358
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -464,7 +464,7 @@ var RecipientList = class {
|
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
468
468
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
469
469
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
470
470
|
"attachments.extract",
|
|
@@ -657,7 +657,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
657
657
|
}), "guardFor");
|
|
658
658
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
659
659
|
|
|
660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
661
661
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
662
662
|
import { join as join4 } from "node:path";
|
|
663
663
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -716,7 +716,7 @@ var Pacer = class {
|
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
718
|
|
|
719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
720
720
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
721
721
|
const words = [];
|
|
722
722
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -776,7 +776,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
776
776
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
777
777
|
}, "refuseUnknownPermissionKeys");
|
|
778
778
|
|
|
779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
780
780
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
781
781
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
782
782
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -895,7 +895,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
895
895
|
});
|
|
896
896
|
}, "flooded");
|
|
897
897
|
|
|
898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
899
899
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
900
900
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
901
901
|
const write = currentOperation();
|
|
@@ -994,7 +994,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
994
994
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
995
995
|
}, "byPart");
|
|
996
996
|
|
|
997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
998
998
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
999
999
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
1000
1000
|
let warned = false;
|
|
@@ -1486,7 +1486,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1486
1486
|
}
|
|
1487
1487
|
}, "keep");
|
|
1488
1488
|
|
|
1489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1490
1490
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1491
1491
|
let opened;
|
|
1492
1492
|
return {
|
|
@@ -1,20 +1,20 @@
|
|
|
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
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-67SRVSPU.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
11
11
|
var PRAGMAS = `
|
|
12
12
|
PRAGMA busy_timeout = 5000;
|
|
13
13
|
PRAGMA journal_mode = WAL;
|
|
14
14
|
PRAGMA foreign_keys = ON;
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
18
18
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
19
19
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
20
20
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -35,7 +35,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
35
35
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
36
36
|
}, "isSqliteWarning");
|
|
37
37
|
|
|
38
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
39
39
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
40
40
|
const database = await openFile(path);
|
|
41
41
|
try {
|
|
@@ -48,12 +48,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
48
48
|
}, "openCache");
|
|
49
49
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
50
50
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
51
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
51
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-AO27E35V.js");
|
|
52
52
|
return await openWithBunSqlite(path);
|
|
53
53
|
}, "openUnderBun");
|
|
54
54
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
55
55
|
quietSqliteWarning();
|
|
56
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
56
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-ZY6ZFFXS.js");
|
|
57
57
|
return openWithNodeSqlite(path);
|
|
58
58
|
}, "openUnderNode");
|
|
59
59
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
wirecatDirectory
|
|
5
|
+
} from "./chunk-Y5PJQPMQ.js";
|
|
6
|
+
import {
|
|
7
|
+
CliError
|
|
8
|
+
} from "./chunk-67SRVSPU.js";
|
|
9
|
+
import {
|
|
10
|
+
__name
|
|
11
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
12
|
+
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
14
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
15
|
+
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
16
|
+
import { rename, rm } from "node:fs/promises";
|
|
17
|
+
import { dirname, join } from "node:path";
|
|
18
|
+
import { Readable, Transform } from "node:stream";
|
|
19
|
+
import { pipeline } from "node:stream/promises";
|
|
20
|
+
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
22
|
+
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
23
|
+
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
24
|
+
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
25
|
+
var parakeet = huggingFace("sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8", "2bda32ec70b097a55adaa07d9a7173915b43cc78");
|
|
26
|
+
var MODELS = [
|
|
27
|
+
{
|
|
28
|
+
id: "gigaam-v3",
|
|
29
|
+
title: "GigaAM v3, with punctuation",
|
|
30
|
+
languages: "Russian \u2014 the best of the three for Russian",
|
|
31
|
+
featureDim: 64,
|
|
32
|
+
files: [
|
|
33
|
+
{
|
|
34
|
+
name: "encoder.int8.onnx",
|
|
35
|
+
url: gigaam("encoder.int8.onnx"),
|
|
36
|
+
sha256: "369f35a71bf288d3b8e0391fabd8dba5f2314088d440bca474056b7b4b6e66bf",
|
|
37
|
+
bytes: 224570820
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "decoder.onnx",
|
|
41
|
+
url: gigaam("decoder.onnx"),
|
|
42
|
+
sha256: "38fc7475443ea2a26f63211ca350f73ac50fff824ab7a3876ee2bd610c53bbc4",
|
|
43
|
+
bytes: 4600132
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "joiner.onnx",
|
|
47
|
+
url: gigaam("joiner.onnx"),
|
|
48
|
+
sha256: "602ff7017a93311aad34df1437c8d7f49911353c13d6eae7a6ee7b041339465c",
|
|
49
|
+
bytes: 2712896
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "tokens.txt",
|
|
53
|
+
url: gigaam("tokens.txt"),
|
|
54
|
+
sha256: "39abae20e692998290c574e606f11a9edef2902a1995463fcff63d1490cf22b7",
|
|
55
|
+
bytes: 13354
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
config: /* @__PURE__ */ __name((path) => ({
|
|
59
|
+
transducer: { encoder: path("encoder.int8.onnx"), decoder: path("decoder.onnx"), joiner: path("joiner.onnx") },
|
|
60
|
+
tokens: path("tokens.txt"),
|
|
61
|
+
modelType: "nemo_transducer"
|
|
62
|
+
}), "config")
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "gigaam-v3-ctc",
|
|
66
|
+
title: "GigaAM v3 CTC, with punctuation \u2014 a little faster",
|
|
67
|
+
languages: "Russian \u2014 a little faster, rougher with capital letters",
|
|
68
|
+
featureDim: 64,
|
|
69
|
+
files: [
|
|
70
|
+
{
|
|
71
|
+
name: "model.int8.onnx",
|
|
72
|
+
url: gigaamCtc("model.int8.onnx"),
|
|
73
|
+
sha256: "d5fea8df94263c285e54b21e5774b707c707192d3bdbeffd7b1eb07fb6743b35",
|
|
74
|
+
bytes: 224893661
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "tokens.txt",
|
|
78
|
+
url: gigaamCtc("tokens.txt"),
|
|
79
|
+
sha256: "142de7570b3de5b3035ce111a89c228e80e6085273731d944093ddf24fa539cd",
|
|
80
|
+
bytes: 2007
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
config: /* @__PURE__ */ __name((path) => ({ nemoCtc: { model: path("model.int8.onnx") }, tokens: path("tokens.txt") }), "config")
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: "parakeet-v3",
|
|
87
|
+
title: "NVIDIA Parakeet TDT 0.6B v3",
|
|
88
|
+
/** The model card's list: huggingface.co/nvidia/parakeet-tdt-0.6b-v3, read 2026-09-24. */
|
|
89
|
+
languages: "25: bg cs da de el en es et fi fr hr hu it lt lv mt nl pl pt ro ru sk sl sv uk",
|
|
90
|
+
featureDim: 80,
|
|
91
|
+
files: [
|
|
92
|
+
{
|
|
93
|
+
name: "encoder.int8.onnx",
|
|
94
|
+
url: parakeet("encoder.int8.onnx"),
|
|
95
|
+
sha256: "acfc2b4456377e15d04f0243af540b7fe7c992f8d898d751cf134c3a55fd2247",
|
|
96
|
+
bytes: 652184281
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "decoder.int8.onnx",
|
|
100
|
+
url: parakeet("decoder.int8.onnx"),
|
|
101
|
+
sha256: "179e50c43d1a9de79c8a24149a2f9bac6eb5981823f2a2ed88d655b24248db4e",
|
|
102
|
+
bytes: 11845275
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "joiner.int8.onnx",
|
|
106
|
+
url: parakeet("joiner.int8.onnx"),
|
|
107
|
+
sha256: "3164c13fc2821009440d20fcb5fdc78bff28b4db2f8d0f0b329101719c0948b3",
|
|
108
|
+
bytes: 6355277
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "tokens.txt",
|
|
112
|
+
url: parakeet("tokens.txt"),
|
|
113
|
+
sha256: "d58544679ea4bc6ac563d1f545eb7d474bd6cfa467f0a6e2c1dc1c7d37e3c35d",
|
|
114
|
+
bytes: 93939
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
config: /* @__PURE__ */ __name((path) => ({
|
|
118
|
+
transducer: {
|
|
119
|
+
encoder: path("encoder.int8.onnx"),
|
|
120
|
+
decoder: path("decoder.int8.onnx"),
|
|
121
|
+
joiner: path("joiner.int8.onnx")
|
|
122
|
+
},
|
|
123
|
+
tokens: path("tokens.txt"),
|
|
124
|
+
modelType: "nemo_transducer"
|
|
125
|
+
}), "config")
|
|
126
|
+
}
|
|
127
|
+
];
|
|
128
|
+
var VAD = {
|
|
129
|
+
name: "silero_vad.onnx",
|
|
130
|
+
url: "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx",
|
|
131
|
+
sha256: "9e2449e1087496d8d4caba907f23e0bd3f78d91fa552479bb9c23ac09cbb1fd6",
|
|
132
|
+
bytes: 643854
|
|
133
|
+
};
|
|
134
|
+
var DEFAULT_ORDER = ["parakeet-v3", "gigaam-v3", "gigaam-v3-ctc"];
|
|
135
|
+
var orderedModels = /* @__PURE__ */ __name((order = DEFAULT_ORDER) => [.../* @__PURE__ */ new Set([...order, ...DEFAULT_ORDER])].map(speechModel), "orderedModels");
|
|
136
|
+
var findModel = /* @__PURE__ */ __name((id) => MODELS.find((model) => model.id === id), "findModel");
|
|
137
|
+
var speechModel = /* @__PURE__ */ __name((id) => {
|
|
138
|
+
const model = findModel(id);
|
|
139
|
+
if (!model) {
|
|
140
|
+
throw new CliError("validation_error", `no speech model "${id}" \u2014 one of ${MODELS.map((known) => known.id).join(", ")}`);
|
|
141
|
+
}
|
|
142
|
+
return model;
|
|
143
|
+
}, "speechModel");
|
|
144
|
+
|
|
145
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
146
|
+
var sharedModelsDirectory = /* @__PURE__ */ __name((kind, env = process.env) => join(wirecatDirectory(env), "models", kind), "sharedModelsDirectory");
|
|
147
|
+
var modelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("audio", env), "modelsDirectory");
|
|
148
|
+
var STALL_MS = 6e4;
|
|
149
|
+
var watchdog = /* @__PURE__ */ __name((ms) => {
|
|
150
|
+
const controller = new AbortController();
|
|
151
|
+
let timer = setTimeout(() => controller.abort(), ms);
|
|
152
|
+
return {
|
|
153
|
+
signal: controller.signal,
|
|
154
|
+
poke: /* @__PURE__ */ __name(() => {
|
|
155
|
+
clearTimeout(timer);
|
|
156
|
+
timer = setTimeout(() => controller.abort(), ms);
|
|
157
|
+
}, "poke"),
|
|
158
|
+
stop: /* @__PURE__ */ __name(() => clearTimeout(timer), "stop")
|
|
159
|
+
};
|
|
160
|
+
}, "watchdog");
|
|
161
|
+
var modelPath = /* @__PURE__ */ __name((directory, model) => (name) => join(directory, model.id, name), "modelPath");
|
|
162
|
+
var vadPath = /* @__PURE__ */ __name((directory) => join(directory, VAD.name), "vadPath");
|
|
163
|
+
var placed = /* @__PURE__ */ __name((model, directory) => [
|
|
164
|
+
...model.files.map((file) => [file, modelPath(directory, model)(file.name)]),
|
|
165
|
+
[VAD, vadPath(directory)]
|
|
166
|
+
], "placed");
|
|
167
|
+
var isInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placed(model, directory)), "isInstalled");
|
|
168
|
+
var filesPresent = /* @__PURE__ */ __name((files) => files.every(([file, path]) => sizeOf(path) === file.bytes), "filesPresent");
|
|
169
|
+
var sizeOf = /* @__PURE__ */ __name((path) => {
|
|
170
|
+
try {
|
|
171
|
+
return statSync(path).size;
|
|
172
|
+
} catch {
|
|
173
|
+
return void 0;
|
|
174
|
+
}
|
|
175
|
+
}, "sizeOf");
|
|
176
|
+
var installedBytes = /* @__PURE__ */ __name((model) => model.files.reduce((sum, file) => sum + file.bytes, 0), "installedBytes");
|
|
177
|
+
var install = /* @__PURE__ */ __name(async (model, directory, { fetch: get = fetch, progress, verifyExisting } = {}) => {
|
|
178
|
+
mkdirSync(join(directory, model.id), { recursive: true, mode: 448 });
|
|
179
|
+
await installFiles(placed(model, directory), { fetch: get, progress, verifyExisting });
|
|
180
|
+
}, "install");
|
|
181
|
+
var installFiles = /* @__PURE__ */ __name(async (files, { fetch: get = fetch, progress, verifyExisting } = {}) => {
|
|
182
|
+
if (verifyExisting)
|
|
183
|
+
for (const [file, path] of files) {
|
|
184
|
+
if (sizeOf(path) !== void 0) {
|
|
185
|
+
const hash = createHash("sha256");
|
|
186
|
+
for await (const chunk of createReadStream(path))
|
|
187
|
+
hash.update(chunk);
|
|
188
|
+
if (hash.digest("hex") !== file.sha256) {
|
|
189
|
+
progress?.(`${path}: not the file this version expects, downloading it again`);
|
|
190
|
+
await rm(path, { force: true });
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
for (const [file, path] of files) {
|
|
195
|
+
if (sizeOf(path) === file.bytes)
|
|
196
|
+
continue;
|
|
197
|
+
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
198
|
+
progress?.(`downloading ${file.name} (${megabytes(file.bytes)})`);
|
|
199
|
+
await fetchVerified(file, path, get);
|
|
200
|
+
}
|
|
201
|
+
}, "installFiles");
|
|
202
|
+
var fetchVerified = /* @__PURE__ */ __name(async (file, path, get) => {
|
|
203
|
+
const stalled = watchdog(STALL_MS);
|
|
204
|
+
try {
|
|
205
|
+
await fetchInto(file, path, get, stalled);
|
|
206
|
+
} catch (error) {
|
|
207
|
+
if (stalled.signal.aborted) {
|
|
208
|
+
throw new CliError("timeout", `${file.name} stopped downloading for ${STALL_MS / 1e3} s \u2014 nothing was installed`);
|
|
209
|
+
}
|
|
210
|
+
throw error;
|
|
211
|
+
} finally {
|
|
212
|
+
stalled.stop();
|
|
213
|
+
}
|
|
214
|
+
}, "fetchVerified");
|
|
215
|
+
var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled) => {
|
|
216
|
+
const response = await get(file.url, { signal: stalled.signal });
|
|
217
|
+
if (!response.ok || !response.body) {
|
|
218
|
+
await response.body?.cancel();
|
|
219
|
+
throw new CliError("network_error", `${file.name} could not be downloaded: HTTP ${response.status}`);
|
|
220
|
+
}
|
|
221
|
+
const partial = `${path}.${randomUUID()}.part`;
|
|
222
|
+
const hash = createHash("sha256");
|
|
223
|
+
let bytes = 0;
|
|
224
|
+
const hashing = new Transform({
|
|
225
|
+
transform(chunk, _encoding, done) {
|
|
226
|
+
stalled.poke();
|
|
227
|
+
bytes += chunk.length;
|
|
228
|
+
if (bytes > file.bytes) {
|
|
229
|
+
done(new CliError("invalid_response", `${file.name} is larger than this version expects \u2014 nothing was installed`));
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
hash.update(chunk);
|
|
233
|
+
done(null, chunk);
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
try {
|
|
237
|
+
await pipeline(Readable.fromWeb(response.body), hashing, createWriteStream(partial, { flags: "wx", mode: 384 }));
|
|
238
|
+
const actual = hash.digest("hex");
|
|
239
|
+
if (actual !== file.sha256) {
|
|
240
|
+
throw new CliError("invalid_response", `${file.name} is not the file this version expects (sha256 ${actual}) \u2014 nothing was installed`);
|
|
241
|
+
}
|
|
242
|
+
await rename(partial, path);
|
|
243
|
+
} finally {
|
|
244
|
+
await rm(partial, { force: true });
|
|
245
|
+
}
|
|
246
|
+
}, "fetchInto");
|
|
247
|
+
var megabytes = /* @__PURE__ */ __name((bytes) => bytes < 1e6 ? "under 1 MB" : `${Math.round(bytes / 1e6)} MB`, "megabytes");
|
|
248
|
+
|
|
249
|
+
export {
|
|
250
|
+
VAD,
|
|
251
|
+
DEFAULT_ORDER,
|
|
252
|
+
orderedModels,
|
|
253
|
+
speechModel,
|
|
254
|
+
sharedModelsDirectory,
|
|
255
|
+
modelsDirectory,
|
|
256
|
+
modelPath,
|
|
257
|
+
vadPath,
|
|
258
|
+
isInstalled,
|
|
259
|
+
filesPresent,
|
|
260
|
+
installedBytes,
|
|
261
|
+
install,
|
|
262
|
+
installFiles,
|
|
263
|
+
megabytes
|
|
264
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-67SRVSPU.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/models/types.js
|
|
11
11
|
var MAX_MODEL_IMAGE_BYTES = 4 * 1024 * 1024;
|
|
12
12
|
var validateImages = /* @__PURE__ */ __name((images) => {
|
|
13
13
|
if (images === void 0)
|
|
@@ -1,5 +1,5 @@
|
|
|
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
|
CliError,
|
|
5
5
|
finite,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
optional,
|
|
11
11
|
pipe,
|
|
12
12
|
safeParse
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-67SRVSPU.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/models/options.js
|
|
19
19
|
var checkedOptions = /* @__PURE__ */ __name((provider, schema, options) => {
|
|
20
20
|
const parsed = safeParse(schema, options);
|
|
21
21
|
if (!parsed.success) {
|
|
@@ -1,18 +1,18 @@
|
|
|
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
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7WHM3KNI.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-67SRVSPU.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.473.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._b1c2181cd33bddb10eb51dd3b7fa80c8/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
17
|
import { Writable } from "node:stream";
|
|
18
18
|
var readSecret = /* @__PURE__ */ __name(async (prompt, { input = process.stdin, output = process.stderr, echo = false, signal: givenSignal } = {}) => {
|