-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support autonome platform #2121
Conversation
@coderabbitai review |
📝 WalkthroughWalkthroughThis pull request introduces the Autonome plugin for the Eliza agent system. The changes include adding configuration options in Changes
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (4)
packages/plugin-autonome/src/actions/launchAgent.ts (3)
71-75
: Avoid Using Deprecated FunctiongenerateObjectDeprecated
The function
generateObjectDeprecated
is deprecated. Consider using the updated function to ensure future compatibility.
116-116
: Simplify Condition with Optional ChainingYou can simplify the conditional check using optional chaining for better readability.
Apply this diff:
- if (resp && resp.data && resp.data.app && resp.data.app.id) { + if (resp?.data?.app?.id) {🧰 Tools
🪛 Biome (1.9.4)
[error] 116-116: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
144-146
: Handle Errors Safely in Catch BlockThe
error
object may not always have amessage
property. Use a fallback to prevent undefined errors.Apply this diff:
callback({ - text: `Error launching agent: ${error.message}`, - content: { error: error.message }, + text: `Error launching agent: ${error?.message || error}`, + content: { error: error?.message || error }, });.env.example (1)
479-482
: Document JWT token requirements and consider RPC URL flexibility.While the RPC URL is confirmed to be in production, consider:
- Adding a comment describing the JWT token format and how to obtain it
- Making the RPC URL configurable for different environments (dev/staging)
# Autonome Configuration -AUTONOME_JWT_TOKEN= +AUTONOME_JWT_TOKEN= # Format: xxx.yyy.zzz - Obtain from Autonome dashboard -AUTONOME_RPC=https://wizard-bff-rpc.alt.technology/v1/bff/aaa/apps +AUTONOME_RPC= # Default: https://wizard-bff-rpc.alt.technology/v1/bff/aaa/apps
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.env.example
(1 hunks)agent/package.json
(1 hunks)agent/src/index.ts
(2 hunks)packages/plugin-autonome/.npmignore
(1 hunks)packages/plugin-autonome/eslint.config.mjs
(1 hunks)packages/plugin-autonome/package.json
(1 hunks)packages/plugin-autonome/src/actions/launchAgent.ts
(1 hunks)packages/plugin-autonome/src/index.ts
(1 hunks)packages/plugin-autonome/tsconfig.json
(1 hunks)packages/plugin-autonome/tsup.config.ts
(1 hunks)
✅ Files skipped from review due to trivial changes (5)
- packages/plugin-autonome/.npmignore
- packages/plugin-autonome/eslint.config.mjs
- packages/plugin-autonome/tsup.config.ts
- packages/plugin-autonome/tsconfig.json
- packages/plugin-autonome/package.json
🧰 Additional context used
🪛 Biome (1.9.4)
packages/plugin-autonome/src/actions/launchAgent.ts
[error] 116-116: Change to an optional chain.
Unsafe fix: Change to an optional chain.
(lint/complexity/useOptionalChain)
🔇 Additional comments (3)
packages/plugin-autonome/src/index.ts (1)
1-12
: Code Implementation Looks GoodThe
autonomePlugin
is correctly defined and exported.agent/src/index.ts (1)
74-74
: Correct Integration ofautonomePlugin
The
autonomePlugin
is properly imported and conditionally included based onAUTONOME_JWT_TOKEN
. This ensures the plugin is only activated when configured.Also applies to: 641-641
agent/package.json (1)
60-60
: LGTM! Dependency addition follows workspace conventions.The new Autonome plugin dependency is correctly added with workspace syntax.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* feat: support autonome platform * Update packages/plugin-autonome/src/actions/launchAgent.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix typo * Update packages/plugin-autonome/src/actions/launchAgent.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Sayo <hi@sayo.wtf> Co-authored-by: Odilitime <janesmith@airmail.cc> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Relates to
Risks
Background
What does this PR do?
To support https://dev.autonome.fun platform, using Eliza launch Eliza anytime.
eliza.mp4
What kind of change is this?
Documentation changes needed?
Testing
Where should a reviewer start?
Detailed testing steps
Added two new environments:
Once can login to https://dev.autonome.fun to get their JWT token from console, while AUTONOME_RPC is fixed for now and it is production already.