@wirecat/tg-cli 0.101.0 → 0.102.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 +1 -1
- package/dist/bot/transport.d.ts.map +1 -1
- package/dist/bot/transport.js +14 -17
- package/dist/bot/transport.js.map +1 -1
- package/dist/bundle/{adapter-A3VD4Y6Z.js → adapter-M2HRSFFL.js} +90 -28
- package/dist/bundle/{all-profiles-UPVNHXB2.js → all-profiles-GOD2QNTK.js} +29 -8
- package/dist/bundle/{anthropic-IRKNWPIB.js → anthropic-LKU7RWMA.js} +3 -3
- package/dist/bundle/{bot-api-UNTQG2M5.js → bot-api-X3MPFVPL.js} +42 -46
- package/dist/bundle/{bot-history-V4RTY5K7.js → bot-history-OUMVVG22.js} +10 -10
- package/dist/bundle/{bun-2JZPG2NL.js → bun-LIZ6MKFS.js} +2 -2
- package/dist/bundle/{bun-sqlite-TZHKM225.js → bun-sqlite-2IFQYQ44.js} +2 -2
- package/dist/bundle/{chunk-VA5YEJS3.js → chunk-264DAFJV.js} +4 -4
- package/dist/bundle/{chunk-ZV24I2UJ.js → chunk-2SUTCDGO.js} +1 -1
- package/dist/bundle/{chunk-BX6HH4F6.js → chunk-334UBWOB.js} +10 -10
- package/dist/bundle/{chunk-2DGOFLDA.js → chunk-4PDEQL6T.js} +1 -1
- package/dist/bundle/chunk-4QB4WDLT.js +922 -0
- package/dist/bundle/{chunk-MLLJ74LM.js → chunk-5D6OJREA.js} +1 -1
- package/dist/bundle/{chunk-RF54YDBB.js → chunk-5DFGJPT6.js} +4 -4
- package/dist/bundle/{chunk-TGREFJVA.js → chunk-5VSR5ENL.js} +7 -7
- package/dist/bundle/{chunk-VCGL2ETF.js → chunk-AUOXTGTU.js} +1 -1
- package/dist/bundle/{chunk-X4Y2ROJI.js → chunk-BBC546ZA.js} +91 -2
- package/dist/bundle/{chunk-QOWSVDPZ.js → chunk-BQYTIYGB.js} +106 -95
- package/dist/bundle/{chunk-XCKD54TN.js → chunk-CLWYQNSC.js} +5 -5
- package/dist/bundle/{chunk-7CBUCTB6.js → chunk-CRZPQQHE.js} +27 -33
- package/dist/bundle/chunk-DE7LFMY2.js +440 -0
- package/dist/bundle/{chunk-ODSVNH3H.js → chunk-ENE5CSVY.js} +2373 -1266
- package/dist/bundle/{chunk-G2US6LJB.js → chunk-ERQDBK5I.js} +1 -1
- package/dist/bundle/{chunk-W2336E7Y.js → chunk-F2TG3BA2.js} +4 -4
- package/dist/bundle/{chunk-DYNSP6FW.js → chunk-FBWOQMPE.js} +1442 -769
- package/dist/bundle/{chunk-5TPT2S2Z.js → chunk-FOUE7XLK.js} +1 -1
- package/dist/bundle/{chunk-RVCS7Q3A.js → chunk-GSKFAE3I.js} +1287 -512
- package/dist/bundle/{chunk-6IPY2QRG.js → chunk-HLAZ65AW.js} +1 -1
- package/dist/bundle/{chunk-A5JSTZZZ.js → chunk-JFSVXMN6.js} +2 -2
- package/dist/bundle/{chunk-N5UFBWDM.js → chunk-M5UH5CF3.js} +5 -7
- package/dist/bundle/{chunk-F7TDFWXY.js → chunk-MGG7JSNO.js} +2 -2
- package/dist/bundle/{chunk-H6OXALTJ.js → chunk-OCWARAFE.js} +1 -1
- package/dist/bundle/{chunk-S7ZNLLY5.js → chunk-OHBHHBYL.js} +2 -2
- package/dist/bundle/{chunk-5GKXETRP.js → chunk-PSH7K6TL.js} +610 -51
- package/dist/bundle/{chunk-VYDTI254.js → chunk-Q2NYEX4A.js} +53 -34
- package/dist/bundle/{chunk-G3ZRY436.js → chunk-QEPZUFPL.js} +46 -46
- package/dist/bundle/{chunk-BXQS5RCE.js → chunk-QL7CQ6VZ.js} +253 -78
- package/dist/bundle/{chunk-NC5WS7OP.js → chunk-SRU3OF4R.js} +1 -1
- package/dist/bundle/{chunk-PUBS2F5J.js → chunk-TV5DGHBT.js} +242 -242
- package/dist/bundle/{chunk-ZEOCU24Z.js → chunk-TXBUDJ3P.js} +1 -1
- package/dist/bundle/{chunk-ACGTFLEB.js → chunk-U4RRZUNP.js} +8 -8
- package/dist/bundle/{chunk-LPB2MDUW.js → chunk-UK3GAN7Q.js} +6 -6
- package/dist/bundle/{chunk-UN6CKIBN.js → chunk-UR6ASUSG.js} +8 -5
- package/dist/bundle/{chunk-U46UNBMT.js → chunk-V52SBQYF.js} +236 -13
- package/dist/bundle/{chunk-S2JSZWEC.js → chunk-VUJ34PEQ.js} +9 -9
- package/dist/bundle/{chunk-QYVVRQTN.js → chunk-W5EB4JLV.js} +2 -2
- package/dist/bundle/{chunk-3KHKYYCR.js → chunk-WMOEOVWZ.js} +1 -0
- package/dist/bundle/{chunk-VRSN7VLO.js → chunk-WVEHUKCZ.js} +1 -1
- package/dist/bundle/{chunk-64DK7S4F.js → chunk-XXTJUZMB.js} +1 -1
- package/dist/bundle/{chunk-54R2GDQ3.js → chunk-Y4XSWI22.js} +3 -3
- package/dist/bundle/{chunk-4ZS73HTJ.js → chunk-YHB57PFN.js} +1 -1
- package/dist/bundle/{chunk-G77QOTXE.js → chunk-ZRNRQFTF.js} +1 -1
- package/dist/bundle/{command-contract-TKDI7E56.js → command-contract-A6VZN3ZR.js} +11 -11
- package/dist/bundle/{echarts-QZ6PR3VC.js → echarts-27W2CIBD.js} +2 -2
- package/dist/bundle/{embed-UBXCXSRD.js → embed-FGJ273X2.js} +2 -2
- package/dist/bundle/{embedder-B4ZTKC23.js → embedder-7ELL3CQ3.js} +5 -5
- package/dist/bundle/{entry-BTUTHO5M.js → entry-SEE5YWIX.js} +3 -3
- package/dist/bundle/{first-run-UC4HRIFV.js → first-run-BD7FEC3W.js} +5 -5
- package/dist/bundle/{first-screen-SMCX6YKY.js → first-screen-ASZV6LSA.js} +12 -12
- package/dist/bundle/{identity-QSDEGDH7.js → identity-QR4F42T6.js} +1 -1
- package/dist/bundle/{instructions-BBGLZKO3.js → instructions-L74K64PV.js} +1 -1
- package/dist/bundle/{node-LZZX22VR.js → node-RSL3HANO.js} +2 -2
- package/dist/bundle/{node-sqlite-BPGT6T5U.js → node-sqlite-7R3PYQGJ.js} +2 -2
- package/dist/bundle/{oauth-XNE2KPKJ.js → oauth-4ESGXF6U.js} +5 -5
- package/dist/bundle/{open-SXGYZLB5.js → open-DFYEUGTA.js} +1 -1
- package/dist/bundle/{process-GPUXC4PG.js → process-RMV3AKLB.js} +1 -1
- package/dist/bundle/{program-NEXEAL7T.js → program-PIUYQHBF.js} +54 -59
- package/dist/bundle/{prompt-SORGLEYI.js → prompt-H7GYQQLL.js} +2 -2
- package/dist/bundle/{recognize-UJBXORVD.js → recognize-3GMOLZF4.js} +3 -3
- package/dist/bundle/{remote-W72AR7KH.js → remote-IRWTCI2B.js} +3 -3
- package/dist/bundle/{rerank-3Y2VZM3J.js → rerank-W3OSXXBN.js} +3 -3
- package/dist/bundle/{serve-VDZIVOPR.js → serve-ZCPO44NO.js} +7 -7
- package/dist/bundle/{server-ZFHN4GUF.js → server-FXU4QFRB.js} +35 -32
- package/dist/bundle/{server-BERXP4GW.js → server-YWL4HDOP.js} +68 -59
- package/dist/bundle/{state-DGR4EE3E.js → state-MJPTDIB5.js} +3 -3
- package/dist/bundle/{store-MRCFSCZD.js → store-6VNQG56O.js} +7 -7
- package/dist/bundle/store-maintenance-command-62TQTMER.js +43 -0
- package/dist/bundle/tg.js +2 -2
- package/dist/telegram/sending.d.ts.map +1 -1
- package/dist/telegram/sending.js +52 -3
- package/dist/telegram/sending.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/dist/bundle/chunk-22PQUX72.js +0 -190
- package/dist/bundle/chunk-CJ6IYCYP.js +0 -583
- package/dist/bundle/chunk-NKJJJAIJ.js +0 -237
- package/dist/bundle/chunk-NMGO6LW6.js +0 -1950
- package/dist/bundle/chunk-OILBDLWL.js +0 -724
- package/dist/bundle/chunk-OPBTNQ35.js +0 -1007
- package/dist/bundle/store-maintenance-command-DCMZDMYS.js +0 -46
|
@@ -2,59 +2,58 @@ import { createRequire as __tgRequire } from "node:module";
|
|
|
2
2
|
const require = __tgRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
botInstructions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5D6OJREA.js";
|
|
6
6
|
import {
|
|
7
7
|
answered,
|
|
8
8
|
normal,
|
|
9
9
|
registerCommands,
|
|
10
10
|
runCommandForAgent,
|
|
11
11
|
toolsFromCommands
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-Q2NYEX4A.js";
|
|
13
13
|
import {
|
|
14
14
|
agentJson,
|
|
15
15
|
skillResource
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-NKJJJAIJ.js";
|
|
16
|
+
} from "./chunk-V52SBQYF.js";
|
|
18
17
|
import {
|
|
18
|
+
callerOf,
|
|
19
19
|
serveStdio
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BBC546ZA.js";
|
|
21
21
|
import {
|
|
22
22
|
McpServer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-WMOEOVWZ.js";
|
|
24
24
|
import {
|
|
25
25
|
wholeList
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-QOWSVDPZ.js";
|
|
26
|
+
} from "./chunk-FBWOQMPE.js";
|
|
27
|
+
import "./chunk-5DFGJPT6.js";
|
|
28
|
+
import "./chunk-BQYTIYGB.js";
|
|
30
29
|
import {
|
|
31
30
|
changesMessenger,
|
|
32
31
|
flatten,
|
|
33
32
|
itemOf
|
|
34
|
-
} from "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
33
|
+
} from "./chunk-GSKFAE3I.js";
|
|
34
|
+
import "./chunk-Y4XSWI22.js";
|
|
35
|
+
import "./chunk-DE7LFMY2.js";
|
|
37
36
|
import "./chunk-PYTOIDSM.js";
|
|
38
37
|
import "./chunk-5KU4UQBM.js";
|
|
39
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-OHBHHBYL.js";
|
|
40
39
|
import {
|
|
41
40
|
MESSENGER_CHANGE_REFUSAL,
|
|
42
41
|
readOnlyLockOf,
|
|
43
42
|
readOnlyRefusal
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
43
|
+
} from "./chunk-2SUTCDGO.js";
|
|
44
|
+
import "./chunk-WVEHUKCZ.js";
|
|
45
|
+
import "./chunk-OCWARAFE.js";
|
|
46
|
+
import "./chunk-JFSVXMN6.js";
|
|
47
|
+
import "./chunk-U4RRZUNP.js";
|
|
48
|
+
import "./chunk-TV5DGHBT.js";
|
|
49
|
+
import "./chunk-QEPZUFPL.js";
|
|
50
|
+
import "./chunk-5VSR5ENL.js";
|
|
51
|
+
import "./chunk-F2TG3BA2.js";
|
|
53
52
|
import "./chunk-2SJOUK6J.js";
|
|
54
|
-
import "./chunk-
|
|
55
|
-
import "./chunk-
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-ZRNRQFTF.js";
|
|
54
|
+
import "./chunk-CLWYQNSC.js";
|
|
55
|
+
import "./chunk-YHB57PFN.js";
|
|
56
|
+
import "./chunk-HLAZ65AW.js";
|
|
58
57
|
import {
|
|
59
58
|
mcpErrorResult
|
|
60
59
|
} from "./chunk-DG62L57H.js";
|
|
@@ -66,7 +65,8 @@ import {
|
|
|
66
65
|
__name
|
|
67
66
|
} from "./chunk-AFV74GK3.js";
|
|
68
67
|
|
|
69
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
68
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/bot/server.js
|
|
69
|
+
import { randomUUID } from "node:crypto";
|
|
70
70
|
var body = /* @__PURE__ */ __name((command, value) => Array.isArray(value) ? wholeList(`bot ${command}`, value) : value !== null && typeof value === "object" && ("item" in value || "items" in value) ? value : itemOf(value !== null && typeof value === "object" ? value : { value }), "body");
|
|
71
71
|
var createBotServer = /* @__PURE__ */ __name((options) => {
|
|
72
72
|
const { bot, program, settings, env } = options;
|
|
@@ -94,19 +94,21 @@ var createBotServer = /* @__PURE__ */ __name((options) => {
|
|
|
94
94
|
const writes = tools.filter((tool) => tool.writes && tool.availability?.().available !== false).map((tool) => tool.command);
|
|
95
95
|
const skill = options.skill ? skillResource(bot.app, options.skill) : void 0;
|
|
96
96
|
let queue = Promise.resolve();
|
|
97
|
-
const invoke = /* @__PURE__ */ __name((path, input) => {
|
|
97
|
+
const invoke = /* @__PURE__ */ __name((path, input, caller) => {
|
|
98
98
|
const next = queue.then(() => runCommandForAgent(program, path, path[0] === "config" ? { ...input, bot: true } : input, {
|
|
99
99
|
profile: settings.profile,
|
|
100
100
|
readOnly: readOnlyLockOf(bot.app, env) !== void 0,
|
|
101
101
|
env,
|
|
102
102
|
levels,
|
|
103
103
|
...options.keyOf ? { keyOf: options.keyOf } : {},
|
|
104
|
-
authority
|
|
104
|
+
authority,
|
|
105
|
+
...caller ? { caller } : {}
|
|
105
106
|
}));
|
|
106
107
|
queue = next.catch(() => void 0);
|
|
107
108
|
return next;
|
|
108
109
|
}, "invoke");
|
|
109
110
|
const build = /* @__PURE__ */ __name(() => {
|
|
111
|
+
const callers = { env, client: /* @__PURE__ */ __name(() => server.server.getClientVersion(), "client"), connectionId: randomUUID() };
|
|
110
112
|
const server = new McpServer({ name: `${command}-bot-${settings.profile}`, version: bot.app.version }, {
|
|
111
113
|
instructions: botInstructions({
|
|
112
114
|
command,
|
|
@@ -128,8 +130,9 @@ var createBotServer = /* @__PURE__ */ __name((options) => {
|
|
|
128
130
|
writes: tool.writes,
|
|
129
131
|
availability: tool.availability,
|
|
130
132
|
input: tool.input,
|
|
131
|
-
run: /* @__PURE__ */ __name(async (args) => {
|
|
132
|
-
const
|
|
133
|
+
run: /* @__PURE__ */ __name(async (args, ctx) => {
|
|
134
|
+
const caller = callerOf(ctx, `${command}_${tool.command.replaceAll(" ", "_")}`, callers);
|
|
135
|
+
const answer = await invoke(tool.path, args, caller);
|
|
133
136
|
return "error" in answer ? mcpErrorResult(JSON.parse(agentJson(answer.error))) : answered(body(tool.command, answer.result));
|
|
134
137
|
}, "run")
|
|
135
138
|
}
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
registerPrompts,
|
|
14
14
|
stdinFieldOf,
|
|
15
15
|
syncsFirst
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CRZPQQHE.js";
|
|
17
17
|
import {
|
|
18
18
|
answeredWire
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-XXTJUZMB.js";
|
|
20
20
|
import {
|
|
21
21
|
BinaryResource,
|
|
22
22
|
Picture,
|
|
@@ -37,26 +37,24 @@ import {
|
|
|
37
37
|
tool,
|
|
38
38
|
toolKey,
|
|
39
39
|
toolsFromCommands
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-Q2NYEX4A.js";
|
|
41
41
|
import {
|
|
42
42
|
agentJson,
|
|
43
43
|
skillResource
|
|
44
|
-
} from "./chunk-
|
|
45
|
-
import "./chunk-NKJJJAIJ.js";
|
|
44
|
+
} from "./chunk-V52SBQYF.js";
|
|
46
45
|
import {
|
|
47
46
|
StdioServerTransport,
|
|
47
|
+
callerOf,
|
|
48
48
|
serveStdio
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-BBC546ZA.js";
|
|
50
50
|
import {
|
|
51
51
|
McpServer,
|
|
52
52
|
ResourceTemplate
|
|
53
|
-
} from "./chunk-
|
|
54
|
-
import {
|
|
55
|
-
connectedFor
|
|
56
|
-
} from "./chunk-5GKXETRP.js";
|
|
53
|
+
} from "./chunk-WMOEOVWZ.js";
|
|
57
54
|
import {
|
|
55
|
+
connectedFor,
|
|
58
56
|
guardFor
|
|
59
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PSH7K6TL.js";
|
|
60
58
|
import {
|
|
61
59
|
capability,
|
|
62
60
|
dateWindow,
|
|
@@ -65,65 +63,65 @@ import {
|
|
|
65
63
|
servicesFor,
|
|
66
64
|
storedDeps,
|
|
67
65
|
wholeList
|
|
68
|
-
} from "./chunk-
|
|
69
|
-
import "./chunk-
|
|
70
|
-
import "./chunk-RF54YDBB.js";
|
|
66
|
+
} from "./chunk-FBWOQMPE.js";
|
|
67
|
+
import "./chunk-5DFGJPT6.js";
|
|
71
68
|
import {
|
|
72
69
|
findCommand
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-
|
|
70
|
+
} from "./chunk-M5UH5CF3.js";
|
|
71
|
+
import "./chunk-BQYTIYGB.js";
|
|
75
72
|
import {
|
|
76
73
|
DEFAULT_OUTPUT_BYTES,
|
|
77
74
|
changesAuthorityAt,
|
|
78
75
|
describeProgram,
|
|
79
76
|
environmentOf,
|
|
80
|
-
isCliFailure,
|
|
81
77
|
itemOf,
|
|
82
78
|
judgedTargets,
|
|
79
|
+
levelFor,
|
|
80
|
+
readKeysForCommand,
|
|
83
81
|
recalledAccount,
|
|
84
82
|
rootOf2 as rootOf,
|
|
85
83
|
sealed,
|
|
86
|
-
snakeKeys
|
|
87
|
-
} from "./chunk-RVCS7Q3A.js";
|
|
88
|
-
import {
|
|
89
|
-
levelFor,
|
|
90
|
-
readKeysForCommand,
|
|
84
|
+
snakeKeys,
|
|
91
85
|
typedCommand
|
|
92
|
-
} from "./chunk-
|
|
93
|
-
import "./chunk-
|
|
86
|
+
} from "./chunk-GSKFAE3I.js";
|
|
87
|
+
import "./chunk-Y4XSWI22.js";
|
|
88
|
+
import {
|
|
89
|
+
isCliFailure,
|
|
90
|
+
withCaller
|
|
91
|
+
} from "./chunk-DE7LFMY2.js";
|
|
94
92
|
import "./chunk-PYTOIDSM.js";
|
|
95
93
|
import "./chunk-5KU4UQBM.js";
|
|
96
|
-
import "./chunk-
|
|
94
|
+
import "./chunk-OHBHHBYL.js";
|
|
97
95
|
import {
|
|
98
96
|
readOnlyLockOf
|
|
99
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-2SUTCDGO.js";
|
|
100
98
|
import {
|
|
101
99
|
mcpHttpMarker
|
|
102
|
-
} from "./chunk-
|
|
103
|
-
import "./chunk-
|
|
104
|
-
import "./chunk-
|
|
100
|
+
} from "./chunk-264DAFJV.js";
|
|
101
|
+
import "./chunk-W5EB4JLV.js";
|
|
102
|
+
import "./chunk-WVEHUKCZ.js";
|
|
105
103
|
import {
|
|
106
104
|
instructions
|
|
107
|
-
} from "./chunk-
|
|
108
|
-
import "./chunk-
|
|
109
|
-
import "./chunk-
|
|
105
|
+
} from "./chunk-ERQDBK5I.js";
|
|
106
|
+
import "./chunk-OCWARAFE.js";
|
|
107
|
+
import "./chunk-JFSVXMN6.js";
|
|
110
108
|
import {
|
|
111
109
|
warmEmbedders
|
|
112
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-U4RRZUNP.js";
|
|
113
111
|
import {
|
|
114
112
|
openStore,
|
|
115
113
|
pdfPreviewLimits
|
|
116
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-TV5DGHBT.js";
|
|
117
115
|
import {
|
|
118
116
|
timezoneOf
|
|
119
|
-
} from "./chunk-
|
|
120
|
-
import "./chunk-
|
|
121
|
-
import "./chunk-
|
|
117
|
+
} from "./chunk-QEPZUFPL.js";
|
|
118
|
+
import "./chunk-5VSR5ENL.js";
|
|
119
|
+
import "./chunk-F2TG3BA2.js";
|
|
122
120
|
import "./chunk-2SJOUK6J.js";
|
|
123
|
-
import "./chunk-
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
126
|
-
import "./chunk-
|
|
121
|
+
import "./chunk-ZRNRQFTF.js";
|
|
122
|
+
import "./chunk-CLWYQNSC.js";
|
|
123
|
+
import "./chunk-YHB57PFN.js";
|
|
124
|
+
import "./chunk-HLAZ65AW.js";
|
|
127
125
|
import {
|
|
128
126
|
mcpErrorResult,
|
|
129
127
|
visibleControls
|
|
@@ -149,7 +147,10 @@ import {
|
|
|
149
147
|
__name
|
|
150
148
|
} from "./chunk-AFV74GK3.js";
|
|
151
149
|
|
|
152
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
150
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
151
|
+
import { randomUUID } from "node:crypto";
|
|
152
|
+
|
|
153
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/agent-log.js
|
|
153
154
|
var agentLog = /* @__PURE__ */ __name((open) => {
|
|
154
155
|
let held;
|
|
155
156
|
return {
|
|
@@ -168,7 +169,7 @@ var agentLog = /* @__PURE__ */ __name((open) => {
|
|
|
168
169
|
};
|
|
169
170
|
}, "agentLog");
|
|
170
171
|
|
|
171
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
172
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/resources.js
|
|
172
173
|
var LISTED = 100;
|
|
173
174
|
var registerResources = /* @__PURE__ */ __name((server, session, { command, name, limit, recorded, withStore, messenger, guard, assertRead }) => {
|
|
174
175
|
server.registerResource("chat", new ResourceTemplate(`${command}://chat/{id}`, {
|
|
@@ -206,7 +207,7 @@ var registerResources = /* @__PURE__ */ __name((server, session, { command, name
|
|
|
206
207
|
});
|
|
207
208
|
}, "registerResources");
|
|
208
209
|
|
|
209
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
210
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/session.js
|
|
210
211
|
var HARMLESS = /* @__PURE__ */ new Set(["validation_error", "not_found", "permission_error", "confirmation_required", "rate_limited"]);
|
|
211
212
|
var harmless = /* @__PURE__ */ __name((code) => HARMLESS.has(code), "harmless");
|
|
212
213
|
var MessengerSession = class {
|
|
@@ -281,7 +282,7 @@ var MessengerSession = class {
|
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
284
|
|
|
284
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
285
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/tools/attachments.js
|
|
285
286
|
var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
286
287
|
const _command = messenger.app.command;
|
|
287
288
|
return {
|
|
@@ -335,7 +336,7 @@ var attachmentsTools = /* @__PURE__ */ __name((messenger) => {
|
|
|
335
336
|
};
|
|
336
337
|
}, "attachmentsTools");
|
|
337
338
|
|
|
338
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
339
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/tools/messages-photo.js
|
|
339
340
|
var PHOTO_LIMIT = 512 * 1024;
|
|
340
341
|
var IMAGE_TYPES = [
|
|
341
342
|
["image/jpeg", (b) => b[0] === 255 && b[1] === 216 && b[2] === 255],
|
|
@@ -389,7 +390,7 @@ var readUpTo = /* @__PURE__ */ __name(async (file, limit, saveIt) => {
|
|
|
389
390
|
return new Uint8Array(Buffer.concat(chunks));
|
|
390
391
|
}, "readUpTo");
|
|
391
392
|
|
|
392
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
393
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/tools/stats.js
|
|
393
394
|
var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
394
395
|
stats_charts: tool({
|
|
395
396
|
title: "A chart from a chat's statistics",
|
|
@@ -426,14 +427,14 @@ var statsTools = /* @__PURE__ */ __name((messenger) => ({
|
|
|
426
427
|
})
|
|
427
428
|
}), "statsTools");
|
|
428
429
|
|
|
429
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
430
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/tools.js
|
|
430
431
|
var pictureTools = /* @__PURE__ */ __name((messenger) => Object.fromEntries(Object.entries({
|
|
431
432
|
...messagesPhotoTools(messenger),
|
|
432
433
|
...attachmentsTools(messenger),
|
|
433
434
|
...statsTools(messenger)
|
|
434
435
|
}).map(([name, definition]) => [name, { ...definition, input: strictObject(definition.input.entries) }])), "pictureTools");
|
|
435
436
|
|
|
436
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
437
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.467.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.64.0_commander@15._7a700db966f96e9df6d3178e7072efc2/node_modules/@wirecat/cli-core/dist/mcp/server.js
|
|
437
438
|
var PER_RUN = /* @__PURE__ */ new Set([
|
|
438
439
|
"streams",
|
|
439
440
|
"stdin",
|
|
@@ -562,7 +563,7 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
562
563
|
embedders,
|
|
563
564
|
...sessionOptions.spawnJob ? { spawnJob: sessionOptions.spawnJob } : {}
|
|
564
565
|
};
|
|
565
|
-
const invoke = /* @__PURE__ */ __name((one, input, env) => new Promise((resolve) => {
|
|
566
|
+
const invoke = /* @__PURE__ */ __name((one, input, env, caller) => new Promise((resolve) => {
|
|
566
567
|
let finish;
|
|
567
568
|
let held;
|
|
568
569
|
const connection = /* @__PURE__ */ __name(() => new Promise((lend, refuse) => {
|
|
@@ -585,7 +586,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
585
586
|
authority,
|
|
586
587
|
stdin,
|
|
587
588
|
connection,
|
|
588
|
-
environment: agentEnvironment
|
|
589
|
+
environment: agentEnvironment,
|
|
590
|
+
caller
|
|
589
591
|
}).then(async (answer) => {
|
|
590
592
|
finish?.("error" in answer && !harmless(answer.error.error.code));
|
|
591
593
|
await held?.catch(() => void 0);
|
|
@@ -593,12 +595,12 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
593
595
|
});
|
|
594
596
|
}), "invoke");
|
|
595
597
|
let queue = Promise.resolve();
|
|
596
|
-
const queued = /* @__PURE__ */ __name((one, input, env) => {
|
|
597
|
-
const next = queue.then(() => invoke(one, input, env));
|
|
598
|
+
const queued = /* @__PURE__ */ __name((one, input, env, caller) => {
|
|
599
|
+
const next = queue.then(() => invoke(one, input, env, caller));
|
|
598
600
|
queue = next.catch(() => void 0);
|
|
599
601
|
return next;
|
|
600
602
|
}, "queued");
|
|
601
|
-
const asCommand = /* @__PURE__ */ __name((one) => ({
|
|
603
|
+
const asCommand = /* @__PURE__ */ __name((one, source) => ({
|
|
602
604
|
title: one.title,
|
|
603
605
|
description: one.description,
|
|
604
606
|
writes: one.writes,
|
|
@@ -609,7 +611,8 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
609
611
|
const startedAt = Date.now();
|
|
610
612
|
const traceparent = ctx?.mcpReq?._meta?.traceparent;
|
|
611
613
|
const env = typeof traceparent === "string" ? { ...context.env, TRACEPARENT: traceparent } : context.env;
|
|
612
|
-
const
|
|
614
|
+
const caller = callerOf(ctx, keyOfCommand(one.command), source);
|
|
615
|
+
const answer = await withCaller(caller, () => queued(one, args, env, caller));
|
|
613
616
|
const result = "error" in answer ? mcpErrorResult(JSON.parse(agentJson(answer.error))) : (() => {
|
|
614
617
|
try {
|
|
615
618
|
return answered(envelope(one.command, answer.result), DEFAULT_OUTPUT_BYTES, targets);
|
|
@@ -628,6 +631,11 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
628
631
|
}, "run")
|
|
629
632
|
}), "asCommand");
|
|
630
633
|
const build = /* @__PURE__ */ __name(() => {
|
|
634
|
+
const callers = {
|
|
635
|
+
env: context.env,
|
|
636
|
+
client: /* @__PURE__ */ __name(() => server.server.getClientVersion(), "client"),
|
|
637
|
+
connectionId: randomUUID()
|
|
638
|
+
};
|
|
631
639
|
const server = new McpServer({ name: app.command, version: app.version }, {
|
|
632
640
|
instructions: instructions({
|
|
633
641
|
command: app.command,
|
|
@@ -667,11 +675,12 @@ var createServer = /* @__PURE__ */ __name((command, context, messenger, sessionO
|
|
|
667
675
|
env: context.env,
|
|
668
676
|
...context.keyring ? { keyring: context.keyring } : {},
|
|
669
677
|
embedders,
|
|
670
|
-
history: settings.
|
|
671
|
-
}
|
|
678
|
+
history: settings.record
|
|
679
|
+
},
|
|
680
|
+
callers
|
|
672
681
|
};
|
|
673
682
|
registerCommands(server, app.command, {
|
|
674
|
-
...Object.fromEntries(commands.map((one) => [one.command, asCommand(one)])),
|
|
683
|
+
...Object.fromEntries(commands.map((one) => [one.command, asCommand(one, callers)])),
|
|
675
684
|
...Object.fromEntries(Object.entries(surfaceCommands({ ...pictures, status }, registration)).map(([name2, one]) => [
|
|
676
685
|
name2,
|
|
677
686
|
{
|
|
@@ -748,7 +757,7 @@ var serveOverStdio = /* @__PURE__ */ __name(async (command, context, messenger,
|
|
|
748
757
|
}, "serveOverStdio");
|
|
749
758
|
var serveOverHttpUntilStopped = /* @__PURE__ */ __name(async (command, context, messenger, options, http) => {
|
|
750
759
|
const { session, embedders, build, log } = createServer(command, context, messenger, options);
|
|
751
|
-
const { serveOverHttp } = await import("./serve-
|
|
760
|
+
const { serveOverHttp } = await import("./serve-ZCPO44NO.js");
|
|
752
761
|
const appName = messenger.app.command;
|
|
753
762
|
const appEnvPrefix = messenger.app.envPrefix;
|
|
754
763
|
const listening = await serveOverHttp(build, {
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
readHttpLock,
|
|
13
13
|
readStored,
|
|
14
14
|
signedInClients
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-264DAFJV.js";
|
|
16
|
+
import "./chunk-W5EB4JLV.js";
|
|
17
|
+
import "./chunk-WVEHUKCZ.js";
|
|
18
18
|
import "./chunk-DG62L57H.js";
|
|
19
19
|
import "./chunk-OEJ5DMCX.js";
|
|
20
20
|
import "./chunk-BJG6JA5U.js";
|
|
@@ -53,14 +53,14 @@ import {
|
|
|
53
53
|
threadConversation,
|
|
54
54
|
titlePart,
|
|
55
55
|
vectorIndexCounts
|
|
56
|
-
} from "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
56
|
+
} from "./chunk-TV5DGHBT.js";
|
|
57
|
+
import "./chunk-QEPZUFPL.js";
|
|
58
|
+
import "./chunk-5VSR5ENL.js";
|
|
59
|
+
import "./chunk-F2TG3BA2.js";
|
|
60
60
|
import "./chunk-2SJOUK6J.js";
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-ZRNRQFTF.js";
|
|
62
|
+
import "./chunk-CLWYQNSC.js";
|
|
63
|
+
import "./chunk-YHB57PFN.js";
|
|
64
64
|
import "./chunk-DG62L57H.js";
|
|
65
65
|
import "./chunk-OEJ5DMCX.js";
|
|
66
66
|
import "./chunk-BJG6JA5U.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRequire as __tgRequire } from "node:module";
|
|
2
|
+
const require = __tgRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
buildStems,
|
|
5
|
+
storeMaintenanceCommands,
|
|
6
|
+
storeSummary
|
|
7
|
+
} from "./chunk-QL7CQ6VZ.js";
|
|
8
|
+
import "./chunk-PSH7K6TL.js";
|
|
9
|
+
import "./chunk-FBWOQMPE.js";
|
|
10
|
+
import "./chunk-5DFGJPT6.js";
|
|
11
|
+
import "./chunk-ZZLKX62Z.js";
|
|
12
|
+
import "./chunk-GSKFAE3I.js";
|
|
13
|
+
import "./chunk-Y4XSWI22.js";
|
|
14
|
+
import "./chunk-DE7LFMY2.js";
|
|
15
|
+
import "./chunk-PYTOIDSM.js";
|
|
16
|
+
import "./chunk-5KU4UQBM.js";
|
|
17
|
+
import "./chunk-OHBHHBYL.js";
|
|
18
|
+
import "./chunk-2SUTCDGO.js";
|
|
19
|
+
import "./chunk-W5EB4JLV.js";
|
|
20
|
+
import "./chunk-WVEHUKCZ.js";
|
|
21
|
+
import "./chunk-SRU3OF4R.js";
|
|
22
|
+
import "./chunk-OCWARAFE.js";
|
|
23
|
+
import "./chunk-JFSVXMN6.js";
|
|
24
|
+
import "./chunk-U4RRZUNP.js";
|
|
25
|
+
import "./chunk-TV5DGHBT.js";
|
|
26
|
+
import "./chunk-QEPZUFPL.js";
|
|
27
|
+
import "./chunk-5VSR5ENL.js";
|
|
28
|
+
import "./chunk-F2TG3BA2.js";
|
|
29
|
+
import "./chunk-2SJOUK6J.js";
|
|
30
|
+
import "./chunk-ZRNRQFTF.js";
|
|
31
|
+
import "./chunk-CLWYQNSC.js";
|
|
32
|
+
import "./chunk-YHB57PFN.js";
|
|
33
|
+
import "./chunk-MGG7JSNO.js";
|
|
34
|
+
import "./chunk-HLAZ65AW.js";
|
|
35
|
+
import "./chunk-DG62L57H.js";
|
|
36
|
+
import "./chunk-OEJ5DMCX.js";
|
|
37
|
+
import "./chunk-BJG6JA5U.js";
|
|
38
|
+
import "./chunk-AFV74GK3.js";
|
|
39
|
+
export {
|
|
40
|
+
buildStems,
|
|
41
|
+
storeMaintenanceCommands,
|
|
42
|
+
storeSummary
|
|
43
|
+
};
|
package/dist/bundle/tg.js
CHANGED
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
// dist/bin/tg.js
|
|
16
16
|
import { enableCompileCache } from "node:module";
|
|
17
17
|
enableCompileCache();
|
|
18
|
-
var [{ startCli }, { TG }] = await Promise.all([import("./entry-
|
|
18
|
+
var [{ startCli }, { TG }] = await Promise.all([import("./entry-SEE5YWIX.js"), import("./identity-QR4F42T6.js")]);
|
|
19
19
|
await startCli({
|
|
20
20
|
app: TG,
|
|
21
21
|
sqlite: true,
|
|
22
22
|
// A static import would load the whole program, and its SQLite, before ensureSqlite could swap it.
|
|
23
|
-
run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-
|
|
23
|
+
run: /* @__PURE__ */ __name(async ({ args }) => (await import("./program-PIUYQHBF.js")).run(args), "run"),
|
|
24
24
|
fail: /* @__PURE__ */ __name((error, { tty }) => {
|
|
25
25
|
const object = errorObjectOf(error);
|
|
26
26
|
process.stderr.write(`${renderError(object, { cli: TG.command, interactive: tty })}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sending.d.ts","sourceRoot":"","sources":["../../src/telegram/sending.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"sending.d.ts","sourceRoot":"","sources":["../../src/telegram/sending.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,iBAAiB,EAAqC,MAAM,cAAc,CAAA;AA0E5G,eAAO,MAAM,aAAa,4BACC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,OAC3D,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAC1B,iBAAiB,EAenB,CAAA;AAED,mGAAmG;AACnG,eAAO,MAAM,OAAO,GAAU,CAAC,QAAQ,MAAM,OAAO,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,CAAC,CASlE,CAAA"}
|
package/dist/telegram/sending.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
-
import { networkMiddlewares } from "@mtcute/node";
|
|
3
|
-
import { CliError } from "@wirecat/cli-base";
|
|
2
|
+
import { networkMiddlewares, tl } from "@mtcute/node";
|
|
3
|
+
import { CliError, isCliError } from "@wirecat/cli-base";
|
|
4
4
|
import { bareCheck } from "@wirecat/cli-core";
|
|
5
|
+
import { currentAttempt, providerRequest, runEvent } from "@wirecat/cli-core/cli";
|
|
5
6
|
import { toCliError } from "./errors.js";
|
|
6
7
|
const SENDS = new Set([
|
|
7
8
|
"messages.sendMessage",
|
|
@@ -22,14 +23,62 @@ const noteAcceptedSend = async (context, next) => {
|
|
|
22
23
|
current.accepted = true;
|
|
23
24
|
return answer;
|
|
24
25
|
};
|
|
26
|
+
// floodWaiter and internalErrorsHandler retry by passing the same context to `next` again.
|
|
27
|
+
const tries = new WeakMap();
|
|
28
|
+
const codeOf = (error) => {
|
|
29
|
+
const known = toCliError(error, bareCheck);
|
|
30
|
+
return isCliError(known) ? known.code : "network_error";
|
|
31
|
+
};
|
|
32
|
+
/** `FLOOD_WAIT_12` → `FLOOD_WAIT`: the seconds go into the retry's `waitMs`. */
|
|
33
|
+
const errorKey = (message) => message.replace(/_\d+(?=_|$)/g, "");
|
|
34
|
+
/**
|
|
35
|
+
* One request line and one response line per RPC that goes on the wire, into the run under way. Only the
|
|
36
|
+
* method name leaves the request: every other field of it is what the person sent or asked for.
|
|
37
|
+
*/
|
|
38
|
+
const recordRequest = async (context, next) => {
|
|
39
|
+
const tried = tries.get(context);
|
|
40
|
+
const attempt = (tried?.attempt ?? 0) + 1;
|
|
41
|
+
// mtcute's own retry names its attempt; a first try takes the attempt of a retry made above it (`patiently`).
|
|
42
|
+
const retried = attempt > 1 ? { attempt, ...(tried?.waitMs === undefined ? {} : { waitMs: tried.waitMs }) } : undefined;
|
|
43
|
+
const end = providerRequest(context.request._, runEvent, {
|
|
44
|
+
transport: "mtproto",
|
|
45
|
+
...(retried ?? currentAttempt() ?? { attempt: 1 }),
|
|
46
|
+
});
|
|
47
|
+
tries.set(context, { attempt });
|
|
48
|
+
let answer;
|
|
49
|
+
try {
|
|
50
|
+
answer = await next(context);
|
|
51
|
+
}
|
|
52
|
+
catch (error) {
|
|
53
|
+
end({ errorCode: codeOf(error) });
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
const failure = answer;
|
|
57
|
+
if (failure?._ === "mt_rpc_error" && typeof failure.errorMessage === "string") {
|
|
58
|
+
end({
|
|
59
|
+
errorCode: codeOf(tl.RpcError.fromTl(failure)),
|
|
60
|
+
providerError: errorKey(failure.errorMessage),
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
end();
|
|
65
|
+
return answer;
|
|
66
|
+
};
|
|
25
67
|
export const middlewaresOf = ({ maxWait, maxRetries }, say) => [
|
|
26
68
|
...networkMiddlewares.basic({
|
|
27
69
|
floodWaiter: {
|
|
28
70
|
maxWait,
|
|
29
71
|
maxRetries,
|
|
30
|
-
onBeforeWait: (context, seconds) =>
|
|
72
|
+
onBeforeWait: (context, seconds) => {
|
|
73
|
+
const tried = tries.get(context);
|
|
74
|
+
if (tried)
|
|
75
|
+
tried.waitMs = seconds * 1000;
|
|
76
|
+
say(`Telegram asks to wait ${seconds} s before ${context.request._} — waiting, then going on`);
|
|
77
|
+
},
|
|
31
78
|
},
|
|
32
79
|
}),
|
|
80
|
+
// Inside the flood and internal-error waiters, so each retry they make is a line of its own.
|
|
81
|
+
recordRequest,
|
|
33
82
|
noteAcceptedSend,
|
|
34
83
|
];
|
|
35
84
|
/** One send. A rate limit before Telegram accepted it sent nothing, so `retry.safe` may say so. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sending.js","sourceRoot":"","sources":["../../src/telegram/sending.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"sending.js","sourceRoot":"","sources":["../../src/telegram/sending.ts"],"names":[],"mappings":"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"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.102.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "0.
|
|
1
|
+
export const VERSION = "0.102.0";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wirecat/tg-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "A local command line interface for a personal Telegram account, built for agents and scripts",
|
|
5
5
|
"mcpName": "dev.wirecat/tg-cli",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@mtcute/node": "0.32.7",
|
|
73
73
|
"@wirecat/cli-base": "0.64.0",
|
|
74
|
-
"@wirecat/cli-core": "0.
|
|
74
|
+
"@wirecat/cli-core": "0.467.0",
|
|
75
75
|
"commander": "15.0.0",
|
|
76
76
|
"undici": "8.12.3",
|
|
77
77
|
"valibot": "1.5.0"
|