teleton 0.6.0 → 0.7.1

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 (39) hide show
  1. package/README.md +34 -31
  2. package/dist/{chunk-6L6KGATM.js → chunk-3YM57ZAV.js} +1638 -1749
  3. package/dist/{chunk-D5I7GBV7.js → chunk-FNV5FF35.js} +22 -13
  4. package/dist/{chunk-4IPJ25HE.js → chunk-HZNZT4TG.js} +1106 -711
  5. package/dist/chunk-LRCPA7SC.js +149 -0
  6. package/dist/chunk-ND2X5FWB.js +368 -0
  7. package/dist/chunk-NERLQY2H.js +421 -0
  8. package/dist/{chunk-YBA6IBGT.js → chunk-OCLG5GKI.js} +24 -24
  9. package/dist/{chunk-ADCMUNYU.js → chunk-RBU6JXD3.js} +60 -55
  10. package/dist/chunk-RCMD3U65.js +141 -0
  11. package/dist/{chunk-ECSCVEQQ.js → chunk-UCN6TI25.js} +7 -3
  12. package/dist/{chunk-WL2Q3VRD.js → chunk-UDD7FYOU.js} +12 -4
  13. package/dist/chunk-VAUJSSD3.js +20 -0
  14. package/dist/chunk-XBE4JB7C.js +8 -0
  15. package/dist/{chunk-GDCODBNO.js → chunk-XBKSS6DM.js} +2 -16
  16. package/dist/cli/index.js +878 -433
  17. package/dist/client-3VWE7NC4.js +29 -0
  18. package/dist/{get-my-gifts-KVULMBJ3.js → get-my-gifts-RI7FAXAL.js} +3 -1
  19. package/dist/index.js +17 -11
  20. package/dist/{memory-TVDOGQXS.js → memory-5SS3Q5EA.js} +7 -5
  21. package/dist/{migrate-QIEMPOMT.js → migrate-M7SJMDOL.js} +14 -9
  22. package/dist/{server-RSWVCVY3.js → server-DS5OARW6.js} +174 -85
  23. package/dist/setup-server-C7ZTPHD5.js +934 -0
  24. package/dist/{task-dependency-resolver-72DLY2HV.js → task-dependency-resolver-WKZWJLLM.js} +19 -15
  25. package/dist/{task-executor-VXB6DAV2.js → task-executor-PD3H4MLO.js} +4 -1
  26. package/dist/tool-adapter-Y3TCEQOC.js +145 -0
  27. package/dist/{tool-index-DKI2ZNOU.js → tool-index-MIVK3D7H.js} +14 -9
  28. package/dist/{transcript-7V4UNID4.js → transcript-UDJZP6NK.js} +2 -1
  29. package/dist/web/assets/complete-fZLnb5Ot.js +1 -0
  30. package/dist/web/assets/index-BqwoDycr.js +72 -0
  31. package/dist/web/assets/index-CRDIf07k.css +1 -0
  32. package/dist/web/assets/index.es-D81xLR29.js +11 -0
  33. package/dist/web/assets/login-telegram-BP7CJDmx.js +1 -0
  34. package/dist/web/assets/run-DOrDowjK.js +1 -0
  35. package/dist/web/index.html +2 -2
  36. package/package.json +7 -3
  37. package/dist/chunk-2QUJLHCZ.js +0 -362
  38. package/dist/web/assets/index-BNhrx9S1.js +0 -67
  39. package/dist/web/assets/index-CqrrRLOh.css +0 -1
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- <h1 align="center">Teleton Agent</h1>
1
+ <p align="center">
2
+ <img src="./logo_dark.png" alt="Teleton Agent" width="700" />
3
+ </p>
2
4
 
3
5
  <p align="center"><b>Autonomous AI agent platform for Telegram with native TON blockchain integration</b></p>
4
6
 
@@ -7,24 +9,25 @@
7
9
  <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen" alt="Node.js"></a>
8
10
  <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.7-blue" alt="TypeScript"></a>
9
11
  <a href="https://teletonagent.dev"><img src="https://img.shields.io/badge/Website-teletonagent.dev-ff6600" alt="Website"></a>
