@wirecat/tg-cli 0.120.0 → 0.122.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 +25 -3
- package/dist/bin/tg.js +2 -2
- package/dist/bundle/{adapter-OJKHXGBC.js → adapter-ZI57T2L5.js} +53 -49
- package/dist/bundle/{all-profiles-URIWNL23.js → all-profiles-7VXJF42C.js} +6 -6
- package/dist/bundle/{anthropic-YUKNB63B.js → anthropic-DKRXIWVV.js} +13 -4
- package/dist/bundle/{app-server-H5QNHGH4.js → app-server-F5MKHZ7S.js} +43 -42
- package/dist/bundle/{bot-api-27GN4Y3D.js → bot-api-F24NWJT3.js} +47 -44
- package/dist/bundle/{bot-history-VVSWLVZM.js → bot-history-U3WM3A7S.js} +12 -12
- package/dist/bundle/{bun-PAAJX3GU.js → bun-OMTJAXGK.js} +2 -2
- package/dist/bundle/{bun-sqlite-TPEBWFZH.js → bun-sqlite-HSYLO46A.js} +2 -2
- package/dist/bundle/{chunk-WLBPNLDF.js → chunk-27SVHRHV.js} +2 -2
- package/dist/bundle/{chunk-3FPFRDG2.js → chunk-2FXA32RJ.js} +6 -6
- package/dist/bundle/{chunk-4JATS2J5.js → chunk-2UHANFLM.js} +2 -2
- package/dist/bundle/{chunk-FPWXG53C.js → chunk-33ELXJRR.js} +37 -121
- package/dist/bundle/{chunk-KP26Y5OA.js → chunk-4MFMUBHH.js} +4901 -4827
- package/dist/bundle/{chunk-HDSKBXAF.js → chunk-4N2WJYLE.js} +2 -2
- package/dist/bundle/{chunk-7WS3ULOO.js → chunk-6DLRATDC.js} +1159 -801
- package/dist/bundle/{chunk-YQKEPT22.js → chunk-6LMEIELG.js} +1 -1
- package/dist/bundle/{chunk-DH7VKHTZ.js → chunk-7FWU4RON.js} +3 -3
- package/dist/bundle/{chunk-4OWY7QBE.js → chunk-7GCVON7M.js} +5 -5
- package/dist/bundle/{chunk-HIBYYKGO.js → chunk-7X6YLKTK.js} +1 -1
- package/dist/bundle/{chunk-D2WNQJUQ.js → chunk-ALW7ROTM.js} +1 -1
- package/dist/bundle/{chunk-6XHZV7AQ.js → chunk-ARKB3M5X.js} +3 -3
- package/dist/bundle/{chunk-KTV5Y5EX.js → chunk-C5CB6RIX.js} +1 -1
- package/dist/bundle/{chunk-7VNV426X.js → chunk-CB6AHU6H.js} +44 -22
- package/dist/bundle/{chunk-CGUDXNJE.js → chunk-CW3C7FSO.js} +1 -1
- package/dist/bundle/{chunk-3SANNNWS.js → chunk-D3ODL4P7.js} +2 -2
- package/dist/bundle/{chunk-34DSPJNN.js → chunk-DCGGZUNJ.js} +2 -2
- package/dist/bundle/{chunk-CYWV2RLN.js → chunk-DDSAJKPO.js} +4 -4
- package/dist/bundle/{chunk-KRCMKFUV.js → chunk-DTTONQW7.js} +1 -1
- package/dist/bundle/{chunk-PDYTNTQI.js → chunk-E3MFMMVY.js} +5 -5
- package/dist/bundle/{chunk-ZON7K5QE.js → chunk-FHWUOFWX.js} +2 -2
- package/dist/bundle/{chunk-ZRRZTPSB.js → chunk-FYHFAOPM.js} +2219 -1052
- package/dist/bundle/{chunk-H5XC2WYO.js → chunk-FZKHFTKH.js} +22 -22
- package/dist/bundle/{chunk-THJHYMFR.js → chunk-GJBGZQHN.js} +3626 -3596
- package/dist/bundle/{chunk-DDKFAUQD.js → chunk-GJFICFQB.js} +1 -1
- package/dist/bundle/{chunk-CLURRDNU.js → chunk-HAR76KJG.js} +4 -4
- package/dist/bundle/{chunk-JJY3TQTM.js → chunk-LQRZUNYF.js} +2 -2
- package/dist/bundle/{chunk-LLCGOZ44.js → chunk-MFWWZ6XL.js} +2 -2
- package/dist/bundle/{chunk-LS72R7DN.js → chunk-N7WDVH2O.js} +37 -35
- package/dist/bundle/chunk-NE3EGYPD.js +109 -0
- package/dist/bundle/{chunk-YBOVL25O.js → chunk-NU4RMUMQ.js} +16 -16
- package/dist/bundle/{chunk-JQLGS3SG.js → chunk-O5A4IS2D.js} +1 -1
- package/dist/bundle/{chunk-DE7QIEUP.js → chunk-PG3V225O.js} +30 -49
- package/dist/bundle/{chunk-WQ55F4Y3.js → chunk-QROAXWDU.js} +7 -7
- package/dist/bundle/{chunk-U2TPRUWK.js → chunk-R2IW6JBV.js} +81 -81
- package/dist/bundle/{chunk-CLTMVPGT.js → chunk-RFFU6KQ5.js} +12 -12
- package/dist/bundle/{chunk-DQTQO6PB.js → chunk-SODUFMDW.js} +1651 -948
- package/dist/bundle/{chunk-KW6JZGG3.js → chunk-TKJZENAZ.js} +1 -1
- package/dist/bundle/{chunk-B7B65ZLU.js → chunk-UGEYQWEO.js} +1 -1
- package/dist/bundle/chunk-V4BPS7MH.js +185 -0
- package/dist/bundle/{chunk-3GLLWDM6.js → chunk-VC6J7X76.js} +16 -16
- package/dist/bundle/{chunk-S6OC367D.js → chunk-VDFEWSCS.js} +2 -2
- package/dist/bundle/{chunk-KLHOQ6XQ.js → chunk-VQL4RVXZ.js} +3 -1
- package/dist/bundle/{chunk-JSEIT2WO.js → chunk-W34QQMBK.js} +1 -1
- package/dist/bundle/{chunk-MMPISXSU.js → chunk-Y52T5EMB.js} +1 -1
- package/dist/bundle/{chunk-MTD6WZKV.js → chunk-Y74WJL3M.js} +6 -6
- package/dist/bundle/chunk-YDMKP7PO.js +18 -0
- package/dist/bundle/{chunk-VUUR2SRS.js → chunk-YFEH7OWG.js} +33 -16
- package/dist/bundle/{chunk-YDROJG2Y.js → chunk-ZKHXWSKD.js} +4 -4
- package/dist/bundle/{chunk-7N4IUEX3.js → chunk-ZNPRTCUO.js} +6 -6
- package/dist/bundle/{command-contract-KW6FNOJO.js → command-contract-247AKZTE.js} +12 -12
- package/dist/bundle/command-server-entry-N32NX4QW.js +162 -0
- package/dist/bundle/{decode-RVWSCZW4.js → decode-ZKJWSFXF.js} +2 -2
- package/dist/bundle/{echarts-6VNUD3JF.js → echarts-QLVLIP73.js} +2 -2
- package/dist/bundle/{embed-LWLCQKIK.js → embed-LC6K7P3S.js} +3 -3
- package/dist/bundle/{embedder-CXKHLRJT.js → embedder-6C3OQBOV.js} +6 -6
- package/dist/bundle/{entry-HV4NSX3Z.js → entry-5H6LB3MP.js} +7 -4
- package/dist/bundle/{first-run-OPI6NIWQ.js → first-run-IOYQ4XQK.js} +5 -5
- package/dist/bundle/{first-screen-BVQLF4LN.js → first-screen-NVK7PFX4.js} +13 -13
- package/dist/bundle/{instructions-TK4HXL3A.js → instructions-SZUMEDY3.js} +1 -1
- package/dist/bundle/{node-WFPNBUCU.js → node-V76RRFIA.js} +2 -2
- package/dist/bundle/{node-sqlite-L5BRGJLK.js → node-sqlite-2DTVOT7L.js} +3 -3
- package/dist/bundle/{oauth-CGVWL35B.js → oauth-CT7EBDRY.js} +4 -4
- package/dist/bundle/{open-HLL55C5S.js → open-G3VHOOMV.js} +2 -2
- package/dist/bundle/{openai-YFCNXIJ4.js → openai-F4K7MVTZ.js} +13 -13
- package/dist/bundle/{process-4A5JP5LO.js → process-XH3KEHSF.js} +1 -1
- package/dist/bundle/{program-IFGQGSUF.js → program-FLGIHTHM.js} +63 -60
- package/dist/bundle/{prompt-B5FYE2DQ.js → prompt-JWQ6UQ6R.js} +2 -2
- package/dist/bundle/{recognize-ZHMHGIV3.js → recognize-Z26T3SYD.js} +1 -1
- package/dist/bundle/{remote-A3W5HE52.js → remote-7KHT6V3O.js} +4 -4
- package/dist/bundle/{rerank-HWJAQOZM.js → rerank-6QVI74QY.js} +4 -4
- package/dist/bundle/{serve-PP326Q2F.js → serve-WYDZTONY.js} +11 -11
- package/dist/bundle/server-UXQT7LZT.js +61 -0
- package/dist/bundle/{server-MV6CL63L.js → server-Y4J2NCFA.js} +32 -32
- package/dist/bundle/{state-Y3RJ7ZXB.js → state-YCXBKOD2.js} +3 -3
- package/dist/bundle/{store-EVNI2MHZ.js → store-QECSDJRP.js} +9 -9
- package/dist/bundle/store-maintenance-command-5YW6TRJA.js +49 -0
- package/dist/bundle/tg.js +4 -4
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/server-TZGGOJ26.js +0 -60
- package/dist/bundle/store-maintenance-command-XPQE47RE.js +0 -49
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
COMMAND_SERVER_CONCURRENT,
|
|
5
|
+
enterCommandServer,
|
|
6
|
+
serveCommands
|
|
7
|
+
} from "./chunk-V4BPS7MH.js";
|
|
8
|
+
import "./chunk-YDMKP7PO.js";
|
|
9
|
+
import {
|
|
10
|
+
ensureSqlite
|
|
11
|
+
} from "./chunk-NE3EGYPD.js";
|
|
12
|
+
import "./chunk-E3MFMMVY.js";
|
|
13
|
+
import "./chunk-VQL4RVXZ.js";
|
|
14
|
+
import "./chunk-MFWWZ6XL.js";
|
|
15
|
+
import {
|
|
16
|
+
commandServerRequest,
|
|
17
|
+
exitCodeSet,
|
|
18
|
+
inCommandServerRequest
|
|
19
|
+
} from "./chunk-GJBGZQHN.js";
|
|
20
|
+
import "./chunk-2UHANFLM.js";
|
|
21
|
+
import "./chunk-O5A4IS2D.js";
|
|
22
|
+
import "./chunk-2FXA32RJ.js";
|
|
23
|
+
import "./chunk-4N2WJYLE.js";
|
|
24
|
+
import "./chunk-GJFICFQB.js";
|
|
25
|
+
import {
|
|
26
|
+
asOwnProcess
|
|
27
|
+
} from "./chunk-4MFMUBHH.js";
|
|
28
|
+
import "./chunk-27SVHRHV.js";
|
|
29
|
+
import "./chunk-HAR76KJG.js";
|
|
30
|
+
import "./chunk-7FWU4RON.js";
|
|
31
|
+
import "./chunk-Y52T5EMB.js";
|
|
32
|
+
import "./chunk-YVNHQFLC.js";
|
|
33
|
+
import "./chunk-U6HEZPCR.js";
|
|
34
|
+
import {
|
|
35
|
+
catchCrashes
|
|
36
|
+
} from "./chunk-WGGSFGNZ.js";
|
|
37
|
+
import "./chunk-Y5E2WNWB.js";
|
|
38
|
+
import {
|
|
39
|
+
CliError
|
|
40
|
+
} from "./chunk-VUBZFMGP.js";
|
|
41
|
+
import {
|
|
42
|
+
__name
|
|
43
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
44
|
+
|
|
45
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
|
|
46
|
+
import { PassThrough } from "node:stream";
|
|
47
|
+
var route = /* @__PURE__ */ __name((stream, sink) => {
|
|
48
|
+
const original = stream.write;
|
|
49
|
+
stream.write = ((chunk, encoding, callback) => {
|
|
50
|
+
sink()(typeof chunk === "string" ? Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8") : Buffer.from(chunk));
|
|
51
|
+
const done = typeof encoding === "function" ? encoding : callback;
|
|
52
|
+
if (done)
|
|
53
|
+
process.nextTick(done);
|
|
54
|
+
return true;
|
|
55
|
+
});
|
|
56
|
+
return () => {
|
|
57
|
+
stream.write = original;
|
|
58
|
+
};
|
|
59
|
+
}, "route");
|
|
60
|
+
var closedStdin = /* @__PURE__ */ __name(() => {
|
|
61
|
+
const stdin = new PassThrough();
|
|
62
|
+
stdin.end();
|
|
63
|
+
return stdin;
|
|
64
|
+
}, "closedStdin");
|
|
65
|
+
var useStdin = /* @__PURE__ */ __name((outside) => Object.defineProperty(process, "stdin", {
|
|
66
|
+
get: /* @__PURE__ */ __name(() => commandServerRequest()?.stdin ?? outside, "get"),
|
|
67
|
+
configurable: true,
|
|
68
|
+
enumerable: true
|
|
69
|
+
}), "useStdin");
|
|
70
|
+
var roomFor = /* @__PURE__ */ __name((runs) => {
|
|
71
|
+
const emitters = [process, process.stdout, process.stderr];
|
|
72
|
+
const before = emitters.map((emitter) => emitter.getMaxListeners());
|
|
73
|
+
for (const emitter of emitters)
|
|
74
|
+
emitter.setMaxListeners(emitter.getMaxListeners() + 2 * runs);
|
|
75
|
+
return () => {
|
|
76
|
+
for (const [at, emitter] of emitters.entries())
|
|
77
|
+
emitter.setMaxListeners(before[at]);
|
|
78
|
+
};
|
|
79
|
+
}, "roomFor");
|
|
80
|
+
var serveEntry = /* @__PURE__ */ __name(async (entry, io, { firstRunAt, commanderExit }) => {
|
|
81
|
+
const release = catchCrashes({
|
|
82
|
+
cli: entry.app.command,
|
|
83
|
+
interactive: false,
|
|
84
|
+
...entry.reasons ? { reasons: entry.reasons } : {},
|
|
85
|
+
target: io.signals
|
|
86
|
+
});
|
|
87
|
+
const stopper = new AbortController();
|
|
88
|
+
const stop = /* @__PURE__ */ __name(() => stopper.abort(new CliError("cancelled", "the command server was stopped", { retryable: false })), "stop");
|
|
89
|
+
const protocol = io.stdout.write.bind(io.stdout);
|
|
90
|
+
const ownStderr = io.stderr.write.bind(io.stderr);
|
|
91
|
+
const toStderr = /* @__PURE__ */ __name((chunk) => {
|
|
92
|
+
ownStderr(chunk);
|
|
93
|
+
}, "toStderr");
|
|
94
|
+
const sink = /* @__PURE__ */ __name((pick) => () => {
|
|
95
|
+
const request = commandServerRequest();
|
|
96
|
+
return request ? (chunk) => pick(request).push(chunk) : toStderr;
|
|
97
|
+
}, "sink");
|
|
98
|
+
const unrouteOut = route(process.stdout, sink((request) => request.stdout));
|
|
99
|
+
const unrouteErr = route(process.stderr, sink((request) => request.stderr));
|
|
100
|
+
const stdin = Object.getOwnPropertyDescriptor(process, "stdin");
|
|
101
|
+
const requests = io.stdin;
|
|
102
|
+
useStdin(closedStdin());
|
|
103
|
+
const unroom = roomFor(COMMAND_SERVER_CONCURRENT);
|
|
104
|
+
io.signals.on("SIGINT", stop).on("SIGTERM", stop);
|
|
105
|
+
io.stdout.on("error", stop);
|
|
106
|
+
const run = /* @__PURE__ */ __name(async (argv, alone) => {
|
|
107
|
+
const request = { stdout: [], stderr: [], stdin: closedStdin(), alone };
|
|
108
|
+
const requestIo = { ...io, argv: [...io.argv.slice(0, 2), ...argv], stdin: request.stdin };
|
|
109
|
+
const context = {
|
|
110
|
+
args: argv,
|
|
111
|
+
env: io.env,
|
|
112
|
+
tty: false,
|
|
113
|
+
signal: stopper.signal,
|
|
114
|
+
atStart: /* @__PURE__ */ __name(async (command) => {
|
|
115
|
+
await enterCommandServer(command, entry.app.command);
|
|
116
|
+
await firstRunAt(entry, requestIo, () => true)(command);
|
|
117
|
+
}, "atStart"),
|
|
118
|
+
ask: /* @__PURE__ */ __name(async () => false, "ask"),
|
|
119
|
+
openBrowser: /* @__PURE__ */ __name(async () => void 0, "openBrowser"),
|
|
120
|
+
outputClosed: /* @__PURE__ */ __name(() => false, "outputClosed"),
|
|
121
|
+
setExitCode: /* @__PURE__ */ __name((code2) => {
|
|
122
|
+
request.exitCode = code2;
|
|
123
|
+
}, "setExitCode")
|
|
124
|
+
};
|
|
125
|
+
const code = await inCommandServerRequest(request, () => asOwnProcess(async () => {
|
|
126
|
+
try {
|
|
127
|
+
const returned = await entry.run(context);
|
|
128
|
+
return typeof returned === "number" ? returned : exitCodeSet() ?? 0;
|
|
129
|
+
} catch (error) {
|
|
130
|
+
return commanderExit(error) ?? entry.fail(error, context);
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
const text = /* @__PURE__ */ __name((chunks) => Buffer.concat(chunks).toString("utf8"), "text");
|
|
134
|
+
return { code, stdout: text(request.stdout), stderr: text(request.stderr) };
|
|
135
|
+
}, "run");
|
|
136
|
+
try {
|
|
137
|
+
if (entry.sqlite)
|
|
138
|
+
await ensureSqlite();
|
|
139
|
+
await serveCommands({
|
|
140
|
+
input: requests,
|
|
141
|
+
write: /* @__PURE__ */ __name((line) => new Promise((resolve) => protocol(line) ? resolve() : io.stdout.once("drain", resolve)), "write"),
|
|
142
|
+
run,
|
|
143
|
+
cli: entry.app.command,
|
|
144
|
+
concurrent: COMMAND_SERVER_CONCURRENT,
|
|
145
|
+
version: entry.app.version,
|
|
146
|
+
signal: stopper.signal
|
|
147
|
+
});
|
|
148
|
+
io.setExitCode(0);
|
|
149
|
+
} finally {
|
|
150
|
+
io.signals.off("SIGINT", stop).off("SIGTERM", stop);
|
|
151
|
+
unroom();
|
|
152
|
+
unrouteOut();
|
|
153
|
+
unrouteErr();
|
|
154
|
+
if (stdin)
|
|
155
|
+
Object.defineProperty(process, "stdin", stdin);
|
|
156
|
+
requests.destroy?.();
|
|
157
|
+
release();
|
|
158
|
+
}
|
|
159
|
+
}, "serveEntry");
|
|
160
|
+
export {
|
|
161
|
+
serveEntry
|
|
162
|
+
};
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
decodeOgg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ARKB3M5X.js";
|
|
7
7
|
import "./chunk-U6HEZPCR.js";
|
|
8
8
|
import "./chunk-WGGSFGNZ.js";
|
|
9
9
|
import {
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
20
20
|
import { spawn } from "node:child_process";
|
|
21
21
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
22
22
|
import { createRequire } from "node:module";
|
|
@@ -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.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/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.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/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,9 +13,9 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-7GCVON7M.js";
|
|
17
|
+
import "./chunk-7FWU4RON.js";
|
|
18
|
+
import "./chunk-Y52T5EMB.js";
|
|
19
19
|
import "./chunk-U6HEZPCR.js";
|
|
20
20
|
import "./chunk-WGGSFGNZ.js";
|
|
21
21
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-7GCVON7M.js";
|
|
8
|
+
import "./chunk-7FWU4RON.js";
|
|
9
|
+
import "./chunk-Y52T5EMB.js";
|
|
10
10
|
import "./chunk-U6HEZPCR.js";
|
|
11
11
|
import "./chunk-WGGSFGNZ.js";
|
|
12
12
|
import {
|
|
@@ -19,11 +19,11 @@ import {
|
|
|
19
19
|
__name
|
|
20
20
|
} from "./chunk-ZVVMGPBJ.js";
|
|
21
21
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
24
24
|
import { join } from "node:path";
|
|
25
25
|
|
|
26
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
|
|
27
27
|
var SIZE = 224;
|
|
28
28
|
var MEAN = [0.48145466, 0.4578275, 0.40821073];
|
|
29
29
|
var STD = [0.26862954, 0.26130258, 0.27577711];
|
|
@@ -62,7 +62,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
|
|
|
62
62
|
return pixels;
|
|
63
63
|
}, "preprocess");
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
|
|
66
66
|
var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
|
|
67
67
|
const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
|
|
68
68
|
const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
+
firstRunAt,
|
|
4
5
|
openBrowser,
|
|
5
6
|
startCli
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-33ELXJRR.js";
|
|
8
|
+
import "./chunk-NE3EGYPD.js";
|
|
9
|
+
import "./chunk-E3MFMMVY.js";
|
|
10
|
+
import "./chunk-VQL4RVXZ.js";
|
|
11
|
+
import "./chunk-GJFICFQB.js";
|
|
10
12
|
import "./chunk-U6HEZPCR.js";
|
|
11
13
|
import "./chunk-WGGSFGNZ.js";
|
|
12
14
|
import "./chunk-Y5E2WNWB.js";
|
|
13
15
|
import "./chunk-VUBZFMGP.js";
|
|
14
16
|
import "./chunk-ZVVMGPBJ.js";
|
|
15
17
|
export {
|
|
18
|
+
firstRunAt,
|
|
16
19
|
openBrowser,
|
|
17
20
|
startCli
|
|
18
21
|
};
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
asksAtStart,
|
|
6
6
|
setupAtStart,
|
|
7
7
|
systemLanguage
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VC6J7X76.js";
|
|
9
9
|
import "./chunk-7DPWVKYS.js";
|
|
10
10
|
import "./chunk-MCPOZNWG.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-WQ55F4Y3.js";
|
|
13
|
-
import "./chunk-CLURRDNU.js";
|
|
14
|
-
import "./chunk-MMPISXSU.js";
|
|
11
|
+
import "./chunk-QROAXWDU.js";
|
|
15
12
|
import "./chunk-RX5CJ55S.js";
|
|
16
13
|
import "./chunk-D72URWJE.js";
|
|
14
|
+
import "./chunk-4N2WJYLE.js";
|
|
15
|
+
import "./chunk-HAR76KJG.js";
|
|
16
|
+
import "./chunk-Y52T5EMB.js";
|
|
17
17
|
import "./chunk-U6HEZPCR.js";
|
|
18
18
|
import "./chunk-WGGSFGNZ.js";
|
|
19
19
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
WIRECAT_TOOLS,
|
|
5
5
|
firstScreen,
|
|
6
6
|
installHelp
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZNPRTCUO.js";
|
|
8
8
|
import "./chunk-2ABQZVK4.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-MFWWZ6XL.js";
|
|
10
|
+
import "./chunk-GJBGZQHN.js";
|
|
11
|
+
import "./chunk-2UHANFLM.js";
|
|
12
|
+
import "./chunk-O5A4IS2D.js";
|
|
13
|
+
import "./chunk-2FXA32RJ.js";
|
|
14
|
+
import "./chunk-4N2WJYLE.js";
|
|
15
|
+
import "./chunk-GJFICFQB.js";
|
|
16
|
+
import "./chunk-4MFMUBHH.js";
|
|
17
|
+
import "./chunk-27SVHRHV.js";
|
|
18
|
+
import "./chunk-HAR76KJG.js";
|
|
19
|
+
import "./chunk-7FWU4RON.js";
|
|
20
|
+
import "./chunk-Y52T5EMB.js";
|
|
21
21
|
import "./chunk-YVNHQFLC.js";
|
|
22
22
|
import "./chunk-U6HEZPCR.js";
|
|
23
23
|
import "./chunk-WGGSFGNZ.js";
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7X6YLKTK.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.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/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,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CW3C7FSO.js";
|
|
7
7
|
import {
|
|
8
8
|
TIME_LIMIT_FUNCTION,
|
|
9
9
|
beforeTimeLimit
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VQL4RVXZ.js";
|
|
11
11
|
import "./chunk-U6HEZPCR.js";
|
|
12
12
|
import "./chunk-WGGSFGNZ.js";
|
|
13
13
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
__name
|
|
17
17
|
} from "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
|
|
20
20
|
import { DatabaseSync } from "node:sqlite";
|
|
21
21
|
var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
|
|
22
22
|
var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
@@ -3,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
ownerLogin,
|
|
5
5
|
revokeAll
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Y74WJL3M.js";
|
|
7
|
+
import "./chunk-DDSAJKPO.js";
|
|
7
8
|
import "./chunk-5D4AEUVA.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-JQLGS3SG.js";
|
|
9
|
+
import "./chunk-FHWUOFWX.js";
|
|
10
|
+
import "./chunk-O5A4IS2D.js";
|
|
11
11
|
import "./chunk-U6HEZPCR.js";
|
|
12
12
|
import "./chunk-WGGSFGNZ.js";
|
|
13
13
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
openCache,
|
|
7
7
|
openFile,
|
|
8
8
|
storeCapable
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-E3MFMMVY.js";
|
|
10
|
+
import "./chunk-VQL4RVXZ.js";
|
|
11
11
|
import "./chunk-U6HEZPCR.js";
|
|
12
12
|
import "./chunk-WGGSFGNZ.js";
|
|
13
13
|
import "./chunk-Y5E2WNWB.js";
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
-
import {
|
|
4
|
-
providerWaitMs
|
|
5
|
-
} from "./chunk-LVGX7VTD.js";
|
|
6
3
|
import {
|
|
7
4
|
SAMPLE_RATE,
|
|
8
5
|
toModelRate
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import
|
|
6
|
+
} from "./chunk-ARKB3M5X.js";
|
|
7
|
+
import {
|
|
8
|
+
providerWaitMs
|
|
9
|
+
} from "./chunk-LVGX7VTD.js";
|
|
10
|
+
import "./chunk-RFFU6KQ5.js";
|
|
11
11
|
import {
|
|
12
12
|
OPENAI_URL
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-D3ODL4P7.js";
|
|
14
|
+
import "./chunk-7GCVON7M.js";
|
|
15
15
|
import {
|
|
16
16
|
OPENAI_TRANSCRIBE_MODEL,
|
|
17
17
|
VAD,
|
|
18
18
|
filesPresent,
|
|
19
19
|
modelsDirectory,
|
|
20
20
|
vadPath
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-7FWU4RON.js";
|
|
22
|
+
import "./chunk-Y52T5EMB.js";
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_RETRY,
|
|
25
25
|
backoffMs
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
__name
|
|
34
34
|
} from "./chunk-ZVVMGPBJ.js";
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
37
37
|
import { setTimeout as wait } from "node:timers/promises";
|
|
38
38
|
|
|
39
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
39
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
40
40
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
41
41
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
42
42
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -57,7 +57,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
57
57
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
58
58
|
}, "encodeWav");
|
|
59
59
|
|
|
60
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
60
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
61
61
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
62
62
|
var JOINED_SECONDS = 0.2;
|
|
63
63
|
var PAD_SECONDS = 0.2;
|
|
@@ -179,7 +179,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
179
179
|
return pieces;
|
|
180
180
|
}, "piecesOf");
|
|
181
181
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
182
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
182
|
+
const { openSpeechCutter } = await import("./recognize-Z26T3SYD.js");
|
|
183
183
|
return openSpeechCutter(vadModel);
|
|
184
184
|
}, "openCutter");
|
|
185
185
|
var checkKeywords = /* @__PURE__ */ __name((keywords = []) => {
|
|
@@ -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.630.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.93.0_commander@15._c57a4ca23893bad5bbd6c181f9c73774/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";
|