@wirecat/tg-cli 0.132.0 → 0.134.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 +139 -319
- 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-OXVMOWVE.js → adapter-Y4IXTXAG.js} +104 -68
- package/dist/bundle/agent-G7VHOJMS.js +37 -0
- package/dist/bundle/{all-profiles-6OQC7PBL.js → all-profiles-SUGID6CX.js} +62 -20
- package/dist/bundle/{anthropic-YFMIHFW5.js → anthropic-4QKTXT4B.js} +5 -5
- package/dist/bundle/{app-server-S7CJPJXN.js → app-server-TPOD6LIJ.js} +75 -65
- package/dist/bundle/{bot-api-KJ6EZ4R6.js → bot-api-KBESP422.js} +73 -91
- package/dist/bundle/{bot-history-JYCXDFW4.js → bot-history-3EORA23G.js} +23 -22
- package/dist/bundle/{bun-FVTOBYZ2.js → bun-FL76M4M2.js} +2 -2
- package/dist/bundle/{bun-sqlite-KDGWBNOR.js → bun-sqlite-H37OSTAJ.js} +6 -6
- package/dist/bundle/{chunk-JZJV3DYK.js → chunk-2GT563YH.js} +2 -2
- package/dist/bundle/{chunk-EPR67IRV.js → chunk-2JWY7CXJ.js} +4 -4
- package/dist/bundle/{chunk-UGD4SCUI.js → chunk-3O25FAPA.js} +3 -4
- package/dist/bundle/{chunk-AERP2QR6.js → chunk-3PG6QVQZ.js} +11 -25
- package/dist/bundle/{chunk-DXPGMUOR.js → chunk-3QQWTP77.js} +2 -2
- package/dist/bundle/{chunk-FIUH52FE.js → chunk-3ZNO27UE.js} +1 -1
- package/dist/bundle/{chunk-Y57EKZZK.js → chunk-4R2ZJGFF.js} +3274 -1674
- package/dist/bundle/{chunk-6LPUK62N.js → chunk-4S2DHHJM.js} +2 -100
- package/dist/bundle/{chunk-LF6FACSW.js → chunk-4X6BX3XP.js} +144 -10
- package/dist/bundle/{chunk-LZ3HFDYL.js → chunk-6DGVK5KS.js} +2 -2
- package/dist/bundle/chunk-6DJJVFSG.js +388 -0
- package/dist/bundle/{chunk-BSXS7VAC.js → chunk-6MEHKUN6.js} +1 -1
- package/dist/bundle/{chunk-44A2XRDE.js → chunk-6UNLEQA5.js} +31 -20
- package/dist/bundle/{chunk-M2TV6BDB.js → chunk-77E7Q4EQ.js} +7 -7
- package/dist/bundle/chunk-7GGDCQJ5.js +353 -0
- package/dist/bundle/{chunk-OGZZUDJJ.js → chunk-AHVWZDXO.js} +79 -64
- package/dist/bundle/{chunk-YVI5SQPY.js → chunk-ANBI3OXK.js} +1 -1
- package/dist/bundle/{chunk-PR4F3TYK.js → chunk-AYWST6NA.js} +60 -51
- package/dist/bundle/{chunk-7SEVVE3X.js → chunk-CA7DY2YU.js} +3 -3
- package/dist/bundle/{chunk-O43PARFS.js → chunk-CDKXZLMP.js} +273 -176
- package/dist/bundle/{chunk-YAPO7QNO.js → chunk-CNGNR4CY.js} +6 -6
- package/dist/bundle/{chunk-2UGSIHLV.js → chunk-CSXCCK6J.js} +2 -2
- package/dist/bundle/{chunk-N5LZ6L4D.js → chunk-DG35TQ6P.js} +3 -3
- package/dist/bundle/{chunk-LMGVPDXN.js → chunk-EXMAWEHC.js} +2 -2
- package/dist/bundle/{chunk-A5D3J7XZ.js → chunk-FR3ATU5I.js} +4 -4
- package/dist/bundle/{chunk-JDNDWZYS.js → chunk-FR4Y5CGW.js} +4 -4
- package/dist/bundle/{chunk-YSNQGOUI.js → chunk-GIGZTI74.js} +2115 -1975
- package/dist/bundle/{chunk-3QHKZLBU.js → chunk-H3TLAYGY.js} +4 -4
- package/dist/bundle/{chunk-KJICORS4.js → chunk-HD7DV5B2.js} +65 -43
- package/dist/bundle/{chunk-NLRGMP7M.js → chunk-HETHFOHC.js} +3 -3
- package/dist/bundle/{chunk-4YB7JU2W.js → chunk-HEZK4W3U.js} +6 -6
- package/dist/bundle/{chunk-2LZD2VFV.js → chunk-IJ7R2WMK.js} +4 -4
- package/dist/bundle/{chunk-4ZTVJHWU.js → chunk-ITJ7DGNA.js} +4 -4
- package/dist/bundle/{chunk-5UPEEMEF.js → chunk-J5RB4ASI.js} +142 -372
- package/dist/bundle/{chunk-IY7CTAOQ.js → chunk-JAL443BH.js} +9 -9
- package/dist/bundle/{chunk-U7PHJSTX.js → chunk-JCDD5T3A.js} +2 -2
- package/dist/bundle/{chunk-BLZEQVP4.js → chunk-JHZJBNDO.js} +2 -2
- package/dist/bundle/chunk-JWLODUN3.js +555 -0
- package/dist/bundle/{chunk-4CKYANQH.js → chunk-JWNSG5GI.js} +1 -1
- package/dist/bundle/{chunk-YRXSNH3R.js → chunk-JXEO5EIN.js} +2 -2
- package/dist/bundle/{chunk-DSJNZXTP.js → chunk-K5FK6WWN.js} +1 -1
- package/dist/bundle/{chunk-LG3K5NHX.js → chunk-L47PFECD.js} +7 -7
- package/dist/bundle/{chunk-OIRNHSAH.js → chunk-L4PNDW4S.js} +6 -6
- package/dist/bundle/{chunk-WAVRUADL.js → chunk-M323L5SG.js} +30 -15
- package/dist/bundle/{chunk-AUZWIBHJ.js → chunk-MMDFPBFZ.js} +43 -64
- package/dist/bundle/{chunk-FKGYXIN7.js → chunk-MUV73B5A.js} +7 -7
- package/dist/bundle/chunk-MXA3FU2R.js +116 -0
- package/dist/bundle/{chunk-42MXCMW6.js → chunk-NUD4CBHK.js} +3 -3
- package/dist/bundle/{chunk-PG37E63A.js → chunk-NYEVPAF2.js} +511 -472
- package/dist/bundle/{chunk-QS46C5SW.js → chunk-O3QBO6NW.js} +17 -17
- package/dist/bundle/{chunk-CFWFESBO.js → chunk-O4ZOQJ6W.js} +9 -9
- package/dist/bundle/{chunk-74UPKW7H.js → chunk-OJSPB4LA.js} +2 -2
- package/dist/bundle/{chunk-JNWKV3QV.js → chunk-PCBVSHKD.js} +4 -4
- package/dist/bundle/{chunk-5RDNBG7D.js → chunk-PK5WEGPJ.js} +2 -2
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/{chunk-BMI2NWFI.js → chunk-PRI2XTM7.js} +35 -12
- package/dist/bundle/chunk-PRM7GKBV.js +340 -0
- package/dist/bundle/{chunk-ZZ32DXTH.js → chunk-PZ2ZFPGO.js} +1 -1
- package/dist/bundle/chunk-QYRK4XXH.js +727 -0
- package/dist/bundle/{chunk-QNEAPLOP.js → chunk-RVA3CRSY.js} +12 -12
- package/dist/bundle/{chunk-4EDJJQJI.js → chunk-SPXNI53Z.js} +38 -9
- package/dist/bundle/{chunk-ZRW3DF25.js → chunk-TI5U6AUT.js} +34 -28
- package/dist/bundle/{chunk-SMQ45RZX.js → chunk-TKWYXM7L.js} +9 -60
- package/dist/bundle/{chunk-ZJIGVT6Z.js → chunk-TZCFJJEU.js} +6 -6
- package/dist/bundle/chunk-UTTEAOJ3.js +7 -0
- package/dist/bundle/chunk-V6G4LTXU.js +50 -0
- package/dist/bundle/{chunk-JMJOWT4N.js → chunk-VH4J7IIS.js} +1 -1
- package/dist/bundle/{chunk-UAFSDTID.js → chunk-VNJRWFHP.js} +1 -1
- package/dist/bundle/chunk-W2QSDPG6.js +80 -0
- package/dist/bundle/{chunk-ESOFH7PA.js → chunk-WGGUKQE7.js} +134 -558
- package/dist/bundle/{chunk-NWDADTPE.js → chunk-WPXVJGSL.js} +3 -3
- package/dist/bundle/{chunk-NWCFO37P.js → chunk-XLNV3U6N.js} +3 -3
- package/dist/bundle/{chunk-JPSRC732.js → chunk-XS4EE7MO.js} +17 -15
- package/dist/bundle/{chunk-FPSRT2TX.js → chunk-XVRLD3LN.js} +2 -2
- package/dist/bundle/{chunk-O3AM32YN.js → chunk-XZ6XEAJP.js} +18 -18
- package/dist/bundle/{chunk-B4LGDOG5.js → chunk-YHTSJMZ5.js} +3734 -3380
- package/dist/bundle/chunk-YPJCURT6.js +108 -0
- package/dist/bundle/{chunk-HBSKP7OV.js → chunk-Z77R76S2.js} +1 -1
- package/dist/bundle/{chunk-PYECFCPD.js → chunk-ZC7OEYDX.js} +1 -1
- package/dist/bundle/{chunk-IYJ4B632.js → chunk-ZW2N2GI2.js} +12 -12
- package/dist/bundle/command-contract-LEFXJAA3.js +37 -0
- package/dist/bundle/{command-server-entry-TM264M2J.js → command-server-entry-WQAE5UGU.js} +27 -27
- package/dist/bundle/{decode-RJFOSHCE.js → decode-2J2DOVGV.js} +5 -5
- package/dist/bundle/{dispatch-7OZP3X4O.js → dispatch-IZ2TP5GW.js} +8 -8
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/{echarts-PYKF4D7B.js → echarts-GFIIHZ4U.js} +2 -2
- package/dist/bundle/{embed-JFN6Z5TG.js → embed-AGOXADHW.js} +6 -6
- package/dist/bundle/{embedder-WN54JIMY.js → embedder-PCIXGM2Y.js} +9 -9
- package/dist/bundle/{entry-Z6LO6N6S.js → entry-HUQXUV52.js} +9 -9
- package/dist/bundle/{failure-UONA2IA5.js → failure-JSRHZ2S6.js} +2 -2
- package/dist/bundle/{first-run-WQAKES7G.js → first-run-2LXN7B33.js} +12 -12
- package/dist/bundle/first-screen-VUE6RCSF.js +37 -0
- package/dist/bundle/{instructions-PR4BBBTM.js → instructions-RSLTJVFJ.js} +1 -1
- package/dist/bundle/{mcp-O6ACR2DX.js → mcp-MMENCB7I.js} +2 -2
- package/dist/bundle/meeting-combined-PBNPHOM3.js +23 -0
- package/dist/bundle/{meeting-model-YVTUOM4H.js → meeting-model-SI77WMMK.js} +11 -11
- package/dist/bundle/{meeting-semantic-X4KG6RNV.js → meeting-semantic-WRXWUR4M.js} +6 -6
- package/dist/bundle/{node-OVS5LTVZ.js → node-5XGMCUGQ.js} +2 -2
- package/dist/bundle/{node-sqlite-LC44SM4Z.js → node-sqlite-ES7SQSIC.js} +7 -7
- package/dist/bundle/{oauth-NSVUFQCW.js → oauth-QFM4Y6N7.js} +8 -8
- package/dist/bundle/{open-XN5SJFVY.js → open-2MD2DKGQ.js} +5 -5
- package/dist/bundle/{openai-WOYZHJNL.js → openai-6TMKJKYO.js} +15 -15
- package/dist/bundle/{process-UFBRGTQC.js → process-VA2DP7MY.js} +1 -1
- package/dist/bundle/{program-RAGBRRQH.js → program-K3SLEA42.js} +70 -63
- package/dist/bundle/{prompt-6HAKBUQN.js → prompt-VZSPCE6E.js} +5 -5
- package/dist/bundle/{proxy-transport-5EJVFUTC.js → proxy-transport-OJU2EOOC.js} +5 -5
- package/dist/bundle/{recognize-CN5COBVJ.js → recognize-LH3ZZEIL.js} +4 -4
- package/dist/bundle/{remote-STX5AMGE.js → remote-JNW5HN2I.js} +9 -9
- package/dist/bundle/{rerank-ZCOWTXIJ.js → rerank-P23UJMII.js} +7 -7
- package/dist/bundle/{serve-XMQEOIG2.js → serve-VSLLMILH.js} +15 -15
- package/dist/bundle/{server-PGGUD3DM.js → server-FBRRRKCS.js} +68 -57
- package/dist/bundle/server-TA4QP7PG.js +78 -0
- package/dist/bundle/{sqlite-runtime-PS4DSOIU.js → sqlite-runtime-LWATDAAU.js} +6 -6
- package/dist/bundle/{state-GL4ZC57O.js → state-3AFJL2EL.js} +6 -6
- package/dist/bundle/{store-VISFXSHL.js → store-6TLYL2VU.js} +30 -17
- package/dist/bundle/{store-HJ76TLWD.js → store-PEXV5DNA.js} +24 -19
- package/dist/bundle/store-maintenance-command-IYJLUQ5X.js +65 -0
- package/dist/bundle/surface-L4VY4WFG.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 +80 -576
- package/skills/tg-cli/references/files.md +64 -0
- package/skills/tg-cli/references/history.md +22 -0
- package/skills/tg-cli/references/mcp-and-bots.md +54 -0
- package/skills/tg-cli/references/messages.md +115 -0
- package/skills/tg-cli/references/people.md +85 -0
- package/skills/tg-cli/references/search.md +132 -0
- package/skills/tg-cli/references/setup.md +91 -0
- package/skills/tg-cli/references/stats.md +45 -0
- package/skills/tg-cli/references/tasks.md +54 -0
- package/dist/bundle/chunk-VKE77B3F.js +0 -2
- package/dist/bundle/command-contract-FRH7LBGE.js +0 -37
- package/dist/bundle/first-screen-4RFG22SA.js +0 -35
- package/dist/bundle/meeting-combined-MHWTZOF2.js +0 -23
- package/dist/bundle/server-WTNYWCZ4.js +0 -69
- package/dist/bundle/store-maintenance-command-SMARMN5C.js +0 -60
|
@@ -3,12 +3,12 @@ const require = __bundleRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
CliError,
|
|
5
5
|
errorCodes
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PK5WEGPJ.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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/errors/failures.js
|
|
12
12
|
var isCliFailure = /* @__PURE__ */ __name((value) => value instanceof Error && value.name === "CliError" && errorCodes.includes(value.code), "isCliFailure");
|
|
13
13
|
var isCommanderFailure = /* @__PURE__ */ __name((value) => {
|
|
14
14
|
const { code, exitCode } = value ?? {};
|
|
@@ -60,7 +60,7 @@ var damagedFile = /* @__PURE__ */ __name(async (files, work) => {
|
|
|
60
60
|
}, "damagedFile");
|
|
61
61
|
var isStoreDamage = /* @__PURE__ */ __name((error) => damageIn(error) !== void 0, "isStoreDamage");
|
|
62
62
|
|
|
63
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
63
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/runs/secrets.js
|
|
64
64
|
var SECRET_WORDS = /* @__PURE__ */ new Set([
|
|
65
65
|
"authorization",
|
|
66
66
|
"cookie",
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
id,
|
|
6
6
|
text,
|
|
7
7
|
time
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HD7DV5B2.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-SPXNI53Z.js";
|
|
20
20
|
|
|
21
|
-
// node_modules/.pnpm/@wirecat+cli-core@0.
|
|
21
|
+
// node_modules/.pnpm/@wirecat+cli-core@0.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/entities/note.js
|
|
22
22
|
var link = {
|
|
23
23
|
target_text: nullable(text),
|
|
24
24
|
kind: text,
|
|
@@ -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-YHTSJMZ5.js";
|
|
23
21
|
import {
|
|
24
22
|
servingProfiles
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HETHFOHC.js";
|
|
24
|
+
import {
|
|
25
|
+
capability,
|
|
26
|
+
throughWrapper
|
|
27
|
+
} from "./chunk-QYRK4XXH.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-4R2ZJGFF.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-CDKXZLMP.js";
|
|
55
57
|
import {
|
|
56
58
|
providerErrorKey
|
|
57
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-L47PFECD.js";
|
|
58
60
|
import {
|
|
59
61
|
isCliFailure
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-WPXVJGSL.js";
|
|
61
63
|
import {
|
|
62
64
|
CliError
|
|
63
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-PK5WEGPJ.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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/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 {
|
|
@@ -2,12 +2,12 @@ import { createRequire as __bundleRequire } from "node:module";
|
|
|
2
2
|
const require = __bundleRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
resolvePaths
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6UNLEQA5.js";
|
|
6
6
|
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.714.0_@napi-rs+canvas@1.0.13_@wirecat+cli-base@0.122.0_commander@15_dd9fedf917a0d541ef7fdcdb0be0e64b/node_modules/@wirecat/cli-core/dist/store/path.js
|
|
11
11
|
import { realpathSync } from "node:fs";
|
|
12
12
|
import { userInfo } from "node:os";
|
|
13
13
|
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
@@ -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-GIGZTI74.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-CSXCCK6J.js";
|
|
24
21
|
import {
|
|
25
22
|
messengerContext
|
|
26
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-XS4EE7MO.js";
|
|
27
24
|
import {
|
|
25
|
+
apiJson,
|
|
26
|
+
apiPlainJson,
|
|
27
|
+
parseApiJson,
|
|
28
28
|
uploadBlob
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-YHTSJMZ5.js";
|
|
30
30
|
import {
|
|
31
31
|
DESKTOP,
|
|
32
32
|
TG
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-EXMAWEHC.js";
|
|
34
34
|
import {
|
|
35
35
|
asFirstWord,
|
|
36
36
|
environmentOf,
|
|
37
37
|
fromFile,
|
|
38
38
|
settingsFor
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-CDKXZLMP.js";
|
|
40
40
|
import {
|
|
41
41
|
hostFetch
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-4X6BX3XP.js";
|
|
43
43
|
import {
|
|
44
44
|
currentAttempt
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-HD7DV5B2.js";
|
|
46
46
|
import {
|
|
47
47
|
Credentials,
|
|
48
48
|
isMovedRun,
|
|
49
49
|
pathsAreOverridden,
|
|
50
50
|
resolvePaths
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6UNLEQA5.js";
|
|
52
52
|
import {
|
|
53
53
|
optional
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-SPXNI53Z.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-PK5WEGPJ.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-Y4IXTXAG.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-Y4IXTXAG.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-3EORA23G.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-Y4IXTXAG.js")).TelegramAdapter.open({
|
|
1003
1003
|
credentials,
|
|
1004
1004
|
sessionPath: personalPath,
|
|
1005
1005
|
checks: words,
|