10
- <a href="https://deepwiki.com/TONresistor/teleton-agent"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
12
+ <a href="https://docs.teletonagent.dev"><img src="https://img.shields.io/badge/docs-Teleton%20Agents-blue" alt="Documentation"></a>
13
+ <a href="https://ton.org"><img src="https://img.shields.io/badge/Built_on-TON-0098EA?logo=ton&logoColor=white" alt="Built on TON"></a>
11
14
  </p>
12
15
 
13
16
  ---
14
17
 
15
- <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 can operate a TON wallet: send crypto, swap on DEXs, bid on domains, verify payments. All from a chat message. It ships with 114 built-in tools, supports 6 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 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>
16
19
 
17
- ### Key Highlights
20
+ ### Key Highlights
18
21
 
19
- - **Full Telegram access**: Operates as a real user via MTProto (GramJS), not a limited bot
20
- - **Agentic loop**: Up to 5 iterations of tool calling per message the agent thinks, acts, observes, and repeats
21
- - **Multi-Provider LLM**: Anthropic, OpenAI, Google Gemini, xAI Grok, Groq, OpenRouter
22
- - **TON Blockchain**: Built-in W5R1 wallet, send/receive TON & jettons, swap on STON.fi and DeDust, NFTs, DNS domains
23
- - **Persistent memory**: Hybrid RAG (sqlite-vec + FTS5), auto-compaction with AI summarization, daily logs
24
- - **114 built-in tools**: Messaging, media, blockchain, DEX trading, deals, DNS, journaling, and more
25
- - **Plugin SDK**: Extend the agent with custom tools frozen SDK with isolated databases, secrets management, lifecycle hooks
26
- - **MCP Client**: Connect external tool servers (stdio/SSE) with 2 lines of YAML no code, no rebuild
27
- - **Secure by design**: Prompt injection defense, sandboxed workspace, plugin isolation, wallet encryption
22
+ - **Full Telegram access** - Operates as a real user via MTProto (GramJS), not a limited bot
23
+ - **Agentic loop** - Up to 5 iterations of tool calling per message, the agent thinks, acts, observes, and repeats
24
+ - **Multi-Provider LLM** - Anthropic, OpenAI, Google Gemini, xAI Grok, Groq, OpenRouter, Moonshot, Mistral, Cocoon, Local
25
+ - **TON Blockchain** - Built-in W5R1 wallet, send/receive TON & jettons, swap on STON.fi and DeDust, NFTs, DNS domains
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
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
30
+ - **Secure by design** - Prompt injection defense, sandboxed workspace, plugin isolation, wallet encryption
28
31
 
29
32
  ---
30
33
 
@@ -48,7 +51,7 @@
48
51
 
49
52
  | Capability | Description |
50
53
  | ----------------------- | --------------------------------------------------------------------------------------------------------------------------- |
51
- | **Multi-Provider LLM** | Switch between Anthropic, OpenAI, Google, xAI, Groq, OpenRouter with one config change |
54
+ | **Multi-Provider LLM** | Switch between Anthropic, OpenAI, Google, xAI, Groq, OpenRouter, Moonshot, Mistral, Cocoon, or Local with one config change |
52
55
  | **RAG + Hybrid Search** | Local ONNX embeddings (384d) or Voyage AI (512d/1024d) with FTS5 keyword + sqlite-vec cosine similarity, fused via RRF |
53
56
  | **Auto-Compaction** | AI-summarized context management prevents overflow, preserves key information in `memory/*.md` files |
54
57
  | **Observation Masking** | Compresses old tool results to one-line summaries, saving ~90% context window |
@@ -59,8 +62,8 @@
59
62
  | **Message Debouncing** | Intelligent batching of rapid group messages (DMs are always instant) |
60
63
  | **Daily Logs** | Automatic session summaries preserved across resets |
61
64
  | **Multi-Policy Access** | Configurable DM/group policies (open, allowlist, pairing, disabled) with per-group module permissions |
62
- | **Tool RAG** | Semantic tool selection sends only the top-K most relevant tools per message (hybrid vector + FTS5, configurable `top_k`, `always_include` patterns) |
63
- | **MCP Client** | Connect external MCP tool servers (stdio or SSE) auto-discovery, namespaced tools, managed via CLI or WebUI |
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 |
64
67
  | **Sandboxed Workspace** | Secure file system with recursive URL decoding, symlink detection, and immutable config files |
