@wirecat/tg-cli 0.116.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/bot/transport.d.ts +1 -1
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +42 -30
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-6CLMTQOV.js → adapter-4YNP6VCO.js} +70 -61
- package/dist/bundle/{all-profiles-R2UZMH24.js → all-profiles-MIQDYAGO.js} +10 -10
- package/dist/bundle/{anthropic-QKIPHV2Z.js → anthropic-NTASPJYE.js} +6 -6
- package/dist/bundle/{app-server-AZB2MFK6.js → app-server-UJZBJ2SK.js} +49 -46
- package/dist/bundle/{bot-api-2IM243J4.js → bot-api-JZAD4L3N.js} +49 -49
- package/dist/bundle/{bot-history-G6CRVCL2.js → bot-history-OUDHH3NU.js} +18 -18
- package/dist/bundle/{bun-JDKPISPX.js → bun-EC4HDIRD.js} +2 -2
- package/dist/bundle/{bun-sqlite-X5PY5IQT.js → bun-sqlite-A4HJR6KO.js} +5 -5
- package/dist/bundle/{chunk-SD5PUYKF.js → chunk-2KQHUBTV.js} +12 -12
- package/dist/bundle/{chunk-QHBVGKC3.js → chunk-2NA5KVP6.js} +210 -82
- package/dist/bundle/{chunk-PPLFOIYX.js → chunk-3MQOLYAN.js} +4 -4
- package/dist/bundle/{chunk-QGL2UGML.js → chunk-4BV4UMBB.js} +738 -235
- package/dist/bundle/{chunk-Y6VWGJ4Q.js → chunk-57LKX6N2.js} +4 -2
- package/dist/bundle/{chunk-BGMV66FC.js → chunk-5IIU7X4S.js} +1 -1
- package/dist/bundle/{chunk-H72UEHNG.js → chunk-5LDWBEWU.js} +55 -33
- package/dist/bundle/{chunk-XQUTJITP.js → chunk-5QYU7B27.js} +763 -130
- package/dist/bundle/chunk-65XV5PPI.js +64 -0
- package/dist/bundle/{chunk-NUYRMU56.js → chunk-6AXUEJGL.js} +2 -2
- package/dist/bundle/{chunk-N42VUNTO.js → chunk-6RI4TEIC.js} +2 -2
- package/dist/bundle/{chunk-VQPLHOVQ.js → chunk-6ZMTEUVU.js} +6 -6
- package/dist/bundle/{chunk-MQ7MCVZV.js → chunk-76EKXFX2.js} +2 -2
- package/dist/bundle/{chunk-K62YATVD.js → chunk-BNEP5EOV.js} +18 -4
- package/dist/bundle/{chunk-EB2IULWB.js → chunk-BXTDAGM4.js} +2 -2
- package/dist/bundle/{chunk-HBUJNNZD.js → chunk-CEY43D3A.js} +31 -29
- package/dist/bundle/chunk-DKFC5ZZ3.js +208 -0
- package/dist/bundle/{chunk-FDI4GOIP.js → chunk-DSZJREEO.js} +463 -358
- package/dist/bundle/{chunk-76CX2YPT.js → chunk-EPCFXKTX.js} +8 -8
- package/dist/bundle/{chunk-KA6EGOJY.js → chunk-EPXVRJAX.js} +2 -2
- package/dist/bundle/{chunk-4IQZRW4O.js → chunk-EQJ6NLF5.js} +13 -13
- package/dist/bundle/{chunk-4D5AUWAY.js → chunk-FHMK6OK4.js} +43 -25
- package/dist/bundle/{chunk-RSDIPQXP.js → chunk-G3RT2EQI.js} +2 -2
- package/dist/bundle/{chunk-IR4S7POE.js → chunk-GI4MTNA2.js} +8 -8
- package/dist/bundle/{chunk-HK6SIIGG.js → chunk-GIM37COQ.js} +3 -3
- package/dist/bundle/{chunk-UCSFO5GW.js → chunk-GLRRCKP6.js} +3 -3
- package/dist/bundle/{chunk-YYKJN6H5.js → chunk-GXCJ47SJ.js} +1499 -710
- package/dist/bundle/{chunk-GV7ZJ33M.js → chunk-H6S3C3MH.js} +4 -4
- package/dist/bundle/{chunk-LXH3SKY3.js → chunk-HJNRIK5X.js} +8 -8
- package/dist/bundle/{chunk-5VFPUOJO.js → chunk-I4TI5HDJ.js} +11 -11
- package/dist/bundle/{chunk-RSNGMNU5.js → chunk-JLJKGKU2.js} +6 -6
- package/dist/bundle/{chunk-T7CDLV33.js → chunk-JPVFYMSQ.js} +22 -14
- package/dist/bundle/{chunk-B4UOCWM4.js → chunk-JWIUK3SK.js} +2 -2
- package/dist/bundle/{chunk-LSKGCJWD.js → chunk-JWPSVS6C.js} +21246 -4044
- package/dist/bundle/{chunk-JJMQA272.js → chunk-JZETEZHC.js} +8 -21
- package/dist/bundle/{chunk-42GK3XRS.js → chunk-KEDHX6XG.js} +2 -2
- package/dist/bundle/{chunk-QAKL3GXB.js → chunk-MBH7IKLT.js} +1 -1
- package/dist/bundle/{chunk-HLNYJPAB.js → chunk-MZNOASAW.js} +2 -2
- package/dist/bundle/{chunk-YLRTLZF6.js → chunk-NKFTZVQU.js} +1 -1
- package/dist/bundle/{chunk-577MFPCP.js → chunk-NMT2VGEI.js} +3 -3
- package/dist/bundle/{chunk-5ZIBAYIZ.js → chunk-NUCDEOFC.js} +2 -2
- package/dist/bundle/{chunk-NL3PAFAE.js → chunk-OTQDJUES.js} +6 -6
- package/dist/bundle/{chunk-KV4267S4.js → chunk-P3ASN72F.js} +1 -1
- package/dist/bundle/{chunk-TZVL4U7U.js → chunk-PB252TT3.js} +4 -2
- package/dist/bundle/{chunk-HUOXUI2M.js → chunk-PO74BDER.js} +58 -47
- package/dist/bundle/{chunk-LFKEKSI5.js → chunk-PW3HFIJA.js} +523 -239
- package/dist/bundle/{chunk-5FCONCJO.js → chunk-PWCQC56A.js} +1 -1
- package/dist/bundle/{chunk-XBIPSSKI.js → chunk-QOGYHU3Q.js} +4 -4
- package/dist/bundle/{chunk-JFTCOV37.js → chunk-RG2E7ZQZ.js} +180 -25
- package/dist/bundle/{chunk-R52RMHWF.js → chunk-TMTEWOQS.js} +3 -3
- package/dist/bundle/{chunk-I6JF43YP.js → chunk-TSTEZNSX.js} +3 -3
- package/dist/bundle/{chunk-YPF6OS37.js → chunk-VW6BF6M7.js} +1 -1
- package/dist/bundle/{chunk-SKZ2E3WC.js → chunk-Y64SI2RO.js} +47 -1
- package/dist/bundle/{chunk-DP5LRU7K.js → chunk-YEOSV6JC.js} +1 -1
- package/dist/bundle/{chunk-OX6EWGSG.js → chunk-YHZFGUAP.js} +19 -19
- package/dist/bundle/{chunk-N6TIFJHW.js → chunk-YPRUWRKE.js} +1 -1
- package/dist/bundle/{chunk-PPSUA3IZ.js → chunk-ZMUC3UQO.js} +3 -3
- package/dist/bundle/{chunk-PXMHBTK3.js → chunk-ZXXTJF4Z.js} +4 -4
- package/dist/bundle/command-contract-7GZ6HAA6.js +33 -0
- package/dist/bundle/{decode-W6YPTGJA.js → decode-NMNPLKNR.js} +5 -5
- package/dist/bundle/{dispatch-H7EFNBEH.js → dispatch-OP27MWX5.js} +8 -8
- package/dist/bundle/{echarts-YAWDIC5D.js → echarts-S46LEIPS.js} +2 -2
- package/dist/bundle/{embed-EN4UTLV5.js → embed-I5ZYHGYC.js} +6 -6
- package/dist/bundle/{embedder-HEKHRL7E.js → embedder-LTJI67N2.js} +9 -9
- package/dist/bundle/{entry-2KB6MTCG.js → entry-O6BUPXF7.js} +7 -7
- package/dist/bundle/{failure-3DU3HLBQ.js → failure-4JUQFXJT.js} +2 -2
- package/dist/bundle/{first-run-LBG26WWO.js → first-run-PMZNCDGD.js} +11 -11
- package/dist/bundle/first-screen-BGML5DSO.js +31 -0
- package/dist/bundle/{instructions-HA62QNPR.js → instructions-AUEGY3VO.js} +1 -1
- package/dist/bundle/{mcp-PPVOM4SE.js → mcp-M4QN2E7R.js} +2 -2
- package/dist/bundle/{node-MZ2VWSQQ.js → node-XRA7RBCQ.js} +2 -2
- package/dist/bundle/{node-sqlite-KNNS6DCM.js → node-sqlite-DEZO6LRS.js} +6 -6
- package/dist/bundle/{oauth-KWUABBSQ.js → oauth-DAVC7WCD.js} +7 -7
- package/dist/bundle/{open-JXMCYCIV.js → open-DE2YO4T7.js} +5 -5
- package/dist/bundle/{openai-HL3IR4VT.js → openai-5BKGAULH.js} +14 -14
- package/dist/bundle/{process-K2FICLWY.js → process-4ZHPNUIQ.js} +1 -1
- package/dist/bundle/{program-IFOMT4JS.js → program-EGTKSNB4.js} +51 -51
- package/dist/bundle/{prompt-HVD3Q77P.js → prompt-HWCWHHPE.js} +5 -5
- package/dist/bundle/{proxy-transport-PA5SGMRY.js → proxy-transport-4DPZB2W2.js} +5 -5
- package/dist/bundle/{recognize-HHLVETKI.js → recognize-NG6RXNGF.js} +4 -4
- package/dist/bundle/{remote-HUAKXJCS.js → remote-ZKXIIGYH.js} +7 -7
- package/dist/bundle/{rerank-NWFIV7OF.js → rerank-TX5QFURV.js} +7 -7
- package/dist/bundle/{serve-ANUKAJJN.js → serve-XAS6DECW.js} +9 -9
- package/dist/bundle/{server-7Q7WAOHO.js → server-CNPIWBYU.js} +35 -35
- package/dist/bundle/server-FRTKLHZF.js +60 -0
- package/dist/bundle/{state-Y2AJ5XTP.js → state-3HTUETTS.js} +6 -6
- package/dist/bundle/{store-S3IG5KWL.js → store-B5VZWJHN.js} +23 -13
- package/dist/bundle/store-maintenance-command-VG3CLELA.js +50 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/account.d.ts.map +1 -1
- package/dist/telegram/account.js +4 -1
- package/dist/telegram/account.js.map +1 -1
- package/dist/telegram/errors.d.ts.map +1 -1
- package/dist/telegram/errors.js +2 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/telegram/feature.d.ts +4 -1
- package/dist/telegram/feature.d.ts.map +1 -1
- package/dist/telegram/feature.js +5 -2
- package/dist/telegram/feature.js.map +1 -1
- package/dist/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +24 -10
- package/dist/telegram/sending.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/chunk-K2RYCCTP.js +0 -48
- package/dist/bundle/chunk-ZDIAPICE.js +0 -132
- package/dist/bundle/command-contract-DPXM4SZT.js +0 -33
- package/dist/bundle/first-screen-TGTSLUI6.js +0 -31
- package/dist/bundle/server-HCQS4YDQ.js +0 -60
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +0 -50
- /package/dist/bundle/{chunk-LU3WKZBA.js → chunk-VOXIGICJ.js} +0 -0
|
@@ -7,18 +7,18 @@ 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
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EPCFXKTX.js";
|
|
14
14
|
import {
|
|
15
15
|
CliError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-BXTDAGM4.js";
|
|
17
17
|
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,18 +18,18 @@ 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
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-EPCFXKTX.js";
|
|
25
25
|
import {
|
|
26
26
|
CliError
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-BXTDAGM4.js";
|
|
28
28
|
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,28 +3,28 @@ 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
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EPCFXKTX.js";
|
|
14
14
|
import {
|
|
15
15
|
importFrom
|
|
16
16
|
} from "./chunk-Y5E2WNWB.js";
|
|
17
17
|
import {
|
|
18
18
|
CliError
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BXTDAGM4.js";
|
|
20
20
|
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,15 +2,15 @@ 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
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BXTDAGM4.js";
|
|
9
9
|
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,15 +2,15 @@ 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
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BXTDAGM4.js";
|
|
9
9
|
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
|
});
|