@wirecat/zoom-cli 0.71.0 → 0.73.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/contracts/wirecat.json +1478 -0
- package/dist/account-removal.d.ts.map +1 -1
- package/dist/account-removal.js +0 -2
- package/dist/account-removal.js.map +1 -1
- package/dist/answers.d.ts +57 -3
- package/dist/answers.d.ts.map +1 -1
- package/dist/answers.js +0 -3
- package/dist/answers.js.map +1 -1
- package/dist/bin/main.js +13 -5
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/zm.js +2 -2
- package/dist/bundle/{all-profiles-O4YNVPZX.js → all-profiles-V47CUJFK.js} +12 -12
- package/dist/bundle/answer-policy-W6H72X2R.js +112 -0
- package/dist/bundle/{anthropic-7GGRX3RX.js → anthropic-SID7Z3QN.js} +19 -12
- package/dist/bundle/{app-server-CPMKM3HI.js → app-server-KCMUSY4A.js} +75 -57
- package/dist/bundle/{bun-POHZKEPV.js → bun-PWMM6L45.js} +2 -2
- package/dist/bundle/{bun-sqlite-PGYMBPEL.js → bun-sqlite-3TLKUN5A.js} +10 -6
- package/dist/bundle/{chunk-Q3XLZIY3.js → chunk-2BAZRRJP.js} +29 -23
- package/dist/bundle/{chunk-OWEBWDHV.js → chunk-2NQPB6MT.js} +103 -9
- package/dist/bundle/chunk-2PYZTRRC.js +84 -0
- package/dist/bundle/chunk-2VYEGKQ3.js +13 -0
- package/dist/bundle/{chunk-I4DFFR7F.js → chunk-35CYSRGJ.js} +14 -5
- package/dist/bundle/{chunk-GGS6D4W4.js → chunk-3ADFJ3UP.js} +3 -3
- package/dist/bundle/{chunk-EOSVN2ER.js → chunk-3HTJBGNP.js} +242 -242
- package/dist/bundle/{chunk-2KESWII5.js → chunk-44YVZIA4.js} +3 -3
- package/dist/bundle/{chunk-GXF5HFFP.js → chunk-4LFFDUUW.js} +4 -4
- package/dist/bundle/{chunk-WOIHSQAL.js → chunk-4RJL32PF.js} +49 -10
- package/dist/bundle/{chunk-7ROXXRGG.js → chunk-6AO2RSYH.js} +7031 -5279
- package/dist/bundle/{chunk-DIQLXAAZ.js → chunk-6NI4FE5G.js} +6 -8
- package/dist/bundle/{chunk-X277FBTF.js → chunk-6WUTUCKH.js} +3 -3
- package/dist/bundle/{chunk-77TCCHMP.js → chunk-AIEMFRBU.js} +1 -1
- package/dist/bundle/{chunk-MRI6QMZ3.js → chunk-CIUJEQH4.js} +27 -19
- package/dist/bundle/{chunk-CRFOGYDG.js → chunk-CMWFYZ45.js} +2 -2
- package/dist/bundle/{chunk-LE7MDAQG.js → chunk-CQBLPBZU.js} +2 -2
- package/dist/bundle/{chunk-RQG5VOGH.js → chunk-DPSTOVKC.js} +185 -34
- package/dist/bundle/{chunk-4QUFFB2U.js → chunk-DYLYH7VE.js} +4 -4
- package/dist/bundle/{chunk-FEM2JQN2.js → chunk-EA2OB75T.js} +1 -1
- package/dist/bundle/chunk-ERQRY6WZ.js +54 -0
- package/dist/bundle/{chunk-P3XC6EDU.js → chunk-ETQNHS3A.js} +10 -129
- package/dist/bundle/{chunk-IAV5BG3I.js → chunk-EXWZCI5G.js} +1 -1
- package/dist/bundle/{chunk-VW6BF6M7.js → chunk-FIVFP53N.js} +1 -1
- package/dist/bundle/{chunk-DSVZEXYJ.js → chunk-FJMRDRPN.js} +3573 -3347
- package/dist/bundle/{chunk-7QC4M4HS.js → chunk-FT7X74RT.js} +4 -4
- package/dist/bundle/{chunk-ADLS6FVG.js → chunk-FXBHOCJK.js} +1 -1
- package/dist/bundle/{chunk-ZBFL5JPT.js → chunk-FZLJ2G7A.js} +22 -120
- package/dist/bundle/{chunk-GL3MYFMX.js → chunk-G2TSDMTA.js} +5 -5
- package/dist/bundle/{chunk-2FV5JUQU.js → chunk-G3SIY4MQ.js} +47 -40
- package/dist/bundle/{chunk-2U27KIKU.js → chunk-GCZMYDKU.js} +6 -6
- package/dist/bundle/{chunk-CKPCVEXU.js → chunk-HAMDPWEZ.js} +6 -6
- package/dist/bundle/{chunk-OE7EIP5L.js → chunk-HCZYJMBP.js} +1 -1
- package/dist/bundle/{chunk-OORMSM6O.js → chunk-HNWDEDMU.js} +61 -30
- package/dist/bundle/{chunk-FSHCAWZS.js → chunk-HO3GBTIT.js} +13464 -10422
- package/dist/bundle/chunk-IE7YBRUO.js +25 -0
- package/dist/bundle/{chunk-RGJ7OWHU.js → chunk-IJCUAKR5.js} +61 -21
- package/dist/bundle/{chunk-ULDXZ6LH.js → chunk-IKNOTHG2.js} +116 -70
- package/dist/bundle/{chunk-633QXP57.js → chunk-ILDGZBZD.js} +14 -9
- package/dist/bundle/{chunk-CFQF6IGY.js → chunk-JIS34MLC.js} +69 -6
- package/dist/bundle/{chunk-DHWBSXG3.js → chunk-JQF4LM3V.js} +415 -66
- package/dist/bundle/{chunk-4LAQDZXU.js → chunk-K5JFX5TK.js} +953 -210
- package/dist/bundle/{chunk-5LJTU4LY.js → chunk-K7EMVFJ7.js} +115 -113
- package/dist/bundle/chunk-KHBZ4OEP.js +16 -0
- package/dist/bundle/chunk-KK2IVZUQ.js +185 -0
- package/dist/bundle/{chunk-SELXER2Q.js → chunk-KQD4ZVNC.js} +7 -7
- package/dist/bundle/{chunk-VJXHIUFP.js → chunk-KSNJK4QM.js} +13 -13
- package/dist/bundle/{chunk-X4GWR6GO.js → chunk-KUL7S5Y3.js} +376 -10
- package/dist/bundle/{chunk-M76MXMLY.js → chunk-L6YSKCC3.js} +1 -1
- package/dist/bundle/chunk-LQYMN36C.js +73 -0
- package/dist/bundle/{chunk-USQ23X5V.js → chunk-LSVQCI6V.js} +751 -735
- package/dist/bundle/{chunk-DRBQDCDU.js → chunk-LVDTSCIN.js} +39 -122
- package/dist/bundle/{chunk-P3ASN72F.js → chunk-M4OP5ASJ.js} +1 -1
- package/dist/bundle/chunk-MAE5UGRQ.js +301 -0
- package/dist/bundle/{chunk-CT4WVR4N.js → chunk-MG2CCAVG.js} +3 -3
- package/dist/bundle/chunk-MOKEB656.js +71 -0
- package/dist/bundle/{chunk-BGTEVIW4.js → chunk-N3SOTKXC.js} +6 -6
- package/dist/bundle/{chunk-VRH7VRTK.js → chunk-NBA2V6LB.js} +10 -15
- package/dist/bundle/{chunk-5J4AMBMM.js → chunk-OFA22L4G.js} +4 -4
- package/dist/bundle/chunk-OKOJEBHK.js +106 -0
- package/dist/bundle/{chunk-Q5PI72CR.js → chunk-OMLVWOEF.js} +7 -2
- package/dist/bundle/{chunk-DK6ICIGL.js → chunk-OU5OXA6Q.js} +2150 -1312
- package/dist/bundle/{chunk-QVSLSWAL.js → chunk-P4FU6R3Z.js} +27 -152
- package/dist/bundle/{chunk-YPO2U2YB.js → chunk-PACLT6IW.js} +363 -115
- package/dist/bundle/{chunk-BBTQIVFP.js → chunk-PGPHEC2X.js} +2 -2
- package/dist/bundle/chunk-PJ3FKBXG.js +18 -0
- package/dist/bundle/{chunk-X3ZDN3U7.js → chunk-PKON63JH.js} +2 -2
- package/dist/bundle/{chunk-Q2SUFGSH.js → chunk-Q43KX56Z.js} +2 -2
- package/dist/bundle/{chunk-XI3VIQKW.js → chunk-QS6DWXDB.js} +569 -537
- package/dist/bundle/{chunk-INVTDIF6.js → chunk-QVJMFZFW.js} +1 -1
- package/dist/bundle/{chunk-QTHIU7CO.js → chunk-QWGEOQHA.js} +3 -2
- package/dist/bundle/{chunk-N2FNMION.js → chunk-R5FTCNLJ.js} +1 -1
- package/dist/bundle/{chunk-MW4EGDDV.js → chunk-SO52EJ2W.js} +2 -2
- package/dist/bundle/{chunk-HB6XJQ3Y.js → chunk-SYIOT45G.js} +5 -5
- package/dist/bundle/{chunk-4QPQ7MDA.js → chunk-TI2OANJZ.js} +1 -1
- package/dist/bundle/{chunk-ALIT5QFT.js → chunk-UIKVP23D.js} +1 -1
- package/dist/bundle/{chunk-OHWMIUCT.js → chunk-USIMMGWS.js} +244 -245
- package/dist/bundle/{chunk-MEED7YFG.js → chunk-UYBLNGZ2.js} +8 -2
- package/dist/bundle/{chunk-IED3NS7G.js → chunk-V5Q2QKYM.js} +29 -36
- package/dist/bundle/{chunk-54YDWBYG.js → chunk-VJVYGTPM.js} +15 -2
- package/dist/bundle/{chunk-5K7OGPGA.js → chunk-VPPNYUQM.js} +8 -8
- package/dist/bundle/{chunk-ZBKWRYRS.js → chunk-X2FILY5F.js} +3 -3
- package/dist/bundle/{chunk-2RUAMDVV.js → chunk-XLY7V2LB.js} +14 -14
- package/dist/bundle/chunk-XWBPP2HX.js +2 -0
- package/dist/bundle/{chunk-ZVI6TFQR.js → chunk-Y3IH7EZC.js} +17 -17
- package/dist/bundle/{chunk-YD2RYVMK.js → chunk-Z5XCU4S7.js} +46 -40
- package/dist/bundle/{chunk-RN4EHCC5.js → chunk-ZAIE3G5I.js} +3 -3
- package/dist/bundle/{chunk-2U6SER67.js → chunk-ZMHZ6CQS.js} +2 -2
- package/dist/bundle/{chunk-64ZHF6PJ.js → chunk-ZVQDOKDY.js} +3 -1
- package/dist/bundle/{chunk-TM4JSVGQ.js → chunk-ZX4QWTMQ.js} +42 -43
- package/dist/bundle/{cli-KHMEUXNG.js → cli-4ZYJ6OZE.js} +158 -88
- package/dist/bundle/command-contract-FJDDCHYP.js +43 -0
- package/dist/bundle/command-server-entry-CASONRIJ.js +173 -0
- package/dist/bundle/config-4DZHX2WX.js +99 -0
- package/dist/bundle/{decode-7RP4HSVE.js → decode-KEFCVGEB.js} +6 -6
- package/dist/bundle/{dispatch-IZCAK47P.js → dispatch-EU67WGME.js} +11 -11
- package/dist/bundle/{dist-BFT2SUBV.js → dist-GCQ7KCKN.js} +55 -30
- package/dist/bundle/{echarts-T2BSQ2YV.js → echarts-SDZA2SWG.js} +2 -2
- package/dist/bundle/{embed-BAS6YPDT.js → embed-43VJEPM6.js} +7 -7
- package/dist/bundle/{embedder-5XD5FCAO.js → embedder-Q4ZHAGRP.js} +10 -10
- package/dist/bundle/{failure-R2OIHCE5.js → failure-CTJLEB2R.js} +3 -3
- package/dist/bundle/first-run-CPOLQVNA.js +29 -0
- package/dist/bundle/first-screen-XYESRGWW.js +41 -0
- package/dist/bundle/folders-MSBTAPAG.js +24 -0
- package/dist/bundle/{instructions-XZPROPKY.js → instructions-7T6JJIFS.js} +1 -1
- package/dist/bundle/{main-TZXKGL3L.js → main-NA3QVPXS.js} +39 -25
- package/dist/bundle/{mcp-M4QN2E7R.js → mcp-TDKGDB4V.js} +2 -2
- package/dist/bundle/{meetings-JB2ISPND.js → meetings-7CVIQJTA.js} +9 -7
- package/dist/bundle/{node-A3B3MJWX.js → node-BZDMUFTW.js} +2 -2
- package/dist/bundle/{node-P4E63KXA.js → node-KM3CUABH.js} +9 -9
- package/dist/bundle/{node-sqlite-QVWDLGDX.js → node-sqlite-QHGB23B4.js} +11 -7
- package/dist/bundle/{oauth-YA6IYV4O.js → oauth-BMEMCM2I.js} +8 -8
- package/dist/bundle/{open-SY7TXJBS.js → open-JGU2NRJP.js} +6 -6
- package/dist/bundle/openai-VTXXFNCS.js +28 -0
- package/dist/bundle/{output-file-YGQYZCBJ.js → output-file-VDOCYH2G.js} +6 -6
- package/dist/bundle/{process-6HNBTJIY.js → process-756VBE7E.js} +1 -1
- package/dist/bundle/{program-77BUCJ4H.js → program-XM6CDIJ2.js} +134 -129
- package/dist/bundle/{prompt-YDG73YDS.js → prompt-2IPFXJ4B.js} +6 -6
- package/dist/bundle/{recognize-ECXDGTB7.js → recognize-672E2RIB.js} +5 -5
- package/dist/bundle/{remote-K4JHGBVJ.js → remote-YLHRVPDS.js} +11 -8
- package/dist/bundle/{rerank-IU2YYD4T.js → rerank-NBXQG3OS.js} +8 -8
- package/dist/bundle/run-log-3WITBT2F.js +126 -0
- package/dist/bundle/{serve-3XWIF3HI.js → serve-FNLOUMYP.js} +10 -10
- package/dist/bundle/{server-56VYOHWP.js → server-7ZB5AK5H.js} +53 -47
- package/dist/bundle/server-GGRGD4SH.js +77 -0
- package/dist/bundle/{services-X7IPEGQ5.js → services-Z4UWN64R.js} +56 -37
- package/dist/bundle/{speech-E2OBQWYA.js → speech-XSYVCKR3.js} +17 -14
- package/dist/bundle/sqlite-runtime-GAPXJNWU.js +20 -0
- package/dist/bundle/{state-4GMJYK4H.js → state-QSA53EF5.js} +7 -7
- package/dist/bundle/{store-LA4TV4DM.js → store-EKI4OAJH.js} +22 -19
- package/dist/bundle/{store-KPI7GB5Y.js → store-NOF5EYUC.js} +38 -21
- package/dist/bundle/store-connection-2OZQGEIO.js +92 -0
- package/dist/bundle/store-maintenance-command-GNX3SOZ6.js +67 -0
- package/dist/bundle/{streaming-EJ3NM2C2.js → streaming-PQEXKTE5.js} +7 -7
- package/dist/bundle/tokens-WJQYQ3FK.js +24 -0
- package/dist/bundle/zm.js +34 -10
- package/dist/bundle/{zoom-app-QEJBTIJ4.js → zoom-app-Y7RMWLVU.js} +9 -8
- package/dist/folders.d.ts +12 -2
- package/dist/folders.d.ts.map +1 -1
- package/dist/folders.js +81 -3
- package/dist/folders.js.map +1 -1
- package/dist/identity.d.ts +5 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +14 -0
- package/dist/identity.js.map +1 -1
- package/dist/recording-schedule-setup.d.ts.map +1 -1
- package/dist/recording-schedule-setup.js +4 -7
- package/dist/recording-schedule-setup.js.map +1 -1
- package/dist/remote-http.d.ts +1 -1
- package/dist/remote-http.d.ts.map +1 -1
- package/dist/remote-http.js +21 -23
- package/dist/remote-http.js.map +1 -1
- package/dist/setup-commands.d.ts.map +1 -1
- package/dist/setup-commands.js +2 -4
- package/dist/setup-commands.js.map +1 -1
- package/dist/tokens.d.ts +17 -2
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +109 -29
- package/dist/tokens.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +15 -14
- package/dist/bundle/answer-policy-PPSPMCLH.js +0 -104
- package/dist/bundle/chunk-KMV7GZB6.js +0 -35
- package/dist/bundle/chunk-UG447QY2.js +0 -27
- package/dist/bundle/chunk-XRFHQGOD.js +0 -17
- package/dist/bundle/command-contract-4K6XXZYE.js +0 -41
- package/dist/bundle/config-EEDB632I.js +0 -90
- package/dist/bundle/first-run-23WWZ2PW.js +0 -28
- package/dist/bundle/first-screen-6HFUYVFR.js +0 -39
- package/dist/bundle/folders-ZXTOFY4T.js +0 -16
- package/dist/bundle/openai-2AU24NRN.js +0 -25
- package/dist/bundle/run-log-LFEXNZ74.js +0 -118
- package/dist/bundle/server-YSTMUZ22.js +0 -72
- package/dist/bundle/store-connection-AZTIF6IH.js +0 -83
- package/dist/bundle/store-maintenance-command-LR572PS4.js +0 -61
- package/dist/bundle/tokens-BE6CJMR5.js +0 -20
- /package/dist/bundle/{chunk-VOXIGICJ.js → chunk-7O7XM37N.js} +0 -0
|
@@ -2,23 +2,25 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
isCliFailure
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-UYBLNGZ2.js";
|
|
6
6
|
import {
|
|
7
7
|
secretNamed,
|
|
8
8
|
withoutSecrets
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QWGEOQHA.js";
|
|
10
10
|
import {
|
|
11
11
|
isContentKey
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HNWDEDMU.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
18
18
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
19
19
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
20
20
|
if (event.event === "store")
|
|
21
21
|
return `${MARK.store} ${event.operation.padEnd(16)} ${event.table} ${event.op} ${event.n}`;
|
|
22
|
+
if (event.event === "progress")
|
|
23
|
+
return `${MARK.progress} ${event.operation.padEnd(16)} ${Object.entries(event.counts).map(([field, count]) => `${count} ${field}`).join(" ")}`;
|
|
22
24
|
if (event.event === "warning") {
|
|
23
25
|
const counts = Object.entries(event.counts ?? {}).map(([field, count]) => `${count} ${field}`);
|
|
24
26
|
return [`${MARK.warning} ${(event.operation ?? "").padEnd(16)} ${event.code}`, ...counts, event.detail].filter(Boolean).join(" ");
|
|
@@ -60,15 +62,15 @@ var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
|
60
62
|
}
|
|
61
63
|
return `${MARK[event.event]} ${event.operation.padEnd(16)} ${parts.join(" ")}`.trimEnd();
|
|
62
64
|
}, "renderEvent");
|
|
63
|
-
var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!", store: "+" };
|
|
65
|
+
var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!", store: "+", progress: "\u2026" };
|
|
64
66
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
65
67
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
66
68
|
|
|
67
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
69
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
68
70
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
69
71
|
import { createHash } from "node:crypto";
|
|
70
72
|
|
|
71
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
73
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
72
74
|
import { homedir } from "node:os";
|
|
73
75
|
var MESSAGE_AT_MOST = 500;
|
|
74
76
|
var CAUSES_AT_MOST = 5;
|
|
@@ -155,9 +157,12 @@ var endpointTemplate = /* @__PURE__ */ __name((raw) => {
|
|
|
155
157
|
const origin = /^[a-z][a-z0-9+.-]*:\/\/(?:[^@/]*@)?([^/]*)/i.exec(trimmed);
|
|
156
158
|
const path = origin ? trimmed.slice(origin[0].length) : trimmed;
|
|
157
159
|
const scheme = origin ? `${trimmed.slice(0, trimmed.indexOf("://"))}://${origin[1]}` : "";
|
|
158
|
-
const
|
|
160
|
+
const parts = path.split("/");
|
|
161
|
+
const segments = parts.map((segment, at) => {
|
|
159
162
|
if (segment === "" || /^[:{].+/.test(segment))
|
|
160
163
|
return segment;
|
|
164
|
+
if (at >= 2 && parts[at - 2] === "rest" && /^\d+$/.test(parts[at - 1] ?? ""))
|
|
165
|
+
return ":token";
|
|
161
166
|
if (/^bot\d+:/.test(segment) || /^\d{6,}:[\w-]{20,}$/.test(segment))
|
|
162
167
|
return ":token";
|
|
163
168
|
if (/^-?\d+$/.test(segment) || /^[0-9a-f-]{16,}$/i.test(segment))
|
|
@@ -178,7 +183,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
178
183
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
179
184
|
}, "redactText");
|
|
180
185
|
|
|
181
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
182
187
|
var REDACTED = "[redacted]";
|
|
183
188
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
184
189
|
if (!record)
|
|
@@ -2,16 +2,73 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HAMDPWEZ.js";
|
|
6
|
+
import {
|
|
7
|
+
PLAIN_HTTP_REFUSED,
|
|
8
|
+
modelAddressAllowed,
|
|
9
|
+
onThisComputer
|
|
10
|
+
} from "./chunk-LQYMN36C.js";
|
|
11
|
+
import {
|
|
12
|
+
readSharedSection,
|
|
13
|
+
sharedConfigPath,
|
|
14
|
+
writeSharedSection
|
|
15
|
+
} from "./chunk-VPPNYUQM.js";
|
|
16
|
+
import {
|
|
17
|
+
storePath
|
|
18
|
+
} from "./chunk-ERQRY6WZ.js";
|
|
19
|
+
import {
|
|
20
|
+
boolean,
|
|
21
|
+
isoTimestamp,
|
|
22
|
+
pipe,
|
|
23
|
+
safeParse,
|
|
24
|
+
strictObject,
|
|
25
|
+
string
|
|
26
|
+
} from "./chunk-4RJL32PF.js";
|
|
6
27
|
import {
|
|
7
28
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-EA2OB75T.js";
|
|
9
30
|
import {
|
|
10
31
|
__name
|
|
11
32
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
33
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
34
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
35
|
import { setTimeout } from "node:timers/promises";
|
|
36
|
+
|
|
37
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/models/local-only.js
|
|
38
|
+
var SECTION = "local_only";
|
|
39
|
+
var Setting = strictObject({
|
|
40
|
+
on: boolean(),
|
|
41
|
+
at: pipe(string(), isoTimestamp())
|
|
42
|
+
});
|
|
43
|
+
var pathOf = /* @__PURE__ */ __name((env) => sharedConfigPath(storePath(env), env), "pathOf");
|
|
44
|
+
var readLocalOnly = /* @__PURE__ */ __name((env) => {
|
|
45
|
+
const section = readSharedSection(pathOf(env), SECTION);
|
|
46
|
+
if (section === void 0 || section === null)
|
|
47
|
+
return void 0;
|
|
48
|
+
const checked = safeParse(Setting, section);
|
|
49
|
+
return checked.success ? checked.output : { on: true, at: (/* @__PURE__ */ new Date(0)).toISOString() };
|
|
50
|
+
}, "readLocalOnly");
|
|
51
|
+
var localOnly = /* @__PURE__ */ __name((env) => readLocalOnly(env)?.on === true, "localOnly");
|
|
52
|
+
var writeLocalOnly = /* @__PURE__ */ __name((env, on) => writeSharedSection(pathOf(env), SECTION, on ? { on: true, at: (/* @__PURE__ */ new Date()).toISOString() } : void 0), "writeLocalOnly");
|
|
53
|
+
var localOnlyRefusal = /* @__PURE__ */ __name((what, where) => new CliError("permission_error", `local only is on: ${what} would go to ${where}, which is not this computer; nothing was sent. Choose a model on this computer, or turn local only off with \`models local-only set off\``, { reason: "local-only.refused" }), "localOnlyRefusal");
|
|
54
|
+
var refuseOffComputer = /* @__PURE__ */ __name((env, address, what) => {
|
|
55
|
+
if (!onThisComputer(address) && localOnly(env))
|
|
56
|
+
throw localOnlyRefusal(what, hostOf(address));
|
|
57
|
+
}, "refuseOffComputer");
|
|
58
|
+
var hostOf = /* @__PURE__ */ __name((address) => {
|
|
59
|
+
try {
|
|
60
|
+
return new URL(address).host;
|
|
61
|
+
} catch {
|
|
62
|
+
return address;
|
|
63
|
+
}
|
|
64
|
+
}, "hostOf");
|
|
65
|
+
var refuseModelAddress = /* @__PURE__ */ __name((env, address, what) => {
|
|
66
|
+
if (!modelAddressAllowed(address))
|
|
67
|
+
throw new CliError("validation_error", PLAIN_HTTP_REFUSED, { reason: "model.address-refused" });
|
|
68
|
+
refuseOffComputer(env, address, what);
|
|
69
|
+
}, "refuseModelAddress");
|
|
70
|
+
|
|
71
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.656.0_@wirecat+cli-base@0.99.0_commander@15.0.0_esbuild@0.28.2_type_dceb8977715cf47b69a8fd97c630c977/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
15
72
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
73
|
var OPENAI_MODELS = {
|
|
17
74
|
"text-embedding-3-small": { dims: 1536, perMillion: 0.02 },
|
|
@@ -19,8 +76,7 @@ var OPENAI_MODELS = {
|
|
|
19
76
|
};
|
|
20
77
|
var DEFAULT_OPENAI_MODEL = "text-embedding-3-small";
|
|
21
78
|
var PER_REQUEST = 256;
|
|
22
|
-
var
|
|
23
|
-
var isLocal = /* @__PURE__ */ __name((baseUrl) => LOCAL.has(new URL(baseUrl).hostname), "isLocal");
|
|
79
|
+
var isLocal = /* @__PURE__ */ __name((baseUrl) => onThisComputer(baseUrl), "isLocal");
|
|
24
80
|
var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUrl, dims }) => {
|
|
25
81
|
const known = baseUrl === void 0 ? OPENAI_MODELS[model] : void 0;
|
|
26
82
|
if (baseUrl === void 0 && !known) {
|
|
@@ -39,7 +95,8 @@ var remoteModel = /* @__PURE__ */ __name(({ model = DEFAULT_OPENAI_MODEL, baseUr
|
|
|
39
95
|
};
|
|
40
96
|
}, "remoteModel");
|
|
41
97
|
var remoteKey = /* @__PURE__ */ __name(({ provider, model, dims }) => `${provider}:${model}:${dims}`, "remoteKey");
|
|
42
|
-
var openRemote = /* @__PURE__ */ __name((remote, apiKey, { concurrency = 4, fetch: post = fetch, tries = 5
|
|
98
|
+
var openRemote = /* @__PURE__ */ __name((remote, apiKey, { concurrency = 4, fetch: post = fetch, tries = 5, env }) => {
|
|
99
|
+
refuseModelAddress(env ?? process.env, remote.baseUrl, "text to embed");
|
|
43
100
|
const request = /* @__PURE__ */ __name(async (input) => {
|
|
44
101
|
for (let attempt = 1; ; attempt++) {
|
|
45
102
|
let response;
|
|
@@ -112,6 +169,12 @@ var errorCode = /* @__PURE__ */ __name(async (response) => {
|
|
|
112
169
|
}, "errorCode");
|
|
113
170
|
|
|
114
171
|
export {
|
|
172
|
+
readLocalOnly,
|
|
173
|
+
localOnly,
|
|
174
|
+
writeLocalOnly,
|
|
175
|
+
localOnlyRefusal,
|
|
176
|
+
refuseOffComputer,
|
|
177
|
+
refuseModelAddress,
|
|
115
178
|
OPENAI_URL,
|
|
116
179
|
OPENAI_MODELS,
|
|
117
180
|
DEFAULT_OPENAI_MODEL,
|