@wirecat/cli-memo 0.131.73 → 0.131.74
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/dist/bin/memo.js +2 -2
- package/dist/bundle/{all-profiles-L5QBYI3V.js → all-profiles-LUGN5BHP.js} +9 -9
- package/dist/bundle/{anthropic-XXKHNCQS.js → anthropic-W7JXDZPL.js} +5 -5
- package/dist/bundle/{app-server-FDMP3IBP.js → app-server-2LQJZC7Z.js} +50 -49
- package/dist/bundle/auto-OCCPDCFY.js +89 -0
- package/dist/bundle/{bun-VLN4HBWB.js → bun-S3JZIN4S.js} +2 -2
- package/dist/bundle/{bun-sqlite-KJCYXNMS.js → bun-sqlite-X3WQN3CV.js} +5 -5
- package/dist/bundle/{chunk-ZTONSM5X.js → chunk-2EZFUIL4.js} +2 -2
- package/dist/bundle/{chunk-2BH2RNFR.js → chunk-3BEJUJEL.js} +8 -8
- package/dist/bundle/{chunk-SILEPITK.js → chunk-3OVYPDT6.js} +25 -35
- package/dist/bundle/{chunk-B7ATMWVO.js → chunk-4KDORB7C.js} +12 -37
- package/dist/bundle/{chunk-V3JOIUVB.js → chunk-4O2MYFYC.js} +4 -4
- package/dist/bundle/{chunk-I6MGDSYH.js → chunk-4QGUBKN5.js} +6 -6
- package/dist/bundle/{chunk-VQUSPMYO.js → chunk-6AOPUQTC.js} +1 -1
- package/dist/bundle/chunk-6FTZ53TT.js +18 -0
- package/dist/bundle/{chunk-BTVND2RV.js → chunk-6I4DOBSD.js} +13 -13
- package/dist/bundle/{chunk-HBP7AQXX.js → chunk-6Q3JHCU7.js} +12 -12
- package/dist/bundle/{chunk-WJNLBQSV.js → chunk-AHAW3TOS.js} +544 -586
- package/dist/bundle/{chunk-VPR47AG4.js → chunk-BDVM5652.js} +1 -1
- package/dist/bundle/{chunk-FMSXN2N6.js → chunk-BNJ2XK7D.js} +1017 -776
- package/dist/bundle/{chunk-LG5SQGNM.js → chunk-BR4DCOA5.js} +47 -45
- package/dist/bundle/{chunk-MM3OMWST.js → chunk-C6MWOBEL.js} +24 -22
- package/dist/bundle/{chunk-2C323QNQ.js → chunk-CWWUZK2U.js} +9 -9
- package/dist/bundle/{chunk-LHZ4QBWB.js → chunk-E2PSOSTN.js} +2 -2
- package/dist/bundle/{chunk-J7ESMDVV.js → chunk-E74VWHZ2.js} +1 -1
- package/dist/bundle/{chunk-KK3ZHBMI.js → chunk-EML43XLJ.js} +2 -2
- package/dist/bundle/{chunk-A7QXBRUH.js → chunk-G45BLLDR.js} +4 -4
- package/dist/bundle/{chunk-XGXEWKR7.js → chunk-GPXHGG67.js} +12 -12
- package/dist/bundle/chunk-GWNLLQBD.js +177 -0
- package/dist/bundle/{chunk-BBLT77AO.js → chunk-HEYIBJ5I.js} +12 -12
- package/dist/bundle/{chunk-IUEYR3TK.js → chunk-IQIM4UC7.js} +10 -10
- package/dist/bundle/{chunk-JABLJBXL.js → chunk-JINEHQ2T.js} +4927 -4920
- package/dist/bundle/chunk-KA5MDFLU.js +138 -0
- package/dist/bundle/{chunk-IKH4RCJO.js → chunk-KDBAY5JZ.js} +1 -1
- package/dist/bundle/{chunk-LJCT7YG6.js → chunk-KEBL3PY4.js} +4 -4
- package/dist/bundle/{chunk-C3UOKLIT.js → chunk-KUFOM3SB.js} +2 -2
- package/dist/bundle/{chunk-ZIGVDRSI.js → chunk-KYJBGCTC.js} +2 -2
- package/dist/bundle/{chunk-R3PK4Y7C.js → chunk-LPGE6ACC.js} +2 -2
- package/dist/bundle/{chunk-6ZRBQTKZ.js → chunk-LX3OSTBD.js} +4 -4
- package/dist/bundle/{chunk-NMOWIFH3.js → chunk-MPZBV5RL.js} +8 -8
- package/dist/bundle/{chunk-H74CWBSY.js → chunk-NR633L2N.js} +4 -4
- package/dist/bundle/{chunk-DSU6UR2X.js → chunk-NT5IOEEK.js} +1 -1
- package/dist/bundle/{chunk-BOZEBD3I.js → chunk-OOKMABOJ.js} +1443 -832
- package/dist/bundle/{chunk-L62FWN3Y.js → chunk-OYKQX4H3.js} +1 -1
- package/dist/bundle/{chunk-6OPZTBRR.js → chunk-P6FPRA3P.js} +59 -35
- package/dist/bundle/{chunk-QHLEMEF3.js → chunk-QCR5WJ7R.js} +53 -48
- package/dist/bundle/{chunk-W6JPIP5C.js → chunk-QKWM4VK4.js} +6 -6
- package/dist/bundle/chunk-QYJJBE56.js +109 -0
- package/dist/bundle/{chunk-EI2P5E4C.js → chunk-SCYHDYLI.js} +3 -1
- package/dist/bundle/{chunk-OGUXOAOH.js → chunk-SIOPF2UG.js} +6 -6
- package/dist/bundle/{chunk-RB266FS6.js → chunk-SIQDO5DN.js} +4 -4
- package/dist/bundle/{chunk-O5KXCQE4.js → chunk-SJD4KTK2.js} +4 -4
- package/dist/bundle/{chunk-PAHBDQ5A.js → chunk-UIAGASGP.js} +6 -6
- package/dist/bundle/{chunk-ZI5Y2EUA.js → chunk-UU3OAPGO.js} +7 -7
- package/dist/bundle/{chunk-ON7ZROFP.js → chunk-V7BDQIZS.js} +2 -2
- package/dist/bundle/{chunk-EH7ACKFW.js → chunk-VB4OLJHK.js} +3 -3
- package/dist/bundle/{chunk-JLC2RE4Y.js → chunk-VRL5WRRQ.js} +82 -82
- package/dist/bundle/{chunk-HE2F4JII.js → chunk-VYCLOFPC.js} +24 -9
- package/dist/bundle/{chunk-UUBV5ATQ.js → chunk-W46O6RJ5.js} +20 -20
- package/dist/bundle/{chunk-MLN4DPXN.js → chunk-WBCY7WHV.js} +17 -17
- package/dist/bundle/{chunk-JPXDDRBD.js → chunk-WFXRR2JT.js} +11 -11
- package/dist/bundle/{chunk-YDGZJK6U.js → chunk-WM7MVKGU.js} +24 -24
- package/dist/bundle/{chunk-X35Q5CHE.js → chunk-WZHCQ4VZ.js} +8 -8
- package/dist/bundle/{chunk-PF6LXPK5.js → chunk-XMHWGHID.js} +4280 -4278
- package/dist/bundle/chunk-XPCTY6XV.js +116 -0
- package/dist/bundle/{chunk-E75LK7GD.js → chunk-XPSXVUZG.js} +3 -3
- package/dist/bundle/{chunk-XM6ZAPFW.js → chunk-XQ3RZU3J.js} +1 -1
- package/dist/bundle/{chunk-LOYI3STE.js → chunk-XQHOMQNZ.js} +4 -4
- package/dist/bundle/{chunk-K54MCZWM.js → chunk-YB4KGUXY.js} +3 -3
- package/dist/bundle/{chunk-US2HTCJA.js → chunk-YDTGYYOR.js} +4 -4
- package/dist/bundle/{chunk-EQLOQOIB.js → chunk-YLYZNPAZ.js} +2 -2
- package/dist/bundle/{chunk-IDCYBSML.js → chunk-ZL63GL3Y.js} +3 -3
- package/dist/bundle/{chunk-3CANRF2G.js → chunk-ZTZLAGZA.js} +3 -3
- package/dist/bundle/{chunk-FSXQLNU4.js → chunk-ZXW5FPH2.js} +1 -1
- package/dist/bundle/command-contract-QQG343ZQ.js +32 -0
- package/dist/bundle/command-server-entry-XVUPTSSH.js +145 -0
- package/dist/bundle/{decode-OS6Y6ICA.js → decode-METZOSMG.js} +5 -5
- package/dist/bundle/{dispatch-VJSUBAUM.js → dispatch-PHB2Y6ZL.js} +8 -8
- package/dist/bundle/{echarts-JKGDUDYL.js → echarts-EBSP4VCK.js} +2 -2
- package/dist/bundle/{embed-UB4LH6MF.js → embed-GVVU7N7W.js} +6 -6
- package/dist/bundle/{embedder-TUQBG22Y.js → embedder-6BZOYAXV.js} +9 -9
- package/dist/bundle/entry-7EYT2OA3.js +21 -0
- package/dist/bundle/{failure-GLF7OMMM.js → failure-OBT7CUVW.js} +2 -2
- package/dist/bundle/failure-YQJ43YFG.js +69 -0
- package/dist/bundle/{first-run-VNJHZYGS.js → first-run-C7L7IACA.js} +11 -11
- package/dist/bundle/first-screen-6T65PQ37.js +30 -0
- package/dist/bundle/{instructions-Q6IZQUU7.js → instructions-VDKK3Y5Z.js} +1 -1
- package/dist/bundle/{mcp-H2WYFBNW.js → mcp-5275YLID.js} +2 -2
- package/dist/bundle/mcp-UCDMODSA.js +90 -0
- package/dist/bundle/memo.js +16 -16
- package/dist/bundle/{node-ZSSIVKVC.js → node-HWGZYNUX.js} +2 -2
- package/dist/bundle/{node-sqlite-AUNJSQQL.js → node-sqlite-PSYENWGS.js} +6 -6
- package/dist/bundle/{oauth-2MTJFCMI.js → oauth-TQGMUJK2.js} +7 -7
- package/dist/bundle/{open-U7RC27MJ.js → open-KDDJDKCE.js} +5 -5
- package/dist/bundle/openai-QPGCUM4T.js +24 -0
- package/dist/bundle/{process-UEQX5STY.js → process-APNTXJJE.js} +1 -1
- package/dist/bundle/{program-G3F26HW7.js → program-RHPSSKFA.js} +157 -129
- package/dist/bundle/{prompt-F23FC5PJ.js → prompt-BMBZCLGF.js} +5 -5
- package/dist/bundle/{recognize-ZVEGVD56.js → recognize-3SEY2MAR.js} +4 -4
- package/dist/bundle/{remote-CZXQS7PS.js → remote-ODH54UXO.js} +7 -7
- package/dist/bundle/{rerank-IRFXSVVO.js → rerank-JQHBNTUK.js} +7 -7
- package/dist/bundle/{serve-6CIMU5HP.js → serve-C22ZONSM.js} +9 -9
- package/dist/bundle/server-3TQJ47Q6.js +62 -0
- package/dist/bundle/{server-H24MAUT2.js → server-FX7RKPL4.js} +70 -66
- package/dist/bundle/server-SHHKLBS2.js +48 -0
- package/dist/bundle/{state-TRWZWXB5.js → state-M3VGXSV4.js} +6 -6
- package/dist/bundle/{store-E4QUOOLX.js → store-K45RFKGF.js} +13 -13
- package/dist/bundle/store-maintenance-command-EOTKQ3E5.js +47 -0
- package/dist/bundle/update-PW77Y4DM.js +72 -0
- package/dist/context/context.d.ts.map +1 -1
- package/dist/context/context.js +4 -2
- package/dist/context/context.js.map +1 -1
- package/dist/contract-overrides/search.d.ts.map +1 -1
- package/dist/contract-overrides/search.js +6 -0
- package/dist/contract-overrides/search.js.map +1 -1
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +2 -0
- package/dist/examples.js.map +1 -1
- package/dist/search/answers.d.ts +6 -1
- package/dist/search/answers.d.ts.map +1 -1
- package/dist/search/answers.js +17 -1
- package/dist/search/answers.js.map +1 -1
- package/dist/search/command.d.ts.map +1 -1
- package/dist/search/command.js +13 -2
- package/dist/search/command.js.map +1 -1
- package/dist/search/lane-gates.d.ts +4 -3
- package/dist/search/lane-gates.d.ts.map +1 -1
- package/dist/search/lane-gates.js +13 -7
- package/dist/search/lane-gates.js.map +1 -1
- package/dist/search/search.d.ts +5 -1
- package/dist/search/search.d.ts.map +1 -1
- package/dist/search/search.js +5 -1
- package/dist/search/search.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/bundle/auto-YQAECIZA.js +0 -85
- package/dist/bundle/chunk-KQTR6YA4.js +0 -262
- package/dist/bundle/command-contract-6HJ322BP.js +0 -32
- package/dist/bundle/entry-N4NCIQYH.js +0 -18
- package/dist/bundle/failure-BJEFFYH3.js +0 -65
- package/dist/bundle/first-screen-4XGF2NZ3.js +0 -30
- package/dist/bundle/mcp-REIASUJR.js +0 -90
- package/dist/bundle/openai-2SJCG6XM.js +0 -23
- package/dist/bundle/server-27KXLL4E.js +0 -61
- package/dist/bundle/server-TWMUWMFM.js +0 -48
- package/dist/bundle/store-maintenance-command-GLHRB2VZ.js +0 -47
- package/dist/bundle/update-QQEM73O5.js +0 -68
- /package/dist/bundle/{chunk-SYWHHQMC.js → chunk-G5GW3FFJ.js} +0 -0
- /package/dist/bundle/{chunk-ZOWQ5B33.js → chunk-IXSUVHW6.js} +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
stdinFieldOf
|
|
5
|
+
} from "./chunk-6FTZ53TT.js";
|
|
6
|
+
import {
|
|
7
|
+
isCommandServer
|
|
8
|
+
} from "./chunk-QYJJBE56.js";
|
|
9
|
+
import {
|
|
10
|
+
commandPathOf
|
|
11
|
+
} from "./chunk-G45BLLDR.js";
|
|
12
|
+
import {
|
|
13
|
+
metaOf
|
|
14
|
+
} from "./chunk-XMHWGHID.js";
|
|
15
|
+
import {
|
|
16
|
+
errorObjectOf,
|
|
17
|
+
renderError
|
|
18
|
+
} from "./chunk-VYCLOFPC.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-2EZFUIL4.js";
|
|
22
|
+
import {
|
|
23
|
+
__name
|
|
24
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
25
|
+
|
|
26
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/cli/command-server.js
|
|
27
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
28
|
+
import { createInterface } from "node:readline";
|
|
29
|
+
var COMMAND_SERVER_PROTOCOL = 1;
|
|
30
|
+
var COMMAND_SERVER_IDLE_MS = 10 * 6e4;
|
|
31
|
+
var requests = new AsyncLocalStorage();
|
|
32
|
+
var inCommandServerRequest = /* @__PURE__ */ __name((work) => requests.run(true, work), "inCommandServerRequest");
|
|
33
|
+
var refuseInCommandServer = /* @__PURE__ */ __name((command, cli) => {
|
|
34
|
+
if (requests.getStore() !== true)
|
|
35
|
+
return;
|
|
36
|
+
const typed = [cli, ...commandPathOf(command)].join(" ");
|
|
37
|
+
const { lifetime } = metaOf(command);
|
|
38
|
+
if (lifetime)
|
|
39
|
+
throw new CliError("validation_error", `\`${typed}\` ${lifetime === "persistent" ? "runs until it is stopped" : "waits on a person"}; the command server runs only commands that return \u2014 start it as a process of its own`);
|
|
40
|
+
if (stdinFieldOf(command))
|
|
41
|
+
throw new CliError("validation_error", `\`${typed}\` reads its input on stdin, which the command server does not pass on \u2014 start it as a process of its own`);
|
|
42
|
+
}, "refuseInCommandServer");
|
|
43
|
+
var refusal = /* @__PURE__ */ __name((cli, message) => `${renderError(errorObjectOf(new CliError("validation_error", message)), { cli, interactive: false })}
|
|
44
|
+
`, "refusal");
|
|
45
|
+
var requestOf = /* @__PURE__ */ __name((line, cli) => {
|
|
46
|
+
let parsed;
|
|
47
|
+
try {
|
|
48
|
+
parsed = JSON.parse(line);
|
|
49
|
+
} catch {
|
|
50
|
+
return { id: null, error: "a request is one JSON object per line" };
|
|
51
|
+
}
|
|
52
|
+
const { id, argv } = parsed ?? {};
|
|
53
|
+
const known = typeof id === "number" && Number.isFinite(id) ? id : null;
|
|
54
|
+
if (known === null)
|
|
55
|
+
return { id: null, error: 'a request needs a numeric "id"' };
|
|
56
|
+
if (!Array.isArray(argv) || !argv.every((word) => typeof word === "string"))
|
|
57
|
+
return { id: known, error: '"argv" is a list of strings' };
|
|
58
|
+
if (isCommandServer(argv))
|
|
59
|
+
return { id: known, error: `\`${cli} commands --serve\` cannot run inside itself` };
|
|
60
|
+
return { id: known, argv };
|
|
61
|
+
}, "requestOf");
|
|
62
|
+
var serveCommands = /* @__PURE__ */ __name(async ({ input, write, run, cli, version, idleMs = COMMAND_SERVER_IDLE_MS, signal }) => {
|
|
63
|
+
const send = /* @__PURE__ */ __name((value) => write(`${JSON.stringify(value)}
|
|
64
|
+
`), "send");
|
|
65
|
+
await send({ ready: true, protocol: COMMAND_SERVER_PROTOCOL, version });
|
|
66
|
+
const lines = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY });
|
|
67
|
+
return new Promise((resolve) => {
|
|
68
|
+
let queue = Promise.resolve();
|
|
69
|
+
let waiting = 0;
|
|
70
|
+
let timer;
|
|
71
|
+
let done = false;
|
|
72
|
+
const finish = /* @__PURE__ */ __name(() => {
|
|
73
|
+
if (done)
|
|
74
|
+
return;
|
|
75
|
+
done = true;
|
|
76
|
+
clearTimeout(timer);
|
|
77
|
+
lines.close();
|
|
78
|
+
resolve(0);
|
|
79
|
+
}, "finish");
|
|
80
|
+
const idle = /* @__PURE__ */ __name(() => {
|
|
81
|
+
clearTimeout(timer);
|
|
82
|
+
timer = setTimeout(finish, idleMs);
|
|
83
|
+
}, "idle");
|
|
84
|
+
const answer = /* @__PURE__ */ __name(async (line) => {
|
|
85
|
+
const request = requestOf(line, cli);
|
|
86
|
+
if ("error" in request)
|
|
87
|
+
return send({ id: request.id, code: 2, stdout: "", stderr: refusal(cli, request.error) });
|
|
88
|
+
const answered = await run(request.argv);
|
|
89
|
+
return send({ id: request.id, ...answered });
|
|
90
|
+
}, "answer");
|
|
91
|
+
lines.on("line", (line) => {
|
|
92
|
+
if (done || line.trim() === "")
|
|
93
|
+
return;
|
|
94
|
+
waiting += 1;
|
|
95
|
+
clearTimeout(timer);
|
|
96
|
+
queue = queue.then(() => answer(line)).catch(finish).then(() => {
|
|
97
|
+
waiting -= 1;
|
|
98
|
+
if (waiting === 0 && !done)
|
|
99
|
+
idle();
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
lines.on("close", () => {
|
|
103
|
+
queue = queue.then(finish);
|
|
104
|
+
});
|
|
105
|
+
if (signal?.aborted)
|
|
106
|
+
finish();
|
|
107
|
+
signal?.addEventListener("abort", () => queue = queue.then(finish), { once: true });
|
|
108
|
+
idle();
|
|
109
|
+
});
|
|
110
|
+
}, "serveCommands");
|
|
111
|
+
|
|
112
|
+
export {
|
|
113
|
+
inCommandServerRequest,
|
|
114
|
+
refuseInCommandServer,
|
|
115
|
+
serveCommands
|
|
116
|
+
};
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E2PSOSTN.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2EZFUIL4.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
17
|
import { Writable } from "node:stream";
|
|
18
18
|
var EMPTY_TRIES = 3;
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/shared-55XJMTPA.js
|
|
8
8
|
var entityKind = /* @__PURE__ */ Symbol.for("drizzle:entityKind");
|
|
9
9
|
var kindsByConstructor = /* @__PURE__ */ new WeakMap();
|
|
10
10
|
function collectKinds(ctor) {
|
|
@@ -4,18 +4,18 @@ import {
|
|
|
4
4
|
readSharedSection,
|
|
5
5
|
sharedConfigPath,
|
|
6
6
|
writeSharedSection
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4QGUBKN5.js";
|
|
8
8
|
import {
|
|
9
9
|
storePath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LPGE6ACC.js";
|
|
11
11
|
import {
|
|
12
12
|
CliError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2EZFUIL4.js";
|
|
14
14
|
import {
|
|
15
15
|
__name
|
|
16
16
|
} from "./chunk-ZVVMGPBJ.js";
|
|
17
17
|
|
|
18
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
18
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/cli/setup-answers.js
|
|
19
19
|
var PERMISSION_ANSWERS = ["readonly", "allow"];
|
|
20
20
|
var QUESTIONS = ["languages", "tools", "permissions"];
|
|
21
21
|
var SECTION = "setup";
|
|
@@ -3,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
decodeOgg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NR633L2N.js";
|
|
7
7
|
import {
|
|
8
8
|
importFrom
|
|
9
9
|
} from "./chunk-Y5E2WNWB.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2EZFUIL4.js";
|
|
13
13
|
import {
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/speech/decode.js
|
|
18
18
|
import { spawn } from "node:child_process";
|
|
19
19
|
import { mkdtemp, rm, writeFile } from "node:fs/promises";
|
|
20
20
|
import { createRequire } from "node:module";
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
answeredWire
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZXW5FPH2.js";
|
|
6
6
|
import {
|
|
7
7
|
CALLER_META_KEY,
|
|
8
8
|
PROXY_CLIENT_NAME,
|
|
9
9
|
callerOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-V7BDQIZS.js";
|
|
11
11
|
import {
|
|
12
12
|
StdioServerTransport,
|
|
13
13
|
serveStdio
|
|
@@ -19,7 +19,7 @@ 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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/mcp/all-profiles.js
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
var PROTOCOL = "2025-06-18";
|
|
@@ -253,7 +253,7 @@ var serveAllProfilesOverStdio = /* @__PURE__ */ __name(async (options, io = {})
|
|
|
253
253
|
}, "serveAllProfilesOverStdio");
|
|
254
254
|
var serveAllProfilesOverHttp = /* @__PURE__ */ __name(async (options, http) => {
|
|
255
255
|
const { build, close } = allProfilesServer(options);
|
|
256
|
-
const { serveOverHttp } = await import("./serve-
|
|
256
|
+
const { serveOverHttp } = await import("./serve-C22ZONSM.js");
|
|
257
257
|
const listening = await serveOverHttp(build, {
|
|
258
258
|
...http,
|
|
259
259
|
appName: options.command,
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
CliError
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2EZFUIL4.js";
|
|
6
6
|
import {
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/http/public-url.js
|
|
11
11
|
var EXAMPLE = "--public-url https://<name>.ts.net";
|
|
12
12
|
var publicUrlOf = /* @__PURE__ */ __name((given, { missing, reaches, path = false }) => {
|
|
13
13
|
if (!given)
|
|
@@ -2,16 +2,16 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
alive
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6AOPUQTC.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePaths,
|
|
8
8
|
writeSecurely
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W46O6RJ5.js";
|
|
10
10
|
import {
|
|
11
11
|
__name
|
|
12
12
|
} from "./chunk-ZVVMGPBJ.js";
|
|
13
13
|
|
|
14
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
14
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/background/lock.js
|
|
15
15
|
import { existsSync, linkSync, mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
var lockPath = /* @__PURE__ */ __name((app, profile, env) => join(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "serve", `${profile}.lock`), "lockPath");
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
unit
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SIOPF2UG.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2EZFUIL4.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/embeddings/remote.js
|
|
14
14
|
import { setTimeout } from "node:timers/promises";
|
|
15
15
|
var OPENAI_URL = "https://api.openai.com/v1";
|
|
16
16
|
var OPENAI_MODELS = {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/mcp/stdio-wire.js
|
|
8
8
|
import { PassThrough, Writable } from "node:stream";
|
|
9
9
|
var lineReader = /* @__PURE__ */ __name((onMessage) => {
|
|
10
10
|
let rest = "";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
SCHEMA_DIALECT,
|
|
5
|
+
commandContract,
|
|
6
|
+
commandPathOf,
|
|
7
|
+
findCommand,
|
|
8
|
+
outputOf
|
|
9
|
+
} from "./chunk-G45BLLDR.js";
|
|
10
|
+
import "./chunk-XMHWGHID.js";
|
|
11
|
+
import "./chunk-UU3OAPGO.js";
|
|
12
|
+
import "./chunk-6AOPUQTC.js";
|
|
13
|
+
import "./chunk-XQHOMQNZ.js";
|
|
14
|
+
import "./chunk-KUFOM3SB.js";
|
|
15
|
+
import "./chunk-JINEHQ2T.js";
|
|
16
|
+
import "./chunk-VB4OLJHK.js";
|
|
17
|
+
import "./chunk-4QGUBKN5.js";
|
|
18
|
+
import "./chunk-SIQDO5DN.js";
|
|
19
|
+
import "./chunk-LPGE6ACC.js";
|
|
20
|
+
import "./chunk-G5GW3FFJ.js";
|
|
21
|
+
import "./chunk-W46O6RJ5.js";
|
|
22
|
+
import "./chunk-VYCLOFPC.js";
|
|
23
|
+
import "./chunk-Y5E2WNWB.js";
|
|
24
|
+
import "./chunk-2EZFUIL4.js";
|
|
25
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
export {
|
|
27
|
+
SCHEMA_DIALECT,
|
|
28
|
+
commandContract,
|
|
29
|
+
commandPathOf,
|
|
30
|
+
findCommand,
|
|
31
|
+
outputOf
|
|
32
|
+
};
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
inCommandServerRequest,
|
|
5
|
+
refuseInCommandServer,
|
|
6
|
+
serveCommands
|
|
7
|
+
} from "./chunk-XPCTY6XV.js";
|
|
8
|
+
import "./chunk-6FTZ53TT.js";
|
|
9
|
+
import {
|
|
10
|
+
ensureSqlite
|
|
11
|
+
} from "./chunk-QYJJBE56.js";
|
|
12
|
+
import "./chunk-UIAGASGP.js";
|
|
13
|
+
import "./chunk-SCYHDYLI.js";
|
|
14
|
+
import "./chunk-G45BLLDR.js";
|
|
15
|
+
import "./chunk-XMHWGHID.js";
|
|
16
|
+
import "./chunk-UU3OAPGO.js";
|
|
17
|
+
import "./chunk-6AOPUQTC.js";
|
|
18
|
+
import "./chunk-XQHOMQNZ.js";
|
|
19
|
+
import "./chunk-KUFOM3SB.js";
|
|
20
|
+
import {
|
|
21
|
+
useAsProcessRun
|
|
22
|
+
} from "./chunk-JINEHQ2T.js";
|
|
23
|
+
import "./chunk-VB4OLJHK.js";
|
|
24
|
+
import "./chunk-4QGUBKN5.js";
|
|
25
|
+
import "./chunk-SIQDO5DN.js";
|
|
26
|
+
import "./chunk-LPGE6ACC.js";
|
|
27
|
+
import "./chunk-G5GW3FFJ.js";
|
|
28
|
+
import "./chunk-W46O6RJ5.js";
|
|
29
|
+
import {
|
|
30
|
+
catchCrashes
|
|
31
|
+
} from "./chunk-VYCLOFPC.js";
|
|
32
|
+
import "./chunk-Y5E2WNWB.js";
|
|
33
|
+
import {
|
|
34
|
+
CliError
|
|
35
|
+
} from "./chunk-2EZFUIL4.js";
|
|
36
|
+
import {
|
|
37
|
+
__name
|
|
38
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
39
|
+
|
|
40
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/node_modules/@wirecat/cli-core/dist/cli/command-server-entry.js
|
|
41
|
+
import { PassThrough } from "node:stream";
|
|
42
|
+
var route = /* @__PURE__ */ __name((stream, sink) => {
|
|
43
|
+
const original = stream.write;
|
|
44
|
+
stream.write = ((chunk, encoding, callback) => {
|
|
45
|
+
sink()(typeof chunk === "string" ? Buffer.from(chunk, typeof encoding === "string" ? encoding : "utf8") : Buffer.from(chunk));
|
|
46
|
+
const done = typeof encoding === "function" ? encoding : callback;
|
|
47
|
+
if (done)
|
|
48
|
+
process.nextTick(done);
|
|
49
|
+
return true;
|
|
50
|
+
});
|
|
51
|
+
return () => {
|
|
52
|
+
stream.write = original;
|
|
53
|
+
};
|
|
54
|
+
}, "route");
|
|
55
|
+
var closedStdin = /* @__PURE__ */ __name(() => {
|
|
56
|
+
const stdin = new PassThrough();
|
|
57
|
+
stdin.end();
|
|
58
|
+
return stdin;
|
|
59
|
+
}, "closedStdin");
|
|
60
|
+
var useStdin = /* @__PURE__ */ __name((stdin) => Object.defineProperty(process, "stdin", { value: stdin, configurable: true, enumerable: true, writable: true }), "useStdin");
|
|
61
|
+
var serveEntry = /* @__PURE__ */ __name(async (entry, io, { firstRunAt, commanderExit }) => {
|
|
62
|
+
const release = catchCrashes({
|
|
63
|
+
cli: entry.app.command,
|
|
64
|
+
interactive: false,
|
|
65
|
+
...entry.reasons ? { reasons: entry.reasons } : {},
|
|
66
|
+
target: io.signals
|
|
67
|
+
});
|
|
68
|
+
const stopper = new AbortController();
|
|
69
|
+
const stop = /* @__PURE__ */ __name(() => stopper.abort(new CliError("cancelled", "the command server was stopped", { retryable: false })), "stop");
|
|
70
|
+
const protocol = io.stdout.write.bind(io.stdout);
|
|
71
|
+
const ownStderr = io.stderr.write.bind(io.stderr);
|
|
72
|
+
const toStderr = /* @__PURE__ */ __name((chunk) => {
|
|
73
|
+
ownStderr(chunk);
|
|
74
|
+
}, "toStderr");
|
|
75
|
+
let current;
|
|
76
|
+
const unrouteOut = route(process.stdout, () => current ? (chunk) => current?.stdout.push(chunk) : toStderr);
|
|
77
|
+
const unrouteErr = route(process.stderr, () => current ? (chunk) => current?.stderr.push(chunk) : toStderr);
|
|
78
|
+
const stdin = Object.getOwnPropertyDescriptor(process, "stdin");
|
|
79
|
+
const requests = io.stdin;
|
|
80
|
+
useStdin(closedStdin());
|
|
81
|
+
io.signals.on("SIGINT", stop).on("SIGTERM", stop);
|
|
82
|
+
io.stdout.on("error", stop);
|
|
83
|
+
const run = /* @__PURE__ */ __name(async (argv) => {
|
|
84
|
+
const stdout = [];
|
|
85
|
+
const stderr = [];
|
|
86
|
+
current = { stdout, stderr };
|
|
87
|
+
process.exitCode = void 0;
|
|
88
|
+
useAsProcessRun(void 0);
|
|
89
|
+
const input = closedStdin();
|
|
90
|
+
useStdin(input);
|
|
91
|
+
const requestIo = { ...io, argv: [...io.argv.slice(0, 2), ...argv], stdin: input };
|
|
92
|
+
const context = {
|
|
93
|
+
args: argv,
|
|
94
|
+
env: io.env,
|
|
95
|
+
tty: false,
|
|
96
|
+
signal: stopper.signal,
|
|
97
|
+
atStart: /* @__PURE__ */ __name(async (command) => {
|
|
98
|
+
refuseInCommandServer(command, entry.app.command);
|
|
99
|
+
await firstRunAt(entry, requestIo, () => true)(command);
|
|
100
|
+
}, "atStart"),
|
|
101
|
+
ask: /* @__PURE__ */ __name(async () => false, "ask"),
|
|
102
|
+
openBrowser: /* @__PURE__ */ __name(async () => void 0, "openBrowser"),
|
|
103
|
+
outputClosed: /* @__PURE__ */ __name(() => false, "outputClosed")
|
|
104
|
+
};
|
|
105
|
+
let code;
|
|
106
|
+
try {
|
|
107
|
+
code = await inCommandServerRequest(async () => {
|
|
108
|
+
try {
|
|
109
|
+
const returned = await entry.run(context);
|
|
110
|
+
return typeof returned === "number" ? returned : Number(process.exitCode ?? 0);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
return commanderExit(error) ?? entry.fail(error, context);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
} finally {
|
|
116
|
+
current = void 0;
|
|
117
|
+
process.exitCode = void 0;
|
|
118
|
+
}
|
|
119
|
+
return { code, stdout: Buffer.concat(stdout).toString("utf8"), stderr: Buffer.concat(stderr).toString("utf8") };
|
|
120
|
+
}, "run");
|
|
121
|
+
try {
|
|
122
|
+
if (entry.sqlite)
|
|
123
|
+
await ensureSqlite();
|
|
124
|
+
await serveCommands({
|
|
125
|
+
input: requests,
|
|
126
|
+
write: /* @__PURE__ */ __name((line) => new Promise((resolve) => protocol(line) ? resolve() : io.stdout.once("drain", resolve)), "write"),
|
|
127
|
+
run,
|
|
128
|
+
cli: entry.app.command,
|
|
129
|
+
version: entry.app.version,
|
|
130
|
+
signal: stopper.signal
|
|
131
|
+
});
|
|
132
|
+
io.setExitCode(0);
|
|
133
|
+
} finally {
|
|
134
|
+
io.signals.off("SIGINT", stop).off("SIGTERM", stop);
|
|
135
|
+
unrouteOut();
|
|
136
|
+
unrouteErr();
|
|
137
|
+
if (stdin)
|
|
138
|
+
Object.defineProperty(process, "stdin", stdin);
|
|
139
|
+
requests.destroy?.();
|
|
140
|
+
release();
|
|
141
|
+
}
|
|
142
|
+
}, "serveEntry");
|
|
143
|
+
export {
|
|
144
|
+
serveEntry
|
|
145
|
+
};
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
decodeChannels,
|
|
7
7
|
formatOf,
|
|
8
8
|
runFfmpeg
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-YB4KGUXY.js";
|
|
10
|
+
import "./chunk-NR633L2N.js";
|
|
11
|
+
import "./chunk-W46O6RJ5.js";
|
|
12
|
+
import "./chunk-VYCLOFPC.js";
|
|
13
13
|
import "./chunk-Y5E2WNWB.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-2EZFUIL4.js";
|
|
15
15
|
import "./chunk-ZVVMGPBJ.js";
|
|
16
16
|
export {
|
|
17
17
|
LONGEST_AUDIO_SECONDS,
|
|
@@ -14,22 +14,22 @@ import {
|
|
|
14
14
|
parseDescribe,
|
|
15
15
|
shimFiles,
|
|
16
16
|
writeShim
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4O2MYFYC.js";
|
|
18
18
|
import "./chunk-Y5E2WNWB.js";
|
|
19
19
|
import {
|
|
20
20
|
CliError
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2EZFUIL4.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.95.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.95.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.95.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.95.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.95.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-OBT7CUVW.js");
|
|
342
342
|
const object = errorObjectOf(error);
|
|
343
343
|
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
344
344
|
`);
|
|
@@ -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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/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,13 +13,13 @@ 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-
|
|
16
|
+
} from "./chunk-SIOPF2UG.js";
|
|
17
|
+
import "./chunk-SIQDO5DN.js";
|
|
18
|
+
import "./chunk-LPGE6ACC.js";
|
|
19
|
+
import "./chunk-W46O6RJ5.js";
|
|
20
|
+
import "./chunk-VYCLOFPC.js";
|
|
21
21
|
import "./chunk-Y5E2WNWB.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-2EZFUIL4.js";
|
|
23
23
|
import "./chunk-ZVVMGPBJ.js";
|
|
24
24
|
export {
|
|
25
25
|
WARM_IDLE_MS,
|
|
@@ -4,26 +4,26 @@ 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-
|
|
7
|
+
} from "./chunk-SIOPF2UG.js";
|
|
8
|
+
import "./chunk-SIQDO5DN.js";
|
|
9
|
+
import "./chunk-LPGE6ACC.js";
|
|
10
|
+
import "./chunk-W46O6RJ5.js";
|
|
11
|
+
import "./chunk-VYCLOFPC.js";
|
|
12
12
|
import {
|
|
13
13
|
importFrom
|
|
14
14
|
} from "./chunk-Y5E2WNWB.js";
|
|
15
15
|
import {
|
|
16
16
|
CliError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-2EZFUIL4.js";
|
|
18
18
|
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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/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.624.0_@wirecat+cli-base@0.95.0_commander@15.0.0_esbuild@0.28.2_type_845871b12d72ec55150c07203d8cbfbb/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");
|