Skip to content

feat: v1.0 data model — add missing proto fields#14

Open
zeroasterisk wants to merge 3 commits intoactioncard:mainfrom
zeroasterisk:feat/v1-data-model
Open

feat: v1.0 data model — add missing proto fields#14
zeroasterisk wants to merge 3 commits intoactioncard:mainfrom
zeroasterisk:feat/v1-data-model

Conversation

@zeroasterisk
Copy link
Copy Markdown

Part of #13 (A2A v1.0 Protocol Support)

Adds v1.0 fields to existing structs while maintaining full v0.3 backward compatibility. All changes verified against a2a.proto HEAD.

New Structs

  • A2A.AuthenticationInfo — HTTP auth scheme + credentials for push notifications
  • A2A.AgentExtension — protocol extension declaration (uri, description, required, params)
  • A2A.AgentCardSignature — JWS signature (RFC 7515) for agent cards
  • A2A.TaskPushNotificationConfig — push notification configuration per task
  • A2A.SendMessageConfiguration — send request config (accepted_output_modes, history_length, return_immediately)

Updated Structs (additive only, no breaking changes)

  • AgentCard: +signatures, +security_requirements
  • AgentCard skill type: +examples, +input_modes, +output_modes, +security_requirements
  • AgentCard capabilities: +extensions (repeated AgentExtension)
  • AgentCard supported_interface: +tenant
  • Message: extensions changed from map to list (per proto repeated string), +reference_task_ids
  • Artifact: +extensions (repeated string)
  • Part.Text/File/Data: +media_type, +filename

JSON Codec

  • Encode/decode all new fields
  • Support v1.0 flat Part format (raw/url without file wrapper) in decoding
  • Full encode/decode for all new structs
  • Skill encode/decode includes examples, inputModes, outputModes, securityRequirements

Tests

  • 38 new tests covering all new structs and fields
  • Round-trip encode/decode for all new types
  • v1.0 flat Part format + v0.3 backward compatibility
  • All 425 tests pass (387 existing + 38 new)

No breaking changes — new fields have sensible defaults.

Fixes part of #13

@maxekman
Copy link
Copy Markdown
Contributor

I’ll take a look at the CI issue, it’s my issue to fix it seems like.

@maxekman
Copy link
Copy Markdown
Contributor

@zeroasterisk I fixed the CI issues, tested on #12. Feel free to rebase and we can check it out here too.

Zaf Agent and others added 3 commits March 30, 2026 11:06
New structs:
- A2A.AuthenticationInfo (scheme, credentials)
- A2A.AgentExtension (uri, description, required, params)
- A2A.AgentCardSignature (protected, signature, header)
- A2A.TaskPushNotificationConfig (tenant, id, task_id, url, token, authentication)
- A2A.SendMessageConfiguration (accepted_output_modes, task_push_notification_config,
  history_length, return_immediately)

Updated structs (additive only):
- AgentCard: +signatures, +security_requirements
- AgentCard skill type: +examples, +input_modes, +output_modes, +security_requirements
- AgentCard capabilities: +extensions (repeated AgentExtension)
- AgentCard supported_interface: +tenant
- Message: extensions changed from map to list (per proto repeated string),
  +reference_task_ids
- Artifact: +extensions (repeated string)
- Part.Text/File/Data: +media_type, +filename

JSON codec updates:
- Encode/decode all new fields
- Support v1.0 flat Part format (raw/url without file wrapper) in decoding
- Encode/decode new structs (AuthenticationInfo, TaskPushNotificationConfig,
  SendMessageConfiguration, AgentExtension, AgentCardSignature)
- Skill encode/decode includes examples, inputModes, outputModes, securityRequirements

All changes verified against a2a.proto HEAD. No breaking changes.

Part of actioncard#13
38 new tests covering:
- AuthenticationInfo encode/decode
- AgentExtension encode/decode
- AgentCardSignature encode/decode
- TaskPushNotificationConfig encode/decode
- SendMessageConfiguration encode/decode
- Message reference_task_ids and list extensions
- Artifact extensions
- Part media_type and filename on all part types
- v1.0 flat Part format (raw/url) decoding
- AgentCard signatures, security_requirements
- AgentCard skill v1.0 fields (examples, input/output modes)
- AgentCard capabilities extensions (AgentExtension)
- AgentCard interface tenant field
- TaskState enum round-trip for all 9 states
- Backward compatibility with v0.3 format
- Add to_map/1 for JSON-friendly map conversion (needed by signing module)
- Fix signing_test to use %AgentCard{} struct directly instead of missing new/1
- Fix Skill reference: use plain map instead of non-existent AgentCard.Skill struct
@zeroasterisk
Copy link
Copy Markdown
Author

Rebased onto latest main and pushed. Fixed a couple of issues that surfaced after rebase:

  • Added AgentCard.to_map/1 — the signing module was calling it but it didn't exist
  • Fixed signing test to use %AgentCard{} struct directly (no new/1 constructor) and plain maps for skills instead of non-existent AgentCard.Skill struct

Tests: 431 pass, 6 failures — all 6 are pre-existing on main (3 signing tests need optional :jose dep, 3 client interceptor tests fail on main too).

@github-actions
Copy link
Copy Markdown

TCK Compliance Results

📊 COMPREHENSIVE TEST RESULTS SUMMARY
================================================================================

🔴 Mandatory Tests:           ✅ PASSED (p:83/f:0/x:0/e:0/s:32)
🔄 Capability Tests:          ✅ PASSED (p:20/f:0/x:1/e:0/s:54)
🚀 Transport Equivalence:     ✅ PASSED (p:0/f:0/x:0/e:0/s:16)
🛡️  Quality Tests:             ✅ PASSED (p:14/f:0/x:0/e:0/s:0)
🎨 Feature Tests:             ✅ PASSED (p:14/f:0/x:1/e:0/s:1)

🎉 A2A COMPLIANCE: ✅ PASSED
Your implementation meets A2A specification requirements!
🔄 CAPABILITY HONESTY: ✅ EXCELLENT
All declared capabilities work correctly!
🛡️  PRODUCTION QUALITY: ✅ HIGH
Implementation is robust and production-ready!
🎨 FEATURE COMPLETENESS: ✅ COMPREHENSIVE
Implementation includes valuable optional features!

🏆 OUTSTANDING A2A IMPLEMENTATION!

================================================================================

========================================
TCK run complete.
Stopping server (PID 2676)...

11:21:37.639 [notice] SIGTERM received - shutting down

@maxekman
Copy link
Copy Markdown
Contributor

Nice fixing! After this first PR of yours gets merged @zeroasterisk you will be an approved author and the other PR workflows will run directly. A bit inconvenient this first time, but I'll pay extra attention to the notifications so we can get this merged.

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.

2 participants