Skip to content

feat: add @mangoswap/elizaos-plugin — cross-chain swaps for 10+ chains#336

Open
0tabris wants to merge 2 commits intoelizaos-plugins:mainfrom
0tabris:add-mangoswap-plugin
Open

feat: add @mangoswap/elizaos-plugin — cross-chain swaps for 10+ chains#336
0tabris wants to merge 2 commits intoelizaos-plugins:mainfrom
0tabris:add-mangoswap-plugin

Conversation

@0tabris
Copy link
Copy Markdown

@0tabris 0tabris commented Apr 8, 2026

Plugin: @mangoswap/elizaos-plugin

Cross-chain token swaps via MangoSwap — bridge and swap tokens across 10+ blockchains using natural language.

What it does

Gives any ElizaOS agent the ability to:

  • Get cross-chain swap quotes (GET_SWAP_QUOTE)
  • Execute cross-chain swaps (CREATE_CROSS_CHAIN_SWAP) — requires MANGO_ALLOW_WRITE=true
  • Check swap status (GET_SWAP_STATUS)

Example

User:  "Bridge 0.5 ETH from Base to Arbitrum for 0xAbCd..."
Agent: [GET_SWAP_QUOTE] → [CREATE_CROSS_CHAIN_SWAP]
Agent: "Swap created ✅ — send 0.5 ETH to 0x9BcD...
        You'll receive ~0.498 ETH on Arbitrum in ~4 minutes.
        Swap ID: abc-def-123"

Supported chains

Ethereum · Base · Arbitrum · Optimism · Polygon · BSC · Avalanche · Solana · Bitcoin · TRON

npm

https://www.npmjs.com/package/@mangoswap/elizaos-plugin

Repository

https://github.com/0tabris/mangoswap/tree/main/mangoswap/packages/elizaos-plugin

Checklist

  • TypeScript source with full types
  • @elizaos/core peer dependency
  • Actions with validate(), examples, similes
  • Structured error handling (code, message, retryable)
  • Works without API key (anonymous rate-limited access)
  • No secrets or private keys hardcoded
  • Only index.json modified in this PR

Summary by CodeRabbit

  • New Features
    • MangoSwap plugin is now available and integrated into the platform, giving users access to additional swapping and plugin-based features.
    • The integration was added without altering existing mappings or removing prior functionality, ensuring a seamless rollout for users.

Greptile Summary

This PR adds a single entry to index.json registering @mangoswap/elizaos-plugin, a cross-chain swap plugin, pointing to github:0tabris/mangoswap. Two issues need to be resolved before merge:

  • The entry is inserted after @mazzz/... but alphabetically @mangoswap (mango) precedes @mazzz (mazz) — it must move one line up.
  • The GitHub reference targets the monorepo root rather than the plugin's subdirectory (mangoswap/packages/elizaos-plugin); the correct specifier should follow the #branch:path convention used by other monorepo entries (e.g., github:0tabris/mangoswap#main:mangoswap/packages/elizaos-plugin), otherwise automated registry generation will read the wrong package.json.

Confidence Score: 4/5

Not safe to merge as-is — the monorepo path specifier is missing, which would cause the automated registry generator to read the wrong package.json.

Two P1 findings: incorrect alphabetical placement and a missing subdirectory path in the GitHub reference that would break automated registry generation for a monorepo plugin. Both are straightforward one-line fixes.

index.json — both issues are on line 360.

Vulnerabilities

No security concerns identified. The change is limited to adding a single JSON key-value entry and does not introduce executable code, secrets, or sensitive data.

Important Files Changed

Filename Overview
index.json Adds @mangoswap/elizaos-plugin entry, but the entry is out of alphabetical order and the GitHub reference points to the monorepo root rather than the plugin's subdirectory.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[index.json entry merged] --> B[GitHub Action triggers registry generation]
    B --> C{GitHub ref resolves to correct location?}
    C -- "current: github:0tabris/mangoswap (root)" --> D[Reads root package.json\n❌ wrong/missing metadata]
    C -- "needed: github:0tabris/mangoswap#main:mangoswap/packages/elizaos-plugin" --> E[Reads plugin package.json\n✅ correct metadata]
    E --> F[generated-registry.json updated]
    F --> G[Plugin available in elizaOS CLI & web registry]
