a2aproject / a2aproject/a2a-rs

a2acli: Tier 2 conformance with the a2a-cli specification

Aperta
#181 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
75
Fork
19
Merge medio
11h 27m
PR unite (30g)
21

Descrizione

## Summary

Follow-on to #164. With the Tier 1 work merged (#171, #172, #173, #174, #176, #177) plus the three residuals tracked in #178, #179 and #180, `a2acli` reaches Tier 1 ("Core"). This issue tracks **Tier 2 ("Standard")** — the 15 requirements in [`COMPLIANCE.md` §5](https://github.com/a2aproject/a2a-cli/blob/main/specification/COMPLIANCE.md).

Tiers are cumulative, so Tier 2 is only satisfied once Tier 1 is, including #178–#180.

## Current status against the 15 Tier 2 requirements

**Already satisfied by the Tier 1 work (5)** — in scope for Tier 2, but they fell out of the Tier 1 command-surface and transport work:

| ID | Requirement | Landed in |
| --- | --- | --- |
| `A2ACLI_TASK_LIST_001` | `task list` — cursor-paginated, filterable by status and context | #171 |
| `A2ACLI_TASK_SUBSCRIBE_001` | `task subscribe` — (re)subscribe to a task's event stream | #171 |
| `A2ACLI_TX_004` | At least two transports supported and selectable | #176 |
| `A2ACLI_CONFIG_002` | Configuration precedence, scopeable by agent-card reference via `--config`; `config show` reports each value's source | #177 |
| `A2ACLI_PUSH_001` | `task push-config` create / get / list / delete | #171 |

**Partial (2)**

| ID | Requirement | What is missing | Issue |
| --- | --- | --- | --- |
| `A2ACLI_OUT_007` | `--debug` including the raw protocol messages on the wire | `--debug` installs a tracing subscriber and `LoggingInterceptor`, but that interceptor logs only the method name — no wire bodies | #183 |
| `A2ACLI_TASK_SUBSCRIBE_002` | Stream resumption after disconnect | `task subscribe` consumes a stream to its end; a dropped connection ends the command with exit 0 | #186 |

**Not started (8)**

| ID | Requirement | Issue |
| --- | --- | --- |
| `A2ACLI_CLI_002` | `completion ` | #182 |
| `A2ACLI_VER_003` | Verify a capability on the Agent Card before invoking a capability-gated operation | #184 |
| `A2ACLI_CARD_GET_002` | `card get --validate` against the A2A schema | #185 |
| `A2ACLI_DOWNLOAD_001` | `task download` — save task artifacts to disk | #187 |
| `A2ACLI_AUTH_005` | `auth login` — OAuth 2.1 device-code flow | #188 |
| `A2ACLI_AUTH_006` | `auth login` — OAuth 2.1 client-credentials flow | #188 |
| `A2ACLI_AUTH_007` | Secure token storage with automatic attachment on later calls | #188 |
| `A2ACLI_CONFORM_001` | `conformance` — smoke-check a live agent against the A2A TCK | #189 |

## A note on conforming to the canonical implementation

#164 set the rule that `a2acli` conforms to [`a2a-cli`](https://github.com/a2aproject/a2a-cli) (Go). For much of Tier 2 **there is currently nothing to conform to**: `internal/cli/` in that repo has no `auth`, no `task download` and no `conformance` command, and it validates the Agent Card unconditionally rather than behind `--validate`. `completion` it gets for free from cobra.

So the sub-issues split into two groups, and the ordering follows that split:

- **Phase 1 (#182–#186)** — the surface is either settled by the specification alone or self-evident (a shell-completion script, a capability check, a schema-validation flag, reconnect-on-disconnect). Safe to build now.
- **Phase 2 (#187–#189)** — `task download`, `auth login` and `conformance` would be **defining** the surface rather than conforming to one. Each should have its flags and output shape agreed in `a2a-cli` (spec text or an issue there) before implementation here, or we accept re-work when the Go CLI lands its own version. Each issue lists its open questions.

Where we do define something first, the design notes belong upstream in `a2a-cli` so the next implementation has something normative to follow.

## Scope

Phase 1 — surface settled:

- [ ] #182 — `completion `
- [ ] #183 — `--debug` raw wire logging, with unconditional credential redaction
- [ ] #184 — verify Agent Card capabilities before capability-gated operations
- [ ] #185 — `card get --validate` against the A2A JSON schema
- [ ] #186 — `task subscribe` resumption after disconnect

Phase 2 — needs surface agreement upstream first:

- [ ] #187 — `task download`
- [ ] #188 — `auth login`: OAuth 2.1 device-code, client-credentials, token storage
- [ ] #189 — `conformance`: TCK smoke check

## Two requirements worth flagging across the tier

- **#183 makes `A2ACLI_AUTH_004` load-bearing.** That Tier 1 row requires credential redaction *"including `--debug` raw-wire logging"*. It is satisfied today only because nothing is logged; wire logging is exactly what it was written for, so redaction ships with it or not at all.
- **#184 and #186 both interact with #173's streaming fallback.** `send --stream` already falls back to polling on `UNSUPPORTED_OPERATION`; the capability pre-check and the reconnect logic have to preserve that rather than introduce a second, divergent path.

## Blocked on

- #177 (last Tier 1 PR — open, approved, all checks green)
- #178, #179, #180 (Tier 1 residuals) — Tier 2 cannot be claimed while these are open

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.