Skip to content

refactor(agent-runtime): extract provider contracts to corvus-traits (#431)#508

Merged
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/capability-architecture-431-provider-contracts
Apr 11, 2026
Merged

refactor(agent-runtime): extract provider contracts to corvus-traits (#431)#508
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/capability-architecture-431-provider-contracts

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Related Issues

Summary

Extracts shared provider contracts from src/providers/traits.rs into crates/corvus-traits/src/providers.rs (new module), exports from lib.rs, and converts runtime traits.rs into a compatibility shim with re-exports.

Extracted contracts:

  • ChatMessage, ToolCall, ChatResponse, ChatRequest
  • ToolResultMessage, ConversationMessage, StreamChunk, StreamOptions
  • ProviderCapabilities, ToolsPayload, Provider trait
  • build_tool_instructions_text, StreamError, StreamResult

Runtime's traits.rs is now a compatibility shim that re-exports from corvus_traits::providers.

Tested Information

  • cargo check — passes
  • cargo fmt --check — passes
  • cargo clippy — passes with no warnings
  • cargo test --test traits_api_compat2 tests pass
    • legacy_paths_match_extracted_trait_identities
    • legacy_paths_accept_trait_objects_from_extracted_crate
  • Full test suite — 3478 tests pass

Documentation Impact

  • No docs update required because: internal refactor only; no API/behavior changes

Breaking Changes

  • None — maintains backward compatibility via re-exports

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c8c087be-bb6e-469a-ba2b-5b9513cf8029

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/capability-architecture-431-provider-contracts

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.

@github-actions
Copy link
Copy Markdown
Contributor

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 89% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 10 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3087 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 544 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 92% >= 0%
Repo History Min PRs Previous PRs in this repo 228 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-11 to 2026-04-11

@yacosta738 yacosta738 merged commit 3ffa363 into feature/capability-architecture Apr 11, 2026
6 of 7 checks passed
@yacosta738 yacosta738 deleted the feature/capability-architecture-431-provider-contracts branch April 11, 2026 13:40
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