From a693e20fc7601553e8ca1fe9ca14a4463985e6b9 Mon Sep 17 00:00:00 2001 From: Jay Gindin Date: Fri, 6 Mar 2026 13:04:39 -0500 Subject: [PATCH 1/2] Change CallId to allow for more data. The agent identifier and name of the function called are now optional; the callId itself is still required. This enables support for stateless backends, especially where there are multiple instances sharing a backing session store. --- specification/v0_10/json/common_types.json | 19 ++++++++++++++++-- .../test/cases/call_function_message.json | 20 +++++++++---------- .../v0_10/test/cases/client_messages.json | 4 ++-- .../v0_10/test/cases/function_response.json | 16 +++++++-------- 4 files changed, 37 insertions(+), 22 deletions(-) diff --git a/specification/v0_10/json/common_types.json b/specification/v0_10/json/common_types.json index b8bed4ac8..5b04b35b7 100644 --- a/specification/v0_10/json/common_types.json +++ b/specification/v0_10/json/common_types.json @@ -9,8 +9,23 @@ "description": "The unique identifier for a component, used for both definitions and references within the same surface." }, "CallId": { - "type": "string", - "description": "The unique identifier for a server initiated function call." + "type": "object", + "description": "The unique identifier for a server initiated function call.", + "properties": { + "agentId": { + "type": "string", + "description": "Identifies the agent initiating the function call." + }, + "call": { + "type": "string", + "description": "Name of the function call." + }, + "callId": { + "type": "string", + "description": "Uniquely identifies this instance of the function call." + } + }, + "required": ["callId"] }, "AccessibilityAttributes": { "type": "object", diff --git a/specification/v0_10/test/cases/call_function_message.json b/specification/v0_10/test/cases/call_function_message.json index 5be22de0d..b90406765 100644 --- a/specification/v0_10/test/cases/call_function_message.json +++ b/specification/v0_10/test/cases/call_function_message.json @@ -15,7 +15,7 @@ "returnType": "void", "callableFrom": "clientOrRemote" }, - "functionCallId": "unique-call-id-123", + "functionCallId": { "callId": "unique-call-id-123" }, "wantResponse": true } }, @@ -29,7 +29,7 @@ "returnType": "void", "callableFrom": "remoteOnly" }, - "functionCallId": "unique-call-id-123a", + "functionCallId": { "callId": "unique-call-id-123a" }, "wantResponse": false } }, @@ -46,7 +46,7 @@ "returnType": "void", "callableFrom": "clientOrRemote" }, - "functionCallId": "unique-call-id-124" + "functionCallId": { "callId": "unique-call-id-124" } } }, { @@ -67,7 +67,7 @@ "valid": false, "data": { "version": "v0.10", - "functionCallId": "unique-call-id-125" + "functionCallId": { "callId": "unique-call-id-125" } } }, { @@ -81,7 +81,7 @@ "returnType": "boolean", "callableFrom": "clientOnly" }, - "functionCallId": "unique-call-id-126" + "functionCallId": { "callId": "unique-call-id-126" } } }, { @@ -94,7 +94,7 @@ "args": { "value": "bar" }, "returnType": "boolean" }, - "functionCallId": "unique-call-id-126b" + "functionCallId": { "callId": "unique-call-id-126b" } } }, { @@ -110,7 +110,7 @@ "returnType": "boolean", "callableFrom": "clientOrRemote" }, - "functionCallId": "unique-call-id-127" + "functionCallId": { "callId": "unique-call-id-127" } } }, { @@ -126,7 +126,7 @@ "returnType": "boolean", "callableFrom": "clientOrRemote" }, - "functionCallId": "unique-call-id-128" + "functionCallId": { "callId": "unique-call-id-128" } } }, { @@ -140,7 +140,7 @@ "returnType": "object", "callableFrom": "clientOrRemote" }, - "functionCallId": "unique-call-id-129" + "functionCallId": { "callId": "unique-call-id-129" } } }, { @@ -156,7 +156,7 @@ "returnType": "boolean", "callableFrom": "clientOrRemote" }, - "functionCallId": "id-3" + "functionCallId": { "callId": "id-3" } } } ] diff --git a/specification/v0_10/test/cases/client_messages.json b/specification/v0_10/test/cases/client_messages.json index 774e0601f..87cf3a881 100644 --- a/specification/v0_10/test/cases/client_messages.json +++ b/specification/v0_10/test/cases/client_messages.json @@ -50,7 +50,7 @@ "version": "v0.10", "error": { "code": "FUNCTION_FAILED", - "functionCallId": "unique-call-id-132", + "functionCallId": { "callId": "unique-call-id-132" }, "message": "Something went wrong" } } @@ -62,7 +62,7 @@ "version": "v0.10", "error": { "code": "FUNCTION_FAILED", - "functionCallId": "unique-call-id-133", + "functionCallId": { "callId": "unique-call-id-133" }, "surfaceId": "main", "message": "Something went wrong" } diff --git a/specification/v0_10/test/cases/function_response.json b/specification/v0_10/test/cases/function_response.json index aa5a0a358..f8f506b5c 100644 --- a/specification/v0_10/test/cases/function_response.json +++ b/specification/v0_10/test/cases/function_response.json @@ -7,7 +7,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-130", + "functionCallId": { "callId": "unique-call-id-130" }, "value": { "result": "success", "count": 42 @@ -33,7 +33,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131a", + "functionCallId": { "callId": "unique-call-id-131a" }, "value": "success" } } @@ -44,7 +44,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131b", + "functionCallId": { "callId": "unique-call-id-131b" }, "value": 42 } } @@ -55,7 +55,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131c", + "functionCallId": { "callId": "unique-call-id-131c" }, "value": true } } @@ -66,7 +66,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131d", + "functionCallId": { "callId": "unique-call-id-131d" }, "value": null } } @@ -77,7 +77,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131e", + "functionCallId": { "callId": "unique-call-id-131e" }, "value": [ "one", 2, @@ -93,7 +93,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131", + "functionCallId": { "callId": "unique-call-id-131" }, "value": { "result": { "nested": "object" } } @@ -106,7 +106,7 @@ "data": { "version": "v0.10", "functionResponse": { - "functionCallId": "unique-call-id-131f", + "functionCallId": { "callId": "unique-call-id-131f" }, "value": [ "one", { From d72b25451ffe7cc76b72238c80fa5d31f409e181 Mon Sep 17 00:00:00 2001 From: Jay Gindin Date: Fri, 6 Mar 2026 13:55:50 -0500 Subject: [PATCH 2/2] Remove the `call` property. For cases that need the function call name, the suggestion is to build it into the `callId`. E.g., "-" --- specification/v0_10/json/common_types.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/v0_10/json/common_types.json b/specification/v0_10/json/common_types.json index 5b04b35b7..3d2e6679a 100644 --- a/specification/v0_10/json/common_types.json +++ b/specification/v0_10/json/common_types.json @@ -16,10 +16,6 @@ "type": "string", "description": "Identifies the agent initiating the function call." }, - "call": { - "type": "string", - "description": "Name of the function call." - }, "callId": { "type": "string", "description": "Uniquely identifies this instance of the function call."