@wirecat/notion-cli 0.1.0 → 0.2.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 +40 -0
- package/README.md +10 -4
- package/contracts/wirecat.json +650 -1
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/{all-profiles-OETMCOLN.js → all-profiles-JGYLQZ5C.js} +9 -9
- package/dist/bundle/{anthropic-5Y3O2TYM.js → anthropic-S2VSMIKQ.js} +5 -5
- package/dist/bundle/{app-server-IVWBIVHC.js → app-server-SASYDBCA.js} +55 -46
- package/dist/bundle/{bun-EO636SAD.js → bun-LU5LP3JI.js} +2 -2
- package/dist/bundle/{bun-sqlite-C2T7QJ2M.js → bun-sqlite-JBSINB4O.js} +6 -6
- package/dist/bundle/{chunk-DIM5YWBU.js → chunk-22QQUKWA.js} +1 -1
- package/dist/bundle/{chunk-B4B65XIO.js → chunk-2F4QQ7WB.js} +3 -3
- package/dist/bundle/{chunk-2YR3RYT4.js → chunk-2F6VO5HA.js} +3 -3
- package/dist/bundle/chunk-2LWO3PDX.js +726 -0
- package/dist/bundle/{chunk-RSIS7BR7.js → chunk-3AL7QUS3.js} +20 -20
- package/dist/bundle/{chunk-RDZ7SVBZ.js → chunk-3Z4YTSRY.js} +3 -3
- package/dist/bundle/{chunk-QBC23NHD.js → chunk-4HWJOU7N.js} +1 -1
- package/dist/bundle/{chunk-WM7663C2.js → chunk-4IPURN72.js} +8 -8
- package/dist/bundle/{chunk-CLG2ISQH.js → chunk-4ZTVJHWU.js} +4 -4
- package/dist/bundle/{chunk-IQWEJEB5.js → chunk-5IYKVRH2.js} +26157 -21070
- package/dist/bundle/{chunk-7FII4DCE.js → chunk-5NFK5EM2.js} +7 -7
- package/dist/bundle/{chunk-K5TWMQSY.js → chunk-5QIQEUOG.js} +8 -8
- package/dist/bundle/{chunk-F6MLJ3V5.js → chunk-5RDNBG7D.js} +2 -2
- package/dist/bundle/{chunk-ST2UC7FS.js → chunk-5RSC54NA.js} +30 -26
- package/dist/bundle/{chunk-7N5QB6NL.js → chunk-6EVKHZKN.js} +5 -3
- package/dist/bundle/{chunk-EU5WCOMQ.js → chunk-6RA3EABS.js} +45 -34
- package/dist/bundle/{chunk-JKIN5TOU.js → chunk-AOCUKEAX.js} +4 -4
- package/dist/bundle/{chunk-OWJDC4CB.js → chunk-B26TQZKZ.js} +12 -12
- package/dist/bundle/{chunk-WK3OSDNV.js → chunk-B7ON6KPT.js} +7 -7
- package/dist/bundle/{chunk-RLSFOR2D.js → chunk-BNPTZ5ZB.js} +4 -4
- package/dist/bundle/{chunk-WVZFXI36.js → chunk-D7QSEEYW.js} +4 -4
- package/dist/bundle/{chunk-JK44XO2S.js → chunk-DH5PRHT4.js} +56 -56
- package/dist/bundle/chunk-EUIVXFLJ.js +259 -0
- package/dist/bundle/{chunk-64D5VUZ4.js → chunk-FPY6EJ7B.js} +67 -63
- package/dist/bundle/{chunk-EGTBL3MJ.js → chunk-FT3LN3HP.js} +1 -1
- package/dist/bundle/{chunk-NLDYZBTC.js → chunk-FWVBPRL4.js} +1129 -2555
- package/dist/bundle/{chunk-UWIA2G6Q.js → chunk-FXEJY4OL.js} +329 -528
- package/dist/bundle/{chunk-R6ZM45NF.js → chunk-G3EZFRSS.js} +88 -30
- package/dist/bundle/{chunk-B2XKEEFX.js → chunk-GZOUFX3C.js} +4 -4
- package/dist/bundle/{chunk-WWMB4UHF.js → chunk-HL52XXZX.js} +1 -1
- package/dist/bundle/{chunk-4GC5DBHW.js → chunk-KCLOUUYF.js} +3 -3
- package/dist/bundle/chunk-KFVDL2QS.js +146 -0
- package/dist/bundle/{chunk-35K5T6WV.js → chunk-KGERXYTV.js} +1 -1
- package/dist/bundle/{chunk-BWICUW7W.js → chunk-KM6WHPHI.js} +2 -2
- package/dist/bundle/{chunk-AE2KQ37N.js → chunk-LAYPFBOM.js} +6 -6
- package/dist/bundle/chunk-LLG2POQ7.js +170 -0
- package/dist/bundle/{chunk-B2WFKFYL.js → chunk-M3KB25D3.js} +20 -116
- package/dist/bundle/{chunk-RAZKIHGH.js → chunk-M7S2NDWB.js} +3 -3
- package/dist/bundle/chunk-MGUEZYFA.js +5546 -0
- package/dist/bundle/chunk-MY742GAD.js +1977 -0
- package/dist/bundle/chunk-MZU2YFBZ.js +823 -0
- package/dist/bundle/{chunk-AQZO3ITW.js → chunk-NOQ7B5N7.js} +2 -2
- package/dist/bundle/{chunk-QC3KOJT4.js → chunk-NQWV4WQO.js} +6 -6
- package/dist/bundle/{chunk-FF4DDBCB.js → chunk-ODBZNSZ6.js} +6 -6
- package/dist/bundle/{chunk-TR7R5DL4.js → chunk-OTV53F34.js} +9 -9
- package/dist/bundle/{chunk-KHOVVPLC.js → chunk-P7CUM5IB.js} +1 -1
- package/dist/bundle/{chunk-CWVAYQXI.js → chunk-RV64YUQX.js} +8 -8
- package/dist/bundle/{chunk-TSCIIXN3.js → chunk-SHJQ6JKG.js} +2 -2
- package/dist/bundle/{chunk-24FAYAML.js → chunk-SWAOWNKW.js} +3 -3
- package/dist/bundle/chunk-SZOVLP44.js +29 -0
- package/dist/bundle/chunk-TPX2M45D.js +385 -0
- package/dist/bundle/{chunk-UWW24JQF.js → chunk-TSDBSIFM.js} +3 -3
- package/dist/bundle/{chunk-YA4LSSDZ.js → chunk-VBHETQVV.js} +1435 -1788
- package/dist/bundle/{chunk-HRTIRRXR.js → chunk-VCIALTEM.js} +33 -6
- package/dist/bundle/{chunk-ESZT4WW3.js → chunk-WCSOH4JS.js} +3 -3
- package/dist/bundle/{chunk-HWRKURQH.js → chunk-WF4D56CA.js} +2 -2
- package/dist/bundle/chunk-WJHZMR2W.js +335 -0
- package/dist/bundle/chunk-X4TIMMKJ.js +16 -0
- package/dist/bundle/{chunk-XL2HXHP3.js → chunk-XF26XKTS.js} +2 -2
- package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
- package/dist/bundle/{chunk-47R43UVJ.js → chunk-YMYUBZWT.js} +19 -19
- package/dist/bundle/{chunk-3D3PFXBP.js → chunk-YNTLT3Z3.js} +10 -15
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-YVI5SQPY.js} +1 -1
- package/dist/bundle/{chunk-XC5CKHX2.js → chunk-Z56QFOBR.js} +1 -1
- package/dist/bundle/{chunk-EPAZ7DJB.js → chunk-ZKAEZXUP.js} +42 -38
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-ZZ32DXTH.js} +1 -1
- package/dist/bundle/command-contract-JS5V27NX.js +38 -0
- package/dist/bundle/{command-server-entry-A66DJ3MH.js → command-server-entry-UFSG7KRO.js} +26 -23
- package/dist/bundle/decode-7LLWTSPT.js +297 -0
- package/dist/bundle/{dispatch-FEKU5UXC.js → dispatch-2GY6JIJH.js} +8 -8
- package/dist/bundle/{dist-YFKABFFF.js → dist-ILNOLGYN.js} +1 -1
- package/dist/bundle/{echarts-XD2JSWU4.js → echarts-BXX4OQWC.js} +2 -2
- package/dist/bundle/{embed-F3HYGAF7.js → embed-JXFNBTKH.js} +6 -6
- package/dist/bundle/{embedder-GSEDDUH7.js → embedder-57YZ44KO.js} +9 -9
- package/dist/bundle/{failure-HDJLR2YJ.js → failure-MYT4HPE3.js} +2 -2
- package/dist/bundle/{first-run-TXNTIUSP.js → first-run-3PF7T74J.js} +12 -11
- package/dist/bundle/first-screen-7BEROEQR.js +36 -0
- package/dist/bundle/{instructions-NZGJ4FW5.js → instructions-2VECIDXF.js} +1 -1
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-O6ACR2DX.js} +2 -2
- package/dist/bundle/mdast-util-from-markdown-R66F4HZA.js +1958 -0
- package/dist/bundle/mdast-util-gfm-LN2ELINH.js +2699 -0
- package/dist/bundle/meeting-combined-PPUQ3KBR.js +24 -0
- package/dist/bundle/meeting-model-ZNMYKMCD.js +26 -0
- package/dist/bundle/meeting-semantic-ETN3A4BJ.js +22 -0
- package/dist/bundle/micromark-extension-gfm-5X7YT43T.js +1838 -0
- package/dist/bundle/{node-RPKPDYQS.js → node-MPEQSFI3.js} +2 -2
- package/dist/bundle/{node-sqlite-KH2UUYVO.js → node-sqlite-WA32MYSJ.js} +7 -7
- package/dist/bundle/notion.js +13 -13
- package/dist/bundle/{oauth-NKAI7TQD.js → oauth-IAFZG3IR.js} +7 -7
- package/dist/bundle/{open-WSAEAA2V.js → open-M3JQUC5G.js} +5 -5
- package/dist/bundle/{openai-JPVDGHG5.js → openai-HXUEHUSD.js} +30 -28
- package/dist/bundle/{process-5ZFVKOQX.js → process-F6TKXWWA.js} +1 -1
- package/dist/bundle/{program-M3D56D6T.js → program-Y7JAB6TG.js} +5289 -924
- package/dist/bundle/{prompt-FROYQ5LV.js → prompt-IMUQLZD2.js} +5 -5
- package/dist/bundle/{recognize-NYCHQMCX.js → recognize-2MZAYHAA.js} +4 -4
- package/dist/bundle/{remote-4OERF3Z4.js → remote-OV4LB6VR.js} +10 -10
- package/dist/bundle/{rerank-TEGXFUWY.js → rerank-ZIULUS34.js} +7 -7
- package/dist/bundle/{schemas-MZNNOEYN.js → schemas-DIVZS6TU.js} +1 -1
- package/dist/bundle/{serve-HLYYBAXY.js → serve-YU7QBP6L.js} +9 -9
- package/dist/bundle/server-FKQET4ZO.js +71 -0
- package/dist/bundle/{server-D5OYNEUW.js → server-LGMNONSB.js} +47 -38
- package/dist/bundle/services-5WY4DCPJ.js +581 -0
- package/dist/bundle/{sqlite-runtime-H2S5RR2F.js → sqlite-runtime-5MXZDETH.js} +6 -6
- package/dist/bundle/{state-OPOXCDZL.js → state-LWMZH2KI.js} +6 -6
- package/dist/bundle/{store-NHMXEJPD.js → store-EPZYV4VW.js} +17 -13
- package/dist/bundle/{store-Y3KRLCJ7.js → store-QE6FEIZD.js} +25 -20
- package/dist/bundle/store-maintenance-command-ZUUUFCHL.js +62 -0
- package/dist/commands/documents.d.ts +2 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +2 -2
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/library.d.ts +10 -0
- package/dist/commands/library.d.ts.map +1 -0
- package/dist/commands/library.js +468 -0
- package/dist/commands/library.js.map +1 -0
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +4 -3
- package/dist/commands/session.js.map +1 -1
- package/dist/context.d.ts +5 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +12 -3
- package/dist/context.js.map +1 -1
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +1 -0
- package/dist/identity.js.map +1 -1
- package/dist/knowledge.d.ts +27 -0
- package/dist/knowledge.d.ts.map +1 -0
- package/dist/knowledge.js +87 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/library.d.ts +44 -0
- package/dist/library.d.ts.map +1 -0
- package/dist/library.js +149 -0
- package/dist/library.js.map +1 -0
- package/dist/notion/client.d.ts +4 -1
- package/dist/notion/client.d.ts.map +1 -1
- package/dist/notion/client.js +5 -2
- package/dist/notion/client.js.map +1 -1
- package/dist/notion/errors.d.ts.map +1 -1
- package/dist/notion/errors.js +26 -1
- package/dist/notion/errors.js.map +1 -1
- package/dist/notion/reads.d.ts +4 -0
- package/dist/notion/reads.d.ts.map +1 -1
- package/dist/program.js +2 -2
- package/dist/program.js.map +1 -1
- package/dist/sync/cursor.d.ts +81 -0
- package/dist/sync/cursor.d.ts.map +1 -1
- package/dist/sync/cursor.js +63 -2
- package/dist/sync/cursor.js.map +1 -1
- package/dist/sync/files.d.ts +77 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +12 -0
- package/dist/sync/files.js.map +1 -0
- package/dist/sync/markdown.d.ts +4 -1
- package/dist/sync/markdown.d.ts.map +1 -1
- package/dist/sync/markdown.js +8 -6
- package/dist/sync/markdown.js.map +1 -1
- package/dist/sync/source.d.ts +6 -59
- package/dist/sync/source.d.ts.map +1 -1
- package/dist/sync/source.js +616 -255
- package/dist/sync/source.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/notion-cli/SKILL.md +12 -1
- package/dist/bundle/command-contract-6G5DC2FN.js +0 -35
- package/dist/bundle/decode-7XOFRAAT.js +0 -163
- package/dist/bundle/first-screen-JZPJND7J.js +0 -33
- package/dist/bundle/server-LWZGVMNW.js +0 -62
- package/dist/bundle/store-maintenance-command-D4W7WSLQ.js +0 -53
- package/dist/commands/comments.d.ts +0 -3
- package/dist/commands/comments.d.ts.map +0 -1
- package/dist/commands/comments.js +0 -114
- package/dist/commands/comments.js.map +0 -1
- package/dist/sample/comments.d.ts +0 -61
- package/dist/sample/comments.d.ts.map +0 -1
- package/dist/sample/comments.js +0 -39
- package/dist/sample/comments.js.map +0 -1
- package/dist/sample/records.d.ts +0 -16
- package/dist/sample/records.d.ts.map +0 -1
- package/dist/sample/records.js +0 -22
- package/dist/sample/records.js.map +0 -1
- package/dist/sample/transport.d.ts +0 -42
- package/dist/sample/transport.d.ts.map +0 -1
- package/dist/sample/transport.js +0 -153
- package/dist/sample/transport.js.map +0 -1
- /package/dist/bundle/{chunk-ZI3YTXSF.js → chunk-VKE77B3F.js} +0 -0
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FT3LN3HP.js";
|
|
22
22
|
import {
|
|
23
23
|
__name
|
|
24
24
|
} from "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/node.js
|
|
27
27
|
import { DatabaseSync } from "node:sqlite";
|
|
28
28
|
var nodeSQLiteCodecs = refineSqliteCodecs({
|
|
29
29
|
"integer:boolean": { normalize: booleanFromInteger },
|
|
@@ -3,24 +3,24 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NOQ7B5N7.js";
|
|
7
7
|
import {
|
|
8
8
|
refuseOwnerStoreInTests
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WF4D56CA.js";
|
|
10
10
|
import {
|
|
11
11
|
TIME_LIMIT_FUNCTION,
|
|
12
12
|
beforeTimeLimit
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-4HWJOU7N.js";
|
|
14
|
+
import "./chunk-3AL7QUS3.js";
|
|
15
|
+
import "./chunk-4IPURN72.js";
|
|
16
16
|
import "./chunk-XYIT2XB3.js";
|
|
17
17
|
import "./chunk-Y5E2WNWB.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-5RDNBG7D.js";
|
|
19
19
|
import {
|
|
20
20
|
__name
|
|
21
21
|
} from "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
|
|
23
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
23
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
|
|
24
24
|
import { DatabaseSync } from "node:sqlite";
|
|
25
25
|
var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
|
|
26
26
|
var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
package/dist/bundle/notion.js
CHANGED
|
@@ -3,12 +3,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
3
3
|
const require = __bundleRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
DESKTOP
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VCIALTEM.js";
|
|
7
7
|
import {
|
|
8
8
|
installerOf
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-ZZ32DXTH.js";
|
|
10
|
+
import "./chunk-VKE77B3F.js";
|
|
11
|
+
import "./chunk-NQWV4WQO.js";
|
|
12
12
|
import {
|
|
13
13
|
DESCRIBE_FLAG,
|
|
14
14
|
DISPATCH_FLAG,
|
|
@@ -19,14 +19,14 @@ import {
|
|
|
19
19
|
fileState,
|
|
20
20
|
shimFiles,
|
|
21
21
|
writeShim
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
22
|
+
} from "./chunk-4ZTVJHWU.js";
|
|
23
|
+
import "./chunk-3AL7QUS3.js";
|
|
24
24
|
import {
|
|
25
25
|
catchCrashes
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-4IPURN72.js";
|
|
27
27
|
import "./chunk-XYIT2XB3.js";
|
|
28
28
|
import "./chunk-Y5E2WNWB.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-5RDNBG7D.js";
|
|
30
30
|
import {
|
|
31
31
|
__name
|
|
32
32
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -34,13 +34,13 @@ import {
|
|
|
34
34
|
// dist/bin/notion.js
|
|
35
35
|
import { enableCompileCache } from "node:module";
|
|
36
36
|
|
|
37
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
37
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/start.js
|
|
38
38
|
import { createHash } from "node:crypto";
|
|
39
39
|
import { existsSync, readFileSync as readFileSync2, realpathSync } from "node:fs";
|
|
40
40
|
import { dirname as dirname2, join as join2 } from "node:path";
|
|
41
41
|
import { fileURLToPath } from "node:url";
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/launcher.js
|
|
44
44
|
import { readFileSync } from "node:fs";
|
|
45
45
|
import { basename, dirname, join, resolve } from "node:path";
|
|
46
46
|
var posix = /* @__PURE__ */ __name((path) => path.replaceAll("\\", "/"), "posix");
|
|
@@ -126,7 +126,7 @@ var ensureLauncher = /* @__PURE__ */ __name(({ dir, program, platform }) => {
|
|
|
126
126
|
}
|
|
127
127
|
}, "ensureLauncher");
|
|
128
128
|
|
|
129
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
129
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/start.js
|
|
130
130
|
var wcatStart = /* @__PURE__ */ __name(async (tool, io = {}) => {
|
|
131
131
|
const argv = io.argv ?? process.argv;
|
|
132
132
|
const env = io.env ?? process.env;
|
|
@@ -139,7 +139,7 @@ var wcatStart = /* @__PURE__ */ __name(async (tool, io = {}) => {
|
|
|
139
139
|
return { code: 0 };
|
|
140
140
|
}
|
|
141
141
|
if (first === DISPATCH_FLAG) {
|
|
142
|
-
const { runWcat } = await import("./dispatch-
|
|
142
|
+
const { runWcat } = await import("./dispatch-2GY6JIJH.js");
|
|
143
143
|
const code = await runWcat(rest, { env, platform, stdout, stderr: io.stderr ?? process.stderr, self: tool });
|
|
144
144
|
return { code };
|
|
145
145
|
}
|
|
@@ -179,7 +179,7 @@ var wcat = await wcatStart(DESKTOP);
|
|
|
179
179
|
if (wcat.code !== void 0) {
|
|
180
180
|
process.exitCode = wcat.code;
|
|
181
181
|
} else {
|
|
182
|
-
const { run } = await import("./program-
|
|
182
|
+
const { run } = await import("./program-Y7JAB6TG.js");
|
|
183
183
|
process.exitCode = await run(process.argv.slice(2));
|
|
184
184
|
}
|
|
185
185
|
stopCatching();
|
|
@@ -3,16 +3,16 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
ownerLogin,
|
|
5
5
|
revokeAll
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KM6WHPHI.js";
|
|
7
7
|
import "./chunk-5D4AEUVA.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-BNPTZ5ZB.js";
|
|
9
|
+
import "./chunk-2F4QQ7WB.js";
|
|
10
|
+
import "./chunk-Z56QFOBR.js";
|
|
11
|
+
import "./chunk-3AL7QUS3.js";
|
|
12
|
+
import "./chunk-4IPURN72.js";
|
|
13
13
|
import "./chunk-XYIT2XB3.js";
|
|
14
14
|
import "./chunk-Y5E2WNWB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-5RDNBG7D.js";
|
|
16
16
|
import "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
export {
|
|
18
18
|
ownerLogin,
|
|
@@ -6,13 +6,13 @@ 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-LAYPFBOM.js";
|
|
10
|
+
import "./chunk-4HWJOU7N.js";
|
|
11
|
+
import "./chunk-3AL7QUS3.js";
|
|
12
|
+
import "./chunk-4IPURN72.js";
|
|
13
13
|
import "./chunk-XYIT2XB3.js";
|
|
14
14
|
import "./chunk-Y5E2WNWB.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-5RDNBG7D.js";
|
|
16
16
|
import "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
export {
|
|
18
18
|
CAPABILITY_STATEMENTS,
|
|
@@ -3,46 +3,47 @@ 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-GZOUFX3C.js";
|
|
7
|
+
import "./chunk-DH5PRHT4.js";
|
|
8
8
|
import {
|
|
9
9
|
OPENAI_URL,
|
|
10
10
|
refuseModelAddress
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RV64YUQX.js";
|
|
12
12
|
import {
|
|
13
|
-
endpointFetch
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
endpointFetch,
|
|
14
|
+
onThisComputer
|
|
15
|
+
} from "./chunk-2F6VO5HA.js";
|
|
16
|
+
import "./chunk-B7ON6KPT.js";
|
|
17
|
+
import "./chunk-ODBZNSZ6.js";
|
|
17
18
|
import {
|
|
18
19
|
OPENAI_TRANSCRIBE_MODEL,
|
|
19
20
|
VAD,
|
|
20
21
|
filesPresent,
|
|
21
22
|
modelsDirectory,
|
|
22
23
|
vadPath
|
|
23
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-D7QSEEYW.js";
|
|
24
25
|
import {
|
|
25
26
|
providerWaitMs
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
27
|
+
} from "./chunk-NQWV4WQO.js";
|
|
28
|
+
import "./chunk-WF4D56CA.js";
|
|
28
29
|
import {
|
|
29
30
|
DEFAULT_RETRY,
|
|
30
31
|
backoffMs
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-3AL7QUS3.js";
|
|
33
|
+
import "./chunk-4IPURN72.js";
|
|
33
34
|
import "./chunk-XYIT2XB3.js";
|
|
34
35
|
import "./chunk-Y5E2WNWB.js";
|
|
35
36
|
import {
|
|
36
37
|
CliError
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5RDNBG7D.js";
|
|
38
39
|
import {
|
|
39
40
|
__name
|
|
40
41
|
} from "./chunk-ZVVMGPBJ.js";
|
|
41
42
|
|
|
42
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
43
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
43
44
|
import { setTimeout as wait } from "node:timers/promises";
|
|
44
45
|
|
|
45
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
46
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
46
47
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
47
48
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
48
49
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -63,7 +64,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
63
64
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
64
65
|
}, "encodeWav");
|
|
65
66
|
|
|
66
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
67
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
67
68
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
68
69
|
var JOINED_SECONDS = 0.2;
|
|
69
70
|
var PAD_SECONDS = 0.2;
|
|
@@ -118,27 +119,28 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
118
119
|
const retry = options.retry ?? RETRY;
|
|
119
120
|
const sleep = options.sleep ?? sleeping;
|
|
120
121
|
const random = options.random ?? Math.random;
|
|
122
|
+
const who = options.label ?? "OpenAI";
|
|
121
123
|
for (let attempt = 1; ; attempt++) {
|
|
122
124
|
interrupted(options.signal);
|
|
123
125
|
let response;
|
|
124
126
|
try {
|
|
125
127
|
response = await post(url, {
|
|
126
128
|
method: "POST",
|
|
127
|
-
headers: { authorization: `Bearer ${options.apiKey}` },
|
|
129
|
+
headers: options.apiKey ? { authorization: `Bearer ${options.apiKey}` } : {},
|
|
128
130
|
body: formOf(wav, options),
|
|
129
131
|
...options.signal ? { signal: options.signal } : {}
|
|
130
132
|
});
|
|
131
133
|
} catch {
|
|
132
134
|
interrupted(options.signal);
|
|
133
135
|
if (attempt > retry.retries)
|
|
134
|
-
throw new CliError("network_error",
|
|
136
|
+
throw new CliError("network_error", `${who} could not be reached`, { reason: "network.failed" });
|
|
135
137
|
await sleep(backoffMs(attempt, retry, random), options.signal);
|
|
136
138
|
continue;
|
|
137
139
|
}
|
|
138
140
|
if (response.ok) {
|
|
139
141
|
const body = await response.json().catch(() => interrupted(options.signal));
|
|
140
142
|
if (typeof body?.text !== "string")
|
|
141
|
-
throw new CliError("invalid_response",
|
|
143
|
+
throw new CliError("invalid_response", `${who} answered without a transcript`, {
|
|
142
144
|
reason: "provider.invalid-response"
|
|
143
145
|
});
|
|
144
146
|
return body.text.trim();
|
|
@@ -147,15 +149,15 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
147
149
|
const status = response.status;
|
|
148
150
|
const said = `HTTP ${status}${code ? `, ${code}` : type ? `, ${type}` : ""}`;
|
|
149
151
|
if (status === 401)
|
|
150
|
-
throw new CliError("authentication_error",
|
|
152
|
+
throw new CliError("authentication_error", `${who} refused the key (${said}) \u2014 set it again with \`${options.keyHint ?? "models keys set openai"}\``, { reason: "auth.failed" });
|
|
151
153
|
if (status === 403)
|
|
152
|
-
throw new CliError("permission_error",
|
|
154
|
+
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" });
|
|
153
155
|
if (status === 413)
|
|
154
|
-
throw new CliError("validation_error",
|
|
156
|
+
throw new CliError("validation_error", `${who} refused the audio as too large (${said})`, {
|
|
155
157
|
reason: "transcription.too-large"
|
|
156
158
|
});
|
|
157
159
|
if (EXHAUSTED.has(code ?? "") || EXHAUSTED.has(type ?? ""))
|
|
158
|
-
throw new CliError("permission_error",
|
|
160
|
+
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" });
|
|
159
161
|
const again = status === 408 || status === 429 || status >= 500;
|
|
160
162
|
const asked = providerWaitMs(response.headers, () => /* @__PURE__ */ new Date());
|
|
161
163
|
if (again && attempt <= retry.retries && (asked === void 0 || asked <= retry.maxRetryAfterMs)) {
|
|
@@ -163,13 +165,13 @@ var send = /* @__PURE__ */ __name(async (wav, options) => {
|
|
|
163
165
|
continue;
|
|
164
166
|
}
|
|
165
167
|
if (status === 429)
|
|
166
|
-
throw new CliError("rate_limited",
|
|
168
|
+
throw new CliError("rate_limited", `${who} answered ${said}`, {
|
|
167
169
|
reason: "provider.rate-limited",
|
|
168
170
|
...asked === void 0 ? {} : { retry_after_ms: asked }
|
|
169
171
|
});
|
|
170
172
|
if (status >= 500)
|
|
171
|
-
throw new CliError([502, 503, 504].includes(status) ? "provider_unavailable" : "provider_error",
|
|
172
|
-
throw new CliError("provider_error",
|
|
173
|
+
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" });
|
|
174
|
+
throw new CliError("provider_error", `${who} answered ${said}`, { reason: "provider.refused" });
|
|
173
175
|
}
|
|
174
176
|
}, "send");
|
|
175
177
|
var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
@@ -186,7 +188,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
186
188
|
return pieces;
|
|
187
189
|
}, "piecesOf");
|
|
188
190
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
189
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
191
|
+
const { openSpeechCutter } = await import("./recognize-2MZAYHAA.js");
|
|
190
192
|
return openSpeechCutter(vadModel);
|
|
191
193
|
}, "openCutter");
|
|
192
194
|
var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
@@ -196,7 +198,7 @@ var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
|
196
198
|
}, "checkKeywords");
|
|
197
199
|
var transcribeOpenAI = /* @__PURE__ */ __name(async (audio, options) => {
|
|
198
200
|
refuseModelAddress(options.env ?? process.env, options.baseUrl ?? OPENAI_URL, "audio");
|
|
199
|
-
if (!options.apiKey)
|
|
201
|
+
if (!options.apiKey && !onThisComputer(options.baseUrl ?? OPENAI_URL))
|
|
200
202
|
throw new CliError("authentication_error", "no OpenAI key \u2014 `models keys set openai`, or OPENAI_API_KEY", {
|
|
201
203
|
reason: "transcription.no-key"
|
|
202
204
|
});
|
|
@@ -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.673.0_@wirecat+cli-base@0.102.1_commander@15.0.0_esbuild@0.28.2_typ_d24fa0f4f3b37e009a0e8224eb6a2687/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";
|