@wirecat/tg-cli 0.114.0 → 0.115.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/dist/bin/tg.js +2 -2
- package/dist/bin/tg.js.map +1 -1
- package/dist/bundle/{adapter-YAEHX3QB.js → adapter-ODK7R4LY.js} +52 -49
- package/dist/bundle/{all-profiles-R5CW42HQ.js → all-profiles-AQYM65BS.js} +6 -5
- package/dist/bundle/{anthropic-F25RHYV2.js → anthropic-VBDSVNIM.js} +5 -4
- package/dist/bundle/{app-server-FAG6FNXR.js → app-server-YOIHLBNS.js} +41 -38
- package/dist/bundle/{bot-api-KOIAXTQR.js → bot-api-TRYLGQKK.js} +45 -41
- package/dist/bundle/{bot-history-PRAOZEWC.js → bot-history-7DTJLBBJ.js} +16 -15
- package/dist/bundle/{bun-sqlite-DSUCO4TR.js → bun-sqlite-6B3BL5IV.js} +4 -3
- package/dist/bundle/{chunk-EQJG44KE.js → chunk-2TC76TLJ.js} +1 -1
- package/dist/bundle/{chunk-ZFMOPKPT.js → chunk-5ROWSRK7.js} +2 -2
- package/dist/bundle/{chunk-TRRRRGMI.js → chunk-63YKD7YA.js} +1 -1
- package/dist/bundle/{chunk-EARO464A.js → chunk-77M3IAVU.js} +187 -125
- package/dist/bundle/{chunk-NMVFFWF2.js → chunk-A4BQGSKI.js} +6 -6
- package/dist/bundle/{chunk-P4YBABUC.js → chunk-AICS3TSF.js} +5 -3
- package/dist/bundle/{chunk-ULFTCR5W.js → chunk-AVWPMJ6E.js} +1 -1
- package/dist/bundle/{chunk-NJ2I4KFZ.js → chunk-BEQPZA3S.js} +2 -2
- package/dist/bundle/{chunk-NUVBC3LJ.js → chunk-BIEBJLYO.js} +2 -2
- package/dist/bundle/{chunk-7FOT4XD2.js → chunk-BPPRR7TV.js} +32 -32
- package/dist/bundle/chunk-CCHHEMPM.js +71 -0
- package/dist/bundle/{chunk-M3IWROIF.js → chunk-CNO3R4O4.js} +6 -4
- package/dist/bundle/{chunk-C34IDOA5.js → chunk-D4E345BC.js} +1 -1
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-Y4LCSCSH.js → chunk-DIABP7ZP.js} +2 -2
- package/dist/bundle/chunk-EW3XTUPB.js +166 -0
- package/dist/bundle/{chunk-NTF34HJP.js → chunk-GCFU6WBE.js} +1 -1
- package/dist/bundle/{chunk-DQQEN3X4.js → chunk-GWDMKEDY.js} +2 -2
- package/dist/bundle/{chunk-CS5DQ6KM.js → chunk-GX4DMI4H.js} +9 -9
- package/dist/bundle/{chunk-2PAKHXIV.js → chunk-HZKWB6WS.js} +25 -25
- package/dist/bundle/chunk-ILHTNOIV.js +23 -0
- package/dist/bundle/{chunk-4JOKO4IW.js → chunk-IUDIRZVU.js} +46 -44
- package/dist/bundle/{chunk-QCXYJKPF.js → chunk-JZXQZW2D.js} +1 -1
- package/dist/bundle/{chunk-3R43O3GG.js → chunk-KDOBY524.js} +12 -10
- package/dist/bundle/{chunk-VHO66SMY.js → chunk-LUIPXRKN.js} +30 -28
- package/dist/bundle/{chunk-AL36NHO6.js → chunk-M7B5IMH3.js} +22 -20
- package/dist/bundle/{chunk-E2IRSRTB.js → chunk-MUZ4KYGY.js} +4 -2
- package/dist/bundle/{chunk-34USFPBF.js → chunk-NTW5ZE47.js} +150 -262
- package/dist/bundle/{chunk-TTTDZOBW.js → chunk-OMP6ALBT.js} +2 -2
- package/dist/bundle/{chunk-OFDMD3YF.js → chunk-OSP335AJ.js} +1 -1
- package/dist/bundle/{chunk-J5U2HKGZ.js → chunk-OUX3QMYI.js} +16 -14
- package/dist/bundle/{chunk-HA35XN2Z.js → chunk-PEJHI7QO.js} +2 -2
- package/dist/bundle/{chunk-YQ64ZNLD.js → chunk-PEKTB3FQ.js} +15 -13
- package/dist/bundle/{chunk-YPABTT7A.js → chunk-POKTQZOM.js} +4 -2
- package/dist/bundle/chunk-PQLBPYJR.js +46 -0
- package/dist/bundle/{chunk-WIRDTH3J.js → chunk-PZAEI4NM.js} +8 -8
- package/dist/bundle/{chunk-I6BKSGZQ.js → chunk-QK6VLKG5.js} +7 -7
- package/dist/bundle/{chunk-OWHF6BON.js → chunk-RHUNMU4Q.js} +3 -3
- package/dist/bundle/{chunk-NKP3RUM4.js → chunk-TMATSEP5.js} +13 -11
- package/dist/bundle/{chunk-RBC7JQ4Y.js → chunk-TQYMLXDS.js} +4 -2
- package/dist/bundle/{chunk-TKNCJMYN.js → chunk-U67TSAAO.js} +85 -81
- package/dist/bundle/{chunk-6SPLZI5P.js → chunk-UBQ3LOF6.js} +3 -3
- package/dist/bundle/{chunk-ALHKUQDZ.js → chunk-UY7GJRGY.js} +1 -1
- package/dist/bundle/{chunk-XDOPONC3.js → chunk-VQCWVZWG.js} +3 -3
- package/dist/bundle/{chunk-MQTTVQ3V.js → chunk-WDNNN3J4.js} +4 -4
- package/dist/bundle/{chunk-KZQXOZFC.js → chunk-WINKEV4F.js} +6 -19
- package/dist/bundle/{chunk-C7K7AP6G.js → chunk-WMG4IGEB.js} +11 -11
- package/dist/bundle/{chunk-5HKMEXVQ.js → chunk-WMRFAK5B.js} +1 -1
- package/dist/bundle/{chunk-IN25CJ3D.js → chunk-XIYRHIBK.js} +1 -1
- package/dist/bundle/{chunk-CDCBFMEI.js → chunk-XY7IGVVS.js} +1 -1
- package/dist/bundle/{chunk-3EZ43DAF.js → chunk-YCUQKFGD.js} +2 -2
- package/dist/bundle/{command-contract-SOTDPG22.js → command-contract-YF4KGFXC.js} +13 -12
- package/dist/bundle/{decode-7U4SXPAN.js → decode-2GATBZGH.js} +6 -5
- package/dist/bundle/dispatch-MJMW7WDH.js +411 -0
- package/dist/bundle/{embed-IDZDQMSW.js → embed-TBQPLA4Y.js} +6 -5
- package/dist/bundle/{embedder-RY5R2PGO.js → embedder-B5DTNCRO.js} +8 -7
- package/dist/bundle/{entry-P6YZ3ZV6.js → entry-A6DEW2TD.js} +6 -5
- package/dist/bundle/failure-TLF3SISS.js +24 -0
- package/dist/bundle/first-run-3N5AABEY.js +27 -0
- package/dist/bundle/first-screen-HANARM67.js +30 -0
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-MNI62HHE.js} +4 -2
- package/dist/bundle/{node-sqlite-VUXFVPJ6.js → node-sqlite-GIDPALK3.js} +4 -3
- package/dist/bundle/{oauth-7SQIPMOY.js → oauth-C57W4IMD.js} +6 -5
- package/dist/bundle/{open-W3BN2SIO.js → open-E6Q4WRPU.js} +4 -3
- package/dist/bundle/{openai-LQTK3ZMC.js → openai-5WMXY2KP.js} +11 -10
- package/dist/bundle/{program-DIPSLR6O.js → program-FEUDU6GF.js} +58 -53
- package/dist/bundle/{prompt-GESHKSM5.js → prompt-4NGAZGHE.js} +5 -4
- package/dist/bundle/{proxy-transport-C2EUUT32.js → proxy-transport-MGCJ7JAW.js} +5 -4
- package/dist/bundle/{recognize-FEQTIJET.js → recognize-EUHRBA7V.js} +4 -3
- package/dist/bundle/{remote-UXOPBPKS.js → remote-3JHLB2FV.js} +7 -6
- package/dist/bundle/{rerank-L4JM4REK.js → rerank-ZZ45SZPC.js} +6 -5
- package/dist/bundle/{serve-DDWW44DB.js → serve-XOGX5FC5.js} +7 -6
- package/dist/bundle/server-DRE5MJ76.js +59 -0
- package/dist/bundle/{server-UTWBIZHB.js → server-I6O72XP5.js} +31 -29
- package/dist/bundle/{state-EV7FGEK4.js → state-BIUYTGH6.js} +5 -4
- package/dist/bundle/{store-EXBUF4OG.js → store-FOJFYOMR.js} +10 -9
- package/dist/bundle/store-maintenance-command-YKV2C34N.js +49 -0
- package/dist/bundle/tg.js +159 -14
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -2
- package/skills/tg-cli/SKILL.md +2 -0
- package/dist/bundle/first-run-66KTCVQK.js +0 -24
- package/dist/bundle/first-screen-NY46X6QU.js +0 -29
- package/dist/bundle/identity-GXVKGCNU.js +0 -11
- package/dist/bundle/server-ZI7WDAW6.js +0 -56
- package/dist/bundle/store-maintenance-command-UBZE2Z6T.js +0 -46
|
@@ -527,44 +527,6 @@ var require_cross_spawn = __commonJS({
|
|
|
527
527
|
}
|
|
528
528
|
});
|
|
529
529
|
|
|
530
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
|
|
531
|
-
import { existsSync } from "node:fs";
|
|
532
|
-
import { win32 } from "node:path";
|
|
533
|
-
var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
|
|
534
|
-
var executableOnPath = /* @__PURE__ */ __name((command, env, platform = process.platform, exists = existsSync) => {
|
|
535
|
-
if (platform !== "win32" || win32.isAbsolute(command))
|
|
536
|
-
return command;
|
|
537
|
-
if (/[\\/]/.test(command))
|
|
538
|
-
return command;
|
|
539
|
-
const extensions = win32.extname(command) ? [""] : (variable(env, "PATHEXT") ?? ".EXE;.COM;.CMD;.BAT").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext));
|
|
540
|
-
for (const entry of (variable(env, "PATH") ?? "").split(";")) {
|
|
541
|
-
const directory = entry.replace(/^"(.*)"$/, "$1");
|
|
542
|
-
for (const extension of extensions) {
|
|
543
|
-
const candidate = win32.join(directory, command + extension);
|
|
544
|
-
if (exists(candidate))
|
|
545
|
-
return candidate;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
return command;
|
|
549
|
-
}, "executableOnPath");
|
|
550
|
-
var executableEnvironment = /* @__PURE__ */ __name((env, platform = process.platform) => {
|
|
551
|
-
if (platform !== "win32")
|
|
552
|
-
return env;
|
|
553
|
-
const configured = variable(env, "COMSPEC");
|
|
554
|
-
const system = variable(env, "SYSTEMROOT");
|
|
555
|
-
const shell = configured ? configured : system && win32.isAbsolute(system) ? win32.join(system, "System32", "cmd.exe") : void 0;
|
|
556
|
-
if (!shell)
|
|
557
|
-
return env;
|
|
558
|
-
const result = { ...env };
|
|
559
|
-
for (const key of Object.keys(result))
|
|
560
|
-
if (key.toUpperCase() === "COMSPEC")
|
|
561
|
-
delete result[key];
|
|
562
|
-
result.comspec = shell;
|
|
563
|
-
return result;
|
|
564
|
-
}, "executableEnvironment");
|
|
565
|
-
|
|
566
530
|
export {
|
|
567
|
-
require_cross_spawn
|
|
568
|
-
executableOnPath,
|
|
569
|
-
executableEnvironment
|
|
531
|
+
require_cross_spawn
|
|
570
532
|
};
|
|
@@ -2,10 +2,10 @@ 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-WDNNN3J4.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CCHHEMPM.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
singleLine
|
|
5
|
+
} from "./chunk-CCHHEMPM.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/names.js
|
|
11
|
+
var FIRST_PARTY_TOOLS = [
|
|
12
|
+
{ name: "tg", package: "@wirecat/tg-cli" },
|
|
13
|
+
{ name: "max", package: "@wirecat/max-cli" },
|
|
14
|
+
{ name: "wa", package: "@wirecat/whatsapp-cli" },
|
|
15
|
+
{ name: "zm", package: "@wirecat/zoom-cli" },
|
|
16
|
+
{ name: "drive", package: "@wirecat/drive-cli" },
|
|
17
|
+
{ name: "memo", package: "@wirecat/cli-memo" },
|
|
18
|
+
{ name: "mail", package: "@wirecat/mail-cli" },
|
|
19
|
+
// memo reads email today; the name is held for a tool of its own.
|
|
20
|
+
{ name: "email" }
|
|
21
|
+
];
|
|
22
|
+
var BUILT_IN_COMMANDS = ["help", "version", "shortcuts", "doctor", "update", "upgrade", "app"];
|
|
23
|
+
var RESERVED_NAMES = [
|
|
24
|
+
...FIRST_PARTY_TOOLS.map((tool) => tool.name),
|
|
25
|
+
...BUILT_IN_COMMANDS,
|
|
26
|
+
"wcat"
|
|
27
|
+
];
|
|
28
|
+
var TOOL_NAME = /^[a-z][a-z0-9-]{0,39}$/;
|
|
29
|
+
var PROGRAM_PREFIX = "wcat-";
|
|
30
|
+
var DESCRIBE_FLAG = "--wcat-describe";
|
|
31
|
+
var DISPATCH_FLAG = "--wcat-dispatch";
|
|
32
|
+
|
|
33
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/describe.js
|
|
34
|
+
var DESCRIBE_FORMAT = 1;
|
|
35
|
+
var describeAnswer = /* @__PURE__ */ __name((tool) => ({
|
|
36
|
+
wcat_describe: DESCRIBE_FORMAT,
|
|
37
|
+
name: tool.command,
|
|
38
|
+
version: tool.version,
|
|
39
|
+
description: tool.description,
|
|
40
|
+
...tool.docs ? { docs_url: tool.docs } : {}
|
|
41
|
+
}), "describeAnswer");
|
|
42
|
+
var MAX_TEXT = 200;
|
|
43
|
+
var clean = /* @__PURE__ */ __name((value) => typeof value === "string" && value.trim() !== "" ? singleLine(value.trim()).slice(0, MAX_TEXT) : void 0, "clean");
|
|
44
|
+
var parseDescribe = /* @__PURE__ */ __name((text) => {
|
|
45
|
+
let answer;
|
|
46
|
+
try {
|
|
47
|
+
answer = JSON.parse(text);
|
|
48
|
+
} catch {
|
|
49
|
+
return void 0;
|
|
50
|
+
}
|
|
51
|
+
if (typeof answer !== "object" || answer === null || !("wcat_describe" in answer))
|
|
52
|
+
return void 0;
|
|
53
|
+
const { version, description, docs_url: docs } = answer;
|
|
54
|
+
const url = clean(docs);
|
|
55
|
+
return {
|
|
56
|
+
version: clean(version) ?? "",
|
|
57
|
+
description: clean(description) ?? "",
|
|
58
|
+
...url && /^https?:\/\//.test(url) ? { docs: url } : {}
|
|
59
|
+
};
|
|
60
|
+
}, "parseDescribe");
|
|
61
|
+
|
|
62
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shim.js
|
|
63
|
+
import { lstatSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
64
|
+
import { join } from "node:path";
|
|
65
|
+
var SHIM_FORMAT = 1;
|
|
66
|
+
var MARK = /^(?:#|REM) wirecat-shim (\d+) (launcher|shortcut) (\S+)\r?$/m;
|
|
67
|
+
var NOTE = {
|
|
68
|
+
launcher: "Written by @wirecat/cli-base. Any WireCat tool rewrites it when it breaks; it is safe to delete.",
|
|
69
|
+
shortcut: "Made by `wcat shortcuts add`; `wcat shortcuts remove` takes it out."
|
|
70
|
+
};
|
|
71
|
+
var shellQuote = /* @__PURE__ */ __name((text) => `'${text.replaceAll("'", `'\\''`)}'`, "shellQuote");
|
|
72
|
+
var shimFiles = /* @__PURE__ */ __name((kind, { dir, name, target, platform }) => {
|
|
73
|
+
const mark = `wirecat-shim ${SHIM_FORMAT} ${kind} ${target}`;
|
|
74
|
+
const extra = kind === "launcher" ? ` ${DISPATCH_FLAG}` : "";
|
|
75
|
+
if (platform !== "win32")
|
|
76
|
+
return [
|
|
77
|
+
{
|
|
78
|
+
path: join(dir, name),
|
|
79
|
+
text: `#!/bin/sh
|
|
80
|
+
# ${mark}
|
|
81
|
+
# ${NOTE[kind]}
|
|
82
|
+
exec ${shellQuote(join(dir, target))}${extra} "$@"
|
|
83
|
+
`
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
path: join(dir, `${name}.cmd`),
|
|
89
|
+
text: ["@ECHO off", `REM ${mark}`, `REM ${NOTE[kind]}`, `"%~dp0${target}"${extra} %*`, ""].join("\r\n")
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
path: join(dir, `${name}.ps1`),
|
|
93
|
+
text: [
|
|
94
|
+
`# ${mark}`,
|
|
95
|
+
`# ${NOTE[kind]}`,
|
|
96
|
+
// PowerShell hands a .cmd its arguments unquoted, so `a&b` would run `b`; npm and pnpm write a .ps1 beside
|
|
97
|
+
// their .cmd, and it is started instead whenever it is there.
|
|
98
|
+
`$stem = Join-Path $PSScriptRoot "${target.replace(/\.(cmd|exe|bat)$/i, "")}"`,
|
|
99
|
+
`$target = if (Test-Path -LiteralPath "$stem.ps1") { "$stem.ps1" } else { Join-Path $PSScriptRoot "${target}" }`,
|
|
100
|
+
"if ($MyInvocation.ExpectingInput) {",
|
|
101
|
+
` $input | & $target${extra} @args`,
|
|
102
|
+
"} else {",
|
|
103
|
+
` & $target${extra} @args`,
|
|
104
|
+
"}",
|
|
105
|
+
"exit $LASTEXITCODE",
|
|
106
|
+
""
|
|
107
|
+
].join("\r\n")
|
|
108
|
+
}
|
|
109
|
+
];
|
|
110
|
+
}, "shimFiles");
|
|
111
|
+
var parseShim = /* @__PURE__ */ __name((text) => {
|
|
112
|
+
const found = MARK.exec(text.split("\n", 3).join("\n"));
|
|
113
|
+
if (!found)
|
|
114
|
+
return void 0;
|
|
115
|
+
return { format: Number(found[1]), kind: found[2], target: found[3] };
|
|
116
|
+
}, "parseShim");
|
|
117
|
+
var MAX_SHIM_BYTES = 4096;
|
|
118
|
+
var fileState = /* @__PURE__ */ __name((path) => {
|
|
119
|
+
let stat;
|
|
120
|
+
try {
|
|
121
|
+
stat = lstatSync(path);
|
|
122
|
+
} catch (error) {
|
|
123
|
+
return error.code === "ENOENT" ? { state: "missing" } : { state: "foreign" };
|
|
124
|
+
}
|
|
125
|
+
if (!stat.isFile() || stat.size > MAX_SHIM_BYTES)
|
|
126
|
+
return { state: "foreign" };
|
|
127
|
+
try {
|
|
128
|
+
const text = readFileSync(path, "utf8");
|
|
129
|
+
const mark = parseShim(text);
|
|
130
|
+
return mark ? { state: "ours", mark, text } : { state: "foreign" };
|
|
131
|
+
} catch {
|
|
132
|
+
return { state: "foreign" };
|
|
133
|
+
}
|
|
134
|
+
}, "fileState");
|
|
135
|
+
var exists = /* @__PURE__ */ __name((path) => {
|
|
136
|
+
try {
|
|
137
|
+
return statSync(path).isFile();
|
|
138
|
+
} catch {
|
|
139
|
+
return false;
|
|
140
|
+
}
|
|
141
|
+
}, "exists");
|
|
142
|
+
var writeShim = /* @__PURE__ */ __name(({ path, text }) => {
|
|
143
|
+
const temporary = `${path}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
144
|
+
try {
|
|
145
|
+
writeFileSync(temporary, text, { mode: 493 });
|
|
146
|
+
renameSync(temporary, path);
|
|
147
|
+
} finally {
|
|
148
|
+
rmSync(temporary, { force: true });
|
|
149
|
+
}
|
|
150
|
+
}, "writeShim");
|
|
151
|
+
|
|
152
|
+
export {
|
|
153
|
+
describeAnswer,
|
|
154
|
+
parseDescribe,
|
|
155
|
+
FIRST_PARTY_TOOLS,
|
|
156
|
+
BUILT_IN_COMMANDS,
|
|
157
|
+
TOOL_NAME,
|
|
158
|
+
PROGRAM_PREFIX,
|
|
159
|
+
DESCRIBE_FLAG,
|
|
160
|
+
DISPATCH_FLAG,
|
|
161
|
+
SHIM_FORMAT,
|
|
162
|
+
shimFiles,
|
|
163
|
+
fileState,
|
|
164
|
+
exists,
|
|
165
|
+
writeShim
|
|
166
|
+
};
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
organization,
|
|
5
5
|
project,
|
|
6
6
|
reminder
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-WMRFAK5B.js";
|
|
8
8
|
import {
|
|
9
9
|
queryFieldsOf
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QK6VLKG5.js";
|
|
11
11
|
|
|
12
12
|
// node_modules/.pnpm/@wirecat+cli-core@0.553.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.75.0_commander@15._c8fb11a0c49a39da33a9d557d170ff7b/node_modules/@wirecat/cli-core/dist/store/sqlite/document-transfer/snapshot.js
|
|
13
13
|
var MAX_BYTES = 16 * 1024 * 1024;
|
|
@@ -3,20 +3,20 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
envName,
|
|
5
5
|
readOnlyLockOf
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-D4E345BC.js";
|
|
7
7
|
import {
|
|
8
8
|
CAPABILITY_STATEMENTS,
|
|
9
9
|
storeCapable
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VQCWVZWG.js";
|
|
11
11
|
import {
|
|
12
12
|
catchCrashes
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
CliError
|
|
16
|
-
} from "./chunk-EARO464A.js";
|
|
13
|
+
} from "./chunk-77M3IAVU.js";
|
|
17
14
|
import {
|
|
18
15
|
importFrom
|
|
19
16
|
} from "./chunk-Y5E2WNWB.js";
|
|
17
|
+
import {
|
|
18
|
+
CliError
|
|
19
|
+
} from "./chunk-CCHHEMPM.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
22
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -190,8 +190,8 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
190
190
|
if (command.optsWithGlobals().dryRun === true)
|
|
191
191
|
return;
|
|
192
192
|
const [{ setupAtStart }, { commandPathOf }] = await Promise.all([
|
|
193
|
-
import("./first-run-
|
|
194
|
-
import("./command-contract-
|
|
193
|
+
import("./first-run-3N5AABEY.js"),
|
|
194
|
+
import("./command-contract-YF4KGFXC.js")
|
|
195
195
|
]);
|
|
196
196
|
await setupAtStart({
|
|
197
197
|
command: entry.app.command,
|
|
@@ -206,7 +206,7 @@ var startCli = /* @__PURE__ */ __name(async (entry) => {
|
|
|
206
206
|
ask: /* @__PURE__ */ __name(async (question, command) => {
|
|
207
207
|
if (headless(command) || io.stdin.isTTY !== true)
|
|
208
208
|
return false;
|
|
209
|
-
const { readSecret } = await import("./prompt-
|
|
209
|
+
const { readSecret } = await import("./prompt-4NGAZGHE.js");
|
|
210
210
|
const answer = await readSecret(`${question} [y/N] `, {
|
|
211
211
|
input: io.stdin,
|
|
212
212
|
output: io.stderr,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OUX3QMYI.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -34,11 +34,14 @@ import {
|
|
|
34
34
|
registerPrompts,
|
|
35
35
|
stdinFieldOf,
|
|
36
36
|
syncsFirst
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-WMG4IGEB.js";
|
|
38
38
|
import {
|
|
39
39
|
agentJson,
|
|
40
40
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KDOBY524.js";
|
|
42
|
+
import {
|
|
43
|
+
instructions
|
|
44
|
+
} from "./chunk-RFRI2HFT.js";
|
|
42
45
|
import {
|
|
43
46
|
answeredWire
|
|
44
47
|
} from "./chunk-VVKEWWSO.js";
|
|
@@ -47,7 +50,7 @@ import {
|
|
|
47
50
|
callerOf,
|
|
48
51
|
callingAgent,
|
|
49
52
|
serveStdio
|
|
50
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-XY7IGVVS.js";
|
|
51
54
|
import {
|
|
52
55
|
McpServer,
|
|
53
56
|
ResourceTemplate
|
|
@@ -55,7 +58,7 @@ import {
|
|
|
55
58
|
import {
|
|
56
59
|
connectedFor,
|
|
57
60
|
guardFor
|
|
58
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-PZAEI4NM.js";
|
|
59
62
|
import {
|
|
60
63
|
capability,
|
|
61
64
|
dateWindow,
|
|
@@ -64,10 +67,10 @@ import {
|
|
|
64
67
|
servicesFor,
|
|
65
68
|
storedDeps,
|
|
66
69
|
wholeList
|
|
67
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-IUDIRZVU.js";
|
|
68
71
|
import {
|
|
69
72
|
findCommand
|
|
70
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-AICS3TSF.js";
|
|
71
74
|
import {
|
|
72
75
|
DEFAULT_OUTPUT_BYTES,
|
|
73
76
|
changesAuthorityAt,
|
|
@@ -83,39 +86,32 @@ import {
|
|
|
83
86
|
sealed,
|
|
84
87
|
snakeKeys,
|
|
85
88
|
typedCommand
|
|
86
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-M7B5IMH3.js";
|
|
87
90
|
import {
|
|
88
91
|
isCliFailure,
|
|
89
92
|
withCaller
|
|
90
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-POKTQZOM.js";
|
|
91
94
|
import {
|
|
92
95
|
readOnlyLockOf
|
|
93
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-D4E345BC.js";
|
|
94
97
|
import {
|
|
95
98
|
mcpHttpMarker
|
|
96
|
-
} from "./chunk-
|
|
97
|
-
import {
|
|
98
|
-
instructions
|
|
99
|
-
} from "./chunk-RFRI2HFT.js";
|
|
100
|
-
import {
|
|
101
|
-
warmEmbedders
|
|
102
|
-
} from "./chunk-MQTTVQ3V.js";
|
|
99
|
+
} from "./chunk-UY7GJRGY.js";
|
|
103
100
|
import {
|
|
104
101
|
openStore,
|
|
105
102
|
pdfPreviewLimits
|
|
106
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-BPPRR7TV.js";
|
|
107
104
|
import {
|
|
108
105
|
timezoneOf
|
|
109
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-QK6VLKG5.js";
|
|
110
107
|
import {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
} from "./chunk-34USFPBF.js";
|
|
108
|
+
warmEmbedders
|
|
109
|
+
} from "./chunk-WDNNN3J4.js";
|
|
114
110
|
import {
|
|
115
|
-
CliError,
|
|
116
111
|
description,
|
|
117
112
|
integer,
|
|
118
113
|
maxValue,
|
|
114
|
+
mcpErrorResult,
|
|
119
115
|
minLength,
|
|
120
116
|
minValue,
|
|
121
117
|
number,
|
|
@@ -126,7 +122,11 @@ import {
|
|
|
126
122
|
regex,
|
|
127
123
|
strictObject,
|
|
128
124
|
string
|
|
129
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-77M3IAVU.js";
|
|
126
|
+
import {
|
|
127
|
+
CliError,
|
|
128
|
+
visibleControls
|
|
129
|
+
} from "./chunk-CCHHEMPM.js";
|
|
130
130
|
import {
|
|
131
131
|
__name
|
|
132
132
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -742,7 +742,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
742
742
|
}, "serveOverStdio");
|
|
743
743
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
744
744
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
745
|
-
const { serveOverHttp } = await import("./serve-
|
|
745
|
+
const { serveOverHttp } = await import("./serve-XOGX5FC5.js");
|
|
746
746
|
const appName = messenger.app.command;
|
|
747
747
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
748
748
|
const listening = await serveOverHttp(build, {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
__name
|
|
5
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
6
|
+
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.75.0_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/installer.js
|
|
8
|
+
var installerOf = /* @__PURE__ */ __name((scriptPath) => {
|
|
9
|
+
const path = scriptPath.replaceAll("\\", "/");
|
|
10
|
+
if (path.includes("/_npx/"))
|
|
11
|
+
return "npx";
|
|
12
|
+
if (path.includes("/install/global/node_modules/"))
|
|
13
|
+
return "bun";
|
|
14
|
+
if (/\/\.?pnpm\//.test(path))
|
|
15
|
+
return "pnpm";
|
|
16
|
+
if (path.includes("/node_modules/"))
|
|
17
|
+
return "npm";
|
|
18
|
+
return path.includes("/dist/") ? "checkout" : "unknown";
|
|
19
|
+
}, "installerOf");
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
installerOf
|
|
23
|
+
};
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
sameOrdinaryFile,
|
|
9
9
|
syncDirectory,
|
|
10
10
|
writeFileAtomic
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XIYRHIBK.js";
|
|
12
12
|
import {
|
|
13
13
|
Command,
|
|
14
14
|
DEFAULT_IMAGE_MODEL,
|
|
@@ -48,38 +48,17 @@ import {
|
|
|
48
48
|
typedCommand,
|
|
49
49
|
vectorModelKey,
|
|
50
50
|
withAttempt
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-M7B5IMH3.js";
|
|
52
52
|
import {
|
|
53
53
|
isCliFailure
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-POKTQZOM.js";
|
|
55
55
|
import {
|
|
56
56
|
isNewer,
|
|
57
57
|
updateCommand
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-WINKEV4F.js";
|
|
59
59
|
import {
|
|
60
60
|
readOnlyLockOf
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import {
|
|
63
|
-
MAX_MODEL_IMAGE_BYTES
|
|
64
|
-
} from "./chunk-QCXYJKPF.js";
|
|
65
|
-
import {
|
|
66
|
-
remoteKey
|
|
67
|
-
} from "./chunk-Y4LCSCSH.js";
|
|
68
|
-
import {
|
|
69
|
-
Unzip,
|
|
70
|
-
UnzipInflate,
|
|
71
|
-
defaultThreads,
|
|
72
|
-
installNativeRuntime,
|
|
73
|
-
isTextModelInstalled,
|
|
74
|
-
openEmbedder,
|
|
75
|
-
placedText,
|
|
76
|
-
runEmbedders,
|
|
77
|
-
textModelsDirectory
|
|
78
|
-
} from "./chunk-MQTTVQ3V.js";
|
|
79
|
-
import {
|
|
80
|
-
installFiles,
|
|
81
|
-
megabytes
|
|
82
|
-
} from "./chunk-HA35XN2Z.js";
|
|
61
|
+
} from "./chunk-D4E345BC.js";
|
|
83
62
|
import {
|
|
84
63
|
AGENDA_COLUMNS,
|
|
85
64
|
CHAT_COLUMNS,
|
|
@@ -158,7 +137,7 @@ import {
|
|
|
158
137
|
threadConversation,
|
|
159
138
|
validateAst,
|
|
160
139
|
validateFields
|
|
161
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-BPPRR7TV.js";
|
|
162
141
|
import {
|
|
163
142
|
EVENT_QUERY,
|
|
164
143
|
MEETING_PROJECT_EVIDENCE_QUERY,
|
|
@@ -204,35 +183,52 @@ import {
|
|
|
204
183
|
validateQuery,
|
|
205
184
|
walkQuery,
|
|
206
185
|
zonedMoment
|
|
207
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-QK6VLKG5.js";
|
|
208
187
|
import {
|
|
209
188
|
DEFAULT_STEMMERS,
|
|
210
189
|
createStemmer,
|
|
211
190
|
fold,
|
|
212
191
|
normalize
|
|
213
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-OSP335AJ.js";
|
|
214
193
|
import {
|
|
215
194
|
DEFAULT_TASK_CATEGORIES,
|
|
216
195
|
FALLBACK_CATEGORY
|
|
217
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-A4BQGSKI.js";
|
|
197
|
+
import {
|
|
198
|
+
MAX_MODEL_IMAGE_BYTES
|
|
199
|
+
} from "./chunk-JZXQZW2D.js";
|
|
200
|
+
import {
|
|
201
|
+
remoteKey
|
|
202
|
+
} from "./chunk-DIABP7ZP.js";
|
|
203
|
+
import {
|
|
204
|
+
Unzip,
|
|
205
|
+
UnzipInflate,
|
|
206
|
+
defaultThreads,
|
|
207
|
+
installNativeRuntime,
|
|
208
|
+
isTextModelInstalled,
|
|
209
|
+
openEmbedder,
|
|
210
|
+
placedText,
|
|
211
|
+
runEmbedders,
|
|
212
|
+
textModelsDirectory
|
|
213
|
+
} from "./chunk-WDNNN3J4.js";
|
|
214
|
+
import {
|
|
215
|
+
installFiles,
|
|
216
|
+
megabytes
|
|
217
|
+
} from "./chunk-PEJHI7QO.js";
|
|
218
218
|
import {
|
|
219
219
|
storePath,
|
|
220
220
|
wirecatDirectory
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-63YKD7YA.js";
|
|
222
222
|
import {
|
|
223
223
|
resolvePaths,
|
|
224
|
-
singleLine,
|
|
225
|
-
visibleControls,
|
|
226
224
|
writeSecurely
|
|
227
|
-
} from "./chunk-
|
|
225
|
+
} from "./chunk-NTW5ZE47.js";
|
|
228
226
|
import {
|
|
229
|
-
CliError,
|
|
230
227
|
array,
|
|
231
228
|
boolean,
|
|
232
229
|
check,
|
|
233
230
|
getDotPath,
|
|
234
231
|
integer,
|
|
235
|
-
isCliError,
|
|
236
232
|
maxLength,
|
|
237
233
|
minLength,
|
|
238
234
|
minValue,
|
|
@@ -249,11 +245,17 @@ import {
|
|
|
249
245
|
string,
|
|
250
246
|
transform,
|
|
251
247
|
unknown
|
|
252
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-77M3IAVU.js";
|
|
253
249
|
import {
|
|
254
250
|
importFrom,
|
|
255
251
|
resolveFrom
|
|
256
252
|
} from "./chunk-Y5E2WNWB.js";
|
|
253
|
+
import {
|
|
254
|
+
CliError,
|
|
255
|
+
isCliError,
|
|
256
|
+
singleLine,
|
|
257
|
+
visibleControls
|
|
258
|
+
} from "./chunk-CCHHEMPM.js";
|
|
257
259
|
import {
|
|
258
260
|
__commonJS,
|
|
259
261
|
__name,
|
|
@@ -18708,7 +18710,7 @@ var embeddingTarget = /* @__PURE__ */ __name((deps, choice = DEFAULT_TEXT_MODEL)
|
|
|
18708
18710
|
price: remote.price,
|
|
18709
18711
|
installed: true,
|
|
18710
18712
|
perBatch: PER_REQUEST * concurrency,
|
|
18711
|
-
open: /* @__PURE__ */ __name(async () => (await import("./remote-
|
|
18713
|
+
open: /* @__PURE__ */ __name(async () => (await import("./remote-3JHLB2FV.js")).openRemote(remote, apiKey, { concurrency }), "open")
|
|
18712
18714
|
};
|
|
18713
18715
|
}
|
|
18714
18716
|
const model = textModel(choice);
|
|
@@ -25343,7 +25345,7 @@ var downloadTextModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25343
25345
|
}
|
|
25344
25346
|
await nativeRuntime({ env, progress });
|
|
25345
25347
|
progress(`${model.id}: loading it once to check it works`);
|
|
25346
|
-
const { openEmbedder: openEmbedder2 } = await import("./embed-
|
|
25348
|
+
const { openEmbedder: openEmbedder2 } = await import("./embed-TBQPLA4Y.js");
|
|
25347
25349
|
const embedder = await openEmbedder2(model, directory2);
|
|
25348
25350
|
try {
|
|
25349
25351
|
const [vector] = await embedder.embed(["check"], "query");
|
|
@@ -25364,7 +25366,7 @@ var downloadRerankModel = /* @__PURE__ */ __name(async (id2, { env, progress = /
|
|
|
25364
25366
|
}
|
|
25365
25367
|
await nativeRuntime({ env, progress });
|
|
25366
25368
|
progress(`${model.id}: loading it once to check it works`);
|
|
25367
|
-
const { openReranker } = await import("./rerank-
|
|
25369
|
+
const { openReranker } = await import("./rerank-ZZ45SZPC.js");
|
|
25368
25370
|
const reranker = await openReranker(model, directory2);
|
|
25369
25371
|
try {
|
|
25370
25372
|
await reranker.score("check", ["check"]);
|
|
@@ -25382,7 +25384,7 @@ var downloadImageModel = /* @__PURE__ */ __name(async (id2, { env, progress = /*
|
|
|
25382
25384
|
await installFiles(placedImage(model, directory2), { progress });
|
|
25383
25385
|
}
|
|
25384
25386
|
progress(`${model.id}: loading it once to check it works`);
|
|
25385
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
25387
|
+
const { openPictureEmbedder } = await import("./embedder-B5DTNCRO.js");
|
|
25386
25388
|
const embedder = await openPictureEmbedder(model, directory2);
|
|
25387
25389
|
try {
|
|
25388
25390
|
const vector = await embedder.embedQuery("check");
|
|
@@ -32971,7 +32973,7 @@ var picturesService = /* @__PURE__ */ __name((deps) => {
|
|
|
32971
32973
|
const directory2 = imageModelsDirectory(deps.env);
|
|
32972
32974
|
if (!isImageModelInstalled(model2, directory2))
|
|
32973
32975
|
throw new CliError("not_found", missingModel(model2.id), { reason: "model.not-downloaded", model: model2.id });
|
|
32974
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
32976
|
+
const { openPictureEmbedder } = await import("./embedder-B5DTNCRO.js");
|
|
32975
32977
|
return openPictureEmbedder(model2, directory2);
|
|
32976
32978
|
}, "open");
|
|
32977
32979
|
const embedder = /* @__PURE__ */ __name(() => {
|
|
@@ -33231,7 +33233,7 @@ var rerankLane = /* @__PURE__ */ __name((deps) => {
|
|
|
33231
33233
|
const warm = deps.embedders;
|
|
33232
33234
|
const reranker = warm ? await warm.reranker(`rerank:${model.id}`, async () => (await import("./process-U2P5Z6UF.js")).openRerankerProcess(model, directory2, {
|
|
33233
33235
|
threads: defaultThreads()
|
|
33234
|
-
})) : await (await import("./rerank-
|
|
33236
|
+
})) : await (await import("./rerank-ZZ45SZPC.js")).openReranker(model, directory2);
|
|
33235
33237
|
return {
|
|
33236
33238
|
model: model.id,
|
|
33237
33239
|
score: /* @__PURE__ */ __name((question, passages) => reranker.score(plainWords(question), passages), "score"),
|
|
@@ -33257,7 +33259,7 @@ var openPictureEmbedderFor = /* @__PURE__ */ __name(async ({ env, command } = {}
|
|
|
33257
33259
|
const directory2 = imageModelsDirectory(env);
|
|
33258
33260
|
if (!isImageModelInstalled(model, directory2))
|
|
33259
33261
|
throw new CliError("not_found", `the picture model is not downloaded \u2014 ${command === void 0 ? "install it with a WireCat CLI that has `images models download` (tg, max or wa); they share the model folder" : `\`${command} images models download ${model.id}\` fetches it`}`, { reason: "model.not-downloaded", model: model.id });
|
|
33260
|
-
const { openPictureEmbedder } = await import("./embedder-
|
|
33262
|
+
const { openPictureEmbedder } = await import("./embedder-B5DTNCRO.js");
|
|
33261
33263
|
return openPictureEmbedder(model, directory2);
|
|
33262
33264
|
}, "openPictureEmbedderFor");
|
|
33263
33265
|
|