Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 25 additions & 5 deletions docs/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -34744,7 +34744,7 @@
}
}
},
"/v2/a2a/{agentId}/.well-known/agent.json": {
"/v2/a2a/{agentId}/.well-known/agent-card.json": {
"get": {
"tags": [
"A2A"
Expand Down Expand Up @@ -34776,12 +34776,32 @@
"description": {
"type": "string"
},
"url": {
"type": "string"
},
"version": {
"type": "string"
},
"supportedInterfaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"protocolBinding": {
"type": "string"
},
"protocolVersion": {
"type": "string"
}
},
"required": [
"url",
"protocolBinding",
"protocolVersion"
],
"additionalProperties": false
}
},
"capabilities": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -34862,8 +34882,8 @@
"required": [
"name",
"description",
"url",
"version",
"supportedInterfaces",
"capabilities",
"defaultInputModes",
"defaultOutputModes",
Expand Down
3 changes: 1 addition & 2 deletions platform/backend/src/agents/a2a-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ export async function executeA2AMessage(
const uiMessageStreamConsumption = consumeReadableStream({
stream: stream.toUIMessageStream<UIMessage>({
originalMessages: params.originalUiMessages,
generateMessageId: () =>
`msg-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`,
generateMessageId: () => crypto.randomUUID(),
onFinish: ({ responseMessage }) => {
responseUiMessage = responseMessage;
},
Expand Down
5 changes: 5 additions & 0 deletions platform/backend/src/agents/a2a/a2a-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export enum A2AErrorKind {
TaskIsNotInputRequired,
ApprovalIdNotFound,
ApprovalIdAlreadyResolved,
MessageIdAlreadyExists,
NothingToExecute,
}
const A2A_ERRORS: Record<A2AErrorKind, { code: number; message: string }> = {
Expand Down Expand Up @@ -68,6 +69,10 @@ const A2A_ERRORS: Record<A2AErrorKind, { code: number; message: string }> = {
code: -32602,
message: "Approval ID already resolved",
},
[A2AErrorKind.MessageIdAlreadyExists]: {
code: -32602,
message: "A message with the given ID already exists",
},
[A2AErrorKind.NothingToExecute]: {
code: -32602,
message: "Nothing to execute",
Expand Down
Loading
Loading