Bug: A2aLocalFacade missing session management A2A operations — session/list, session/show, session/delete, session/export, session/import, session/tell not implemented #2396

Open
opened 2026-04-03 17:31:41 +00:00 by freemo · 1 comment
Owner

Bug Report

Feature Area: API Endpoints / A2A Protocol — Session Management

What was tested

The session management A2A operations in A2aLocalFacade (src/cleveragents/a2a/facade.py).

Expected Behavior (from spec)

Per docs/specification.md (lines 43247–43255), the spec defines these session A2A operations mapping to SessionWorkflow:

session/new     → SessionWorkflow.create()
session/load    → SessionWorkflow.resume()
session/list    → SessionWorkflow.list()
session/prompt  → SessionWorkflow.tell()
session/fork    → SessionWorkflow.fork()
session/resume  → SessionWorkflow.resume()

Additionally, the CLI commands (agents session list, agents session show, agents session delete, agents session export, agents session import, agents session tell) all require corresponding A2A operations. The spec states: "Every CLI command maps to either a standard A2A operation or a _cleveragents/ extension method."

Actual Behavior (from code analysis)

In src/cleveragents/a2a/facade.py, only two session operations exist:

# Legacy operations only:
"session.create"   _handle_session_create
"session.close"    _handle_session_close

The following session operations are completely absent from both _EXTENSION_OPERATIONS, _LEGACY_OPERATIONS, and the handler map:

  • session/list (maps to agents session list)
  • session/show or equivalent (maps to agents session show <SESSION_ID>)
  • session/delete or equivalent (maps to agents session delete <SESSION_ID>)
  • session/export or equivalent (maps to agents session export <SESSION_ID>)
  • session/import or equivalent (maps to agents session import)
  • session/tell or message/send (maps to agents session tell)
  • session/new, session/load, session/prompt, session/fork, session/resume (spec-defined standard A2A session operations)

Dispatching any of these operations returns A2aOperationNotFoundError, meaning the CLI commands for session list, show, delete, export, import, and tell cannot be routed through the A2A facade as the spec requires.

Steps to Reproduce

from cleveragents.a2a.facade import A2aLocalFacade
from cleveragents.a2a.models import A2aRequest

facade = A2aLocalFacade()
# All of these raise A2aOperationNotFoundError:
facade.dispatch(A2aRequest(method="session/list", params={}))
facade.dispatch(A2aRequest(method="session/show", params={"session_id": "S1"}))
facade.dispatch(A2aRequest(method="session/delete", params={"session_id": "S1"}))

Code Location

  • src/cleveragents/a2a/facade.py_EXTENSION_OPERATIONS (lines 62–87), _LEGACY_OPERATIONS (lines 90–102), _handlers() (lines 230–295)

Severity

High — Session management is a core user-facing feature. agents session list, agents session show, agents session delete, agents session export, agents session import, and agents session tell all require A2A routing that is currently absent.


Metadata

  • Branch: fix/a2a-facade-session-operations
  • Commit Message: fix(a2a): implement missing session management operations in A2aLocalFacade
  • Milestone: v3.4.0
  • Parent Epic: #933

Subtasks

  • Add session/newSessionWorkflow.create() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/loadSessionWorkflow.resume() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/listSessionWorkflow.list() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/promptSessionWorkflow.tell() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/forkSessionWorkflow.fork() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/resumeSessionWorkflow.resume() handler to _EXTENSION_OPERATIONS and handler map
  • Add session/show (or _cleveragents/session/show) extension method handler
  • Add session/delete (or _cleveragents/session/delete) extension method handler
  • Add session/export (or _cleveragents/session/export) extension method handler
  • Add session/import (or _cleveragents/session/import) extension method handler
  • Add session/tell / message/send handler routing to SessionWorkflow.tell()
  • Verify all new handlers are reachable via A2aLocalFacade.dispatch()
  • Tests (Behave): Add scenarios for each new session operation dispatching correctly
  • Tests (Behave): Add scenario verifying A2aOperationNotFoundError is NOT raised for any spec-defined session operation
  • Tests (Robot): Add integration tests for session list, show, delete, export, import, and tell via A2A facade
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • All spec-defined session A2A operations (session/new, session/load, session/list, session/prompt, session/fork, session/resume) are registered in _EXTENSION_OPERATIONS and dispatch without A2aOperationNotFoundError.
  • All CLI-required session operations (session/list, session/show, session/delete, session/export, session/import, session/tell) are routed through the A2A facade as the spec requires.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • 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.
  • All nox stages pass.
  • Coverage >= 97%.

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Bug Report **Feature Area**: API Endpoints / A2A Protocol — Session Management ### What was tested The session management A2A operations in `A2aLocalFacade` (`src/cleveragents/a2a/facade.py`). ### Expected Behavior (from spec) Per `docs/specification.md` (lines 43247–43255), the spec defines these session A2A operations mapping to `SessionWorkflow`: ``` session/new → SessionWorkflow.create() session/load → SessionWorkflow.resume() session/list → SessionWorkflow.list() session/prompt → SessionWorkflow.tell() session/fork → SessionWorkflow.fork() session/resume → SessionWorkflow.resume() ``` Additionally, the CLI commands (`agents session list`, `agents session show`, `agents session delete`, `agents session export`, `agents session import`, `agents session tell`) all require corresponding A2A operations. The spec states: *"Every CLI command maps to either a standard A2A operation or a `_cleveragents/` extension method."* ### Actual Behavior (from code analysis) In `src/cleveragents/a2a/facade.py`, only two session operations exist: ```python # Legacy operations only: "session.create" → _handle_session_create "session.close" → _handle_session_close ``` The following session operations are **completely absent** from both `_EXTENSION_OPERATIONS`, `_LEGACY_OPERATIONS`, and the handler map: - `session/list` (maps to `agents session list`) - `session/show` or equivalent (maps to `agents session show <SESSION_ID>`) - `session/delete` or equivalent (maps to `agents session delete <SESSION_ID>`) - `session/export` or equivalent (maps to `agents session export <SESSION_ID>`) - `session/import` or equivalent (maps to `agents session import`) - `session/tell` or `message/send` (maps to `agents session tell`) - `session/new`, `session/load`, `session/prompt`, `session/fork`, `session/resume` (spec-defined standard A2A session operations) Dispatching any of these operations returns `A2aOperationNotFoundError`, meaning the CLI commands for session list, show, delete, export, import, and tell cannot be routed through the A2A facade as the spec requires. ### Steps to Reproduce ```python from cleveragents.a2a.facade import A2aLocalFacade from cleveragents.a2a.models import A2aRequest facade = A2aLocalFacade() # All of these raise A2aOperationNotFoundError: facade.dispatch(A2aRequest(method="session/list", params={})) facade.dispatch(A2aRequest(method="session/show", params={"session_id": "S1"})) facade.dispatch(A2aRequest(method="session/delete", params={"session_id": "S1"})) ``` ### Code Location - `src/cleveragents/a2a/facade.py` — `_EXTENSION_OPERATIONS` (lines 62–87), `_LEGACY_OPERATIONS` (lines 90–102), `_handlers()` (lines 230–295) ### Severity **High** — Session management is a core user-facing feature. `agents session list`, `agents session show`, `agents session delete`, `agents session export`, `agents session import`, and `agents session tell` all require A2A routing that is currently absent. --- ## Metadata - **Branch**: `fix/a2a-facade-session-operations` - **Commit Message**: `fix(a2a): implement missing session management operations in A2aLocalFacade` - **Milestone**: v3.4.0 - **Parent Epic**: #933 ## Subtasks - [ ] Add `session/new` → `SessionWorkflow.create()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/load` → `SessionWorkflow.resume()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/list` → `SessionWorkflow.list()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/prompt` → `SessionWorkflow.tell()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/fork` → `SessionWorkflow.fork()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/resume` → `SessionWorkflow.resume()` handler to `_EXTENSION_OPERATIONS` and handler map - [ ] Add `session/show` (or `_cleveragents/session/show`) extension method handler - [ ] Add `session/delete` (or `_cleveragents/session/delete`) extension method handler - [ ] Add `session/export` (or `_cleveragents/session/export`) extension method handler - [ ] Add `session/import` (or `_cleveragents/session/import`) extension method handler - [ ] Add `session/tell` / `message/send` handler routing to `SessionWorkflow.tell()` - [ ] Verify all new handlers are reachable via `A2aLocalFacade.dispatch()` - [ ] Tests (Behave): Add scenarios for each new session operation dispatching correctly - [ ] Tests (Behave): Add scenario verifying `A2aOperationNotFoundError` is NOT raised for any spec-defined session operation - [ ] Tests (Robot): Add integration tests for session list, show, delete, export, import, and tell via A2A facade - [ ] Verify coverage >=97% via `nox -s coverage_report` - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - All spec-defined session A2A operations (`session/new`, `session/load`, `session/list`, `session/prompt`, `session/fork`, `session/resume`) are registered in `_EXTENSION_OPERATIONS` and dispatch without `A2aOperationNotFoundError`. - All CLI-required session operations (`session/list`, `session/show`, `session/delete`, `session/export`, `session/import`, `session/tell`) are routed through the A2A facade as the spec requires. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - 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. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.4.0 milestone 2026-04-03 17:31:46 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — Six A2A session management operations are missing from the facade. This is a significant feature gap in the A2A protocol implementation.
  • Milestone: v3.4.0 (as specified in issue metadata)
  • MoSCoW: Must Have — Session management is a core A2A protocol requirement. Without list/show/delete/export/import/tell, the session lifecycle is incomplete and the A2A facade cannot support multi-session workflows.
  • Parent Epic: #933 (A2A Protocol Compliance) — this is the most appropriate Epic for missing A2A operations.

Well-described with clear spec references. Valid and actionable.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — Six A2A session management operations are missing from the facade. This is a significant feature gap in the A2A protocol implementation. - **Milestone**: v3.4.0 (as specified in issue metadata) - **MoSCoW**: Must Have — Session management is a core A2A protocol requirement. Without list/show/delete/export/import/tell, the session lifecycle is incomplete and the A2A facade cannot support multi-session workflows. - **Parent Epic**: #933 (A2A Protocol Compliance) — this is the most appropriate Epic for missing A2A operations. Well-described with clear spec references. Valid and actionable. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

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