Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

add get accounts from cloud + lint #39

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

Merged
merged 7 commits into from
May 28, 2025
Merged

add get accounts from cloud + lint #39

merged 7 commits into from
May 28, 2025

Conversation

cjber
Copy link
Contributor

@cjber cjber commented May 28, 2025

Summary by CodeRabbit

  • New Features

    • Added a new method to list all engine server wallets and their predicted smart account addresses.
    • Automated code linting and type checking for Python projects with a new workflow.
  • Bug Fixes

    • Improved validation to ensure required schema keys are present, reducing potential runtime errors.
  • Refactor

    • Enhanced type safety and code clarity in various modules.
    • Simplified and modernized code expressions for better maintainability.
  • Chores

    • Updated development dependencies and workspace configurations for improved project structure.

Copy link

coderabbitai bot commented May 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a new GitHub Actions lint workflow for two Python projects, refines workspace and dependency configurations, and enhances code quality and safety. It adds validation and schema cleaning in adapters, improves type annotations, and introduces a new get_accounts method to the EngineCloud service for listing project wallets.

Changes

File(s) Change Summary
.github/workflows/lint.yml Added a GitHub Actions workflow for linting and type checking two Python projects using UV, Ruff, and Pyright.
python/pyproject.toml Added [tool.uv.workspace] section defining workspace members thirdweb-ai and thirdweb-mcp.
python/thirdweb-ai/pyproject.toml
python/thirdweb-mcp/pyproject.toml
Updated dev dependencies and added [tool.uv.sources] for cross-project workspace integration.
python/thirdweb-ai/src/thirdweb_ai/adapters/google_adk/google_adk.py Improved schema validation and cleaning; enforced keyword-only arguments in run_async.
python/thirdweb-ai/src/thirdweb_ai/adapters/mcp/mcp.py Added type casting and type safety for schema parameters; passed annotations to FastMCPTool.
python/thirdweb-ai/src/thirdweb_ai/adapters/openai/agents.py Removed type ignore comments; ensured params_json_schema defaults to empty dict if schema is falsy.
python/thirdweb-ai/src/thirdweb_ai/adapters/pydantic_ai/pydantic_ai.py Added validation to ensure tool schemas contain parameters, raising ValueError if missing.
python/thirdweb-ai/src/thirdweb_ai/services/engine_cloud.py Added get_accounts method to list all engine server wallets and predicted smart account addresses.
python/thirdweb-ai/src/thirdweb_ai/services/init.py Added a newline at end of file (no logic change).
python/thirdweb-ai/src/thirdweb_ai/tools/tool.py Simplified conditionals and improved code readability in argument/model handling.
python/thirdweb-mcp/src/mcp.py Refined type annotation for transport parameter and ensured vault_access_token is never None when passed.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub Actions
    participant UV
    participant Ruff
    participant Pyright

    User->>GitHub Actions: Push or PR event triggers "Linter" workflow
    GitHub Actions->>UV: Install UV tool and dependencies for each project
    GitHub Actions->>Ruff: Run Ruff linter and formatter checks
    GitHub Actions->>Pyright: Run Pyright type checking on src/
    GitHub Actions-->>User: Report lint and type check results
Loading
sequenceDiagram
    participant Client
    participant EngineCloud

    Client->>EngineCloud: Call get_accounts()
    EngineCloud->>EngineCloud: GET request to "accounts" endpoint
    EngineCloud-->>Client: Return list of account objects with addresses
Loading

Possibly related PRs

  • thirdweb-dev/ai#35: Adds a get_accounts method to the EngineCloud class, directly extending its functionality.
  • thirdweb-dev/ai#34: Introduces the Google ADK adapter, which is further refined in this PR with enhanced schema validation and cleaning logic.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a58d05a and fe57a06.

⛔ Files ignored due to path filters (2)
  • python/thirdweb-ai/uv.lock is excluded by !**/*.lock
  • python/uv.lock is excluded by !**/*.lock
📒 Files selected for processing (12)
  • .github/workflows/lint.yml (1 hunks)
  • python/pyproject.toml (1 hunks)
  • python/thirdweb-ai/pyproject.toml (2 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/adapters/google_adk/google_adk.py (2 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/adapters/mcp/mcp.py (2 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/adapters/openai/agents.py (1 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/adapters/pydantic_ai/pydantic_ai.py (1 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/services/__init__.py (1 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/services/engine_cloud.py (1 hunks)
  • python/thirdweb-ai/src/thirdweb_ai/tools/tool.py (3 hunks)
  • python/thirdweb-mcp/pyproject.toml (2 hunks)
  • python/thirdweb-mcp/src/mcp.py (3 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

socket-security bot commented May 28, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License

View full report

@cjber cjber merged commit 7d09b32 into main May 28, 2025
6 checks passed
@cjber cjber deleted the cb/get-accounts branch May 28, 2025 09:47
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.