Skip to content

Commit 4cd1970

Browse files
committed
updates
1 parent d778c13 commit 4cd1970

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

specification/v0_10/docs/a2ui_protocol.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ This message instructs the client to remove a surface and all its associated com
277277

278278
### `actionResponse`
279279

280-
This message is sent by the server to respond to a client-initiated action that requested a response via `wantResponse: true`.
280+
This message is sent by the server to respond to a client-initiated `action` that requested a response via `wantResponse: true`.
281281

282282
**Properties:**
283283

@@ -292,10 +292,28 @@ Exactly one of `value` or `error` must be present.
292292

293293
**Example:**
294294

295+
Client sends this to the server:
295296
```json
296297
{
297298
"version": "v0.10",
298-
"actionId": "req_abc123",
299+
"action": {
300+
"name": "get_typeahead_suggestions",
301+
"surfaceId": "mysurface",
302+
"sourceComponentId": "myinput",
303+
"context": {
304+
"prefix": "app"
305+
},
306+
"wantResponse": true,
307+
"actionId": "get_typeahead_suggestions_1"
308+
}
309+
}
310+
```
311+
312+
Server responds with:
313+
```json
314+
{
315+
"version": "v0.10",
316+
"actionId": "get_typeahead_suggestions_1",
299317
"actionResponse": {
300318
"value": ["apple", "application", "approved"]
301319
}

specification/v0_10/json/client_to_server.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@
3636
"description": "A JSON object containing the key-value pairs from the component's action.event.context, after resolving all data bindings.",
3737
"additionalProperties": true
3838
},
39+
"wantResponse": {
40+
"type": "boolean",
41+
"description": "If true, the client expects an actionResponse from the server.",
42+
"default": false
43+
},
3944
"actionId": {
4045
"type": "string",
4146
"description": "Unique ID for this action call. Only needed if wantResponse is true."
4247
}
43-
4448
},
4549
"required": [
4650
"name",

0 commit comments

Comments
 (0)