teleton 0.7.4 → 0.7.5

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.
Files changed (35) hide show
  1. package/README.md +36 -26
  2. package/dist/{chunk-XDYDA2KV.js → chunk-2GLHOJ5C.js} +268 -59
  3. package/dist/chunk-5UVXJMOX.js +292 -0
  4. package/dist/{chunk-BGC2IUM5.js → chunk-AVDWXYQ7.js} +65 -20
  5. package/dist/{chunk-RMLQS3X6.js → chunk-CB2Y45HA.js} +106 -1
  6. package/dist/{chunk-5PLZ3KSO.js → chunk-DMXTIRUW.js} +5 -6
  7. package/dist/{chunk-YFG2QHLA.js → chunk-G2LLMJXJ.js} +1578 -115
  8. package/dist/{chunk-EK7M5K26.js → chunk-LCCVZ4D2.js} +3 -3
  9. package/dist/{chunk-LAQOUFOJ.js → chunk-OGMVWDVU.js} +3517 -3620
  10. package/dist/{chunk-4DU3C27M.js → chunk-R4YSJ4EY.js} +5 -1
  11. package/dist/{chunk-XBKSS6DM.js → chunk-VFA7QMCZ.js} +5 -3
  12. package/dist/{chunk-VAUJSSD3.js → chunk-XQUHC3JZ.js} +1 -1
  13. package/dist/{chunk-RO62LO6Z.js → chunk-YP25WTQK.js} +2 -0
  14. package/dist/cli/index.js +92 -28
  15. package/dist/{client-RTNALK7W.js → client-O37XDCJB.js} +4 -5
  16. package/dist/index.js +12 -13
  17. package/dist/{memory-JQZ6MTRU.js → memory-KQALFUV3.js} +6 -7
  18. package/dist/{migrate-GS5ACQDA.js → migrate-UV3WEL5D.js} +6 -7
  19. package/dist/{server-TCJOBV3D.js → server-BHHJGUDF.js} +35 -9
  20. package/dist/{setup-server-YHYJLAMA.js → setup-server-G7UG2DI3.js} +21 -9
  21. package/dist/store-H4XPNGC2.js +34 -0
  22. package/dist/{task-dependency-resolver-WKZWJLLM.js → task-dependency-resolver-VMEVJRPO.js} +2 -2
  23. package/dist/{task-executor-PD3H4MLO.js → task-executor-WWSPBJ4V.js} +1 -1
  24. package/dist/{tool-index-6HBRVXVG.js → tool-index-2KH3OB6X.js} +5 -5
  25. package/dist/web/assets/index-BrVqauzj.css +1 -0
  26. package/dist/web/assets/index-Bx8JW3gV.js +72 -0
  27. package/dist/web/assets/{index.es-CqZHj0tz.js → index.es-Pet5-M13.js} +1 -1
  28. package/dist/web/index.html +2 -2
  29. package/package.json +2 -2
  30. package/dist/chunk-JQDLW7IE.js +0 -107
  31. package/dist/chunk-UCN6TI25.js +0 -143
  32. package/dist/web/assets/index-B6M9knfJ.css +0 -1
  33. package/dist/web/assets/index-DAGeQfVZ.js +0 -72
  34. package/scripts/patch-gramjs.sh +0 -46
  35. package/scripts/postinstall.mjs +0 -16
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  ---
17
17
 
18
- <p align="center">Teleton is an autonomous AI agent platform that operates as a real Telegram user account (not a bot). It thinks through an agentic loop with tool calling, remembers conversations across sessions with hybrid RAG, and natively integrates the TON blockchain: send crypto, swap on DEXs, bid on domains, verify payments - all from a chat message. It can schedule tasks to run autonomously at any time. It ships with 100+ built-in tools, supports 10 LLM providers, and exposes a Plugin SDK so you can build your own tools on top of the platform.</p>
18
+ <p align="center">Teleton is an autonomous AI agent platform that operates as a real Telegram user account (not a bot). It thinks through an agentic loop with tool calling, remembers conversations across sessions with hybrid RAG, and natively integrates the TON blockchain: send crypto, swap on DEXs, bid on domains, verify payments - all from a chat message. It can schedule tasks to run autonomously at any time. It ships with 125+ built-in tools, supports 11 LLM providers, and exposes a Plugin SDK so you can build your own tools on top of the platform.</p>
19
19
 
20
20
  ### Key Highlights
21
21
 
@@ -24,9 +24,9 @@
24
24
  - **Multi-Provider LLM** - Anthropic, Claude Code, OpenAI, Google Gemini, xAI Grok, Groq, OpenRouter, Moonshot, Mistral, Cocoon, Local (11 providers)
