a2acalling 0.6.73 → 0.6.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/.a2a-manifest.json +2 -2
  2. package/.c8rc.json +16 -0
  3. package/.node-version +1 -0
  4. package/.serena/project.yml +126 -0
  5. package/ARCHITECTURE.md +40 -16
  6. package/CONVENTIONS.md +39 -6
  7. package/biome.json +27 -0
  8. package/coverage/base.css +224 -0
  9. package/coverage/block-navigation.js +87 -0
  10. package/coverage/favicon.png +0 -0
  11. package/coverage/index.html +146 -0
  12. package/coverage/prettify.css +1 -0
  13. package/coverage/prettify.js +2 -0
  14. package/coverage/sort-arrow-sprite.png +0 -0
  15. package/coverage/sorter.js +210 -0
  16. package/coverage/src/index.html +131 -0
  17. package/coverage/src/index.js.html +313 -0
  18. package/coverage/src/lib/agent-card.js.html +418 -0
  19. package/coverage/src/lib/call-monitor.js.html +700 -0
  20. package/coverage/src/lib/callbook.js.html +1183 -0
  21. package/coverage/src/lib/claude-subagent.js.html +2173 -0
  22. package/coverage/src/lib/client.js.html +2134 -0
  23. package/coverage/src/lib/config.js.html +1525 -0
  24. package/coverage/src/lib/conversation-driver.js.html +1909 -0
  25. package/coverage/src/lib/conversations.js.html +2575 -0
  26. package/coverage/src/lib/crypto.js.html +424 -0
  27. package/coverage/src/lib/dashboard-events.js.html +724 -0
  28. package/coverage/src/lib/disclosure.js.html +2461 -0
  29. package/coverage/src/lib/external-ip.js.html +718 -0
  30. package/coverage/src/lib/index.html +506 -0
  31. package/coverage/src/lib/invite-host.js.html +754 -0
  32. package/coverage/src/lib/local-request.js.html +292 -0
  33. package/coverage/src/lib/logger.js.html +2116 -0
  34. package/coverage/src/lib/openclaw-integration.js.html +1102 -0
  35. package/coverage/src/lib/pid-file.js.html +394 -0
  36. package/coverage/src/lib/port-scanner.js.html +334 -0
  37. package/coverage/src/lib/prompt-template.js.html +1150 -0
  38. package/coverage/src/lib/runtime-adapter.js.html +2188 -0
  39. package/coverage/src/lib/summarizer.js.html +553 -0
  40. package/coverage/src/lib/summary-formatter.js.html +589 -0
  41. package/coverage/src/lib/summary-prompt.js.html +694 -0
  42. package/coverage/src/lib/tokens.js.html +2689 -0
  43. package/coverage/src/lib/turn-timeout.js.html +241 -0
  44. package/coverage/src/lib/update-checker.js.html +364 -0
  45. package/coverage/src/lib/update-manager.js.html +1024 -0
  46. package/coverage/src/routes/a2a.js.html +3724 -0
  47. package/coverage/src/routes/callbook.js.html +511 -0
  48. package/coverage/src/routes/dashboard.js.html +4819 -0
  49. package/coverage/src/routes/index.html +146 -0
  50. package/coverage/src/server.js.html +3622 -0
  51. package/coverage/tmp/coverage-1605378-1772576706365-0.json +1 -0
  52. package/coverage/tmp/coverage-1605384-1772576607459-0.json +1 -0
  53. package/coverage/tmp/coverage-1605410-1772576631155-0.json +1 -0
  54. package/coverage/tmp/coverage-1606942-1772576636869-0.json +1 -0
  55. package/coverage/tmp/coverage-1607004-1772576637454-0.json +1 -0
  56. package/coverage/tmp/coverage-1607044-1772576637876-0.json +1 -0
  57. package/coverage/tmp/coverage-1607096-1772576638356-0.json +1 -0
  58. package/coverage/tmp/coverage-1607145-1772576638777-0.json +1 -0
  59. package/coverage/tmp/coverage-1607201-1772576639277-0.json +1 -0
  60. package/coverage/tmp/coverage-1607247-1772576639755-0.json +1 -0
  61. package/coverage/tmp/coverage-1607317-1772576640083-0.json +1 -0
  62. package/coverage/tmp/coverage-1607381-1772576640465-0.json +1 -0
  63. package/coverage/tmp/coverage-1607446-1772576640868-0.json +1 -0
  64. package/coverage/tmp/coverage-1607501-1772576641662-0.json +1 -0
  65. package/coverage/tmp/coverage-1607534-1772576641565-0.json +1 -0
  66. package/coverage/tmp/coverage-1607627-1772576641871-0.json +1 -0
  67. package/coverage/tmp/coverage-1607665-1772576642172-0.json +1 -0
  68. package/coverage/tmp/coverage-1607714-1772576642577-0.json +1 -0
  69. package/coverage/tmp/coverage-1607788-1772576643466-0.json +1 -0
  70. package/coverage/tmp/coverage-1607924-1772576644678-0.json +1 -0
  71. package/coverage/tmp/coverage-1607978-1772576645154-0.json +1 -0
  72. package/coverage/tmp/coverage-1608035-1772576645564-0.json +1 -0
  73. package/coverage/tmp/coverage-1608106-1772576645967-0.json +1 -0
  74. package/coverage/tmp/coverage-1608179-1772576648656-0.json +1 -0
  75. package/coverage/tmp/coverage-1608196-1772576647367-0.json +1 -0
  76. package/coverage/tmp/coverage-1608217-1772576648557-0.json +1 -0
  77. package/coverage/tmp/coverage-1608256-1772576651378-0.json +1 -0
  78. package/coverage/tmp/coverage-1608265-1772576650058-0.json +1 -0
  79. package/coverage/tmp/coverage-1608289-1772576651358-0.json +1 -0
  80. package/coverage/tmp/coverage-1608591-1772576660465-0.json +1 -0
  81. package/coverage/tmp/coverage-1608648-1772576659272-0.json +1 -0
  82. package/coverage/tmp/coverage-1608665-1772576660374-0.json +1 -0
  83. package/coverage/tmp/coverage-1608677-1772576661268-0.json +1 -0
  84. package/coverage/tmp/coverage-1608684-1772576663968-0.json +1 -0
  85. package/coverage/tmp/coverage-1608692-1772576662575-0.json +1 -0
  86. package/coverage/tmp/coverage-1608701-1772576663873-0.json +1 -0
  87. package/coverage/tmp/coverage-1608718-1772576666674-0.json +1 -0
  88. package/coverage/tmp/coverage-1608725-1772576665463-0.json +1 -0
  89. package/coverage/tmp/coverage-1608738-1772576666577-0.json +1 -0
  90. package/coverage/tmp/coverage-1608753-1772576669664-0.json +1 -0
  91. package/coverage/tmp/coverage-1608763-1772576668275-0.json +1 -0
  92. package/coverage/tmp/coverage-1608771-1772576669563-0.json +1 -0
  93. package/coverage/tmp/coverage-1608828-1772576676574-0.json +1 -0
  94. package/coverage/tmp/coverage-1609244-1772576675272-0.json +1 -0
  95. package/coverage/tmp/coverage-1609342-1772576676478-0.json +1 -0
  96. package/coverage/tmp/coverage-1609450-1772576686954-0.json +1 -0
  97. package/coverage/tmp/coverage-1609841-1772576685466-0.json +1 -0
  98. package/coverage/tmp/coverage-1609925-1772576686855-0.json +1 -0
  99. package/coverage/tmp/coverage-1610399-1772576692469-0.json +1 -0
  100. package/coverage/tmp/coverage-1611283-1772576703062-0.json +1 -0
  101. package/coverage/tmp/coverage-1611294-1772576703755-0.json +1 -0
  102. package/docs/assessments/2026-02-27-google-a2a-protocol-assessment.md +292 -0
  103. package/docs/plans/2026-03-01-a2a-68-openclaw-integration-tests.md +676 -0
  104. package/docs/plans/2026-03-01-a2a-77-invoke-security-tests.md +661 -0
  105. package/docs/plans/2026-03-03-a2a-91-macos-packaging-plan.md +144 -0
  106. package/docs/signing-setup.md +49 -0
  107. package/eslint.config.js +16 -0
  108. package/knip.json +17 -0
  109. package/native/macos/certs/appldevcert.cer +0 -0
  110. package/native/macos/src-tauri/binaries/.gitkeep +0 -0
  111. package/native/macos/src-tauri/capabilities/default.json +11 -1
  112. package/native/macos/src-tauri/entitlements.plist +14 -0
  113. package/native/macos/src-tauri/src/discovery.rs +14 -3
  114. package/native/macos/src-tauri/src/health.rs +4 -0
  115. package/native/macos/src-tauri/src/lib.rs +52 -11
  116. package/native/macos/src-tauri/src/server.rs +262 -26
  117. package/native/macos/src-tauri/tauri.conf.json +13 -4
  118. package/package.json +16 -2
  119. package/pkg.config.json +14 -0
  120. package/scripts/build-standalone.sh +106 -0
  121. package/scripts/install-openclaw.js +3 -5
  122. package/scripts/smoke-test-standalone.sh +101 -0
  123. package/scripts/sync-version.sh +28 -0
  124. package/scripts/verify-app-bundle.sh +34 -0
  125. package/src/lib/agent-card.js +111 -0
  126. package/src/lib/client.js +290 -49
  127. package/src/lib/conversations.js +2 -0
  128. package/src/lib/local-request.js +69 -0
  129. package/src/lib/logger.js +2 -0
  130. package/src/lib/runtime-adapter.js +41 -1
  131. package/src/routes/a2a.js +393 -66
  132. package/src/routes/dashboard.js +1 -27
  133. package/src/server.js +19 -0
  134. package/.maestro/inbox/release-workflow-spam.md +0 -25
