@wirecat/drive-cli 0.43.0 → 0.45.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.
Files changed (182) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/drive.js +35 -40
  3. package/dist/bundle/all-profiles-LTHNCWQW.js +26 -0
  4. package/dist/bundle/anthropic-NOJEF3V2.js +71 -0
  5. package/dist/bundle/bun-ADJVI4HY.js +169 -0
  6. package/dist/bundle/bun-sqlite-GNXLBF2A.js +70 -0
  7. package/dist/bundle/chunk-2FTZBZOB.js +2315 -0
  8. package/dist/bundle/chunk-2YU3CXFD.js +3391 -0
  9. package/dist/bundle/chunk-35GRI4DI.js +375 -0
  10. package/dist/bundle/chunk-37MAA6F2.js +5624 -0
  11. package/dist/bundle/chunk-3V6NPZY7.js +2352 -0
  12. package/dist/bundle/chunk-4TIC23D2.js +9 -0
  13. package/dist/bundle/chunk-4TQSNQVV.js +1071 -0
  14. package/dist/bundle/chunk-4UE7AVHZ.js +150 -0
  15. package/dist/bundle/chunk-5DPV7X27.js +663 -0
  16. package/dist/bundle/chunk-5FONRUG6.js +24805 -0
  17. package/dist/bundle/chunk-5ZVLM6YR.js +19 -0
  18. package/dist/bundle/chunk-64WJYT2F.js +3954 -0
  19. package/dist/bundle/chunk-65GGKAQ7.js +82 -0
  20. package/dist/bundle/chunk-66N2DGGC.js +515 -0
  21. package/dist/bundle/chunk-6KFA6HOM.js +2941 -0
  22. package/dist/bundle/chunk-6Y2BYFXQ.js +65 -0
  23. package/dist/bundle/chunk-7NCG2SHR.js +74 -0
  24. package/dist/bundle/chunk-7PVNJAQ2.js +73 -0
  25. package/dist/bundle/chunk-7XWUOCGW.js +190 -0
  26. package/dist/bundle/chunk-A6ZKTNTZ.js +168 -0
  27. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  28. package/dist/bundle/chunk-AH3SNVCV.js +498 -0
  29. package/dist/bundle/chunk-AN3GVZTU.js +76 -0
  30. package/dist/bundle/chunk-BPBIBVFH.js +166 -0
  31. package/dist/bundle/chunk-C4XP5T73.js +264 -0
  32. package/dist/bundle/chunk-C6SMAEED.js +18102 -0
  33. package/dist/bundle/chunk-CDI67JSB.js +1092 -0
  34. package/dist/bundle/chunk-CEO5HPRL.js +25 -0
  35. package/dist/bundle/chunk-CFT7UHF6.js +15572 -0
  36. package/dist/bundle/chunk-DC4T3FNP.js +1913 -0
  37. package/dist/bundle/chunk-DCTXOMOR.js +35 -0
  38. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  39. package/dist/bundle/chunk-EVWXODYV.js +754 -0
  40. package/dist/bundle/chunk-GKHM6I64.js +2356 -0
  41. package/dist/bundle/chunk-GNI7INK6.js +18 -0
  42. package/dist/bundle/chunk-GTYY6BIE.js +58 -0
  43. package/dist/bundle/chunk-GX4WEMAG.js +164 -0
  44. package/dist/bundle/chunk-HA3WCVGY.js +8179 -0
  45. package/dist/bundle/chunk-HLONHTSG.js +281 -0
  46. package/dist/bundle/chunk-HOIUIKWS.js +236 -0
  47. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  48. package/dist/bundle/chunk-I5EJHKNC.js +111 -0
  49. package/dist/bundle/chunk-ICKNJIGE.js +31 -0
  50. package/dist/bundle/chunk-IGB5CJCA.js +62 -0
  51. package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
  52. package/dist/bundle/chunk-IVQ6342B.js +2 -0
  53. package/dist/bundle/chunk-K4N2DKE5.js +17 -0
  54. package/dist/bundle/chunk-LNB7BIZL.js +844 -0
  55. package/dist/bundle/chunk-LVDHWNJF.js +193 -0
  56. package/dist/bundle/chunk-LW2G4U6W.js +570 -0
  57. package/dist/bundle/chunk-LWT55XC5.js +60 -0
  58. package/dist/bundle/chunk-LY26NW3I.js +6848 -0
  59. package/dist/bundle/chunk-MJR2OTO4.js +1714 -0
  60. package/dist/bundle/chunk-MWUITL6N.js +42 -0
  61. package/dist/bundle/chunk-N47CYWEM.js +454 -0
  62. package/dist/bundle/chunk-NKZ6V4JW.js +263 -0
  63. package/dist/bundle/chunk-NQ6LLDDC.js +161 -0
  64. package/dist/bundle/chunk-NZIHPYY5.js +215 -0
  65. package/dist/bundle/chunk-OECPFZLP.js +3541 -0
  66. package/dist/bundle/chunk-P5KGFT7U.js +18 -0
  67. package/dist/bundle/chunk-PDH2QQQV.js +484 -0
  68. package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
  69. package/dist/bundle/chunk-PJDO7AFZ.js +421 -0
  70. package/dist/bundle/chunk-PWKXHDBQ.js +18078 -0
  71. package/dist/bundle/chunk-QLZGLPJL.js +100 -0
  72. package/dist/bundle/chunk-SBZB7HMU.js +1055 -0
  73. package/dist/bundle/chunk-SGOPYPVW.js +835 -0
  74. package/dist/bundle/chunk-TDC6JGDA.js +630 -0
  75. package/dist/bundle/chunk-TOYPN2XX.js +288 -0
  76. package/dist/bundle/chunk-UC44ZMQV.js +78 -0
  77. package/dist/bundle/chunk-V7GN5BI7.js +99 -0
  78. package/dist/bundle/chunk-VO4KOLQZ.js +119 -0
  79. package/dist/bundle/chunk-WPGCDWPU.js +1855 -0
  80. package/dist/bundle/chunk-WQMVSQPP.js +886 -0
  81. package/dist/bundle/chunk-WZUJKUBK.js +384 -0
  82. package/dist/bundle/chunk-X5DFDGWS.js +2 -0
  83. package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
  84. package/dist/bundle/chunk-XPEWOPJR.js +431 -0
  85. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  86. package/dist/bundle/chunk-Y5EJSZXV.js +220 -0
  87. package/dist/bundle/chunk-YE3J6DLY.js +106 -0
  88. package/dist/bundle/chunk-YFLKH3NZ.js +48 -0
  89. package/dist/bundle/chunk-YJX4X564.js +138 -0
  90. package/dist/bundle/chunk-YJZBJ2TM.js +71 -0
  91. package/dist/bundle/chunk-Z4O6C7WR.js +1973 -0
  92. package/dist/bundle/chunk-ZIHLE7LG.js +15992 -0
  93. package/dist/bundle/chunk-ZPMLLONT.js +1054 -0
  94. package/dist/bundle/chunk-ZQNXKWUY.js +35584 -0
  95. package/dist/bundle/chunk-ZS635F4O.js +45 -0
  96. package/dist/bundle/chunk-ZU732VCC.js +122 -0
  97. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  98. package/dist/bundle/command-contract-HX35D7KV.js +38 -0
  99. package/dist/bundle/dist-MWTMOYWT.js +7577 -0
  100. package/dist/bundle/dist-PY3MVR3G.js +21 -0
  101. package/dist/bundle/drive.js +50 -0
  102. package/dist/bundle/echarts-RFTK737T.js +42501 -0
  103. package/dist/bundle/embed-5NAGJUMD.js +37 -0
  104. package/dist/bundle/embedder-EWXLIGBY.js +110 -0
  105. package/dist/bundle/entry-YCPJ6H6U.js +15 -0
  106. package/dist/bundle/failure-XBWHHBEW.js +37 -0
  107. package/dist/bundle/first-run-LNAZDBB4.js +24 -0
  108. package/dist/bundle/first-screen-P5NNFJD7.js +36 -0
  109. package/dist/bundle/google-5FFKRHHC.js +32 -0
  110. package/dist/bundle/google-api-TJCFOOAP.js +82 -0
  111. package/dist/bundle/identity-53ZMPL2O.js +10 -0
  112. package/dist/bundle/instructions-FHNL7CMW.js +9 -0
  113. package/dist/bundle/login-VXXZZR6G.js +158 -0
  114. package/dist/bundle/mcp-2CJCJXSW.js +95 -0
  115. package/dist/bundle/mcp-F4XZO76F.js +507 -0
  116. package/dist/bundle/mcp-IXFC2VVR.js +165 -0
  117. package/dist/bundle/mdast-util-from-markdown-FXEPSNER.js +1958 -0
  118. package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +2103 -0
  119. package/dist/bundle/micromark-extension-gfm-GRL24TU6.js +1838 -0
  120. package/dist/bundle/node-P4E63KXA.js +2340 -0
  121. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  122. package/dist/bundle/node-ZMCACJVS.js +176 -0
  123. package/dist/bundle/node-sqlite-QJQ5S7KS.js +46 -0
  124. package/dist/bundle/oauth-TZFDPAFE.js +18 -0
  125. package/dist/bundle/open-IYM25QTL.js +20 -0
  126. package/dist/bundle/process-ZPTLNVQS.js +91 -0
  127. package/dist/bundle/program-YX7DZMPR.js +24100 -0
  128. package/dist/bundle/prompt-TGWTVIEK.js +13 -0
  129. package/dist/bundle/reasons-Q5LOQESQ.js +11 -0
  130. package/dist/bundle/recognize-AGPMWKIY.js +191 -0
  131. package/dist/bundle/remote-QV7QSLAK.js +28 -0
  132. package/dist/bundle/rerank-HZKJJCS4.js +51 -0
  133. package/dist/bundle/serve-NRJQOVT4.js +20 -0
  134. package/dist/bundle/server-2UQDEWTS.js +818 -0
  135. package/dist/bundle/server-R4JUHFSW.js +56 -0
  136. package/dist/bundle/services-NZQWVMOE.js +333 -0
  137. package/dist/bundle/sqlite-runtime-6MXHTYYU.js +17 -0
  138. package/dist/bundle/state-IF2FLTSY.js +34 -0
  139. package/dist/bundle/store-HBD54IRL.js +142 -0
  140. package/dist/bundle/store-HVIBXOXS.js +125 -0
  141. package/dist/bundle/store-maintenance-command-U3F4RGJB.js +57 -0
  142. package/dist/bundle/terminal-TFCTWLOS.js +11 -0
  143. package/dist/bundle/tokens-5D5YUA2Q.js +103 -0
  144. package/dist/commands/config.js +1 -1
  145. package/dist/commands/config.js.map +1 -1
  146. package/dist/commands/mcp.d.ts.map +1 -1
  147. package/dist/commands/mcp.js +106 -54
  148. package/dist/commands/mcp.js.map +1 -1
  149. package/dist/config.d.ts +3 -1
  150. package/dist/config.d.ts.map +1 -1
  151. package/dist/config.js +3 -1
  152. package/dist/config.js.map +1 -1
  153. package/dist/contract-overrides.d.ts.map +1 -1
  154. package/dist/contract-overrides.js +123 -83
  155. package/dist/contract-overrides.js.map +1 -1
  156. package/dist/mcp.d.ts +14 -6
  157. package/dist/mcp.d.ts.map +1 -1
  158. package/dist/mcp.js +26 -12
  159. package/dist/mcp.js.map +1 -1
  160. package/dist/program.d.ts.map +1 -1
  161. package/dist/program.js +7 -5
  162. package/dist/program.js.map +1 -1
  163. package/dist/reasons.d.ts.map +1 -1
  164. package/dist/reasons.js +0 -1
  165. package/dist/reasons.js.map +1 -1
  166. package/dist/registry.d.ts +2 -2
  167. package/dist/registry.d.ts.map +1 -1
  168. package/dist/registry.js +8 -2
  169. package/dist/registry.js.map +1 -1
  170. package/dist/state.d.ts +6 -3
  171. package/dist/state.d.ts.map +1 -1
  172. package/dist/state.js +6 -3
  173. package/dist/state.js.map +1 -1
  174. package/dist/tokens.d.ts +4 -1
  175. package/dist/tokens.d.ts.map +1 -1
  176. package/dist/tokens.js +44 -8
  177. package/dist/tokens.js.map +1 -1
  178. package/dist/version.d.ts +1 -1
  179. package/dist/version.js +1 -1
  180. package/package.json +7 -5
  181. package/scenarios/agent-access.md +2 -2
  182. package/skills/drive-cli/SKILL.md +2 -1