25
25
  - **TON Blockchain** - Built-in W5R1 wallet, send/receive TON & jettons, swap on STON.fi and DeDust, NFTs, DNS domains
26
26
  - **Persistent memory** - Hybrid RAG (sqlite-vec + FTS5), auto-compaction with AI summarization, daily logs
27
- - **100+ built-in tools** - Messaging, media, blockchain, DEX trading, deals, DNS, journaling, and more
27
+ - **125+ built-in tools** - Messaging, media, blockchain, DEX trading, deals, DNS, exec, journaling, and more
28
28
  - **Plugin SDK** - Extend the agent with custom tools, frozen SDK with isolated databases, secrets management, lifecycle hooks
29
- - **MCP Client** - Connect external tool servers (stdio/SSE) with 2 lines of YAML, no code, no rebuild
29
+ - **MCP Client** - Connect external tool servers (stdio/SSE/Streamable HTTP) with 2 lines of YAML, no code, no rebuild
30
30
  - **Secure by design** - Prompt injection defense, sandboxed workspace, plugin isolation, wallet encryption
31
31
 
32
32
  ---
@@ -37,15 +37,16 @@
37
37
 
38
38
  | Category | Tools | Description |
39
39
  | ------------- | ----- | ------------------------------------------------------------------------------------------------------------------ |
40
- | Telegram | 73 | Messaging, media, chats, groups, polls, stickers, gifts, stars, stories, contacts, folders, profile, memory, tasks, voice transcription, scheduled messages |
40
+ | Telegram | 77 | Messaging, media, chats, groups, polls, stickers, gifts, stars, stories, contacts, folders, profile, memory, tasks, voice transcription, scheduled messages |
41
41
  | TON & Jettons | 15 | W5R1 wallet, send/receive TON & jettons, balances, prices, holders, history, charts, NFTs, smart DEX router |
42
42
  | STON.fi DEX | 5 | Swap, quote, search, trending tokens, liquidity pools |
43
43
  | DeDust DEX | 5 | Swap, quote, pools, prices, token analytics (holders, top traders, buy/sell tax) |
44
- | TON DNS | 7 | Domain auctions, bidding, linking/unlinking, resolution, availability checks |
44
+ | TON DNS | 8 | Domain auctions, bidding, linking/unlinking, TON Site hosting, resolution, availability checks |
45
45
  | Deals | 5 | P2P escrow with inline buttons, on-chain payment verification, anti double-spend |
46
46
  | Journal | 3 | Trade/operation logging with P&L tracking and natural language queries |
47
47
  | Web | 2 | Web search and page extraction via Tavily (search, fetch/extract) |
48
48
  | Workspace | 6 | Sandboxed file operations with path traversal protection |
49
+ | Exec | 4 | System execution (YOLO mode) — shell commands, file read/write, process management (off by default, admin-only) |
49
50
 
50
51
  ### Advanced Capabilities
51
52
 
@@ -61,9 +62,10 @@
61
62
  | **Scheduled Tasks** | Time-based task execution with DAG dependency resolution |
62
63
  | **Message Debouncing** | Intelligent batching of rapid group messages (DMs are always instant) |
63
64
  | **Daily Logs** | Automatic session summaries preserved across resets |
64
- | **Multi-Policy Access** | Configurable DM/group policies (open, allowlist, pairing, disabled) with per-group module permissions |
65
- | **Tool RAG** | Semantic tool selection - sends only the top-K most relevant tools per message (hybrid vector + FTS5, configurable `top_k`, `always_include` patterns) |
66
- | **MCP Client** | Connect external MCP tool servers (stdio or SSE) - auto-discovery, namespaced tools, managed via CLI or WebUI |
65
+ | **Multi-Policy Access** | Configurable DM/group policies (open, allowlist, admin-only, disabled) with per-group module permissions |
66
+ | **Tool RAG** | Semantic tool selection (enabled by default) - sends only the top-K most relevant tools per message (hybrid vector + FTS5, configurable `top_k`, `always_include` patterns) |
67
+ | **MCP Client** | Connect external MCP tool servers (stdio, SSE, or Streamable HTTP) - auto-discovery, namespaced tools, managed via CLI or WebUI |
68
+ | **System Execution** | YOLO mode — 4 system tools (shell, file read/write, process list) with audit logging, configurable timeout, admin-only scope (off by default) |
67
69
  | **Sandboxed Workspace** | Secure file system with recursive URL decoding, symlink detection, and immutable config files |
68
70
 
69
71
  ---
@@ -159,8 +161,8 @@ agent:
159
161
  max_agentic_iterations: 5
