Skip to content

Arthur/acp client provider v2 20260701#15

Open
arthrod wants to merge 37 commits into
vcoderun:mainfrom
arthrod:arthur/acp-client-provider-v2-20260701
Open

Arthur/acp client provider v2 20260701#15
arthrod wants to merge 37 commits into
vcoderun:mainfrom
arthrod:arthur/acp-client-provider-v2-20260701

Conversation

@arthrod

@arthrod arthrod commented Jul 8, 2026

Copy link
Copy Markdown

Description

This PR introduces the ACP client provider bridge for Pydantic AI v2, a major step toward making ACP Kit a first-class backend for Pydantic AI agents.

With this change, ACP agents can be consumed directly as Pydantic AI models via the new AcpProvider / AcpModel surface, backed by AcpHostBridge for session lifecycle and projection support. The bridge handles model profiles, streaming prompt rendering, tool-call mapping, approvals, and session state, and the public API is now exported from pydantic_acp.

The pydantic-acp adapter has been aligned to require Pydantic AI v2, and the synchronized workspace version has been bumped to 1.1.0 with a matching changelog entry.

I also fixed a small type-safety issue where cast() was being called with string literals instead of the actual Sequence[AgentPromptBlock] and AcpProvider types.

Kudos to the project maintainers — ACP Kit's clean adapter/provider split, exhaustive test matrix, and strict pre-commit / release tooling make large surface additions like this straightforward to land safely.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist

  • My code follows the style guidelines of this project (ruff format & check)
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings (basedpyright & ty)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (pytest)

arthrod and others added 30 commits July 1, 2026 16:42
🔧 CodeRabbit Recipe: Add custom TDD red-green finishing touch
🔧 CodeRabbit Recipe: Add custom finishing touch type-mania
🔧 CodeRabbit Recipe: Deduplicate custom finishing touches
🔧 CodeRabbit Recipe: Add custom finishing touch tdd-red-green
opencode-agent Bot added 7 commits July 7, 2026 19:23
- Add type cast for prompt rendering to satisfy type checker
- Fix _default_render_prompt_blocks to return empty list for empty messages
- Fix test to call model_profile as instance method instead of static
- Fix host bridge test assertions to avoid object comparison issues
- Fix langchain adapter test monkeypatch for importlib
- Remove unused AcpUpdateRecord import
- Add type ignore comments for test mocks that don't implement full ACP Agent protocol
- Update .gitignore to exclude temporary test scripts
…atic

- Change AcpProvider.model_profile back to @staticmethod
- Add _history_mode field to AcpProvider
- Change AcpModel._provider type from AcpProvider to Provider[AcpAgent] with cast
- Add type annotation for delegate.on_connect in test to fix type checker
…ssignment

- Remove unused Callable import from typing
- Replace direct attribute assignment with setattr for on_connect handler to avoid type checker issues
…e casts

- Add missing trailing comma in session_update call
- Change cast type arguments to string literals to avoid import-time issues
- Add missing ACP protocol methods to test agent stubs
- Remove unnecessary type ignore comments where stubs now satisfy protocol
- Add trailing commas in test assertions for consistency
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