@wirecat/tg-cli 0.133.0 → 0.135.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/README.md +2 -3
- package/contracts/wirecat.json +82 -2
- package/dist/bin/tg.js +2 -2
- package/dist/bot/generated/types.d.ts +188 -0
- package/dist/bot/generated/types.d.ts.map +1 -1
- package/dist/bundle/{adapter-GSGX3WBH.js → adapter-OHJF6PB5.js} +104 -69
- package/dist/bundle/agent-QPF2KU4I.js +37 -0
- package/dist/bundle/{all-profiles-VOCJ55YH.js → all-profiles-LQ73BIFB.js} +62 -20
- package/dist/bundle/{anthropic-J6CTLU3W.js → anthropic-YYBMT2HD.js} +5 -5
- package/dist/bundle/{app-server-GVFGA4TJ.js → app-server-HV4C4CSA.js} +72 -62
- package/dist/bundle/{bot-api-LWONPIGK.js → bot-api-URQXWMVR.js} +73 -92
- package/dist/bundle/{bot-history-XOW7Y2GC.js → bot-history-FRLCHPDQ.js} +23 -22
- package/dist/bundle/{bun-436CH6CP.js → bun-J3ML43BO.js} +2 -2
- package/dist/bundle/{bun-sqlite-ZLB5RK5Q.js → bun-sqlite-ZNB2B2DL.js} +6 -6
- package/dist/bundle/{chunk-UGS57TT5.js → chunk-24G3SEXH.js} +2 -2
- package/dist/bundle/chunk-27F6QBPY.js +555 -0
- package/dist/bundle/{chunk-6VCSOQFL.js → chunk-2OFCIF2W.js} +2 -2
- package/dist/bundle/{chunk-VGN5YXYI.js → chunk-2U7XA4IH.js} +2 -100
- package/dist/bundle/{chunk-LBZEZO32.js → chunk-4CLSIEWN.js} +65 -43
- package/dist/bundle/chunk-5CEKH6R6.js +340 -0
- package/dist/bundle/{chunk-SMI2EUH4.js → chunk-5WEEK65F.js} +1 -1
- package/dist/bundle/{chunk-OX73ERZW.js → chunk-6VWVYPH2.js} +3 -4
- package/dist/bundle/{chunk-5HKPQPD4.js → chunk-6WS474NQ.js} +6 -6
- package/dist/bundle/{chunk-IYAXLLGR.js → chunk-7GWOGEWJ.js} +6 -6
- package/dist/bundle/{chunk-TPD37ECC.js → chunk-AMRMU23L.js} +16 -3
- package/dist/bundle/{chunk-ZHO3TPHM.js → chunk-B2UXNYCD.js} +30 -15
- package/dist/bundle/{chunk-YY6FGKGD.js → chunk-B4ZMFU5I.js} +2 -2
- package/dist/bundle/{chunk-54WLIPIQ.js → chunk-BFKPMG5T.js} +1 -1
- package/dist/bundle/{chunk-KHUXDSXN.js → chunk-BQSODAU3.js} +1 -1
- package/dist/bundle/{chunk-N3JUHGKM.js → chunk-BXUMZWMN.js} +3786 -3364
- package/dist/bundle/{chunk-VTQMR3XG.js → chunk-E2VIO7RY.js} +3 -3
- package/dist/bundle/{chunk-UZ63ORMY.js → chunk-F5FOS64B.js} +4 -4
- package/dist/bundle/{chunk-LIQMUDIZ.js → chunk-GCUFGDKE.js} +2 -2
- package/dist/bundle/chunk-GUERS64O.js +108 -0
- package/dist/bundle/{chunk-5LRTYBZW.js → chunk-HILS2UL7.js} +12 -12
- package/dist/bundle/{chunk-6S77EKZU.js → chunk-IOJOLV25.js} +17 -15
- package/dist/bundle/{chunk-IBCXEVNY.js → chunk-JBS4VPAX.js} +3 -3
- package/dist/bundle/{chunk-5L44DSHV.js → chunk-K5QGBYDL.js} +4 -4
- package/dist/bundle/{chunk-NO2LIHWA.js → chunk-KKXF6TSS.js} +1 -1
- package/dist/bundle/chunk-L2ZQDTDU.js +7 -0
- package/dist/bundle/{chunk-HB5DP6L5.js → chunk-LFPUW7DR.js} +18 -18
- package/dist/bundle/{chunk-QWO7L4UH.js → chunk-LGYATGQI.js} +7 -7
- package/dist/bundle/{chunk-IH4Z3KZU.js → chunk-MA27675E.js} +2 -2
- package/dist/bundle/{chunk-6H2NW6HK.js → chunk-MDI7554C.js} +3 -3
- package/dist/bundle/{chunk-KVFUH5IT.js → chunk-MMZ4QAKJ.js} +1 -1
- package/dist/bundle/{chunk-XOX4BX5A.js → chunk-MOPBEBVS.js} +4 -4
- package/dist/bundle/{chunk-XKOMP3HV.js → chunk-MPRXUTIK.js} +6 -6
- package/dist/bundle/{chunk-QYLZD4DS.js → chunk-N7F5KT6U.js} +1 -1
- package/dist/bundle/{chunk-KUA24HWG.js → chunk-NBP6LXSY.js} +2 -2
- package/dist/bundle/{chunk-UQYL6TJ7.js → chunk-NP46ZKQW.js} +4 -4
- package/dist/bundle/{chunk-QGWISM4W.js → chunk-NRSJXUUO.js} +34 -28
- package/dist/bundle/{chunk-7NYP4RBO.js → chunk-NVWZ7S3I.js} +2294 -1221
- package/dist/bundle/chunk-OBIMTRA7.js +80 -0
- package/dist/bundle/{chunk-VWJTYAIQ.js → chunk-OQJURSRL.js} +17 -17
- package/dist/bundle/chunk-OU3WN4YH.js +50 -0
- package/dist/bundle/{chunk-VCAOH45X.js → chunk-PBK2ECXT.js} +1 -1
- package/dist/bundle/{chunk-TTDZVWDU.js → chunk-PHAFT2BO.js} +1 -1
- package/dist/bundle/{chunk-NTWXL2QV.js → chunk-PKIGE4NE.js} +2 -2
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-NAXOT35J.js → chunk-QBRQLOZA.js} +3 -3
- package/dist/bundle/{chunk-RABUG4KA.js → chunk-QD4MTOI7.js} +511 -472
- package/dist/bundle/{chunk-LOS4D6ZB.js → chunk-QHQ52UMF.js} +159 -569
- package/dist/bundle/{chunk-6CHIGUCY.js → chunk-R2G3MWEF.js} +31 -20
- package/dist/bundle/{chunk-THYGLTRB.js → chunk-RCEP5OXD.js} +7 -7
- package/dist/bundle/chunk-RHJ2VGHV.js +353 -0
- package/dist/bundle/{chunk-QVGEL66U.js → chunk-RXBKVNOK.js} +53 -11
- package/dist/bundle/{chunk-ZYAHZKYF.js → chunk-RZ7POTFA.js} +3 -3
- package/dist/bundle/{chunk-KEN4B57V.js → chunk-S7PIM4GG.js} +2 -2
- package/dist/bundle/{chunk-BXVB42KJ.js → chunk-SIDGH56R.js} +2 -2
- package/dist/bundle/{chunk-XDQU5HBO.js → chunk-SRMELB6Q.js} +12 -12
- package/dist/bundle/{chunk-SMU6NA7F.js → chunk-SVPNU7PD.js} +4 -4
- package/dist/bundle/{chunk-JPNVEPS4.js → chunk-TB2MG6PE.js} +2351 -2028
- package/dist/bundle/{chunk-JGMXBAGH.js → chunk-UN5TH2CG.js} +156 -434
- package/dist/bundle/{chunk-YAPDU3SV.js → chunk-V3ZWYMXT.js} +1 -1
- package/dist/bundle/{chunk-7NF3V5L2.js → chunk-VFU25P57.js} +4 -4
- package/dist/bundle/{chunk-LQQSDGQ6.js → chunk-VJEMCJPL.js} +56 -46
- package/dist/bundle/{chunk-UIAKLELF.js → chunk-VK2NDTBS.js} +94 -64
- package/dist/bundle/{chunk-UKBK2VWZ.js → chunk-W6A2OZ3C.js} +232 -176
- package/dist/bundle/{chunk-IPPCQ7IK.js → chunk-WDI6LA4X.js} +2 -2
- package/dist/bundle/{chunk-N7QREPZW.js → chunk-WTGRQGQL.js} +16 -9
- package/dist/bundle/{chunk-57KJ3TRS.js → chunk-WUCTF2XE.js} +9 -9
- package/dist/bundle/{chunk-JKSD43L7.js → chunk-WZCRCCOZ.js} +6 -6
- package/dist/bundle/{chunk-H7ML7X3G.js → chunk-XB6O445X.js} +144 -10
- package/dist/bundle/{chunk-O6JUVATT.js → chunk-XKFES4EM.js} +35 -12
- package/dist/bundle/chunk-YBUX6EAK.js +388 -0
- package/dist/bundle/{chunk-WCYKVX3B.js → chunk-YMRL7MYS.js} +7 -7
- package/dist/bundle/{chunk-M6QOM6SL.js → chunk-Z6M6NZUX.js} +1 -1
- package/dist/bundle/chunk-ZCDRXKCR.js +727 -0
- package/dist/bundle/{chunk-6A44ZZFC.js → chunk-ZJ3S4S6H.js} +43 -64
- package/dist/bundle/{chunk-TCI7I6YF.js → chunk-ZL7TJXFL.js} +11 -25
- package/dist/bundle/{chunk-2KQDJHF3.js → chunk-ZMBVZWUW.js} +29 -1
- package/dist/bundle/{chunk-OWY52JBO.js → chunk-ZMTASSIB.js} +7 -7
- package/dist/bundle/{chunk-D2SJLZSH.js → chunk-ZQ5ERQHO.js} +2 -2
- package/dist/bundle/{chunk-CEJYNB3I.js → chunk-ZWVDXVG3.js} +4 -4
- package/dist/bundle/command-contract-K4MU32K6.js +37 -0
- package/dist/bundle/{command-server-entry-AE27QXTE.js → command-server-entry-XP6BVJIK.js} +27 -27
- package/dist/bundle/{decode-RQPPZ72F.js → decode-TUB45ALX.js} +5 -5
- package/dist/bundle/{dispatch-KQO2MCSH.js → dispatch-ICPUKMEG.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-FZRIACN4.js → echarts-HJ7D7XTM.js} +2 -2
- package/dist/bundle/{embed-TOSWWMDL.js → embed-4QDN36YF.js} +6 -6
- package/dist/bundle/{embedder-JHIQSBGD.js → embedder-Q7ID2LEG.js} +9 -9
- package/dist/bundle/{entry-DU4KRXTG.js → entry-Z6VRZP7F.js} +9 -9
- package/dist/bundle/{failure-3YC3YGYO.js → failure-PEPNEEK7.js} +2 -2
- package/dist/bundle/{first-run-DQQT4FID.js → first-run-GKBEHAAX.js} +12 -12
- package/dist/bundle/first-screen-IA3ONZ75.js +37 -0
- package/dist/bundle/{instructions-WI64CJQ6.js → instructions-26ZXYYMY.js} +1 -1
- package/dist/bundle/{mcp-VMS6PBCU.js → mcp-KGWT6TGO.js} +2 -2
- package/dist/bundle/meeting-combined-KUV2HP52.js +23 -0
- package/dist/bundle/{meeting-model-XNRSREIK.js → meeting-model-JB7X4CA3.js} +11 -11
- package/dist/bundle/{meeting-semantic-OOSCHQMB.js → meeting-semantic-MQNUVG33.js} +6 -6
- package/dist/bundle/{node-JLKDNVKV.js → node-RIANITAT.js} +2 -2
- package/dist/bundle/{node-sqlite-YOGH26O2.js → node-sqlite-I2P26Z3S.js} +7 -7
- package/dist/bundle/{oauth-FOMXM5HP.js → oauth-GFMJL2ZZ.js} +8 -8
- package/dist/bundle/{open-SM2UXUKM.js → open-CWVYEFNN.js} +5 -5
- package/dist/bundle/{openai-J2H7S6ZF.js → openai-PQLK7YTJ.js} +15 -15
- package/dist/bundle/{process-HI7OZBOI.js → process-P4D4KFWE.js} +1 -1
- package/dist/bundle/{program-VY4HFU25.js → program-MF4QZJKH.js} +70 -64
- package/dist/bundle/{prompt-NUUVFMOF.js → prompt-JWIOYU53.js} +5 -5
- package/dist/bundle/{proxy-transport-AN4VMRRN.js → proxy-transport-DWY6ABVT.js} +5 -5
- package/dist/bundle/{recognize-MALJHPDI.js → recognize-IPJL4CQZ.js} +4 -4
- package/dist/bundle/{remote-QUDRSTS2.js → remote-DVY6F6YO.js} +9 -9
- package/dist/bundle/{rerank-2DSO3D3S.js → rerank-XSPWLBIO.js} +7 -7
- package/dist/bundle/{serve-NCJ52MY3.js → serve-AJAVEH2M.js} +15 -15
- package/dist/bundle/server-GGXUR5BZ.js +78 -0
- package/dist/bundle/{server-Y3M544AM.js → server-GII7NIKF.js} +65 -54
- package/dist/bundle/{sqlite-runtime-NJUSXVKK.js → sqlite-runtime-KFDYJTUO.js} +6 -6
- package/dist/bundle/{state-AVOWQVET.js → state-76OJSCQC.js} +6 -6
- package/dist/bundle/{store-MMIYOL4H.js → store-2KJS4YMH.js} +28 -17
- package/dist/bundle/{store-BZ5ICDRP.js → store-FBP2J23G.js} +20 -19
- package/dist/bundle/store-maintenance-command-NUWOUZ62.js +65 -0
- package/dist/bundle/surface-EGSHCISG.js +64 -0
- package/dist/bundle/tg.js +13 -13
- package/dist/telegram/adapter.d.ts +9 -2
- package/dist/telegram/adapter.d.ts.map +1 -1
- package/dist/telegram/adapter.js +5 -6
- package/dist/telegram/adapter.js.map +1 -1
- package/dist/telegram/messages.d.ts +12 -0
- package/dist/telegram/messages.d.ts.map +1 -1
- package/dist/telegram/messages.js +40 -0
- package/dist/telegram/messages.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/tg-cli/SKILL.md +7 -4
- package/skills/tg-cli/references/messages.md +5 -1
- package/skills/tg-cli/references/search.md +2 -0
- package/dist/bundle/chunk-SHTHNBHG.js +0 -2
- package/dist/bundle/command-contract-TQIARAB4.js +0 -37
- package/dist/bundle/first-screen-7N4CTZSA.js +0 -37
- package/dist/bundle/meeting-combined-3RAOFQ7M.js +0 -23
- package/dist/bundle/server-CHGON5I2.js +0 -70
- package/dist/bundle/store-maintenance-command-VKZ4WHUB.js +0 -61
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
formatMeetingReference
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QD4MTOI7.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GCUFGDKE.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/services/meeting-semantic.js
|
|
14
14
|
var positive = /* @__PURE__ */ __name((value, name, max) => {
|
|
15
15
|
if (!Number.isSafeInteger(value) || value < 1 || value > max)
|
|
16
16
|
throw new CliError("validation_error", `Invalid ${name}`);
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
readLock,
|
|
6
6
|
releaseLock,
|
|
7
7
|
takeLock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AMRMU23L.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
14
14
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
15
15
|
|
|
16
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
16
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/mcp/http/activity.js
|
|
17
17
|
import { randomBytes } from "node:crypto";
|
|
18
18
|
import { chmodSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
19
19
|
import { dirname } from "node:path";
|
|
@@ -86,7 +86,7 @@ var activityRecorder = /* @__PURE__ */ __name((path, now = Date.now) => {
|
|
|
86
86
|
};
|
|
87
87
|
}, "activityRecorder");
|
|
88
88
|
|
|
89
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
89
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/mcp/http/state.js
|
|
90
90
|
var ACCESS_SECONDS = 60 * 60;
|
|
91
91
|
var REFRESH_SECONDS = 30 * 24 * 60 * 60;
|
|
92
92
|
var readStored = /* @__PURE__ */ __name((path) => existsSync2(path) ? JSON.parse(readFileSync2(path, "utf8")) : { clients: [], tokens: [] }, "readStored");
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.126.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/errors.js
|
|
8
8
|
var errorCodes = [
|
|
9
9
|
"validation_error",
|
|
10
10
|
"configuration_error",
|
|
@@ -39,7 +39,7 @@ var CliError = class extends Error {
|
|
|
39
39
|
};
|
|
40
40
|
var isCliError = /* @__PURE__ */ __name((value) => typeof value === "object" && value !== null && value[BRAND] === true, "isCliError");
|
|
41
41
|
|
|
42
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
42
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.126.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/sanitize.js
|
|
43
43
|
var CONTROL = (
|
|
44
44
|
// biome-ignore lint/suspicious/noControlCharactersInRegex: matching them is the whole point
|
|
45
45
|
/[\u0000-\u0008\u000B-\u001F\u007F-\u009F\u200B\u200E\u200F\u202A-\u202E\u2066-\u2069\uFEFF\u{E0000}-\u{E007F}]/gu
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
CLIENT_INFO_META_KEY
|
|
5
|
+
} from "./chunk-PL5P7UKW.js";
|
|
6
|
+
import {
|
|
7
|
+
agentOf,
|
|
8
|
+
clientHash,
|
|
9
|
+
currentCaller
|
|
10
|
+
} from "./chunk-LGYATGQI.js";
|
|
11
|
+
import {
|
|
12
|
+
__name
|
|
13
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
14
|
+
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/mcp/caller.js
|
|
16
|
+
var callingAgent = /* @__PURE__ */ __name((fallback, caller = currentCaller()) => {
|
|
17
|
+
const client = caller?.agent?.client?.name;
|
|
18
|
+
if (client && client !== "unknown")
|
|
19
|
+
return client;
|
|
20
|
+
const kind = caller?.agent?.kind;
|
|
21
|
+
return kind && kind !== "mcp-client" ? kind : fallback;
|
|
22
|
+
}, "callingAgent");
|
|
23
|
+
var CALLER_META_KEY = "wirecat.dev/caller";
|
|
24
|
+
var PROXY_CLIENT_NAME = "all-profiles";
|
|
25
|
+
var NAME = /^[\w .@()/+-]{1,64}$/;
|
|
26
|
+
var plain = /* @__PURE__ */ __name((value) => typeof value === "string" && NAME.test(value.trim()) ? value.trim() : void 0, "plain");
|
|
27
|
+
var clientFrom = /* @__PURE__ */ __name((value) => {
|
|
28
|
+
if (!value || typeof value !== "object")
|
|
29
|
+
return void 0;
|
|
30
|
+
const { name, version } = value;
|
|
31
|
+
const named = plain(name);
|
|
32
|
+
if (!named)
|
|
33
|
+
return void 0;
|
|
34
|
+
const versioned = plain(version);
|
|
35
|
+
return { name: named, ...versioned ? { version: versioned } : {} };
|
|
36
|
+
}, "clientFrom");
|
|
37
|
+
var callerOf = /* @__PURE__ */ __name((ctx, tool, source) => {
|
|
38
|
+
const meta = ctx?.mcpReq?._meta;
|
|
39
|
+
const requestId = ctx?.mcpReq?.id;
|
|
40
|
+
const initialized = source.client?.();
|
|
41
|
+
const proxied = initialized?.name === PROXY_CLIENT_NAME && !ctx?.http ? passedOn(meta?.[CALLER_META_KEY], tool) : void 0;
|
|
42
|
+
if (proxied)
|
|
43
|
+
return proxied;
|
|
44
|
+
const client = clientFrom(meta?.[CLIENT_INFO_META_KEY]) ?? clientFrom(initialized);
|
|
45
|
+
const mcp = /* @__PURE__ */ __name((connection) => ({
|
|
46
|
+
tool,
|
|
47
|
+
...requestId === void 0 ? {} : { request_id: String(requestId) },
|
|
48
|
+
...connection ? { connection_id: connection } : {}
|
|
49
|
+
}), "mcp");
|
|
50
|
+
const auth = ctx?.http?.authInfo;
|
|
51
|
+
if (auth) {
|
|
52
|
+
const registered = plain(auth.extra?.clientName);
|
|
53
|
+
return {
|
|
54
|
+
via: "mcp-http",
|
|
55
|
+
agent: {
|
|
56
|
+
kind: "mcp-client",
|
|
57
|
+
session_id: ctx?.sessionId ?? null,
|
|
58
|
+
client: {
|
|
59
|
+
name: registered ?? client?.name ?? "unknown",
|
|
60
|
+
...client?.version ? { version: client.version } : {},
|
|
61
|
+
id: clientHash(auth.clientId)
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
mcp: mcp(ctx?.sessionId)
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
const agent = agentOf(source.env) ?? { kind: "mcp-client", session_id: null };
|
|
68
|
+
return { via: "mcp-stdio", agent: { ...agent, ...client ? { client } : {} }, mcp: mcp(source.connectionId) };
|
|
69
|
+
}, "callerOf");
|
|
70
|
+
var passedOn = /* @__PURE__ */ __name((value, tool) => {
|
|
71
|
+
if (!value || typeof value !== "object")
|
|
72
|
+
return void 0;
|
|
73
|
+
const { via, agent, mcp } = value;
|
|
74
|
+
if (via !== "mcp-stdio" && via !== "mcp-http")
|
|
75
|
+
return void 0;
|
|
76
|
+
const a = agent && typeof agent === "object" ? agent : void 0;
|
|
77
|
+
const kind = plain(a?.kind);
|
|
78
|
+
const session = typeof a?.session_id === "string" && /^[A-Za-z0-9._:-]{1,128}$/.test(a.session_id) ? a.session_id : null;
|
|
79
|
+
const client = clientFrom(a?.client);
|
|
80
|
+
const id = a?.client && typeof a.client === "object" ? a.client.id : void 0;
|
|
81
|
+
const m = mcp && typeof mcp === "object" ? mcp : {};
|
|
82
|
+
const request = plain(m.request_id);
|
|
83
|
+
const connection = typeof m.connection_id === "string" && /^[\w-]{1,128}$/.test(m.connection_id) ? m.connection_id : void 0;
|
|
84
|
+
return {
|
|
85
|
+
via,
|
|
86
|
+
...kind ? {
|
|
87
|
+
agent: {
|
|
88
|
+
kind,
|
|
89
|
+
session_id: session,
|
|
90
|
+
...a?.from_chat === true ? { from_chat: true } : {},
|
|
91
|
+
...client ? { client: { ...client, ...typeof id === "string" && /^[0-9a-f]{8}$/.test(id) ? { id } : {} } } : {}
|
|
92
|
+
}
|
|
93
|
+
} : {},
|
|
94
|
+
mcp: {
|
|
95
|
+
tool,
|
|
96
|
+
...request ? { request_id: request } : {},
|
|
97
|
+
...connection ? { connection_id: connection } : {},
|
|
98
|
+
proxied: true
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
}, "passedOn");
|
|
102
|
+
|
|
103
|
+
export {
|
|
104
|
+
callingAgent,
|
|
105
|
+
CALLER_META_KEY,
|
|
106
|
+
PROXY_CLIENT_NAME,
|
|
107
|
+
callerOf
|
|
108
|
+
};
|
|
@@ -2,31 +2,31 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
updateCommand
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZWVDXVG3.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_STEMMERS,
|
|
8
8
|
LANGUAGES
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XKFES4EM.js";
|
|
10
10
|
import {
|
|
11
11
|
installerOf
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-V3ZWYMXT.js";
|
|
13
13
|
import {
|
|
14
14
|
QUESTIONS,
|
|
15
15
|
readSetupAnswers,
|
|
16
16
|
unanswered,
|
|
17
17
|
writeSetupAnswers
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-QBRQLOZA.js";
|
|
19
19
|
import {
|
|
20
20
|
sharedConfigPath
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YMRL7MYS.js";
|
|
22
22
|
import {
|
|
23
23
|
storePath
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2OFCIF2W.js";
|
|
25
25
|
import {
|
|
26
26
|
__name
|
|
27
27
|
} from "./chunk-ZVVMGPBJ.js";
|
|
28
28
|
|
|
29
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
29
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/first-run.js
|
|
30
30
|
import { spawnSync } from "node:child_process";
|
|
31
31
|
import { accessSync, constants, realpathSync } from "node:fs";
|
|
32
32
|
import { delimiter, join } from "node:path";
|
|
@@ -84,7 +84,7 @@ var suggested = /* @__PURE__ */ __name((env, contentLanguages) => {
|
|
|
84
84
|
return (own.length ? own : LANGUAGES.filter(({ code }) => code === "en" || code === system)).map(({ name }) => name);
|
|
85
85
|
}, "suggested");
|
|
86
86
|
var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLanguages }) => {
|
|
87
|
-
const { openStore } = await import("./store-
|
|
87
|
+
const { openStore } = await import("./store-2KJS4YMH.js");
|
|
88
88
|
const store = await openStore({ env });
|
|
89
89
|
let rebuild = false;
|
|
90
90
|
try {
|
|
@@ -113,8 +113,8 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
113
113
|
if (!rebuild)
|
|
114
114
|
return;
|
|
115
115
|
const [{ openCache }, { buildStems }] = await Promise.all([
|
|
116
|
-
import("./open-
|
|
117
|
-
import("./store-maintenance-command-
|
|
116
|
+
import("./open-CWVYEFNN.js"),
|
|
117
|
+
import("./store-maintenance-command-NUWOUZ62.js")
|
|
118
118
|
]);
|
|
119
119
|
const database = await openCache(storePath(env));
|
|
120
120
|
try {
|
|
@@ -126,7 +126,7 @@ var askLanguages = /* @__PURE__ */ __name(async ({ command, env, io, contentLang
|
|
|
126
126
|
var askTools = /* @__PURE__ */ __name(async (run) => {
|
|
127
127
|
const { command, env, io } = run;
|
|
128
128
|
const installed = run.installed ?? ((name) => onPath(name, env));
|
|
129
|
-
const { WIRECAT_TOOLS } = await import("./first-screen-
|
|
129
|
+
const { WIRECAT_TOOLS } = await import("./first-screen-IA3ONZ75.js");
|
|
130
130
|
const others = WIRECAT_TOOLS.filter((tool) => tool.command !== command);
|
|
131
131
|
const missing = others.filter((tool) => !installed(tool.command));
|
|
132
132
|
io.say("Other WireCat tools \u2014 they share this store, so one search finds everything:");
|
|
@@ -200,7 +200,7 @@ var setupAtStart = /* @__PURE__ */ __name(async (start) => {
|
|
|
200
200
|
// `setup describe` and `setup apply` are a program's; only the bare walk-through asks everything again.
|
|
201
201
|
all: start.path.length === 1 && start.path[0] === "setup",
|
|
202
202
|
io: {
|
|
203
|
-
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-
|
|
203
|
+
ask: /* @__PURE__ */ __name(async (prompt) => (await import("./prompt-JWIOYU53.js")).readSecret(prompt, { input, echo: true }), "ask"),
|
|
204
204
|
say: /* @__PURE__ */ __name((text) => process.stderr.write(`${text}
|
|
205
205
|
`), "say")
|
|
206
206
|
}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
OFFLINE,
|
|
7
7
|
Pacer,
|
|
8
8
|
RecipientList,
|
|
9
|
-
capability,
|
|
10
9
|
ceilingRefusal,
|
|
11
10
|
chatIdIn,
|
|
12
11
|
floodPathFor,
|
|
@@ -17,12 +16,15 @@ import {
|
|
|
17
16
|
recipientsPathFor,
|
|
18
17
|
refuseLacking,
|
|
19
18
|
servicesFor,
|
|
20
|
-
throughWrapper,
|
|
21
19
|
waitForTurn
|
|
22
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BXUMZWMN.js";
|
|
23
21
|
import {
|
|
24
22
|
servingProfiles
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-AMRMU23L.js";
|
|
24
|
+
import {
|
|
25
|
+
capability,
|
|
26
|
+
throughWrapper
|
|
27
|
+
} from "./chunk-ZCDRXKCR.js";
|
|
26
28
|
import {
|
|
27
29
|
chatReferenceOf,
|
|
28
30
|
ensureAccount,
|
|
@@ -30,7 +32,7 @@ import {
|
|
|
30
32
|
isId,
|
|
31
33
|
openStore,
|
|
32
34
|
pickPerson
|
|
33
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-NVWZ7S3I.js";
|
|
34
36
|
import {
|
|
35
37
|
CEILING_KEY,
|
|
36
38
|
WRITE_KEYS,
|
|
@@ -51,21 +53,21 @@ import {
|
|
|
51
53
|
rememberAccount,
|
|
52
54
|
rootOf2 as rootOf,
|
|
53
55
|
skipFlagFor
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-W6A2OZ3C.js";
|
|
55
57
|
import {
|
|
56
58
|
providerErrorKey
|
|
57
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-LGYATGQI.js";
|
|
58
60
|
import {
|
|
59
61
|
isCliFailure
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-RZ7POTFA.js";
|
|
61
63
|
import {
|
|
62
64
|
CliError
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-GCUFGDKE.js";
|
|
64
66
|
import {
|
|
65
67
|
__name
|
|
66
68
|
} from "./chunk-ZVVMGPBJ.js";
|
|
67
69
|
|
|
68
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
70
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/ask.js
|
|
69
71
|
import { openSync } from "node:fs";
|
|
70
72
|
import { createInterface } from "node:readline";
|
|
71
73
|
import { ReadStream } from "node:tty";
|
|
@@ -120,7 +122,7 @@ var terminalAsker = /* @__PURE__ */ __name((command) => async (key, request) =>
|
|
|
120
122
|
throw new CliError("cancelled", `${key}: not done \u2014 the answer was no`);
|
|
121
123
|
}, "terminalAsker");
|
|
122
124
|
|
|
123
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
125
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/permission-keys.js
|
|
124
126
|
var pathOf = /* @__PURE__ */ __name((command) => {
|
|
125
127
|
const words = [];
|
|
126
128
|
for (let at = command; at?.parent; at = at.parent)
|
|
@@ -180,7 +182,7 @@ var refuseUnknownPermissionKeys = /* @__PURE__ */ __name((command, settings, too
|
|
|
180
182
|
throw new CliError("validation_error", `--permission ${key} names no command`, { permission: key });
|
|
181
183
|
}, "refuseUnknownPermissionKeys");
|
|
182
184
|
|
|
183
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
185
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/flooded.js
|
|
184
186
|
var LONG_LIVED = /* @__PURE__ */ new Set(["self", "newSendId", "close", "formatMarkdown", "formatHtml", "storedChats"]);
|
|
185
187
|
var LISTENING = /* @__PURE__ */ new Set(["watch", "feed", "listen", "listenHistory"]);
|
|
186
188
|
var BLOCKING = /* @__PURE__ */ new Set(["frozen", "limited", "banned"]);
|
|
@@ -277,7 +279,7 @@ var flooded = /* @__PURE__ */ __name((messenger, memory, { name, warn, pacer })
|
|
|
277
279
|
});
|
|
278
280
|
}, "flooded");
|
|
279
281
|
|
|
280
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
282
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/observed.js
|
|
281
283
|
var observed = /* @__PURE__ */ __name((messenger, events) => {
|
|
282
284
|
const timed = /* @__PURE__ */ __name(async (operation, named, work, after) => {
|
|
283
285
|
const write = currentOperation();
|
|
@@ -376,7 +378,7 @@ var byPart = /* @__PURE__ */ __name((batch, counts) => {
|
|
|
376
378
|
counts[part] = (counts[part] ?? 0) + items.length;
|
|
377
379
|
}, "byPart");
|
|
378
380
|
|
|
379
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
381
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/stored.js
|
|
380
382
|
var REKEY_PACING = { lockMs: 50, pauseMs: 25 };
|
|
381
383
|
var stored = /* @__PURE__ */ __name((messenger, { account, store, warn, events, pending, announcing, deletedWithoutChat, profile, rekeyed, rekeyPacing = REKEY_PACING, closing, namesFromStore, recipientIds, countsUnread = false, historyLimits, command = "cli" }) => {
|
|
382
384
|
let warned = false;
|
|
@@ -952,7 +954,7 @@ var keep = /* @__PURE__ */ __name(async (store, account, event, seenAt, among, c
|
|
|
952
954
|
}
|
|
953
955
|
}, "keep");
|
|
954
956
|
|
|
955
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
957
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/cli/messenger/context.js
|
|
956
958
|
var lazyStore = /* @__PURE__ */ __name((env, command, version) => {
|
|
957
959
|
let opened;
|
|
958
960
|
return {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4CLSIEWN.js";
|
|
9
9
|
import {
|
|
10
10
|
array,
|
|
11
11
|
nullable,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
strictObject,
|
|
17
17
|
string,
|
|
18
18
|
unknown
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-RXBKVNOK.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
22
22
|
var link = {
|
|
23
23
|
target_text: nullable(text),
|
|
24
24
|
kind: text,
|
|
@@ -2,15 +2,15 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
wirecatDirectory
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2OFCIF2W.js";
|
|
6
6
|
import {
|
|
7
7
|
CliError
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GCUFGDKE.js";
|
|
9
9
|
import {
|
|
10
10
|
__name
|
|
11
11
|
} from "./chunk-ZVVMGPBJ.js";
|
|
12
12
|
|
|
13
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
13
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/speech/models.js
|
|
14
14
|
var huggingFace = /* @__PURE__ */ __name((repository, commit) => (name) => `https://huggingface.co/csukuangfj/${repository}/resolve/${commit}/${name}`, "huggingFace");
|
|
15
15
|
var gigaam = huggingFace("sherpa-onnx-nemo-transducer-punct-giga-am-v3-russian-2025-12-16", "a6039be7cee829a9044a69ac0ebaf1c191217c97");
|
|
16
16
|
var gigaamCtc = huggingFace("sherpa-onnx-nemo-ctc-punct-giga-am-v3-russian-2025-12-16", "4fb5407ff028a69fec516cdf4c10fac9ddea7c16");
|
|
@@ -137,7 +137,7 @@ var speechModel = /* @__PURE__ */ __name((id) => {
|
|
|
137
137
|
return model;
|
|
138
138
|
}, "speechModel");
|
|
139
139
|
|
|
140
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
140
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/speech/install.js
|
|
141
141
|
import { createHash, randomUUID } from "node:crypto";
|
|
142
142
|
import { createReadStream, createWriteStream, mkdirSync, statSync } from "node:fs";
|
|
143
143
|
import { rename, rm } from "node:fs/promises";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
__name
|
|
5
5
|
} from "./chunk-ZVVMGPBJ.js";
|
|
6
6
|
|
|
7
|
-
// node_modules/.pnpm/@wirecat+cli-base@0.
|
|
7
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.126.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
8
|
import { existsSync } from "node:fs";
|
|
9
9
|
import { win32 } from "node:path";
|
|
10
10
|
var variable = /* @__PURE__ */ __name((env, name) => Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1], "variable");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
|
|
4
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.126.1_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/standards/monthly.js
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
var CI_PAGE = join(dirname(fileURLToPath(new URL("standards/monthly.js", import.meta.resolve("@wirecat/cli-base")).href)), "../../docs/standards/ci.md");
|
|
@@ -4,61 +4,61 @@ import {
|
|
|
4
4
|
ADMIN_RIGHTS,
|
|
5
5
|
BotTokenStore,
|
|
6
6
|
GROUP_SETTINGS,
|
|
7
|
-
apiJson,
|
|
8
|
-
apiPlainJson,
|
|
9
7
|
botCopy,
|
|
10
8
|
checkWords,
|
|
11
9
|
formatMarkdown,
|
|
12
|
-
parseApiJson,
|
|
13
10
|
privateFiles,
|
|
14
11
|
providerRequest,
|
|
15
12
|
withSqliteSidecars
|
|
16
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-TB2MG6PE.js";
|
|
17
14
|
import {
|
|
18
15
|
parseProxy,
|
|
19
16
|
proxyAddress,
|
|
20
17
|
proxyError,
|
|
21
18
|
proxyLabel,
|
|
22
19
|
proxySetting
|
|
23
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-NBP6LXSY.js";
|
|
24
21
|
import {
|
|
25
22
|
messengerContext
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IOJOLV25.js";
|
|
27
24
|
import {
|
|
25
|
+
apiJson,
|
|
26
|
+
apiPlainJson,
|
|
27
|
+
parseApiJson,
|
|
28
28
|
uploadBlob
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-BXUMZWMN.js";
|
|
30
30
|
import {
|
|
31
31
|
DESKTOP,
|
|
32
32
|
TG
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-WDI6LA4X.js";
|
|
34
34
|
import {
|
|
35
35
|
asFirstWord,
|
|
36
36
|
environmentOf,
|
|
37
37
|
fromFile,
|
|
38
38
|
settingsFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-W6A2OZ3C.js";
|
|
40
40
|
import {
|
|
41
41
|
hostFetch
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XB6O445X.js";
|
|
43
43
|
import {
|
|
44
44
|
currentAttempt
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-4CLSIEWN.js";
|
|
46
46
|
import {
|
|
47
47
|
Credentials,
|
|
48
48
|
isMovedRun,
|
|
49
49
|
pathsAreOverridden,
|
|
50
50
|
resolvePaths
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-R2G3MWEF.js";
|
|
52
52
|
import {
|
|
53
53
|
optional
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-RXBKVNOK.js";
|
|
55
55
|
import {
|
|
56
56
|
importFrom
|
|
57
57
|
} from "./chunk-Y5E2WNWB.js";
|
|
58
58
|
import {
|
|
59
59
|
CliError,
|
|
60
60
|
isCliError
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-GCUFGDKE.js";
|
|
62
62
|
import {
|
|
63
63
|
__name
|
|
64
64
|
} from "./chunk-ZVVMGPBJ.js";
|
|
@@ -189,7 +189,7 @@ var logOut = /* @__PURE__ */ __name(async (profile, sessionPath, context) => {
|
|
|
189
189
|
checks: checkWords("tg", profile),
|
|
190
190
|
...keyring ? { keyring } : {}
|
|
191
191
|
});
|
|
192
|
-
const { TelegramAdapter } = await import("./adapter-
|
|
192
|
+
const { TelegramAdapter } = await import("./adapter-OHJF6PB5.js");
|
|
193
193
|
const adapter = await TelegramAdapter.open({ credentials, sessionPath, ...through ? { proxy: through.proxy } : {} });
|
|
194
194
|
try {
|
|
195
195
|
await adapter.logout();
|
|
@@ -254,7 +254,7 @@ var telegramOf = /* @__PURE__ */ __name((command, base) => {
|
|
|
254
254
|
throw new CliError(temporary ? "provider_unavailable" : "authentication_error", 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\``, temporary ? { reason: "credentials.unreachable" } : {});
|
|
255
255
|
}
|
|
256
256
|
const options = { credentials: resolved, sessionPath, ...connecting };
|
|
257
|
-
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-
|
|
257
|
+
return environment.adapter ? await environment.adapter(options) : await (await import("./adapter-OHJF6PB5.js")).TelegramAdapter.open({
|
|
258
258
|
...options,
|
|
259
259
|
...proxyOption(proxy()),
|
|
260
260
|
diagnostic: /* @__PURE__ */ __name((line) => base.streams.diagnostic(line), "diagnostic"),
|
|
@@ -979,7 +979,7 @@ var TELEGRAM_BOT = {
|
|
|
979
979
|
const botId = token.split(":", 1)[0] ?? "";
|
|
980
980
|
if (!/^\d+$/.test(botId))
|
|
981
981
|
throw new CliError("authentication_error", "the bot token has no valid bot id");
|
|
982
|
-
const reader = await (environment.botHistory ?? (await import("./bot-history-
|
|
982
|
+
const reader = await (environment.botHistory ?? (await import("./bot-history-FRLCHPDQ.js")).openBotHistory)({
|
|
983
983
|
credentials,
|
|
984
984
|
sessionPath: botSessionFile(profile, botId, env),
|
|
985
985
|
token,
|
|
@@ -999,7 +999,7 @@ var TELEGRAM_BOT = {
|
|
|
999
999
|
return void 0;
|
|
1000
1000
|
let personal;
|
|
1001
1001
|
try {
|
|
1002
|
-
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-
|
|
1002
|
+
personal = environment.adapter ? await environment.adapter({ credentials, sessionPath: personalPath }) : await (await import("./adapter-OHJF6PB5.js")).TelegramAdapter.open({
|
|
1003
1003
|
credentials,
|
|
1004
1004
|
sessionPath: personalPath,
|
|
1005
1005
|
checks: words,
|
|
@@ -4,22 +4,22 @@ import {
|
|
|
4
4
|
isCliFailure,
|
|
5
5
|
secretNamed,
|
|
6
6
|
withoutSecrets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RZ7POTFA.js";
|
|
8
8
|
import {
|
|
9
9
|
isContentKey
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-R2G3MWEF.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
16
16
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
17
17
|
import { createHash } from "node:crypto";
|
|
18
18
|
|
|
19
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
19
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
20
20
|
import { homedir } from "node:os";
|
|
21
21
|
|
|
22
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
22
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/runs/events.js
|
|
23
23
|
var providerErrorKey = /* @__PURE__ */ __name((value) => typeof value === "string" && /^[A-Za-z][A-Za-z0-9._-]{0,63}$/.test(value) ? value : void 0, "providerErrorKey");
|
|
24
24
|
var renderEvent = /* @__PURE__ */ __name((event) => {
|
|
25
25
|
if (event.event === "store")
|
|
@@ -71,7 +71,7 @@ var MARK = { request: "\u2192", response: "\u2190", cache: "\u2022", warning: "!
|
|
|
71
71
|
var age = /* @__PURE__ */ __name((ms) => ms < 1e3 ? `${ms}ms` : `${Math.round(ms / 1e3)}s`, "age");
|
|
72
72
|
var size = /* @__PURE__ */ __name((bytes) => bytes < 1e3 ? `${bytes} B` : `${(bytes / 1e3).toFixed(1)} kB`, "size");
|
|
73
73
|
|
|
74
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
74
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/runs/error-detail.js
|
|
75
75
|
var MESSAGE_AT_MOST = 500;
|
|
76
76
|
var CAUSES_AT_MOST = 5;
|
|
77
77
|
var FRAMES_AT_MOST = 15;
|
|
@@ -183,7 +183,7 @@ var redactText = /* @__PURE__ */ __name((text) => {
|
|
|
183
183
|
return out.length > MESSAGE_AT_MOST ? `${out.slice(0, MESSAGE_AT_MOST)}\u2026` : out;
|
|
184
184
|
}, "redactText");
|
|
185
185
|
|
|
186
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
186
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/runs/run-context.js
|
|
187
187
|
var REDACTED = "[redacted]";
|
|
188
188
|
var keepsSuccess = /* @__PURE__ */ __name(({ record, fromFlag, env, caller, persistent = false }) => {
|
|
189
189
|
if (!record)
|
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
singleLine
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GCUFGDKE.js";
|
|
7
7
|
import {
|
|
8
8
|
__name
|
|
9
9
|
} from "./chunk-ZVVMGPBJ.js";
|
|
10
10
|
|
|
11
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
11
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/domain/tags.js
|
|
12
12
|
var TAG_TYPES = ["chat", "contact", "message", "task"];
|
|
13
13
|
var TAG = /^[a-z0-9-]{1,32}$/;
|
|
14
14
|
var tagOf = /* @__PURE__ */ __name((value) => {
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
MAX_SECRET_INPUT,
|
|
5
5
|
bufferedInput,
|
|
6
6
|
inputPolicy
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-24G3SEXH.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-GCUFGDKE.js";
|
|
11
11
|
import {
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-ZVVMGPBJ.js";
|
|
14
14
|
|
|
15
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
15
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/node_modules/@wirecat/cli-core/dist/terminal/prompt.js
|
|
16
16
|
import { createInterface } from "node:readline";
|
|
17
17
|
import { Writable } from "node:stream";
|
|
18
18
|
var EMPTY_TRIES = 3;
|
|
@@ -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.718.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.126.1_commander@15_05e4e157d64d32ce6fc62270b9552a1d/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 {
|