Loading

Reviews (1): Last reviewed commit: "feat: add @mangoswap/elizaos-plugin — cr..." | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d228f3d9-63b8-4af5-872f-43784ec5483a

📥 Commits

Reviewing files that changed from the base of the PR and between 8ac9c78 and 32fe6a3.

📒 Files selected for processing (1)
  • index.json
✅ Files skipped from review due to trivial changes (1)
  • index.json

Walkthrough

Added a new registry mapping in index.json: @mangoswapio/elizaos-plugingithub:0tabris/mangoswap. No other keys or mappings were modified or removed.

Changes

Cohort / File(s) Summary
Plugin Registry Mapping
index.json
Added a single entry mapping @mangoswapio/elizaos-plugin to github:0tabris/mangoswap.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A plugin hops into the registry today,
Mangoswap finds its mapping way,
One line added, tidy and light,
Index updated — hop, delight! 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is incomplete against the template; it lacks verification of critical checklist items from the Registry Update Checklist template, particularly the JSON formatting requirements and plugin repository standards. Verify and confirm completion of all Registry Update Checklist items, especially JSON formatting, alphabetical ordering, and correct GitHub monorepo path specification per the template requirements.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a registry entry for @mangoswap/elizaos-plugin, a cross-chain swap plugin supporting 10+ chains.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

index.json Outdated
"@kudo-dev/plugin-kudo": "github:Kudo-Archi/plugin-kudo",
"@mascotai/plugin-connections": "github:mascotai/plugin-connections",
"@mazzz/plugin-elizaos-compchembridge": "github:Mazzz-zzz/plugin-elizaos-compchembridge",
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Entry out of alphabetical order

@mangoswap ("mango") sorts before @mazzz ("mazz") because 'n' < 'z', so this line should be placed above the @mazzz entry, not below it. Both the README and the PR template checklist explicitly require alphabetical ordering — the automated registry tooling may also depend on this ordering.

Suggested change
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
"@mazzz/plugin-elizaos-compchembridge": "github:Mazzz-zzz/plugin-elizaos-compchembridge",

(i.e., swap lines 359 and 360 so @mangoswap precedes @mazzz.)

index.json Outdated
"@kudo-dev/plugin-kudo": "github:Kudo-Archi/plugin-kudo",
"@mascotai/plugin-connections": "github:mascotai/plugin-connections",
"@mazzz/plugin-elizaos-compchembridge": "github:Mazzz-zzz/plugin-elizaos-compchembridge",
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 GitHub reference points to repo root, not the plugin subdirectory

The PR description states the plugin lives at github.com/0tabris/mangoswap/tree/main/mangoswap/packages/elizaos-plugin, meaning this is a monorepo and the plugin is nested two levels deep. The current value "github:0tabris/mangoswap" resolves to the repository root, which almost certainly has a different (or missing) package.json than the actual plugin package. The automated registry generation will fail to pick up the correct plugin metadata.

For monorepo plugins, a branch+path specifier is required (see the existing @kamiyo/eliza entry as a precedent):

