feat(acp): wire ACP local facade handlers to live services #501

Closed
opened 2026-03-02 04:27:38 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: feat(acp): wire ACP local facade handlers to live services
  • Branch: feature/m6-acp-facade-wiring

Background

The AcpLocalFacade currently has 11 operation handlers that return static placeholder data (e.g., {"tools": []}, {"context": {}}). These handlers need to be wired to the actual application services so that ACP operations route through real plan, session, registry, context, and event services. This is the integration point between the ACP protocol layer and the domain/application layer.

Acceptance Criteria

  • Wire session.create and session.close to SessionService.
  • Wire plan.create, plan.execute, plan.status, plan.diff, plan.apply to PlanService and PlanLifecycleService.
  • Wire registry.list_tools and registry.list_resources to ToolRegistry and resource services.
  • Wire context.get to the ACMS ContextAssemblyPipeline (or return stub until pipeline is ready).
  • Wire event.subscribe to AcpEventQueue for live event streaming.
  • Add error mapping from domain exceptions to ACP error codes (NOT_FOUND, INVALID_STATE, etc.).

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.

Subtasks

  • Wire session operations to SessionService.
  • Wire plan operations to PlanService / PlanLifecycleService.
  • Wire registry operations to ToolRegistry and resource services.
  • Wire context operations to ACMS pipeline (or guarded stub).
  • Wire event subscription to AcpEventQueue.
  • Add domain-exception-to-ACP-error-code mapping.
  • Update docs/reference/acp.md with wired operation details.
  • Tests (Behave): Add features/acp_facade_wiring.feature for live operation routing.
  • Tests (Robot): Add robot/acp_facade_wiring.robot integration tests.
  • Verify coverage >=97% via nox -s coverage_report.
  • Run nox (all default sessions), fix any errors.
## Metadata - **Commit Message**: `feat(acp): wire ACP local facade handlers to live services` - **Branch**: `feature/m6-acp-facade-wiring` ## Background The `AcpLocalFacade` currently has 11 operation handlers that return static placeholder data (e.g., `{"tools": []}`, `{"context": {}}`). These handlers need to be wired to the actual application services so that ACP operations route through real plan, session, registry, context, and event services. This is the integration point between the ACP protocol layer and the domain/application layer. ## Acceptance Criteria - [ ] Wire `session.create` and `session.close` to `SessionService`. - [ ] Wire `plan.create`, `plan.execute`, `plan.status`, `plan.diff`, `plan.apply` to `PlanService` and `PlanLifecycleService`. - [ ] Wire `registry.list_tools` and `registry.list_resources` to `ToolRegistry` and resource services. - [ ] Wire `context.get` to the ACMS `ContextAssemblyPipeline` (or return stub until pipeline is ready). - [ ] Wire `event.subscribe` to `AcpEventQueue` for live event streaming. - [ ] Add error mapping from domain exceptions to ACP error codes (NOT_FOUND, INVALID_STATE, etc.). ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [ ] Wire session operations to `SessionService`. - [ ] Wire plan operations to `PlanService` / `PlanLifecycleService`. - [ ] Wire registry operations to `ToolRegistry` and resource services. - [ ] Wire context operations to ACMS pipeline (or guarded stub). - [ ] Wire event subscription to `AcpEventQueue`. - [ ] Add domain-exception-to-ACP-error-code mapping. - [ ] Update `docs/reference/acp.md` with wired operation details. - [ ] Tests (Behave): Add `features/acp_facade_wiring.feature` for live operation routing. - [ ] Tests (Robot): Add `robot/acp_facade_wiring.robot` integration tests. - [ ] Verify coverage >=97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions), fix any errors.
freemo added this to the v3.5.0 milestone 2026-03-02 04:27:52 +00:00
aditya modified the milestone from v3.5.0 to v3.2.0 2026-03-02 07:25:01 +00:00
aditya modified the milestone from v3.2.0 to v3.5.0 2026-03-02 07:25:13 +00:00
freemo self-assigned this 2026-03-02 16:26:08 +00:00
Author
Owner

Implementation Notes

The ACP local facade wiring has been implemented and merged to master (commit 4b9df961).

Design Decisions

  • All 11 AcpLocalFacade operation handlers were wired to their corresponding application services via constructor-injected dependencies
  • Handlers gracefully fall back to stub responses when services are absent (defensive pattern)
  • context.get returns a stub pending the ACMS ContextAssemblyPipeline completion
  • Domain-to-ACP error code mapping implemented via map_domain_error() utility function

Key Module Locations

  • cleveragents.acp.facade.AcpLocalFacade — main facade with wired handlers
  • cleveragents.acp.errors.map_domain_error() — error code mapping
  • features/acp_facade_wiring.feature — 21 Behave BDD scenarios
  • robot/acp_facade_wiring.robot — 9 Robot Framework integration tests
  • docs/reference/acp.md — updated with wired operation details

Service Wiring Map

ACP Operation Target Service
session.create/close SessionService
plan.create/execute/status/diff/apply PlanLifecycleService
registry.list_tools ToolRegistry
registry.list_resources ResourceRegistryService
event.subscribe AcpEventQueue
context.get Stub (pending ACMS pipeline)

Test Results

  • All Behave scenarios passing
  • All Robot integration tests passing
  • Coverage maintained >=97%

This work was completed and merged as part of a previous batch. Transitioning to In Review.

## Implementation Notes The ACP local facade wiring has been implemented and merged to master (commit `4b9df961`). ### Design Decisions - All 11 `AcpLocalFacade` operation handlers were wired to their corresponding application services via constructor-injected dependencies - Handlers gracefully fall back to stub responses when services are absent (defensive pattern) - `context.get` returns a stub pending the ACMS `ContextAssemblyPipeline` completion - Domain-to-ACP error code mapping implemented via `map_domain_error()` utility function ### Key Module Locations - `cleveragents.acp.facade.AcpLocalFacade` — main facade with wired handlers - `cleveragents.acp.errors.map_domain_error()` — error code mapping - `features/acp_facade_wiring.feature` — 21 Behave BDD scenarios - `robot/acp_facade_wiring.robot` — 9 Robot Framework integration tests - `docs/reference/acp.md` — updated with wired operation details ### Service Wiring Map | ACP Operation | Target Service | |---|---| | session.create/close | SessionService | | plan.create/execute/status/diff/apply | PlanLifecycleService | | registry.list_tools | ToolRegistry | | registry.list_resources | ResourceRegistryService | | event.subscribe | AcpEventQueue | | context.get | Stub (pending ACMS pipeline) | ### Test Results - All Behave scenarios passing - All Robot integration tests passing - Coverage maintained >=97% This work was completed and merged as part of a previous batch. Transitioning to In Review.
Author
Owner

Closing: code merged to master via commit 4b9df961 (feat(acp): wire ACP local facade handlers to live services, 2026-03-03). Duplicate tracking issue #526 was also created and closed for this same work.

Closing: code merged to master via commit `4b9df961` (feat(acp): wire ACP local facade handlers to live services, 2026-03-03). Duplicate tracking issue #526 was also created and closed for this same work.
Author
Owner

Resolved by PR #526

Resolved by PR #526
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#501
No description provided.