@wirecat/cli-template 0.10.0 → 0.11.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.
Files changed (97) hide show
  1. package/.github/workflows/ci.yml +17 -0
  2. package/CHANGELOG.md +30 -0
  3. package/CLAUDE.md +1 -3
  4. package/contracts/help.snap +2 -0
  5. package/dist/bin/clidev.js +2 -2
  6. package/dist/bundle/{all-profiles-XHC7BG3P.js → all-profiles-MJ6XSFOO.js} +4 -4
  7. package/dist/bundle/{anthropic-N6B3ZZHQ.js → anthropic-W5UKBZUB.js} +3 -3
  8. package/dist/bundle/app-server-EZ46JAHB.js +217 -0
  9. package/dist/bundle/{bun-HUJLS7KP.js → bun-HB6O2TTT.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-OWFO2TVR.js → bun-sqlite-KBXOW2ES.js} +2 -2
  11. package/dist/bundle/{chunk-B4EED2RF.js → chunk-2B5U4Z5H.js} +5 -5
  12. package/dist/bundle/{chunk-ABP7FDMJ.js → chunk-35KYY65W.js} +2 -2
  13. package/dist/bundle/{chunk-MZVV2JZT.js → chunk-4LURWBVV.js} +17 -9
  14. package/dist/bundle/{chunk-QGNNMPUB.js → chunk-7IXL4UFK.js} +7 -7
  15. package/dist/bundle/{chunk-NE3NSB5O.js → chunk-AK257OMS.js} +55 -43
  16. package/dist/bundle/{chunk-IJ3IA7EK.js → chunk-CXQXVKUY.js} +1 -1
  17. package/dist/bundle/{chunk-7RB76E2L.js → chunk-EGRB55FF.js} +4 -4
  18. package/dist/bundle/{chunk-DMCN22H6.js → chunk-ERGB4NJA.js} +20 -2
  19. package/dist/bundle/{chunk-TJLGI3N6.js → chunk-ERKR3VJ5.js} +79 -28
  20. package/dist/bundle/{chunk-2CFBHYFA.js → chunk-FDBINRWA.js} +4 -4
  21. package/dist/bundle/{chunk-FIHDGZIB.js → chunk-FZZIU4B7.js} +2416 -2254
  22. package/dist/bundle/{chunk-BDSDQCV4.js → chunk-HDY5X3WQ.js} +4 -4
  23. package/dist/bundle/{chunk-XFXBXQBS.js → chunk-IBBN7Z3A.js} +2 -2
  24. package/dist/bundle/{chunk-4QRLPOJ7.js → chunk-IDWW4TU2.js} +1 -1
  25. package/dist/bundle/{chunk-OPPMGPFW.js → chunk-IGHEW777.js} +4 -4
  26. package/dist/bundle/{chunk-437W3Z2M.js → chunk-IN3FVRPK.js} +1 -1
  27. package/dist/bundle/{chunk-FWVKHD2L.js → chunk-JAOGZMKQ.js} +1 -1
  28. package/dist/bundle/{chunk-O3PBQVAB.js → chunk-JHO2LL2J.js} +18 -6
  29. package/dist/bundle/{chunk-MNSD5BX2.js → chunk-JRK73FOW.js} +1 -1
  30. package/dist/bundle/{chunk-MTGLJCAZ.js → chunk-KAREKBUZ.js} +1 -1
  31. package/dist/bundle/{chunk-O5LMDQTO.js → chunk-KJTNT4SW.js} +1 -1
  32. package/dist/bundle/{chunk-B4LM2B6F.js → chunk-L5WWMP5M.js} +24 -20
  33. package/dist/bundle/{chunk-NTLPDH76.js → chunk-MJRSEUKG.js} +9 -7
  34. package/dist/bundle/{chunk-AP7QKYBG.js → chunk-MUSYGFCY.js} +165 -140
  35. package/dist/bundle/{server-L5GNG7KC.js → chunk-N2Z3MCOF.js} +31 -45
  36. package/dist/bundle/{chunk-JTTW5ZKF.js → chunk-NOVLCHDV.js} +1 -1
  37. package/dist/bundle/{chunk-54AJONOM.js → chunk-O3UXNU3S.js} +2 -2
  38. package/dist/bundle/{chunk-75LVQQEK.js → chunk-OV6PHTAY.js} +2034 -1590
  39. package/dist/bundle/{chunk-W2IDKBNB.js → chunk-PBN4RBHS.js} +7 -7
  40. package/dist/bundle/{chunk-2TBVT4SZ.js → chunk-PDGXMKJS.js} +1 -1
  41. package/dist/bundle/{recognize-TTED4SE3.js → chunk-PJOVK7PG.js} +6 -5
  42. package/dist/bundle/{chunk-LY7GS2YI.js → chunk-QBP7OMN5.js} +1 -1
  43. package/dist/bundle/{chunk-VMTM46FH.js → chunk-QJ6XW4DM.js} +75 -51
  44. package/dist/bundle/{chunk-OPJ24VGH.js → chunk-QKWRL4OD.js} +5 -5
  45. package/dist/bundle/{chunk-6CBWO7OF.js → chunk-RUKDZEID.js} +2 -2
  46. package/dist/bundle/{chunk-TARN7CHN.js → chunk-SVDF6NJF.js} +10 -10
  47. package/dist/bundle/{chunk-FXS3X76A.js → chunk-TAYOKLGF.js} +4 -4
  48. package/dist/bundle/{chunk-ASMH7JWZ.js → chunk-TGB5F7NC.js} +2 -2
  49. package/dist/bundle/{chunk-222FANS2.js → chunk-V3ZTQ24B.js} +4 -4
  50. package/dist/bundle/{chunk-LSEF4QC3.js → chunk-VLNKTMV7.js} +75 -47
  51. package/dist/bundle/{chunk-7RXBN7HP.js → chunk-VYSUKHKL.js} +1 -1
  52. package/dist/bundle/{chunk-JEBSORH7.js → chunk-YJNUDHJD.js} +25 -14
  53. package/dist/bundle/{chunk-S57AMKLX.js → chunk-Z7MSIRSQ.js} +1 -1
  54. package/dist/bundle/{chunk-2KQZ24GI.js → chunk-ZLY6GUAS.js} +2 -2
  55. package/dist/bundle/clidev.js +2 -2
  56. package/dist/bundle/{command-contract-PEM3S634.js → command-contract-75VJ36U4.js} +10 -10
  57. package/dist/bundle/decode-AMXUVKNY.js +158 -0
  58. package/dist/bundle/{echarts-2QGL2JP5.js → echarts-GJDMQ2AQ.js} +2 -2
  59. package/dist/bundle/{embed-HHAAGHA6.js → embed-L4CRZ2XQ.js} +3 -3
  60. package/dist/bundle/{embedder-W2OGVVYH.js → embedder-IBGV4M2K.js} +6 -6
  61. package/dist/bundle/{first-run-WCJUDUBU.js → first-run-VTKC2IBV.js} +5 -5
  62. package/dist/bundle/{first-screen-U4DFUKUC.js → first-screen-X5IJKBSU.js} +11 -11
  63. package/dist/bundle/{instructions-OTZHT6NV.js → instructions-YJECS4KN.js} +3 -1
  64. package/dist/bundle/{mcp-VVF6J7SQ.js → mcp-G6XP2IRO.js} +33 -33
  65. package/dist/bundle/mcp-RDZGYPSY.js +78 -0
  66. package/dist/bundle/{node-SYD4GX5O.js → node-NQG4EVZR.js} +2 -2
  67. package/dist/bundle/node-sqlite-BR7F3BLB.js +61 -0
  68. package/dist/bundle/{oauth-42M34GQ5.js → oauth-J7UAWNIK.js} +4 -4
  69. package/dist/bundle/{open-SWXRCDLN.js → open-BR47R5UE.js} +1 -1
  70. package/dist/bundle/{process-KAFGXZ7Q.js → process-66I7RDPJ.js} +1 -1
  71. package/dist/bundle/{program-EHR4G7VN.js → program-K6347XBZ.js} +913 -601
  72. package/dist/bundle/{prompt-ZQTMHRGX.js → prompt-NE5JJ7UP.js} +2 -2
  73. package/dist/bundle/recognize-GC3YFVIA.js +21 -0
  74. package/dist/bundle/{remote-C37XJ4BP.js → remote-QELOMKQM.js} +4 -4
  75. package/dist/bundle/{rerank-APFZAMQL.js → rerank-BH6TZ2SP.js} +4 -4
  76. package/dist/bundle/{serve-DDPIHDVZ.js → serve-WWLRNDT2.js} +6 -6
  77. package/dist/bundle/server-DE6NLNUF.js +52 -0
  78. package/dist/bundle/server-ZPSQKOAH.js +39 -0
  79. package/dist/bundle/{state-WWPPHERF.js → state-2BEGXAMO.js} +3 -3
  80. package/dist/bundle/{store-H6UIA4PK.js → store-AH6WZMCF.js} +7 -7
  81. package/dist/bundle/store-maintenance-command-PBXX3IEV.js +40 -0
  82. package/dist/version.d.ts +1 -1
  83. package/dist/version.js +1 -1
  84. package/docs/dev/TESTING.md +2 -0
  85. package/docs/dev/skills/release/SKILL.md +7 -3
  86. package/docs/dev/test-matrix.md +1 -1
  87. package/package.json +3 -2
  88. package/scripts/audit.sh +11 -1
  89. package/scripts/smoke-bundle.ts +2 -1
  90. package/scripts/smoke.ts +18 -0
  91. package/scripts/test-matrix-untested.ts +1 -1
  92. package/src/version.ts +1 -1
  93. package/dist/bundle/mcp-Y7VCIZ2J.js +0 -78
  94. package/dist/bundle/node-sqlite-X2DGRFOZ.js +0 -45
  95. package/dist/bundle/server-LKVYA2AE.js +0 -39
  96. package/dist/bundle/store-maintenance-command-EYBT64A2.js +0 -40
  97. /package/dist/bundle/{chunk-QVJLOUQB.js → chunk-GOO67PDU.js} +0 -0