Suggested change
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap#main:mangoswap/packages/elizaos-plugin",

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@index.json`:
- Line 360: Registry entry "@mangoswap/elizaos-plugin" points to
"github:0tabris/mangoswap" which 404s; verify and correct the repository
reference by checking the actual GitHub owner/repo for the elizaos plugin and
replace the value with the correct GitHub shorthand (e.g., github:OWNER/REPO) or
a full URL, or remove the entry if the plugin is hosted elsewhere; ensure the
repository is public and accessible so the registry can resolve it and update
the value in index.json for the "@mangoswap/elizaos-plugin" key.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4ea7abaa-591c-4862-af5b-76a8146dd870

📥 Commits

Reviewing files that changed from the base of the PR and between ce554dd and 8ac9c78.

📒 Files selected for processing (1)
  • index.json

index.json Outdated
"@kudo-dev/plugin-kudo": "github:Kudo-Archi/plugin-kudo",
"@mascotai/plugin-connections": "github:mascotai/plugin-connections",
"@mazzz/plugin-elizaos-compchembridge": "github:Mazzz-zzz/plugin-elizaos-compchembridge",
"@mangoswap/elizaos-plugin": "github:0tabris/mangoswap",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify the mangoswap repository structure and plugin location

# Check if repository exists and examine its structure
echo "=== Checking repository existence and structure ==="
gh api repos/0tabris/mangoswap --jq '{name: .name, default_branch: .default_branch, private: .private}' || echo "Repository not found or not accessible"

# List root directory contents
echo -e "\n=== Root directory contents ==="
gh api repos/0tabris/mangoswap/contents --jq '.[] | select(.type == "dir" or .name == "package.json") | {name: .name, type: .type, path: .path}'

# Check for package.json at root
echo -e "\n=== Checking for package.json at root ==="
gh api repos/0tabris/mangoswap/contents/package.json --jq '{name: .name, path: .path}' 2>/dev/null || echo "No package.json at root"

# Check for package.json at nested path
echo -e "\n=== Checking for package.json at mangoswap/packages/elizaos-plugin ==="
gh api repos/0tabris/mangoswap/contents/mangoswap/packages/elizaos-plugin/package.json --jq '{name: .name, path: .path}' 2>/dev/null || echo "No package.json at mangoswap/packages/elizaos-plugin"

# If found at nested path, retrieve package name to confirm
echo -e "\n=== If nested, verify package name matches ==="
gh api repos/0tabris/mangoswap/contents/mangoswap/packages/elizaos-plugin/package.json --jq '.content' 2>/dev/null | base64 -d 2>/dev/null | jq -r '.name' || echo "Could not retrieve package name"

Repository: elizaos-plugins/registry

Length of output: 958


🌐 Web query:

0tabris/mangoswap elizaos-plugin location structure

💡 Result:

https://github.com/0tabris/mangoswap currently returns 404 Not Found, so I can’t inspect its actual folder layout or where an elizaOS plugin lives inside it. [1]

If you’re trying to locate an elizaOS plugin inside a repo/monorepo, look for a package that matches the standard plugin structure:

  • Root plugin folder (or monorepo package) typically contains:
    • src/index.ts (plugin entry/manifest)
    • src/actions/* (actions)
    • package.json (plugin metadata)
    • dist/ (build output)
    • README.md
    • images/logo.jpg and images/banner.jpg (required for registry/publish) [2][3]

Common ways to identify the plugin package:

  • package.json name starts with plugin- (or published as @elizaos/plugin-*). [3]
  • package.json keywords include elizaos-plugin / eliza-plugin, and/or eliza.type: "plugin". [3][4]

Concrete example of a real plugin repo layout (folders you’ll commonly see):

  • src/, dist/, __tests__/, plus package.json, tsconfig.json, etc. [5]

If you share the correct repo URL (or the repo tree), I can point to the exact plugin location/path within mangoswap.

Sources: [1][2][3][4][5]


Verify the repository URL — https://github.com/0tabris/mangoswap returns 404 Not Found.

The registry entry references a non-existent or inaccessible repository. Before addressing any subdirectory path issues, confirm that the correct repository URL is github:0tabris/mangoswap. If the plugin exists in a different repository or under a different owner, update the entry accordingly. Additionally, ensure the repository is public and accessible, as the registry requires it to resolve the plugin.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.json` at line 360, Registry entry "@mangoswap/elizaos-plugin" points to
"github:0tabris/mangoswap" which 404s; verify and correct the repository
reference by checking the actual GitHub owner/repo for the elizaos plugin and
replace the value with the correct GitHub shorthand (e.g., github:OWNER/REPO) or
a full URL, or remove the entry if the plugin is hosted elsewhere; ensure the
repository is public and accessible so the registry can resolve it and update
the value in index.json for the "@mangoswap/elizaos-plugin" key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant