@wirecat/tg-cli 0.99.0 → 0.101.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 +6 -5
- package/dist/bin/tg.js +23 -28
- package/dist/bundle/adapter-A3VD4Y6Z.js +2790 -0
- package/dist/bundle/all-profiles-UPVNHXB2.js +264 -0
- package/dist/bundle/anthropic-IRKNWPIB.js +71 -0
- package/dist/bundle/bot-api-UNTQG2M5.js +39793 -0
- package/dist/bundle/bot-history-V4RTY5K7.js +167 -0
- package/dist/bundle/bun-2JZPG2NL.js +169 -0
- package/dist/bundle/bun-sqlite-TZHKM225.js +70 -0
- package/dist/bundle/chunk-22PQUX72.js +190 -0
- package/dist/bundle/chunk-2DGOFLDA.js +58 -0
- package/dist/bundle/chunk-2SJOUK6J.js +2 -0
- package/dist/bundle/chunk-2XBSVRT2.js +98 -0
- package/dist/bundle/chunk-3KHKYYCR.js +24782 -0
- package/dist/bundle/chunk-4ZS73HTJ.js +6848 -0
- package/dist/bundle/chunk-54R2GDQ3.js +119 -0
- package/dist/bundle/chunk-5GKXETRP.js +1345 -0
- package/dist/bundle/chunk-5KU4UQBM.js +570 -0
- package/dist/bundle/chunk-5TPT2S2Z.js +41 -0
- package/dist/bundle/chunk-64DK7S4F.js +76 -0
- package/dist/bundle/chunk-6IPY2QRG.js +82 -0
- package/dist/bundle/chunk-7BFO3DY6.js +21 -0
- package/dist/bundle/chunk-7CBUCTB6.js +1142 -0
- package/dist/bundle/chunk-A5JSTZZZ.js +122 -0
- package/dist/bundle/chunk-ACGTFLEB.js +1275 -0
- package/dist/bundle/chunk-AFV74GK3.js +50 -0
- package/dist/bundle/chunk-AVWK4NCW.js +24600 -0
- package/dist/bundle/chunk-BJG6JA5U.js +35 -0
- package/dist/bundle/chunk-BX6HH4F6.js +215 -0
- package/dist/bundle/chunk-BXQS5RCE.js +8170 -0
- package/dist/bundle/chunk-CJ6IYCYP.js +583 -0
- package/dist/bundle/chunk-DG62L57H.js +2795 -0
- package/dist/bundle/chunk-DYNSP6FW.js +33720 -0
- package/dist/bundle/chunk-F7TDFWXY.js +82 -0
- package/dist/bundle/chunk-G2US6LJB.js +35 -0
- package/dist/bundle/chunk-G3ZRY436.js +3077 -0
- package/dist/bundle/chunk-G77QOTXE.js +18 -0
- package/dist/bundle/chunk-H6OXALTJ.js +45 -0
- package/dist/bundle/chunk-LPB2MDUW.js +452 -0
- package/dist/bundle/chunk-MLLJ74LM.js +24 -0
- package/dist/bundle/chunk-N5UFBWDM.js +166 -0
- package/dist/bundle/chunk-NC5WS7OP.js +31 -0
- package/dist/bundle/chunk-NKJJJAIJ.js +237 -0
- package/dist/bundle/chunk-NMGO6LW6.js +1950 -0
- package/dist/bundle/chunk-ODSVNH3H.js +18588 -0
- package/dist/bundle/chunk-OEJ5DMCX.js +2374 -0
- package/dist/bundle/chunk-OILBDLWL.js +724 -0
- package/dist/bundle/chunk-OPBTNQ35.js +1007 -0
- package/dist/bundle/chunk-PUBS2F5J.js +35803 -0
- package/dist/bundle/chunk-PYTOIDSM.js +153 -0
- package/dist/bundle/chunk-QOWSVDPZ.js +3526 -0
- package/dist/bundle/chunk-QYVVRQTN.js +73 -0
- package/dist/bundle/chunk-RF54YDBB.js +46 -0
- package/dist/bundle/chunk-RVCS7Q3A.js +6672 -0
- package/dist/bundle/chunk-S2JSZWEC.js +277 -0
- package/dist/bundle/chunk-S7ZNLLY5.js +54 -0
- package/dist/bundle/chunk-TGREFJVA.js +2315 -0
- package/dist/bundle/chunk-U46UNBMT.js +524 -0
- package/dist/bundle/chunk-UN6CKIBN.js +285 -0
- package/dist/bundle/chunk-VA5YEJS3.js +161 -0
- package/dist/bundle/chunk-VCGL2ETF.js +78 -0
- package/dist/bundle/chunk-VRSN7VLO.js +63 -0
- package/dist/bundle/chunk-VYDTI254.js +3332 -0
- package/dist/bundle/chunk-W2336E7Y.js +886 -0
- package/dist/bundle/chunk-X4Y2ROJI.js +541 -0
- package/dist/bundle/chunk-XCKD54TN.js +100 -0
- package/dist/bundle/chunk-ZEOCU24Z.js +738 -0
- package/dist/bundle/chunk-ZJVZXJOG.js +71 -0
- package/dist/bundle/chunk-ZV24I2UJ.js +25 -0
- package/dist/bundle/chunk-ZZLKX62Z.js +928 -0
- package/dist/bundle/command-contract-TKDI7E56.js +31 -0
- package/dist/bundle/dist-RJMT44PL.js +7577 -0
- package/dist/bundle/echarts-QZ6PR3VC.js +42501 -0
- package/dist/bundle/embed-UBXCXSRD.js +35 -0
- package/dist/bundle/embedder-B4ZTKC23.js +108 -0
- package/dist/bundle/entry-BTUTHO5M.js +14 -0
- package/dist/bundle/first-run-UC4HRIFV.js +24 -0
- package/dist/bundle/first-screen-SMCX6YKY.js +29 -0
- package/dist/bundle/identity-QSDEGDH7.js +11 -0
- package/dist/bundle/instructions-BBGLZKO3.js +9 -0
- package/dist/bundle/mcp-4Y37G2UY.js +165 -0
- package/dist/bundle/node-IUL5HSYI.js +2340 -0
- package/dist/bundle/node-LZZX22VR.js +176 -0
- package/dist/bundle/node-UPPL626U.js +21 -0
- package/dist/bundle/node-sqlite-BPGT6T5U.js +46 -0
- package/dist/bundle/oauth-XNE2KPKJ.js +18 -0
- package/dist/bundle/open-SXGYZLB5.js +20 -0
- package/dist/bundle/process-GPUXC4PG.js +91 -0
- package/dist/bundle/program-NEXEAL7T.js +1060 -0
- package/dist/bundle/prompt-SORGLEYI.js +13 -0
- package/dist/bundle/proxy-transport-G4MA6BGU.js +17 -0
- package/dist/bundle/recognize-UJBXORVD.js +191 -0
- package/dist/bundle/remote-W72AR7KH.js +26 -0
- package/dist/bundle/rerank-3Y2VZM3J.js +49 -0
- package/dist/bundle/serve-VDZIVOPR.js +196 -0
- package/dist/bundle/server-BERXP4GW.js +785 -0
- package/dist/bundle/server-ZFHN4GUF.js +178 -0
- package/dist/bundle/state-DGR4EE3E.js +34 -0
- package/dist/bundle/store-MRCFSCZD.js +121 -0
- package/dist/bundle/store-maintenance-command-DCMZDMYS.js +46 -0
- package/dist/bundle/tg.js +40 -0
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +3 -1
- package/dist/commands/context.js.map +1 -1
- package/dist/install/postinstall.js +1 -1
- package/dist/install/postinstall.js.map +1 -1
- package/dist/program.js +1 -1
- package/dist/program.js.map +1 -1
- package/dist/telegram/errors.js +1 -1
- package/dist/telegram/errors.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/install/windows.ps1 +1 -1
- package/package.json +6 -4
- package/skills/{wirecat-tg → tg-cli}/SKILL.md +4 -4
package/README.md
CHANGED
|
@@ -100,11 +100,11 @@ More: [recipes, with a schedule and limits for each](https://github.com/WireCatL
|
|
|
100
100
|
Your agent. Your Telegram. Your rules.
|
|
101
101
|
|
|
102
102
|
- **Agents with a terminal** (for example Claude Code, Codex, Gemini CLI) run `tg` commands
|
|
103
|
-
themselves. The bundled [skill](https://github.com/WireCatLabs/tg-cli/blob/main/skills/
|
|
103
|
+
themselves. The bundled [skill](https://github.com/WireCatLabs/tg-cli/blob/main/skills/tg-cli/SKILL.md)
|
|
104
104
|
tells them how: `tg personal setup --agent …` or `tg skill install` puts it in place, and `tg skill show`
|
|
105
105
|
prints it before login.
|
|
106
106
|
- **Apps without a terminal** (for example Claude Desktop, Cursor and other MCP clients) connect to
|
|
107
|
-
`tg personal mcp`. It comes with ready prompts: `/catch-up`, `/review`, `/reply`, `/find`, `/open-tasks` and `/link-conversations`.
|
|
107
|
+
`tg personal mcp serve`. It comes with ready prompts: `/catch-up`, `/review`, `/reply`, `/find`, `/open-tasks` and `/link-conversations`.
|
|
108
108
|
|
|
109
109
|
```sh
|
|
110
110
|
tg personal mcp add claude-code # or: tg personal mcp add codex
|
|
@@ -268,11 +268,11 @@ profile's `permissions` decide which may run. `readonly` stops writes; at `ask`
|
|
|
268
268
|
form, so set up approval in your agent app.
|
|
269
269
|
|
|
270
270
|
```sh
|
|
271
|
-
claude mcp add tg -- tg personal mcp # Claude Code, by hand
|
|
271
|
+
claude mcp add tg -- tg personal mcp serve # Claude Code, by hand
|
|
272
272
|
tg personal mcp check # check the local MCP server
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
**From the browser.** ChatGPT or Claude in the browser reach `tg personal mcp --http --public-url <url>` behind
|
|
275
|
+
**From the browser.** ChatGPT or Claude in the browser reach `tg personal mcp serve --http --public-url <url>` behind
|
|
276
276
|
your tunnel, after a login with a one-time access code from your terminal.
|
|
277
277
|
|
|
278
278
|
More: [the MCP server](https://github.com/WireCatLabs/tg-cli/blob/main/docs/mcp.md) · [on wirecat.dev](https://wirecat.dev/en/docs/tg/mcp) · [remote access](https://github.com/WireCatLabs/tg-cli/blob/main/docs/remote.md) · [on wirecat.dev](https://wirecat.dev/en/docs/tg/remote)
|
|
@@ -401,7 +401,8 @@ What each version changed: [CHANGELOG.md](https://github.com/WireCatLabs/tg-cli/
|
|
|
401
401
|
```sh
|
|
402
402
|
pnpm install
|
|
403
403
|
pnpm lint && pnpm typecheck && pnpm test
|
|
404
|
-
pnpm build && pnpm smoke:
|
|
404
|
+
pnpm build && pnpm smoke:node # the built command, the bundle a user installs
|
|
405
|
+
pnpm build && pnpm smoke:bun # the same under Bun
|
|
405
406
|
pnpm generate # rewrites docs/commands.md from the command tree
|
|
406
407
|
bin/tg session start # everything under .tg/ in this checkout, never the real profile
|
|
407
408
|
```
|
package/dist/bin/tg.js
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
process.stderr.write(`tg: finished, but ${process.getActiveResourcesInfo().join(", ")} stayed open — exiting anyway\n`);
|
|
26
|
-
process.exit();
|
|
27
|
-
}, 5_000);
|
|
28
|
-
lingering.unref();
|
|
29
|
-
//# sourceMappingURL=tg.js.map
|
|
2
|
+
// tg: bundle loader
|
|
3
|
+
import * as module from "node:module"
|
|
4
|
+
|
|
5
|
+
// Before the bundle compiles: the bundle's own call comes after its chunks.
|
|
6
|
+
module.enableCompileCache()
|
|
7
|
+
const words = process.argv.slice(2)
|
|
8
|
+
const serves = words
|
|
9
|
+
.slice(0, 3)
|
|
10
|
+
.some((word, at) => ["serve", "watch"].includes(word) || (word === "mcp" && !/^[^-]/.test(words[at + 1] ?? "")))
|
|
11
|
+
if (serves && module.registerHooks) {
|
|
12
|
+
const bundle = new URL("../bundle/", import.meta.url).href
|
|
13
|
+
module.registerHooks({
|
|
14
|
+
resolve: (specifier, context, next) =>
|
|
15
|
+
specifier.startsWith("./") && context.parentURL?.startsWith(bundle)
|
|
16
|
+
? { url: new URL(specifier, context.parentURL).href, format: "module", shortCircuit: true }
|
|
17
|
+
: next(specifier, context),
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
const running = import("../bundle/tg.js")
|
|
21
|
+
const chunks = ["../bundle/adapter-A3VD4Y6Z.js","../bundle/all-profiles-UPVNHXB2.js","../bundle/anthropic-IRKNWPIB.js","../bundle/bot-api-UNTQG2M5.js","../bundle/bot-history-V4RTY5K7.js","../bundle/bun-2JZPG2NL.js","../bundle/bun-sqlite-TZHKM225.js","../bundle/command-contract-TKDI7E56.js","../bundle/dist-RJMT44PL.js","../bundle/echarts-QZ6PR3VC.js","../bundle/embed-UBXCXSRD.js","../bundle/embedder-B4ZTKC23.js","../bundle/entry-BTUTHO5M.js","../bundle/first-run-UC4HRIFV.js","../bundle/first-screen-SMCX6YKY.js","../bundle/identity-QSDEGDH7.js","../bundle/instructions-BBGLZKO3.js","../bundle/mcp-4Y37G2UY.js","../bundle/node-IUL5HSYI.js","../bundle/node-LZZX22VR.js","../bundle/node-UPPL626U.js","../bundle/node-sqlite-BPGT6T5U.js","../bundle/oauth-XNE2KPKJ.js","../bundle/open-SXGYZLB5.js","../bundle/process-GPUXC4PG.js","../bundle/program-NEXEAL7T.js","../bundle/prompt-SORGLEYI.js","../bundle/proxy-transport-G4MA6BGU.js","../bundle/recognize-UJBXORVD.js","../bundle/remote-W72AR7KH.js","../bundle/rerank-3Y2VZM3J.js","../bundle/serve-VDZIVOPR.js","../bundle/server-BERXP4GW.js","../bundle/server-ZFHN4GUF.js","../bundle/state-DGR4EE3E.js","../bundle/store-MRCFSCZD.js","../bundle/store-maintenance-command-DCMZDMYS.js"]
|
|
22
|
+
// After the server answers its first request, so it starts no later.
|
|
23
|
+
if (serves) setTimeout(() => void Promise.allSettled(chunks.map((chunk) => import(chunk))), 2000).unref()
|
|
24
|
+
await running
|