Skip to content

Harden A2A/ACP agent definition validation#1

Open
IvGolovach wants to merge 1 commit into
Mesh-LLM:mainfrom
IvGolovach:codex/a2a-acp-agent-substrate
Open

Harden A2A/ACP agent definition validation#1
IvGolovach wants to merge 1 commit into
Mesh-LLM:mainfrom
IvGolovach:codex/a2a-acp-agent-substrate

Conversation

@IvGolovach
Copy link
Copy Markdown

Summary

This lands the A2A/ACP agent-definition work in Mesh-LLM/agents, where the mesh-native agent control plane now lives.

Users get stricter local validation for agent directories and clearer CLI diagnostics before an agent definition is accepted. The PR keeps A2A/ACP-specific ownership in the agents repo and avoids adding parallel agent crates or protocol surface to mesh-llm core.

Why

This supersedes Mesh-LLM/mesh-llm#765. That PR proved the initial direction, but review correctly pointed out that the implementation belongs in Mesh-LLM/agents.

The stale design issue Mesh-LLM/mesh-llm#692 should also be moved, updated, or closed after this agents-side PR is created so future A2A/ACP work is routed to the repo that owns it.

Diff Scope

  • Harden agent directory loading and validation in mesh-agents-a2a.
  • Reject malformed or incomplete public Agent Cards, missing instruction files, invalid runtime/workspace combinations, empty tool/env fields, and empty supported-interface declarations.
  • Improve agents validate --json reporting for runtime/policy counts and local diagnostics.
  • Keep ACP runtime defaults and mesh CLI output aligned with the stricter validation model.
  • Refresh the authoring skill and README guidance around the agents repo ownership boundary.

Non-Goals

  • No mesh-llm core runtime change.
  • No mesh gossip, protobuf, QUIC ALPN, Skippy ABI, or host-runtime protocol change.
  • No agent execution-path expansion beyond validation and CLI diagnostics.
  • No cross-node mesh discovery or remote invocation behavior change.

Branch Integrity

  • Base repository: Mesh-LLM/agents
  • Base branch: main
  • Validated base: 0e2171b26f18dfe6bd4faa390e7c9badcd28e734
  • Head repository: IvGolovach/agents
  • Head branch: codex/a2a-acp-agent-substrate
  • Head commit: 9062ac74f922a445b7bfad03d12a71fa89c118c3
  • Ahead/behind: 0 behind / 1 ahead

Diff Hygiene

Changed files:

  • README.md
  • crates/mesh-agents-a2a/src/registry.rs
  • crates/mesh-agents-acp-bridge/src/lib.rs
  • crates/mesh-agents-cli/src/agents.rs
  • crates/mesh-agents-cli/src/main.rs
  • crates/mesh-agents-cli/src/mesh.rs
  • skills/mesh-agent-authoring/SKILL.md

Proof:

  • git diff --check origin/main...HEAD: PASS, no output.
  • git diff --check: PASS, no output.
  • git diff --cached --check: PASS, no output.

Validation

Validation tier: Tier 2 - narrow Mesh Agents validation and CLI diagnostics refresh for superseding Mesh-LLM/mesh-llm#765 in the agents repo; no mesh-llm core protocol, gossip, runtime route, or release metadata change.

  • git fetch --no-tags origin main:refs/remotes/origin/main: PASS, origin/main at 0e2171b.
  • git diff --check origin/main...HEAD: PASS, no output.
  • git diff --check: PASS, no output.
  • git diff --cached --check: PASS, no output.
  • cargo fmt --all -- --check: PASS.
  • cargo test -p mesh-agents-a2a --lib: PASS, 11 passed.
  • cargo test -p mesh-agents-acp-bridge --lib: PASS, 12 passed, 2 ignored live ACP smokes.
  • cargo test -p mesh-agents --bins: PASS, 12 passed.
  • cargo check -p mesh-agents: PASS.
  • rustup run stable cargo clippy -p mesh-agents-a2a -p mesh-agents-acp-bridge -p mesh-agents --all-targets -- -D warnings: PASS.
  • cargo run -p mesh-agents --bin agents -- agents validate pr-review --dir examples --json: PASS, status ok with 1 enabled ACP agent.

Ledger: not applicable - not required for selected validation tier/change family.

Version: not applicable - no release/version sync required for this non-release validation/CLI change.

Not Run

  • Live OpenCode/Goose/Pi ACP harness smoke: not required for selected validation tier; live ACP tests remain ignored unless a configured harness/provider is available.
  • Two-node mesh discovery smoke: not required for selected validation tier; this PR only hardens local agent definition validation and CLI reporting.

Follow-Up After This PR Opens

Rollback Plan

Rollback: revert this PR.

DB downgrade: not applicable.
Data repair: not applicable.
Operational caveats: none known.

Validation
* Validation tier: Tier 2 - narrow Mesh Agents validation and CLI diagnostics refresh for superseding Mesh-LLM/mesh-llm#765 in the agents repo; no mesh-llm core protocol, gossip, or runtime route change.
* git fetch --no-tags origin main:refs/remotes/origin/main: PASS, origin/main at 0e2171b.
* git diff --check: PASS, no output.
* git diff --cached --check: PASS, no output.
* cargo fmt --all -- --check: PASS.
* cargo test -p mesh-agents-a2a --lib: PASS, 11 passed.
* cargo test -p mesh-agents-acp-bridge --lib: PASS, 12 passed, 2 ignored live ACP smokes.
* cargo test -p mesh-agents --bins: PASS, 12 passed.
* cargo check -p mesh-agents: PASS.
* rustup run stable cargo clippy -p mesh-agents-a2a -p mesh-agents-acp-bridge -p mesh-agents --all-targets -- -D warnings: PASS.
* cargo run -p mesh-agents --bin agents -- agents validate pr-review --dir examples --json: PASS, status ok with 1 enabled ACP agent.
* Ledger: not applicable - not required for selected validation tier/change family.
* Version: not applicable - no release/version sync required for this non-release validation/CLI change.
* Not run: live OpenCode/Goose/Pi ACP harness smoke - not required for selected validation tier; live ACP tests remain ignored unless a configured harness/provider is available.
* Not run: two-node mesh discovery smoke - not required for selected validation tier; this PR only hardens local agent definition validation and CLI reporting.

Rollback
* git revert HEAD
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.

Design: A2A agents over mesh

1 participant