@wirecat/tg-cli 0.105.0 → 0.107.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/bundle/{adapter-WWYRCTPE.js → adapter-PN5AXCJ7.js} +115 -55
- package/dist/bundle/{all-profiles-IJYM6NIJ.js → all-profiles-SDHNKZQQ.js} +5 -5
- package/dist/bundle/{anthropic-EDRWOXB5.js → anthropic-F3BXQLYB.js} +3 -3
- package/dist/bundle/{app-server-2NF7ZH3C.js → app-server-XDKMWVCD.js} +34 -34
- package/dist/bundle/{bot-api-XCDLL6M2.js → bot-api-YXJL4CEV.js} +38 -38
- package/dist/bundle/{bot-history-37WSQX3U.js → bot-history-SDLHR7PV.js} +10 -10
- package/dist/bundle/{bun-ZX34DXTI.js → bun-SMH7PKUS.js} +2 -2
- package/dist/bundle/{bun-sqlite-7TZ73UKO.js → bun-sqlite-KB6PSTWH.js} +2 -2
- package/dist/bundle/{chunk-NBXUNS6Q.js → chunk-3UEFJ75D.js} +1 -1
- package/dist/bundle/{chunk-ETVQH5AL.js → chunk-44UANKAI.js} +11 -9
- package/dist/bundle/{chunk-RI7H2VVU.js → chunk-465FPHSG.js} +7 -7
- package/dist/bundle/{chunk-SJIHZA4K.js → chunk-53QVFV34.js} +1 -1
- package/dist/bundle/{chunk-NEPB2EI6.js → chunk-53RW4KLL.js} +1 -1
- package/dist/bundle/{chunk-VIGQIMGM.js → chunk-5QBTHR57.js} +2 -2
- package/dist/bundle/{chunk-AQGW6OHU.js → chunk-6FSG6QZH.js} +1 -1
- package/dist/bundle/{chunk-HJSWUHHP.js → chunk-A4DS5ANQ.js} +1 -1
- package/dist/bundle/{chunk-MAV5ODPN.js → chunk-AWBJSYX6.js} +1 -1
- package/dist/bundle/{chunk-56JDML7T.js → chunk-BGVODG6P.js} +2 -2
- package/dist/bundle/{chunk-SLFDNASB.js → chunk-BMXGEQDA.js} +4 -4
- package/dist/bundle/{chunk-QPE72FCE.js → chunk-BYDDYOF4.js} +7 -7
- package/dist/bundle/{chunk-XP4JEE47.js → chunk-CJJVFGFX.js} +1 -1
- package/dist/bundle/{chunk-QWPVSWQE.js → chunk-DBZVF73F.js} +2 -2
- package/dist/bundle/{chunk-2A2KXY5G.js → chunk-DFZBGU4G.js} +4 -4
- package/dist/bundle/{chunk-J6B5DQ3I.js → chunk-GGAG3G7B.js} +55 -47
- package/dist/bundle/{chunk-S3C2L3IE.js → chunk-GJS26XEB.js} +4 -4
- package/dist/bundle/{chunk-LOIFBJBA.js → chunk-H4LIQVPN.js} +9 -9
- package/dist/bundle/{chunk-OOBCCVYM.js → chunk-IY7IEM56.js} +4 -4
- package/dist/bundle/{chunk-RDO66SBI.js → chunk-JAWXJILO.js} +2 -2
- package/dist/bundle/{chunk-MHS2LEZA.js → chunk-JZOXKRDG.js} +11 -6
- package/dist/bundle/{chunk-4UZE26T6.js → chunk-KROO42KC.js} +5 -5
- package/dist/bundle/{chunk-QAW5QNOY.js → chunk-LA2OUJK5.js} +9 -8
- package/dist/bundle/{chunk-J5OIB3OW.js → chunk-MOZX3JX3.js} +2 -2
- package/dist/bundle/{chunk-5PDGRPTS.js → chunk-NCWB3KXP.js} +1 -1
- package/dist/bundle/{chunk-N5BGV5YZ.js → chunk-NMTFZNFU.js} +26 -26
- package/dist/bundle/{chunk-73OWDRGK.js → chunk-NSQL3YRD.js} +25 -21
- package/dist/bundle/{chunk-S7FO7OU2.js → chunk-NUVHRCUK.js} +344 -297
- package/dist/bundle/{chunk-YGYQY5AG.js → chunk-O7VQHFMZ.js} +1 -1
- package/dist/bundle/{chunk-2J2G3ELT.js → chunk-OIHAM73W.js} +1 -1
- package/dist/bundle/{chunk-ZI7THBWF.js → chunk-P4A27ETD.js} +46 -46
- package/dist/bundle/{chunk-WD7Q2H4J.js → chunk-P5KMLJQR.js} +2930 -2853
- package/dist/bundle/{chunk-Q6NALH2X.js → chunk-P5UG655O.js} +2 -2
- package/dist/bundle/{recognize-54LQOU24.js → chunk-PYRJO6B3.js} +6 -6
- package/dist/bundle/{chunk-YSIC5B32.js → chunk-REJM262E.js} +10 -10
- package/dist/bundle/{chunk-4VFRP2T2.js → chunk-RGNKRI5T.js} +26 -22
- package/dist/bundle/{chunk-ZIG4WIVN.js → chunk-STGY3EAZ.js} +1 -1
- package/dist/bundle/{chunk-4N53GVUI.js → chunk-TEHAIU6I.js} +56 -46
- package/dist/bundle/{chunk-Z6SXT5DV.js → chunk-TFV4UPQZ.js} +3 -3
- package/dist/bundle/{chunk-ZM2AI3E5.js → chunk-TKCZYJAT.js} +431 -319
- package/dist/bundle/{chunk-QVXMOHHN.js → chunk-VMKPRAIB.js} +4 -4
- package/dist/bundle/{chunk-443D2OY7.js → chunk-WFG7KFM4.js} +1 -1
- package/dist/bundle/{chunk-6MQ3DEXF.js → chunk-WS3S7DXT.js} +18 -1
- package/dist/bundle/{chunk-FNASJIAI.js → chunk-WXIGT6FY.js} +11 -11
- package/dist/bundle/{chunk-L23IJ3IZ.js → chunk-X7M7YZPF.js} +5 -5
- package/dist/bundle/{chunk-PFL3CCP2.js → chunk-YA44IPCS.js} +1 -1
- package/dist/bundle/{chunk-GGIDY5KC.js → chunk-YSDA3EWT.js} +154 -142
- package/dist/bundle/{command-contract-OF6TUQ5B.js → command-contract-B4DA4MXP.js} +12 -12
- package/dist/bundle/decode-WEP3HD56.js +159 -0
- package/dist/bundle/{echarts-WFLEME5I.js → echarts-MRMILSAF.js} +2 -2
- package/dist/bundle/{embed-ESTG27RK.js → embed-LCLTUVUD.js} +3 -3
- package/dist/bundle/{embedder-P3W76VOZ.js → embedder-O4WNEXUC.js} +6 -6
- package/dist/bundle/{entry-SNRZGNRA.js → entry-7HDX6BDR.js} +3 -3
- package/dist/bundle/{first-run-JS24HORG.js → first-run-M7YVVQJS.js} +5 -5
- package/dist/bundle/{first-screen-U63BJPXI.js → first-screen-MXW3UZFB.js} +13 -13
- package/dist/bundle/{identity-TYE57SHY.js → identity-EEMHQOTN.js} +1 -1
- package/dist/bundle/{instructions-ERMZPVS4.js → instructions-YIH3J4TI.js} +1 -1
- package/dist/bundle/{node-KDZSMKIC.js → node-YWT7RFN6.js} +2 -2
- package/dist/bundle/{node-sqlite-FR64YDYV.js → node-sqlite-LVHTONMA.js} +2 -2
- package/dist/bundle/{oauth-SPE76ZIY.js → oauth-CADZB7TT.js} +4 -4
- package/dist/bundle/{open-UEFCMPLC.js → open-AMRU27KK.js} +1 -1
- package/dist/bundle/{process-7MD6MEGB.js → process-JC76J5UD.js} +1 -1
- package/dist/bundle/{program-NFFSOGUY.js → program-FI6MTY2V.js} +40 -40
- package/dist/bundle/{prompt-3PI4H66U.js → prompt-SPYTHKHN.js} +2 -2
- package/dist/bundle/recognize-G5VVM6MU.js +22 -0
- package/dist/bundle/{remote-JQ74NVUK.js → remote-Z3HW42CH.js} +4 -4
- package/dist/bundle/{rerank-66YCEORD.js → rerank-QJ5NLZUU.js} +4 -4
- package/dist/bundle/{serve-5SP2TCGV.js → serve-3I4C6Y5X.js} +6 -6
- package/dist/bundle/{server-GFICDJ6J.js → server-2L4BONHN.js} +26 -26
- package/dist/bundle/server-7TJ337SR.js +55 -0
- package/dist/bundle/{state-U7HXQB6I.js → state-IXZYPH46.js} +3 -3
- package/dist/bundle/{store-O4QVYHFL.js → store-KS4XIA2R.js} +7 -7
- package/dist/bundle/store-maintenance-command-I3L24P22.js +44 -0
- package/dist/bundle/tg.js +2 -2
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +1 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/telegram/adapter.d.ts +7 -0
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/adapter.js +3 -0
- package/dist/telegram/adapter.js.map +1 -1
- package/dist/telegram/contacts.d.ts +3 -1
- package/dist/telegram/contacts.d.ts.map +1 -1
- package/dist/telegram/contacts.js +4 -1
- package/dist/telegram/contacts.js.map +1 -1
- package/dist/telegram/map.d.ts.map +1 -1
- package/dist/telegram/map.js +17 -0
- package/dist/telegram/map.js.map +1 -1
- package/dist/telegram/messages.d.ts +7 -0
- package/dist/telegram/messages.d.ts.map +1 -1
- package/dist/telegram/messages.js +5 -0
- package/dist/telegram/messages.js.map +1 -1
- package/dist/telegram/reactors.d.ts +16 -0
- package/dist/telegram/reactors.d.ts.map +1 -0
- package/dist/telegram/reactors.js +58 -0
- package/dist/telegram/reactors.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/skills/tg-cli/SKILL.md +3 -2
- package/dist/bundle/server-KMKRKOZP.js +0 -55
- package/dist/bundle/store-maintenance-command-BNRZ5IJD.js +0 -44
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
__name
|
|
8
8
|
} from "./chunk-ZVVMGPBJ.js";
|
|
9
9
|
|
|
10
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
10
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/store/driver.js
|
|
11
11
|
var PRAGMAS = `
|
|
12
12
|
PRAGMA busy_timeout = 5000;
|
|
13
13
|
PRAGMA journal_mode = WAL;
|
|
14
14
|
PRAGMA foreign_keys = ON;
|
|
15
15
|
`;
|
|
16
16
|
|
|
17
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
17
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/store/sqlite-warning.js
|
|
18
18
|
var SQLITE_WARNING = "SQLite is an experimental feature";
|
|
19
19
|
var quieted = /* @__PURE__ */ new WeakSet();
|
|
20
20
|
var quietSqliteWarning = /* @__PURE__ */ __name((host = process) => {
|
|
@@ -35,7 +35,7 @@ var isSqliteWarning = /* @__PURE__ */ __name((warning, options) => {
|
|
|
35
35
|
return name === "ExperimentalWarning" && message.startsWith(SQLITE_WARNING);
|
|
36
36
|
}, "isSqliteWarning");
|
|
37
37
|
|
|
38
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
38
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/store/open.js
|
|
39
39
|
var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
40
40
|
const database = await openFile(path);
|
|
41
41
|
try {
|
|
@@ -48,12 +48,12 @@ var openCache = /* @__PURE__ */ __name(async (path) => {
|
|
|
48
48
|
}, "openCache");
|
|
49
49
|
var openFile = /* @__PURE__ */ __name((path) => "Bun" in globalThis ? openUnderBun(path) : openUnderNode(path), "openFile");
|
|
50
50
|
var openUnderBun = /* @__PURE__ */ __name(async (path) => {
|
|
51
|
-
const { openWithBunSqlite } = await import("./bun-sqlite-
|
|
51
|
+
const { openWithBunSqlite } = await import("./bun-sqlite-KB6PSTWH.js");
|
|
52
52
|
return await openWithBunSqlite(path);
|
|
53
53
|
}, "openUnderBun");
|
|
54
54
|
var openUnderNode = /* @__PURE__ */ __name(async (path) => {
|
|
55
55
|
quietSqliteWarning();
|
|
56
|
-
const { openWithNodeSqlite } = await import("./node-sqlite-
|
|
56
|
+
const { openWithNodeSqlite } = await import("./node-sqlite-LVHTONMA.js");
|
|
57
57
|
return openWithNodeSqlite(path);
|
|
58
58
|
}, "openUnderNode");
|
|
59
59
|
var runtime = /* @__PURE__ */ __name(() => {
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
privateFiles,
|
|
14
14
|
providerRequest,
|
|
15
15
|
withSqliteSidecars
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-NUVHRCUK.js";
|
|
17
17
|
import {
|
|
18
18
|
parseProxy,
|
|
19
19
|
proxyAddress,
|
|
@@ -23,20 +23,20 @@ import {
|
|
|
23
23
|
} from "./chunk-FG2QTYEF.js";
|
|
24
24
|
import {
|
|
25
25
|
messengerContext
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-NSQL3YRD.js";
|
|
27
27
|
import {
|
|
28
28
|
uploadBlob
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-P5KMLJQR.js";
|
|
30
30
|
import {
|
|
31
31
|
asFirstWord,
|
|
32
32
|
currentAttempt,
|
|
33
33
|
environmentOf,
|
|
34
34
|
fromFile,
|
|
35
35
|
settingsFor
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-GGAG3G7B.js";
|
|
37
37
|
import {
|
|
38
38
|
TG
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-WFG7KFM4.js";
|
|
40
40
|
import {
|
|
41
41
|
Credentials,
|
|
42
42
|
pathsAreOverridden,
|
|
@@ -178,7 +178,7 @@ var telegramOf = /* @__PURE__ */ __name((command, base) => {
|
|
|
178
178
|
throw new CliError(unreachable, loggedIn ? `no Telegram app credentials found for profile "${profile}", although it has logged in on this machine \u2014 the keyring is probably out of reach (cron, ssh, an MCP client that trims the environment: set XDG_RUNTIME_DIR); \`tg ${asFirstWord(profile)}doctor\` shows it. Log in again only if they were removed` : `no Telegram app credentials for profile "${profile}" \u2014 run ${setup} in a local terminal first, or sign in from ${desktop}; agents: read \`tg skill show\``);
|
|
179
179
|
}
|
|
180
180
|
const options = { credentials: resolved, sessionPath, ...connecting };
|
|
181
|
-
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-
|
|
181
|
+
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-PN5AXCJ7.js")).TelegramAdapter.open({
|
|
182
182
|
...options,
|
|
183
183
|
...proxyOption(proxy()),
|
|
184
184
|
diagnostic: /* @__PURE__ */ __name((line) => base.streams.diagnostic(line), "diagnostic"),
|
|
@@ -213,6 +213,7 @@ var TELEGRAM = {
|
|
|
213
213
|
personalBots: true,
|
|
214
214
|
pollQuiz: true,
|
|
215
215
|
pollVoters: true,
|
|
216
|
+
reactionsList: true,
|
|
216
217
|
topicShow: true,
|
|
217
218
|
forwardTopic: true,
|
|
218
219
|
// mtcute's InputMedia.poll documents 5–600 seconds.
|
|
@@ -863,7 +864,7 @@ var TELEGRAM_BOT = {
|
|
|
863
864
|
const botId = token.split(":", 1)[0] ?? "";
|
|
864
865
|
if (!/^\d+$/.test(botId))
|
|
865
866
|
throw new CliError("authentication_error", "the bot token has no valid bot id");
|
|
866
|
-
const reader = await (environment.botHistory ?? (await import("./bot-history-
|
|
867
|
+
const reader = await (environment.botHistory ?? (await import("./bot-history-SDLHR7PV.js")).openBotHistory)({
|
|
867
868
|
credentials,
|
|
868
869
|
sessionPath: botSessionFile(profile, botId, env),
|
|
869
870
|
token,
|
|
@@ -883,7 +884,7 @@ var TELEGRAM_BOT = {
|
|
|
883
884
|
return void 0;
|
|
884
885
|
let personal;
|
|
885
886
|
try {
|
|
886
|
-
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-
|
|
887
|
+
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-PN5AXCJ7.js")).TelegramAdapter.open({
|
|
887
888
|
credentials,
|
|
888
889
|
sessionPath: personalPath,
|
|
889
890
|
checks: words,
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
ACCESS_SECONDS,
|
|
9
9
|
REFRESH_SECONDS,
|
|
10
10
|
readStored
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DFZBGU4G.js";
|
|
12
12
|
import {
|
|
13
13
|
__name
|
|
14
14
|
} from "./chunk-ZVVMGPBJ.js";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/http/oauth.js
|
|
17
17
|
import { createHash, randomBytes, randomInt, timingSafeEqual } from "node:crypto";
|
|
18
18
|
import { chmodSync, mkdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -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.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/background/processes.js
|
|
8
8
|
import { execFileSync } from "node:child_process";
|
|
9
9
|
import { readdirSync, readFileSync, readlinkSync } from "node:fs";
|
|
10
10
|
var alive = /* @__PURE__ */ __name((pid) => {
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
tool,
|
|
21
21
|
toolKey,
|
|
22
22
|
toolsFromCommands
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WXIGT6FY.js";
|
|
24
24
|
import {
|
|
25
25
|
CHART_KINDS,
|
|
26
26
|
CHART_SIZE,
|
|
@@ -34,19 +34,19 @@ import {
|
|
|
34
34
|
registerPrompts,
|
|
35
35
|
stdinFieldOf,
|
|
36
36
|
syncsFirst
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-RGNKRI5T.js";
|
|
38
38
|
import {
|
|
39
39
|
agentJson,
|
|
40
40
|
skillResource
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-44UANKAI.js";
|
|
42
42
|
import {
|
|
43
43
|
answeredWire
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-STGY3EAZ.js";
|
|
45
45
|
import {
|
|
46
46
|
StdioServerTransport,
|
|
47
47
|
callerOf,
|
|
48
48
|
serveStdio
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-DBZVF73F.js";
|
|
50
50
|
import {
|
|
51
51
|
McpServer,
|
|
52
52
|
ResourceTemplate
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
connectedFor,
|
|
56
56
|
guardFor
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-NSQL3YRD.js";
|
|
58
58
|
import {
|
|
59
59
|
capability,
|
|
60
60
|
dateWindow,
|
|
@@ -63,10 +63,10 @@ import {
|
|
|
63
63
|
servicesFor,
|
|
64
64
|
storedDeps,
|
|
65
65
|
wholeList
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-P5KMLJQR.js";
|
|
67
67
|
import {
|
|
68
68
|
findCommand
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-BMXGEQDA.js";
|
|
70
70
|
import {
|
|
71
71
|
DEFAULT_OUTPUT_BYTES,
|
|
72
72
|
changesAuthorityAt,
|
|
@@ -82,30 +82,30 @@ import {
|
|
|
82
82
|
sealed,
|
|
83
83
|
snakeKeys,
|
|
84
84
|
typedCommand
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-GGAG3G7B.js";
|
|
86
86
|
import {
|
|
87
87
|
isCliFailure,
|
|
88
88
|
withCaller
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-BYDDYOF4.js";
|
|
90
90
|
import {
|
|
91
91
|
readOnlyLockOf
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-3UEFJ75D.js";
|
|
93
93
|
import {
|
|
94
94
|
mcpHttpMarker
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-DFZBGU4G.js";
|
|
96
96
|
import {
|
|
97
97
|
instructions
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-A4DS5ANQ.js";
|
|
99
99
|
import {
|
|
100
100
|
warmEmbedders
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-X7M7YZPF.js";
|
|
102
102
|
import {
|
|
103
103
|
openStore,
|
|
104
104
|
pdfPreviewLimits
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-TKCZYJAT.js";
|
|
106
106
|
import {
|
|
107
107
|
timezoneOf
|
|
108
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-P4A27ETD.js";
|
|
109
109
|
import {
|
|
110
110
|
mcpErrorResult,
|
|
111
111
|
visibleControls
|
|
@@ -130,10 +130,10 @@ import {
|
|
|
130
130
|
__name
|
|
131
131
|
} from "./chunk-ZVVMGPBJ.js";
|
|
132
132
|
|
|
133
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
133
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
134
134
|
import { randomUUID } from "node:crypto";
|
|
135
135
|
|
|
136
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
136
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
137
137
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
138
138
|
let held;
|
|
139
139
|
return {
|
|
@@ -152,7 +152,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
152
152
|
};
|
|
153
153
|
}, "agentLog");
|
|
154
154
|
|
|
155
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
155
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
156
156
|
var LISTED = 100;
|
|
157
157
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
158
158
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -190,7 +190,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
190
190
|
});
|
|
191
191
|
}, "registerResources");
|
|
192
192
|
|
|
193
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
193
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
194
194
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
195
195
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
196
196
|
var MessengerSession = class {
|
|
@@ -265,7 +265,7 @@ var MessengerSession = class {
|
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
268
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
269
269
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
270
270
|
const _command = messenger.app.command;
|
|
271
271
|
return {
|
|
@@ -319,7 +319,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
319
319
|
};
|
|
320
320
|
}, "attachmentsTools");
|
|
321
321
|
|
|
322
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
322
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
323
323
|
var PHOTO_LIMIT = 512 * 1024;
|
|
324
324
|
var IMAGE_TYPES = [
|
|
325
325
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -373,7 +373,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
373
373
|
return new Uint8Array(Buffer.concat(chunks));
|
|
374
374
|
}, "readUpTo");
|
|
375
375
|
|
|
376
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
376
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
377
377
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
378
378
|
stats_charts: tool({
|
|
379
379
|
title: "A chart from a chat's statistics",
|
|
@@ -410,14 +410,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
410
410
|
})
|
|
411
411
|
}), "statsTools");
|
|
412
412
|
|
|
413
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
413
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
414
414
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
415
415
|
...messagesPhotoTools(messenger),
|
|
416
416
|
...attachmentsTools(messenger),
|
|
417
417
|
...statsTools(messenger)
|
|
418
418
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
419
419
|
|
|
420
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
420
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
421
421
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
422
422
|
"streams",
|
|
423
423
|
"stdin",
|
|
@@ -741,7 +741,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
741
741
|
}, "serveOverStdio");
|
|
742
742
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
743
743
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
744
|
-
const { serveOverHttp } = await import("./serve-
|
|
744
|
+
const { serveOverHttp } = await import("./serve-3I4C6Y5X.js");
|
|
745
745
|
const appName = messenger.app.command;
|
|
746
746
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
747
747
|
const listening = await serveOverHttp(build, {
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
refuseLacking,
|
|
11
11
|
servicesFor,
|
|
12
12
|
throughWrapper
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-P5KMLJQR.js";
|
|
14
14
|
import {
|
|
15
15
|
CEILING_KEY,
|
|
16
16
|
LOG_ATTRIBUTES,
|
|
@@ -34,21 +34,21 @@ import {
|
|
|
34
34
|
rememberAccount,
|
|
35
35
|
rootOf2 as rootOf,
|
|
36
36
|
skipFlagFor
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GGAG3G7B.js";
|
|
38
38
|
import {
|
|
39
39
|
isCliFailure,
|
|
40
40
|
providerErrorKey
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-BYDDYOF4.js";
|
|
42
42
|
import {
|
|
43
43
|
MESSENGER_CHANGE_REFUSAL,
|
|
44
44
|
readOnlyRefusal
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-3UEFJ75D.js";
|
|
46
46
|
import {
|
|
47
47
|
servingProfiles
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-JAWXJILO.js";
|
|
49
49
|
import {
|
|
50
50
|
openStore
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-TKCZYJAT.js";
|
|
52
52
|
import {
|
|
53
53
|
logRecordOf,
|
|
54
54
|
realSleep,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
__name
|
|
63
63
|
} from "./chunk-ZVVMGPBJ.js";
|
|
64
64
|
|
|
65
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
65
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
66
66
|
import { openSync } from "node:fs";
|
|
67
67
|
import { createInterface } from "node:readline";
|
|
68
68
|
import { ReadStream } from "node:tty";
|
|
@@ -117,10 +117,10 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
117
117
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
118
118
|
}, "terminalAsker");
|
|
119
119
|
|
|
120
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
120
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
121
121
|
import { randomUUID } from "node:crypto";
|
|
122
122
|
|
|
123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
123
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/flood.js
|
|
124
124
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
125
125
|
import { dirname, join } from "node:path";
|
|
126
126
|
var MOST_DEADLINES = 50;
|
|
@@ -204,11 +204,11 @@ var FloodMemory = class {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
207
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
208
208
|
import { appendFileSync, mkdirSync as mkdirSync3, readFileSync as readFileSync2 } from "node:fs";
|
|
209
209
|
import { dirname as dirname3, join as join2 } from "node:path";
|
|
210
210
|
|
|
211
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
211
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/file-lock.js
|
|
212
212
|
import { closeSync, mkdirSync as mkdirSync2, openSync as openSync2, statSync, unlinkSync } from "node:fs";
|
|
213
213
|
import { dirname as dirname2 } from "node:path";
|
|
214
214
|
var LOCK_WAIT_MS = 5e3;
|
|
@@ -275,7 +275,7 @@ var lockTime = /* @__PURE__ */ __name((lock) => {
|
|
|
275
275
|
}
|
|
276
276
|
}, "lockTime");
|
|
277
277
|
|
|
278
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
278
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/journal.js
|
|
279
279
|
var sendsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join2(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "sends", `${profile}.jsonl`), "sendsPathFor");
|
|
280
280
|
var SendJournal = class {
|
|
281
281
|
static {
|
|
@@ -352,7 +352,7 @@ var withSendId = /* @__PURE__ */ __name((entry) => {
|
|
|
352
352
|
return cid === void 0 || rest.sendId !== void 0 ? rest : { ...rest, sendId: String(cid) };
|
|
353
353
|
}, "withSendId");
|
|
354
354
|
|
|
355
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
355
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/recipients.js
|
|
356
356
|
import { existsSync, readFileSync as readFileSync3, rmSync } from "node:fs";
|
|
357
357
|
import { join as join3 } from "node:path";
|
|
358
358
|
var recipientsPathFor = /* @__PURE__ */ __name((app, profile, env = process.env) => join3(resolvePaths({ appName: app.appName, prefix: app.envPrefix, env }).state, "profiles", `${profile}.recipients.json`), "recipientsPathFor");
|
|
@@ -464,7 +464,7 @@ var RecipientList = class {
|
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
|
|
467
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
467
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/guard.js
|
|
468
468
|
var HOUR_MS = 60 * 60 * 1e3;
|
|
469
469
|
var READS_UNDER_HOLD = /* @__PURE__ */ new Set([
|
|
470
470
|
"attachments.extract",
|
|
@@ -657,7 +657,7 @@ var guardFor = /* @__PURE__ */ __name((app, settings, warn, env = process.env, a
|
|
|
657
657
|
}), "guardFor");
|
|
658
658
|
var journalFailure = /* @__PURE__ */ __name((error) => error?.code ?? (error instanceof Error ? error.name : "error"), "journalFailure");
|
|
659
659
|
|
|
660
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
660
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/sends/pace.js
|
|
661
661
|
import { readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
662
662
|
import { join as join4 } from "node:path";
|
|
663
663
|
var DEFAULT_PACE = { perMinute: 60, burst: 20 };
|
|
@@ -716,7 +716,7 @@ var Pacer = class {
|
|
|
716
716
|
}
|
|
717
717
|
};
|
|
718
718
|
|
|
719
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
719
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
720
720
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
721
721
|
const words = [];
|
|
722
722
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -776,7 +776,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
776
776
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
777
777
|
}, "refuseUnknownPermissionKeys");
|
|
778
778
|
|
|
779
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
779
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
780
780
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
781
781
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
782
782
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -895,7 +895,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
895
895
|
});
|
|
896
896
|
}, "flooded");
|
|
897
897
|
|
|
898
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
898
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
899
899
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
900
900
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
901
901
|
const write = currentOperation();
|
|
@@ -994,7 +994,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
994
994
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
995
995
|
}, "byPart");
|
|
996
996
|
|
|
997
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
997
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
998
998
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
999
999
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false }) => {
|
|
1000
1000
|
let warned = false;
|
|
@@ -1486,7 +1486,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
1486
1486
|
}
|
|
1487
1487
|
}, "keep");
|
|
1488
1488
|
|
|
1489
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
1489
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.484.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.65.0_commander@15._745f5d1ffb248c61bc3ef77928e0c2a2/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
1490
1490
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
1491
1491
|
let opened;
|
|
1492
1492
|
return {
|
|
@@ -1549,7 +1549,11 @@ var storedMessages = /* @__PURE__ */ __name((provider, store, account) => {
|
|
|
1549
1549
|
pollVotes: /* @__PURE__ */ __name(async (chatId, messageId) => {
|
|
1550
1550
|
const owner = key();
|
|
1551
1551
|
return owner ? (await store()).messages.pollVotes(owner, chatId, messageId) : [];
|
|
1552
|
-
}, "pollVotes")
|
|
1552
|
+
}, "pollVotes"),
|
|
1553
|
+
reactors: /* @__PURE__ */ __name(async (chatId, messageId) => {
|
|
1554
|
+
const owner = key();
|
|
1555
|
+
return owner ? (await store()).messages.reactors(owner, chatId, messageId) : [];
|
|
1556
|
+
}, "reactors")
|
|
1553
1557
|
};
|
|
1554
1558
|
}, "storedMessages");
|
|
1555
1559
|
var connectFor = /* @__PURE__ */ __name((command, messenger, base, options = {}) => {
|