160
162
 
161
163
  telegram:
162
- dm_policy: "open" # open | allowlist | pairing | disabled
163
- group_policy: "open" # open | allowlist | disabled
164
+ dm_policy: "admin-only" # open | allowlist | admin-only | disabled
165
+ group_policy: "open" # open | allowlist | admin-only | disabled
164
166
  require_mention: true
165
167
  admin_ids: [123456789]
166
168
  owner_name: "Your Name"
@@ -181,6 +183,11 @@ webui: # Optional: Web dashboard
181
183
  port: 7777 # HTTP server port
182
184
  host: "127.0.0.1" # Localhost only (security)
183
185
  # auth_token: "..." # Auto-generated if omitted
186
+
187
+ # capabilities: # System execution (YOLO mode, off by default)
188
+ # exec:
189
+ # mode: "off" # off | yolo
190
+ # scope: "admin-only" # admin-only | allowlist | all
184
191
  ```
185
192
 
186
193
  ### Supported Models
@@ -301,7 +308,7 @@ Teleton includes an **optional web dashboard** for monitoring and configuration.
301
308
 
302
309
  ### Features
303
310
 
304
- - **Dashboard**: System status, uptime, model info, session count, memory stats, provider switching with API key validation
311
+ - **Dashboard**: System status, uptime, model info, session count, memory stats, live token usage tracking, provider switching with API key validation
305
312
  - **Tools Management**: View all tools grouped by module, toggle enable/disable, change scope per tool
306
313
  - **Plugin Marketplace**: Install, update, and manage plugins from registry with secrets management
307
314
  - **Soul Editor**: Edit SOUL.md, SECURITY.md, STRATEGY.md, MEMORY.md with unsaved changes warning
@@ -405,7 +412,7 @@ All admin commands support `/`, `!`, or `.` prefix:
405
412
  | Layer | Technology |
406
413
  |-------|------------|
407
414
  | LLM | Multi-provider via [pi-ai](https://github.com/mariozechner/pi-ai) (11 providers: Anthropic, Claude Code, OpenAI, Google, xAI, Groq, OpenRouter, Moonshot, Mistral, Cocoon, Local) |
408
- | Telegram Userbot | [GramJS](https://gram.js.org/) (MTProto) |
415
+ | Telegram Userbot | [GramJS](https://gram.js.org/) Layer 222 fork (MTProto) |
409
416
  | Inline Bot | [Grammy](https://grammy.dev/) (Bot API, for deals) |
410
417
  | Blockchain | [TON SDK](https://github.com/ton-org/ton) (W5R1 wallet) |
411
418
  | DeFi | STON.fi SDK, DeDust SDK |
@@ -414,7 +421,7 @@ All admin commands support `/`, `!`, or `.` prefix:
414
421
  | Full-Text Search | SQLite FTS5 (BM25 ranking) |
415
422
  | Embeddings | [@huggingface/transformers](https://www.npmjs.com/package/@huggingface/transformers) (local ONNX) or Voyage AI |
416
423
  | Token Counting | [js-tiktoken](https://github.com/dqbd/tiktoken) |
417
- | MCP Client | [@modelcontextprotocol/sdk](https://modelcontextprotocol.io/) (stdio + SSE transports) |
424
+ | MCP Client | [@modelcontextprotocol/sdk](https://modelcontextprotocol.io/) (stdio + SSE + Streamable HTTP) |
418
425
  | WebUI | [Hono](https://hono.dev/) (API) + React + Vite (frontend) |
419
426
  | Language | TypeScript 5.7, Node.js 20+ |
420
427
 
@@ -422,21 +429,22 @@ All admin commands support `/`, `!`, or `.` prefix:
422
429
 
423
430
  ```
424
431
  src/
425
- ├── index.ts # Entry point, TonnetApp lifecycle, graceful shutdown
432
+ ├── index.ts # Entry point, TeletonApp lifecycle, graceful shutdown
426
433
  ├── agent/ # Core agent runtime
427
434
  │ ├── runtime.ts # Agentic loop (5 iterations, tool calling, masking, compaction)
428
435
  │ ├── client.ts # Multi-provider LLM client
429
- │ └── tools/ # 100+ built-in tools
430
- │ ├── register-all.ts # Central tool registration (8 categories, 109 tools)
436
+ │ └── tools/ # 125+ built-in tools
437
+ │ ├── register-all.ts # Central tool registration (8 categories, 121 tools)
431
438
  │ ├── registry.ts # Tool registry, scope filtering, provider limits
432
- │ ├── module-loader.ts # Built-in module loading (deals +5 tools)
439
+ │ ├── module-loader.ts # Built-in module loading (deals + exec)
433
440
  │ ├── plugin-loader.ts # External plugin discovery, validation, hot-reload
