feat: add ton-trading-bot plugin & ton-bridge plugin & github-dev-assistant#10
Open
xlabtg wants to merge 97 commits intoTONresistor:mainfrom
Open
feat: add ton-trading-bot plugin & ton-bridge plugin & github-dev-assistant#10xlabtg wants to merge 97 commits intoTONresistor:mainfrom
xlabtg wants to merge 97 commits intoTONresistor:mainfrom
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #1
Implements all 15 tools from issue #1: - Auth (2): github_auth (OAuth 2.0 with CSRF state), github_check_auth - Repos (2): github_list_repos, github_create_repo - Files/Branches (3): github_get_file, github_update_file, github_create_branch - PRs (3): github_create_pr, github_list_prs, github_merge_pr - Issues (4): github_create_issue, github_list_issues, github_comment_issue, github_close_issue - Actions (1): github_trigger_workflow Architecture: modular lib/*.js separation (github-client, auth, repo-ops, pr-manager, issue-tracker, utils), web-ui components (config-panel.jsx, oauth-callback.html), Vitest tests (unit + integration with mocked API). Security: tokens only in sdk.secrets, cryptographically random CSRF state with 10-min TTL, token redaction in errors, require_pr_review merge policy. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit b9dee2f.
feat: add github-dev-assistant plugin — full GitHub workflow automation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #3
- Remove all sdk.inline.send() calls that caused 400/BOT_RESPONSE_TIMEOUT errors - Tools now return structured inline result objects (article type with input_message_content + reply_markup) instead of sending messages directly - Add sdk.bot.onInlineQuery handler with three results: open, about, custom - Add query alias routing (ton-bridge:open, ton_bridge_open, etc.) - Fix button label: no leading space when emoji is empty - Support dynamic startParam in Mini App URL - Bump version to 1.1.0 and declare bot.inline: true in manifest Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit c241e1f.
refactor: rewrite ton-bridge plugin to inline-native architecture
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #5
Fixes #5 — the plugin had architectural issues that prevented the LLM from using it correctly: - Renamed tools with ton_trading_ prefix for global uniqueness - Removed embedded signal/strategy logic (ton_analyze_signal, ton_generate_plan, ton_switch_mode) — the LLM now owns strategy decisions - Fixed sdk.ton.dex API calls: use dex.quote({fromAsset,toAsset,amount}) and dex.swap() instead of the non-existent dex.quoteDeDust/quoteSTONfi variants with wrong parameter shapes - Fixed sdk.telegram.sendMessage calls to use (chatId, text) signature - Removed sdk.ton.validate_risk() call (non-existent SDK method) - Removed autoTrade config gate from execute path — LLM decides when to act - Collapsed from 10 tools to 6 atomic, well-named tools: ton_trading_get_market_data, ton_trading_get_portfolio, ton_trading_validate_trade, ton_trading_simulate_trade, ton_trading_execute_swap, ton_trading_record_trade - Simplified DB schema (trade_journal + sim_balance) - Updated manifest.json and README.md to match new architecture - Updated registry.json description and tags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 481c138.
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #7
refactor: rewrite ton-trading-bot as atomic tool-provider plugin
- Remove sdk.bot.onInlineQuery handler (never executed in MTProto agent)
- Fix tool return format: was { success, data: { type: "article", ... } },
now returns agent-compatible { content, reply_markup }
- Add proper manifest.json following the same structure as other plugins
- Remove TypeScript build files (index.ts, manifest.ts, tsconfig.json,
tsup.config.ts) — the plugin uses plain JS like all other plugins
- Use optional chaining (?.)) for sdk.log and sdk.pluginConfig access
to avoid crashes if they are not provided
Fixes #7
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 1e539a8.
fix(ton-bridge): rewrite plugin for LLM tool agent compatibility
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #9
Fixes critical incompatibilities identified in issue #9: 1. **Return format**: All tools now return `{ content: string }` (human-readable text) instead of `{ success, data }` JSON blobs. The LLM agent directly reads `content` and presents it to the user without extra parsing. 2. **Authentication**: Replaced OAuth 2.0 flow (incompatible with agent runtime — no callback handler) with Personal Access Token (PAT) via `sdk.secrets`. Set `github_token` secret to connect. Removed `github_auth` tool and the OAuth `lib/auth.js` module. Updated `manifest.json` secrets declaration. 3. **Client instantiation**: GitHub client is now created inside each tool's `execute()` function (not shared at SDK init time), so token updates in `sdk.secrets` are always picked up — no stale client issues. 4. **LLM-friendly descriptions**: All tool descriptions rewritten from technical API docs to intent-level ("Use this when the user wants to...") so the LLM can correctly decide when to call each tool. 5. **Normalized output**: List tools (repos, PRs, issues) return formatted Markdown lists instead of raw JSON arrays. Errors include a human-readable prefix ("Failed to list repositories: ..."). 6. **Tests**: All 38 tests updated and passing — auth tests cover new PAT flow, integration tests use `global.fetch` mocking instead of injected client mock. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit b48e695.
fix(github-dev-assistant): rewrite plugin for LLM agent compatibility
docs(ton-bridge): clarify auto-loading and optional config
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #29
- Remove unused createRequire import from test file - Align registry.json description with manifest.json for consistency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 095df4e.
fix(ton-bridge): clean up plugin and document agent-side duplication bug
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #31
…_custom_message When the LLM calls ton_bridge_custom_message without providing customMessage (despite it being in the JSON Schema required array), params.customMessage is undefined and gets passed directly to sdk.telegram.sendMessage, causing a crash. Add a ?? fallback chain: params.customMessage ?? sdk.pluginConfig?.customMessage ?? hardcoded default, consistent with how ton_bridge_open handles params.message. Closes #31 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 18e49bb.
fix(ton-bridge): add fallback for missing customMessage in ton_bridge_custom_message
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #33
…t links
The agent's TelegramBridge.sendMessage only supports callback_data buttons
in inlineKeyboard. URL buttons ({ text, url }) cause Buffer.from(undefined)
because the agent code expects callback_data on every button. This fixes
all three tools (ton_bridge_open, ton_bridge_about, ton_bridge_custom_message)
by embedding the Mini App deep link directly in the message text instead.
Fixes #33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit 75dcb05.
fix(ton-bridge): replace inlineKeyboard URL buttons with embedded text links
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #35
Implements all enhancements proposed in issue #35: File operations (4 new tools): - github_delete_file: delete a file from a repository - github_list_directory: list contents of a directory - github_search_code: search code patterns using GitHub's search API - github_download_file: download file content with optional local save Commit operations (2 new tools): - github_list_commits: list commit history with branch/path/author filters - github_get_commit: get detailed commit info including file diffs Extended issue/PR operations (5 new tools): - github_list_comments: list comments on issues or PRs - github_update_issue: update title, body, labels, assignees, state - github_reopen_issue: reopen a closed issue - github_assign_issue: assign/clear assignees on an issue - github_list_pull_request_reviews: list PR reviews with state Repository info tools (3 new tools): - github_list_languages: list languages with byte counts and percentages - github_list_collaborators: list collaborators with permission levels - github_list_teams: list teams in a GitHub organization Extended workflow operations (3 new tools): - github_list_workflows: list all GitHub Actions workflows - github_list_workflow_runs: list runs with branch/status filtering - github_cancel_workflow_run: cancel a running workflow run Label operations (3 new tools): - github_list_labels: list all labels with colors/descriptions - github_create_label: create a label with custom hex color - github_delete_label: delete a label from a repository Also: allow JSON body in DELETE requests (needed by GitHub delete file API). Total tools: 14 → 34. All 34 tools pass npm run validate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 7608abc.
…server parity, bump to v3.0.0 Expands the plugin from 34 to 57 tools based on comparison with the official github-mcp-server (https://github.com/github/github-mcp-server). New tools: - Extended repo ops (8): fork_repo, search_repos, list_branches, push_files, get_repo_tree, list_tags, list_releases, get_latest_release - Extended PR/issue ops (4): search_issues, update_pr, add_pr_review, get_job_logs - User/social ops (8): get_me, search_users, list_notifications, star_repo, unstar_repo, list_gists, get_gist, create_gist - Security ops (2): list_code_scanning_alerts, list_dependabot_alerts - Discussion ops (2): list_discussions, get_discussion Also adds GraphQL support to the GitHub client (required for Discussions API). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
feat(github-dev-assistant): add 23 new tools for github-mcp-server parity, bump to v3.0.0
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #37
- Expand features table from 14 tools (v1.0.0) to 57 tools across 12 categories - Add instructions for changing the GitHub token via the web UI Keys tab - Add usage examples for all new tool categories (fork, branches, commits, Actions management, labels, repo info, user/social, security, discussions) - Add tool reference entries for all 43 new tools added in v2.0.0 and v3.0.0 Fixes #37 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 642b983.
docs(github-dev-assistant): update README to v3.0.0 with all 57 tools
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #39
- Add comprehensive unit tests (35 tests covering all 6 tools) with mocked SDK — no real network or disk access required - Fix unused `context` parameter lint warnings in index.js execute functions (rename to `_context` per eslint no-unused-vars rule) - Add ton-trading-bot to README.md DeFi & Trading table so the agent can discover it via the marketplace and documentation - Update README plugin/tool count badges (25→26 plugins, 183→189 tools) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 8bd325a.
fix(ton-trading-bot): add tests, fix lint warnings, register in README
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #41
…on-trading-bot README - Add ton-bridge (3 tools) to TON Infrastructure section in main README - Add new Developer Tools section with github-dev-assistant (57 tools) - Update plugin/tool badge counts: 26→28 plugins, 189→249 tools - Align ton-trading-bot README headings with other plugins: - "Installation" → "Install" + restart note - "Usage Examples" → "Usage" with bullet list style - "Tool Schemas" → "Schemas" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit dd30c95.
docs: add ton-bridge and github-dev-assistant to main README, align ton-trading-bot README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 Description of changes
This PR adds three new plug-ins to extend the functionality of the Teleton AI Agent.:
ton-bridgeton-trading-bot🔌 Details on plugins
🌉 TON Bridge Plugin
https://t.me/TONBridge_robot?startappton_bridge_open— open the bridge with a buttonton_bridge_about— send information about the projectton_bridge_custom_message— custom message with a button💹 TON Trading Bot Plugin
Architecture according to the tool-provider pattern:
Tools:
ton_trading_get_market_dataton_trading_get_portfolioton_trading_validate_tradeton_trading_simulate_tradeton_trading_execute_swapton_trading_record_trade🔐 Risk Management:
scope: dm-onlyforexecute_swap— real operations only in private messages🐙 GitHub Dev Assistant Plugin
Full development cycle on GitHub directly from Telegram:
github_auth',github_check_auth`github_list_repos',github_create_repo`github_get_file,github_update_file,github_create_branchgithub_create_pr,github_list_prs,github_merge_prgithub_create_issue,github_list_issues,github_comment_issue,github_close_issuegithub_trigger_workflow, Security:
require_pr_reviewoption to confirm the PR merger✅ Checklist
@teleton-agent/sdkmanifest.jsonandindex.jswith the exportmanifest{ success, data?, error? }config.yamlconfiguration has been verifiedTesting
📝 Notes
ton-bridge@1.2.0,ton-trading-bot@1.0.0,github-dev-assistant@1.0.0🔗 Related changes
manifestfor runtime validation