From 2fa276114035d66c8162e4547496e6fa5a4dae9a Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 10:56:12 +0000 Subject: [PATCH 1/7] Initial commit with task details Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: https://github.com/xlabtg/teleton-plugins/issues/21 --- .gitkeep | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitkeep b/.gitkeep index c46a5b9..444adc9 100644 --- a/.gitkeep +++ b/.gitkeep @@ -1 +1,2 @@ -# .gitkeep file auto-generated at 2026-03-19T10:37:13.073Z for PR creation at branch issue-19-f54b585823d1 for issue https://github.com/xlabtg/teleton-plugins/issues/19 \ No newline at end of file +# .gitkeep file auto-generated at 2026-03-19T10:37:13.073Z for PR creation at branch issue-19-f54b585823d1 for issue https://github.com/xlabtg/teleton-plugins/issues/19 +# Updated: 2026-03-19T10:56:12.059Z \ No newline at end of file From 7a46b799ed78d6e1af87e69fdd1578e3d162996e Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:01:04 +0000 Subject: [PATCH 2/7] fix(github-dev-assistant): fix compatibility with Teleton system - Fix author field: change from plain string to object with name+url - Fix config field: rename non-standard "config" to "defaultConfig" with simple key-value format matching SDK expectations - Set version to 1.0.0 as required - Fix README: remove references to non-existent github_auth tool and OAuth flow (plugin uses PAT auth), correct tool count from 15 to 14, update setup instructions for PAT workflow - Fix CHANGELOG: remove references to non-existent OAuth/Web UI features Co-Authored-By: Claude Opus 4.6 --- plugins/github-dev-assistant/CHANGELOG.md | 15 +--- plugins/github-dev-assistant/README.md | 92 ++++++++-------------- plugins/github-dev-assistant/index.js | 2 +- plugins/github-dev-assistant/manifest.json | 39 +++------ 4 files changed, 49 insertions(+), 99 deletions(-) diff --git a/plugins/github-dev-assistant/CHANGELOG.md b/plugins/github-dev-assistant/CHANGELOG.md index ff5d5fb..b792a15 100644 --- a/plugins/github-dev-assistant/CHANGELOG.md +++ b/plugins/github-dev-assistant/CHANGELOG.md @@ -9,9 +9,8 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ### Added - Initial release of the `github-dev-assistant` plugin -- **Authorization (2 tools)** - - `github_auth` — OAuth 2.0 authorization flow with CSRF state protection - - `github_check_auth` — verify current authentication status +- **Authorization (1 tool)** + - `github_check_auth` — verify current authentication status via Personal Access Token - **Repository management (2 tools)** - `github_list_repos` — list user or organization repositories with filtering - `github_create_repo` — create new repositories with optional license and gitignore @@ -30,15 +29,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - `github_close_issue` — close issues/PRs with optional comment and reason - **GitHub Actions (1 tool)** - `github_trigger_workflow` — dispatch workflow_dispatch events with inputs -- **Web UI** - - `web-ui/config-panel.jsx` — configuration panel with OAuth connect, settings form, and usage examples - - `web-ui/oauth-callback.html` — OAuth redirect handler with postMessage communication - **Security** - - All OAuth tokens stored exclusively via `sdk.secrets` - - Cryptographically random CSRF state with 10-minute TTL + - All tokens stored exclusively via `sdk.secrets` - Token redaction in error messages - `require_pr_review` confirmation policy for destructive merge operations -- **Tests** - - Unit tests for `github-client.js` (request handling, auth injection, error mapping) - - Unit tests for `auth.js` (OAuth flow, CSRF protection, token lifecycle) - - Integration tests for all tool categories with mocked GitHub API responses diff --git a/plugins/github-dev-assistant/README.md b/plugins/github-dev-assistant/README.md index 4dcec68..f411383 100644 --- a/plugins/github-dev-assistant/README.md +++ b/plugins/github-dev-assistant/README.md @@ -6,64 +6,52 @@ Full GitHub development workflow automation for the [Teleton](https://github.com | Category | Tools | |----------|-------| -| **Authorization** | `github_auth`, `github_check_auth` | +| **Authorization** | `github_check_auth` | | **Repositories** | `github_list_repos`, `github_create_repo` | | **Files & Branches** | `github_get_file`, `github_update_file`, `github_create_branch` | | **Pull Requests** | `github_create_pr`, `github_list_prs`, `github_merge_pr` | | **Issues** | `github_create_issue`, `github_list_issues`, `github_comment_issue`, `github_close_issue` | | **GitHub Actions** | `github_trigger_workflow` | -**15 tools total** covering the complete GitHub development lifecycle. +**14 tools total** covering the complete GitHub development lifecycle. ## Installation ### Via Teleton Web UI 1. Open the Teleton Web UI and navigate to **Plugins**. 2. Search for `github-dev-assistant` and click **Install**. -3. Open plugin **Settings** to configure secrets and connect your GitHub account. +3. Open plugin **Settings** to configure the Personal Access Token. ### Manual Installation -1. Clone or copy this plugin folder to your Teleton plugins directory. -2. Add the plugin to `registry.json`. -3. Restart the Teleton agent. + +```bash +mkdir -p ~/.teleton/plugins +cp -r plugins/github-dev-assistant ~/.teleton/plugins/ +``` ## Setup & Authorization -### Step 1: Create a GitHub OAuth App +### Step 1: Create a Personal Access Token -1. Go to **GitHub Settings → Developer settings → OAuth Apps → New OAuth App** -2. Fill in: - - **Application name**: `Teleton Dev Assistant` (or any name) - - **Homepage URL**: your Teleton instance URL - - **Authorization callback URL**: `/plugins/github-dev-assistant/web-ui/oauth-callback.html` -3. Click **Register application** -4. Note your **Client ID** and generate a **Client Secret** +1. Go to **GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)** +2. Click **Generate new token (classic)** +3. Select scopes: `repo`, `workflow`, `user` +4. Click **Generate token** and copy the token -### Step 2: Configure Plugin Secrets +### Step 2: Configure Plugin Secret -In the Teleton Web UI plugin settings (or via environment variables): +Set the token via environment variable or Teleton secrets store: | Secret | Environment Variable | Description | |--------|---------------------|-------------| -| `github_client_id` | `GITHUB_OAUTH_CLIENT_ID` | OAuth App Client ID | -| `github_client_secret` | `GITHUB_OAUTH_CLIENT_SECRET` | OAuth App Client Secret | -| `github_webhook_secret` | `GITHUB_WEBHOOK_SECRET` | Webhook secret (optional) | - -### Step 3: Authorize with GitHub +| `github_token` | `GITHUB_DEV_ASSISTANT_GITHUB_TOKEN` | GitHub Personal Access Token | -In the Teleton plugin settings panel: -1. Click **Connect GitHub Account** -2. A GitHub authorization popup will appear -3. Authorize the app and grant requested scopes -4. The panel will confirm: "Connected as *your-username*" +### Step 3: Verify Authorization -Or via the agent chat: +In the agent chat: ``` Check my GitHub auth status ``` -``` -Connect my GitHub account with repo and workflow scopes -``` ## Usage Examples @@ -115,30 +103,28 @@ Trigger the deploy.yml workflow on the main branch in my-org/my-repo Run CI workflow on branch feat/new-feature in my-org/my-repo with input environment=staging ``` -## Configuration Options +## Configuration -| Config Key | Type | Default | Description | -|------------|------|---------|-------------| -| `default_owner` | string | `null` | Default GitHub username/org for operations | -| `default_branch` | string | `"main"` | Default branch for commits and PRs | -| `auto_sign_commits` | boolean | `true` | Attribute commits to the agent | -| `require_pr_review` | boolean | `false` | Require confirmation before merging PRs | -| `commit_author_name` | string | `"Teleton AI Agent"` | Author name in commits | -| `commit_author_email` | string | `"agent@teleton.local"` | Author email in commits | +```yaml +# ~/.teleton/config.yaml +plugins: + github_dev_assistant: + default_owner: null # Default GitHub username/org for operations + default_branch: "main" # Default branch for commits and PRs + require_pr_review: false # Require confirmation before merging PRs + commit_author_name: "Teleton AI Agent" # Author name in commits + commit_author_email: "agent@teleton.local" # Author email in commits +``` ## Security Best Practices -- **Never share your OAuth Client Secret.** It is stored encrypted via `sdk.secrets` and never appears in logs. +- **Never share your Personal Access Token.** It is stored encrypted via `sdk.secrets` and never appears in logs. - **Enable `require_pr_review`** if you want human confirmation before any PR merges. -- **Use minimum required scopes.** The default `["repo", "workflow", "user"]` covers all plugin features; remove `workflow` if you don't need GitHub Actions. -- **Revoke access** via the plugin settings panel if you no longer need the connection. +- **Use minimum required scopes.** `repo`, `workflow`, and `user` cover all plugin features; remove `workflow` if you don't need GitHub Actions. - **Review commit author settings** — commits will be attributed to the configured name/email, not your personal GitHub account. ## Tool Reference -### `github_auth` -Initiate or complete OAuth authorization. Call without parameters to start the flow (returns auth URL), or with `code` + `state` to complete it. - ### `github_check_auth` Check whether the plugin is authenticated and return the connected user's login. @@ -164,7 +150,7 @@ Create a pull request. Parameters: `owner`, `repo`, `title`, `head` (all require List pull requests. Parameters: `owner`, `repo` (required), `state`, `head`, `base`, `sort`, `direction`, `per_page`, `page`. ### `github_merge_pr` -Merge a pull request. Parameters: `owner`, `repo`, `pr_number` (all required), `merge_method`, `commit_title`, `commit_message`, `skip_review_check`. +Merge a pull request. Parameters: `owner`, `repo`, `pr_number` (all required), `merge_method`, `commit_title`, `commit_message`, `confirmed`. ### `github_create_issue` Create an issue. Parameters: `owner`, `repo`, `title` (all required), `body`, `labels`, `assignees`, `milestone`. @@ -181,19 +167,9 @@ Close an issue or PR. Parameters: `owner`, `repo`, `issue_number` (all required) ### `github_trigger_workflow` Trigger a GitHub Actions workflow dispatch. Parameters: `owner`, `repo`, `workflow_id`, `ref` (all required), `inputs`. -## Testing - -```bash -cd plugins/github-dev-assistant -npm install -npm test -``` - -Tests use [Vitest](https://vitest.dev/) with mocked GitHub API responses. No real API calls are made during testing. - -## Contributing +## Developer -See the root [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines on adding new tools and submitting pull requests. +**Developer:** [xlabtg](https://github.com/xlabtg) ## License diff --git a/plugins/github-dev-assistant/index.js b/plugins/github-dev-assistant/index.js index 09a516b..2593034 100644 --- a/plugins/github-dev-assistant/index.js +++ b/plugins/github-dev-assistant/index.js @@ -37,7 +37,7 @@ import { formatError } from "./lib/utils.js"; export const manifest = { name: "github-dev-assistant", - version: "2.0.0", + version: "1.0.0", sdkVersion: ">=1.0.0", description: "Full GitHub development workflow automation — repos, files, branches, PRs, issues, and GitHub Actions via Personal Access Token", diff --git a/plugins/github-dev-assistant/manifest.json b/plugins/github-dev-assistant/manifest.json index a2ecfc7..062e9b1 100644 --- a/plugins/github-dev-assistant/manifest.json +++ b/plugins/github-dev-assistant/manifest.json @@ -1,9 +1,12 @@ { "id": "github-dev-assistant", "name": "GitHub Dev Assistant", - "version": "2.0.0", + "version": "1.0.0", "description": "Full GitHub development workflow automation — repos, files, branches, PRs, issues, and GitHub Actions via Personal Access Token", - "author": "xlabtg", + "author": { + "name": "xlabtg", + "url": "https://github.com/xlabtg" + }, "license": "MIT", "entry": "index.js", "teleton": ">=1.0.0", @@ -15,32 +18,12 @@ "description": "GitHub Personal Access Token (create at https://github.com/settings/tokens)" } }, - "config": { - "default_owner": { - "type": "string", - "default": null, - "description": "Default GitHub username/org for operations" - }, - "default_branch": { - "type": "string", - "default": "main", - "description": "Default branch name for commits and PRs" - }, - "require_pr_review": { - "type": "boolean", - "default": false, - "description": "Require user confirmation before merging PRs" - }, - "commit_author_name": { - "type": "string", - "default": "Teleton AI Agent", - "description": "Author name in commits" - }, - "commit_author_email": { - "type": "string", - "default": "agent@teleton.local", - "description": "Author email in commits" - } + "defaultConfig": { + "default_owner": null, + "default_branch": "main", + "require_pr_review": false, + "commit_author_name": "Teleton AI Agent", + "commit_author_email": "agent@teleton.local" }, "tools": [ { "name": "github_check_auth", "description": "Check if GitHub is connected and verify the authenticated account" }, From 817ac364b9a8843380f11c755cda29704a60adfc Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:02:10 +0000 Subject: [PATCH 3/7] fix(ton-bridge): fix compatibility with Teleton system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix version: align manifest.json, package.json, and inline manifest to 1.0.0 (was 1.2.0 in manifest/inline, 1.0.0 in package.json) - Fix author: standardize to { name: "xlabtg", url } format per CONTRIBUTING.md (remove non-standard supervisor/role fields) - Remove non-standard "enabled" from defaultConfig (not a plugin config) - Remove non-standard author fields from inline manifest (role, supervisor, link) — runtime only reads name/version/sdkVersion/ defaultConfig from inline manifest - Add missing repository and funding fields to manifest.json - Update README with accurate tool documentation and developer info Co-Authored-By: Claude Opus 4.6 --- plugins/ton-bridge/README.md | 123 ++++++++----------------------- plugins/ton-bridge/index.js | 8 +- plugins/ton-bridge/manifest.json | 12 ++- plugins/ton-bridge/package.json | 8 +- 4 files changed, 43 insertions(+), 108 deletions(-) diff --git a/plugins/ton-bridge/README.md b/plugins/ton-bridge/README.md index 0e9f091..cd67307 100644 --- a/plugins/ton-bridge/README.md +++ b/plugins/ton-bridge/README.md @@ -1,138 +1,79 @@ -# TON Bridge Plugin +# TON Bridge -**The #1 Bridge in TON Catalog** 🌉 +Share the TON Bridge Mini App link with a beautiful inline button in Telegram chats. -Beautiful inline button plugin for TON Bridge Mini App access. - -**⚠️ Note:** TON Bridge works with support from TONBANKCARD +TON Bridge works with support from TONBANKCARD. ## Features -- ✅ Beautiful inline button (no emoji) -- ✅ Button text: "TON Bridge No1" (customizable) -- ✅ Mini App URL: https://t.me/TONBridge_robot?startapp -- ✅ Custom message support -- ✅ Configuration options -- ✅ Easy integration with AI agents +- Inline button for TON Bridge Mini App access +- Customizable button text and emoji +- Custom message support +- Easy integration with AI agents ## Tools | Tool | Description | Category | |------|-------------|----------| -| `ton_bridge_open` | Open TON Bridge with beautiful button | Action | -| `ton_bridge_about` | Send info about TON Bridge with a link to the Mini App | Data-bearing | -| `ton_bridge_custom_message` | Send custom message with button | Action | +| `ton_bridge_open` | Send a message with a TON Bridge Mini App link | action | +| `ton_bridge_about` | Send info about TON Bridge with a link to the Mini App | data-bearing | +| `ton_bridge_custom_message` | Send a custom message alongside a TON Bridge button | action | ## Installation ```bash +mkdir -p ~/.teleton/plugins cp -r plugins/ton-bridge ~/.teleton/plugins/ ``` ## Configuration -Edit `~/.teleton/config.yaml`: - ```yaml +# ~/.teleton/config.yaml plugins: - ton-bridge: - enabled: true + ton_bridge: buttonText: "TON Bridge No1" # Button text (default: "TON Bridge No1") - buttonEmoji: "" # Emoji on button (default: empty - no icon) + buttonEmoji: "🌉" # Emoji on button (default: "🌉") startParam: "" # Optional start parameter ``` ## Usage Examples -### Basic Usage - -``` -"Открой TON Bridge с красивой кнопкой" -``` - -Will send: -> 🌉 **TON Bridge** - The #1 Bridge in TON Catalog -> -> [TON Bridge No1](https://t.me/TONBridge_robot?startapp) - -### Custom Message - +### Open TON Bridge ``` -"Дай мне ссылку на TON Bridge с кнопкой" +Open TON Bridge ``` -### Get Button Configuration +Will send a message with a button linking to https://t.me/TONBridge_robot?startapp +### Get Info About TON Bridge ``` -"Какой текст кнопки сейчас настроен для TON Bridge?" -``` - -Will return: -```json -{ - "button_text": "TON Bridge No1", - "button_emoji": "", - "mini_app_url": "https://t.me/TONBridge_robot?startapp" -} +Tell me about TON Bridge ``` ### Custom Message with Button - ``` -"Напиши 'Хочу мостить в TON' и добавь кнопку TON Bridge" +Send "Transfer your assets via TON Bridge" with a TON Bridge button ``` -Will send: -> Хочу мостить в TON -> -> [TON Bridge No1](https://t.me/TONBridge_robot?startapp) +## Tool Schemas -## Default Button Appearance - -Button will look like this: - -``` -TON Bridge No1 -``` - -When clicked, it opens: -https://t.me/TONBridge_robot?startapp - -## Customization - -You can customize the button text (emoji is empty by default): - -```yaml -plugins: - ton-bridge: - buttonText: "TON Bridge" - buttonEmoji: "" -``` - -Or add emoji back if needed: - -```yaml -plugins: - ton-bridge: - buttonText: "TON Bridge 🌉" - buttonEmoji: "🌉" -``` +### `ton_bridge_open` -## Why "No1"? +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `message` | string | No | — | Optional message text to show with the button | -As per your request, the button text is "TON Bridge No1" to highlight that this is the #1 bridge in TON catalog according to your preference. +### `ton_bridge_about` -## TONBANKCARD Support +No parameters required. -**TON Bridge works with support from TONBANKCARD** +### `ton_bridge_custom_message` -This is important to note because: -- TONBANKCARD provides infrastructure support -- Makes bridge operations more reliable -- Compatible with TON ecosystem +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `customMessage` | string | Yes | — | Custom message text to display with the button | --- -**Developed by:** Tony (AI Agent) -**Supervisor:** Anton Poroshin -**Studio:** https://github.com/xlabtg +**Developer:** [xlabtg](https://github.com/xlabtg) diff --git a/plugins/ton-bridge/index.js b/plugins/ton-bridge/index.js index 05c6513..8e32906 100644 --- a/plugins/ton-bridge/index.js +++ b/plugins/ton-bridge/index.js @@ -11,15 +11,9 @@ export const manifest = { name: "ton-bridge", - version: "1.2.0", + version: "1.0.0", sdkVersion: ">=1.0.0", description: "Share TON Bridge Mini App link with a button. Opens https://t.me/TONBridge_robot?startapp", - author: { - name: "Tony (AI Agent)", - role: "AI Developer", - supervisor: "Anton Poroshin", - link: "https://github.com/xlabtg", - }, defaultConfig: { buttonText: "TON Bridge No1", buttonEmoji: "🌉", diff --git a/plugins/ton-bridge/manifest.json b/plugins/ton-bridge/manifest.json index 57452e9..d402c4d 100644 --- a/plugins/ton-bridge/manifest.json +++ b/plugins/ton-bridge/manifest.json @@ -1,9 +1,12 @@ { "id": "ton-bridge", "name": "TON Bridge", - "version": "1.2.0", + "version": "1.0.0", "description": "Share TON Bridge Mini App link with a button. Opens https://t.me/TONBridge_robot?startapp", - "author": { "name": "Tony (AI Agent)", "supervisor": "Anton Poroshin", "url": "https://github.com/xlabtg" }, + "author": { + "name": "xlabtg", + "url": "https://github.com/xlabtg" + }, "license": "MIT", "entry": "index.js", "teleton": ">=1.0.0", @@ -14,11 +17,12 @@ { "name": "ton_bridge_custom_message", "description": "Send a custom message alongside a TON Bridge button" } ], "defaultConfig": { - "enabled": true, "buttonText": "TON Bridge No1", "buttonEmoji": "🌉", "startParam": "" }, "permissions": [], - "tags": ["ton", "bridge", "miniapp", "tonbridge"] + "tags": ["ton", "bridge", "miniapp", "tonbridge"], + "repository": "https://github.com/xlabtg/teleton-plugins", + "funding": null } diff --git a/plugins/ton-bridge/package.json b/plugins/ton-bridge/package.json index ffbe684..dbaab97 100644 --- a/plugins/ton-bridge/package.json +++ b/plugins/ton-bridge/package.json @@ -1,12 +1,8 @@ { "name": "ton-bridge", "version": "1.0.0", - "description": "TON Bridge plugin with inline button for Mini App access", - "author": { - "name": "Tony (AI Agent)", - "role": "AI Developer", - "supervisor": "Anton Poroshin" - }, + "description": "Share TON Bridge Mini App link with a button. Opens https://t.me/TONBridge_robot?startapp", + "author": "xlabtg (https://github.com/xlabtg)", "type": "module", "main": "index.js", "scripts": {}, From ee27d93cd763a42e0ca347e4f1cb3f60f7fcc35d Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:03:14 +0000 Subject: [PATCH 4/7] fix(ton-trading-bot): fix compatibility with Teleton system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Set version to 1.0.0 as required (was 2.0.0) - Fix author: standardize to { name: "xlabtg", url } format per CONTRIBUTING.md (was "Tony (AI Agent)") - Add missing defaultConfig to manifest.json (was only in inline manifest) — ensures registry and runtime both see config defaults - Remove non-standard author fields from inline manifest (role, supervisor, link) - Update README with accurate developer info and tool schema docs Co-Authored-By: Claude Opus 4.6 --- plugins/ton-trading-bot/README.md | 62 +++++++++++++++++++++++---- plugins/ton-trading-bot/index.js | 8 +--- plugins/ton-trading-bot/manifest.json | 10 ++++- 3 files changed, 63 insertions(+), 17 deletions(-) diff --git a/plugins/ton-trading-bot/README.md b/plugins/ton-trading-bot/README.md index 1f8b640..d30896d 100644 --- a/plugins/ton-trading-bot/README.md +++ b/plugins/ton-trading-bot/README.md @@ -2,10 +2,7 @@ Atomic tools for trading on the TON blockchain. The LLM composes these tools into trading strategies — the plugin provides the primitives, not the logic. -**⚠️ WARNING: Cryptocurrency trading involves significant financial risk. Do not trade with funds you cannot afford to lose. This plugin does not provide financial advice.** - -**Developed by Tony (AI Agent) under supervision of Anton Poroshin** -**Studio:** https://github.com/xlabtg +**WARNING: Cryptocurrency trading involves significant financial risk. Do not trade with funds you cannot afford to lose. This plugin does not provide financial advice.** ## Architecture @@ -48,7 +45,7 @@ cp -r plugins/ton-trading-bot ~/.teleton/plugins/ ```yaml # ~/.teleton/config.yaml plugins: - ton-trading-bot: + ton_trading_bot: maxTradePercent: 10 # max single trade as % of balance (default: 10) minBalanceTON: 1 # minimum TON to keep (default: 1) defaultSlippage: 0.05 # DEX slippage tolerance (default: 5%) @@ -82,6 +79,57 @@ Get market data for swapping 1 TON to EQCxE6... 5. [later] Record trade closed ``` +## Tool Schemas + +### `ton_trading_get_market_data` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `from_asset` | string | Yes | — | Asset to swap from ("TON" or jetton address) | +| `to_asset` | string | Yes | — | Asset to swap to ("TON" or jetton address) | +| `amount` | string | Yes | — | Amount of from_asset to quote | + +### `ton_trading_get_portfolio` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `history_limit` | integer | No | 10 | Number of recent trades to include (1–50) | + +### `ton_trading_validate_trade` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `mode` | string | Yes | — | "real" or "simulation" | +| `amount_ton` | number | Yes | — | Amount of TON being traded | + +### `ton_trading_simulate_trade` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `from_asset` | string | Yes | — | Asset being sold | +| `to_asset` | string | Yes | — | Asset being bought | +| `amount_in` | number | Yes | — | Amount of from_asset to trade | +| `expected_amount_out` | number | Yes | — | Expected output amount | +| `note` | string | No | — | Optional note for the trade | + +### `ton_trading_execute_swap` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `from_asset` | string | Yes | — | Asset to sell | +| `to_asset` | string | Yes | — | Asset to buy | +| `amount` | string | Yes | — | Amount to sell | +| `slippage` | number | No | 0.05 | Slippage tolerance (0.001–0.5) | +| `dex` | string | No | auto | "stonfi" or "dedust" | + +### `ton_trading_record_trade` + +| Param | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `trade_id` | integer | Yes | — | Journal trade ID | +| `amount_out` | number | Yes | — | Actual amount received | +| `note` | string | No | — | Optional note (e.g. exit reason) | + ## Risk Management Risk parameters are enforced by `ton_trading_validate_trade` before any trade: @@ -103,6 +151,4 @@ The LLM reads the validation result and decides whether to proceed. --- -**Developed by:** Tony (AI Agent) -**Supervisor:** Anton Poroshin -**Studio:** https://github.com/xlabtg +**Developer:** [xlabtg](https://github.com/xlabtg) diff --git a/plugins/ton-trading-bot/index.js b/plugins/ton-trading-bot/index.js index c7c4a96..0d08673 100644 --- a/plugins/ton-trading-bot/index.js +++ b/plugins/ton-trading-bot/index.js @@ -17,15 +17,9 @@ export const manifest = { name: "ton-trading-bot", - version: "2.0.0", + version: "1.0.0", sdkVersion: ">=1.0.0", description: "Atomic TON trading tools: market data, portfolio, risk validation, simulation, and DEX swap execution. The LLM composes these into trading strategies.", - author: { - name: "Tony (AI Agent)", - role: "AI Developer", - supervisor: "Anton Poroshin", - link: "https://github.com/xlabtg", - }, defaultConfig: { maxTradePercent: 10, // max single trade as % of balance minBalanceTON: 1, // minimum TON balance required to trade diff --git a/plugins/ton-trading-bot/manifest.json b/plugins/ton-trading-bot/manifest.json index 05a9d77..3b45a0e 100644 --- a/plugins/ton-trading-bot/manifest.json +++ b/plugins/ton-trading-bot/manifest.json @@ -1,10 +1,10 @@ { "id": "ton-trading-bot", "name": "TON Trading Bot", - "version": "2.0.0", + "version": "1.0.0", "description": "Atomic TON trading tools: market data, portfolio, risk validation, simulation, and DEX swap execution. The LLM composes these into trading strategies.", "author": { - "name": "Tony (AI Agent)", + "name": "xlabtg", "url": "https://github.com/xlabtg" }, "license": "MIT", @@ -37,6 +37,12 @@ "description": "Close an open trade in the journal and record final PnL" } ], + "defaultConfig": { + "maxTradePercent": 10, + "minBalanceTON": 1, + "defaultSlippage": 0.05, + "simulationBalance": 1000 + }, "permissions": [], "tags": ["trading", "ton", "dex", "portfolio", "simulation"], "repository": "https://github.com/xlabtg/teleton-plugins", From 26179da4f6f462914f83d00135e4294c84dee698 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:04:55 +0000 Subject: [PATCH 5/7] fix(ton-bridge): add missing package-lock.json The CI Plugin Dependencies workflow requires package-lock.json alongside package.json. This was missing, causing the workflow to fail. Co-Authored-By: Claude Opus 4.6 --- plugins/ton-bridge/package-lock.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/ton-bridge/package-lock.json diff --git a/plugins/ton-bridge/package-lock.json b/plugins/ton-bridge/package-lock.json new file mode 100644 index 0000000..5c23e33 --- /dev/null +++ b/plugins/ton-bridge/package-lock.json @@ -0,0 +1,13 @@ +{ + "name": "ton-bridge", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "ton-bridge", + "version": "1.0.0", + "license": "MIT" + } + } +} From b300a9b2a98576e3601b882b24db8ed4ebcbcd15 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:06:53 +0000 Subject: [PATCH 6/7] Revert "Initial commit with task details" This reverts commit 2fa276114035d66c8162e4547496e6fa5a4dae9a. --- .gitkeep | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitkeep b/.gitkeep index 444adc9..c46a5b9 100644 --- a/.gitkeep +++ b/.gitkeep @@ -1,2 +1 @@ -# .gitkeep file auto-generated at 2026-03-19T10:37:13.073Z for PR creation at branch issue-19-f54b585823d1 for issue https://github.com/xlabtg/teleton-plugins/issues/19 -# Updated: 2026-03-19T10:56:12.059Z \ No newline at end of file +# .gitkeep file auto-generated at 2026-03-19T10:37:13.073Z for PR creation at branch issue-19-f54b585823d1 for issue https://github.com/xlabtg/teleton-plugins/issues/19 \ No newline at end of file From 225104cd0f6608fac57588e9318165582702ea23 Mon Sep 17 00:00:00 2001 From: konard Date: Thu, 19 Mar 2026 11:09:44 +0000 Subject: [PATCH 7/7] fix(ci): skip Vercel deploy when VERCEL_TOKEN is not configured The deploy workflow fails on forks and PRs from external contributors because the VERCEL_TOKEN secret is not available. Add a check step that detects whether the token is present and skips all subsequent steps gracefully when it is not. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/deploy-vercel.yml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml index da8693a..0191725 100644 --- a/.github/workflows/deploy-vercel.yml +++ b/.github/workflows/deploy-vercel.yml @@ -9,30 +9,48 @@ jobs: deploy: name: deploy runs-on: ubuntu-latest + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} steps: + - name: Check Vercel token + id: check + run: | + if [ -z "$VERCEL_TOKEN" ]; then + echo "available=false" >> "$GITHUB_OUTPUT" + echo "⚠️ VERCEL_TOKEN is not configured — skipping deployment" + else + echo "available=true" >> "$GITHUB_OUTPUT" + fi + - uses: actions/checkout@v4 + if: steps.check.outputs.available == 'true' - uses: actions/setup-node@v4 + if: steps.check.outputs.available == 'true' with: node-version: "20" - name: Install Vercel CLI + if: steps.check.outputs.available == 'true' run: npm install --global vercel@latest - name: Pull Vercel environment + if: steps.check.outputs.available == 'true' run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build project artifacts + if: steps.check.outputs.available == 'true' run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy to Vercel (preview) + if: steps.check.outputs.available == 'true' id: deploy run: | url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}) echo "url=$url" >> "$GITHUB_OUTPUT" - name: Comment preview URL on PR - if: github.event_name == 'pull_request' + if: steps.check.outputs.available == 'true' && github.event_name == 'pull_request' uses: actions/github-script@v7 with: script: |