@wirecat/tg-cli 0.114.0 → 0.116.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/bot/transport.d.ts +10 -8
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +16 -2
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-YAEHX3QB.js → adapter-6CLMTQOV.js} +85 -56
- package/dist/bundle/{all-profiles-R5CW42HQ.js → all-profiles-R2UZMH24.js} +10 -8
- package/dist/bundle/{anthropic-F25RHYV2.js → anthropic-QKIPHV2Z.js} +6 -5
- package/dist/bundle/{app-server-FAG6FNXR.js → app-server-AZB2MFK6.js} +47 -43
- package/dist/bundle/{bot-api-KOIAXTQR.js → bot-api-2IM243J4.js} +53 -48
- package/dist/bundle/{bot-history-PRAOZEWC.js → bot-history-G6CRVCL2.js} +19 -17
- package/dist/bundle/{bun-XIMM6EHD.js → bun-JDKPISPX.js} +2 -2
- package/dist/bundle/{bun-sqlite-DSUCO4TR.js → bun-sqlite-X5PY5IQT.js} +5 -4
- package/dist/bundle/{chunk-CDCBFMEI.js → chunk-42GK3XRS.js} +2 -2
- package/dist/bundle/{chunk-YQ64ZNLD.js → chunk-4D5AUWAY.js} +28 -15
- package/dist/bundle/{chunk-IN25CJ3D.js → chunk-4IQZRW4O.js} +13 -13
- package/dist/bundle/{chunk-Y4LCSCSH.js → chunk-577MFPCP.js} +3 -3
- package/dist/bundle/{chunk-O7CBGHI7.js → chunk-5FCONCJO.js} +1 -1
- package/dist/bundle/{chunk-CS5DQ6KM.js → chunk-5VFPUOJO.js} +17 -14
- package/dist/bundle/{chunk-ZFMOPKPT.js → chunk-5ZIBAYIZ.js} +2 -2
- package/dist/bundle/{chunk-EARO464A.js → chunk-76CX2YPT.js} +210 -129
- package/dist/bundle/{chunk-E2IRSRTB.js → chunk-B4UOCWM4.js} +4 -2
- package/dist/bundle/{chunk-Y3AQHPAJ.js → chunk-BGMV66FC.js} +1 -1
- package/dist/bundle/{chunk-LPUFOWL3.js → chunk-D72URWJE.js} +1 -39
- package/dist/bundle/{chunk-WOQGUIXE.js → chunk-DP5LRU7K.js} +1 -1
- package/dist/bundle/chunk-EB2IULWB.js +72 -0
- package/dist/bundle/{chunk-4JOKO4IW.js → chunk-FDI4GOIP.js} +912 -493
- package/dist/bundle/{chunk-P4YBABUC.js → chunk-GV7ZJ33M.js} +6 -4
- package/dist/bundle/{chunk-C7K7AP6G.js → chunk-H72UEHNG.js} +69 -36
- package/dist/bundle/{chunk-2PAKHXIV.js → chunk-HBUJNNZD.js} +35 -35
- package/dist/bundle/{chunk-NTF34HJP.js → chunk-HK6SIIGG.js} +3 -3
- package/dist/bundle/{chunk-NUVBC3LJ.js → chunk-HLNYJPAB.js} +2 -2
- package/dist/bundle/{chunk-WIRDTH3J.js → chunk-HUOXUI2M.js} +22 -22
- package/dist/bundle/{chunk-RBC7JQ4Y.js → chunk-I6JF43YP.js} +5 -3
- package/dist/bundle/{chunk-OFDMD3YF.js → chunk-IR4S7POE.js} +8 -8
- package/dist/bundle/{chunk-3R43O3GG.js → chunk-JFTCOV37.js} +80 -24
- package/dist/bundle/{chunk-YPABTT7A.js → chunk-JJMQA272.js} +14 -89
- package/dist/bundle/{chunk-DQQEN3X4.js → chunk-K2RYCCTP.js} +4 -4
- package/dist/bundle/{chunk-OWHF6BON.js → chunk-K62YATVD.js} +6 -6
- package/dist/bundle/{chunk-6SPLZI5P.js → chunk-KA6EGOJY.js} +4 -4
- package/dist/bundle/chunk-KV4267S4.js +23 -0
- package/dist/bundle/{chunk-AL36NHO6.js → chunk-LFKEKSI5.js} +1043 -307
- package/dist/bundle/{chunk-7FOT4XD2.js → chunk-LSKGCJWD.js} +3426 -1298
- package/dist/bundle/{chunk-M3IWROIF.js → chunk-LXH3SKY3.js} +10 -8
- package/dist/bundle/{chunk-QCXYJKPF.js → chunk-MQ7MCVZV.js} +2 -2
- package/dist/bundle/{chunk-EQJG44KE.js → chunk-N42VUNTO.js} +2 -2
- package/dist/bundle/{chunk-KIZT2MI6.js → chunk-N6TIFJHW.js} +1 -1
- package/dist/bundle/{chunk-MQTTVQ3V.js → chunk-NL3PAFAE.js} +8 -8
- package/dist/bundle/{chunk-ULFTCR5W.js → chunk-NUYRMU56.js} +2 -2
- package/dist/bundle/{chunk-34USFPBF.js → chunk-OX6EWGSG.js} +185 -291
- package/dist/bundle/{chunk-KZQXOZFC.js → chunk-PPLFOIYX.js} +7 -20
- package/dist/bundle/{chunk-TTTDZOBW.js → chunk-PPSUA3IZ.js} +3 -3
- package/dist/bundle/{chunk-ALHKUQDZ.js → chunk-PXMHBTK3.js} +4 -4
- package/dist/bundle/{chunk-VVKEWWSO.js → chunk-QAKL3GXB.js} +1 -1
- package/dist/bundle/{chunk-I6BKSGZQ.js → chunk-QGL2UGML.js} +306 -190
- package/dist/bundle/{chunk-J5U2HKGZ.js → chunk-QHBVGKC3.js} +51 -30
- package/dist/bundle/{chunk-NJ2I4KFZ.js → chunk-R52RMHWF.js} +2 -2
- package/dist/bundle/chunk-RSDIPQXP.js +35 -0
- package/dist/bundle/{chunk-XDOPONC3.js → chunk-RSNGMNU5.js} +6 -6
- package/dist/bundle/{chunk-NKP3RUM4.js → chunk-SD5PUYKF.js} +14 -12
- package/dist/bundle/chunk-SKZ2E3WC.js +91 -0
- package/dist/bundle/{chunk-HA35XN2Z.js → chunk-T7CDLV33.js} +4 -4
- package/dist/bundle/{chunk-C34IDOA5.js → chunk-TZVL4U7U.js} +2 -2
- package/dist/bundle/{chunk-3EZ43DAF.js → chunk-UCSFO5GW.js} +3 -3
- package/dist/bundle/{chunk-NMVFFWF2.js → chunk-VQPLHOVQ.js} +9 -9
- package/dist/bundle/chunk-XBIPSSKI.js +166 -0
- package/dist/bundle/{chunk-VHO66SMY.js → chunk-XQUTJITP.js} +59 -57
- package/dist/bundle/{chunk-L4CMCC3V.js → chunk-Y6VWGJ4Q.js} +1 -1
- package/dist/bundle/{chunk-RFRI2HFT.js → chunk-YLRTLZF6.js} +1 -1
- package/dist/bundle/chunk-YPF6OS37.js +46 -0
- package/dist/bundle/{chunk-TKNCJMYN.js → chunk-YYKJN6H5.js} +946 -589
- package/dist/bundle/{chunk-5HKMEXVQ.js → chunk-ZDIAPICE.js} +4 -4
- package/dist/bundle/command-contract-DPXM4SZT.js +33 -0
- package/dist/bundle/{decode-7U4SXPAN.js → decode-W6YPTGJA.js} +7 -6
- package/dist/bundle/dispatch-H7EFNBEH.js +411 -0
- package/dist/bundle/{echarts-GKEZEAL7.js → echarts-YAWDIC5D.js} +2 -2
- package/dist/bundle/{embed-IDZDQMSW.js → embed-EN4UTLV5.js} +6 -5
- package/dist/bundle/{embedder-RY5R2PGO.js → embedder-HEKHRL7E.js} +11 -10
- package/dist/bundle/{entry-P6YZ3ZV6.js → entry-2KB6MTCG.js} +7 -6
- package/dist/bundle/failure-3DU3HLBQ.js +24 -0
- package/dist/bundle/first-run-LBG26WWO.js +27 -0
- package/dist/bundle/first-screen-TGTSLUI6.js +31 -0
- package/dist/bundle/{instructions-P5E34PQR.js → instructions-HA62QNPR.js} +1 -1
- package/dist/bundle/{mcp-FUSDPAOL.js → mcp-PPVOM4SE.js} +5 -3
- package/dist/bundle/{node-GKPRXS5Y.js → node-MZ2VWSQQ.js} +2 -2
- package/dist/bundle/{node-sqlite-VUXFVPJ6.js → node-sqlite-KNNS6DCM.js} +6 -5
- package/dist/bundle/{oauth-7SQIPMOY.js → oauth-KWUABBSQ.js} +7 -6
- package/dist/bundle/{open-W3BN2SIO.js → open-JXMCYCIV.js} +5 -4
- package/dist/bundle/{openai-LQTK3ZMC.js → openai-HL3IR4VT.js} +15 -14
- package/dist/bundle/{process-U2P5Z6UF.js → process-K2FICLWY.js} +1 -1
- package/dist/bundle/{program-DIPSLR6O.js → program-IFOMT4JS.js} +70 -57
- package/dist/bundle/{prompt-GESHKSM5.js → prompt-HVD3Q77P.js} +5 -4
- package/dist/bundle/{proxy-transport-C2EUUT32.js → proxy-transport-PA5SGMRY.js} +5 -4
- package/dist/bundle/{recognize-FEQTIJET.js → recognize-HHLVETKI.js} +4 -3
- package/dist/bundle/{remote-UXOPBPKS.js → remote-HUAKXJCS.js} +7 -6
- package/dist/bundle/{rerank-L4JM4REK.js → rerank-NWFIV7OF.js} +7 -6
- package/dist/bundle/{serve-DDWW44DB.js → serve-ANUKAJJN.js} +10 -9
- package/dist/bundle/{server-UTWBIZHB.js → server-7Q7WAOHO.js} +37 -34
- package/dist/bundle/server-HCQS4YDQ.js +60 -0
- package/dist/bundle/{state-EV7FGEK4.js → state-Y2AJ5XTP.js} +6 -5
- package/dist/bundle/{store-EXBUF4OG.js → store-S3IG5KWL.js} +15 -11
- package/dist/bundle/store-maintenance-command-V2WC4G6J.js +50 -0
- package/dist/bundle/tg.js +159 -14
- package/dist/commands/session.d.ts.map +1 -1
- package/dist/commands/session.js +7 -0
- package/dist/commands/session.js.map +1 -1
- package/dist/telegram/login.d.ts +2 -0
- package/dist/telegram/login.d.ts.map +1 -1
- package/dist/telegram/login.js +31 -2
- package/dist/telegram/login.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -4
- package/skills/tg-cli/SKILL.md +2 -0
- package/dist/bundle/chunk-TRRRRGMI.js +0 -18
- package/dist/bundle/command-contract-SOTDPG22.js +0 -31
- 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
- /package/dist/bundle/{chunk-NUN6OGOV.js → chunk-LU3WKZBA.js} +0 -0
|
@@ -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-EB2IULWB.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
9
|
+
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.77.1_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.77.1_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.77.1_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
|
+
};
|
|
@@ -3,7 +3,7 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
answerOf,
|
|
5
5
|
messengerContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HUOXUI2M.js";
|
|
7
7
|
import {
|
|
8
8
|
FETCHING,
|
|
9
9
|
RULES_VERSION,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
syncsOneChat,
|
|
24
24
|
typedQuery,
|
|
25
25
|
withQuery
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-FDI4GOIP.js";
|
|
27
27
|
import {
|
|
28
28
|
stringWidth,
|
|
29
29
|
wrapAnsi
|
|
@@ -55,32 +55,23 @@ import {
|
|
|
55
55
|
snakeKeys,
|
|
56
56
|
storeTable,
|
|
57
57
|
withoutProviderRefs
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-LFKEKSI5.js";
|
|
59
59
|
import {
|
|
60
60
|
failureKey
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-JJMQA272.js";
|
|
62
62
|
import {
|
|
63
63
|
envName
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TZVL4U7U.js";
|
|
65
65
|
import {
|
|
66
66
|
holdLock,
|
|
67
67
|
lockPath,
|
|
68
68
|
releaseLock,
|
|
69
69
|
servingProfiles,
|
|
70
70
|
takeLock
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-HK6SIIGG.js";
|
|
72
72
|
import {
|
|
73
73
|
holdersOf
|
|
74
|
-
} from "./chunk-
|
|
75
|
-
import {
|
|
76
|
-
checkedOptions,
|
|
77
|
-
range
|
|
78
|
-
} from "./chunk-RBC7JQ4Y.js";
|
|
79
|
-
import {
|
|
80
|
-
messagesFor,
|
|
81
|
-
systemFor,
|
|
82
|
-
validateImages
|
|
83
|
-
} from "./chunk-QCXYJKPF.js";
|
|
74
|
+
} from "./chunk-N6TIFJHW.js";
|
|
84
75
|
import {
|
|
85
76
|
MIGRATIONS,
|
|
86
77
|
drainNoteIndex,
|
|
@@ -109,29 +100,35 @@ import {
|
|
|
109
100
|
storeClients,
|
|
110
101
|
storeContents,
|
|
111
102
|
vectorIndexCounts
|
|
112
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-LSKGCJWD.js";
|
|
113
104
|
import {
|
|
114
105
|
queryFieldsOf
|
|
115
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-QGL2UGML.js";
|
|
107
|
+
import {
|
|
108
|
+
readSecret
|
|
109
|
+
} from "./chunk-UCSFO5GW.js";
|
|
110
|
+
import {
|
|
111
|
+
checkedOptions,
|
|
112
|
+
range
|
|
113
|
+
} from "./chunk-I6JF43YP.js";
|
|
114
|
+
import {
|
|
115
|
+
messagesFor,
|
|
116
|
+
systemFor,
|
|
117
|
+
validateImages
|
|
118
|
+
} from "./chunk-MQ7MCVZV.js";
|
|
116
119
|
import {
|
|
117
120
|
storePath
|
|
118
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-RSDIPQXP.js";
|
|
119
122
|
import {
|
|
120
123
|
openCache
|
|
121
|
-
} from "./chunk-
|
|
122
|
-
import {
|
|
123
|
-
readSecret
|
|
124
|
-
} from "./chunk-3EZ43DAF.js";
|
|
124
|
+
} from "./chunk-RSNGMNU5.js";
|
|
125
125
|
import {
|
|
126
126
|
Credentials,
|
|
127
127
|
pathsAreOverridden,
|
|
128
128
|
resolvePaths,
|
|
129
|
-
singleLine,
|
|
130
|
-
visibleControls,
|
|
131
129
|
writeSecurely
|
|
132
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-OX6EWGSG.js";
|
|
133
131
|
import {
|
|
134
|
-
CliError,
|
|
135
132
|
array,
|
|
136
133
|
boolean,
|
|
137
134
|
check,
|
|
@@ -154,7 +151,12 @@ import {
|
|
|
154
151
|
transform,
|
|
155
152
|
trim,
|
|
156
153
|
union
|
|
157
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-76CX2YPT.js";
|
|
155
|
+
import {
|
|
156
|
+
CliError,
|
|
157
|
+
singleLine,
|
|
158
|
+
visibleControls
|
|
159
|
+
} from "./chunk-EB2IULWB.js";
|
|
158
160
|
import {
|
|
159
161
|
__commonJS,
|
|
160
162
|
__name,
|
|
@@ -5494,11 +5496,11 @@ var require_liquid_node = __commonJS({
|
|
|
5494
5496
|
}
|
|
5495
5497
|
});
|
|
5496
5498
|
|
|
5497
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5499
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
5498
5500
|
import { chmodSync, constants, copyFileSync, existsSync as existsSync7, mkdirSync, realpathSync, renameSync as renameSync2, rmSync as rmSync2, statfsSync, statSync as statSync3, writeFileSync } from "node:fs";
|
|
5499
5501
|
import { dirname, resolve } from "node:path";
|
|
5500
5502
|
|
|
5501
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5503
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/sealed.js
|
|
5502
5504
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, scrypt, timingSafeEqual } from "node:crypto";
|
|
5503
5505
|
import { closeSync, createReadStream, createWriteStream, existsSync, openSync, readSync, renameSync, rmSync, statSync } from "node:fs";
|
|
5504
5506
|
import { Transform } from "node:stream";
|
|
@@ -5605,7 +5607,7 @@ var unsealFile = /* @__PURE__ */ __name(async (from, to, password) => {
|
|
|
5605
5607
|
renameSync(pending, to);
|
|
5606
5608
|
}, "unsealFile");
|
|
5607
5609
|
|
|
5608
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5610
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/store/compatibility.js
|
|
5609
5611
|
var SPEAKS = MIGRATIONS.at(-1)?.version ?? 0;
|
|
5610
5612
|
var fileSchemaOf = /* @__PURE__ */ __name((database) => {
|
|
5611
5613
|
const tracked = database.prepare("SELECT 1 FROM sqlite_master WHERE name = 'schema_migrations'").get();
|
|
@@ -5629,7 +5631,7 @@ var compatibilityOf = /* @__PURE__ */ __name((file2, migrations = MIGRATIONS) =>
|
|
|
5629
5631
|
};
|
|
5630
5632
|
}, "compatibilityOf");
|
|
5631
5633
|
|
|
5632
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5634
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/store/repair.js
|
|
5633
5635
|
import { createHash as createHash2 } from "node:crypto";
|
|
5634
5636
|
var COPY_MARK = "__repair_";
|
|
5635
5637
|
var COPY_NAME = /__repair_[0-9a-f]{8}(_\d+)?$/;
|
|
@@ -5883,7 +5885,7 @@ var deleteCopy = /* @__PURE__ */ __name((database, name) => {
|
|
|
5883
5885
|
return found;
|
|
5884
5886
|
}, "deleteCopy");
|
|
5885
5887
|
|
|
5886
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5888
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/store-info.js
|
|
5887
5889
|
import { existsSync as existsSync2, statSync as statSync2 } from "node:fs";
|
|
5888
5890
|
var pendingIfKnown = /* @__PURE__ */ __name((database) => database.prepare("SELECT 1 FROM pragma_table_info('messages') WHERE name = 'normalized_text'").get() ? pendingNormalization(database) : null, "pendingIfKnown");
|
|
5889
5891
|
var bytesOf = /* @__PURE__ */ __name((path) => existsSync2(path) ? statSync2(path).size : 0, "bytesOf");
|
|
@@ -5930,7 +5932,7 @@ var storeInfoCommand = /* @__PURE__ */ __name(() => annotate(new Command("info")
|
|
|
5930
5932
|
renderAnswer(this, outputFor(this), itemOf(answer));
|
|
5931
5933
|
}), "storeInfoCommand");
|
|
5932
5934
|
|
|
5933
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5935
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/password.js
|
|
5934
5936
|
var ENCRYPT_OPTION = [
|
|
5935
5937
|
"--encrypt",
|
|
5936
5938
|
"compress and encrypt with a password, typed at a hidden prompt or piped on stdin; it is never kept \u2014 lose it and the file cannot be opened"
|
|
@@ -5949,7 +5951,7 @@ var passwordOf = /* @__PURE__ */ __name(async (command, { twice }) => {
|
|
|
5949
5951
|
return password;
|
|
5950
5952
|
}, "passwordOf");
|
|
5951
5953
|
|
|
5952
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
5954
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/rules.js
|
|
5953
5955
|
import { existsSync as existsSync3, readFileSync } from "node:fs";
|
|
5954
5956
|
import { join } from "node:path";
|
|
5955
5957
|
var REPLY_ACTIONS = ["reply", "task"];
|
|
@@ -6120,7 +6122,7 @@ var problem = /* @__PURE__ */ __name((issue) => {
|
|
|
6120
6122
|
}, "problem");
|
|
6121
6123
|
var broken = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply rules ${path} cannot be read (${why}) \u2014 fix the file`), "broken");
|
|
6122
6124
|
|
|
6123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/state.js
|
|
6124
6126
|
import { existsSync as existsSync4, readFileSync as readFileSync2 } from "node:fs";
|
|
6125
6127
|
import { join as join2 } from "node:path";
|
|
6126
6128
|
var ANSWERED_KEPT = 1e3;
|
|
@@ -6173,7 +6175,7 @@ var recordReply = /* @__PURE__ */ __name((state, rule2, message, now) => {
|
|
|
6173
6175
|
}, "recordReply");
|
|
6174
6176
|
var broken2 = /* @__PURE__ */ __name((path, why) => new CliError("configuration_error", `the reply state ${path} cannot be read (${why}) \u2014 fix or move the file`), "broken");
|
|
6175
6177
|
|
|
6176
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6178
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/decide.js
|
|
6177
6179
|
var skip = /* @__PURE__ */ __name((why) => ({ skip: why }), "skip");
|
|
6178
6180
|
var decide = /* @__PURE__ */ __name((rule2, incoming, state, now) => {
|
|
6179
6181
|
const { message, chat, owner, sender } = incoming;
|
|
@@ -6279,7 +6281,7 @@ var filled = /* @__PURE__ */ __name((template2, senderName) => {
|
|
|
6279
6281
|
return template2.replaceAll("{firstName}", name.split(/\s+/)[0] ?? name).replaceAll("{name}", name);
|
|
6280
6282
|
}, "filled");
|
|
6281
6283
|
|
|
6282
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6284
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/template.js
|
|
6283
6285
|
var import_liquidjs = __toESM(require_liquid_node(), 1);
|
|
6284
6286
|
var TEMPLATE_LIMITS = {
|
|
6285
6287
|
parse: 32768,
|
|
@@ -6439,7 +6441,7 @@ var renderReplyTemplate = /* @__PURE__ */ __name(async (reply, input) => {
|
|
|
6439
6441
|
}
|
|
6440
6442
|
}, "renderReplyTemplate");
|
|
6441
6443
|
|
|
6442
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6444
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/dry-run.js
|
|
6443
6445
|
var DRY_RUN_DAYS = 7;
|
|
6444
6446
|
var PAGE = 500;
|
|
6445
6447
|
var dryRun = /* @__PURE__ */ __name(async (store, account, rules, { since, until = Date.now(), only, audience, render }) => {
|
|
@@ -6553,7 +6555,7 @@ var storedSince = /* @__PURE__ */ __name(async (store, account, chat, since) =>
|
|
|
6553
6555
|
}
|
|
6554
6556
|
}, "storedSince");
|
|
6555
6557
|
|
|
6556
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6558
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/embeddings/keys.js
|
|
6557
6559
|
var endpointKeyName = /* @__PURE__ */ __name((baseUrl) => {
|
|
6558
6560
|
const host = new URL(baseUrl).host;
|
|
6559
6561
|
return ["openai", "anthropic"].includes(host) ? `endpoint:${host}` : host;
|
|
@@ -6584,7 +6586,7 @@ var embeddingKeys = /* @__PURE__ */ __name((app, env = process.env, keyring) =>
|
|
|
6584
6586
|
};
|
|
6585
6587
|
}, "embeddingKeys");
|
|
6586
6588
|
|
|
6587
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6589
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/models/openai.js
|
|
6588
6590
|
var options = strictObject({
|
|
6589
6591
|
temperature: range(0, 2),
|
|
6590
6592
|
top_p: range(0, 1),
|
|
@@ -6633,7 +6635,7 @@ var openai = {
|
|
|
6633
6635
|
}, "complete")
|
|
6634
6636
|
};
|
|
6635
6637
|
|
|
6636
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6638
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/models/index.js
|
|
6637
6639
|
var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
6638
6640
|
complete: /* @__PURE__ */ __name(async (request) => {
|
|
6639
6641
|
if (deps.signal?.aborted)
|
|
@@ -6648,7 +6650,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6648
6650
|
if (!adapter && target.provider === "openai")
|
|
6649
6651
|
adapter = openai;
|
|
6650
6652
|
if (!adapter && target.provider === "anthropic")
|
|
6651
|
-
adapter = (await import("./anthropic-
|
|
6653
|
+
adapter = (await import("./anthropic-QKIPHV2Z.js")).anthropic;
|
|
6652
6654
|
if (!adapter)
|
|
6653
6655
|
throw new CliError("validation_error", `no model adapter for ${target.provider}`);
|
|
6654
6656
|
if (request.images !== void 0 && adapter.images !== true)
|
|
@@ -6689,7 +6691,7 @@ var modelGateway = /* @__PURE__ */ __name((deps) => ({
|
|
|
6689
6691
|
}, "complete")
|
|
6690
6692
|
}), "modelGateway");
|
|
6691
6693
|
|
|
6692
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6694
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/consents.js
|
|
6693
6695
|
import { existsSync as existsSync5, readFileSync as readFileSync3 } from "node:fs";
|
|
6694
6696
|
import { join as join3 } from "node:path";
|
|
6695
6697
|
var shape = strictObject({
|
|
@@ -6714,7 +6716,7 @@ var mayModelReply = /* @__PURE__ */ __name((path, provider, chat) => {
|
|
|
6714
6716
|
return consent.provider === provider && !consent.deniedChats.includes(chat);
|
|
6715
6717
|
}, "mayModelReply");
|
|
6716
6718
|
|
|
6717
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/rendering.js
|
|
6718
6720
|
var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, options2 = {
|
|
6719
6721
|
ai: true
|
|
6720
6722
|
}) => async (rule2, message, chat, now) => {
|
|
@@ -6761,7 +6763,7 @@ var replyRenderer = /* @__PURE__ */ __name((app, profile, settings, env, warn, o
|
|
|
6761
6763
|
return result2;
|
|
6762
6764
|
}, "replyRenderer");
|
|
6763
6765
|
|
|
6764
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6766
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/replies/serve.js
|
|
6765
6767
|
var NOT_ALLOWED = "replies.send is not allow";
|
|
6766
6768
|
var NO_RULES = "no rules";
|
|
6767
6769
|
var ONLY_TASK = "opened a task, sent nothing";
|
|
@@ -6854,7 +6856,7 @@ var replyTo = /* @__PURE__ */ __name(async (deps, message) => {
|
|
|
6854
6856
|
return { skip: why };
|
|
6855
6857
|
}, "replyTo");
|
|
6856
6858
|
|
|
6857
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6859
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-catch-up.js
|
|
6858
6860
|
var START_SYNC_DELAY_MS = 3e4;
|
|
6859
6861
|
var START_SYNC_BUDGET_MS = 5 * 6e4;
|
|
6860
6862
|
var START_SYNC_WINDOW_MS = 7 * 864e5;
|
|
@@ -6931,7 +6933,7 @@ var startSync = /* @__PURE__ */ __name(({ chats, newestHeld, fetch: fetch2, note
|
|
|
6931
6933
|
};
|
|
6932
6934
|
}, "startSync");
|
|
6933
6935
|
|
|
6934
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6936
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-members.js
|
|
6935
6937
|
var FIRST_FETCH_MS = 6e4;
|
|
6936
6938
|
var DAY_MS = 864e5;
|
|
6937
6939
|
var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, firstMs = FIRST_FETCH_MS, everyMs = DAY_MS }) => {
|
|
@@ -6985,7 +6987,7 @@ var memberFetches = /* @__PURE__ */ __name(({ withStore, fetch: fetch2, warn, fi
|
|
|
6985
6987
|
};
|
|
6986
6988
|
}, "memberFetches");
|
|
6987
6989
|
|
|
6988
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
6990
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-notice.js
|
|
6989
6991
|
var record2 = /* @__PURE__ */ __name((context, app, severity, attributes) => recordLogFor(context.streams.diagnostic, app, { command: currentRun().command || "serve" })[severity](attributes), "record");
|
|
6990
6992
|
var noticeFor = /* @__PURE__ */ __name((context, app, severity = "warn") => ({ text, ...attributes }) => {
|
|
6991
6993
|
if (context.format === "pretty") {
|
|
@@ -7018,7 +7020,7 @@ var recordDiagnostics = /* @__PURE__ */ __name((context, app) => {
|
|
|
7018
7020
|
return context;
|
|
7019
7021
|
}, "recordDiagnostics");
|
|
7020
7022
|
|
|
7021
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7023
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-stems.js
|
|
7022
7024
|
var STEMS_EVERY_MS = 3e4;
|
|
7023
7025
|
var STEMS_SLICE_MS = 2e3;
|
|
7024
7026
|
var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY_MS, sliceMs = STEMS_SLICE_MS }) => {
|
|
@@ -7058,7 +7060,7 @@ var stemFills = /* @__PURE__ */ __name(({ withStore, warn, everyMs = STEMS_EVERY
|
|
|
7058
7060
|
};
|
|
7059
7061
|
}, "stemFills");
|
|
7060
7062
|
|
|
7061
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7063
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/render/messages.js
|
|
7062
7064
|
import { styleText } from "node:util";
|
|
7063
7065
|
var TIME_WIDTH = 8;
|
|
7064
7066
|
var INDENT = " ".repeat(TIME_WIDTH + 2);
|
|
@@ -7234,7 +7236,7 @@ var editedAt = /* @__PURE__ */ __name((message, options2) => {
|
|
|
7234
7236
|
return day(edited) === day(message.timestamp) ? time : `${day(edited)} ${time}`;
|
|
7235
7237
|
}, "editedAt");
|
|
7236
7238
|
|
|
7237
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7239
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/message-items.js
|
|
7238
7240
|
var defined = /* @__PURE__ */ __name((value) => Object.fromEntries(Object.entries(value).filter(([, one]) => one !== void 0)), "defined");
|
|
7239
7241
|
var attachmentItem = /* @__PURE__ */ __name((attachment) => defined({
|
|
7240
7242
|
kind: attachment.kind,
|
|
@@ -7329,7 +7331,7 @@ var viewOf = /* @__PURE__ */ __name((context, messenger) => ({
|
|
|
7329
7331
|
locale: messenger.app.locale
|
|
7330
7332
|
}), "viewOf");
|
|
7331
7333
|
|
|
7332
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7334
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-answers.js
|
|
7333
7335
|
var observed = /* @__PURE__ */ __name((value) => ({
|
|
7334
7336
|
value: value.value,
|
|
7335
7337
|
observed_at: value.observedAt,
|
|
@@ -7396,7 +7398,7 @@ var watchEventItem = /* @__PURE__ */ __name((value, account) => {
|
|
|
7396
7398
|
}
|
|
7397
7399
|
}, "watchEventItem");
|
|
7398
7400
|
|
|
7399
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7401
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/watch-command.js
|
|
7400
7402
|
var watchCommand = /* @__PURE__ */ __name((messenger) => annotate(new Command("watch"), {
|
|
7401
7403
|
output: { entity: "watch_item" },
|
|
7402
7404
|
effects: REMOTE_READ,
|
|
@@ -7551,7 +7553,7 @@ var describe = /* @__PURE__ */ __name((event, render) => {
|
|
|
7551
7553
|
}
|
|
7552
7554
|
}, "describe");
|
|
7553
7555
|
|
|
7554
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7556
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/serve-command.js
|
|
7555
7557
|
var serveCommand = /* @__PURE__ */ __name((messenger) => {
|
|
7556
7558
|
const command = annotate(new Command("serve"), {
|
|
7557
7559
|
output: { entity: "serve_summary" },
|
|
@@ -7815,7 +7817,7 @@ var tasking = /* @__PURE__ */ __name((context, warn) => {
|
|
|
7815
7817
|
};
|
|
7816
7818
|
}, "tasking");
|
|
7817
7819
|
|
|
7818
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7820
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/store-tables-command.js
|
|
7819
7821
|
import { existsSync as existsSync6 } from "node:fs";
|
|
7820
7822
|
var PATH = "store tables list";
|
|
7821
7823
|
var STORE_TABLES_QUERY = {
|
|
@@ -7858,7 +7860,7 @@ var storeTablesCommand = /* @__PURE__ */ __name((messenger) => {
|
|
|
7858
7860
|
return tables;
|
|
7859
7861
|
}, "storeTablesCommand");
|
|
7860
7862
|
|
|
7861
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7863
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/cli/messenger/store-maintenance-command.js
|
|
7862
7864
|
var SEARCH_INDEXES = ["messages_fts", "chats_fts", "identities_fts"];
|
|
7863
7865
|
var WORD_INDEX = "message_words";
|
|
7864
7866
|
var schemaOf = /* @__PURE__ */ __name((database) => {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
8
8
|
var TIME_LIMIT_FUNCTION = "wc_time_limit";
|
|
9
9
|
var TimeLimitReached = class extends Error {
|
|
10
10
|
static {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.567.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.77.1_commander@15._f1cdf35b93ce465cee2c32ebaca13ce7/node_modules/@wirecat/cli-core/dist/mcp/instructions.js
|
|
8
8
|
var instructions = /* @__PURE__ */ __name(({ command, name, profile, writes, skill }) => {
|
|
9
9
|
const all = typeof profile !== "string";
|
|
10
10
|
const offers = /* @__PURE__ */ __name((key) => all || writes.includes(key), "offers");
|
|
@@ -0,0 +1,46 @@
|
|
|
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.77.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/executable.js
|
|
8
|
+
import { existsSync } from "node:fs";
|
|
9
|
+
import { win32 } from "node:path";
|
|
10
|
+
var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
|
|
11
|
+
var executableOnPath = /* @__PURE__ */ __name((command, env, platform = process.platform, exists = existsSync) => {
|
|
12
|
+
if (platform !== "win32" || win32.isAbsolute(command))
|
|
13
|
+
return command;
|
|
14
|
+
if (/[\\/]/.test(command))
|
|
15
|
+
return command;
|
|
16
|
+
const extensions = win32.extname(command) ? [""] : (variable(env, "PATHEXT") ?? ".EXE;.COM;.CMD;.BAT").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext));
|
|
17
|
+
for (const entry of (variable(env, "PATH") ?? "").split(";")) {
|
|
18
|
+
const directory = entry.replace(/^"(.*)"$/, "$1");
|
|
19
|
+
for (const extension of extensions) {
|
|
20
|
+
const candidate = win32.join(directory, command + extension);
|
|
21
|
+
if (exists(candidate))
|
|
22
|
+
return candidate;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return command;
|
|
26
|
+
}, "executableOnPath");
|
|
27
|
+
var executableEnvironment = /* @__PURE__ */ __name((env, platform = process.platform) => {
|
|
28
|
+
if (platform !== "win32")
|
|
29
|
+
return env;
|
|
30
|
+
const configured = variable(env, "COMSPEC");
|
|
31
|
+
const system = variable(env, "SYSTEMROOT");
|
|
32
|
+
const shell = configured ? configured : system && win32.isAbsolute(system) ? win32.join(system, "System32", "cmd.exe") : void 0;
|
|
33
|
+
if (!shell)
|
|
34
|
+
return env;
|
|
35
|
+
const result = { ...env };
|
|
36
|
+
for (const key of Object.keys(result))
|
|
37
|
+
if (key.toUpperCase() === "COMSPEC")
|
|
38
|
+
delete result[key];
|
|
39
|
+
result.comspec = shell;
|
|
40
|
+
return result;
|
|
41
|
+
}, "executableEnvironment");
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
executableOnPath,
|
|
45
|
+
executableEnvironment
|
|
46
|
+
};
|