65
68
 
66
69
  ---
@@ -139,7 +142,7 @@ You: /status
139
142
  Agent: [Displays uptime, model, tool count, wallet balance]
140
143
  ```
141
144
 
142
- > **Need more details?** See [GETTING_STARTED.md](GETTING_STARTED.md) for the full guide admin commands, troubleshooting, workspace templates, plugins, and more.
145
+ > **Need more details?** See [GETTING_STARTED.md](GETTING_STARTED.md) for the full guide - admin commands, troubleshooting, workspace templates, plugins, and more.
143
146
 
144
147
  ---
145
148
 
@@ -182,7 +185,7 @@ webui: # Optional: Web dashboard
182
185
 
183
186
  ### MCP Servers
184
187
 
185
- Connect external tool servers via the [Model Context Protocol](https://modelcontextprotocol.io/). No code needed tools are auto-discovered and registered at startup.
188
+ Connect external tool servers via the [Model Context Protocol](https://modelcontextprotocol.io/). No code needed - tools are auto-discovered and registered at startup.
186
189
 
187
190
  **Via CLI (recommended):**
188
191
  ```bash
@@ -209,7 +212,7 @@ mcp:
209
212
 
210
213
  **Via WebUI:**
211
214
 
212
- When the WebUI is enabled, the **MCP Servers** page lets you add/remove servers, configure environment variables (API keys), and view connection status and tool lists all from the browser.
215
+ When the WebUI is enabled, the **MCP Servers** page lets you add/remove servers, configure environment variables (API keys), and view connection status and tool lists - all from the browser.
213
216
 
214
217
  Tools are namespaced as `mcp_<server>_<tool>` (e.g. `mcp_filesystem_read_file`). Each server supports `scope` (always, dm-only, group-only, admin-only) and `enabled` toggle.
215
218
 
