@wirecat/cli-template 0.15.0 → 0.17.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/.github/workflows/ci.yml +35 -0
- package/.github/workflows/release-pr.yml +37 -0
- package/AGENTS.md +56 -2
- package/CHANGELOG.md +50 -0
- package/README.md +12 -4
- package/bin/release +10 -3
- package/biome.json +8 -2
- package/contracts/mcp-tools.json +2 -2
- package/contracts/plan.json +2 -1
- package/dist/bin/clidev.js +2 -2
- package/dist/bundle/{chunk-LU4A2T7Y.js → all-profiles-CCT2XPJL.js} +10 -7
- package/dist/bundle/{anthropic-ICTW7CNQ.js → anthropic-QLLP7EE4.js} +4 -4
- package/dist/bundle/{app-server-OW5LT5XV.js → app-server-ELI5TGL7.js} +36 -37
- package/dist/bundle/{bun-ILPS6AYA.js → bun-C7JS2V7G.js} +2 -2
- package/dist/bundle/{bun-sqlite-JE6FJFQT.js → bun-sqlite-OM72TCYT.js} +3 -3
- package/dist/bundle/{chunk-7F5VMLVK.js → chunk-2Y5NBD7U.js} +4 -4
- package/dist/bundle/chunk-33JGD2CR.js +141 -0
- package/dist/bundle/{chunk-F34HGYWF.js → chunk-3VVIEZRY.js} +2 -2
- package/dist/bundle/{chunk-CGFQT3LQ.js → chunk-6PHTRAZA.js} +1 -1
- package/dist/bundle/{chunk-VS5LGSTM.js → chunk-6VCFDEHT.js} +1 -1
- package/dist/bundle/{chunk-NENYWEXF.js → chunk-7OQF5ZMN.js} +1 -1
- package/dist/bundle/{chunk-62JRF2JA.js → chunk-AKUMR7PE.js} +2 -2
- package/dist/bundle/{chunk-7UPBPE3Z.js → chunk-ASO23RNM.js} +152 -79
- package/dist/bundle/{chunk-VOTEB3AN.js → chunk-AUVPTFUS.js} +1 -1
- package/dist/bundle/{chunk-KLFYY7KC.js → chunk-BOCIYBBO.js} +53 -44
- package/dist/bundle/{chunk-TJJ2XSJP.js → chunk-BXZRTMXA.js} +5 -5
- package/dist/bundle/{chunk-66VMJGV6.js → chunk-DVLM23HB.js} +2 -2
- package/dist/bundle/{chunk-YIVY2WI3.js → chunk-E4KQOKQ5.js} +1 -1
- package/dist/bundle/{chunk-GHF72SHT.js → chunk-EQDVQN4E.js} +306 -258
- package/dist/bundle/{chunk-NH6LZ3H3.js → chunk-FF3AGTHY.js} +6 -6
- package/dist/bundle/{chunk-NG7MOJBT.js → chunk-GG5PXNMH.js} +61 -21
- package/dist/bundle/{chunk-LFLSV353.js → chunk-GUCMIUNB.js} +2 -2
- package/dist/bundle/{chunk-R5RYPD23.js → chunk-HVAEHUSZ.js} +2 -2
- package/dist/bundle/{chunk-PIJUGF5F.js → chunk-ITPFCKCL.js} +13 -13
- package/dist/bundle/{chunk-DQIBGCF3.js → chunk-J2RUBXCI.js} +6 -6
- package/dist/bundle/{chunk-7Z4HR6GO.js → chunk-KRXN3FV3.js} +1 -1
- package/dist/bundle/{chunk-45244QQ6.js → chunk-LFLN6PVS.js} +4 -4
- package/dist/bundle/{chunk-MWUHBEDN.js → chunk-LN53L2V5.js} +11 -11
- package/dist/bundle/{chunk-IOJ2DTCY.js → chunk-MLSN3UP4.js} +28 -26
- package/dist/bundle/{chunk-3MDNAYQA.js → chunk-O6PBO4BU.js} +1 -1
- package/dist/bundle/{chunk-YOJLIVGO.js → chunk-QJS4WWYK.js} +63 -63
- package/dist/bundle/{chunk-NVNUUHT5.js → chunk-QLBS6OC2.js} +2362 -1225
- package/dist/bundle/{chunk-2DAXUNTS.js → chunk-QVPTZDRA.js} +2 -2
- package/dist/bundle/{chunk-4MU2UM4C.js → chunk-R5CPFSPI.js} +7 -7
- package/dist/bundle/{chunk-AS2PJNQ2.js → chunk-R5IY4O25.js} +4 -4
- package/dist/bundle/{chunk-DZLHY4IA.js → chunk-RGKXMVOZ.js} +3 -3
- package/dist/bundle/{chunk-G45R7M42.js → chunk-RT46AWIH.js} +1 -1
- package/dist/bundle/{chunk-NRZV7K4M.js → chunk-RUHNHEAF.js} +3 -3
- package/dist/bundle/{chunk-VXOR76ZL.js → chunk-S465TCR3.js} +8 -8
- package/dist/bundle/{chunk-NVGOHYTE.js → chunk-SQKP6V4S.js} +27 -13
- package/dist/bundle/{chunk-FC53WQHG.js → chunk-SQOXYNKF.js} +1 -1
- package/dist/bundle/{chunk-R2JKPHH5.js → chunk-URPKIONS.js} +8 -8
- package/dist/bundle/{chunk-VVGPAHUN.js → chunk-UW4PJZVJ.js} +298 -170
- package/dist/bundle/{chunk-EX2FV7YJ.js → chunk-WKUJCPSP.js} +89 -45
- package/dist/bundle/{chunk-LATYBJ4T.js → chunk-WQBBSVZM.js} +2 -2
- package/dist/bundle/{chunk-G7W53MQP.js → chunk-WRLOK7XC.js} +3 -3
- package/dist/bundle/{chunk-SOYOOU2D.js → chunk-X44ZT64I.js} +3 -3
- package/dist/bundle/{chunk-U6QD3J3F.js → chunk-XKL5FRH3.js} +3 -3
- package/dist/bundle/{chunk-6AW4DDK4.js → chunk-XS56LIQ7.js} +4 -4
- package/dist/bundle/{chunk-3WDYHOAF.js → chunk-YIH3PYWJ.js} +1 -1
- package/dist/bundle/{chunk-5GTMQTQH.js → chunk-ZRNBKTPP.js} +27 -29
- package/dist/bundle/clidev.js +3 -3
- package/dist/bundle/{command-contract-3MPKXBVL.js → command-contract-RV5ZOEAT.js} +11 -11
- package/dist/bundle/{decode-NXB5UKMO.js → decode-V7HNHZBC.js} +3 -3
- package/dist/bundle/{echarts-DRDGGHJT.js → echarts-Y42YP2OL.js} +2 -2
- package/dist/bundle/{embed-IKZ24BMC.js → embed-JSQZL7JF.js} +4 -4
- package/dist/bundle/{embedder-GMQ24DOQ.js → embedder-7BHRCXWL.js} +7 -7
- package/dist/bundle/{first-run-PURIGDLD.js → first-run-BJ36KGST.js} +8 -8
- package/dist/bundle/first-screen-5YHQVNY4.js +26 -0
- package/dist/bundle/{instructions-EOQOXY6V.js → instructions-UWERND54.js} +1 -1
- package/dist/bundle/{mcp-7HBLFGCW.js → mcp-P4FSBSRS.js} +2 -2
- package/dist/bundle/{node-52WF2326.js → node-PZDNPKN7.js} +2 -2
- package/dist/bundle/{node-sqlite-73Z4SFOA.js → node-sqlite-4F5NLRNT.js} +4 -4
- package/dist/bundle/{oauth-EVTPAMZP.js → oauth-VDXNA3DK.js} +5 -5
- package/dist/bundle/{open-46WZAPJ3.js → open-EUJRQQNS.js} +3 -3
- package/dist/bundle/{openai-GWRDAHDU.js → openai-EIBV2K72.js} +14 -35
- package/dist/bundle/{process-YIQPKLZI.js → process-XD5ZIFIL.js} +1 -1
- package/dist/bundle/{program-37NVH5YJ.js → program-TJTVMIOX.js} +3067 -736
- package/dist/bundle/{prompt-IVEYRLS5.js → prompt-LYUZNHDK.js} +3 -3
- package/dist/bundle/{recognize-WVEKHODM.js → recognize-LQMHLOD5.js} +2 -2
- package/dist/bundle/{remote-4K5VPMC7.js → remote-34HUWSZI.js} +5 -5
- package/dist/bundle/{rerank-V24UJZYJ.js → rerank-ONBASQ5Z.js} +5 -5
- package/dist/bundle/{chunk-EMHCXXNJ.js → serve-UJ7FDYAM.js} +8 -6
- package/dist/bundle/{chunk-KJ3UADR3.js → server-GNT76BXM.js} +29 -9
- package/dist/bundle/server-J4YIXKMI.js +52 -0
- package/dist/bundle/{state-ZPYGECVP.js → state-IW5OO6IZ.js} +4 -4
- package/dist/bundle/{store-6JQCLPQF.js → store-55UB27H2.js} +12 -10
- package/dist/bundle/store-maintenance-command-BLDKUZ3L.js +42 -0
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.d.ts.map +1 -0
- package/dist/commands/comments.js +114 -0
- package/dist/commands/comments.js.map +1 -0
- package/dist/commands/session.d.ts +3 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +96 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/context.d.ts +83 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +58 -0
- package/dist/context.js.map +1 -0
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +25 -4
- package/dist/program.js.map +1 -1
- package/dist/sample/comments.d.ts +61 -0
- package/dist/sample/comments.d.ts.map +1 -0
- package/dist/sample/comments.js +39 -0
- package/dist/sample/comments.js.map +1 -0
- package/dist/sample/transport.d.ts +42 -0
- package/dist/sample/transport.d.ts.map +1 -0
- package/dist/sample/transport.js +152 -0
- package/dist/sample/transport.js.map +1 -0
- package/dist/token.d.ts +16 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +32 -0
- package/dist/token.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/commands.md +234 -12
- package/docs/configuration.md +1 -1
- package/docs/dev/reference-clis.md +3 -2
- package/docs/dev/skills/release/SKILL.md +9 -3
- package/docs/dev/skills/release/fresh-audit.md +1 -1
- package/docs/dev/test-matrix.md +36 -5
- package/docs/index.md +4 -3
- package/docs/security.md +4 -2
- package/kit/dist/new.js +7 -3
- package/lint/overrides.json +9 -1
- package/package.json +6 -7
- package/scripts/test-matrix-untested.ts +19 -0
- package/skills/clidev-cli/SKILL.md +1 -1
- package/src/commands/comments.ts +167 -0
- package/src/commands/session.ts +144 -0
- package/src/comments.test.ts +258 -0
- package/src/context.ts +78 -0
- package/src/mcp.test.ts +71 -76
- package/src/program.test.ts +9 -16
- package/src/program.ts +29 -4
- package/src/sample/comments.ts +51 -0
- package/src/sample/transport.test.ts +117 -0
- package/src/sample/transport.ts +184 -0
- package/src/testing/fake-comments.ts +167 -0
- package/src/testing/harness.ts +51 -0
- package/src/token.ts +42 -0
- package/src/version.ts +1 -1
- package/dist/bundle/all-profiles-NVB2HT2S.js +0 -24
- package/dist/bundle/chunk-GUFPQZUA.js +0 -48
- package/dist/bundle/chunk-NL2DQPT7.js +0 -2
- package/dist/bundle/first-screen-B2CF2CET.js +0 -26
- package/dist/bundle/mcp-ASNYBQ5B.js +0 -152
- package/dist/bundle/mcp-EY2NUYDQ.js +0 -82
- package/dist/bundle/serve-PJWSOV7F.js +0 -19
- package/dist/bundle/server-3TPCEZ6P.js +0 -40
- package/dist/bundle/server-GQX5MZTT.js +0 -53
- package/dist/bundle/store-maintenance-command-ND4ADMGC.js +0 -42
- package/dist/commands/doctor.d.ts +0 -77
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -74
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -3
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -97
- package/dist/commands/mcp.js.map +0 -1
- package/dist/mcp.d.ts +0 -29
- package/dist/mcp.d.ts.map +0 -1
- package/dist/mcp.js +0 -98
- package/dist/mcp.js.map +0 -1
- package/src/commands/doctor.ts +0 -86
- package/src/commands/mcp.ts +0 -130
- package/src/mcp-http.test.ts +0 -172
- package/src/mcp.ts +0 -140
|
@@ -8,17 +8,15 @@ import {
|
|
|
8
8
|
chartRenderer,
|
|
9
9
|
chatChart,
|
|
10
10
|
keepRefreshedRefs,
|
|
11
|
+
mcpUrlOf,
|
|
11
12
|
refuseWriteBeforeConnecting,
|
|
12
13
|
registerPrompts,
|
|
13
14
|
stdinFieldOf,
|
|
14
15
|
syncsFirst
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
mcpUrlOf
|
|
18
|
-
} from "./chunk-GUFPQZUA.js";
|
|
16
|
+
} from "./chunk-GG5PXNMH.js";
|
|
19
17
|
import {
|
|
20
18
|
answeredWire
|
|
21
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6VCFDEHT.js";
|
|
22
20
|
import {
|
|
23
21
|
BinaryResource,
|
|
24
22
|
Picture,
|
|
@@ -39,21 +37,21 @@ import {
|
|
|
39
37
|
tool,
|
|
40
38
|
toolKey,
|
|
41
39
|
toolsFromCommands
|
|
42
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ASO23RNM.js";
|
|
43
41
|
import {
|
|
44
42
|
agentJson,
|
|
45
43
|
skillResource
|
|
46
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SQKP6V4S.js";
|
|
47
45
|
import {
|
|
48
46
|
StdioServerTransport,
|
|
49
47
|
callerOf,
|
|
50
48
|
callingAgent,
|
|
51
49
|
serveStdio
|
|
52
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-3VVIEZRY.js";
|
|
53
51
|
import {
|
|
54
52
|
connectedFor,
|
|
55
53
|
guardFor
|
|
56
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-BOCIYBBO.js";
|
|
57
55
|
import {
|
|
58
56
|
capability,
|
|
59
57
|
dateWindow,
|
|
@@ -62,20 +60,20 @@ import {
|
|
|
62
60
|
servicesFor,
|
|
63
61
|
storedDeps,
|
|
64
62
|
wholeList
|
|
65
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-EQDVQN4E.js";
|
|
66
64
|
import {
|
|
67
65
|
instructions
|
|
68
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-RT46AWIH.js";
|
|
69
67
|
import {
|
|
70
68
|
McpServer,
|
|
71
69
|
ResourceTemplate
|
|
72
70
|
} from "./chunk-5D4AEUVA.js";
|
|
73
71
|
import {
|
|
74
72
|
mcpHttpMarker
|
|
75
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-XS56LIQ7.js";
|
|
76
74
|
import {
|
|
77
75
|
findCommand
|
|
78
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-RUHNHEAF.js";
|
|
79
77
|
import {
|
|
80
78
|
DEFAULT_OUTPUT_BYTES,
|
|
81
79
|
changesAuthorityAt,
|
|
@@ -92,21 +90,21 @@ import {
|
|
|
92
90
|
sealed,
|
|
93
91
|
snakeKeys,
|
|
94
92
|
typedCommand
|
|
95
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-UW4PJZVJ.js";
|
|
96
94
|
import {
|
|
97
95
|
isCliFailure,
|
|
98
96
|
withCaller
|
|
99
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-S465TCR3.js";
|
|
100
98
|
import {
|
|
101
99
|
openStore,
|
|
102
100
|
pdfPreviewLimits
|
|
103
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-QLBS6OC2.js";
|
|
104
102
|
import {
|
|
105
103
|
timezoneOf
|
|
106
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-QJS4WWYK.js";
|
|
107
105
|
import {
|
|
108
106
|
warmEmbedders
|
|
109
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-J2RUBXCI.js";
|
|
110
108
|
import {
|
|
111
109
|
CliError,
|
|
112
110
|
description,
|
|
@@ -124,15 +122,15 @@ import {
|
|
|
124
122
|
strictObject,
|
|
125
123
|
string,
|
|
126
124
|
visibleControls
|
|
127
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-MLSN3UP4.js";
|
|
128
126
|
import {
|
|
129
127
|
__name
|
|
130
128
|
} from "./chunk-ZVVMGPBJ.js";
|
|
131
129
|
|
|
132
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
130
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
133
131
|
import { randomUUID } from "node:crypto";
|
|
134
132
|
|
|
135
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
136
134
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
137
135
|
let held;
|
|
138
136
|
return {
|
|
@@ -151,7 +149,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
151
149
|
};
|
|
152
150
|
}, "agentLog");
|
|
153
151
|
|
|
154
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
155
153
|
var LISTED = 100;
|
|
156
154
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
157
155
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -189,7 +187,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
189
187
|
});
|
|
190
188
|
}, "registerResources");
|
|
191
189
|
|
|
192
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
190
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
193
191
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
194
192
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
195
193
|
var MessengerSession = class {
|
|
@@ -264,7 +262,7 @@ var MessengerSession = class {
|
|
|
264
262
|
}
|
|
265
263
|
};
|
|
266
264
|
|
|
267
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
265
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
268
266
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
269
267
|
const _command = messenger.app.command;
|
|
270
268
|
return {
|
|
@@ -318,7 +316,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
318
316
|
};
|
|
319
317
|
}, "attachmentsTools");
|
|
320
318
|
|
|
321
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
319
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
322
320
|
var PHOTO_LIMIT = 512 * 1024;
|
|
323
321
|
var IMAGE_TYPES = [
|
|
324
322
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -372,7 +370,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
372
370
|
return new Uint8Array(Buffer.concat(chunks));
|
|
373
371
|
}, "readUpTo");
|
|
374
372
|
|
|
375
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
373
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
376
374
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
377
375
|
stats_charts: tool({
|
|
378
376
|
title: "A chart from a chat's statistics",
|
|
@@ -409,14 +407,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
409
407
|
})
|
|
410
408
|
}), "statsTools");
|
|
411
409
|
|
|
412
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
410
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
413
411
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
414
412
|
...messagesPhotoTools(messenger),
|
|
415
413
|
...attachmentsTools(messenger),
|
|
416
414
|
...statsTools(messenger)
|
|
417
415
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
418
416
|
|
|
419
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
417
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
420
418
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
421
419
|
"streams",
|
|
422
420
|
"stdin",
|
|
@@ -740,7 +738,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
740
738
|
}, "serveOverStdio");
|
|
741
739
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
742
740
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
743
|
-
const { serveOverHttp } = await import("./serve-
|
|
741
|
+
const { serveOverHttp } = await import("./serve-UJ7FDYAM.js");
|
|
744
742
|
const appName = messenger.app.command;
|
|
745
743
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
746
744
|
const listening = await serveOverHttp(build, {
|
package/dist/bundle/clidev.js
CHANGED
|
@@ -3,10 +3,10 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
3
3
|
const require = __bundleRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
IDENTITY
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SQOXYNKF.js";
|
|
7
7
|
import {
|
|
8
8
|
catchCrashes
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MLSN3UP4.js";
|
|
10
10
|
import "./chunk-Y5E2WNWB.js";
|
|
11
11
|
import "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ import "./chunk-ZVVMGPBJ.js";
|
|
|
14
14
|
import { enableCompileCache } from "node:module";
|
|
15
15
|
enableCompileCache();
|
|
16
16
|
var stopCatching = catchCrashes({ cli: IDENTITY.command, interactive: process.stdout.isTTY === true });
|
|
17
|
-
var { run } = await import("./program-
|
|
17
|
+
var { run } = await import("./program-TJTVMIOX.js");
|
|
18
18
|
try {
|
|
19
19
|
process.exitCode = await run(process.argv.slice(2));
|
|
20
20
|
} finally {
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
commandPathOf,
|
|
7
7
|
findCommand,
|
|
8
8
|
outputOf
|
|
9
|
-
} from "./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-
|
|
9
|
+
} from "./chunk-RUHNHEAF.js";
|
|
10
|
+
import "./chunk-UW4PJZVJ.js";
|
|
11
|
+
import "./chunk-S465TCR3.js";
|
|
12
|
+
import "./chunk-XKL5FRH3.js";
|
|
13
|
+
import "./chunk-AUVPTFUS.js";
|
|
14
|
+
import "./chunk-QJS4WWYK.js";
|
|
15
|
+
import "./chunk-YIH3PYWJ.js";
|
|
16
|
+
import "./chunk-BXZRTMXA.js";
|
|
17
|
+
import "./chunk-LFLN6PVS.js";
|
|
18
|
+
import "./chunk-AKUMR7PE.js";
|
|
19
|
+
import "./chunk-MLSN3UP4.js";
|
|
20
20
|
import "./chunk-Y5E2WNWB.js";
|
|
21
21
|
import "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
export {
|
|
@@ -3,10 +3,10 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
SAMPLE_RATE,
|
|
5
5
|
decodeOgg
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2Y5NBD7U.js";
|
|
7
7
|
import {
|
|
8
8
|
CliError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MLSN3UP4.js";
|
|
10
10
|
import {
|
|
11
11
|
importFrom
|
|
12
12
|
} from "./chunk-Y5E2WNWB.js";
|
|
@@ -14,7 +14,7 @@ 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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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";
|
|
@@ -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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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,10 +13,10 @@ import {
|
|
|
13
13
|
truncated,
|
|
14
14
|
unit,
|
|
15
15
|
warmEmbedders
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-J2RUBXCI.js";
|
|
17
|
+
import "./chunk-LFLN6PVS.js";
|
|
18
|
+
import "./chunk-AKUMR7PE.js";
|
|
19
|
+
import "./chunk-MLSN3UP4.js";
|
|
20
20
|
import "./chunk-Y5E2WNWB.js";
|
|
21
21
|
import "./chunk-ZVVMGPBJ.js";
|
|
22
22
|
export {
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
openSession,
|
|
5
5
|
truncated,
|
|
6
6
|
unit
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-J2RUBXCI.js";
|
|
8
|
+
import "./chunk-LFLN6PVS.js";
|
|
9
|
+
import "./chunk-AKUMR7PE.js";
|
|
10
10
|
import {
|
|
11
11
|
CliError
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-MLSN3UP4.js";
|
|
13
13
|
import {
|
|
14
14
|
importFrom
|
|
15
15
|
} from "./chunk-Y5E2WNWB.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.
|
|
20
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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.
|
|
24
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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.
|
|
63
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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,14 +5,14 @@ import {
|
|
|
5
5
|
asksAtStart,
|
|
6
6
|
setupAtStart,
|
|
7
7
|
systemLanguage
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-LN53L2V5.js";
|
|
9
|
+
import "./chunk-R5IY4O25.js";
|
|
10
|
+
import "./chunk-KRXN3FV3.js";
|
|
11
|
+
import "./chunk-XKL5FRH3.js";
|
|
12
|
+
import "./chunk-URPKIONS.js";
|
|
13
|
+
import "./chunk-BXZRTMXA.js";
|
|
14
|
+
import "./chunk-AKUMR7PE.js";
|
|
15
|
+
import "./chunk-MLSN3UP4.js";
|
|
16
16
|
import "./chunk-Y5E2WNWB.js";
|
|
17
17
|
import "./chunk-ZVVMGPBJ.js";
|
|
18
18
|
export {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
WIRECAT_TOOLS,
|
|
5
|
+
firstScreen,
|
|
6
|
+
installHelp
|
|
7
|
+
} from "./chunk-R5CPFSPI.js";
|
|
8
|
+
import "./chunk-HTQTIKWP.js";
|
|
9
|
+
import "./chunk-RUHNHEAF.js";
|
|
10
|
+
import "./chunk-UW4PJZVJ.js";
|
|
11
|
+
import "./chunk-S465TCR3.js";
|
|
12
|
+
import "./chunk-XKL5FRH3.js";
|
|
13
|
+
import "./chunk-AUVPTFUS.js";
|
|
14
|
+
import "./chunk-QJS4WWYK.js";
|
|
15
|
+
import "./chunk-YIH3PYWJ.js";
|
|
16
|
+
import "./chunk-BXZRTMXA.js";
|
|
17
|
+
import "./chunk-LFLN6PVS.js";
|
|
18
|
+
import "./chunk-AKUMR7PE.js";
|
|
19
|
+
import "./chunk-MLSN3UP4.js";
|
|
20
|
+
import "./chunk-Y5E2WNWB.js";
|
|
21
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
22
|
+
export {
|
|
23
|
+
WIRECAT_TOOLS,
|
|
24
|
+
firstScreen,
|
|
25
|
+
installHelp
|
|
26
|
+
};
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
executableEnvironment,
|
|
5
5
|
executableOnPath,
|
|
6
6
|
require_cross_spawn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KRXN3FV3.js";
|
|
8
8
|
import {
|
|
9
9
|
__name,
|
|
10
10
|
__toESM
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/mcp/index.js
|
|
14
14
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
15
15
|
var realRun = /* @__PURE__ */ __name((file, args) => {
|
|
16
16
|
const result = import_cross_spawn.default.sync(executableOnPath(file, process.env), args, {
|
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
jitCompatCheck,
|
|
19
19
|
refineSqliteCodecs,
|
|
20
20
|
sql
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6PHTRAZA.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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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,18 +3,18 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
loadVectorExtension,
|
|
5
5
|
vectorExtension
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GUCMIUNB.js";
|
|
7
7
|
import {
|
|
8
8
|
TIME_LIMIT_FUNCTION,
|
|
9
9
|
beforeTimeLimit
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-O6PBO4BU.js";
|
|
11
|
+
import "./chunk-MLSN3UP4.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/store/drivers/node-sqlite.js
|
|
18
18
|
import { DatabaseSync } from "node:sqlite";
|
|
19
19
|
var openWithNodeSqlite = /* @__PURE__ */ __name(async (path) => cacheOverNodeSqlite(await nodeClient(path)), "openWithNodeSqlite");
|
|
20
20
|
var nodeClient = /* @__PURE__ */ __name(async (path, { readOnly = false } = {}) => {
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
ownerLogin,
|
|
5
5
|
revokeAll
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DVLM23HB.js";
|
|
7
7
|
import "./chunk-5D4AEUVA.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-XS56LIQ7.js";
|
|
9
|
+
import "./chunk-RGKXMVOZ.js";
|
|
10
|
+
import "./chunk-AUVPTFUS.js";
|
|
11
|
+
import "./chunk-MLSN3UP4.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
13
|
import "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
export {
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
openCache,
|
|
7
7
|
openFile,
|
|
8
8
|
storeCapable
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-FF3AGTHY.js";
|
|
10
|
+
import "./chunk-O6PBO4BU.js";
|
|
11
|
+
import "./chunk-MLSN3UP4.js";
|
|
12
12
|
import "./chunk-Y5E2WNWB.js";
|
|
13
13
|
import "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
export {
|
|
@@ -1,60 +1,39 @@
|
|
|
1
1
|
import { createRequire as __bundleRequire } from "node:module";
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
providerWaitMs
|
|
5
|
+
} from "./chunk-33JGD2CR.js";
|
|
3
6
|
import {
|
|
4
7
|
SAMPLE_RATE,
|
|
5
8
|
toModelRate
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-2Y5NBD7U.js";
|
|
10
|
+
import "./chunk-ITPFCKCL.js";
|
|
8
11
|
import {
|
|
9
12
|
OPENAI_URL
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-X44ZT64I.js";
|
|
14
|
+
import "./chunk-J2RUBXCI.js";
|
|
12
15
|
import {
|
|
13
16
|
OPENAI_TRANSCRIBE_MODEL,
|
|
14
17
|
VAD,
|
|
15
18
|
filesPresent,
|
|
16
19
|
modelsDirectory,
|
|
17
20
|
vadPath
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
21
|
+
} from "./chunk-LFLN6PVS.js";
|
|
22
|
+
import "./chunk-AKUMR7PE.js";
|
|
20
23
|
import {
|
|
21
24
|
CliError,
|
|
22
25
|
DEFAULT_RETRY,
|
|
23
26
|
backoffMs
|
|
24
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-MLSN3UP4.js";
|
|
25
28
|
import "./chunk-Y5E2WNWB.js";
|
|
26
29
|
import {
|
|
27
30
|
__name
|
|
28
31
|
} from "./chunk-ZVVMGPBJ.js";
|
|
29
32
|
|
|
30
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
31
34
|
import { setTimeout as wait } from "node:timers/promises";
|
|
32
35
|
|
|
33
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
34
|
-
var parseRetryAfter = /* @__PURE__ */ __name((header, now) => {
|
|
35
|
-
if (!header)
|
|
36
|
-
return void 0;
|
|
37
|
-
const trimmed = header.trim();
|
|
38
|
-
if (/^\d+$/.test(trimmed))
|
|
39
|
-
return Number(trimmed) * 1e3;
|
|
40
|
-
const at = Date.parse(trimmed);
|
|
41
|
-
if (Number.isNaN(at))
|
|
42
|
-
return void 0;
|
|
43
|
-
const delta = at - now().getTime();
|
|
44
|
-
return delta > 0 ? delta : void 0;
|
|
45
|
-
}, "parseRetryAfter");
|
|
46
|
-
var parseRateLimitReset = /* @__PURE__ */ __name((header, now) => {
|
|
47
|
-
if (!header)
|
|
48
|
-
return void 0;
|
|
49
|
-
const seconds = Number(header.trim());
|
|
50
|
-
if (!Number.isFinite(seconds))
|
|
51
|
-
return void 0;
|
|
52
|
-
const delta = seconds * 1e3 - now().getTime();
|
|
53
|
-
return delta > 0 ? delta : void 0;
|
|
54
|
-
}, "parseRateLimitReset");
|
|
55
|
-
var providerWaitMs = /* @__PURE__ */ __name((headers, now) => parseRetryAfter(headers.get("retry-after"), now) ?? parseRateLimitReset(headers.get("x-ratelimit-reset"), now), "providerWaitMs");
|
|
56
|
-
|
|
57
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.584.0_@wirecat+cli-base@0.77.1_commander@15.0.0_esbuild@0.28.2_type_ab8c0b68b8b4768d5b87d6e249ef10da/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
36
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/speech/wav.js
|
|
58
37
|
var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
59
38
|
const bytes = Buffer.alloc(44 + samples.length * 2);
|
|
60
39
|
bytes.write("RIFF", 0, "ascii");
|
|
@@ -75,7 +54,7 @@ var encodeWav = /* @__PURE__ */ __name((samples, sampleRate = 16e3) => {
|
|
|
75
54
|
return new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.length);
|
|
76
55
|
}, "encodeWav");
|
|
77
56
|
|
|
78
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
57
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/node_modules/@wirecat/cli-core/dist/speech/openai.js
|
|
79
58
|
var LONGEST_REQUEST_SECONDS = 600;
|
|
80
59
|
var JOINED_SECONDS = 0.2;
|
|
81
60
|
var PAD_SECONDS = 0.2;
|
|
@@ -197,7 +176,7 @@ var piecesOf = /* @__PURE__ */ __name((spans, limit) => {
|
|
|
197
176
|
return pieces;
|
|
198
177
|
}, "piecesOf");
|
|
199
178
|
var openCutter = /* @__PURE__ */ __name(async (vadModel) => {
|
|
200
|
-
const { openSpeechCutter } = await import("./recognize-
|
|
179
|
+
const { openSpeechCutter } = await import("./recognize-LQMHLOD5.js");
|
|
201
180
|
return openSpeechCutter(vadModel);
|
|
202
181
|
}, "openCutter");
|
|
203
182
|
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.595.0_@wirecat+cli-base@0.80.3_commander@15.0.0_esbuild@0.28.2_type_2c96d170c489856a39cafd5889a9e4ba/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";
|