@wirecat/drive-cli 0.68.0 → 0.70.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 +14 -13
- package/dist/age.d.ts +0 -36
- package/dist/age.d.ts.map +1 -1
- package/dist/age.js +0 -22
- package/dist/age.js.map +1 -1
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/{all-profiles-BU6XUFUP.js → all-profiles-FW3GK3QO.js} +24 -34
- package/dist/bundle/{anthropic-ZP5B7S2Z.js → anthropic-QVKJT3II.js} +8 -8
- package/dist/bundle/{app-server-EB4DH6T7.js → app-server-QU73RD5R.js} +68 -76
- package/dist/bundle/{bun-PWMM6L45.js → bun-5XCD5CBB.js} +2 -2
- package/dist/bundle/{bun-sqlite-6VPR2SVC.js → bun-sqlite-TIGSVNSV.js} +9 -9
- package/dist/bundle/{chunk-7BXVI7XF.js → chunk-2SBC4DVV.js} +4 -4
- package/dist/bundle/{chunk-UFPRP7MG.js → chunk-3AHBZP33.js} +10 -15
- package/dist/bundle/{chunk-QRSPFCRY.js → chunk-3CHW7JGR.js} +17 -17
- package/dist/bundle/chunk-3TCMANIM.js +387 -0
- package/dist/bundle/{chunk-EOC7RHJ2.js → chunk-3UWRAIWA.js} +5 -7
- package/dist/bundle/{chunk-5G2BY4B6.js → chunk-3UZ4OH22.js} +32 -31
- package/dist/bundle/{chunk-UIKVP23D.js → chunk-4WK26MPY.js} +1 -1
- package/dist/bundle/{chunk-WUFZGPXX.js → chunk-54BQWRJL.js} +7 -7
- package/dist/bundle/{chunk-EA2OB75T.js → chunk-54NDYVZA.js} +1 -1
- package/dist/bundle/{chunk-QKY24RWV.js → chunk-5JTB4URG.js} +12 -12
- package/dist/bundle/{chunk-M4OP5ASJ.js → chunk-66PL7P4C.js} +1 -1
- package/dist/bundle/{chunk-JMZQBRRZ.js → chunk-6BMTW5A6.js} +9 -9
- package/dist/bundle/{chunk-CVAJMRRD.js → chunk-6DPOWBKA.js} +6 -6
- package/dist/bundle/{chunk-YUGTJBV3.js → chunk-7C5KENNU.js} +3 -3
- package/dist/bundle/chunk-7DJNURKV.js +823 -0
- package/dist/bundle/{chunk-5TK2YQCO.js → chunk-7IBENBCK.js} +2 -2
- package/dist/bundle/chunk-7QSRODXM.js +259 -0
- package/dist/bundle/{chunk-HCZYJMBP.js → chunk-ABZ2NYDT.js} +1 -1
- package/dist/bundle/chunk-AV5UKJZM.js +729 -0
- package/dist/bundle/{chunk-IVOG6T6P.js → chunk-BBFXQPKD.js} +3 -3
- package/dist/bundle/{chunk-BXHFJTU5.js → chunk-BBRMDMIR.js} +3 -3
- package/dist/bundle/{chunk-DYLYH7VE.js → chunk-BD2K2ONK.js} +4 -4
- package/dist/bundle/{chunk-AIEMFRBU.js → chunk-BFKFKDPC.js} +1 -1
- package/dist/bundle/{chunk-JZ3MT7IE.js → chunk-BXPC5TFG.js} +2 -2
- package/dist/bundle/chunk-DHX27E5M.js +31 -0
- package/dist/bundle/{chunk-6QR7NKMG.js → chunk-DR57KDAY.js} +109 -5
- package/dist/bundle/{chunk-2VYEGKQ3.js → chunk-DVI72ZQG.js} +1 -1
- package/dist/bundle/{chunk-WGX4DZPW.js → chunk-DVVUJ254.js} +2 -2
- package/dist/bundle/{chunk-PJ3FKBXG.js → chunk-EDO5LZVF.js} +1 -1
- package/dist/bundle/{chunk-QTRYJZL7.js → chunk-EG62WVR2.js} +6 -6
- package/dist/bundle/{chunk-WCNTDETD.js → chunk-F5KJWRF5.js} +98 -6
- package/dist/bundle/{chunk-D4MVEOU2.js → chunk-FADAOLGB.js} +4 -4
- package/dist/bundle/{chunk-FAMXUI2X.js → chunk-FCSHWUMW.js} +5 -5
- package/dist/bundle/{chunk-O7T3WGCV.js → chunk-FN3RXBO7.js} +6 -6
- package/dist/bundle/{chunk-5W65QTYS.js → chunk-FONIFRYI.js} +4 -4
- package/dist/bundle/{chunk-UUQJVKPB.js → chunk-FVTKFIQH.js} +2340 -1436
- package/dist/bundle/{chunk-7A77GYCE.js → chunk-FYPW7NMH.js} +4 -4
- package/dist/bundle/{chunk-FIVFP53N.js → chunk-GA3URWIF.js} +1 -1
- package/dist/bundle/{chunk-GTLXBAJV.js → chunk-GAHIHE4K.js} +3035 -2482
- package/dist/bundle/{chunk-CMWFYZ45.js → chunk-GJZSVSV3.js} +2 -2
- package/dist/bundle/{chunk-QWGEOQHA.js → chunk-GK3BJMGK.js} +1 -1
- package/dist/bundle/{chunk-TI2OANJZ.js → chunk-GPDPEHYX.js} +1 -1
- package/dist/bundle/{chunk-KPKIHJIT.js → chunk-GV5DGHSA.js} +4 -4
- package/dist/bundle/{chunk-JRFKCYMW.js → chunk-HHAZ6DCY.js} +23 -6
- package/dist/bundle/{chunk-ZVQDOKDY.js → chunk-HK225DAG.js} +1 -1
- package/dist/bundle/{chunk-MW46BLWH.js → chunk-HRATXUFH.js} +22 -20
- package/dist/bundle/{chunk-Z5BMYI2V.js → chunk-HWUPU6WX.js} +8 -8
- package/dist/bundle/{chunk-6WAC2LOS.js → chunk-HYXXMSVD.js} +8614 -8597
- package/dist/bundle/{chunk-YYIWPH53.js → chunk-I7YSHUPW.js} +13 -13
- package/dist/bundle/{chunk-MWCPKUU4.js → chunk-IFTX7AQU.js} +5 -5
- package/dist/bundle/{chunk-SOS4U2RF.js → chunk-IGNIUDI3.js} +71 -49
- package/dist/bundle/{chunk-7JKECODO.js → chunk-ILAQIBEO.js} +1 -11
- package/dist/bundle/{chunk-CK2SQ2CE.js → chunk-KSJAFMU5.js} +78 -31
- package/dist/bundle/{chunk-ZSVMZH5O.js → chunk-LINBDWJK.js} +2 -2
- package/dist/bundle/{chunk-43NEDPXB.js → chunk-LMJBQFW6.js} +6 -6
- package/dist/bundle/{chunk-IJCUAKR5.js → chunk-ML3R2UHV.js} +4 -4
- package/dist/bundle/{chunk-PGPHEC2X.js → chunk-MXNQZAJQ.js} +2 -2
- package/dist/bundle/{chunk-RT5NT62B.js → chunk-NP7LJATI.js} +16 -70
- package/dist/bundle/chunk-OY7TNUEC.js +16 -0
- package/dist/bundle/{chunk-74NCZKRW.js → chunk-P77FL6RY.js} +18 -18
- package/dist/bundle/chunk-P7PLKNPX.js +3611 -0
- package/dist/bundle/{chunk-QVJMFZFW.js → chunk-PAPY6Q6H.js} +1 -1
- package/dist/bundle/{chunk-Q6BD6RUH.js → chunk-PN4JYURZ.js} +102 -57
- package/dist/bundle/{chunk-MOKEB656.js → chunk-PR7XD2DI.js} +2 -2
- package/dist/bundle/{chunk-UPCEHSIZ.js → chunk-Q5C6YKAY.js} +21 -16
- package/dist/bundle/{chunk-EXWZCI5G.js → chunk-QBAOIMVB.js} +1 -1
- package/dist/bundle/{chunk-ULNN3LCY.js → chunk-RCTOWLCD.js} +44 -37
- package/dist/bundle/{chunk-7TNQZKRD.js → chunk-REM5WHHQ.js} +77 -76
- package/dist/bundle/{chunk-Y2QVNVHK.js → chunk-RHSBXOQM.js} +1 -1
- package/dist/bundle/{chunk-UYBLNGZ2.js → chunk-RLNZ7NX5.js} +2 -2
- package/dist/bundle/chunk-RQNRYF6D.js +170 -0
- package/dist/bundle/{chunk-PV3AWPHR.js → chunk-SONPLYV7.js} +5 -5
- package/dist/bundle/{chunk-CRIEW4FP.js → chunk-T5D4OGDC.js} +2 -2
- package/dist/bundle/{chunk-MLSXHTUB.js → chunk-TGS5VPJD.js} +1228 -455
- package/dist/bundle/chunk-TNKQDS5A.js +335 -0
- package/dist/bundle/{chunk-DU23ET2O.js → chunk-VVN6GHAZ.js} +60 -81
- package/dist/bundle/{chunk-PWIEOATY.js → chunk-WJK6KTCS.js} +325 -14
- package/dist/bundle/{chunk-U52QE4QV.js → chunk-WWE5GO6G.js} +3 -3
- package/dist/bundle/{chunk-6HFZZ2PW.js → chunk-XOL346TJ.js} +2 -2
- package/dist/bundle/{chunk-ZAIE3G5I.js → chunk-XZBA6FVH.js} +3 -3
- package/dist/bundle/chunk-YCL3SK4T.js +1978 -0
- package/dist/bundle/{chunk-DIZBJLPM.js → chunk-YRUR3E3E.js} +68 -78
- package/dist/bundle/{chunk-EEE4H2PA.js → chunk-YZPE72GE.js} +12 -12
- package/dist/bundle/{chunk-F7KAMSXA.js → chunk-ZCXWV4XO.js} +4 -4
- package/dist/bundle/{chunk-NV75QPML.js → chunk-ZHZYGY5R.js} +4 -4
- package/dist/bundle/{cli-L7P36YUH.js → cli-K4D4DIGQ.js} +137 -88
- package/dist/bundle/command-contract-V3F452QI.js +43 -0
- package/dist/bundle/{command-server-entry-H3VGPOLJ.js → command-server-entry-WREK3QBB.js} +33 -31
- package/dist/bundle/decode-SEETPKBH.js +299 -0
- package/dist/bundle/{dispatch-WBEOHZDV.js → dispatch-SQCEURVK.js} +9 -9
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-SDZA2SWG.js → echarts-WZ5RKFCX.js} +2 -2
- package/dist/bundle/{embed-WUKOASQG.js → embed-B2UCRZZR.js} +9 -9
- package/dist/bundle/{embedder-UBRAXRDZ.js → embedder-4R6Z7G7L.js} +12 -12
- package/dist/bundle/entry-ORZYRJ5N.js +25 -0
- package/dist/bundle/{failure-X6PSLVSO.js → failure-CYNXH3RQ.js} +4 -4
- package/dist/bundle/first-run-KAKA6KBY.js +31 -0
- package/dist/bundle/first-screen-R645UHRH.js +41 -0
- package/dist/bundle/google-BSO3YB7N.js +45 -0
- package/dist/bundle/{google-api-SQQ4BSNR.js → google-api-SAND2F7L.js} +70 -63
- package/dist/bundle/grants-PLNFYARD.js +118 -0
- package/dist/bundle/{identity-SRL6RSU2.js → identity-JVVGS4U6.js} +6 -6
- package/dist/bundle/{instructions-7T6JJIFS.js → instructions-JSMTSB22.js} +1 -1
- package/dist/bundle/{login-N243GGEE.js → login-6WG3YBDU.js} +78 -71
- package/dist/bundle/{mcp-TDKGDB4V.js → mcp-VFIOZDVY.js} +2 -2
- package/dist/bundle/meeting-combined-SUKMFK3F.js +27 -0
- package/dist/bundle/meeting-model-S4YGKIFI.js +29 -0
- package/dist/bundle/meeting-semantic-5U7JQCFF.js +25 -0
- package/dist/bundle/{node-BZDMUFTW.js → node-VJMVHOWD.js} +2 -2
- package/dist/bundle/{node-sqlite-SZQCCMV2.js → node-sqlite-DCNT3HVE.js} +10 -10
- package/dist/bundle/oauth-KCMNQ3ZP.js +22 -0
- package/dist/bundle/{open-RVTPKDA3.js → open-NFOEHVW7.js} +8 -8
- package/dist/bundle/{openai-6NN63BMH.js → openai-D47WY7EC.js} +32 -30
- package/dist/bundle/{process-756VBE7E.js → process-Q2FRU5VA.js} +1 -1
- package/dist/bundle/{program-B4QBJYB5.js → program-T2AJJQEM.js} +1327 -1329
- package/dist/bundle/{prompt-HGP2DSRW.js → prompt-YJSDABXN.js} +8 -8
- package/dist/bundle/{reasons-KSYP5VDJ.js → reasons-WEHPCSJX.js} +5 -5
- package/dist/bundle/{recognize-26SHB7HI.js → recognize-6OBEIEB3.js} +7 -7
- package/dist/bundle/{remote-Z4PWHZ5N.js → remote-3SL2QJ7T.js} +13 -13
- package/dist/bundle/{rerank-QHJZJK3Q.js → rerank-L6F5SLIB.js} +10 -10
- package/dist/bundle/{serve-MYJW5IEM.js → serve-GYSWIWH4.js} +12 -12
- package/dist/bundle/server-BI46BSRE.js +80 -0
- package/dist/bundle/{server-XFW3V7CR.js → server-GWWP3RIT.js} +62 -53
- package/dist/bundle/{services-IQG2RVTO.js → services-BDQBRXT5.js} +91 -51
- package/dist/bundle/{sqlite-runtime-X4GB5PBV.js → sqlite-runtime-ZSZGAUYB.js} +9 -9
- package/dist/bundle/{start-C6EXYXAL.js → start-BJ275RUK.js} +7 -7
- package/dist/bundle/{state-ATQK2X3W.js → state-HLNGFI2T.js} +9 -9
- package/dist/bundle/{store-QUBUPK6F.js → store-I43KZNJW.js} +35 -26
- package/dist/bundle/{store-MEHEUOJH.js → store-OSRTGYGI.js} +23 -19
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +72 -0
- package/dist/bundle/tokens-DB7O7QNB.js +118 -0
- package/dist/catalog.d.ts +0 -28
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +0 -82
- package/dist/catalog.js.map +1 -1
- package/dist/commands/catalog.d.ts +3 -8
- package/dist/commands/catalog.d.ts.map +1 -1
- package/dist/commands/catalog.js +36 -109
- package/dist/commands/catalog.js.map +1 -1
- package/dist/commands/context.d.ts +3 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +20 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +30 -72
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/folders.d.ts +1 -1
- package/dist/commands/folders.d.ts.map +1 -1
- package/dist/commands/folders.js +45 -48
- package/dist/commands/folders.js.map +1 -1
- package/dist/commands/knowledge.d.ts +4 -21
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +3 -241
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/mirrors.d.ts +2 -2
- package/dist/commands/mirrors.d.ts.map +1 -1
- package/dist/commands/mirrors.js +46 -202
- package/dist/commands/mirrors.js.map +1 -1
- package/dist/commands/search.d.ts +1 -3
- package/dist/commands/search.d.ts.map +1 -1
- package/dist/commands/search.js +20 -42
- package/dist/commands/search.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +36 -53
- package/dist/commands/sync.js.map +1 -1
- package/dist/contract-overrides.d.ts +0 -2
- package/dist/contract-overrides.d.ts.map +1 -1
- package/dist/contract-overrides.js +0 -317
- package/dist/contract-overrides.js.map +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +4 -3
- package/dist/knowledge.js.map +1 -1
- package/dist/list-queries.d.ts +0 -31
- package/dist/list-queries.d.ts.map +1 -1
- package/dist/list-queries.js +0 -36
- package/dist/list-queries.js.map +1 -1
- package/dist/policy.d.ts +1 -1
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +3 -3
- package/dist/policy.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +2 -3
- package/dist/program.js.map +1 -1
- package/dist/provider-json.d.ts.map +1 -1
- package/dist/provider-json.js +5 -5
- package/dist/provider-json.js.map +1 -1
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +0 -10
- package/dist/reasons.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-2UHQVRH2.js +0 -1235
- package/dist/bundle/chunk-AXYG2DDY.js +0 -4721
- package/dist/bundle/chunk-J5LXL435.js +0 -1316
- package/dist/bundle/chunk-R5FTCNLJ.js +0 -76
- package/dist/bundle/command-contract-EYFGMKIG.js +0 -41
- package/dist/bundle/decode-JEU6JWCV.js +0 -165
- package/dist/bundle/entry-C4NUQFTF.js +0 -25
- package/dist/bundle/first-run-PKHBS7B4.js +0 -30
- package/dist/bundle/first-screen-QOVOM4BF.js +0 -39
- package/dist/bundle/google-XXHSMTVK.js +0 -45
- package/dist/bundle/grants-2U4JVT6O.js +0 -111
- package/dist/bundle/oauth-CMAFXX6A.js +0 -22
- package/dist/bundle/server-HBZPIHDX.js +0 -74
- package/dist/bundle/store-maintenance-command-33ULVDWY.js +0 -65
- package/dist/bundle/tokens-A2GP4F34.js +0 -111
- package/dist/knowledge-query.d.ts +0 -77
- package/dist/knowledge-query.d.ts.map +0 -1
- package/dist/knowledge-query.js +0 -104
- package/dist/knowledge-query.js.map +0 -1
- package/dist/bundle/{chunk-XWBPP2HX.js → chunk-ZI3YTXSF.js} +0 -0
- package/dist/bundle/{mdast-util-from-markdown-CE73EWJ2.js → mdast-util-from-markdown-FXEPSNER.js} +3 -3
|
@@ -3,26 +3,26 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
TIME_LIMIT_FUNCTION,
|
|
5
5
|
beforeTimeLimit
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HK225DAG.js";
|
|
7
7
|
import {
|
|
8
8
|
loadVectorExtension,
|
|
9
9
|
vectorExtension
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GJZSVSV3.js";
|
|
11
11
|
import {
|
|
12
12
|
refuseOwnerStoreInTests
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-T5D4OGDC.js";
|
|
14
|
+
import "./chunk-HRATXUFH.js";
|
|
15
|
+
import "./chunk-SONPLYV7.js";
|
|
16
16
|
import "./chunk-Y5E2WNWB.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-ABZ2NYDT.js";
|
|
18
|
+
import "./chunk-7IBENBCK.js";
|
|
19
|
+
import "./chunk-HHAZ6DCY.js";
|
|
20
|
+
import "./chunk-54NDYVZA.js";
|
|
21
21
|
import {
|
|
22
22
|
__name
|
|
23
23
|
} from "./chunk-ZVVMGPBJ.js";
|
|
24
24
|
|
|
25
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
25
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
|
|
26
26
|
import { DatabaseSync } from "node:sqlite";
|
|
27
27
|
var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
|
|
28
28
|
var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ownerLogin,
|
|
5
|
+
revokeAll
|
|
6
|
+
} from "./chunk-DVVUJ254.js";
|
|
7
|
+
import "./chunk-5D4AEUVA.js";
|
|
8
|
+
import "./chunk-ZHZYGY5R.js";
|
|
9
|
+
import "./chunk-WWE5GO6G.js";
|
|
10
|
+
import "./chunk-4WK26MPY.js";
|
|
11
|
+
import "./chunk-HRATXUFH.js";
|
|
12
|
+
import "./chunk-SONPLYV7.js";
|
|
13
|
+
import "./chunk-Y5E2WNWB.js";
|
|
14
|
+
import "./chunk-ABZ2NYDT.js";
|
|
15
|
+
import "./chunk-7IBENBCK.js";
|
|
16
|
+
import "./chunk-HHAZ6DCY.js";
|
|
17
|
+
import "./chunk-54NDYVZA.js";
|
|
18
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
19
|
+
export {
|
|
20
|
+
ownerLogin,
|
|
21
|
+
revokeAll
|
|
22
|
+
};
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
openCache,
|
|
7
7
|
openFile,
|
|
8
8
|
storeCapable
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-6DPOWBKA.js";
|
|
10
|
+
import "./chunk-HK225DAG.js";
|
|
11
|
+
import "./chunk-HRATXUFH.js";
|
|
12
|
+
import "./chunk-SONPLYV7.js";
|
|
13
13
|
import "./chunk-Y5E2WNWB.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ABZ2NYDT.js";
|
|
15
|
+
import "./chunk-7IBENBCK.js";
|
|
16
|
+
import "./chunk-HHAZ6DCY.js";
|
|
17
|
+
import "./chunk-54NDYVZA.js";
|
|
18
18
|
import "./chunk-ZVVMGPBJ.js";
|
|
19
19
|
export {
|
|
20
20
|
CAPABILITY_STATEMENTS,
|
|
@@ -3,49 +3,50 @@ 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-BD2K2ONK.js";
|
|
7
|
+
import "./chunk-I7YSHUPW.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENAI_URL
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FCSHWUMW.js";
|
|
11
11
|
import {
|
|
12
12
|
refuseModelAddress
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-FN3RXBO7.js";
|
|
14
|
+
import "./chunk-IFTX7AQU.js";
|
|
15
15
|
import "./chunk-5DPV7X27.js";
|
|
16
16
|
import {
|
|
17
17
|
endpointFetch,
|
|
18
|
+
onThisComputer,
|
|
18
19
|
providerWaitMs
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-DR57KDAY.js";
|
|
20
21
|
import {
|
|
21
22
|
OPENAI_TRANSCRIBE_MODEL,
|
|
22
23
|
VAD,
|
|
23
24
|
filesPresent,
|
|
24
25
|
modelsDirectory,
|
|
25
26
|
vadPath
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-FONIFRYI.js";
|
|
28
|
+
import "./chunk-WJK6KTCS.js";
|
|
29
|
+
import "./chunk-T5D4OGDC.js";
|
|
29
30
|
import {
|
|
30
31
|
DEFAULT_RETRY,
|
|
31
32
|
backoffMs
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-HRATXUFH.js";
|
|
34
|
+
import "./chunk-SONPLYV7.js";
|
|
34
35
|
import "./chunk-Y5E2WNWB.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-ABZ2NYDT.js";
|
|
37
|
+
import "./chunk-7IBENBCK.js";
|
|
38
|
+
import "./chunk-HHAZ6DCY.js";
|
|
38
39
|
import {
|
|
39
40
|
CliError
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-54NDYVZA.js";
|
|
41
42
|
import {
|
|
42
43
|
__name
|
|
43
44
|
} from "./chunk-ZVVMGPBJ.js";
|
|
44
45
|
|
|
45
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
46
47
|
import { setTimeout as wait } from "node:timers/promises";
|
|
47
48
|
|
|
48
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
49
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
49
50
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
50
51
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
51
52
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -66,7 +67,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
66
67
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
67
68
|
}, "encodeWav");
|
|
68
69
|
|
|
69
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
70
71
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
71
72
|
var JOINED_SECONDS = 0.2;
|
|
72
73
|
var PAD_SECONDS = 0.2;
|
|
@@ -121,27 +122,28 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
121
122
|
const retry = options.retry ?? RETRY;
|
|
122
123
|
const sleep = options.sleep ?? sleeping;
|
|
123
124
|
const random = options.random ?? Math.random;
|
|
125
|
+
const who = options.label ?? "OpenAI";
|
|
124
126
|
for (let attempt = 1; ; attempt++) {
|
|
125
127
|
interrupted(options.signal);
|
|
126
128
|
let response;
|
|
127
129
|
try {
|
|
128
130
|
response = await post(url, {
|
|
129
131
|
method: "POST",
|
|
130
|
-
headers: { authorization: `Bearer ${options.apiKey}` },
|
|
132
|
+
headers: options.apiKey ? { authorization: `Bearer ${options.apiKey}` } : {},
|
|
131
133
|
body: formOf(wav, options),
|
|
132
134
|
...options.signal ? { signal: options.signal } : {}
|
|
133
135
|
});
|
|
134
136
|
} catch {
|
|
135
137
|
interrupted(options.signal);
|
|
136
138
|
if (attempt > retry.retries)
|
|
137
|
-
throw new CliError("network_error",
|
|
139
|
+
throw new CliError("network_error", `${who} could not be reached`, { reason: "network.failed" });
|
|
138
140
|
await sleep(backoffMs(attempt, retry, random), options.signal);
|
|
139
141
|
continue;
|
|
140
142
|
}
|
|
141
143
|
if (response.ok) {
|
|
142
144
|
const body = await response.json().catch(() => interrupted(options.signal));
|
|
143
145
|
if (typeof body?.text !== "string")
|
|
144
|
-
throw new CliError("invalid_response",
|
|
146
|
+
throw new CliError("invalid_response", `${who} answered without a transcript`, {
|
|
145
147
|
reason: "provider.invalid-response"
|
|
146
148
|
});
|
|
147
149
|
return body.text.trim();
|
|
@@ -150,15 +152,15 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
150
152
|
const status = response.status;
|
|
151
153
|
const said = `HTTP ${status}${code ? `, ${code}` : type ? `, ${type}` : ""}`;
|
|
152
154
|
if (status === 401)
|
|
153
|
-
throw new CliError("authentication_error",
|
|
155
|
+
throw new CliError("authentication_error", `${who} refused the key (${said}) \u2014 set it again with \`${options.keyHint ?? "models keys set openai"}\``, { reason: "auth.failed" });
|
|
154
156
|
if (status === 403)
|
|
155
|
-
throw new CliError("permission_error",
|
|
157
|
+
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" });
|
|
156
158
|
if (status === 413)
|
|
157
|
-
throw new CliError("validation_error",
|
|
159
|
+
throw new CliError("validation_error", `${who} refused the audio as too large (${said})`, {
|
|
158
160
|
reason: "transcription.too-large"
|
|
159
161
|
});
|
|
160
162
|
if (EXHAUSTED.has(code ?? "") || EXHAUSTED.has(type ?? ""))
|
|
161
|
-
throw new CliError("permission_error",
|
|
163
|
+
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" });
|
|
162
164
|
const again = status === 408 || status === 429 || status >= 500;
|
|
163
165
|
const asked = providerWaitMs(response.headers, () => /* @__PURE__ */ new Date());
|
|
164
166
|
if (again && attempt <= retry.retries && (asked === void 0 || asked <= retry.maxRetryAfterMs)) {
|
|
@@ -166,13 +168,13 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
166
168
|
continue;
|
|
167
169
|
}
|
|
168
170
|
if (status === 429)
|
|
169
|
-
throw new CliError("rate_limited",
|
|
171
|
+
throw new CliError("rate_limited", `${who} answered ${said}`, {
|
|
170
172
|
reason: "provider.rate-limited",
|
|
171
173
|
...asked === void 0 ? {} : { retry_after_ms: asked }
|
|
172
174
|
});
|
|
173
175
|
if (status >= 500)
|
|
174
|
-
throw new CliError([502, 503, 504].includes(status) ? "provider_unavailable" : "provider_error",
|
|
175
|
-
throw new CliError("provider_error",
|
|
176
|
+
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" });
|
|
177
|
+
throw new CliError("provider_error", `${who} answered ${said}`, { reason: "provider.refused" });
|
|
176
178
|
}
|
|
177
179
|
}, "send");
|
|
178
180
|
var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
@@ -189,7 +191,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
189
191
|
return pieces;
|
|
190
192
|
}, "piecesOf");
|
|
191
193
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
192
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
194
|
+
const { openSpeechCutter } = await import("./recognize-6OBEIEB3.js");
|
|
193
195
|
return openSpeechCutter(vadModel);
|
|
194
196
|
}, "openCutter");
|
|
195
197
|
var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
@@ -199,7 +201,7 @@ var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
|
199
201
|
}, "checkKeywords");
|
|
200
202
|
var transcribeOpenAI = /* @__PURE__ */ __name(async (audio, options) => {
|
|
201
203
|
refuseModelAddress(options.env ?? process.env, options.baseUrl ?? OPENAI_URL, "audio");
|
|
202
|
-
if (!options.apiKey)
|
|
204
|
+
if (!options.apiKey && !onThisComputer(options.baseUrl ?? OPENAI_URL))
|
|
203
205
|
throw new CliError("authentication_error", "no OpenAI key \u2014 `models keys set openai`, or OPENAI_API_KEY", {
|
|
204
206
|
reason: "transcription.no-key"
|
|
205
207
|
});
|
|
@@ -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.666.0_@wirecat+cli-base@0.101.0_commander@15.0.0_esbuild@0.28.2_typ_02b130a271480a962759fcca79b3d7ec/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";
|