@wirecat/tg-cli 0.117.0 → 0.118.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-VNQ72MBK.js → adapter-4YNP6VCO.js} +39 -39
- package/dist/bundle/{all-profiles-3W2UQTCK.js → all-profiles-MIQDYAGO.js} +6 -6
- package/dist/bundle/{anthropic-DFUW2KTG.js → anthropic-NTASPJYE.js} +3 -3
- package/dist/bundle/{app-server-5XJIMLHB.js → app-server-UJZBJ2SK.js} +36 -36
- package/dist/bundle/{bot-api-HRRBF3W6.js → bot-api-JZAD4L3N.js} +40 -40
- package/dist/bundle/{bot-history-GBH5XE4N.js → bot-history-OUDHH3NU.js} +12 -12
- package/dist/bundle/{bun-ZMOYGG6F.js → bun-EC4HDIRD.js} +2 -2
- package/dist/bundle/{bun-sqlite-6FZFMA7K.js → bun-sqlite-A4HJR6KO.js} +2 -2
- package/dist/bundle/{chunk-HORGORHK.js → chunk-2KQHUBTV.js} +10 -10
- package/dist/bundle/{chunk-6GFUL4OU.js → chunk-2NA5KVP6.js} +15 -12
- package/dist/bundle/{chunk-C6TUVV7E.js → chunk-4BV4UMBB.js} +470 -209
- package/dist/bundle/{chunk-EZTYJ43A.js → chunk-57LKX6N2.js} +1 -1
- package/dist/bundle/{chunk-4JDGN6OD.js → chunk-5IIU7X4S.js} +1 -1
- package/dist/bundle/{chunk-2XLKZL6K.js → chunk-5LDWBEWU.js} +42 -26
- package/dist/bundle/{chunk-MLHKQDUN.js → chunk-5QYU7B27.js} +268 -153
- package/dist/bundle/{chunk-AG6HWPQP.js → chunk-65XV5PPI.js} +2 -2
- package/dist/bundle/{chunk-RDSLSV4M.js → chunk-6AXUEJGL.js} +1 -1
- package/dist/bundle/{chunk-HWYSRB64.js → chunk-6RI4TEIC.js} +2 -2
- package/dist/bundle/{chunk-7Y3RUEVY.js → chunk-6ZMTEUVU.js} +4 -4
- package/dist/bundle/{chunk-56Q5JV3Z.js → chunk-76EKXFX2.js} +1 -1
- package/dist/bundle/{chunk-TFBHDIGY.js → chunk-BNEP5EOV.js} +17 -3
- package/dist/bundle/{chunk-V47NPSSV.js → chunk-CEY43D3A.js} +29 -27
- package/dist/bundle/{chunk-G7B5UIE7.js → chunk-DKFC5ZZ3.js} +37 -11
- package/dist/bundle/{chunk-UGPZCNYC.js → chunk-DSZJREEO.js} +353 -286
- package/dist/bundle/{chunk-L5WNE4WS.js → chunk-EPXVRJAX.js} +1 -1
- package/dist/bundle/{chunk-66FZBLRJ.js → chunk-EQJ6NLF5.js} +12 -12
- package/dist/bundle/{chunk-B2YPB5AE.js → chunk-FHMK6OK4.js} +8 -8
- package/dist/bundle/{chunk-3GRX7WP6.js → chunk-G3RT2EQI.js} +1 -1
- package/dist/bundle/{chunk-TG6ZYL4B.js → chunk-GI4MTNA2.js} +7 -7
- package/dist/bundle/{chunk-AUBRELCM.js → chunk-GIM37COQ.js} +2 -2
- package/dist/bundle/{chunk-SQXB5ZUZ.js → chunk-GLRRCKP6.js} +2 -2
- package/dist/bundle/{chunk-VMCQGZIA.js → chunk-GXCJ47SJ.js} +381 -292
- package/dist/bundle/{chunk-UYK5AXSW.js → chunk-H6S3C3MH.js} +2 -2
- package/dist/bundle/{chunk-VRDVXXXD.js → chunk-HJNRIK5X.js} +6 -6
- package/dist/bundle/{chunk-HZZGOLGP.js → chunk-I4TI5HDJ.js} +9 -9
- package/dist/bundle/{chunk-MP7M6FFU.js → chunk-JLJKGKU2.js} +5 -5
- package/dist/bundle/{chunk-F6KBVIJP.js → chunk-JPVFYMSQ.js} +21 -13
- package/dist/bundle/{chunk-Z4QKLHJW.js → chunk-JWPSVS6C.js} +8692 -3312
- package/dist/bundle/{chunk-ZPILMEFY.js → chunk-JZETEZHC.js} +7 -20
- package/dist/bundle/{chunk-EA2PGDER.js → chunk-KEDHX6XG.js} +2 -2
- package/dist/bundle/{chunk-PTIB7NEE.js → chunk-MBH7IKLT.js} +1 -1
- package/dist/bundle/{chunk-YIXXH74F.js → chunk-MZNOASAW.js} +1 -1
- package/dist/bundle/{chunk-GFHNQBD2.js → chunk-NKFTZVQU.js} +1 -1
- package/dist/bundle/{chunk-2452HCIV.js → chunk-NMT2VGEI.js} +2 -2
- package/dist/bundle/{chunk-KVTLT4V7.js → chunk-OTQDJUES.js} +5 -5
- package/dist/bundle/{chunk-Q7O4CQDO.js → chunk-PB252TT3.js} +1 -1
- package/dist/bundle/{chunk-V2T7NYNU.js → chunk-PO74BDER.js} +23 -21
- package/dist/bundle/{chunk-X3CD475M.js → chunk-PW3HFIJA.js} +203 -155
- package/dist/bundle/{chunk-6HRN7BW6.js → chunk-PWCQC56A.js} +1 -1
- package/dist/bundle/{chunk-3RJYLN5V.js → chunk-RG2E7ZQZ.js} +117 -14
- package/dist/bundle/{chunk-RDH2QBUE.js → chunk-TMTEWOQS.js} +1 -1
- package/dist/bundle/{chunk-7NBUT62O.js → chunk-TSTEZNSX.js} +1 -1
- package/dist/bundle/{chunk-XW5C4TI7.js → chunk-Y64SI2RO.js} +47 -1
- package/dist/bundle/{chunk-FEKXHILZ.js → chunk-YEOSV6JC.js} +1 -1
- package/dist/bundle/{chunk-EL6I4WTB.js → chunk-YPRUWRKE.js} +1 -1
- package/dist/bundle/{chunk-M7V5XRM6.js → chunk-ZMUC3UQO.js} +2 -2
- package/dist/bundle/{chunk-FAHHERJ7.js → chunk-ZXXTJF4Z.js} +4 -4
- package/dist/bundle/{command-contract-KMMHARMR.js → command-contract-7GZ6HAA6.js} +12 -12
- package/dist/bundle/{decode-YMSOY2AY.js → decode-NMNPLKNR.js} +2 -2
- package/dist/bundle/{echarts-7XS55TQY.js → echarts-S46LEIPS.js} +2 -2
- package/dist/bundle/{embed-QTOE7NN3.js → embed-I5ZYHGYC.js} +3 -3
- package/dist/bundle/{embedder-KBBRYSNH.js → embedder-LTJI67N2.js} +6 -6
- package/dist/bundle/{entry-HGEUYYMX.js → entry-O6BUPXF7.js} +4 -4
- package/dist/bundle/{first-run-CSGMEJXY.js → first-run-PMZNCDGD.js} +5 -5
- package/dist/bundle/{first-screen-K2PBNJNE.js → first-screen-BGML5DSO.js} +13 -13
- package/dist/bundle/{instructions-S6ZXCTFH.js → instructions-AUEGY3VO.js} +1 -1
- package/dist/bundle/{node-LCIUWXXG.js → node-XRA7RBCQ.js} +2 -2
- package/dist/bundle/{node-sqlite-HL4WY4N2.js → node-sqlite-DEZO6LRS.js} +3 -3
- package/dist/bundle/{oauth-U4KIMDKG.js → oauth-DAVC7WCD.js} +4 -4
- package/dist/bundle/{open-EH7OS7M7.js → open-DE2YO4T7.js} +2 -2
- package/dist/bundle/{openai-W5TB3NA5.js → openai-5BKGAULH.js} +10 -10
- package/dist/bundle/{process-3CVLTCTA.js → process-4ZHPNUIQ.js} +1 -1
- package/dist/bundle/{program-LOIZTK2P.js → program-EGTKSNB4.js} +42 -42
- package/dist/bundle/{prompt-IDNH7N3W.js → prompt-HWCWHHPE.js} +2 -2
- package/dist/bundle/{recognize-G5EWYXIF.js → recognize-NG6RXNGF.js} +1 -1
- package/dist/bundle/{remote-4XTBZVZD.js → remote-ZKXIIGYH.js} +4 -4
- package/dist/bundle/{rerank-OWSTDLZN.js → rerank-TX5QFURV.js} +4 -4
- package/dist/bundle/{serve-YCPSEWP3.js → serve-XAS6DECW.js} +6 -6
- package/dist/bundle/{server-ODG4A2KK.js → server-CNPIWBYU.js} +28 -28
- package/dist/bundle/server-FRTKLHZF.js +60 -0
- package/dist/bundle/{state-OL2235G5.js → state-3HTUETTS.js} +3 -3
- package/dist/bundle/{store-5AACYNDM.js → store-B5VZWJHN.js} +17 -9
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +50 -0
- package/dist/bundle/tg.js +3 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/server-KELKX6S3.js +0 -60
- package/dist/bundle/store-maintenance-command-3J7WZYVN.js +0 -50
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
describeOptions,
|
|
8
8
|
keyForCommand,
|
|
9
9
|
metaOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PW3HFIJA.js";
|
|
11
11
|
import {
|
|
12
12
|
jsonSchemaOf
|
|
13
13
|
} from "./chunk-EPCFXKTX.js";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
__name
|
|
19
19
|
} from "./chunk-ZVVMGPBJ.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/command-contract.js
|
|
22
22
|
var SCHEMA_DIALECT = "https://json-schema.org/draft/2020-12/schema";
|
|
23
23
|
var outputOf = /* @__PURE__ */ __name((command) => {
|
|
24
24
|
const entity = answerEntitySchema(command);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
commandPathOf,
|
|
8
8
|
findCommand,
|
|
9
9
|
outputOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H6S3C3MH.js";
|
|
11
11
|
import {
|
|
12
12
|
Command,
|
|
13
13
|
Help,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
environmentOf,
|
|
19
19
|
metaOf,
|
|
20
20
|
takesProfile
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PW3HFIJA.js";
|
|
22
22
|
import {
|
|
23
23
|
writes
|
|
24
24
|
} from "./chunk-EPCFXKTX.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
__name
|
|
30
30
|
} from "./chunk-ZVVMGPBJ.js";
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/help/sections.js
|
|
33
33
|
var SECTIONS = {
|
|
34
34
|
read: "Read",
|
|
35
35
|
write: "Write",
|
|
@@ -94,7 +94,7 @@ var CORE_SECTIONS = {
|
|
|
94
94
|
upgrade: "setup"
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
97
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/help/commands-text.js
|
|
98
98
|
var DESCRIPTION = 90;
|
|
99
99
|
var COLUMN = 52;
|
|
100
100
|
var short = /* @__PURE__ */ __name((text) => {
|
|
@@ -133,7 +133,7 @@ var commandsText = /* @__PURE__ */ __name((root, commands, scope) => {
|
|
|
133
133
|
`;
|
|
134
134
|
}, "commandsText");
|
|
135
135
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/help/command-help.js
|
|
137
137
|
var ARGUMENT_KINDS = {
|
|
138
138
|
chat: "chat",
|
|
139
139
|
chats: "chat",
|
|
@@ -325,7 +325,7 @@ var installCommandHelp = /* @__PURE__ */ __name((program, { profile = true } = {
|
|
|
325
325
|
command.addHelpText("after", () => commandHelpText(command));
|
|
326
326
|
}, "installCommandHelp");
|
|
327
327
|
|
|
328
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
328
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/help/first-screen.js
|
|
329
329
|
var WIRECAT_TOOLS = [
|
|
330
330
|
{
|
|
331
331
|
command: "tg",
|
|
@@ -3,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
envName,
|
|
5
5
|
readOnlyLockOf
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PB252TT3.js";
|
|
7
7
|
import {
|
|
8
8
|
CAPABILITY_STATEMENTS,
|
|
9
9
|
storeCapable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JLJKGKU2.js";
|
|
11
11
|
import {
|
|
12
12
|
catchCrashes
|
|
13
13
|
} from "./chunk-EPCFXKTX.js";
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
__name
|
|
22
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
23
23
|
|
|
24
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
25
25
|
import { spawn as spawn2 } from "node:child_process";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/sqlite-runtime.js
|
|
28
28
|
import { spawn, spawnSync } from "node:child_process";
|
|
29
29
|
import { readFileSync } from "node:fs";
|
|
30
30
|
import { dirname } from "node:path";
|
|
@@ -112,7 +112,7 @@ var relay = /* @__PURE__ */ __name((child, host = process) => new Promise(() =>
|
|
|
112
112
|
});
|
|
113
113
|
}), "relay");
|
|
114
114
|
|
|
115
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
115
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
|
|
116
116
|
import { appendFileSync } from "node:fs";
|
|
117
117
|
var logParsedArgv = /* @__PURE__ */ __name((file, action) => {
|
|
118
118
|
const words = [];
|
|
@@ -136,7 +136,7 @@ var logVersion = /* @__PURE__ */ __name((file) => {
|
|
|
136
136
|
`);
|
|
137
137
|
}, "logVersion");
|
|
138
138
|
|
|
139
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
139
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/cli/entry.js
|
|
140
140
|
var processIo = /* @__PURE__ */ __name(() => ({
|
|
141
141
|
argv: process.argv,
|
|
142
142
|
env: process.env,
|
|
@@ -190,8 +190,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
190
190
|
if (command.optsWithGlobals().dryRun === true)
|
|
191
191
|
return;
|
|
192
192
|
const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
|
|
193
|
-
import("./first-run-
|
|
194
|
-
import("./command-contract-
|
|
193
|
+
import("./first-run-PMZNCDGD.js"),
|
|
194
|
+
import("./command-contract-7GZ6HAA6.js")
|
|
195
195
|
]);
|
|
196
196
|
await setupAtStart({
|
|
197
197
|
command: entry.app.command,
|
|
@@ -206,7 +206,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
206
206
|
ask: /* @__PURE__ */ __name(async (question, command) => {
|
|
207
207
|
if (headless(command) || io.stdin.isTTY !== true)
|
|
208
208
|
return false;
|
|
209
|
-
const { readSecret } = await import("./prompt-
|
|
209
|
+
const { readSecret } = await import("./prompt-HWCWHHPE.js");
|
|
210
210
|
const answer = await readSecret(`${question} [y/N] `, {
|
|
211
211
|
input: io.stdin,
|
|
212
212
|
output: io.stderr,
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
PRAGMAS
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-57LKX6N2.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-BXTDAGM4.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
14
14
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
15
15
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
16
16
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -31,7 +31,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
31
31
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
32
32
|
}, "isSqliteWarning");
|
|
33
33
|
|
|
34
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
35
35
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
36
36
|
const database = await openFile(path);
|
|
37
37
|
try {
|
|
@@ -44,12 +44,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
44
44
|
}, "openCache");
|
|
45
45
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
46
46
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
47
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
47
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-A4HJR6KO.js");
|
|
48
48
|
return await openWithBunSqlite(path);
|
|
49
49
|
}, "openUnderBun");
|
|
50
50
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
51
51
|
quietSqliteWarning();
|
|
52
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
52
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-DEZO6LRS.js");
|
|
53
53
|
return openWithNodeSqlite(path);
|
|
54
54
|
}, "openUnderNode");
|
|
55
55
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -2,7 +2,7 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
wirecatDirectory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-G3RT2EQI.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
8
|
} from "./chunk-BXTDAGM4.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
14
14
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
15
15
|
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
16
16
|
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
|
|
|
137
137
|
return model;
|
|
138
138
|
}, "speechModel");
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.608.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.80.8_commander@15._981e87e6afb3f510e9b2b59ded3c7286/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
141
141
|
import { createHash, randomUUID } from "node:crypto";
|
|
142
142
|
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
143
143
|
import { rename, rm } from "node:fs/promises";
|
|
@@ -175,11 +175,12 @@ var sizeOf = /* @__PURE__ */ __name((path) => {
|
|
|
175
175
|
}
|
|
176
176
|
}, "sizeOf");
|
|
177
177
|
var installedBytes = /* @__PURE__ */ __name((model) => model.files.reduce((sum, file) => sum + file.bytes, 0), "installedBytes");
|
|
178
|
-
var install = /* @__PURE__ */ __name(async (model, directory, { fetch: get = fetch, progress, verifyExisting } = {}) => {
|
|
178
|
+
var install = /* @__PURE__ */ __name(async (model, directory, { fetch: get = fetch, progress, bytes, verifyExisting } = {}) => {
|
|
179
179
|
mkdirSync(join(directory, model.id), { recursive: true, mode: 448 });
|
|
180
|
-
await installFiles(placed(model, directory), { fetch: get, progress, verifyExisting });
|
|
180
|
+
await installFiles(placed(model, directory), { fetch: get, progress, bytes, verifyExisting });
|
|
181
181
|
}, "install");
|
|
182
|
-
var installFiles = /* @__PURE__ */ __name(async (files, { fetch: get = fetch, progress,
|
|
182
|
+
var installFiles = /* @__PURE__ */ __name(async (files, { fetch: get = fetch, progress, bytes = /* @__PURE__ */ __name(() => {
|
|
183
|
+
}, "bytes"), verifyExisting } = {}) => {
|
|
183
184
|
if (verifyExisting)
|
|
184
185
|
for (const [file, path] of files) {
|
|
185
186
|
if (sizeOf(path) !== void 0) {
|
|
@@ -192,18 +193,24 @@ var installFiles = /* @__PURE__ */ __name(async (files, { fetch: get = fetch, pr
|
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
const total = files.reduce((sum, [file]) => sum + file.bytes, 0);
|
|
197
|
+
const missing = files.filter(([file, path]) => sizeOf(path) !== file.bytes);
|
|
198
|
+
let done = total - missing.reduce((sum, [file]) => sum + file.bytes, 0);
|
|
199
|
+
bytes(done, total);
|
|
200
|
+
for (const [file, path] of missing) {
|
|
198
201
|
mkdirSync(dirname(path), { recursive: true, mode: 448 });
|
|
199
202
|
progress?.(`downloading ${file.name} (${megabytes(file.bytes)})`);
|
|
200
|
-
|
|
203
|
+
const before = done;
|
|
204
|
+
await fetchVerified(file, path, get, (received) => {
|
|
205
|
+
done = before + received;
|
|
206
|
+
bytes(done, total);
|
|
207
|
+
});
|
|
201
208
|
}
|
|
202
209
|
}, "installFiles");
|
|
203
|
-
var fetchVerified = /* @__PURE__ */ __name(async (file, path, get) => {
|
|
210
|
+
var fetchVerified = /* @__PURE__ */ __name(async (file, path, get, received) => {
|
|
204
211
|
const stalled = watchdog(STALL_MS);
|
|
205
212
|
try {
|
|
206
|
-
await fetchInto(file, path, get, stalled);
|
|
213
|
+
await fetchInto(file, path, get, stalled, received);
|
|
207
214
|
} catch (error) {
|
|
208
215
|
if (stalled.signal.aborted) {
|
|
209
216
|
throw new CliError("timeout", `${file.name} stopped downloading for ${STALL_MS / 1e3} s \u2014 nothing was installed`);
|
|
@@ -213,7 +220,7 @@ var fetchVerified = /* @__PURE__ */ __name(async (file, path, get) => {
|
|
|
213
220
|
stalled.stop();
|
|
214
221
|
}
|
|
215
222
|
}, "fetchVerified");
|
|
216
|
-
var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled) => {
|
|
223
|
+
var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled, received) => {
|
|
217
224
|
const response = await get(file.url, { signal: stalled.signal });
|
|
218
225
|
if (!response.ok || !response.body) {
|
|
219
226
|
await response.body?.cancel();
|
|
@@ -231,6 +238,7 @@ var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled) => {
|
|
|
231
238
|
return;
|
|
232
239
|
}
|
|
233
240
|
hash.update(chunk);
|
|
241
|
+
received(bytes);
|
|
234
242
|
done(null, chunk);
|
|
235
243
|
}
|
|
236
244
|
});
|