@wirecat/zoom-cli 0.56.0 → 0.57.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 (145) hide show
  1. package/README.md +1 -1
  2. package/dist/bin/zm.js +35 -5
  3. package/dist/bundle/all-profiles-EKHWTGOY.js +25 -0
  4. package/dist/bundle/answer-policy-KH2IFXPN.js +96 -0
  5. package/dist/bundle/anthropic-VL54IUGF.js +70 -0
  6. package/dist/bundle/bun-ADJVI4HY.js +169 -0
  7. package/dist/bundle/bun-sqlite-2SDA3YOT.js +69 -0
  8. package/dist/bundle/chunk-2IKY7VBH.js +9 -0
  9. package/dist/bundle/chunk-2WOGZDZG.js +431 -0
  10. package/dist/bundle/chunk-4R7HYNZS.js +73 -0
  11. package/dist/bundle/chunk-4VCA7QU3.js +538 -0
  12. package/dist/bundle/chunk-4YLS4YLS.js +29 -0
  13. package/dist/bundle/chunk-5D4AEUVA.js +24783 -0
  14. package/dist/bundle/chunk-5F7IOESV.js +281 -0
  15. package/dist/bundle/chunk-5QESMCQK.js +122 -0
  16. package/dist/bundle/chunk-6M6FJV5D.js +138 -0
  17. package/dist/bundle/chunk-6MX5T6AQ.js +17 -0
  18. package/dist/bundle/chunk-6P3YHT54.js +385 -0
  19. package/dist/bundle/chunk-7A6PZUDR.js +938 -0
  20. package/dist/bundle/chunk-7GUG6UZS.js +884 -0
  21. package/dist/bundle/chunk-7JZJMHQY.js +487 -0
  22. package/dist/bundle/chunk-A4ETXPMZ.js +98 -0
  23. package/dist/bundle/chunk-ADLS6FVG.js +24600 -0
  24. package/dist/bundle/chunk-AE4BOXH7.js +5292 -0
  25. package/dist/bundle/chunk-AN3GVZTU.js +76 -0
  26. package/dist/bundle/chunk-BAYNCCNM.js +215 -0
  27. package/dist/bundle/chunk-BW2WPOXP.js +166 -0
  28. package/dist/bundle/chunk-BW52AJ4R.js +3387 -0
  29. package/dist/bundle/chunk-CB5UTASG.js +18 -0
  30. package/dist/bundle/chunk-CLMXBW53.js +1028 -0
  31. package/dist/bundle/chunk-DCTXOMOR.js +35 -0
  32. package/dist/bundle/chunk-DFDN6AUB.js +21 -0
  33. package/dist/bundle/chunk-EOQFWJJD.js +1095 -0
  34. package/dist/bundle/chunk-G4R4ZIGD.js +3569 -0
  35. package/dist/bundle/chunk-G4VZDINN.js +161 -0
  36. package/dist/bundle/chunk-GARCOIB6.js +409 -0
  37. package/dist/bundle/chunk-GKMGS7G5.js +1938 -0
  38. package/dist/bundle/chunk-HCNMFFG3.js +82 -0
  39. package/dist/bundle/chunk-HG5KRV55.js +1970 -0
  40. package/dist/bundle/chunk-HKYLSIZ2.js +82 -0
  41. package/dist/bundle/chunk-HTQTIKWP.js +928 -0
  42. package/dist/bundle/chunk-I4VQDXFR.js +100 -0
  43. package/dist/bundle/chunk-ICSKEDPI.js +36139 -0
  44. package/dist/bundle/chunk-IP4OK7RQ.js +24 -0
  45. package/dist/bundle/chunk-IVQ6342B.js +2 -0
  46. package/dist/bundle/chunk-K72SEMYI.js +160 -0
  47. package/dist/bundle/chunk-LHRCJYFC.js +19 -0
  48. package/dist/bundle/chunk-LPTIQLDW.js +192 -0
  49. package/dist/bundle/chunk-LQ3T2ZIX.js +124 -0
  50. package/dist/bundle/chunk-LSVI3A5X.js +836 -0
  51. package/dist/bundle/chunk-LW2G4U6W.js +570 -0
  52. package/dist/bundle/chunk-LXB6ONWC.js +3517 -0
  53. package/dist/bundle/chunk-LY26NW3I.js +6848 -0
  54. package/dist/bundle/chunk-MAEFLDHG.js +6092 -0
  55. package/dist/bundle/chunk-MZH4GDR4.js +45 -0
  56. package/dist/bundle/chunk-NN5B24KP.js +1109 -0
  57. package/dist/bundle/chunk-NO7CJEYV.js +22 -0
  58. package/dist/bundle/chunk-NTDWAAGL.js +18435 -0
  59. package/dist/bundle/chunk-NW3X3G5X.js +264 -0
  60. package/dist/bundle/chunk-O66V2WHK.js +48 -0
  61. package/dist/bundle/chunk-OCGPZHXW.js +25 -0
  62. package/dist/bundle/chunk-OIHDCGV4.js +151 -0
  63. package/dist/bundle/chunk-OVSWVPXL.js +8190 -0
  64. package/dist/bundle/chunk-PIN5RZ3D.js +63 -0
  65. package/dist/bundle/chunk-QLIB3PEC.js +1146 -0
  66. package/dist/bundle/chunk-QTR6D5HT.js +58 -0
  67. package/dist/bundle/chunk-QUJPQMHJ.js +2315 -0
  68. package/dist/bundle/chunk-R3HPOCZD.js +188 -0
  69. package/dist/bundle/chunk-RMV4C2YL.js +482 -0
  70. package/dist/bundle/chunk-RRRBMQ2E.js +844 -0
  71. package/dist/bundle/chunk-S4S7E54J.js +60 -0
  72. package/dist/bundle/chunk-SB6WOSHG.js +1109 -0
  73. package/dist/bundle/chunk-SE75DPBY.js +31 -0
  74. package/dist/bundle/chunk-SQJ7EH2D.js +97 -0
  75. package/dist/bundle/chunk-TKCHUT2H.js +422 -0
  76. package/dist/bundle/chunk-TLQUKHEM.js +193 -0
  77. package/dist/bundle/chunk-TZ2MKETI.js +100 -0
  78. package/dist/bundle/chunk-UC44ZMQV.js +78 -0
  79. package/dist/bundle/chunk-UI5UTMSZ.js +275 -0
  80. package/dist/bundle/chunk-VPPYYWOH.js +630 -0
  81. package/dist/bundle/chunk-WJHK5D7Z.js +35612 -0
  82. package/dist/bundle/chunk-WQ24UC44.js +239 -0
  83. package/dist/bundle/chunk-X5DFDGWS.js +2 -0
  84. package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
  85. package/dist/bundle/chunk-YB4DMKYX.js +119 -0
  86. package/dist/bundle/chunk-Z4TZ6TAF.js +288 -0
  87. package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
  88. package/dist/bundle/cli-72EQATJF.js +825 -0
  89. package/dist/bundle/command-contract-4MHSZUN3.js +38 -0
  90. package/dist/bundle/config-GFIJK6G2.js +79 -0
  91. package/dist/bundle/dist-IBNHCQXT.js +136 -0
  92. package/dist/bundle/dist-XUFQCJXW.js +7577 -0
  93. package/dist/bundle/echarts-RFTK737T.js +42501 -0
  94. package/dist/bundle/embed-7QYA2ZZE.js +35 -0
  95. package/dist/bundle/embedder-YNN6PCHG.js +108 -0
  96. package/dist/bundle/first-run-EVSRQKZJ.js +23 -0
  97. package/dist/bundle/first-screen-RG4GUKW7.js +36 -0
  98. package/dist/bundle/folders-JEPOMYM4.js +13 -0
  99. package/dist/bundle/instructions-FHNL7CMW.js +9 -0
  100. package/dist/bundle/main-NYGJXPH7.js +130 -0
  101. package/dist/bundle/mcp-IXFC2VVR.js +165 -0
  102. package/dist/bundle/mcp-VGSZDCKK.js +189 -0
  103. package/dist/bundle/mcp-XKP2PXLS.js +92 -0
  104. package/dist/bundle/meetings-IBPI4MM4.js +215 -0
  105. package/dist/bundle/node-P4E63KXA.js +2340 -0
  106. package/dist/bundle/node-TLZSIHIJ.js +21 -0
  107. package/dist/bundle/node-ZMCACJVS.js +176 -0
  108. package/dist/bundle/node-sqlite-ZNGOBA5Q.js +45 -0
  109. package/dist/bundle/oauth-Q6LKF7DB.js +17 -0
  110. package/dist/bundle/open-LJ332Y5O.js +19 -0
  111. package/dist/bundle/output-file-RYQZ3RTE.js +63 -0
  112. package/dist/bundle/process-ZPTLNVQS.js +91 -0
  113. package/dist/bundle/program-IBRQBQ6W.js +5845 -0
  114. package/dist/bundle/prompt-RT7GUUXH.js +12 -0
  115. package/dist/bundle/recognize-QXGE7YJH.js +190 -0
  116. package/dist/bundle/remote-FD4MZQV3.js +26 -0
  117. package/dist/bundle/rerank-V6AVV755.js +49 -0
  118. package/dist/bundle/run-log-RE2EI3UU.js +111 -0
  119. package/dist/bundle/serve-HIJTFAW7.js +19 -0
  120. package/dist/bundle/server-3QOXOYYL.js +53 -0
  121. package/dist/bundle/server-WLJCU7KK.js +812 -0
  122. package/dist/bundle/services-KC5KQFBS.js +330 -0
  123. package/dist/bundle/speech-5JOXLYDA.js +44 -0
  124. package/dist/bundle/state-PPGRB3T6.js +33 -0
  125. package/dist/bundle/store-LODVDPK3.js +141 -0
  126. package/dist/bundle/store-WB5BICTG.js +124 -0
  127. package/dist/bundle/store-connection-EG6Z5ITP.js +76 -0
  128. package/dist/bundle/store-maintenance-command-Q5WMFUZ2.js +54 -0
  129. package/dist/bundle/streaming-UGFFNOXL.js +15 -0
  130. package/dist/bundle/tokens-AF5CPY2F.js +17 -0
  131. package/dist/bundle/zm.js +8 -0
  132. package/dist/contract-overrides.d.ts.map +1 -1
  133. package/dist/contract-overrides.js +18 -16
  134. package/dist/contract-overrides.js.map +1 -1
  135. package/dist/mcp-command.d.ts +3 -2
  136. package/dist/mcp-command.d.ts.map +1 -1
  137. package/dist/mcp-command.js +62 -10
  138. package/dist/mcp-command.js.map +1 -1
  139. package/dist/program-bindings.d.ts.map +1 -1
  140. package/dist/program-bindings.js +1 -0
  141. package/dist/program-bindings.js.map +1 -1
  142. package/dist/version.d.ts +1 -1
  143. package/dist/version.js +1 -1
  144. package/package.json +7 -5
  145. package/skills/zoom-cli/SKILL.md +2 -0
