@mock_only
Feature: A2A extension method routing via _cleveragents/ prefix
  As a CleverAgents developer
  I want the A2A local facade to support _cleveragents/ extension methods
  So that operations use spec-aligned method names per ADR-047

  Scenario: Facade supports all _cleveragents/ extension operations
    Given a facade instance for extension method testing
    Then the facade should support _cleveragents/plan/ methods
    And the facade should support _cleveragents/registry/ methods
    And the facade should support _cleveragents/context/ methods
    And the facade should support _cleveragents/health/ methods
    And the facade should support _cleveragents/sync/ methods
    And the facade should support _cleveragents/namespace/ methods

  Scenario: Plan use via _cleveragents/plan/use
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/plan/use" with params {"action_name": "test"}
    Then the response should be ok
    And the response data should contain key "plan_id"

  Scenario: Plan execute via _cleveragents/plan/execute
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/plan/execute" with params {"plan_id": "test-id"}
    Then the response should be ok

  Scenario: Plan cancel via _cleveragents/plan/cancel
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/plan/cancel" with params {"plan_id": "test-id"}
    Then the response should be ok

  Scenario: Plan list via _cleveragents/plan/list
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/plan/list" with params {}
    Then the response should be ok
    And the response data should contain key "plans"

  Scenario: Health check via _cleveragents/health/check
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/health/check" with params {}
    Then the response should be ok
    And the response data should contain key "status"

  Scenario: Sync stub returns not_implemented
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/sync/pull" with params {}
    Then the response should be ok
    And the response data should have "stub" set to true

  Scenario: Namespace stub returns not_implemented
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/namespace/list" with params {}
    Then the response should be ok
    And the response data should have "stub" set to true

  Scenario: Legacy operation names still work
    Given a facade instance for extension method testing
    When I dispatch "plan.create" with params {"action_name": "test"}
    Then the response should be ok
    And the response data should contain key "plan_id"

  Scenario: Registry tool list via extension method
    Given a facade instance for extension method testing
    When I dispatch "_cleveragents/registry/tool/list" with params {}
    Then the response should be ok
    And the response data should contain key "tools"