@@ -6,17 +6,17 @@ import {
6
6
  commandPathOf,
7
7
  findCommand,
8
8
  outputOf
9
- } from "./chunk-OPPMGPFW.js";
10
- import "./chunk-AP7QKYBG.js";
11
- import "./chunk-VMTM46FH.js";
12
- import "./chunk-NTLPDH76.js";
13
- import "./chunk-54AJONOM.js";
14
- import "./chunk-7RXBN7HP.js";
15
- import "./chunk-LSEF4QC3.js";
9
+ } from "./chunk-IGHEW777.js";
10
+ import "./chunk-MUSYGFCY.js";
11
+ import "./chunk-QJ6XW4DM.js";
12
+ import "./chunk-MJRSEUKG.js";
13
+ import "./chunk-O3UXNU3S.js";
14
+ import "./chunk-VYSUKHKL.js";
15
+ import "./chunk-VLNKTMV7.js";
16
16
  import "./chunk-O5EHUB2V.js";
17
- import "./chunk-2CFBHYFA.js";
18
- import "./chunk-7RB76E2L.js";
19
- import "./chunk-4QRLPOJ7.js";
17
+ import "./chunk-FDBINRWA.js";
18
+ import "./chunk-EGRB55FF.js";
19
+ import "./chunk-IDWW4TU2.js";
20
20
  import "./chunk-EFHLQXG6.js";