434
441
  │ ├── mcp-loader.ts # MCP client (stdio/SSE), tool discovery, lifecycle
435
- │ ├── telegram/ # Telegram operations (73 tools)
442
+ │ ├── telegram/ # Telegram operations (77 tools)
436
443
  │ ├── ton/ # TON blockchain + jettons + DEX router (15 tools)
437
444
  │ ├── stonfi/ # STON.fi DEX (5 tools)
438
445
  │ ├── dedust/ # DeDust DEX (5 tools)
439
- │ ├── dns/ # TON DNS (7 tools)
446
+ │ ├── dns/ # TON DNS (8 tools)
447
+ │ ├── exec/ # System execution — YOLO mode (4 tools)
440
448
  │ ├── journal/ # Business journal (3 tools)
441
449
  │ └── workspace/ # File operations (6 tools)
442
450
  ├── deals/ # Deals module (5 tools, loaded via module-loader)
@@ -457,7 +465,7 @@ src/
457
465
  │ ├── task-dependency-resolver.ts # DAG-based task chains
458
466
  │ └── callbacks/ # Inline button routing
459
467
  ├── memory/ # Storage and knowledge
460
- │ ├── schema.ts # 10 tables, 25 indexes, FTS5, vec0, semver migrations
468
+ │ ├── schema.ts # 16 tables, 42 indexes/triggers, FTS5, vec0, semver migrations
461
469
  │ ├── database.ts # SQLite + WAL + sqlite-vec
462
470
  │ ├── search/ # RAG system (hybrid vector + BM25 fusion via RRF)
463
471
  │ ├── embeddings/ # Local ONNX + Voyage AI + caching provider
@@ -511,7 +519,9 @@ packages/sdk/ # Published @teleton-agent/sdk
511
519
  | **Wallet protection** | File permissions `0o600`, KeyPair cached (single PBKDF2), mnemonic never exposed to plugins |
512
520
  | **Memory protection** | Memory writes blocked in group chats to prevent poisoning |
513
521
  | **Payment security** | `INSERT OR IGNORE` on tx hashes prevents double-spend, atomic status transitions prevent race conditions |
514
- | **Tool scoping** | Financial tools DM-only, moderation group-only, per-chat permissions configurable at runtime |
522
+ | **Exec audit** | All YOLO mode commands logged to `exec_audit` table with user, command, output, and timestamps |
523
+ | **Pino redaction** | Structured logging with automatic redaction of apiKey, password, secret, token, mnemonic fields |
524
+ | **Tool scoping** | Financial tools DM-only, moderation group-only, admin-only policies, per-chat permissions configurable at runtime |
515
525
 
516
526
  ### Reporting Vulnerabilities
517
527
 
@@ -521,7 +531,7 @@ Do not open public issues for security vulnerabilities. Contact maintainers (t.m
521
531
 
522
532
  1. Use a dedicated Telegram account
523
533
  2. Backup your 24-word mnemonic securely offline
524
- 3. Start with restrictive policies (`allowlist`)
534
+ 3. Start with restrictive policies (`admin-only` or `allowlist`)
525
535
  4. Set file permissions: `chmod 600 ~/.teleton/wallet.json`
526
536
  5. Never commit `config.yaml` to version control
527
537
  6. Review `SECURITY.md` and customize for your use case
@@ -671,10 +681,10 @@ Full documentation is available in the [`docs/`](docs/) directory:
671
681
  See [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide.
672
682
 
673
683
  1. Fork the repository
674
- 2. Create a feature branch from `dev`
684
+ 2. Create a feature branch from `main`
675
685
  3. Make your changes
676
686
  4. Verify: `npm run typecheck && npm run lint && npm test`
677
- 5. Open a Pull Request against `dev`
687
+ 5. Open a Pull Request against `main`
678
688
 
679
689
  ---
680
690
 
@@ -711,6 +721,6 @@ MIT License - See [LICENSE](LICENSE) for details.
711
721
  ## Support
712
722
 
713
723
  - **Issues**: [GitHub Issues](https://github.com/TONresistor/teleton-agent/issues)
714
- - **Channel**: [@ResistanceTools](https://t.me/ResistanceTools)
715
- - **Group Chat**: [@ResistanceForum](https://t.me/ResistanceForum)
724
+ - **Channel**: [@teletonagents](https://t.me/teletonagents)
725
+ - **Group Chat**: [@teletonagentHQ](https://t.me/teletonagentHQ)
716
726
  - **Contact**: [@zkproof](https://t.me/zkproof)