@@ -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-CB5UTASG.js";
6
+ import {
7
+ CliError
8
+ } from "./chunk-AE4BOXH7.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/models.js
14
+ var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
15
+ var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
16
+ var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
17
+ var parakeet = huggingFace("sherpa-onnx-nemo-parakeet-tdt-0.6b-v3-int8", "2bda32ec70b097a55adaa07d9a7173915b43cc78");
18
+ var MODELS = [
19
+ {
20
+ id: "gigaam-v3",
21
+ title: "GigaAM v3, with punctuation",
22
+ languages: "Russian \u2014 the best of the three for Russian",
23
+ featureDim: 64,
24
+ files: [
25
+ {
26
+ name: "encoder.int8.onnx",
27
+ url: gigaam("encoder.int8.onnx"),
28
+ sha256: "369f35a71bf288d3b8e0391fabd8dba5f2314088d440bca474056b7b4b6e66bf",
29
+ bytes: 224570820
30
+ },
31
+ {
32
+ name: "decoder.onnx",
33
+ url: gigaam("decoder.onnx"),
34
+ sha256: "38fc7475443ea2a26f63211ca350f73ac50fff824ab7a3876ee2bd610c53bbc4",
35
+ bytes: 4600132
36
+ },
37
+ {
38
+ name: "joiner.onnx",
39
+ url: gigaam("joiner.onnx"),
40
+ sha256: "602ff7017a93311aad34df1437c8d7f49911353c13d6eae7a6ee7b041339465c",
41
+ bytes: 2712896
42
+ },
43
+ {
44
+ name: "tokens.txt",
45
+ url: gigaam("tokens.txt"),
46
+ sha256: "39abae20e692998290c574e606f11a9edef2902a1995463fcff63d1490cf22b7",
47
+ bytes: 13354
48
+ }
49
+ ],
50
+ config: /* @__PURE__ */ __name((path) => ({
51
+ transducer: { encoder: path("encoder.int8.onnx"), decoder: path("decoder.onnx"), joiner: path("joiner.onnx") },
52
+ tokens: path("tokens.txt"),
53
+ modelType: "nemo_transducer"
54
+ }), "config")
55
+ },
56
+ {
57
+ id: "gigaam-v3-ctc",
58
+ title: "GigaAM v3 CTC, with punctuation \u2014 a little faster",
59
+ languages: "Russian \u2014 a little faster, rougher with capital letters",
60
+ featureDim: 64,
61
+ files: [
62
+ {
63
+ name: "model.int8.onnx",
64
+ url: gigaamCtc("model.int8.onnx"),
65
+ sha256: "d5fea8df94263c285e54b21e5774b707c707192d3bdbeffd7b1eb07fb6743b35",
66
+ bytes: 224893661
67
+ },
68
+ {
69
+ name: "tokens.txt",
70
+ url: gigaamCtc("tokens.txt"),
71
+ sha256: "142de7570b3de5b3035ce111a89c228e80e6085273731d944093ddf24fa539cd",
72
+ bytes: 2007
73
+ }
74
+ ],
75
+ config: /* @__PURE__ */ __name((path) => ({ nemoCtc: { model: path("model.int8.onnx") }, tokens: path("tokens.txt") }), "config")
76
+ },
77
+ {
78
+ id: "parakeet-v3",
79
+ title: "NVIDIA Parakeet TDT 0.6B v3",
80
+ /** The model card's list: huggingface.co/nvidia/parakeet-tdt-0.6b-v3, read 2026-09-24. */
81
+ 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",
82
+ featureDim: 80,
83
+ files: [
84
+ {
85
+ name: "encoder.int8.onnx",
86
+ url: parakeet("encoder.int8.onnx"),
87
+ sha256: "acfc2b4456377e15d04f0243af540b7fe7c992f8d898d751cf134c3a55fd2247",
88
+ bytes: 652184281
89
+ },
90
+ {
91
+ name: "decoder.int8.onnx",
92
+ url: parakeet("decoder.int8.onnx"),
93
+ sha256: "179e50c43d1a9de79c8a24149a2f9bac6eb5981823f2a2ed88d655b24248db4e",
94
+ bytes: 11845275
95
+ },
96
+ {
97
+ name: "joiner.int8.onnx",
98
+ url: parakeet("joiner.int8.onnx"),
99
+ sha256: "3164c13fc2821009440d20fcb5fdc78bff28b4db2f8d0f0b329101719c0948b3",
100
+ bytes: 6355277
101
+ },
102
+ {
103
+ name: "tokens.txt",
104
+ url: parakeet("tokens.txt"),
105
+ sha256: "d58544679ea4bc6ac563d1f545eb7d474bd6cfa467f0a6e2c1dc1c7d37e3c35d",
106
+ bytes: 93939
107
+ }
108
+ ],
109
+ config: /* @__PURE__ */ __name((path) => ({
110
+ transducer: {
111
+ encoder: path("encoder.int8.onnx"),
112
+ decoder: path("decoder.int8.onnx"),
113
+ joiner: path("joiner.int8.onnx")
114
+ },
115
+ tokens: path("tokens.txt"),
116
+ modelType: "nemo_transducer"
117
+ }), "config")
118
+ }
119
+ ];
120
+ var VAD = {
121
+ name: "silero_vad.onnx",
122
+ url: "https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/silero_vad.onnx",
123
+ sha256: "9e2449e1087496d8d4caba907f23e0bd3f78d91fa552479bb9c23ac09cbb1fd6",
124
+ bytes: 643854
125
+ };
126
+ var DEFAULT_ORDER = ["parakeet-v3", "gigaam-v3", "gigaam-v3-ctc"];
127
+ var orderedModels = /* @__PURE__ */ __name((order = DEFAULT_ORDER) => [.../* @__PURE__ */ new Set([...order, ...DEFAULT_ORDER])].map(speechModel), "orderedModels");
128
+ var findModel = /* @__PURE__ */ __name((id) => MODELS.find((model) => model.id === id), "findModel");
129
+ var speechModel = /* @__PURE__ */ __name((id) => {
130
+ const model = findModel(id);
131
+ if (!model) {
132
+ throw new CliError("validation_error", `no speech model "${id}" \u2014 one of ${MODELS.map((known) => known.id).join(", ")}`);
133
+ }
134
+ return model;
135
+ }, "speechModel");
136
+
137
+ // 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
138
+ import { createHash, randomUUID } from "node:crypto";
139
+ import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
140
+ import { rename, rm } from "node:fs/promises";
141
+ import { dirname, join } from "node:path";
142
+ import { Readable, Transform } from "node:stream";
143
+ import { pipeline } from "node:stream/promises";
144
+ var sharedModelsDirectory = /* @__PURE__ */ __name((kind, env = process.env) => join(wirecatDirectory(env), "models", kind), "sharedModelsDirectory");
145
+ var modelsDirectory = /* @__PURE__ */ __name((env = process.env) => sharedModelsDirectory("audio", env), "modelsDirectory");
146
+ var STALL_MS = 6e4;
147
+ var watchdog = /* @__PURE__ */ __name((ms) => {
148
+ const controller = new AbortController();
149
+ let timer = setTimeout(() => controller.abort(), ms);
150
+ return {
151
+ signal: controller.signal,
152
+ poke: /* @__PURE__ */ __name(() => {
153
+ clearTimeout(timer);
154
+ timer = setTimeout(() => controller.abort(), ms);
155
+ }, "poke"),
156
+ stop: /* @__PURE__ */ __name(() => clearTimeout(timer), "stop")
157
+ };
158
+ }, "watchdog");
159
+ var modelPath = /* @__PURE__ */ __name((directory, model) => (name) => join(directory, model.id, name), "modelPath");
160
+ var vadPath = /* @__PURE__ */ __name((directory) => join(directory, VAD.name), "vadPath");
161
+ var placed = /* @__PURE__ */ __name((model, directory) => [
162
+ ...model.files.map((file) => [file, modelPath(directory, model)(file.name)]),
163
+ [VAD, vadPath(directory)]
164
+ ], "placed");
165
+ var isInstalled = /* @__PURE__ */ __name((model, directory) => filesPresent(placed(model, directory)), "isInstalled");
166
+ var filesPresent = /* @__PURE__ */ __name((files) => files.every(([file, path]) => sizeOf(path) === file.bytes), "filesPresent");
167
+ var sizeOf = /* @__PURE__ */ __name((path) => {
168
+ try {
169
+ return statSync(path).size;
170
+ } catch {
171
+ return void 0;
172
+ }
173
+ }, "sizeOf");
174
+ var installedBytes = /* @__PURE__ */ __name((model) => model.files.reduce((sum, file) => sum + file.bytes, 0), "installedBytes");
175
+ var install = /* @__PURE__ */ __name(async (model, directory, { fetch: get = fetch, progress, verifyExisting } = {}) => {
176
+ mkdirSync(join(directory, model.id), { recursive: true, mode: 448 });
177
+ await installFiles(placed(model, directory), { fetch: get, progress, verifyExisting });
178
+ }, "install");
179
+ var installFiles = /* @__PURE__ */ __name(async (files, { fetch: get = fetch, progress, verifyExisting } = {}) => {
180
+ if (verifyExisting)
181
+ for (const [file, path] of files) {
182
+ if (sizeOf(path) !== void 0) {
183
+ const hash = createHash("sha256");
184
+ for await (const chunk of createReadStream(path))
185
+ hash.update(chunk);
186
+ if (hash.digest("hex") !== file.sha256) {
187
+ progress?.(`${path}: not the file this version expects, downloading it again`);
188
+ await rm(path, { force: true });
189
+ }
190
+ }
191
+ }
192
+ for (const [file, path] of files) {
193
+ if (sizeOf(path) === file.bytes)
194
+ continue;
195
+ mkdirSync(dirname(path), { recursive: true, mode: 448 });
196
+ progress?.(`downloading ${file.name} (${megabytes(file.bytes)})`);
197
+ await fetchVerified(file, path, get);
198
+ }
199
+ }, "installFiles");
200
+ var fetchVerified = /* @__PURE__ */ __name(async (file, path, get) => {
201
+ const stalled = watchdog(STALL_MS);
202
+ try {
203
+ await fetchInto(file, path, get, stalled);
204
+ } catch (error) {
205
+ if (stalled.signal.aborted) {
206
+ throw new CliError("timeout", `${file.name} stopped downloading for ${STALL_MS / 1e3} s \u2014 nothing was installed`);
207
+ }
208
+ throw error;
209
+ } finally {
210
+ stalled.stop();
211
+ }
212
+ }, "fetchVerified");
213
+ var fetchInto = /* @__PURE__ */ __name(async (file, path, get, stalled) => {
214
+ const response = await get(file.url, { signal: stalled.signal });
215
+ if (!response.ok || !response.body) {
216
+ await response.body?.cancel();
217
+ throw new CliError("network_error", `${file.name} could not be downloaded: HTTP ${response.status}`);
218
+ }
219
+ const partial = `${path}.${randomUUID()}.part`;
220
+ const hash = createHash("sha256");
221
+ let bytes = 0;
222
+ const hashing = new Transform({
223
+ transform(chunk, _encoding, done) {
224
+ stalled.poke();
225
+ bytes += chunk.length;
226
+ if (bytes > file.bytes) {
227
+ done(new CliError("invalid_response", `${file.name} is larger than this version expects \u2014 nothing was installed`));
228
+ return;
229
+ }
230
+ hash.update(chunk);
231
+ done(null, chunk);
232
+ }
233
+ });
234
+ try {
235
+ await pipeline(Readable.fromWeb(response.body), hashing, createWriteStream(partial, { flags: "wx", mode: 384 }));
236
+ const actual = hash.digest("hex");
237
+ if (actual !== file.sha256) {
238
+ throw new CliError("invalid_response", `${file.name} is not the file this version expects (sha256 ${actual}) \u2014 nothing was installed`);
239
+ }
240
+ await rename(partial, path);
241
+ } finally {
242
+ await rm(partial, { force: true });
243
+ }
244
+ }, "fetchInto");
245
+ var megabytes = /* @__PURE__ */ __name((bytes) => bytes < 1e6 ? "under 1 MB" : `${Math.round(bytes / 1e6)} MB`, "megabytes");
246
+
247
+ export {
248
+ MODELS,
249
+ VAD,
250
+ DEFAULT_ORDER,
251
+ orderedModels,
252
+ findModel,
253
+ speechModel,
254
+ sharedModelsDirectory,
255
+ modelsDirectory,
256
+ modelPath,
257
+ vadPath,
258
+ isInstalled,
259
+ filesPresent,
260
+ installedBytes,
261
+ install,
262
+ installFiles,
263
+ megabytes
264
+ };
@@ -0,0 +1,48 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-AE4BOXH7.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // 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/http/public-url.js
11
+ var EXAMPLE = "--public-url https://<name>.ts.net";
12
+ var publicUrlOf = /* @__PURE__ */ __name((given, { missing, reaches, path = false }) => {
13
+ if (!given)
14
+ throw new CliError("configuration_error", `${missing} needs the tunnel's address: ${EXAMPLE}`);
15
+ let url;
16
+ try {
17
+ url = new URL(given);
18
+ } catch {
19
+ throw new CliError("validation_error", `--public-url is not an address: ${EXAMPLE}`);
20
+ }
21
+ if (url.username || url.password)
22
+ throw new CliError("validation_error", "--public-url must not contain login credentials");
23
+ const local = url.protocol === "http:" && ["localhost", "127.0.0.1"].includes(url.hostname);
24
+ if (url.protocol !== "https:" && !local)
25
+ throw new CliError("validation_error", `--public-url must be https \u2014 ${reaches} through it`);
26
+ if (url.search || url.hash || !path && url.pathname !== "/")
27
+ throw new CliError("validation_error", path ? `--public-url is the tunnel's address, or a path of it, without a query: ${EXAMPLE}/tg` : `--public-url is the tunnel's address only, without a path: ${EXAMPLE}`);
28
+ if (path && !/^(\/[A-Za-z0-9_-][A-Za-z0-9._-]*)*\/?$/.test(url.pathname))
29
+ throw new CliError("validation_error", "--public-url's path takes letters, digits, dot, dash and underscore: /tg");
30
+ if (path)
31
+ url.pathname = url.pathname.replace(/\/+$/, "") || "/";
32
+ return url;
33
+ }, "publicUrlOf");
34
+ var portOf = /* @__PURE__ */ __name((given, fallback) => {
35
+ if (given === void 0)
36
+ return fallback;
37
+ const port = Number(given);
38
+ if (!Number.isInteger(port) || port < 1 || port > 65535)
39
+ throw new CliError("validation_error", "--port takes 1\u201365535");
40
+ return port;
41
+ }, "portOf");
42
+ var mcpUrlOf = /* @__PURE__ */ __name((publicUrl) => new URL(`${publicUrl.pathname.replace(/\/+$/, "")}/mcp`, publicUrl.origin), "mcpUrlOf");
43
+
44
+ export {
45
+ publicUrlOf,
46
+ portOf,
47
+ mcpUrlOf
48
+ };
@@ -0,0 +1,25 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ CliError
5
+ } from "./chunk-AE4BOXH7.js";
6
+ import {
7
+ __name
8
+ } from "./chunk-ZVVMGPBJ.js";
9
+
10
+ // 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/ports/app.js
11
+ var envName = /* @__PURE__ */ __name((app, name) => `${app.envPrefix}_${name}`, "envName");
12
+ var readOnlyLockOf = /* @__PURE__ */ __name((app, env) => {
13
+ const name = envName(app, "READ_ONLY");
14
+ const value = env[name];
15
+ return value === void 0 || value.trim() === "" || value === "0" ? void 0 : name;
16
+ }, "readOnlyLockOf");
17
+ var MESSENGER_CHANGE_REFUSAL = "send, react, change chats or change the account";
18
+ var readOnlyRefusal = /* @__PURE__ */ __name((lock, what) => new CliError("permission_error", `this process is read-only (${lock}) \u2014 it cannot ${what}`), "readOnlyRefusal");
19
+
20
+ export {
21
+ envName,
22
+ readOnlyLockOf,
23
+ MESSENGER_CHANGE_REFUSAL,
24
+ readOnlyRefusal
25
+ };
@@ -0,0 +1,151 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ executableEnvironment,
5
+ executableOnPath,
6
+ require_cross_spawn
7
+ } from "./chunk-LW2G4U6W.js";
8
+ import {
9
+ loadConfigFile,
10
+ number,
11
+ object,
12
+ optional,
13
+ saveConfigFile,
14
+ string
15
+ } from "./chunk-AE4BOXH7.js";
16
+ import {
17
+ __name,
18
+ __toESM
19
+ } from "./chunk-ZVVMGPBJ.js";
20
+
21
+ // node_modules/.pnpm/@wirecat+cli-base@0.65.0_commander@15.0.0_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/update/index.js
22
+ var import_cross_spawn = __toESM(require_cross_spawn(), 1);
23
+ import { existsSync } from "node:fs";
24
+ var installerOf = /* @__PURE__ */ __name((scriptPath) => {
25
+ const path = scriptPath.replaceAll("\\", "/");
26
+ if (path.includes("/_npx/"))
27
+ return "npx";
28
+ if (path.includes("/install/global/node_modules/"))
29
+ return "bun";
30
+ if (/\/\.?pnpm\//.test(path))
31
+ return "pnpm";
32
+ if (path.includes("/node_modules/"))
33
+ return "npm";
34
+ return path.includes("/dist/") ? "checkout" : "unknown";
35
+ }, "installerOf");
36
+ var updateCommand = /* @__PURE__ */ __name((installer, packageName) => {
37
+ const target = `${packageName}@latest`;
38
+ switch (installer) {
39
+ // pnpm 11 installs only versions a day old (minimumReleaseAge 1440); a fix must reach users the day it ships.
40
+ // Only the package's own scope is exempt — every other dependency keeps the wait.
41
+ case "pnpm":
42
+ return ["pnpm", "add", "-g", target, `--config.minimumReleaseAgeExclude=${ownScope(packageName)}`];
43
+ case "npm":
44
+ return ["npm", "install", "-g", target];
45
+ case "bun":
46
+ return ["bun", "add", "-g", target];
47
+ default:
48
+ return void 0;
49
+ }
50
+ }, "updateCommand");
51
+ var ownScope = /* @__PURE__ */ __name((packageName) => packageName.startsWith("@") ? `${packageName.split("/", 1)[0]}/*` : packageName, "ownScope");
52
+ var isNewer = /* @__PURE__ */ __name((candidate, current) => {
53
+ const parse = /* @__PURE__ */ __name((version) => /^\d+\.\d+\.\d+$/.test(version) ? version.split(".").map(Number) : void 0, "parse");
54
+ const a = parse(candidate);
55
+ const b = parse(current);
56
+ if (!a || !b)
57
+ return false;
58
+ for (let i = 0; i < 3; i++) {
59
+ if (a[i] !== b[i])
60
+ return a[i] > b[i];
61
+ }
62
+ return false;
63
+ }, "isNewer");
64
+ var latestVersion = /* @__PURE__ */ __name(async (packageName, fetch, { timeoutMs = 1e3 } = {}) => {
65
+ try {
66
+ const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`, {
67
+ signal: AbortSignal.timeout(timeoutMs),
68
+ headers: { accept: "application/json" }
69
+ });
70
+ if (!response.ok)
71
+ return void 0;
72
+ const { version } = await response.json();
73
+ return typeof version === "string" ? version : void 0;
74
+ } catch {
75
+ return void 0;
76
+ }
77
+ }, "latestVersion");
78
+ var CHECK_EVERY_MS = 24 * 60 * 60 * 1e3;
79
+ var mayNotify = /* @__PURE__ */ __name(({ format, stderrIsTTY, quiet, enabled, installer, env, offVariables = [] }) => enabled && format === "pretty" && stderrIsTTY && !quiet && updateCommand(installer, "any") !== void 0 && !env.CI && !env.NO_UPDATE_NOTIFIER && offVariables.every((name) => !env[name]), "mayNotify");
80
+ var updateState = object({
81
+ checkedAt: number(),
82
+ latest: optional(string()),
83
+ /** When the skill hint (`cli-base/skill`) was last shown — the other daily notice kept in this file. */
84
+ skillHintAt: optional(number())
85
+ });
86
+ var readNoticeState = /* @__PURE__ */ __name((path) => {
87
+ try {
88
+ return loadConfigFile(path, updateState, () => ({ checkedAt: 0 }));
89
+ } catch {
90
+ return { checkedAt: 0 };
91
+ }
92
+ }, "readNoticeState");
93
+ var readUpdateState = /* @__PURE__ */ __name((path) => {
94
+ const state = readNoticeState(path);
95
+ return state.checkedAt > 0 ? state : void 0;
96
+ }, "readUpdateState");
97
+ var writeUpdateState = /* @__PURE__ */ __name((path, state) => {
98
+ try {
99
+ saveConfigFile(path, { ...readNoticeState(path), ...state });
100
+ } catch {
101
+ }
102
+ }, "writeUpdateState");
103
+ var checkIsDue = /* @__PURE__ */ __name((state, now) => state === void 0 || now - state.checkedAt >= CHECK_EVERY_MS, "checkIsDue");
104
+ var spawnPlan = /* @__PURE__ */ __name(([command, ...args], platform = process.platform, env = process.env, exists = existsSync) => ({ file: executableOnPath(command, env, platform, exists), args, shell: false }), "spawnPlan");
105
+ var runUpdate = /* @__PURE__ */ __name((argv) => {
106
+ const { file, args, shell } = spawnPlan(argv);
107
+ const { status, error } = import_cross_spawn.default.sync(file, args, {
108
+ stdio: ["inherit", 2, 2],
109
+ shell,
110
+ env: executableEnvironment(process.env)
111
+ });
112
+ if (error)
113
+ throw new Error(`could not start ${argv[0]}: ${error.message}`);
114
+ return status ?? 1;
115
+ }, "runUpdate");
116
+ var updateNotice = /* @__PURE__ */ __name(async ({ argv, packageName, command, upgradeCommand = "upgrade", version, statePath, fetch, now = Date.now, ...context }) => {
117
+ try {
118
+ const path = commandWords(argv).slice(0, 2);
119
+ if (path.includes("complete") || path.includes(upgradeCommand))
120
+ return void 0;
121
+ if (!mayNotify(context))
122
+ return void 0;
123
+ const at = now();
124
+ let state = readUpdateState(statePath);
125
+ if (checkIsDue(state, at)) {
126
+ const found = await latestVersion(packageName, fetch, { timeoutMs: 1e3 });
127
+ const seen = found ?? state?.latest;
128
+ state = seen ? { checkedAt: at, latest: seen } : { checkedAt: at };
129
+ writeUpdateState(statePath, state);
130
+ }
131
+ return state?.latest && isNewer(state.latest, version) ? `${command} ${state.latest} is out \u2014 you have ${version}. \`${command} ${upgradeCommand}\` installs it.` : void 0;
132
+ } catch {
133
+ return void 0;
134
+ }
135
+ }, "updateNotice");
136
+ var commandWords = /* @__PURE__ */ __name((argv) => {
137
+ const end = argv.indexOf("--");
138
+ return argv.slice(0, end < 0 ? void 0 : end).filter((word) => !word.startsWith("-"));
139
+ }, "commandWords");
140
+
141
+ export {
142
+ installerOf,
143
+ updateCommand,
144
+ isNewer,
145
+ latestVersion,
146
+ CHECK_EVERY_MS,
147
+ readNoticeState,
148
+ writeUpdateState,
149
+ runUpdate,
150
+ updateNotice
151
+ };