21
21
  import "./chunk-Y5E2WNWB.js";
22
22
  import "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,158 @@
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-PJOVK7PG.js";
7
+ import {
8
+ CliError
9
+ } from "./chunk-EFHLQXG6.js";
10
+ import {
11
+ importFrom
12
+ } from "./chunk-Y5E2WNWB.js";
13
+ import {
14
+ __name
15
+ } from "./chunk-ZVVMGPBJ.js";
16
+
17
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/speech/decode.js
18
+ import { spawn } from "node:child_process";
19
+ import { mkdtemp, rm, writeFile } from "node:fs/promises";
20
+ import { createRequire } from "node:module";
21
+ import { tmpdir } from "node:os";
22
+ import { join } from "node:path";
23
+ import { pathToFileURL } from "node:url";
24
+ var LONGEST_AUDIO_SECONDS = 3600;
25
+ var FFMPEG_TIMEOUT_MS = 12e4;
26
+ var FFMPEG_FORMATS = "mov,mp4,m4a,3gp,3g2,mj2,aac,mp3,wav,amr,caf,aiff,flac,ogg,matroska,webm,asf";
27
+ var text = /* @__PURE__ */ __name((bytes, from, length) => String.fromCharCode(...bytes.subarray(from, from + length)), "text");
28
+ var contains = /* @__PURE__ */ __name((bytes, needle, within) => Buffer.from(bytes.buffer, bytes.byteOffset, Math.min(bytes.length, within)).includes(needle, 0, "latin1"), "contains");
29
+ var formatOf = /* @__PURE__ */ __name((bytes) => {
30
+ if (text(bytes, 0, 4) === "OggS") {
31
+ if (contains(bytes, "OpusHead", 128))
32
+ return "opus";
33
+ if (contains(bytes, "vorbis", 128))
34
+ return "vorbis";
35
+ return "other";
36
+ }
37
+ if (text(bytes, 0, 4) === "fLaC")
38
+ return "flac";
39
+ const frame = bytes[0] === 255 && ((bytes[1] ?? 0) & 224) === 224 && ((bytes[1] ?? 0) >> 1 & 3) !== 0;
40
+ if (text(bytes, 0, 3) === "ID3" || frame)
41
+ return "mp3";
42
+ return "other";
43
+ }, "formatOf");
44
+ var firstChannel = /* @__PURE__ */ __name((decoded) => {
45
+ const samples = decoded.channelData[0];
46
+ if (!samples || decoded.samplesDecoded === 0)
47
+ throw new CliError("validation_error", "no audio in that file");
48
+ return { samples, rate: decoded.sampleRate };
49
+ }, "firstChannel");
50
+ 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");
51
+ var decodeVorbis = /* @__PURE__ */ __name(async (bytes) => {
52
+ const { OggVorbisDecoder } = await load("@wasm-audio-decoders/ogg-vorbis");
53
+ const decoder = new OggVorbisDecoder();
54
+ await decoder.ready;
55
+ try {
56
+ return firstChannel(await decoder.decodeFile(bytes));
57
+ } finally {
58
+ decoder.free();
59
+ }
60
+ }, "decodeVorbis");
61
+ var decodeFlac = /* @__PURE__ */ __name(async (bytes) => {
62
+ const { FLACDecoder } = await load("@wasm-audio-decoders/flac");
63
+ const decoder = new FLACDecoder();
64
+ await decoder.ready;
65
+ try {
66
+ return firstChannel(await decoder.decodeFile(bytes));
67
+ } finally {
68
+ decoder.free();
69
+ }
70
+ }, "decodeFlac");
71
+ var decodeMp3 = /* @__PURE__ */ __name(async (bytes) => {
72
+ const { MPEGDecoder } = await load("mpg123-decoder");
73
+ const decoder = new MPEGDecoder();
74
+ await decoder.ready;
75
+ try {
76
+ return firstChannel(decoder.decode(bytes));
77
+ } finally {
78
+ decoder.free();
79
+ }
80
+ }, "decodeMp3");
81
+ var runFfmpeg = /* @__PURE__ */ __name(async (bytes) => {
82
+ const directory = await mkdtemp(join(tmpdir(), "wirecat-audio-"));
83
+ try {
84
+ const input = join(directory, "audio");
85
+ await writeFile(input, bytes, { mode: 384 });
86
+ const largest = LONGEST_AUDIO_SECONDS * SAMPLE_RATE * 4;
87
+ const output = await new Promise((resolve, reject) => {
88
+ const child = spawn("ffmpeg", [
89
+ "-nostdin",
90
+ "-hide_banner",
91
+ "-loglevel",
92
+ "error",
93
+ "-protocol_whitelist",
94
+ "file",
95
+ "-format_whitelist",
96
+ FFMPEG_FORMATS,
97
+ "-i",
98
+ input,
99
+ "-vn",
100
+ "-ac",
101
+ "1",
102
+ "-ar",
103
+ String(SAMPLE_RATE),
104
+ "-f",
105
+ "f32le",
106
+ "pipe:1"
107
+ ], { stdio: ["ignore", "pipe", "pipe"], timeout: FFMPEG_TIMEOUT_MS });
108
+ const chunks = [];
109
+ let size = 0;
110
+ let errors = "";
111
+ child.stdout.on("data", (chunk) => {
112
+ size += chunk.length;
113
+ if (size > largest)
114
+ child.kill();
115
+ else
116
+ chunks.push(chunk);
117
+ });
118
+ child.stderr.on("data", (chunk) => {
119
+ errors = (errors + chunk.toString()).slice(-500);
120
+ });
121
+ child.on("error", (error) => reject(error.code === "ENOENT" ? new CliError("validation_error", "only ffmpeg reads this audio format, and ffmpeg is not installed") : error));
122
+ child.on("close", (code) => {
123
+ if (size > largest)
124
+ reject(new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`));
125
+ else if (code === 0)
126
+ resolve(Buffer.concat(chunks));
127
+ else
128
+ reject(new CliError("validation_error", `ffmpeg could not read the audio: ${errors.trim() || code}`));
129
+ });
130
+ });
131
+ const samples = new Float32Array(Math.floor(output.length / 4));
132
+ Buffer.from(samples.buffer).set(output.subarray(0, samples.length * 4));
133
+ return { samples, rate: SAMPLE_RATE };
134
+ } finally {
135
+ await rm(directory, { recursive: true, force: true });
136
+ }
137
+ }, "runFfmpeg");
138
+ var BUNDLED = {
139
+ opus: decodeOgg,
140
+ vorbis: decodeVorbis,
141
+ flac: decodeFlac,
142
+ mp3: decodeMp3
143
+ };
144
+ var decodeAudio = /* @__PURE__ */ __name(async (bytes, ffmpeg = runFfmpeg) => {
145
+ const format = formatOf(bytes);
146
+ const pcm = format === "other" ? await ffmpeg(bytes) : await BUNDLED[format](bytes).catch((error) => ffmpeg(bytes).catch(() => {
147
+ throw error;
148
+ }));
149
+ if (pcm.samples.length / pcm.rate > LONGEST_AUDIO_SECONDS)
150
+ throw new CliError("validation_error", `the audio is longer than ${LONGEST_AUDIO_SECONDS / 60} minutes`);
151
+ return pcm;
152
+ }, "decodeAudio");
153
+ export {
154
+ LONGEST_AUDIO_SECONDS,
155
+ decodeAudio,
156
+ formatOf,
157
+ runFfmpeg
158
+ };
@@ -42399,7 +42399,7 @@ function install11(registers) {
42399
42399
  }
42400
42400
  __name(install11, "install");
42401
42401
 
42402
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/charts/echarts-option.js
42402
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/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.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/charts/echarts.js
42450
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/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-OPJ24VGH.js";
17
- import "./chunk-7RB76E2L.js";
18
- import "./chunk-4QRLPOJ7.js";
16
+ } from "./chunk-QKWRL4OD.js";
17
+ import "./chunk-EGRB55FF.js";
18
+ import "./chunk-IDWW4TU2.js";
19
19
  import "./chunk-EFHLQXG6.js";
20
20
  import "./chunk-Y5E2WNWB.js";
21
21
  import "./chunk-ZVVMGPBJ.js";
@@ -4,9 +4,9 @@ import {
4
4
  openSession,
5
5
  truncated,
6
6
  unit
7
- } from "./chunk-OPJ24VGH.js";
8
- import "./chunk-7RB76E2L.js";
9
- import "./chunk-4QRLPOJ7.js";
7
+ } from "./chunk-QKWRL4OD.js";
8
+ import "./chunk-EGRB55FF.js";
9
+ import "./chunk-IDWW4TU2.js";
10
10
  import {
11
11
  CliError
12
12
  } from "./chunk-EFHLQXG6.js";
@@ -17,11 +17,11 @@ import {
17
17
  __name
18
18
  } from "./chunk-ZVVMGPBJ.js";
19
19
 
20
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
20
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
21
21
  import { readFileSync } from "node:fs";
22
22
  import { join } from "node:path";
23
23
 
24
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
24
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/images/picture/preprocess.js
25
25
  var SIZE = 224;
26
26
  var MEAN = [0.48145466, 0.4578275, 0.40821073];
27
27
  var STD = [0.26862954, 0.26130258, 0.27577711];
@@ -60,7 +60,7 @@ var preprocess = /* @__PURE__ */ __name(async (bytes, load = importCanvas) => {
60
60
  return pixels;
61
61
  }, "preprocess");
62
62
 
63
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
63
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/images/picture/embedder.js
64
64
  var openPictureEmbedder = /* @__PURE__ */ __name(async (model, directory, { threads = 4, canvas } = {}) => {
65
65
  const { Tokenizer } = await importFrom(new URL("images/picture/embedder.js", import.meta.resolve("@wirecat/cli-core")).href, "@huggingface/tokenizers");
66
66
  const path = /* @__PURE__ */ __name((name) => join(directory, model.id, name), "path");
@@ -5,13 +5,13 @@ import {
5
5
  asksAtStart,
6
6
  setupAtStart,
7
7
  systemLanguage
8
- } from "./chunk-TARN7CHN.js";
8
+ } from "./chunk-SVDF6NJF.js";
9
9
  import "./chunk-E42W72PQ.js";
10
10
  import "./chunk-MFS52LTZ.js";
11
- import "./chunk-W2IDKBNB.js";
12
- import "./chunk-54AJONOM.js";
13
- import "./chunk-2CFBHYFA.js";
14
- import "./chunk-4QRLPOJ7.js";
11
+ import "./chunk-PBN4RBHS.js";
12
+ import "./chunk-O3UXNU3S.js";
13
+ import "./chunk-FDBINRWA.js";
14
+ import "./chunk-IDWW4TU2.js";
15
15
  import "./chunk-EFHLQXG6.js";
16
16
  import "./chunk-Y5E2WNWB.js";
17
17
  import "./chunk-ZVVMGPBJ.js";
@@ -4,19 +4,19 @@ import {
4
4
  WIRECAT_TOOLS,
5
5
  firstScreen,
6
6
  installHelp
7
- } from "./chunk-O3PBQVAB.js";
7
+ } from "./chunk-JHO2LL2J.js";
8
8
  import "./chunk-HTQTIKWP.js";
9
- import "./chunk-OPPMGPFW.js";
10
- import "./chunk-AP7QKYBG.js";
11
- import "./chunk-VMTM46FH.js";
12
- import "./chunk-NTLPDH76.js";
13
- import "./chunk-54AJONOM.js";
14
- import "./chunk-7RXBN7HP.js";
15
- import "./chunk-LSEF4QC3.js";
9
+ import "./chunk-IGHEW777.js";
10
+ import "./chunk-MUSYGFCY.js";
11
+ import "./chunk-QJ6XW4DM.js";
12
+ import "./chunk-MJRSEUKG.js";
13
+ import "./chunk-O3UXNU3S.js";
14
+ import "./chunk-VYSUKHKL.js";
15
+ import "./chunk-VLNKTMV7.js";
16
16
  import "./chunk-O5EHUB2V.js";
17
- import "./chunk-2CFBHYFA.js";
18
- import "./chunk-7RB76E2L.js";
19
- import "./chunk-4QRLPOJ7.js";
17
+ import "./chunk-FDBINRWA.js";
18
+ import "./chunk-EGRB55FF.js";
19
+ import "./chunk-IDWW4TU2.js";
20
20
  import "./chunk-EFHLQXG6.js";
21
21
  import "./chunk-Y5E2WNWB.js";
22
22
  import "./chunk-ZVVMGPBJ.js";
@@ -1,9 +1,11 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
3
  import {
4
+ appInstructions,
4
5
  instructions
5
- } from "./chunk-DMCN22H6.js";
6
+ } from "./chunk-ERGB4NJA.js";
6
7
  import "./chunk-ZVVMGPBJ.js";
7
8
  export {
9
+ appInstructions,
8
10
  instructions
9
11
  };
@@ -1,62 +1,62 @@
1
1
  import { createRequire as __bundleRequire } from "node:module";
2
2
  const require = __bundleRequire(import.meta.url);
3
- import "./chunk-QVJLOUQB.js";
3
+ import "./chunk-GOO67PDU.js";
4
4
  import {
5
5
  MCP_PATH,
6
6
  serveOverHttp
7
- } from "./chunk-FXS3X76A.js";
8
- import "./chunk-MNSD5BX2.js";
9
- import "./chunk-FWVKHD2L.js";
10
- import "./chunk-BDSDQCV4.js";
11
- import "./chunk-437W3Z2M.js";
12
- import "./chunk-QGNNMPUB.js";
13
- import "./chunk-IJ3IA7EK.js";
7
+ } from "./chunk-TAYOKLGF.js";
8
+ import "./chunk-JRK73FOW.js";
9
+ import "./chunk-HDY5X3WQ.js";
10
+ import "./chunk-JAOGZMKQ.js";
11
+ import "./chunk-IN3FVRPK.js";
12
+ import "./chunk-7IXL4UFK.js";
13
+ import "./chunk-CXQXVKUY.js";
14
14
  import {
15
15
  registerCommands,
16
16
  runCommandForAgent,
17
17
  toolsFromCommands
18
- } from "./chunk-JEBSORH7.js";
19
- import "./chunk-MZVV2JZT.js";
18
+ } from "./chunk-YJNUDHJD.js";
19
+ import "./chunk-4LURWBVV.js";
20
20
  import {
21
21
  StdioServerTransport
22
- } from "./chunk-XFXBXQBS.js";
23
- import "./chunk-FIHDGZIB.js";
24
- import "./chunk-O5LMDQTO.js";
22
+ } from "./chunk-IBBN7Z3A.js";
23
+ import "./chunk-FZZIU4B7.js";
24
+ import "./chunk-KJTNT4SW.js";
25
25
  import "./chunk-E42W72PQ.js";
26
26
  import "./chunk-MFS52LTZ.js";
27
- import "./chunk-ASMH7JWZ.js";
27
+ import "./chunk-TGB5F7NC.js";
28
28
  import {
29
29
  McpServer
30
30
  } from "./chunk-5D4AEUVA.js";
31
31
  import {
32
32
  httpLockFile
33
- } from "./chunk-222FANS2.js";
34
- import "./chunk-6CBWO7OF.js";
35
- import "./chunk-75LVQQEK.js";
36
- import "./chunk-W2IDKBNB.js";
37
- import "./chunk-ABP7FDMJ.js";
38
- import "./chunk-JTTW5ZKF.js";
39
- import "./chunk-AP7QKYBG.js";
40
- import "./chunk-VMTM46FH.js";
41
- import "./chunk-NTLPDH76.js";
42
- import "./chunk-54AJONOM.js";
43
- import "./chunk-7RXBN7HP.js";
44
- import "./chunk-LSEF4QC3.js";
33
+ } from "./chunk-V3ZTQ24B.js";
34
+ import "./chunk-RUKDZEID.js";
35
+ import "./chunk-OV6PHTAY.js";
36
+ import "./chunk-PBN4RBHS.js";
37
+ import "./chunk-35KYY65W.js";
38
+ import "./chunk-NOVLCHDV.js";
39
+ import "./chunk-MUSYGFCY.js";
40
+ import "./chunk-QJ6XW4DM.js";
41
+ import "./chunk-MJRSEUKG.js";
42
+ import "./chunk-O3UXNU3S.js";
43
+ import "./chunk-VYSUKHKL.js";
44
+ import "./chunk-VLNKTMV7.js";
45
45
  import "./chunk-O5EHUB2V.js";
46
- import "./chunk-2CFBHYFA.js";
46
+ import "./chunk-FDBINRWA.js";
47
47
  import {
48
48
  IDENTITY
49
- } from "./chunk-MTGLJCAZ.js";
50
- import "./chunk-OPJ24VGH.js";
51
- import "./chunk-7RB76E2L.js";
52
- import "./chunk-4QRLPOJ7.js";
53
- import "./chunk-B4EED2RF.js";
49
+ } from "./chunk-KAREKBUZ.js";
50
+ import "./chunk-QKWRL4OD.js";
51
+ import "./chunk-EGRB55FF.js";
52
+ import "./chunk-IDWW4TU2.js";
53
+ import "./chunk-2B5U4Z5H.js";
54
54
  import {
55
55
  CliError,
56
56
  mcpErrorResult
57
57
  } from "./chunk-EFHLQXG6.js";
58
58
  import "./chunk-Y5E2WNWB.js";
59
- import "./chunk-S57AMKLX.js";
59
+ import "./chunk-Z7MSIRSQ.js";
60
60
  import {
61
61
  __name
62
62
  } from "./chunk-ZVVMGPBJ.js";
@@ -0,0 +1,78 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import "./chunk-GOO67PDU.js";
4
+ import {
5
+ MCP_PATH,
6
+ serveOverHttp
7
+ } from "./chunk-TAYOKLGF.js";
8
+ import "./chunk-JRK73FOW.js";
9
+ import {
10
+ allProfilesServer,
11
+ serveAllProfilesOverHttp,
12
+ serveAllProfilesOverStdio
13
+ } from "./chunk-HDY5X3WQ.js";
14
+ import {
15
+ mcpUrlOf,
16
+ portOf,
17
+ publicUrlOf
18
+ } from "./chunk-JAOGZMKQ.js";
19
+ import "./chunk-IN3FVRPK.js";
20
+ import {
21
+ createBotServer
22
+ } from "./chunk-7IXL4UFK.js";
23
+ import "./chunk-CXQXVKUY.js";
24
+ import {
25
+ registerCommands,
26
+ runCommandForAgent,
27
+ toolsFromCommands
28
+ } from "./chunk-YJNUDHJD.js";
29
+ import "./chunk-4LURWBVV.js";
30
+ import "./chunk-IBBN7Z3A.js";
31
+ import "./chunk-FZZIU4B7.js";
32
+ import "./chunk-KJTNT4SW.js";
33
+ import "./chunk-E42W72PQ.js";
34
+ import "./chunk-MFS52LTZ.js";
35
+ import {
36
+ revokeAll
37
+ } from "./chunk-TGB5F7NC.js";
38
+ import "./chunk-5D4AEUVA.js";
39
+ import {
40
+ httpLockFile
41
+ } from "./chunk-V3ZTQ24B.js";
42
+ import "./chunk-RUKDZEID.js";
43
+ import "./chunk-OV6PHTAY.js";
44
+ import "./chunk-PBN4RBHS.js";
45
+ import "./chunk-35KYY65W.js";
46
+ import "./chunk-NOVLCHDV.js";
47
+ import "./chunk-MUSYGFCY.js";
48
+ import "./chunk-QJ6XW4DM.js";
49
+ import "./chunk-MJRSEUKG.js";
50
+ import "./chunk-O3UXNU3S.js";
51
+ import "./chunk-VYSUKHKL.js";
52
+ import "./chunk-VLNKTMV7.js";
53
+ import "./chunk-O5EHUB2V.js";
54
+ import "./chunk-FDBINRWA.js";
55
+ import "./chunk-QKWRL4OD.js";
56
+ import "./chunk-EGRB55FF.js";
57
+ import "./chunk-IDWW4TU2.js";
58
+ import "./chunk-2B5U4Z5H.js";
59
+ import "./chunk-EFHLQXG6.js";
60
+ import "./chunk-Y5E2WNWB.js";
61
+ import "./chunk-Z7MSIRSQ.js";
62
+ import "./chunk-ZVVMGPBJ.js";
63
+ export {
64
+ MCP_PATH,
65
+ allProfilesServer,
66
+ createBotServer,
67
+ httpLockFile,
68
+ mcpUrlOf,
69
+ portOf,
70
+ publicUrlOf,
71
+ registerCommands,
72
+ revokeAll,
73
+ runCommandForAgent,
74
+ serveAllProfilesOverHttp,
75
+ serveAllProfilesOverStdio,
76
+ serveOverHttp,
77
+ toolsFromCommands
78
+ };
@@ -18,12 +18,12 @@ import {
18
18
  jitCompatCheck,
19
19
  refineSqliteCodecs,
20
20
  sql
21
- } from "./chunk-S57AMKLX.js";
21
+ } from "./chunk-Z7MSIRSQ.js";
22
22
  import {
23
23
  __name
24
24
  } from "./chunk-ZVVMGPBJ.js";
25
25
 
26
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/store/sqlite/drizzle/node.js
26
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/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 },
@@ -0,0 +1,61 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ loadVectorExtension,
5
+ vectorExtension
6
+ } from "./chunk-QBP7OMN5.js";
7
+ import "./chunk-EFHLQXG6.js";
8
+ import "./chunk-Y5E2WNWB.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-ZVVMGPBJ.js";
12
+
13
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
14
+ import { DatabaseSync } from "node:sqlite";
15
+ var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
16
+ var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
17
+ const extension = await vectorExtension();
18
+ const client = new DatabaseSync(path, { readOnly, allowExtension: true });
19
+ try {
20
+ loadVectorExtension(client, extension);
21
+ return client;
22
+ } catch (error) {
23
+ client.close();
24
+ throw error;
25
+ }
26
+ }, "nodeClient");
27
+ var STATEMENT_CACHE_SIZE = 1e3;
28
+ var cacheOverNodeSqlite = /* @__PURE__ */ __name((database, cacheSize = STATEMENT_CACHE_SIZE) => {
29
+ const statements = /* @__PURE__ */ new Map();
30
+ const prepare = /* @__PURE__ */ __name((sql) => {
31
+ const statement = database.prepare(sql);
32
+ return {
33
+ run: /* @__PURE__ */ __name((...parameters) => ({ changes: Number(statement.run(...parameters).changes) }), "run"),
34
+ get: /* @__PURE__ */ __name((...parameters) => statement.get(...parameters), "get"),
35
+ all: /* @__PURE__ */ __name((...parameters) => statement.all(...parameters), "all")
36
+ };
37
+ }, "prepare");
38
+ return {
39
+ exec: /* @__PURE__ */ __name((sql) => database.exec(sql), "exec"),
40
+ prepare: /* @__PURE__ */ __name((sql) => {
41
+ const cached = statements.get(sql);
42
+ if (cached)
43
+ statements.delete(sql);
44
+ const statement = cached ?? prepare(sql);
45
+ statements.set(sql, statement);
46
+ if (statements.size > cacheSize)
47
+ statements.delete(statements.keys().next().value);
48
+ return statement;
49
+ }, "prepare"),
50
+ close: /* @__PURE__ */ __name(() => {
51
+ statements.clear();
52
+ database.close();
53
+ }, "close")
54
+ };
55
+ }, "cacheOverNodeSqlite");
56
+ export {
57
+ STATEMENT_CACHE_SIZE,
58
+ cacheOverNodeSqlite,
59
+ nodeClient,
60
+ openWithNodeSqlite
61
+ };
@@ -3,11 +3,11 @@ const require = __bundleRequire(import.meta.url);
3
3
  import {
4
4
  ownerLogin,
5
5
  revokeAll
6
- } from "./chunk-ASMH7JWZ.js";
6
+ } from "./chunk-TGB5F7NC.js";
7
7
  import "./chunk-5D4AEUVA.js";
8
- import "./chunk-222FANS2.js";
9
- import "./chunk-6CBWO7OF.js";
10
- import "./chunk-7RXBN7HP.js";
8
+ import "./chunk-V3ZTQ24B.js";
9
+ import "./chunk-RUKDZEID.js";
10
+ import "./chunk-VYSUKHKL.js";
11
11
  import "./chunk-EFHLQXG6.js";
12
12
  import "./chunk-Y5E2WNWB.js";
13
13
  import "./chunk-ZVVMGPBJ.js";
@@ -6,7 +6,7 @@ import {
6
6
  openCache,
7
7
  openFile,
8
8
  storeCapable
9
- } from "./chunk-B4EED2RF.js";
9
+ } from "./chunk-2B5U4Z5H.js";
10
10
  import "./chunk-EFHLQXG6.js";
11
11
  import "./chunk-Y5E2WNWB.js";
12
12
  import "./chunk-ZVVMGPBJ.js";
@@ -5,7 +5,7 @@ import {
5
5
  __name
6
6
  } from "./chunk-ZVVMGPBJ.js";
7
7
 
8
- // node_modules/.pnpm/@wirecat+cli-core@0.469.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_9d12b0091b773232c527328da5835651/node_modules/@wirecat/cli-core/dist/embeddings/process.js
8
+ // node_modules/.pnpm/@wirecat+cli-core@0.495.0_@wirecat+cli-base@0.65.0_commander@15.0.0_esbuild@0.28.2_type_24cca5e5c8b0984f2f26e7d1ba6b6d47/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";