@@ -0,0 +1,292 @@
1
+ # Google A2A Protocol — Adoption & Adaptation Assessment
2
+
3
+ **Ticket:** A2A-75
4
+ **Date:** 2026-02-27
5
+ **Status:** Assessment Complete
6
+
7
+ ---
8
+
9
+ ## 1. Executive Summary
10
+
11
+ The Google A2A Protocol (a2a-protocol.org) is an open standard for agent-to-agent communication built on JSON-RPC 2.0 with HTTP, gRPC, and SSE bindings. It shares significant conceptual overlap with our A2A Calling protocol — both solve the same fundamental problem of enabling opaque agents to communicate. However, the two protocols diverge substantially in philosophy: Google's spec is enterprise-grade infrastructure (task-oriented, schema-heavy, multi-transport), while ours is relationship-oriented (token-scoped, disclosure-aware, conversation-first).
12
+
13
+ **Recommendation:** Adopt Google A2A as the wire protocol and discovery layer while preserving our permission tiers, disclosure levels, conversation model, and "first meeting" workflow as an extension layer on top. This gives us interoperability with the emerging ecosystem without losing the social trust features that define our product.
14
+
15
+ ---
16
+
17
+ ## 2. Protocol Comparison
18
+
19
+ ### 2.1 Core Concepts Mapping
20
+
21
+ | Our Concept | Google A2A Equivalent | Gap Analysis |
22
+ |---|---|---|
23
+ | Token (`fed_xxx`) | SecurityScheme (apiKey / OAuth2 / bearer) | Google is more flexible — supports OAuth2 flows. Our tokens are simpler (bearer only) but richer (tier, disclosure, topics, max_calls). |
24
+ | `POST /invoke` | `a2a.SendMessage` | Direct mapping. Google returns Task or Message; we return response text + `can_continue`. |
25
+ | `conversation_id` | `contextId` | Same concept — group related interactions. Google also has `taskId` for individual work units within a context. |
26
+ | Multi-turn conversation | `input-required` task state | Google models this as task state machine; we model it as conversation continuation with `can_continue`. |
27
+ | `POST /end` | Task reaches terminal state (`completed`/`canceled`) | Google has richer terminal states (failed, rejected, canceled). We have `concluded`/`timeout`. |
28
+ | Permission tiers (public/friends/family) | Agent Card `skills` + OAuth scopes | **No equivalent.** Google has no concept of relationship-based capability gating. This is our key differentiator. |
29
+ | Disclosure levels (public/minimal/none) | **No equivalent** | Google assumes agents share freely. No information-sharing policy model. |
30
+ | `GET /status` | `GET /.well-known/a2a-agent-card` | Google's Agent Card is far richer — declares skills, auth requirements, capabilities, provider info. Our `/status` is minimal. |
31
+ | Token `allowed_topics` | AgentSkill `inputSchema` | Loose mapping. Google uses JSON Schema for skill inputs; we use topic strings. |
32
+ | Owner notifications | Push Notifications (webhooks) | Google's push notifications are for task updates to the *caller*, not owner awareness. Our notifications inform the *agent owner* about incoming calls. |
33
+ | Ed25519 signatures | AgentCardSignature + TLS mutual auth | Google supports card signing. We have per-message Ed25519 signing. |
34
+ | Rate limits (per-token) | API Management layer | Google delegates to infrastructure; we enforce per-token in-app. |
35
+ | Caller context (`caller.name`, `caller.instance`) | Message `role` + metadata | Google messages don't carry caller identity — that's at the transport layer. |
36
+
37
+ ### 2.2 What Google A2A Has That We Don't
38
+
39
+ 1. **Agent Card / Discovery** — `/.well-known/a2a-agent-card` for automated agent discovery. Declares skills, capabilities, auth requirements. We have nothing comparable.
40
+ 2. **Task State Machine** — Seven states (`working`, `completed`, `failed`, `canceled`, `rejected`, `input-required`, `auth-required`) vs. our two (`active`, `concluded`/`timeout`).
41
+ 3. **Artifacts** — Structured output objects with MIME types, separate from conversational messages. We only have text responses.
42
+ 4. **Streaming** — SSE-based streaming for real-time task updates. We're request/response only.
43
+ 5. **gRPC Binding** — For high-performance inter-service communication.
44
+ 6. **Extension System** — Versioned, URI-identified extensions for capability expansion.
45
+ 7. **OpenTelemetry** — W3C Trace Context propagation for distributed tracing.
46
+
47
+ ### 2.3 What We Have That Google A2A Doesn't
48
+
49
+ 1. **Permission Tiers** — public/friends/family capability gating based on relationship trust level. This is our core value proposition.
50
+ 2. **Disclosure Levels** — public/minimal/none information-sharing policy. Controls *how much* the agent reveals, not just *what* it can do.
51
+ 3. **Owner Notifications** — Real-time alerts to the human owner when their agent is called. Google has no concept of human-in-the-loop awareness.
52
+ 4. **"First Meeting" Workflow** — Our conversation model is designed for agents meeting for the first time — exploratory, collaborative, with progressive trust building. Google's model is transactional.
53
+ 5. **Topic/Goal Scoping** — Per-token `allowed_topics` and `allowed_goals` constrain what a caller can discuss. Google has skill-level access but no per-session topic constraints.
54
+ 6. **Token Economics** — `max_calls`, `calls_made`, expiration, revocation — rate-limited trust delegation. Google delegates this to infrastructure.
55
+ 7. **Conversation Driver** — Multi-turn orchestration with min/max turns, idle timeout, auto-conclusion, and summary generation. Google leaves conversation management to the implementation.
56
+ 8. **Contact Book** — Persistent directory of known agents with metadata, linked tokens, and ping status.
57
+
58
+ ---
59
+
60
+ ## 3. Adoption Strategy
61
+
62
+ ### 3.1 Approach: "Google Wire, OpenClaw Soul"
63
+
64
+ Adopt the Google A2A wire protocol (JSON-RPC 2.0, Agent Card, Task model) as the transport layer while preserving our permission, disclosure, and conversation semantics as an extension layer.
65
+
66
+ ```
67
+ ┌─────────────────────────────────────────────────┐
68
+ │ OpenClaw Extension Layer │
69
+ │ ├─ Permission tiers (public/friends/family) │
70
+ │ ├─ Disclosure levels (public/minimal/none) │
71
+ │ ├─ Owner notifications │
72
+ │ ├─ Token economics (max_calls, expiry) │
73
+ │ ├─ "First meeting" conversation driver │
74
+ │ └─ Contact book + trust history │
75
+ ├─────────────────────────────────────────────────┤
76
+ │ Google A2A Protocol (Wire Format) │
77
+ │ ├─ Agent Card (/.well-known/a2a-agent-card) │
78
+ │ ├─ JSON-RPC 2.0 (a2a.SendMessage, etc.) │
79
+ │ ├─ Task state machine │
80
+ │ ├─ Artifacts + Parts │
81
+ │ └─ Streaming (SSE) │
82
+ ├─────────────────────────────────────────────────┤
83
+ │ Transport (HTTPS + optional gRPC) │
84
+ └─────────────────────────────────────────────────┘
85
+ ```
86
+
87
+ ### 3.2 Phase Plan
88
+
89
+ #### Phase 1: Agent Card (Discovery Layer)
90
+
91
+ Serve a Google A2A-compatible Agent Card at `/.well-known/a2a-agent-card`. This is the lowest-cost, highest-value adoption step — it makes our agents discoverable by any A2A-compatible system.
92
+
93
+ **Agent Card contents:**
94
+ - `name`, `description`, `provider` — from `a2a-config.json`
95
+ - `skills` — derived from our disclosure manifest topics
96
+ - `securitySchemes` — declare bearer token auth (our existing `fed_xxx` tokens)
97
+ - `capabilities` — `streaming: false`, `pushNotifications: false` initially
98
+ - `extensions` — declare our custom extension for permission tiers and disclosure
99
+
100
+ **OpenClaw Extension in Agent Card:**
101
+ ```json
102
+ {
103
+ "extensions": [
104
+ {
105
+ "uri": "https://openclaw.dev/a2a/extensions/trust-tiers",
106
+ "version": "1.0.0",
107
+ "required": false,
108
+ "data": {
109
+ "tiers": ["public", "friends", "family"],
110
+ "disclosure_levels": ["public", "minimal", "none"],
111
+ "owner_notifications": true,
112
+ "contact_book": true
113
+ }
114
+ }
115
+ ]
116
+ }
117
+ ```
118
+
119
+ #### Phase 2: Dual-Protocol Inbound
120
+
121
+ Accept both our current `POST /api/a2a/invoke` format AND the Google A2A `a2a.SendMessage` JSON-RPC format on a new `POST /api/a2a/rpc` endpoint.
122
+
123
+ **Mapping:**
124
+ - Google `a2a.SendMessage` → our `invoke` handler
125
+ - Google `contextId` → our `conversation_id`
126
+ - Google `input-required` → our `can_continue: true`
127
+ - Google `completed` → our conversation conclusion
128
+ - Message `parts[].text` → our `message` string
129
+ - Task `artifacts` → (new) structured response attachments
130
+
131
+ **Token auth unchanged:** Google callers still need a valid `fed_xxx` bearer token. The token's tier and disclosure settings apply regardless of wire format.
132
+
133
+ #### Phase 3: Dual-Protocol Outbound
134
+
135
+ Update `A2AClient` to detect whether a remote agent serves a Google A2A Agent Card. If so, use `a2a.SendMessage` JSON-RPC format; otherwise, fall back to our current `POST /invoke`.
136
+
137
+ **Detection:**
138
+ 1. `GET /.well-known/a2a-agent-card` — if 200 with valid card, use Google format
139
+ 2. `GET /api/a2a/status` — if 200 with `"a2a": true`, use our format
140
+ 3. Fall back to our format as default
141
+
142
+ #### Phase 4: Task State Machine
143
+
144
+ Adopt the Google task state machine internally, mapping to our conversation states:
145
+
146
+ | Google Task State | Our Current State | Migration |
147
+ |---|---|---|
148
+ | `working` | `active` | Direct mapping |
149
+ | `completed` | `concluded` | Direct mapping |
150
+ | `failed` | (new) | Add `failed` status to conversations |
151
+ | `canceled` | (new) | Add `canceled` status |
152
+ | `rejected` | (implicit — 403 response) | Formalize as conversation state |
153
+ | `input-required` | `active` + `can_continue: true` | Already modeled, just need state label |
154
+ | `auth-required` | (new) | Add for re-auth scenarios |
155
+
156
+ #### Phase 5: Streaming & Artifacts
157
+
158
+ Add SSE streaming support for long-running responses and artifact support for structured outputs. This is the most complex phase and can be deferred until there's ecosystem demand.
159
+
160
+ ---
161
+
162
+ ## 4. Preserving Our Differentiators
163
+
164
+ ### 4.1 Permission Tiers as Extension
165
+
166
+ Google A2A has no concept of relationship-based trust. Our tiers are modeled as an extension that enriches the standard auth flow:
167
+
168
+ 1. Standard Google A2A: client authenticates → agent processes request
169
+ 2. Our extension: client authenticates → **token tier determines capabilities** → **disclosure level constrains responses** → agent processes within scope
170
+
171
+ This is transparent to Google-only callers — they authenticate normally and get `public` tier behavior by default. Callers that understand our extension can negotiate higher trust levels.
172
+
173
+ ### 4.2 "First Meeting" Conversation Model
174
+
175
+ Google A2A's `a2a.SendMessage` is transactional — send a message, get a response. Our "first meeting" model is exploratory:
176
+
177
+ 1. Agents introduce themselves (caller context)
178
+ 2. Progressive topic exploration within allowed bounds
179
+ 3. Collaborative discovery of shared interests
180
+ 4. Trust building over multiple turns
181
+ 5. Summary generation at conclusion
182
+
183
+ This maps cleanly onto Google's `contextId` + `input-required` pattern. The conversation driver orchestrates the multi-turn flow while the wire format is standard A2A.
184
+
185
+ ### 4.3 Owner Awareness
186
+
187
+ Google A2A has push notifications for the *caller* to track task progress. We add owner notifications — the *callee's human* is informed about incoming calls. This is orthogonal to the protocol and requires no wire format changes. It remains a server-side feature.
188
+
189
+ ### 4.4 Contact Book & Trust History
190
+
191
+ The contact book (persistent directory of known agents) is a local-only feature with no wire format implications. We can enhance it with Agent Card data — when we discover a remote agent's card, we can auto-populate contact metadata.
192
+
193
+ ---
194
+
195
+ ## 5. Migration Risks
196
+
197
+ ### 5.1 Low Risk
198
+ - **Agent Card adoption** — additive, no breaking changes
199
+ - **Dual-protocol inbound** — new endpoint, existing endpoint unchanged
200
+ - **Contact book enrichment** — local-only enhancement
201
+
202
+ ### 5.2 Medium Risk
203
+ - **Outbound protocol detection** — need robust fallback when remote agents serve partial or malformed Agent Cards
204
+ - **Task state machine migration** — our conversation store schema needs new states; existing conversations need migration
205
+ - **Response format change** — moving from flat `{ response: "..." }` to `{ parts: [...], artifacts: [...] }` requires dashboard and CLI updates
206
+
207
+ ### 5.3 High Risk
208
+ - **Streaming** — fundamentally changes the response model from request/response to event stream. Requires significant changes to the conversation driver, dashboard, and CLI.
209
+ - **gRPC binding** — would add a substantial dependency. Recommend deferring unless ecosystem demand materializes.
210
+
211
+ ---
212
+
213
+ ## 6. Specification: OpenClaw Trust Tiers Extension
214
+
215
+ ### 6.1 Extension URI
216
+
217
+ `https://openclaw.dev/a2a/extensions/trust-tiers`
218
+
219
+ ### 6.2 Extension Data in Agent Card
220
+
221
+ ```json
222
+ {
223
+ "uri": "https://openclaw.dev/a2a/extensions/trust-tiers",
224
+ "version": "1.0.0",
225
+ "required": false,
226
+ "data": {
227
+ "tiers": ["public", "friends", "family"],
228
+ "default_tier": "public",
229
+ "disclosure_levels": ["public", "minimal", "none"],
230
+ "default_disclosure": "minimal",
231
+ "supports_topics": true,
232
+ "supports_goals": true,
233
+ "owner_notifications": true,
234
+ "max_calls_enforced": true
235
+ }
236
+ }
237
+ ```
238
+
239
+ ### 6.3 Extension Headers
240
+
241
+ Callers that understand the extension can include:
242
+
243
+ ```
244
+ X-OpenClaw-Tier-Request: friends
245
+ X-OpenClaw-Disclosure-Preference: public
246
+ X-OpenClaw-Caller-Context: {"name": "Alice", "instance": "alice.example.com", "reason": "Collaboration request"}
247
+ ```
248
+
249
+ The server validates these against the token's actual tier — a `public` token cannot request `friends` tier access.
250
+
251
+ ### 6.4 Extension Response Metadata
252
+
253
+ ```json
254
+ {
255
+ "metadata": {
256
+ "openclaw:tier": "friends",
257
+ "openclaw:disclosure": "minimal",
258
+ "openclaw:topics_allowed": ["chat", "search"],
259
+ "openclaw:calls_remaining": 95,
260
+ "openclaw:token_expires": "2026-03-06T17:54:00Z"
261
+ }
262
+ }
263
+ ```
264
+
265
+ ---
266
+
267
+ ## 7. Implementation Priority
268
+
269
+ | Priority | Item | Effort | Value |
270
+ |---|---|---|---|
271
+ | **P0** | Agent Card at `/.well-known/a2a-agent-card` | Small | High — instant ecosystem visibility |
272
+ | **P1** | Dual-protocol inbound (`POST /api/a2a/rpc`) | Medium | High — accept calls from any A2A agent |
273
+ | **P2** | Outbound protocol detection + Google format | Medium | Medium — call any A2A agent |
274
+ | **P3** | Task state machine adoption | Medium | Medium — richer conversation lifecycle |
275
+ | **P4** | Trust Tiers extension spec (formal) | Small | Medium — standardize our differentiator |
276
+ | **P5** | Streaming support (SSE) | Large | Low — defer until ecosystem demand |
277
+ | **P6** | Artifact support | Medium | Low — our use case is conversational |
278
+ | **P7** | gRPC binding | Large | Low — defer indefinitely |
279
+
280
+ ---
281
+
282
+ ## 8. Conclusion
283
+
284
+ The Google A2A Protocol and our A2A Calling protocol are complementary, not competing. Google provides the infrastructure layer (discovery, wire format, task management, enterprise features) while we provide the social layer (trust tiers, disclosure, owner awareness, relationship management).
285
+
286
+ By adopting Google A2A as the wire protocol and extending it with our trust model, we get:
287
+ - **Interoperability** with the broader A2A ecosystem (any Google A2A-compatible agent can call us)
288
+ - **Preservation** of our unique features (permission tiers, disclosure, first-meeting workflow)
289
+ - **Credibility** from aligning with an industry standard
290
+ - **Future-proofing** as the ecosystem grows (streaming, artifacts, gRPC — all available when needed)
291
+
292
+ The key architectural principle: **Google A2A is the envelope; OpenClaw is the letter inside.**