@@ -219,8 +222,8 @@ The agent has two built-in web tools powered by [Tavily](https://tavily.com/) (f
219
222
 
220
223
  | Tool | Description |
221
224
  |------|-------------|
222
- | `web_search` | Search the web returns titles, URLs, content snippets, relevance scores. Supports `topic`: general, news, finance |
223
- | `web_fetch` | Extract readable text from a URL articles, docs, links shared by users |
225
+ | `web_search` | Search the web - returns titles, URLs, content snippets, relevance scores. Supports `topic`: general, news, finance |
226
+ | `web_fetch` | Extract readable text from a URL - articles, docs, links shared by users |
224
227
 
225
228
  Both tools require a Tavily API key. Set it via CLI or config:
226
229
 
@@ -258,7 +261,7 @@ Configurable keys: `tavily_api_key`, `tonapi_key`, `telegram.bot_token`, `telegr
258
261
 
259
262
  ### Environment Variables
260
263
 
261
- All environment variables override the corresponding `config.yaml` value at startup useful for Docker and CI:
264
+ All environment variables override the corresponding `config.yaml` value at startup - useful for Docker and CI:
262
265
 
263
266
  | Variable | Description | Default |
264
267
  |----------|-------------|---------|
@@ -339,7 +342,7 @@ ssh -L 7777:localhost:7777 user@remote-server
339
342
 
340
343
  ### Workspace Files
341
344
 
342
- The agent's personality and rules are configured via markdown files in `~/.teleton/workspace/`. Default templates are generated during `teleton setup` you can edit any of them to customize your agent:
345
+ The agent's personality and rules are configured via markdown files in `~/.teleton/workspace/`. Default templates are generated during `teleton setup` - you can edit any of them to customize your agent:
343
346
 
344
347
  | File | Purpose | Mutable by Agent |
345
348
  |------|---------|-----------------|
@@ -349,7 +352,7 @@ The agent's personality and rules are configured via markdown files in `~/.telet
349
352
  | `MEMORY.md` | Persistent memory (facts, contacts, decisions) | Yes |
350
353
  | `memory/*.md` | Session summaries, daily logs (auto-generated) | Yes |
351
354
 
352
- > **Tip**: Templates are located in `src/templates/` if installing from source. Edit the workspace copies in `~/.teleton/workspace/` not the source templates.
355
+ > **Tip**: Templates are located in `src/templates/` if installing from source. Edit the workspace copies in `~/.teleton/workspace/` - not the source templates.
353
356
 
354
357
  ### Admin Commands
355
358
 
@@ -405,7 +408,7 @@ src/
405
408
  ├── agent/ # Core agent runtime
406
409
  │ ├── runtime.ts # Agentic loop (5 iterations, tool calling, masking, compaction)
407
410
  │ ├── client.ts # Multi-provider LLM client
408
- │ └── tools/ # 114 built-in tools
411
+ │ └── tools/ # 100+ built-in tools
409
412
  │ ├── register-all.ts # Central tool registration (8 categories, 109 tools)
410
413
  │ ├── registry.ts # Tool registry, scope filtering, provider limits
411
414
  │ ├── module-loader.ts # Built-in module loading (deals → +5 tools)
@@ -460,7 +463,7 @@ src/
460
463
  │ └── loader.ts # 10 sections: soul + security + strategy + memory + context + ...
461
464
  ├── config/ # Configuration
462
465
  │ ├── schema.ts # Zod schemas + validation
463
- │ └── providers.ts # Multi-provider LLM registry (6 providers)
466
+ │ └── providers.ts # Multi-provider LLM registry (10 providers)
464
467
  ├── webui/ # Optional web dashboard
465
468
  │ ├── server.ts # Hono server, auth middleware, static serving
466
469
  │ └── routes/ # 11 API route groups (status, tools, logs, memory, soul, plugins, mcp, tasks, workspace, config, marketplace)
@@ -535,7 +538,7 @@ npm run format # Prettier
535
538
 
536
539
  ### Plugins
537
540
 
538
- Plugins extend the agent with custom tools. Drop a `.js` file or folder in `~/.teleton/plugins/` loaded at startup, hot-reloaded in dev mode, no rebuild needed. See [official example plugins](https://github.com/TONresistor/teleton-plugins) for complete working examples.
541
+ Plugins extend the agent with custom tools. Drop a `.js` file or folder in `~/.teleton/plugins/` - loaded at startup, hot-reloaded in dev mode, no rebuild needed. See [official example plugins](https://github.com/TONresistor/teleton-plugins) for complete working examples.
539
542
 
540
543
  ```
541
544
  ~/.teleton/plugins/
@@ -602,12 +605,12 @@ When `tools` is a function, the SDK provides namespaced access to core services:
602
605
  | | **Moderation**: `banUser()`, `unbanUser()`, `muteUser()` |
603
606
  | | **Stars & Gifts**: `getStarsBalance()`, `sendGift()`, `getAvailableGifts()`, `getMyGifts()`, `getResaleGifts()`, `buyResaleGift()` |
604
607
  | | **Advanced**: `getMe()`, `isAvailable()`, `getRawClient()`, `setTyping()`, `sendStory()` |
605
- | `sdk.secrets` | `get()`, `require()`, `has()` 3-tier resolution (env var → secrets file → plugin config) |
606
- | `sdk.storage` | `get()`, `set()`, `delete()`, `has()`, `clear()` KV store with TTL support |
607
- | `sdk.db` | Raw `better-sqlite3` database isolated per plugin at `~/.teleton/plugins/data/<name>.db` |
608
+ | `sdk.secrets` | `get()`, `require()`, `has()` - 3-tier resolution (env var → secrets file → plugin config) |
609
+ | `sdk.storage` | `get()`, `set()`, `delete()`, `has()`, `clear()` - KV store with TTL support |
610
+ | `sdk.db` | Raw `better-sqlite3` database - isolated per plugin at `~/.teleton/plugins/data/<name>.db` |
608
611
  | `sdk.config` | Sanitized app config (no API keys exposed) |
609
612
  | `sdk.pluginConfig` | Plugin-specific config from `config.yaml` `plugins:` section |
610
- | `sdk.log` | `info()`, `warn()`, `error()`, `debug()` Prefixed logger |
613
+ | `sdk.log` | `info()`, `warn()`, `error()`, `debug()` - Prefixed logger |
611
614
 
612
615
  **Lifecycle hooks**: `migrate(db)`, `start(ctx)`, `stop()`, `onMessage(event)`, `onCallbackQuery(event)`
613
616