@wirecat/notion-cli 0.1.0 → 0.3.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 +69 -0
- package/README.md +14 -4
- package/contracts/wirecat.json +698 -1
- package/dist/bin/notion.js +2 -2
- package/dist/bundle/{all-profiles-OETMCOLN.js → all-profiles-4IONYZB6.js} +10 -10
- package/dist/bundle/{anthropic-5Y3O2TYM.js → anthropic-OXF74J4P.js} +6 -6
- package/dist/bundle/{app-server-IVWBIVHC.js → app-server-M2VF6ABM.js} +61 -52
- package/dist/bundle/{bun-EO636SAD.js → bun-DLA6QRLL.js} +2 -2
- package/dist/bundle/{bun-sqlite-C2T7QJ2M.js → bun-sqlite-F4BYLW3F.js} +7 -7
- package/dist/bundle/{chunk-QBC23NHD.js → chunk-2MHMKNWD.js} +1 -1
- package/dist/bundle/{chunk-TSCIIXN3.js → chunk-4KUJTSHG.js} +2 -2
- package/dist/bundle/{chunk-24FAYAML.js → chunk-4TQVZXOV.js} +3 -3
- package/dist/bundle/{chunk-FF4DDBCB.js → chunk-5LBJNTEJ.js} +6 -6
- package/dist/bundle/chunk-5UA2TYMI.js +29 -0
- package/dist/bundle/{chunk-DIM5YWBU.js → chunk-5XP4KQ2F.js} +1 -1
- package/dist/bundle/{chunk-WM7663C2.js → chunk-6GN7KU7X.js} +9 -9
- package/dist/bundle/chunk-6JBLIQQN.js +16 -0
- package/dist/bundle/{chunk-CLG2ISQH.js → chunk-7NF3V5L2.js} +4 -4
- package/dist/bundle/{chunk-TR7R5DL4.js → chunk-7NGFGFE5.js} +12 -63
- package/dist/bundle/{chunk-YA4LSSDZ.js → chunk-7NVPM55S.js} +2913 -2371
- package/dist/bundle/{chunk-XC5CKHX2.js → chunk-7YZPBAQX.js} +1 -1
- package/dist/bundle/{chunk-RSIS7BR7.js → chunk-AYU5TFDU.js} +21 -21
- package/dist/bundle/{chunk-64D5VUZ4.js → chunk-BEPFGITI.js} +68 -64
- package/dist/bundle/{chunk-HRTIRRXR.js → chunk-CBGBFAYJ.js} +41 -6
- package/dist/bundle/{chunk-QC3KOJT4.js → chunk-CDGZZNGY.js} +6 -6
- package/dist/bundle/{chunk-JK44XO2S.js → chunk-CIVXTBJY.js} +56 -56
- package/dist/bundle/{chunk-OWJDC4CB.js → chunk-COH7OEER.js} +14 -13
- package/dist/bundle/{chunk-XL2HXHP3.js → chunk-D6RCRBDH.js} +2 -2
- package/dist/bundle/{chunk-47R43UVJ.js → chunk-EQPAZ33O.js} +19 -19
- package/dist/bundle/{chunk-AE2KQ37N.js → chunk-EY6S7FV3.js} +6 -6
- package/dist/bundle/chunk-FEMHUSGO.js +88 -0
- package/dist/bundle/{chunk-NLDYZBTC.js → chunk-FSJHASRQ.js} +1146 -2555
- package/dist/bundle/chunk-GBFEEHQC.js +385 -0
- package/dist/bundle/{chunk-IQWEJEB5.js → chunk-GCCPFKSU.js} +26264 -21086
- package/dist/bundle/{chunk-RDZ7SVBZ.js → chunk-GK4GLPG2.js} +3 -3
- package/dist/bundle/{chunk-B2XKEEFX.js → chunk-GSNE7OB4.js} +4 -4
- package/dist/bundle/{chunk-UWW24JQF.js → chunk-HTKSCSJU.js} +4 -4
- package/dist/bundle/{chunk-7FII4DCE.js → chunk-IJMFG7HB.js} +7 -7
- package/dist/bundle/{chunk-WVZFXI36.js → chunk-JIRRF6BM.js} +4 -4
- package/dist/bundle/{chunk-ST2UC7FS.js → chunk-JODE2XED.js} +31 -27
- package/dist/bundle/{chunk-CWVAYQXI.js → chunk-K5I64ZVI.js} +9 -9
- package/dist/bundle/chunk-KFVDL2QS.js +146 -0
- package/dist/bundle/{chunk-JKIN5TOU.js → chunk-KL3P5TQK.js} +4 -4
- package/dist/bundle/chunk-L62XTC7N.js +726 -0
- package/dist/bundle/chunk-L6H7PY4X.js +170 -0
- package/dist/bundle/{chunk-F6MLJ3V5.js → chunk-LIQMUDIZ.js} +2 -2
- package/dist/bundle/{chunk-HWRKURQH.js → chunk-M2EEIYBU.js} +2 -2
- package/dist/bundle/chunk-M6DGZ2O6.js +823 -0
- package/dist/bundle/chunk-MGUEZYFA.js +5546 -0
- package/dist/bundle/{chunk-UWIA2G6Q.js → chunk-MRA62W5K.js} +404 -537
- package/dist/bundle/{chunk-XYIT2XB3.js → chunk-MVA5HVKL.js} +20 -0
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-NO2LIHWA.js} +1 -1
- package/dist/bundle/{chunk-ESZT4WW3.js → chunk-OCDJ4FFA.js} +4 -4
- package/dist/bundle/{chunk-B4B65XIO.js → chunk-OI5DWZJG.js} +3 -3
- package/dist/bundle/chunk-P3P6DA6K.js +259 -0
- package/dist/bundle/chunk-QX3TPFEX.js +1977 -0
- package/dist/bundle/{chunk-EU5WCOMQ.js → chunk-R6SDRSZK.js} +76 -35
- package/dist/bundle/{chunk-K5TWMQSY.js → chunk-RMJMID5D.js} +8 -8
- package/dist/bundle/{chunk-RLSFOR2D.js → chunk-SGBS5QCU.js} +4 -4
- package/dist/bundle/{chunk-3D3PFXBP.js → chunk-T5UNSFES.js} +10 -15
- package/dist/bundle/{chunk-RAZKIHGH.js → chunk-TFNRCCGR.js} +4 -4
- package/dist/bundle/{chunk-WK3OSDNV.js → chunk-TJCPTRYD.js} +7 -7
- package/dist/bundle/{chunk-BWICUW7W.js → chunk-TXONV3HW.js} +2 -2
- package/dist/bundle/{chunk-AQZO3ITW.js → chunk-TZ2QJ53V.js} +2 -2
- package/dist/bundle/{chunk-35K5T6WV.js → chunk-UKE3CGHK.js} +1 -1
- package/dist/bundle/{chunk-7N5QB6NL.js → chunk-UROEWCOG.js} +5 -3
- package/dist/bundle/chunk-WHJWURZB.js +335 -0
- package/dist/bundle/{chunk-R6ZM45NF.js → chunk-WU3XHGOB.js} +185 -57
- package/dist/bundle/{chunk-2YR3RYT4.js → chunk-WZEEEQGC.js} +3 -3
- package/dist/bundle/{chunk-B2WFKFYL.js → chunk-XCTOCVMW.js} +20 -116
- package/dist/bundle/chunk-XFLCVHSQ.js +50 -0
- package/dist/bundle/{chunk-EGTBL3MJ.js → chunk-Y5LAJWR5.js} +1 -1
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-YAPDU3SV.js} +1 -1
- package/dist/bundle/{chunk-WWMB4UHF.js → chunk-YFWLHTNO.js} +1 -1
- package/dist/bundle/{chunk-KHOVVPLC.js → chunk-YGCI3DHS.js} +1 -1
- package/dist/bundle/{chunk-4GC5DBHW.js → chunk-Z53LYX4M.js} +3 -3
- package/dist/bundle/{chunk-EPAZ7DJB.js → chunk-ZC6ZQQ55.js} +48 -45
- package/dist/bundle/command-contract-UBXS6NHI.js +38 -0
- package/dist/bundle/{command-server-entry-A66DJ3MH.js → command-server-entry-2SORMVRM.js} +27 -24
- package/dist/bundle/decode-5O7IEFPN.js +297 -0
- package/dist/bundle/{dispatch-FEKU5UXC.js → dispatch-YHQX6FEJ.js} +8 -8
- package/dist/bundle/{dist-YFKABFFF.js → dist-ILNOLGYN.js} +1 -1
- package/dist/bundle/{echarts-XD2JSWU4.js → echarts-ARLMVQC7.js} +2 -2
- package/dist/bundle/{embed-F3HYGAF7.js → embed-FUDUKQ3K.js} +7 -7
- package/dist/bundle/{embedder-GSEDDUH7.js → embedder-HDRV7GX3.js} +10 -10
- package/dist/bundle/{failure-HDJLR2YJ.js → failure-JHXICWIL.js} +3 -3
- package/dist/bundle/first-run-BGEFTXOE.js +29 -0
- package/dist/bundle/first-screen-F5F3VS6Y.js +38 -0
- package/dist/bundle/{instructions-NZGJ4FW5.js → instructions-MEFIKCDI.js} +1 -1
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-VMS6PBCU.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-HNSS3FQY.js +24 -0
- package/dist/bundle/meeting-model-REZVYGQW.js +26 -0
- package/dist/bundle/meeting-semantic-R4CSLVRG.js +22 -0
- package/dist/bundle/micromark-extension-gfm-5X7YT43T.js +1838 -0
- package/dist/bundle/{node-RPKPDYQS.js → node-MAQALPLA.js} +2 -2
- package/dist/bundle/{node-sqlite-KH2UUYVO.js → node-sqlite-J7IJYNBO.js} +8 -8
- package/dist/bundle/notion.js +14 -14
- package/dist/bundle/{oauth-NKAI7TQD.js → oauth-AMV4YGJD.js} +8 -8
- package/dist/bundle/{open-WSAEAA2V.js → open-AB27MTGR.js} +6 -6
- package/dist/bundle/{openai-JPVDGHG5.js → openai-D77MU5XV.js} +31 -29
- package/dist/bundle/{process-5ZFVKOQX.js → process-SIOWTRJ6.js} +1 -1
- package/dist/bundle/{program-M3D56D6T.js → program-QC5MX4ZJ.js} +7533 -1997
- package/dist/bundle/{prompt-FROYQ5LV.js → prompt-W77YDHA6.js} +6 -6
- package/dist/bundle/{recognize-NYCHQMCX.js → recognize-3JAXQQ36.js} +5 -5
- package/dist/bundle/{remote-4OERF3Z4.js → remote-PSOJXCXO.js} +11 -11
- package/dist/bundle/{rerank-TEGXFUWY.js → rerank-EE44ZTGL.js} +8 -8
- package/dist/bundle/{schemas-MZNNOEYN.js → schemas-LBYUMBC6.js} +2 -2
- package/dist/bundle/{serve-HLYYBAXY.js → serve-XJMGAMFW.js} +10 -10
- package/dist/bundle/{server-D5OYNEUW.js → server-ASU6CP5R.js} +53 -44
- package/dist/bundle/server-WSPQ5EOA.js +72 -0
- package/dist/bundle/services-PT4PA4J6.js +588 -0
- package/dist/bundle/{sqlite-runtime-H2S5RR2F.js → sqlite-runtime-YHXRTVXE.js} +7 -7
- package/dist/bundle/{state-OPOXCDZL.js → state-T6ZKFWGD.js} +7 -7
- package/dist/bundle/{store-NHMXEJPD.js → store-3MUCZEI3.js} +20 -14
- package/dist/bundle/{store-Y3KRLCJ7.js → store-E5EE25FY.js} +30 -21
- package/dist/bundle/store-maintenance-command-ZZ55BBBG.js +63 -0
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/api.js +13 -4
- package/dist/commands/api.js.map +1 -1
- package/dist/commands/documents.d.ts +10 -1
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +175 -5
- 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 +470 -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/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +73 -5
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +8 -0
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +15 -3
- package/dist/context.js.map +1 -1
- package/dist/generated/types.d.ts +485 -375
- package/dist/generated/types.d.ts.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 +5 -0
- package/dist/notion/errors.d.ts.map +1 -1
- package/dist/notion/errors.js +33 -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/notion/writes.d.ts +40 -0
- package/dist/notion/writes.d.ts.map +1 -0
- package/dist/notion/writes.js +112 -0
- package/dist/notion/writes.js.map +1 -0
- package/dist/program.js +2 -2
- package/dist/program.js.map +1 -1
- package/dist/sync/cursor.d.ts +93 -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 +87 -0
- package/dist/sync/files.d.ts.map +1 -0
- package/dist/sync/files.js +31 -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 +650 -271
- 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 +18 -1
- package/dist/bundle/command-contract-6G5DC2FN.js +0 -35
- package/dist/bundle/decode-7XOFRAAT.js +0 -163
- package/dist/bundle/first-run-TXNTIUSP.js +0 -28
- 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-SHTHNBHG.js} +0 -0
|
@@ -4,47 +4,50 @@ import {
|
|
|
4
4
|
COMMAND_SERVER_CONCURRENT,
|
|
5
5
|
enterCommandServer,
|
|
6
6
|
serveCommands
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RMJMID5D.js";
|
|
8
|
+
import "./chunk-YGCI3DHS.js";
|
|
8
9
|
import {
|
|
9
10
|
ensureSqlite
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-JKIN5TOU.js";
|
|
11
|
+
} from "./chunk-4KUJTSHG.js";
|
|
12
|
+
import "./chunk-KL3P5TQK.js";
|
|
13
13
|
import {
|
|
14
14
|
commandServerRequest,
|
|
15
15
|
exitCodeSet,
|
|
16
16
|
inCommandServerRequest
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-MRA62W5K.js";
|
|
18
|
+
import "./chunk-IJMFG7HB.js";
|
|
19
|
+
import "./chunk-4TQVZXOV.js";
|
|
20
|
+
import "./chunk-WHJWURZB.js";
|
|
21
|
+
import "./chunk-7YZPBAQX.js";
|
|
22
|
+
import "./chunk-HTKSCSJU.js";
|
|
22
23
|
import {
|
|
23
24
|
asOwnProcess
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-QX3TPFEX.js";
|
|
26
|
+
import "./chunk-UROEWCOG.js";
|
|
27
|
+
import "./chunk-5UA2TYMI.js";
|
|
28
|
+
import "./chunk-FSJHASRQ.js";
|
|
29
|
+
import "./chunk-WZEEEQGC.js";
|
|
30
|
+
import "./chunk-TJCPTRYD.js";
|
|
31
|
+
import "./chunk-JIRRF6BM.js";
|
|
32
|
+
import "./chunk-SHTHNBHG.js";
|
|
33
|
+
import "./chunk-CDGZZNGY.js";
|
|
34
|
+
import "./chunk-M2EEIYBU.js";
|
|
35
|
+
import "./chunk-EY6S7FV3.js";
|
|
36
|
+
import "./chunk-2MHMKNWD.js";
|
|
37
|
+
import "./chunk-AYU5TFDU.js";
|
|
35
38
|
import {
|
|
36
39
|
catchCrashes
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
40
|
+
} from "./chunk-6GN7KU7X.js";
|
|
41
|
+
import "./chunk-MVA5HVKL.js";
|
|
39
42
|
import "./chunk-Y5E2WNWB.js";
|
|
40
43
|
import {
|
|
41
44
|
CliError
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-LIQMUDIZ.js";
|
|
43
46
|
import {
|
|
44
47
|
__name
|
|
45
48
|
} from "./chunk-ZVVMGPBJ.js";
|
|
46
49
|
|
|
47
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
50
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
|
|
48
51
|
import { PassThrough } from "node:stream";
|
|
49
52
|
var route = /* @__PURE__ */ __name((stream, sink) => {
|
|
50
53
|
const original = stream.write;
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SAMPLE_RATE,
|
|
5
|
+
decodeOgg
|
|
6
|
+
} from "./chunk-GSNE7OB4.js";
|
|
7
|
+
import "./chunk-AYU5TFDU.js";
|
|
8
|
+
import "./chunk-6GN7KU7X.js";
|
|
9
|
+
import "./chunk-MVA5HVKL.js";
|
|
10
|
+
import {
|
|
11
|
+
importFrom
|
|
12
|
+
} from "./chunk-Y5E2WNWB.js";
|
|
13
|
+
import {
|
|
14
|
+
CliError
|
|
15
|
+
} from "./chunk-LIQMUDIZ.js";
|
|
16
|
+
import {
|
|
17
|
+
__name
|
|
18
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
19
|
+
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
21
|
+
import { spawn } from "node:child_process";
|
|
22
|
+
import { mkdtemp, open, readFile, rm, writeFile } from "node:fs/promises";
|
|
23
|
+
import { createRequire } from "node:module";
|
|
24
|
+
import { tmpdir } from "node:os";
|
|
25
|
+
import { join } from "node:path";
|
|
26
|
+
import { pathToFileURL } from "node:url";
|
|
27
|
+
var LONGEST_AUDIO_SECONDS = 3600;
|
|
28
|
+
var FFMPEG_TIMEOUT_MS = 12e4;
|
|
29
|
+
var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
|
|
30
|
+
var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
|
|
31
|
+
var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
|
|
32
|
+
var formatOf = /* @__PURE__ */ __name((bytes) => {
|
|
33
|
+
if (text(bytes, 0, 4) === "OggS") {
|
|
34
|
+
if (contains(bytes, "OpusHead", 128))
|
|
35
|
+
return "opus";
|
|
36
|
+
if (contains(bytes, "vorbis", 128))
|
|
37
|
+
return "vorbis";
|
|
38
|
+
return "other";
|
|
39
|
+
}
|
|
40
|
+
if (text(bytes, 0, 4) === "fLaC")
|
|
41
|
+
return "flac";
|
|
42
|
+
const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
|
|
43
|
+
if (text(bytes, 0, 3) === "ID3" || frame)
|
|
44
|
+
return "mp3";
|
|
45
|
+
return "other";
|
|
46
|
+
}, "formatOf");
|
|
47
|
+
var everyChannel = /* @__PURE__ */ __name((decoded) => {
|
|
48
|
+
if (!decoded.channelData[0] || decoded.samplesDecoded === 0)
|
|
49
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
50
|
+
return decoded.channelData.map((samples) => ({ samples, rate: decoded.sampleRate }));
|
|
51
|
+
}, "everyChannel");
|
|
52
|
+
var load = /* @__PURE__ */ __name((name) => importFrom(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href, pathToFileURL(createRequire(new URL("speech/decode.js", import.meta.resolve("@wirecat/cli-core")).href).resolve(name)).href), "load");
|
|
53
|
+
var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
|
|
54
|
+
const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
|
|
55
|
+
const decoder = new OggVorbisDecoder();
|
|
56
|
+
await decoder.ready;
|
|
57
|
+
try {
|
|
58
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
59
|
+
} finally {
|
|
60
|
+
decoder.free();
|
|
61
|
+
}
|
|
62
|
+
}, "decodeVorbis");
|
|
63
|
+
var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
|
|
64
|
+
const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
|
|
65
|
+
const decoder = new FLACDecoder();
|
|
66
|
+
await decoder.ready;
|
|
67
|
+
try {
|
|
68
|
+
return everyChannel(await decoder.decodeFile(bytes));
|
|
69
|
+
} finally {
|
|
70
|
+
decoder.free();
|
|
71
|
+
}
|
|
72
|
+
}, "decodeFlac");
|
|
73
|
+
var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
|
|
74
|
+
const { MPEGDecoder } = await load("mpg123-decoder");
|
|
75
|
+
const decoder = new MPEGDecoder();
|
|
76
|
+
await decoder.ready;
|
|
77
|
+
try {
|
|
78
|
+
return everyChannel(decoder.decode(bytes));
|
|
79
|
+
} finally {
|
|
80
|
+
decoder.free();
|
|
81
|
+
}
|
|
82
|
+
}, "decodeMp3");
|
|
83
|
+
var tooLongError = /* @__PURE__ */ __name(() => new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`), "tooLongError");
|
|
84
|
+
var FLOAT = 3;
|
|
85
|
+
var LONGEST_HEADER = 64 * 1024;
|
|
86
|
+
var EXTENSIBLE = 65534;
|
|
87
|
+
var wavStream = /* @__PURE__ */ __name((most) => {
|
|
88
|
+
let head = Buffer.alloc(0);
|
|
89
|
+
let channels = 0;
|
|
90
|
+
let rate = 0;
|
|
91
|
+
let rest = Buffer.alloc(0);
|
|
92
|
+
let length = 0;
|
|
93
|
+
let parts = [];
|
|
94
|
+
const header = /* @__PURE__ */ __name(() => {
|
|
95
|
+
if (head.length < 12)
|
|
96
|
+
return false;
|
|
97
|
+
if (head.toString("latin1", 0, 4) !== "RIFF" || head.toString("latin1", 8, 12) !== "WAVE")
|
|
98
|
+
throw new CliError("validation_error", "ffmpeg did not answer with WAV audio");
|
|
99
|
+
for (let at = 12; at + 8 <= head.length; ) {
|
|
100
|
+
const id = head.toString("latin1", at, at + 4);
|
|
101
|
+
const size = head.readUInt32LE(at + 4);
|
|
102
|
+
if (id === "data") {
|
|
103
|
+
rest = head.subarray(at + 8);
|
|
104
|
+
head = Buffer.alloc(0);
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
if (at + 8 + size > head.length)
|
|
108
|
+
return false;
|
|
109
|
+
if (id === "fmt ") {
|
|
110
|
+
const tag = head.readUInt16LE(at + 8);
|
|
111
|
+
channels = head.readUInt16LE(at + 10);
|
|
112
|
+
rate = head.readUInt32LE(at + 12);
|
|
113
|
+
if (tag !== FLOAT && tag !== EXTENSIBLE || head.readUInt16LE(at + 22) !== 32 || channels < 1)
|
|
114
|
+
throw new CliError("validation_error", "ffmpeg did not answer with 32-bit float samples");
|
|
115
|
+
parts = Array.from({ length: channels }, () => []);
|
|
116
|
+
}
|
|
117
|
+
at += 8 + size + size % 2;
|
|
118
|
+
}
|
|
119
|
+
return false;
|
|
120
|
+
}, "header");
|
|
121
|
+
return {
|
|
122
|
+
push: /* @__PURE__ */ __name((chunk) => {
|
|
123
|
+
if (channels === 0 || head.length > 0) {
|
|
124
|
+
head = Buffer.concat([head, chunk]);
|
|
125
|
+
if (head.length > LONGEST_HEADER)
|
|
126
|
+
throw new CliError("validation_error", "ffmpeg's WAV header never ended");
|
|
127
|
+
if (!header())
|
|
128
|
+
return true;
|
|
129
|
+
chunk = Buffer.alloc(0);
|
|
130
|
+
}
|
|
131
|
+
const bytes = rest.length ? Buffer.concat([rest, chunk]) : chunk;
|
|
132
|
+
const frame = channels * 4;
|
|
133
|
+
const frames = Math.floor(bytes.length / frame);
|
|
134
|
+
rest = Buffer.from(bytes.subarray(frames * frame));
|
|
135
|
+
if (frames === 0)
|
|
136
|
+
return length <= most;
|
|
137
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, frames * frame);
|
|
138
|
+
for (let channel = 0; channel < channels; channel++) {
|
|
139
|
+
const samples = new Float32Array(frames);
|
|
140
|
+
for (let index = 0; index < frames; index++)
|
|
141
|
+
samples[index] = view.getFloat32(index * frame + channel * 4, true);
|
|
142
|
+
parts[channel]?.push(samples);
|
|
143
|
+
}
|
|
144
|
+
length += frames;
|
|
145
|
+
return length <= most;
|
|
146
|
+
}, "push"),
|
|
147
|
+
end: /* @__PURE__ */ __name(() => {
|
|
148
|
+
if (channels === 0)
|
|
149
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
150
|
+
return parts.map((pieces, channel) => {
|
|
151
|
+
const samples = new Float32Array(length);
|
|
152
|
+
let at = 0;
|
|
153
|
+
for (const piece of pieces) {
|
|
154
|
+
samples.set(piece, at);
|
|
155
|
+
at += piece.length;
|
|
156
|
+
}
|
|
157
|
+
parts[channel] = [];
|
|
158
|
+
return { samples, rate };
|
|
159
|
+
});
|
|
160
|
+
}, "end")
|
|
161
|
+
};
|
|
162
|
+
}, "wavStream");
|
|
163
|
+
var runFfmpegFile = /* @__PURE__ */ __name((path) => new Promise((resolve, reject) => {
|
|
164
|
+
const child = spawn("ffmpeg", [
|
|
165
|
+
"-nostdin",
|
|
166
|
+
"-hide_banner",
|
|
167
|
+
"-loglevel",
|
|
168
|
+
"error",
|
|
169
|
+
"-protocol_whitelist",
|
|
170
|
+
"file",
|
|
171
|
+
"-format_whitelist",
|
|
172
|
+
FFMPEG_FORMATS,
|
|
173
|
+
"-i",
|
|
174
|
+
path,
|
|
175
|
+
"-vn",
|
|
176
|
+
"-af",
|
|
177
|
+
"aformat=channel_layouts=mono|stereo",
|
|
178
|
+
"-ar",
|
|
179
|
+
String(SAMPLE_RATE),
|
|
180
|
+
"-c:a",
|
|
181
|
+
"pcm_f32le",
|
|
182
|
+
"-bitexact",
|
|
183
|
+
"-f",
|
|
184
|
+
"wav",
|
|
185
|
+
"pipe:1"
|
|
186
|
+
], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
|
|
187
|
+
const wav = wavStream(LONGEST_AUDIO_SECONDS * SAMPLE_RATE);
|
|
188
|
+
let long = false;
|
|
189
|
+
let broken;
|
|
190
|
+
let errors = "";
|
|
191
|
+
child.stdout.on("data", (chunk) => {
|
|
192
|
+
if (long || broken)
|
|
193
|
+
return;
|
|
194
|
+
try {
|
|
195
|
+
long = !wav.push(chunk);
|
|
196
|
+
} catch (error) {
|
|
197
|
+
broken = error;
|
|
198
|
+
}
|
|
199
|
+
if (long || broken)
|
|
200
|
+
child.kill();
|
|
201
|
+
});
|
|
202
|
+
child.stderr.on("data", (chunk) => {
|
|
203
|
+
errors = (errors + chunk.toString()).slice(-500);
|
|
204
|
+
});
|
|
205
|
+
child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
|
|
206
|
+
child.on("close", (code) => {
|
|
207
|
+
if (long)
|
|
208
|
+
return reject(tooLongError());
|
|
209
|
+
if (broken)
|
|
210
|
+
return reject(broken);
|
|
211
|
+
if (code !== 0)
|
|
212
|
+
return reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
|
|
213
|
+
try {
|
|
214
|
+
resolve(wav.end());
|
|
215
|
+
} catch (error) {
|
|
216
|
+
reject(error);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}), "runFfmpegFile");
|
|
220
|
+
var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
|
|
221
|
+
const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
|
|
222
|
+
try {
|
|
223
|
+
const input = join(directory, "audio");
|
|
224
|
+
await writeFile(input, bytes, { mode: 384 });
|
|
225
|
+
return await runFfmpegFile(input);
|
|
226
|
+
} finally {
|
|
227
|
+
await rm(directory, { recursive: true, force: true });
|
|
228
|
+
}
|
|
229
|
+
}, "runFfmpeg");
|
|
230
|
+
var BUNDLED = {
|
|
231
|
+
opus: decodeOgg,
|
|
232
|
+
vorbis: decodeVorbis,
|
|
233
|
+
flac: decodeFlac,
|
|
234
|
+
mp3: decodeMp3
|
|
235
|
+
};
|
|
236
|
+
var tooLong = /* @__PURE__ */ __name((pcm) => pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS, "tooLong");
|
|
237
|
+
var fromFfmpeg = /* @__PURE__ */ __name((answer) => Array.isArray(answer) ? { channels: answer, mixed: false } : { channels: [answer], mixed: true }, "fromFfmpeg");
|
|
238
|
+
var decodeChannels = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
|
|
239
|
+
const format = formatOf(bytes);
|
|
240
|
+
const decoded = format === "other" ? fromFfmpeg(await ffmpeg(bytes)) : await BUNDLED[format](bytes).then((channels) => ({ channels, mixed: false }), (error) => ffmpeg(bytes).then(fromFfmpeg, () => {
|
|
241
|
+
throw error;
|
|
242
|
+
}));
|
|
243
|
+
if (decoded.channels.length === 0)
|
|
244
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
245
|
+
if (decoded.channels.some(tooLong))
|
|
246
|
+
throw tooLongError();
|
|
247
|
+
return decoded;
|
|
248
|
+
}, "decodeChannels");
|
|
249
|
+
var decodeChannelsFile = /* @__PURE__ */ __name(async (path, { maxBytes = 64 * 1024 * 1024, ffmpegFile = runFfmpegFile } = {}) => {
|
|
250
|
+
const file = await open(path, "r");
|
|
251
|
+
let start;
|
|
252
|
+
let size;
|
|
253
|
+
try {
|
|
254
|
+
size = (await file.stat()).size;
|
|
255
|
+
const head = Buffer.alloc(Math.min(size, 128));
|
|
256
|
+
await file.read(head, 0, head.length, 0);
|
|
257
|
+
start = head;
|
|
258
|
+
} finally {
|
|
259
|
+
await file.close();
|
|
260
|
+
}
|
|
261
|
+
if (formatOf(start) === "other") {
|
|
262
|
+
const channels = await ffmpegFile(path);
|
|
263
|
+
if (channels.some(tooLong))
|
|
264
|
+
throw tooLongError();
|
|
265
|
+
return { channels, mixed: false };
|
|
266
|
+
}
|
|
267
|
+
if (size > maxBytes)
|
|
268
|
+
throw new CliError("validation_error", `the audio file is larger than ${Math.round(maxBytes / 1024 / 1024)} MB`, {
|
|
269
|
+
reason: "file.too-large"
|
|
270
|
+
});
|
|
271
|
+
return decodeChannels(new Uint8Array(await readFile(path)), () => ffmpegFile(path));
|
|
272
|
+
}, "decodeChannelsFile");
|
|
273
|
+
var mixDown = /* @__PURE__ */ __name((channels) => {
|
|
274
|
+
const [first] = channels;
|
|
275
|
+
if (!first)
|
|
276
|
+
throw new CliError("validation_error", "no audio in that file");
|
|
277
|
+
if (channels.length === 1)
|
|
278
|
+
return first;
|
|
279
|
+
const length = channels.reduce((longest, { samples: samples2 }) => Math.max(longest, samples2.length), 0);
|
|
280
|
+
const samples = new Float32Array(length);
|
|
281
|
+
for (const channel of channels)
|
|
282
|
+
for (let index = 0; index < channel.samples.length; index++)
|
|
283
|
+
samples[index] = (samples[index] ?? 0) + (channel.samples[index] ?? 0) / channels.length;
|
|
284
|
+
return { samples, rate: first.rate };
|
|
285
|
+
}, "mixDown");
|
|
286
|
+
var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => mixDown((await decodeChannels(bytes, ffmpeg)).channels), "decodeAudio");
|
|
287
|
+
export {
|
|
288
|
+
LONGEST_AUDIO_SECONDS,
|
|
289
|
+
decodeAudio,
|
|
290
|
+
decodeChannels,
|
|
291
|
+
decodeChannelsFile,
|
|
292
|
+
formatOf,
|
|
293
|
+
mixDown,
|
|
294
|
+
runFfmpeg,
|
|
295
|
+
runFfmpegFile,
|
|
296
|
+
wavStream
|
|
297
|
+
};
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
parseDescribe,
|
|
15
15
|
shimFiles,
|
|
16
16
|
writeShim
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7NF3V5L2.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LIQMUDIZ.js";
|
|
22
22
|
import {
|
|
23
23
|
__name,
|
|
24
24
|
__toESM
|
|
25
25
|
} from "./chunk-ZVVMGPBJ.js";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
28
28
|
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
29
29
|
import { randomUUID } from "node:crypto";
|
|
30
30
|
import { constants } from "node:os";
|
|
31
31
|
|
|
32
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
33
33
|
import { readdirSync, statSync } from "node:fs";
|
|
34
34
|
import { join } from "node:path";
|
|
35
35
|
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
@@ -101,7 +101,7 @@ var findTools = /* @__PURE__ */ __name((search) => {
|
|
|
101
101
|
}, "findTools");
|
|
102
102
|
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
103
103
|
|
|
104
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
105
105
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
106
106
|
import { readFileSync } from "node:fs";
|
|
107
107
|
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
@@ -149,7 +149,7 @@ var baseVersion = /* @__PURE__ */ __name(() => {
|
|
|
149
149
|
}
|
|
150
150
|
}, "baseVersion");
|
|
151
151
|
|
|
152
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
153
153
|
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
154
154
|
import { basename, dirname } from "node:path";
|
|
155
155
|
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
@@ -241,7 +241,7 @@ var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(se
|
|
|
241
241
|
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
242
242
|
}), "removeShortcuts");
|
|
243
243
|
|
|
244
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
244
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
245
245
|
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
246
246
|
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
247
247
|
const installed = installedPrograms(context);
|
|
@@ -338,7 +338,7 @@ var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resol
|
|
|
338
338
|
});
|
|
339
339
|
}), "runTool");
|
|
340
340
|
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
341
|
-
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-
|
|
341
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-JHXICWIL.js");
|
|
342
342
|
const object = errorObjectOf(error);
|
|
343
343
|
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
344
344
|
`);
|
|
@@ -7509,7 +7509,7 @@ var require_dist = __commonJS({
|
|
|
7509
7509
|
}
|
|
7510
7510
|
});
|
|
7511
7511
|
|
|
7512
|
-
// common-js-names:/home/
|
|
7512
|
+
// common-js-names:/home/runner/work/notion-cli/notion-cli/node_modules/.pnpm/yaml@2.9.1/node_modules/yaml/dist/index.js
|
|
7513
7513
|
var cjs = require_dist();
|
|
7514
7514
|
var n0 = cjs["Alias"];
|
|
7515
7515
|
var n1 = cjs["CST"];
|
|
@@ -42399,7 +42399,7 @@ function install11(registers) {
|
|
|
42399
42399
|
}
|
|
42400
42400
|
__name(install11, "install");
|
|
42401
42401
|
|
|
42402
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42402
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
|
|
42403
42403
|
var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
42404
42404
|
animation: false,
|
|
42405
42405
|
backgroundColor: "#111827",
|
|
@@ -42447,7 +42447,7 @@ var echartsOption = /* @__PURE__ */ __name((chart) => ({
|
|
|
42447
42447
|
} : {}
|
|
42448
42448
|
}), "echartsOption");
|
|
42449
42449
|
|
|
42450
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
42450
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/charts/echarts.js
|
|
42451
42451
|
use([install2, install, install6, install5, install10, install7, install11]);
|
|
42452
42452
|
var echartsRenderer = {
|
|
42453
42453
|
render: /* @__PURE__ */ __name(async (chart, size) => {
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-5LBJNTEJ.js";
|
|
17
|
+
import "./chunk-JIRRF6BM.js";
|
|
18
|
+
import "./chunk-M2EEIYBU.js";
|
|
19
|
+
import "./chunk-AYU5TFDU.js";
|
|
20
|
+
import "./chunk-6GN7KU7X.js";
|
|
21
|
+
import "./chunk-MVA5HVKL.js";
|
|
22
22
|
import "./chunk-Y5E2WNWB.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-LIQMUDIZ.js";
|
|
24
24
|
import "./chunk-ZVVMGPBJ.js";
|
|
25
25
|
export {
|
|
26
26
|
WARM_IDLE_MS,
|
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-5LBJNTEJ.js";
|
|
8
|
+
import "./chunk-JIRRF6BM.js";
|
|
9
|
+
import "./chunk-M2EEIYBU.js";
|
|
10
|
+
import "./chunk-AYU5TFDU.js";
|
|
11
|
+
import "./chunk-6GN7KU7X.js";
|
|
12
|
+
import "./chunk-MVA5HVKL.js";
|
|
13
13
|
import {
|
|
14
14
|
importFrom
|
|
15
15
|
} from "./chunk-Y5E2WNWB.js";
|
|
16
16
|
import {
|
|
17
17
|
CliError
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LIQMUDIZ.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.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
24
24
|
import { readFileSync } from "node:fs";
|
|
25
25
|
import { join } from "node:path";
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
|
|
28
28
|
var SIZE = 224;
|
|
29
29
|
var MEAN = [0.48145466, 0.4578275, 0.40821073];
|
|
30
30
|
var STD = [0.26862954, 0.26130258, 0.27577711];
|
|
@@ -63,7 +63,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
|
|
|
63
63
|
return pixels;
|
|
64
64
|
}, "preprocess");
|
|
65
65
|
|
|
66
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
66
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.680.0_@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typ_620ac9b386657c249f5c9038159a7caa/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
67
67
|
var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
|
|
68
68
|
const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
|
|
69
69
|
const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
mcpErrorResult,
|
|
10
10
|
renderError,
|
|
11
11
|
retryOf
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-6GN7KU7X.js";
|
|
13
|
+
import "./chunk-MVA5HVKL.js";
|
|
14
|
+
import "./chunk-LIQMUDIZ.js";
|
|
15
15
|
import "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
export {
|
|
17
17
|
catchCrashes,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
askSetupQuestions,
|
|
5
|
+
asksAtStart,
|
|
6
|
+
setupAtStart,
|
|
7
|
+
systemLanguage
|
|
8
|
+
} from "./chunk-COH7OEER.js";
|
|
9
|
+
import "./chunk-OCDJ4FFA.js";
|
|
10
|
+
import "./chunk-NO2LIHWA.js";
|
|
11
|
+
import "./chunk-4TQVZXOV.js";
|
|
12
|
+
import "./chunk-T5UNSFES.js";
|
|
13
|
+
import "./chunk-6JBLIQQN.js";
|
|
14
|
+
import "./chunk-TJCPTRYD.js";
|
|
15
|
+
import "./chunk-YAPDU3SV.js";
|
|
16
|
+
import "./chunk-D72URWJE.js";
|
|
17
|
+
import "./chunk-M2EEIYBU.js";
|
|
18
|
+
import "./chunk-AYU5TFDU.js";
|
|
19
|
+
import "./chunk-6GN7KU7X.js";
|
|
20
|
+
import "./chunk-MVA5HVKL.js";
|
|
21
|
+
import "./chunk-Y5E2WNWB.js";
|
|
22
|
+
import "./chunk-LIQMUDIZ.js";
|
|
23
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
24
|
+
export {
|
|
25
|
+
askSetupQuestions,
|
|
26
|
+
asksAtStart,
|
|
27
|
+
setupAtStart,
|
|
28
|
+
systemLanguage
|
|
29
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
firstScreen,
|
|
5
|
+
installHelp
|
|
6
|
+
} from "./chunk-7NGFGFE5.js";
|
|
7
|
+
import "./chunk-EH6ZEJGT.js";
|
|
8
|
+
import {
|
|
9
|
+
WIRECAT_TOOLS
|
|
10
|
+
} from "./chunk-FEMHUSGO.js";
|
|
11
|
+
import "./chunk-KL3P5TQK.js";
|
|
12
|
+
import "./chunk-MRA62W5K.js";
|
|
13
|
+
import "./chunk-IJMFG7HB.js";
|
|
14
|
+
import "./chunk-4TQVZXOV.js";
|
|
15
|
+
import "./chunk-WHJWURZB.js";
|
|
16
|
+
import "./chunk-7YZPBAQX.js";
|
|
17
|
+
import "./chunk-HTKSCSJU.js";
|
|
18
|
+
import "./chunk-QX3TPFEX.js";
|
|
19
|
+
import "./chunk-UROEWCOG.js";
|
|
20
|
+
import "./chunk-5UA2TYMI.js";
|
|
21
|
+
import "./chunk-FSJHASRQ.js";
|
|
22
|
+
import "./chunk-WZEEEQGC.js";
|
|
23
|
+
import "./chunk-TJCPTRYD.js";
|
|
24
|
+
import "./chunk-JIRRF6BM.js";
|
|
25
|
+
import "./chunk-SHTHNBHG.js";
|
|
26
|
+
import "./chunk-CDGZZNGY.js";
|
|
27
|
+
import "./chunk-M2EEIYBU.js";
|
|
28
|
+
import "./chunk-AYU5TFDU.js";
|
|
29
|
+
import "./chunk-6GN7KU7X.js";
|
|
30
|
+
import "./chunk-MVA5HVKL.js";
|
|
31
|
+
import "./chunk-Y5E2WNWB.js";
|
|
32
|
+
import "./chunk-LIQMUDIZ.js";
|
|
33
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
34
|
+
export {
|
|
35
|
+
WIRECAT_TOOLS,
|
|
36
|
+
firstScreen,
|
|
37
|
+
installHelp
|
|
38
|
+
};
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
executableEnvironment,
|
|
5
5
|
executableOnPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NO2LIHWA.js";
|
|
7
7
|
import {
|
|
8
8
|
require_cross_spawn
|
|
9
9
|
} from "./chunk-D72URWJE.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
__toESM
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.106.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/mcp/index.js
|
|
16
16
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
17
17
|
var realRun = /* @__PURE__ */ __name((file, args) => {
|
|
18
18
|
const result = import_cross_spawn.default.sync(executableOnPath(file, process.env), args, {
|