@@ -0,0 +1,166 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ envName,
5
+ readOnlyLockOf
6
+ } from "./chunk-CEO5HPRL.js";
7
+ import {
8
+ ensureSqlite
9
+ } from "./chunk-YE3J6DLY.js";
10
+ import {
11
+ catchCrashes
12
+ } from "./chunk-6KFA6HOM.js";
13
+ import {
14
+ CliError
15
+ } from "./chunk-GKHM6I64.js";
16
+ import {
17
+ __name
18
+ } from "./chunk-ZVVMGPBJ.js";
19
+
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/entry.js
21
+ import { spawn } from "node:child_process";
22
+
23
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/argv-log.js
24
+ import { appendFileSync } from "node:fs";
25
+ var logVersion = /* @__PURE__ */ __name((file) => {
26
+ appendFileSync(file, `${JSON.stringify({ command: "", options: ["--version"] })}
27
+ `);
28
+ }, "logVersion");
29
+
30
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/node_modules/@wirecat/cli-core/dist/cli/entry.js
31
+ var processIo = /* @__PURE__ */ __name(() => ({
32
+ argv: process.argv,
33
+ env: process.env,
34
+ platform: process.platform,
35
+ stdin: process.stdin,
36
+ stdout: process.stdout,
37
+ stderr: process.stderr,
38
+ signals: process,
39
+ setExitCode: /* @__PURE__ */ __name((code) => {
40
+ process.exitCode = code;
41
+ }, "setExitCode"),
42
+ spawn
43
+ }), "processIo");
44
+ var startCli = /* @__PURE__ */ __name(async (entry) => {
45
+ const io = { ...processIo(), ...entry.io };
46
+ const args = io.argv.slice(2);
47
+ if (args.length === 1 && (args[0] === "--version" || args[0] === "-V"))
48
+ return printVersion(entry.app, io);
49
+ const tty = io.stdout.isTTY === true;
50
+ const release = catchCrashes({
51
+ cli: entry.app.command,
52
+ interactive: entry.interactive?.(args, tty) ?? tty,
53
+ ...entry.reasons ? { reasons: entry.reasons } : {},
54
+ target: io.signals
55
+ });
56
+ const controller = new AbortController();
57
+ let closed = false;
58
+ let unwritable = false;
59
+ const interrupted = /* @__PURE__ */ __name((signal) => () => controller.abort(new CliError("cancelled", `command interrupted by ${signal}`, { reason: signal, retryable: false })), "interrupted");
60
+ const sigint = interrupted("SIGINT");
61
+ const sigterm = interrupted("SIGTERM");
62
+ const outputFailed = /* @__PURE__ */ __name((error) => {
63
+ if (error.code === "EPIPE") {
64
+ closed = true;
65
+ controller.abort(new CliError("cancelled", "output pipe closed", { retryable: false }));
66
+ } else {
67
+ unwritable = true;
68
+ controller.abort(new CliError("configuration_error", "could not write command output"));
69
+ }
70
+ }, "outputFailed");
71
+ const headless = /* @__PURE__ */ __name((command) => {
72
+ const flags = command?.optsWithGlobals() ?? {};
73
+ return Boolean(flags.json || flags.jsonl || flags.input === false || io.env.CI) || !tty;
74
+ }, "headless");
75
+ const context = {
76
+ args,
77
+ env: io.env,
78
+ tty,
79
+ signal: controller.signal,
80
+ atStart: /* @__PURE__ */ __name(async (command) => {
81
+ if (command.optsWithGlobals().dryRun === true)
82
+ return;
83
+ const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
84
+ import("./first-run-LNAZDBB4.js"),
85
+ import("./command-contract-HX35D7KV.js")
86
+ ]);
87
+ await setupAtStart({
88
+ command: entry.app.command,
89
+ env: io.env,
90
+ contentLanguages: entry.app.contentLanguages,
91
+ path: commandPathOf(command),
92
+ headless: headless(command),
93
+ readOnlyLock: readOnlyLockOf(entry.app, io.env),
94
+ input: io.stdin
95
+ });
96
+ }, "atStart"),
97
+ ask: /* @__PURE__ */ __name(async (question, command) => {
98
+ if (headless(command) || io.stdin.isTTY !== true)
99
+ return false;
100
+ const { readSecret } = await import("./prompt-TGWTVIEK.js");
101
+ const answer = await readSecret(`${question} [y/N] `, {
102
+ input: io.stdin,
103
+ output: io.stderr,
104
+ echo: true,
105
+ signal: controller.signal
106
+ });
107
+ return /^(y|yes)$/i.test(answer.trim());
108
+ }, "ask"),
109
+ openBrowser: /* @__PURE__ */ __name((url, browser) => openBrowser(io, url, browser), "openBrowser"),
110
+ outputClosed: /* @__PURE__ */ __name(() => closed, "outputClosed")
111
+ };
112
+ let code;
113
+ try {
114
+ if (entry.sqlite)
115
+ await ensureSqlite();
116
+ io.signals.on("SIGINT", sigint).on("SIGTERM", sigterm);
117
+ io.stdout.on("error", outputFailed);
118
+ io.stderr.on("error", outputFailed);
119
+ const returned = await entry.run(context);
120
+ if (typeof returned === "number")
121
+ code = returned;
122
+ } catch (error) {
123
+ code = commanderExit(error) ?? entry.fail(error, context);
124
+ } finally {
125
+ io.signals.off("SIGINT", sigint).off("SIGTERM", sigterm);
126
+ release();
127
+ }
128
+ if (closed)
129
+ io.setExitCode(0);
130
+ else if (unwritable)
131
+ io.setExitCode(3);
132
+ else if (code !== void 0)
133
+ io.setExitCode(code);
134
+ }, "startCli");
135
+ var printVersion = /* @__PURE__ */ __name((app, io) => {
136
+ const argvLog = io.env[envName(app, "TEST_ARGV_LOG")];
137
+ if (argvLog)
138
+ logVersion(argvLog);
139
+ io.stdout.write(`${app.version}
140
+ `);
141
+ }, "printVersion");
142
+ var commanderExit = /* @__PURE__ */ __name((error) => {
143
+ if (!(error instanceof Error))
144
+ return void 0;
145
+ const { code, exitCode } = error;
146
+ if (typeof code !== "string" || !code.startsWith("commander.") || typeof exitCode !== "number")
147
+ return void 0;
148
+ if (exitCode === 0)
149
+ return 0;
150
+ return code === "commander.help" ? 2 : void 0;
151
+ }, "commanderExit");
152
+ var openBrowser = /* @__PURE__ */ __name((io, url, browser) => {
153
+ const [command, prefix] = browser !== void 0 ? [browser, []] : io.platform === "darwin" ? ["open", []] : io.platform === "win32" ? ["rundll32.exe", ["url.dll,FileProtocolHandler"]] : ["xdg-open", []];
154
+ return new Promise((resolve, reject) => {
155
+ const child = io.spawn(command, [...prefix, url], { detached: true, stdio: "ignore", windowsHide: true });
156
+ child.once("error", () => reject(new CliError("configuration_error", `could not start ${command} \u2014 open the printed URL in a browser`)));
157
+ child.once("spawn", () => {
158
+ child.unref();
159
+ resolve();
160
+ });
161
+ });
162
+ }, "openBrowser");
163
+
164
+ export {
165
+ startCli
166
+ };
@@ -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-P5KGFT7U.js";
6
+ import {
7
+ CliError
8
+ } from "./chunk-GKHM6I64.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/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.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/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.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vi_80b586dbc8b099637a6e461856c2ee6b/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
+ };