@wirecat/mail-cli 0.33.0 → 0.35.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/CHANGELOG.md +39 -0
- package/README.md +4 -1
- package/contracts/wirecat.json +54 -4
- package/dist/bin/mail.js +2 -2
- package/dist/bundle/agent-KWLCQCSC.js +39 -0
- package/dist/bundle/{all-profiles-W3CGXEEJ.js → all-profiles-6BDSMVOO.js} +63 -21
- package/dist/bundle/{anthropic-UMDO5AKP.js → anthropic-C3XUXUCJ.js} +8 -8
- package/dist/bundle/{app-server-4SICQ5RP.js → app-server-GUHDK4OR.js} +82 -64
- package/dist/bundle/{bun-QVVCH4MJ.js → bun-FN7AM4AG.js} +2 -2
- package/dist/bundle/{bun-sqlite-CHD4AIUK.js → bun-sqlite-56IVBF22.js} +6 -6
- package/dist/bundle/{chunk-HFFHL7SV.js → chunk-2B67TUIF.js} +101 -69
- package/dist/bundle/{chunk-OOYIPK4F.js → chunk-2UNQTKRH.js} +1 -1
- package/dist/bundle/{chunk-LXUHYDNE.js → chunk-3ACF6TIV.js} +1 -1
- package/dist/bundle/chunk-3EV2B7KZ.js +726 -0
- package/dist/bundle/chunk-3KAJCOJP.js +109 -0
- package/dist/bundle/{chunk-2BFXHCZW.js → chunk-3WAZKCDF.js} +2 -2
- package/dist/bundle/{chunk-LKGJMM6W.js → chunk-46SBNO67.js} +12 -63
- package/dist/bundle/{chunk-LB5FTCPZ.js → chunk-4IASS7NQ.js} +128 -10
- package/dist/bundle/chunk-4U5ODZO7.js +360 -0
- package/dist/bundle/{chunk-QN423PC6.js → chunk-5WYBI35N.js} +3 -3
- package/dist/bundle/{chunk-GZYICXO4.js → chunk-5XQI7WCJ.js} +1 -1
- package/dist/bundle/{chunk-JUYUWMTG.js → chunk-635AFLZO.js} +4 -4
- package/dist/bundle/{chunk-2P44S7XK.js → chunk-6B4WZVLN.js} +36 -28
- package/dist/bundle/{chunk-47YNANPZ.js → chunk-6Q5THDNW.js} +3 -3
- package/dist/bundle/chunk-6VARUB3J.js +787 -0
- package/dist/bundle/{chunk-BRRHYXUP.js → chunk-7FXZKQAC.js} +87 -76
- package/dist/bundle/{chunk-EW3JFV7J.js → chunk-7JVKQ6NM.js} +4 -4
- package/dist/bundle/{chunk-OWAJN74H.js → chunk-7KMI47AP.js} +106 -257
- package/dist/bundle/{chunk-BF73DBAA.js → chunk-7PXAUMK5.js} +30 -15
- package/dist/bundle/{chunk-UX76GMQM.js → chunk-7YMLEWTX.js} +43 -64
- package/dist/bundle/{chunk-2L6D54BR.js → chunk-AISQNKT7.js} +8 -8
- package/dist/bundle/chunk-AV2ZJ4WX.js +7 -0
- package/dist/bundle/{chunk-OFMYFFEF.js → chunk-AXKIXVQA.js} +991 -1609
- package/dist/bundle/{chunk-UAV74EY4.js → chunk-CDGVYQXG.js} +1 -1
- package/dist/bundle/{chunk-RXUVXAMM.js → chunk-CFQQTDSA.js} +1 -1
- package/dist/bundle/chunk-CMGZXBJW.js +259 -0
- package/dist/bundle/{chunk-H46MANPR.js → chunk-DD2P67NP.js} +3 -3
- package/dist/bundle/{chunk-IBIFX2LK.js → chunk-DFHUJTP5.js} +2 -2
- package/dist/bundle/{chunk-DI74RP6R.js → chunk-DREU6TN6.js} +31 -85
- package/dist/bundle/{chunk-XQXYAOBV.js → chunk-DZHEVVXA.js} +53 -33
- package/dist/bundle/{chunk-LFBD6RTX.js → chunk-E6HSSKRX.js} +4 -4
- package/dist/bundle/{chunk-UYZDH5LK.js → chunk-EHAXFDDP.js} +1 -1
- package/dist/bundle/chunk-EU4J6GCJ.js +52 -0
- package/dist/bundle/{chunk-CHNNKHLL.js → chunk-EX4Z7CCO.js} +4051 -2788
- package/dist/bundle/chunk-G662S2M4.js +559 -0
- package/dist/bundle/{chunk-XN5KH24X.js → chunk-GG634DR3.js} +5 -5
- package/dist/bundle/{chunk-FSMCXQH2.js → chunk-GU3PYIV2.js} +2 -2
- package/dist/bundle/{chunk-SW7YGW3T.js → chunk-HF5QWKK2.js} +18 -8
- package/dist/bundle/chunk-HJDIMVFW.js +108 -0
- package/dist/bundle/chunk-HKWZG7CZ.js +334 -0
- package/dist/bundle/{chunk-BI5P7JWM.js → chunk-HM6AMYHR.js} +2 -2
- package/dist/bundle/{chunk-35AH33VJ.js → chunk-HVXOA4FO.js} +1 -1
- package/dist/bundle/{chunk-LXAX6AZU.js → chunk-I3QZCQJT.js} +6 -6
- package/dist/bundle/{chunk-I3UAD4EI.js → chunk-ILEKGH44.js} +68 -59
- package/dist/bundle/{chunk-SDWYOYGN.js → chunk-J5ULUTWE.js} +4 -4
- package/dist/bundle/{chunk-TK77DCE5.js → chunk-L4RCWRWS.js} +1 -1
- package/dist/bundle/chunk-MCJYJIH5.js +192 -0
- package/dist/bundle/{chunk-S6CHYNFE.js → chunk-NEDS4ORI.js} +2 -2
- package/dist/bundle/{chunk-QO7BK4WD.js → chunk-ODQCRZX5.js} +35 -12
- package/dist/bundle/chunk-OO4OKMNB.js +80 -0
- package/dist/bundle/{chunk-JCQ47WR4.js → chunk-OOQFBRNR.js} +144 -10
- package/dist/bundle/{chunk-LACMDMDI.js → chunk-OTP2HJ67.js} +9 -9
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-AEKWEYIG.js → chunk-PQDQCCGG.js} +19 -19
- package/dist/bundle/{chunk-BZY5W35X.js → chunk-Q5U2HIBJ.js} +7 -7
- package/dist/bundle/{chunk-74BYHR44.js → chunk-QFMKCU42.js} +3738 -3415
- package/dist/bundle/{chunk-SYUIAMVA.js → chunk-QYCMB7JY.js} +373 -533
- package/dist/bundle/{chunk-KLLT572M.js → chunk-RBV2AM52.js} +2 -100
- package/dist/bundle/{chunk-6VCQ4CTK.js → chunk-RJNKM3CQ.js} +1 -1
- package/dist/bundle/{chunk-6IS4BEN4.js → chunk-RQHWSNX4.js} +4 -4
- package/dist/bundle/chunk-RQJGX7F7.js +170 -0
- package/dist/bundle/{chunk-RENCSP47.js → chunk-TARNPINT.js} +3 -3
- package/dist/bundle/chunk-TP2BCK2Z.js +721 -0
- package/dist/bundle/{chunk-MJ7DUSHT.js → chunk-TP766H4O.js} +18 -14
- package/dist/bundle/{chunk-2X344EUT.js → chunk-UHGKN5US.js} +8 -8
- package/dist/bundle/{chunk-L3MKFI3Y.js → chunk-UWDRU3R6.js} +2 -2
- package/dist/bundle/chunk-V4O47JV6.js +72 -0
- package/dist/bundle/{chunk-CIG4UVP6.js → chunk-W4JYGMTU.js} +14 -13
- package/dist/bundle/{chunk-JADBHKBP.js → chunk-W7ICCFG5.js} +1 -1
- package/dist/bundle/{chunk-MNJ3BMPZ.js → chunk-WDEVKKAD.js} +3 -3
- package/dist/bundle/{chunk-TBZLGT7R.js → chunk-WZKM5I7B.js} +23 -119
- package/dist/bundle/{chunk-MT7T5N2N.js → chunk-XKKYRMGG.js} +4 -4
- package/dist/bundle/chunk-XQNKAM26.js +338 -0
- package/dist/bundle/{chunk-UWF3SSRL.js → chunk-YA44BG3N.js} +58 -9
- package/dist/bundle/{chunk-Y2P2LC5R.js → chunk-YCIWSKOH.js} +9 -9
- package/dist/bundle/{chunk-7OYZU5SP.js → chunk-YQTRKNZQ.js} +4 -4
- package/dist/bundle/chunk-YRAJFTFU.js +353 -0
- package/dist/bundle/chunk-YTI533XF.js +29 -0
- package/dist/bundle/{chunk-UG2QDGAH.js → chunk-ZMYRPMAJ.js} +1 -1
- package/dist/bundle/{chunk-CZ6ZXDSO.js → chunk-ZX7HZDD6.js} +182 -562
- package/dist/bundle/{chunk-IPSLQX64.js → chunk-ZYEU35MB.js} +2 -2
- package/dist/bundle/command-contract-D5UXWHMS.js +39 -0
- package/dist/bundle/{command-server-entry-G2ZHCN5J.js → command-server-entry-TPJ47FYS.js} +28 -25
- package/dist/bundle/decode-XHUASXQK.js +296 -0
- package/dist/bundle/{dispatch-RHIK22OA.js → dispatch-MQZHGGVP.js} +8 -8
- package/dist/bundle/{dist-X5G2IMYG.js → dist-BAE4IQ52.js} +34 -29
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-UZJ6AREV.js → echarts-U7Z2PKIG.js} +2 -2
- package/dist/bundle/{embed-FEXLUH3T.js → embed-W7GPB6EI.js} +6 -6
- package/dist/bundle/{embedder-NHQARKFJ.js → embedder-T72XLFQ5.js} +9 -9
- package/dist/bundle/{failure-7DIA4OET.js → failure-MP6VKL5Y.js} +2 -2
- package/dist/bundle/{first-run-PS5NR2QG.js → first-run-C44TJXRI.js} +12 -12
- package/dist/bundle/first-screen-IESI7DAU.js +39 -0
- package/dist/bundle/{instructions-SDDUBGH4.js → instructions-WGMWQNPP.js} +1 -1
- package/dist/bundle/mail.js +12 -12
- package/dist/bundle/{mcp-GN4FTJX5.js → mcp-YGOAUNC3.js} +2 -2
- package/dist/bundle/meeting-combined-XGZBSWIQ.js +24 -0
- package/dist/bundle/meeting-model-QVHLD4WI.js +24 -0
- package/dist/bundle/meeting-semantic-QKQHUHXX.js +21 -0
- package/dist/bundle/{node-ELCNUOCE.js → node-WANDMJJQ.js} +2 -2
- package/dist/bundle/{node-sqlite-2E5MKZMH.js → node-sqlite-NM5XA4DR.js} +7 -7
- package/dist/bundle/{oauth-JGPEIY3M.js → oauth-6E63ELEE.js} +8 -8
- package/dist/bundle/{open-6DEMCZAB.js → open-5542RTLE.js} +5 -5
- package/dist/bundle/{openai-IVKDU5AH.js → openai-NOYNPFB5.js} +28 -26
- package/dist/bundle/{process-67DAKAAQ.js → process-7AEXXSBX.js} +1 -1
- package/dist/bundle/{program-ESJDQMAJ.js → program-VMA5CGNR.js} +5712 -3640
- package/dist/bundle/{prompt-ZBWOT5KG.js → prompt-WYYO4AJL.js} +5 -5
- package/dist/bundle/{recognize-UUBH2DOH.js → recognize-UGCCOMAS.js} +4 -4
- package/dist/bundle/{remote-UYTNWNOB.js → remote-VZS6BNQB.js} +9 -9
- package/dist/bundle/{rerank-X2633CQN.js → rerank-O46D5GJ2.js} +7 -7
- package/dist/bundle/{serve-CP7Q4OVW.js → serve-QAAF2LCW.js} +10 -10
- package/dist/bundle/server-456MYK3X.js +84 -0
- package/dist/bundle/{server-I7MXRSAG.js → server-Q3PUZLLX.js} +77 -58
- package/dist/bundle/{sqlite-runtime-BX55LI5G.js → sqlite-runtime-EQBCDO2U.js} +6 -6
- package/dist/bundle/{state-LLNJQXFH.js → state-XIOHYXCR.js} +6 -6
- package/dist/bundle/{store-N27XI3VV.js → store-OXJZZUR7.js} +34 -17
- package/dist/bundle/{store-K4KU5N75.js → store-VJBL5XKR.js} +30 -20
- package/dist/bundle/store-maintenance-command-D7XYIX52.js +71 -0
- package/dist/bundle/surface-N7LK7PKN.js +70 -0
- package/dist/commands/read.d.ts +2 -2
- package/dist/commands/read.d.ts.map +1 -1
- package/dist/commands/read.js +5 -4
- package/dist/commands/read.js.map +1 -1
- package/dist/commands/sync.d.ts +2 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +16 -9
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +6 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +16 -1
- package/dist/config.js.map +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +2 -2
- package/dist/identity.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-BDCC2J2Z.js +0 -2
- package/dist/bundle/command-contract-NRNQAFFE.js +0 -36
- package/dist/bundle/decode-U6V6D6XH.js +0 -162
- package/dist/bundle/first-screen-C2WTLOG2.js +0 -34
- package/dist/bundle/server-QGTMJ7SF.js +0 -67
- package/dist/bundle/store-maintenance-command-VPAFQCNA.js +0 -58
|
@@ -3,43 +3,44 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
toModelRate
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-XKKYRMGG.js";
|
|
7
|
+
import "./chunk-7PXAUMK5.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENAI_URL,
|
|
10
10
|
refuseModelAddress
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OTP2HJ67.js";
|
|
12
12
|
import {
|
|
13
13
|
endpointFetch,
|
|
14
|
+
onThisComputer,
|
|
14
15
|
providerWaitMs
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-OOQFBRNR.js";
|
|
17
|
+
import "./chunk-Q5U2HIBJ.js";
|
|
18
|
+
import "./chunk-7YMLEWTX.js";
|
|
18
19
|
import {
|
|
19
20
|
OPENAI_TRANSCRIBE_MODEL,
|
|
20
21
|
VAD,
|
|
21
22
|
filesPresent,
|
|
22
23
|
modelsDirectory,
|
|
23
24
|
vadPath
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-635AFLZO.js";
|
|
26
|
+
import "./chunk-ZYEU35MB.js";
|
|
26
27
|
import {
|
|
27
28
|
DEFAULT_RETRY,
|
|
28
29
|
backoffMs
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
30
|
+
} from "./chunk-7FXZKQAC.js";
|
|
31
|
+
import "./chunk-YA44BG3N.js";
|
|
31
32
|
import "./chunk-Y5E2WNWB.js";
|
|
32
33
|
import {
|
|
33
34
|
CliError
|
|
34
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HM6AMYHR.js";
|
|
35
36
|
import {
|
|
36
37
|
__name
|
|
37
38
|
} from "./chunk-ZVVMGPBJ.js";
|
|
38
39
|
|
|
39
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
40
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
40
41
|
import { setTimeout as wait } from "node:timers/promises";
|
|
41
42
|
|
|
42
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
43
44
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
44
45
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
45
46
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -60,7 +61,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
60
61
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
61
62
|
}, "encodeWav");
|
|
62
63
|
|
|
63
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
64
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
64
65
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
65
66
|
var JOINED_SECONDS = 0.2;
|
|
66
67
|
var PAD_SECONDS = 0.2;
|
|
@@ -115,27 +116,28 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
115
116
|
const retry = options.retry ?? RETRY;
|
|
116
117
|
const sleep = options.sleep ?? sleeping;
|
|
117
118
|
const random = options.random ?? Math.random;
|
|
119
|
+
const who = options.label ?? "OpenAI";
|
|
118
120
|
for (let attempt = 1; ; attempt++) {
|
|
119
121
|
interrupted(options.signal);
|
|
120
122
|
let response;
|
|
121
123
|
try {
|
|
122
124
|
response = await post(url, {
|
|
123
125
|
method: "POST",
|
|
124
|
-
headers: { authorization: `Bearer ${options.apiKey}` },
|
|
126
|
+
headers: options.apiKey ? { authorization: `Bearer ${options.apiKey}` } : {},
|
|
125
127
|
body: formOf(wav, options),
|
|
126
128
|
...options.signal ? { signal: options.signal } : {}
|
|
127
129
|
});
|
|
128
130
|
} catch {
|
|
129
131
|
interrupted(options.signal);
|
|
130
132
|
if (attempt > retry.retries)
|
|
131
|
-
throw new CliError("network_error",
|
|
133
|
+
throw new CliError("network_error", `${who} could not be reached`, { reason: "network.failed" });
|
|
132
134
|
await sleep(backoffMs(attempt, retry, random), options.signal);
|
|
133
135
|
continue;
|
|
134
136
|
}
|
|
135
137
|
if (response.ok) {
|
|
136
138
|
const body = await response.json().catch(() => interrupted(options.signal));
|
|
137
139
|
if (typeof body?.text !== "string")
|
|
138
|
-
throw new CliError("invalid_response",
|
|
140
|
+
throw new CliError("invalid_response", `${who} answered without a transcript`, {
|
|
139
141
|
reason: "provider.invalid-response"
|
|
140
142
|
});
|
|
141
143
|
return body.text.trim();
|
|
@@ -144,15 +146,15 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
144
146
|
const status = response.status;
|
|
145
147
|
const said = `HTTP ${status}${code ? `, ${code}` : type ? `, ${type}` : ""}`;
|
|
146
148
|
if (status === 401)
|
|
147
|
-
throw new CliError("authentication_error",
|
|
149
|
+
throw new CliError("authentication_error", `${who} refused the key (${said}) \u2014 set it again with \`${options.keyHint ?? "models keys set openai"}\``, { reason: "auth.failed" });
|
|
148
150
|
if (status === 403)
|
|
149
|
-
throw new CliError("permission_error",
|
|
151
|
+
throw new CliError("permission_error", `${who} refused the request (${said}) \u2014 OpenAI answers this when the country or region is not supported, or the key's project may not use the model`, { reason: "access.denied" });
|
|
150
152
|
if (status === 413)
|
|
151
|
-
throw new CliError("validation_error",
|
|
153
|
+
throw new CliError("validation_error", `${who} refused the audio as too large (${said})`, {
|
|
152
154
|
reason: "transcription.too-large"
|
|
153
155
|
});
|
|
154
156
|
if (EXHAUSTED.has(code ?? "") || EXHAUSTED.has(type ?? ""))
|
|
155
|
-
throw new CliError("permission_error",
|
|
157
|
+
throw new CliError("permission_error", `${who} refused: the account's credit, spend limit or usage limit is used up (${said}) \u2014 see the billing page`, { reason: "transcription.quota-exhausted" });
|
|
156
158
|
const again = status === 408 || status === 429 || status >= 500;
|
|
157
159
|
const asked = providerWaitMs(response.headers, () => /* @__PURE__ */ new Date());
|
|
158
160
|
if (again && attempt <= retry.retries && (asked === void 0 || asked <= retry.maxRetryAfterMs)) {
|
|
@@ -160,13 +162,13 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
160
162
|
continue;
|
|
161
163
|
}
|
|
162
164
|
if (status === 429)
|
|
163
|
-
throw new CliError("rate_limited",
|
|
165
|
+
throw new CliError("rate_limited", `${who} answered ${said}`, {
|
|
164
166
|
reason: "provider.rate-limited",
|
|
165
167
|
...asked === void 0 ? {} : { retry_after_ms: asked }
|
|
166
168
|
});
|
|
167
169
|
if (status >= 500)
|
|
168
|
-
throw new CliError([502, 503, 504].includes(status) ? "provider_unavailable" : "provider_error",
|
|
169
|
-
throw new CliError("provider_error",
|
|
170
|
+
throw new CliError([502, 503, 504].includes(status) ? "provider_unavailable" : "provider_error", `${who} answered ${said}`, { reason: [502, 503, 504].includes(status) ? "provider.unavailable" : "provider.refused" });
|
|
171
|
+
throw new CliError("provider_error", `${who} answered ${said}`, { reason: "provider.refused" });
|
|
170
172
|
}
|
|
171
173
|
}, "send");
|
|
172
174
|
var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
@@ -183,7 +185,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
183
185
|
return pieces;
|
|
184
186
|
}, "piecesOf");
|
|
185
187
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
186
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
188
|
+
const { openSpeechCutter } = await import("./recognize-UGCCOMAS.js");
|
|
187
189
|
return openSpeechCutter(vadModel);
|
|
188
190
|
}, "openCutter");
|
|
189
191
|
var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
@@ -193,7 +195,7 @@ var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
|
193
195
|
}, "checkKeywords");
|
|
194
196
|
var transcribeOpenAI = /* @__PURE__ */ __name(async (audio, options) => {
|
|
195
197
|
refuseModelAddress(options.env ?? process.env, options.baseUrl ?? OPENAI_URL, "audio");
|
|
196
|
-
if (!options.apiKey)
|
|
198
|
+
if (!options.apiKey && !onThisComputer(options.baseUrl ?? OPENAI_URL))
|
|
197
199
|
throw new CliError("authentication_error", "no OpenAI key \u2014 `models keys set openai`, or OPENAI_API_KEY", {
|
|
198
200
|
reason: "transcription.no-key"
|
|
199
201
|
});
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
__name
|
|
6
6
|
} from "./chunk-ZVVMGPBJ.js";
|
|
7
7
|
|
|
8
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
8
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.709.0_@wirecat+cli-base@0.124.0_commander@15.0.0_esbuild@0.28.2_typ_d98198650466e0f5373009c2596db072/node_modules/@wirecat/cli-core/dist/embeddings/process.js
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { createInterface } from "node:readline";
|
|
11
11
|
import { fileURLToPath } from "node:url";
|