diff --git a/.github/actions/spelling/excludes.txt b/.github/actions/spelling/excludes.txt index 89f938aaa..1538a2e70 100644 --- a/.github/actions/spelling/excludes.txt +++ b/.github/actions/spelling/excludes.txt @@ -89,6 +89,7 @@ CHANGELOG.md ^src/a2a/grpc/ ^src/a2a/types/ +^src/a2a/compat/v0_3/a2a_v0_3* ^tests/ .pre-commit-config.yaml (?:^|/)a2a\.json$ diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index 7ae013f35..95fba28c5 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -22,8 +22,6 @@ jobs: - name: Add uv to PATH run: | echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Install Buf - uses: bufbuild/buf-setup-action@v1 - name: Install dependencies run: uv sync --locked diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 29dce59ed..e5c1e2c6b 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -54,8 +54,7 @@ jobs: - name: Add uv to PATH run: | echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Install Buf - uses: bufbuild/buf-setup-action@v1 + # Coverage comparison for PRs (only on Python 3.13 to avoid duplicate work) - name: Checkout Base Branch @@ -80,10 +79,6 @@ jobs: with: clean: true - - name: Install dependencies (PR) - if: github.event_name == 'pull_request' && matrix.python-version == '3.13' - run: uv sync --locked && uv build - - name: Run coverage (PR) if: github.event_name == 'pull_request' && matrix.python-version == '3.13' run: | diff --git a/.github/workflows/update-a2a-types.yml b/.github/workflows/update-a2a-types.yml deleted file mode 100644 index 46dcb130b..000000000 --- a/.github/workflows/update-a2a-types.yml +++ /dev/null @@ -1,55 +0,0 @@ ---- -name: Update A2A Schema from Specification -on: -# TODO (https://github.com/a2aproject/a2a-python/issues/559): bring back once types are migrated, currently it generates many broken PRs -# repository_dispatch: -# types: [a2a_json_update] - workflow_dispatch: -jobs: - generate_and_pr: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - steps: - - name: Checkout code - uses: actions/checkout@v6 - - name: Set up Python - uses: actions/setup-python@v6 - with: - python-version: '3.10' - - name: Install uv - uses: astral-sh/setup-uv@v7 - - name: Configure uv shell - run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH - - name: Define output file variable - id: vars - run: | - GENERATED_FILE="./src/a2a/types" - echo "GENERATED_FILE=$GENERATED_FILE" >> "$GITHUB_OUTPUT" - - name: Install Buf - uses: bufbuild/buf-setup-action@v1 - - name: Run buf generate - run: | - set -euo pipefail # Exit immediately if a command exits with a non-zero status - echo "Running buf generate..." - buf generate - echo "Buf generate finished." - - name: Create Pull Request with Updates - uses: peter-evans/create-pull-request@v8 - with: - token: ${{ secrets.A2A_BOT_PAT }} - committer: a2a-bot - author: a2a-bot - commit-message: '${{ github.event.client_payload.message }}' - title: '${{ github.event.client_payload.message }}' - body: | - Commit: https://github.com/a2aproject/A2A/commit/${{ github.event.client_payload.sha }} - branch: auto-update-a2a-types-${{ github.event.client_payload.sha }} - base: main - labels: | - automated - dependencies - add-paths: |- - ${{ steps.vars.outputs.GENERATED_FILE }} - src/a2a/grpc/ diff --git a/.gitignore b/.gitignore index 9306b42a1..fcb4f2e92 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,5 @@ test_venv/ coverage.xml .nox spec.json -src/a2a/types/a2a.json docker-compose.yaml .geminiignore diff --git a/pyproject.toml b/pyproject.toml index e1e2fc991..5742b9c9e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,15 +62,9 @@ changelog = "https://github.com/a2aproject/a2a-python/blob/main/CHANGELOG.md" documentation = "https://a2a-protocol.org/latest/sdk/python/" [build-system] -requires = ["hatchling", "uv-dynamic-versioning", "hatch-build-scripts"] +requires = ["hatchling", "uv-dynamic-versioning"] build-backend = "hatchling.build" -[tool.hatch.build.hooks.build-scripts] -artifacts = ["src/a2a/types/a2a.json"] - -[[tool.hatch.build.hooks.build-scripts.scripts]] -commands = ["bash scripts/gen_proto.sh"] -work_dir = "." [tool.hatch.version] source = "uv-dynamic-versioning" @@ -291,6 +285,9 @@ exclude = [ "src/a2a/types/a2a_pb2.py", "src/a2a/types/a2a_pb2.pyi", "src/a2a/types/a2a_pb2_grpc.py", + "src/a2a/compat/v0_3/*_pb2.py", + "src/a2a/compat/v0_3/*_pb2.pyi", + "src/a2a/compat/v0_3/*_pb2_grpc.py", "tests/**", ] @@ -347,6 +344,9 @@ exclude = [ "src/a2a/types/a2a_pb2.py", "src/a2a/types/a2a_pb2.pyi", "src/a2a/types/a2a_pb2_grpc.py", + "src/a2a/compat/v0_3/*_pb2.py", + "src/a2a/compat/v0_3/*_pb2.pyi", + "src/a2a/compat/v0_3/*_pb2_grpc.py", ] docstring-code-format = true docstring-code-line-length = "dynamic" diff --git a/scripts/gen_proto.sh b/scripts/gen_proto.sh index 163ba789b..34ff96ae0 100755 --- a/scripts/gen_proto.sh +++ b/scripts/gen_proto.sh @@ -25,10 +25,4 @@ echo "Downloading legacy v0.3 proto file..." # Commit hash was selected as a2a.proto version from 0.3 branch with latests fixes. curl -o src/a2a/compat/v0_3/a2a_v0_3.proto https://raw.githubusercontent.com/a2aproject/A2A/b3b266d127dde3d1000ec103b252d1de81289e83/specification/grpc/a2a.proto -# Generate legacy v0.3 compatibility protobuf code -echo "Generating legacy v0.3 compatibility protobuf code" -npx --yes @bufbuild/buf generate src/a2a/compat/v0_3 --template buf.compat.gen.yaml -# Fix imports in legacy generated grpc file -echo "Fixing imports in src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py" -sed 's/import a2a_v0_3_pb2 as a2a__v0__3__pb2/from . import a2a_v0_3_pb2 as a2a__v0__3__pb2/g' src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py > src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py.tmp && mv src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py.tmp src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py diff --git a/scripts/gen_proto_compat.sh b/scripts/gen_proto_compat.sh new file mode 100755 index 000000000..c85d2efe2 --- /dev/null +++ b/scripts/gen_proto_compat.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +# Generate legacy v0.3 compatibility protobuf code +echo "Generating legacy v0.3 compatibility protobuf code" +npx --yes @bufbuild/buf generate src/a2a/compat/v0_3 --template buf.compat.gen.yaml + +# Fix imports in legacy generated grpc file +echo "Fixing imports in src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py" +sed 's/import a2a_v0_3_pb2 as a2a__v0__3__pb2/from . import a2a_v0_3_pb2 as a2a__v0__3__pb2/g' src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py > src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py.tmp && mv src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py.tmp src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py diff --git a/src/a2a/compat/v0_3/.gitignore b/src/a2a/compat/v0_3/.gitignore deleted file mode 100644 index fec2beefb..000000000 --- a/src/a2a/compat/v0_3/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -*_pb2.py -*_pb2_grpc.py -*_pb2.pyi -a2a_v0_3.proto diff --git a/src/a2a/compat/v0_3/a2a_v0_3.proto b/src/a2a/compat/v0_3/a2a_v0_3.proto new file mode 100644 index 000000000..41eaa0341 --- /dev/null +++ b/src/a2a/compat/v0_3/a2a_v0_3.proto @@ -0,0 +1,735 @@ +// Older protoc compilers don't understand edition yet. +syntax = "proto3"; +package a2a.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/struct.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "A2a.V1"; +option go_package = "google.golang.org/a2a/v1"; +option java_multiple_files = true; +option java_outer_classname = "A2A"; +option java_package = "com.google.a2a.v1"; + +// A2AService defines the gRPC version of the A2A protocol. This has a slightly +// different shape than the JSONRPC version to better conform to AIP-127, +// where appropriate. The nouns are AgentCard, Message, Task and +// TaskPushNotificationConfig. +// - Messages are not a standard resource so there is no get/delete/update/list +// interface, only a send and stream custom methods. +// - Tasks have a get interface and custom cancel and subscribe methods. +// - TaskPushNotificationConfig are a resource whose parent is a task. +// They have get, list and create methods. +// - AgentCard is a static resource with only a get method. +service A2AService { + // Send a message to the agent. This is a blocking call that will return the + // task once it is completed, or a LRO if requested. + rpc SendMessage(SendMessageRequest) returns (SendMessageResponse) { + option (google.api.http) = { + post: "/v1/message:send" + body: "*" + }; + } + // SendStreamingMessage is a streaming call that will return a stream of + // task update events until the Task is in an interrupted or terminal state. + rpc SendStreamingMessage(SendMessageRequest) returns (stream StreamResponse) { + option (google.api.http) = { + post: "/v1/message:stream" + body: "*" + }; + } + + // Get the current state of a task from the agent. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v1/{name=tasks/*}" + }; + option (google.api.method_signature) = "name"; + } + // Cancel a task from the agent. If supported one should expect no + // more task updates for the task. + rpc CancelTask(CancelTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v1/{name=tasks/*}:cancel" + body: "*" + }; + } + // TaskSubscription is a streaming call that will return a stream of task + // update events. This attaches the stream to an existing in process task. + // If the task is complete the stream will return the completed task (like + // GetTask) and close the stream. + rpc TaskSubscription(TaskSubscriptionRequest) + returns (stream StreamResponse) { + option (google.api.http) = { + get: "/v1/{name=tasks/*}:subscribe" + }; + } + + // Set a push notification config for a task. + rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest) + returns (TaskPushNotificationConfig) { + option (google.api.http) = { + post: "/v1/{parent=tasks/*/pushNotificationConfigs}" + body: "config" + }; + option (google.api.method_signature) = "parent,config"; + } + // Get a push notification config for a task. + rpc GetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest) + returns (TaskPushNotificationConfig) { + option (google.api.http) = { + get: "/v1/{name=tasks/*/pushNotificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } + // Get a list of push notifications configured for a task. + rpc ListTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest) + returns (ListTaskPushNotificationConfigResponse) { + option (google.api.http) = { + get: "/v1/{parent=tasks/*}/pushNotificationConfigs" + }; + option (google.api.method_signature) = "parent"; + } + // GetAgentCard returns the agent card for the agent. + rpc GetAgentCard(GetAgentCardRequest) returns (AgentCard) { + option (google.api.http) = { + get: "/v1/card" + }; + } + // Delete a push notification config for a task. + rpc DeleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=tasks/*/pushNotificationConfigs/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +///////// Data Model //////////// + +// Configuration of a send message request. +message SendMessageConfiguration { + // The output modes that the agent is expected to respond with. + repeated string accepted_output_modes = 1; + // A configuration of a webhook that can be used to receive updates + PushNotificationConfig push_notification = 2; + // The maximum number of messages to include in the history. if 0, the + // history will be unlimited. + int32 history_length = 3; + // If true, the message will be blocking until the task is completed. If + // false, the message will be non-blocking and the task will be returned + // immediately. It is the caller's responsibility to check for any task + // updates. + bool blocking = 4; +} + +// Task is the core unit of action for A2A. It has a current status +// and when results are created for the task they are stored in the +// artifact. If there are multiple turns for a task, these are stored in +// history. +message Task { + // Unique identifier (e.g. UUID) for the task, generated by the server for a + // new task. + string id = 1; + // Unique identifier (e.g. UUID) for the contextual collection of interactions + // (tasks and messages). Created by the A2A server. + string context_id = 2; + // The current status of a Task, including state and a message. + TaskStatus status = 3; + // A set of output artifacts for a Task. + repeated Artifact artifacts = 4; + // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED + // The history of interactions from a task. + repeated Message history = 5; + // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + // A key/value object to store custom metadata about a task. + google.protobuf.Struct metadata = 6; +} + +// The set of states a Task can be in. +enum TaskState { + TASK_STATE_UNSPECIFIED = 0; + // Represents the status that acknowledges a task is created + TASK_STATE_SUBMITTED = 1; + // Represents the status that a task is actively being processed + TASK_STATE_WORKING = 2; + // Represents the status a task is finished. This is a terminal state + TASK_STATE_COMPLETED = 3; + // Represents the status a task is done but failed. This is a terminal state + TASK_STATE_FAILED = 4; + // Represents the status a task was cancelled before it finished. + // This is a terminal state. + TASK_STATE_CANCELLED = 5; + // Represents the status that the task requires information to complete. + // This is an interrupted state. + TASK_STATE_INPUT_REQUIRED = 6; + // Represents the status that the agent has decided to not perform the task. + // This may be done during initial task creation or later once an agent + // has determined it can't or won't proceed. This is a terminal state. + TASK_STATE_REJECTED = 7; + // Represents the state that some authentication is needed from the upstream + // client. Authentication is expected to come out-of-band thus this is not + // an interrupted or terminal state. + TASK_STATE_AUTH_REQUIRED = 8; +} + +// A container for the status of a task +message TaskStatus { + // The current state of this task + TaskState state = 1; + // A message associated with the status. + Message update = 2 [json_name = "message"]; + // Timestamp when the status was recorded. + // Example: "2023-10-27T10:00:00Z" + google.protobuf.Timestamp timestamp = 3; +} + +// Part represents a container for a section of communication content. +// Parts can be purely textual, some sort of file (image, video, etc) or +// a structured data blob (i.e. JSON). +message Part { + oneof part { + string text = 1; + FilePart file = 2; + DataPart data = 3; + } + // Optional metadata associated with this part. + google.protobuf.Struct metadata = 4; +} + +// FilePart represents the different ways files can be provided. If files are +// small, directly feeding the bytes is supported via file_with_bytes. If the +// file is large, the agent should read the content as appropriate directly +// from the file_with_uri source. +message FilePart { + oneof file { + string file_with_uri = 1; + bytes file_with_bytes = 2; + } + string mime_type = 3; + string name = 4; +} + +// DataPart represents a structured blob. This is most commonly a JSON payload. +message DataPart { + google.protobuf.Struct data = 1; +} + +enum Role { + ROLE_UNSPECIFIED = 0; + // USER role refers to communication from the client to the server. + ROLE_USER = 1; + // AGENT role refers to communication from the server to the client. + ROLE_AGENT = 2; +} + +// Message is one unit of communication between client and server. It is +// associated with a context and optionally a task. Since the server is +// responsible for the context definition, it must always provide a context_id +// in its messages. The client can optionally provide the context_id if it +// knows the context to associate the message to. Similarly for task_id, +// except the server decides if a task is created and whether to include the +// task_id. +message Message { + // The unique identifier (e.g. UUID)of the message. This is required and + // created by the message creator. + string message_id = 1; + // The context id of the message. This is optional and if set, the message + // will be associated with the given context. + string context_id = 2; + // The task id of the message. This is optional and if set, the message + // will be associated with the given task. + string task_id = 3; + // A role for the message. + Role role = 4; + // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED + // Content is the container of the message content. + repeated Part content = 5; + // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + // Any optional metadata to provide along with the message. + google.protobuf.Struct metadata = 6; + // The URIs of extensions that are present or contributed to this Message. + repeated string extensions = 7; +} + +// Artifacts are the container for task completed results. These are similar +// to Messages but are intended to be the product of a task, as opposed to +// point-to-point communication. +message Artifact { + // Unique identifier (e.g. UUID) for the artifact. It must be at least unique + // within a task. + string artifact_id = 1; + // A human readable name for the artifact. + string name = 3; + // A human readable description of the artifact, optional. + string description = 4; + // The content of the artifact. + repeated Part parts = 5; + // Optional metadata included with the artifact. + google.protobuf.Struct metadata = 6; + // The URIs of extensions that are present or contributed to this Artifact. + repeated string extensions = 7; +} + +// TaskStatusUpdateEvent is a delta even on a task indicating that a task +// has changed. +message TaskStatusUpdateEvent { + // The id of the task that is changed + string task_id = 1; + // The id of the context that the task belongs to + string context_id = 2; + // The new status of the task. + TaskStatus status = 3; + // Whether this is the last status update expected for this task. + bool final = 4; + // Optional metadata to associate with the task update. + google.protobuf.Struct metadata = 5; +} + +// TaskArtifactUpdateEvent represents a task delta where an artifact has +// been generated. +message TaskArtifactUpdateEvent { + // The id of the task for this artifact + string task_id = 1; + // The id of the context that this task belongs too + string context_id = 2; + // The artifact itself + Artifact artifact = 3; + // Whether this should be appended to a prior one produced + bool append = 4; + // Whether this represents the last part of an artifact + bool last_chunk = 5; + // Optional metadata associated with the artifact update. + google.protobuf.Struct metadata = 6; +} + +// Configuration for setting up push notifications for task updates. +message PushNotificationConfig { + // A unique identifier (e.g. UUID) for this push notification. + string id = 1; + // Url to send the notification too + string url = 2; + // Token unique for this task/session + string token = 3; + // Information about the authentication to sent with the notification + AuthenticationInfo authentication = 4; +} + +// Defines authentication details, used for push notifications. +message AuthenticationInfo { + // Supported authentication schemes - e.g. Basic, Bearer, etc + repeated string schemes = 1; + // Optional credentials + string credentials = 2; +} + +// Defines additional transport information for the agent. +message AgentInterface { + // The url this interface is found at. + string url = 1; + // The transport supported this url. This is an open form string, to be + // easily extended for many transport protocols. The core ones officially + // supported are JSONRPC, GRPC and HTTP+JSON. + string transport = 2; +} + +// AgentCard conveys key information: +// - Overall details (version, name, description, uses) +// - Skills; a set of actions/solutions the agent can perform +// - Default modalities/content types supported by the agent. +// - Authentication requirements +// Next ID: 19 +message AgentCard { + // The version of the A2A protocol this agent supports. + string protocol_version = 16; + // A human readable name for the agent. + // Example: "Recipe Agent" + string name = 1; + // A description of the agent's domain of action/solution space. + // Example: "Agent that helps users with recipes and cooking." + string description = 2; + // A URL to the address the agent is hosted at. This represents the + // preferred endpoint as declared by the agent. + string url = 3; + // The transport of the preferred endpoint. If empty, defaults to JSONRPC. + string preferred_transport = 14; + // Announcement of additional supported transports. Client can use any of + // the supported transports. + repeated AgentInterface additional_interfaces = 15; + // The service provider of the agent. + AgentProvider provider = 4; + // The version of the agent. + // Example: "1.0.0" + string version = 5; + // A url to provide additional documentation about the agent. + string documentation_url = 6; + // A2A Capability set supported by the agent. + AgentCapabilities capabilities = 7; + // The security scheme details used for authenticating with this agent. + map security_schemes = 8; + // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED + // Security requirements for contacting the agent. + // This list can be seen as an OR of ANDs. Each object in the list describes + // one possible set of security requirements that must be present on a + // request. This allows specifying, for example, "callers must either use + // OAuth OR an API Key AND mTLS." + // Example: + // security { + // schemes { key: "oauth" value { list: ["read"] } } + // } + // security { + // schemes { key: "api-key" } + // schemes { key: "mtls" } + // } + repeated Security security = 9; + // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + // The set of interaction modes that the agent supports across all skills. + // This can be overridden per skill. Defined as mime types. + repeated string default_input_modes = 10; + // The mime types supported as outputs from this agent. + repeated string default_output_modes = 11; + // Skills represent a unit of ability an agent can perform. This may + // somewhat abstract but represents a more focused set of actions that the + // agent is highly likely to succeed at. + repeated AgentSkill skills = 12; + // Whether the agent supports providing an extended agent card when + // the user is authenticated, i.e. is the card from .well-known + // different than the card from GetAgentCard. + bool supports_authenticated_extended_card = 13; + // JSON Web Signatures computed for this AgentCard. + repeated AgentCardSignature signatures = 17; + // An optional URL to an icon for the agent. + string icon_url = 18; +} + +// Represents information about the service provider of an agent. +message AgentProvider { + // The providers reference url + // Example: "https://ai.google.dev" + string url = 1; + // The providers organization name + // Example: "Google" + string organization = 2; +} + +// Defines the A2A feature set supported by the agent +message AgentCapabilities { + // If the agent will support streaming responses + bool streaming = 1; + // If the agent can send push notifications to the clients webhook + bool push_notifications = 2; + // Extensions supported by this agent. + repeated AgentExtension extensions = 3; +} + +// A declaration of an extension supported by an Agent. +message AgentExtension { + // The URI of the extension. + // Example: "https://developers.google.com/identity/protocols/oauth2" + string uri = 1; + // A description of how this agent uses this extension. + // Example: "Google OAuth 2.0 authentication" + string description = 2; + // Whether the client must follow specific requirements of the extension. + // Example: false + bool required = 3; + // Optional configuration for the extension. + google.protobuf.Struct params = 4; +} + +// AgentSkill represents a unit of action/solution that the agent can perform. +// One can think of this as a type of highly reliable solution that an agent +// can be tasked to provide. Agents have the autonomy to choose how and when +// to use specific skills, but clients should have confidence that if the +// skill is defined that unit of action can be reliably performed. +message AgentSkill { + // Unique identifier of the skill within this agent. + string id = 1; + // A human readable name for the skill. + string name = 2; + // A human (or llm) readable description of the skill + // details and behaviors. + string description = 3; + // A set of tags for the skill to enhance categorization/utilization. + // Example: ["cooking", "customer support", "billing"] + repeated string tags = 4; + // A set of example queries that this skill is designed to address. + // These examples should help the caller to understand how to craft requests + // to the agent to achieve specific goals. + // Example: ["I need a recipe for bread"] + repeated string examples = 5; + // Possible input modalities supported. + repeated string input_modes = 6; + // Possible output modalities produced + repeated string output_modes = 7; + // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED + // Security schemes necessary for the agent to leverage this skill. + // As in the overall AgentCard.security, this list represents a logical OR of + // security requirement objects. Each object is a set of security schemes + // that must be used together (a logical AND). + repeated Security security = 8; + // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED +} + +// AgentCardSignature represents a JWS signature of an AgentCard. +// This follows the JSON format of an RFC 7515 JSON Web Signature (JWS). +message AgentCardSignature { + // The protected JWS header for the signature. This is always a + // base64url-encoded JSON object. Required. + string protected = 1 [(google.api.field_behavior) = REQUIRED]; + // The computed signature, base64url-encoded. Required. + string signature = 2 [(google.api.field_behavior) = REQUIRED]; + // The unprotected JWS header values. + google.protobuf.Struct header = 3; +} + +message TaskPushNotificationConfig { + // The resource name of the config. + // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} + string name = 1; + // The push notification configuration details. + PushNotificationConfig push_notification_config = 2; +} + +// protolint:disable REPEATED_FIELD_NAMES_PLURALIZED +message StringList { + repeated string list = 1; +} +// protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + +message Security { + map schemes = 1; +} + +message SecurityScheme { + oneof scheme { + APIKeySecurityScheme api_key_security_scheme = 1; + HTTPAuthSecurityScheme http_auth_security_scheme = 2; + OAuth2SecurityScheme oauth2_security_scheme = 3; + OpenIdConnectSecurityScheme open_id_connect_security_scheme = 4; + MutualTlsSecurityScheme mtls_security_scheme = 5; + } +} + +message APIKeySecurityScheme { + // Description of this security scheme. + string description = 1; + // Location of the API key, valid values are "query", "header", or "cookie" + string location = 2; + // Name of the header, query or cookie parameter to be used. + string name = 3; +} + +message HTTPAuthSecurityScheme { + // Description of this security scheme. + string description = 1; + // The name of the HTTP Authentication scheme to be used in the + // Authorization header as defined in RFC7235. The values used SHOULD be + // registered in the IANA Authentication Scheme registry. + // The value is case-insensitive, as defined in RFC7235. + string scheme = 2; + // A hint to the client to identify how the bearer token is formatted. + // Bearer tokens are usually generated by an authorization server, so + // this information is primarily for documentation purposes. + string bearer_format = 3; +} + +message OAuth2SecurityScheme { + // Description of this security scheme. + string description = 1; + // An object containing configuration information for the flow types supported + OAuthFlows flows = 2; + // URL to the oauth2 authorization server metadata + // [RFC8414](https://datatracker.ietf.org/doc/html/rfc8414). TLS is required. + string oauth2_metadata_url = 3; +} + +message OpenIdConnectSecurityScheme { + // Description of this security scheme. + string description = 1; + // Well-known URL to discover the [[OpenID-Connect-Discovery]] provider + // metadata. + string open_id_connect_url = 2; +} + +message MutualTlsSecurityScheme { + // Description of this security scheme. + string description = 1; +} + +message OAuthFlows { + oneof flow { + AuthorizationCodeOAuthFlow authorization_code = 1; + ClientCredentialsOAuthFlow client_credentials = 2; + ImplicitOAuthFlow implicit = 3; + PasswordOAuthFlow password = 4; + } +} + +message AuthorizationCodeOAuthFlow { + // The authorization URL to be used for this flow. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS + string authorization_url = 1; + // The token URL to be used for this flow. This MUST be in the form of a URL. + // The OAuth2 standard requires the use of TLS. + string token_url = 2; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 3; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 4; +} + +message ClientCredentialsOAuthFlow { + // The token URL to be used for this flow. This MUST be in the form of a URL. + // The OAuth2 standard requires the use of TLS. + string token_url = 1; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 2; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 3; +} + +message ImplicitOAuthFlow { + // The authorization URL to be used for this flow. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS + string authorization_url = 1; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 2; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 3; +} + +message PasswordOAuthFlow { + // The token URL to be used for this flow. This MUST be in the form of a URL. + // The OAuth2 standard requires the use of TLS. + string token_url = 1; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 2; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 3; +} + +///////////// Request Messages /////////// +message SendMessageRequest { + // The message to send to the agent. + Message request = 1 + [(google.api.field_behavior) = REQUIRED, json_name = "message"]; + // Configuration for the send request. + SendMessageConfiguration configuration = 2; + // Optional metadata for the request. + google.protobuf.Struct metadata = 3; +} + +message GetTaskRequest { + // The resource name of the task. + // Format: tasks/{task_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + // The number of most recent messages from the task's history to retrieve. + int32 history_length = 2; +} + +message CancelTaskRequest { + // The resource name of the task to cancel. + // Format: tasks/{task_id} + string name = 1; +} + +message GetTaskPushNotificationConfigRequest { + // The resource name of the config to retrieve. + // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} + string name = 1; +} + +message DeleteTaskPushNotificationConfigRequest { + // The resource name of the config to delete. + // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} + string name = 1; +} + +message CreateTaskPushNotificationConfigRequest { + // The parent task resource for this config. + // Format: tasks/{task_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED + ]; + // The ID for the new config. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; + // The configuration to create. + TaskPushNotificationConfig config = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +message TaskSubscriptionRequest { + // The resource name of the task to subscribe to. + // Format: tasks/{task_id} + string name = 1; +} + +message ListTaskPushNotificationConfigRequest { + // The parent task resource. + // Format: tasks/{task_id} + string parent = 1; + // For AIP-158 these fields are present. Usually not used/needed. + // The maximum number of configurations to return. + // If unspecified, all configs will be returned. + int32 page_size = 2; + + // A page token received from a previous + // ListTaskPushNotificationConfigRequest call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to + // `ListTaskPushNotificationConfigRequest` must match the call that provided + // the page token. + string page_token = 3; +} + +message GetAgentCardRequest { + // Empty. Added to fix linter violation. +} + +//////// Response Messages /////////// +message SendMessageResponse { + oneof payload { + Task task = 1; + Message msg = 2 [json_name = "message"]; + } +} + +// The stream response for a message. The stream should be one of the following +// sequences: +// If the response is a message, the stream should contain one, and only one, +// message and then close +// If the response is a task lifecycle, the first response should be a Task +// object followed by zero or more TaskStatusUpdateEvents and +// TaskArtifactUpdateEvents. The stream should complete when the Task +// if in an interrupted or terminal state. A stream that ends before these +// conditions are met are +message StreamResponse { + oneof payload { + Task task = 1; + Message msg = 2 [json_name = "message"]; + TaskStatusUpdateEvent status_update = 3; + TaskArtifactUpdateEvent artifact_update = 4; + } +} + +message ListTaskPushNotificationConfigResponse { + // The list of push notification configurations. + repeated TaskPushNotificationConfig configs = 1; + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/src/a2a/compat/v0_3/a2a_v0_3_pb2.py b/src/a2a/compat/v0_3/a2a_v0_3_pb2.py new file mode 100644 index 000000000..e310e530b --- /dev/null +++ b/src/a2a/compat/v0_3/a2a_v0_3_pb2.py @@ -0,0 +1,195 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# NO CHECKED-IN PROTOBUF GENCODE +# source: a2a_v0_3.proto +# Protobuf Python Version: 5.29.3 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import runtime_version as _runtime_version +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +_runtime_version.ValidateProtobufRuntimeVersion( + _runtime_version.Domain.PUBLIC, + 5, + 29, + 3, + '', + 'a2a_v0_3.proto' +) +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 +from google.api import client_pb2 as google_dot_api_dot_client__pb2 +from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0e\x61\x32\x61_v0_3.proto\x12\x06\x61\x32\x61.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xde\x01\n\x18SendMessageConfiguration\x12\x32\n\x15\x61\x63\x63\x65pted_output_modes\x18\x01 \x03(\tR\x13\x61\x63\x63\x65ptedOutputModes\x12K\n\x11push_notification\x18\x02 \x01(\x0b\x32\x1e.a2a.v1.PushNotificationConfigR\x10pushNotification\x12%\n\x0ehistory_length\x18\x03 \x01(\x05R\rhistoryLength\x12\x1a\n\x08\x62locking\x18\x04 \x01(\x08R\x08\x62locking\"\xf1\x01\n\x04Task\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n\ncontext_id\x18\x02 \x01(\tR\tcontextId\x12*\n\x06status\x18\x03 \x01(\x0b\x32\x12.a2a.v1.TaskStatusR\x06status\x12.\n\tartifacts\x18\x04 \x03(\x0b\x32\x10.a2a.v1.ArtifactR\tartifacts\x12)\n\x07history\x18\x05 \x03(\x0b\x32\x0f.a2a.v1.MessageR\x07history\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"\x99\x01\n\nTaskStatus\x12\'\n\x05state\x18\x01 \x01(\x0e\x32\x11.a2a.v1.TaskStateR\x05state\x12(\n\x06update\x18\x02 \x01(\x0b\x32\x0f.a2a.v1.MessageR\x07message\x12\x38\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\ttimestamp\"\xa9\x01\n\x04Part\x12\x14\n\x04text\x18\x01 \x01(\tH\x00R\x04text\x12&\n\x04\x66ile\x18\x02 \x01(\x0b\x32\x10.a2a.v1.FilePartH\x00R\x04\x66ile\x12&\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x10.a2a.v1.DataPartH\x00R\x04\x64\x61ta\x12\x33\n\x08metadata\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadataB\x06\n\x04part\"\x93\x01\n\x08\x46ilePart\x12$\n\rfile_with_uri\x18\x01 \x01(\tH\x00R\x0b\x66ileWithUri\x12(\n\x0f\x66ile_with_bytes\x18\x02 \x01(\x0cH\x00R\rfileWithBytes\x12\x1b\n\tmime_type\x18\x03 \x01(\tR\x08mimeType\x12\x12\n\x04name\x18\x04 \x01(\tR\x04nameB\x06\n\x04\x66ile\"7\n\x08\x44\x61taPart\x12+\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x17.google.protobuf.StructR\x04\x64\x61ta\"\xff\x01\n\x07Message\x12\x1d\n\nmessage_id\x18\x01 \x01(\tR\tmessageId\x12\x1d\n\ncontext_id\x18\x02 \x01(\tR\tcontextId\x12\x17\n\x07task_id\x18\x03 \x01(\tR\x06taskId\x12 \n\x04role\x18\x04 \x01(\x0e\x32\x0c.a2a.v1.RoleR\x04role\x12&\n\x07\x63ontent\x18\x05 \x03(\x0b\x32\x0c.a2a.v1.PartR\x07\x63ontent\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12\x1e\n\nextensions\x18\x07 \x03(\tR\nextensions\"\xda\x01\n\x08\x41rtifact\x12\x1f\n\x0b\x61rtifact_id\x18\x01 \x01(\tR\nartifactId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x04 \x01(\tR\x0b\x64\x65scription\x12\"\n\x05parts\x18\x05 \x03(\x0b\x32\x0c.a2a.v1.PartR\x05parts\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\x12\x1e\n\nextensions\x18\x07 \x03(\tR\nextensions\"\xc6\x01\n\x15TaskStatusUpdateEvent\x12\x17\n\x07task_id\x18\x01 \x01(\tR\x06taskId\x12\x1d\n\ncontext_id\x18\x02 \x01(\tR\tcontextId\x12*\n\x06status\x18\x03 \x01(\x0b\x32\x12.a2a.v1.TaskStatusR\x06status\x12\x14\n\x05\x66inal\x18\x04 \x01(\x08R\x05\x66inal\x12\x33\n\x08metadata\x18\x05 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"\xeb\x01\n\x17TaskArtifactUpdateEvent\x12\x17\n\x07task_id\x18\x01 \x01(\tR\x06taskId\x12\x1d\n\ncontext_id\x18\x02 \x01(\tR\tcontextId\x12,\n\x08\x61rtifact\x18\x03 \x01(\x0b\x32\x10.a2a.v1.ArtifactR\x08\x61rtifact\x12\x16\n\x06\x61ppend\x18\x04 \x01(\x08R\x06\x61ppend\x12\x1d\n\nlast_chunk\x18\x05 \x01(\x08R\tlastChunk\x12\x33\n\x08metadata\x18\x06 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"\x94\x01\n\x16PushNotificationConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n\x03url\x18\x02 \x01(\tR\x03url\x12\x14\n\x05token\x18\x03 \x01(\tR\x05token\x12\x42\n\x0e\x61uthentication\x18\x04 \x01(\x0b\x32\x1a.a2a.v1.AuthenticationInfoR\x0e\x61uthentication\"P\n\x12\x41uthenticationInfo\x12\x18\n\x07schemes\x18\x01 \x03(\tR\x07schemes\x12 \n\x0b\x63redentials\x18\x02 \x01(\tR\x0b\x63redentials\"@\n\x0e\x41gentInterface\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\x12\x1c\n\ttransport\x18\x02 \x01(\tR\ttransport\"\xc8\x07\n\tAgentCard\x12)\n\x10protocol_version\x18\x10 \x01(\tR\x0fprotocolVersion\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x10\n\x03url\x18\x03 \x01(\tR\x03url\x12/\n\x13preferred_transport\x18\x0e \x01(\tR\x12preferredTransport\x12K\n\x15\x61\x64\x64itional_interfaces\x18\x0f \x03(\x0b\x32\x16.a2a.v1.AgentInterfaceR\x14\x61\x64\x64itionalInterfaces\x12\x31\n\x08provider\x18\x04 \x01(\x0b\x32\x15.a2a.v1.AgentProviderR\x08provider\x12\x18\n\x07version\x18\x05 \x01(\tR\x07version\x12+\n\x11\x64ocumentation_url\x18\x06 \x01(\tR\x10\x64ocumentationUrl\x12=\n\x0c\x63\x61pabilities\x18\x07 \x01(\x0b\x32\x19.a2a.v1.AgentCapabilitiesR\x0c\x63\x61pabilities\x12Q\n\x10security_schemes\x18\x08 \x03(\x0b\x32&.a2a.v1.AgentCard.SecuritySchemesEntryR\x0fsecuritySchemes\x12,\n\x08security\x18\t \x03(\x0b\x32\x10.a2a.v1.SecurityR\x08security\x12.\n\x13\x64\x65\x66\x61ult_input_modes\x18\n \x03(\tR\x11\x64\x65\x66\x61ultInputModes\x12\x30\n\x14\x64\x65\x66\x61ult_output_modes\x18\x0b \x03(\tR\x12\x64\x65\x66\x61ultOutputModes\x12*\n\x06skills\x18\x0c \x03(\x0b\x32\x12.a2a.v1.AgentSkillR\x06skills\x12O\n$supports_authenticated_extended_card\x18\r \x01(\x08R!supportsAuthenticatedExtendedCard\x12:\n\nsignatures\x18\x11 \x03(\x0b\x32\x1a.a2a.v1.AgentCardSignatureR\nsignatures\x12\x19\n\x08icon_url\x18\x12 \x01(\tR\x07iconUrl\x1aZ\n\x14SecuritySchemesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x16.a2a.v1.SecuritySchemeR\x05value:\x02\x38\x01\"E\n\rAgentProvider\x12\x10\n\x03url\x18\x01 \x01(\tR\x03url\x12\"\n\x0corganization\x18\x02 \x01(\tR\x0corganization\"\x98\x01\n\x11\x41gentCapabilities\x12\x1c\n\tstreaming\x18\x01 \x01(\x08R\tstreaming\x12-\n\x12push_notifications\x18\x02 \x01(\x08R\x11pushNotifications\x12\x36\n\nextensions\x18\x03 \x03(\x0b\x32\x16.a2a.v1.AgentExtensionR\nextensions\"\x91\x01\n\x0e\x41gentExtension\x12\x10\n\x03uri\x18\x01 \x01(\tR\x03uri\x12 \n\x0b\x64\x65scription\x18\x02 \x01(\tR\x0b\x64\x65scription\x12\x1a\n\x08required\x18\x03 \x01(\x08R\x08required\x12/\n\x06params\x18\x04 \x01(\x0b\x32\x17.google.protobuf.StructR\x06params\"\xf4\x01\n\nAgentSkill\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12 \n\x0b\x64\x65scription\x18\x03 \x01(\tR\x0b\x64\x65scription\x12\x12\n\x04tags\x18\x04 \x03(\tR\x04tags\x12\x1a\n\x08\x65xamples\x18\x05 \x03(\tR\x08\x65xamples\x12\x1f\n\x0binput_modes\x18\x06 \x03(\tR\ninputModes\x12!\n\x0coutput_modes\x18\x07 \x03(\tR\x0boutputModes\x12,\n\x08security\x18\x08 \x03(\x0b\x32\x10.a2a.v1.SecurityR\x08security\"\x8b\x01\n\x12\x41gentCardSignature\x12!\n\tprotected\x18\x01 \x01(\tB\x03\xe0\x41\x02R\tprotected\x12!\n\tsignature\x18\x02 \x01(\tB\x03\xe0\x41\x02R\tsignature\x12/\n\x06header\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x06header\"\x8a\x01\n\x1aTaskPushNotificationConfig\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12X\n\x18push_notification_config\x18\x02 \x01(\x0b\x32\x1e.a2a.v1.PushNotificationConfigR\x16pushNotificationConfig\" \n\nStringList\x12\x12\n\x04list\x18\x01 \x03(\tR\x04list\"\x93\x01\n\x08Security\x12\x37\n\x07schemes\x18\x01 \x03(\x0b\x32\x1d.a2a.v1.Security.SchemesEntryR\x07schemes\x1aN\n\x0cSchemesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12(\n\x05value\x18\x02 \x01(\x0b\x32\x12.a2a.v1.StringListR\x05value:\x02\x38\x01\"\xe6\x03\n\x0eSecurityScheme\x12U\n\x17\x61pi_key_security_scheme\x18\x01 \x01(\x0b\x32\x1c.a2a.v1.APIKeySecuritySchemeH\x00R\x14\x61piKeySecurityScheme\x12[\n\x19http_auth_security_scheme\x18\x02 \x01(\x0b\x32\x1e.a2a.v1.HTTPAuthSecuritySchemeH\x00R\x16httpAuthSecurityScheme\x12T\n\x16oauth2_security_scheme\x18\x03 \x01(\x0b\x32\x1c.a2a.v1.OAuth2SecuritySchemeH\x00R\x14oauth2SecurityScheme\x12k\n\x1fopen_id_connect_security_scheme\x18\x04 \x01(\x0b\x32#.a2a.v1.OpenIdConnectSecuritySchemeH\x00R\x1bopenIdConnectSecurityScheme\x12S\n\x14mtls_security_scheme\x18\x05 \x01(\x0b\x32\x1f.a2a.v1.MutualTlsSecuritySchemeH\x00R\x12mtlsSecuritySchemeB\x08\n\x06scheme\"h\n\x14\x41PIKeySecurityScheme\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x1a\n\x08location\x18\x02 \x01(\tR\x08location\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\"w\n\x16HTTPAuthSecurityScheme\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12\x16\n\x06scheme\x18\x02 \x01(\tR\x06scheme\x12#\n\rbearer_format\x18\x03 \x01(\tR\x0c\x62\x65\x61rerFormat\"\x92\x01\n\x14OAuth2SecurityScheme\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12(\n\x05\x66lows\x18\x02 \x01(\x0b\x32\x12.a2a.v1.OAuthFlowsR\x05\x66lows\x12.\n\x13oauth2_metadata_url\x18\x03 \x01(\tR\x11oauth2MetadataUrl\"n\n\x1bOpenIdConnectSecurityScheme\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\x12-\n\x13open_id_connect_url\x18\x02 \x01(\tR\x10openIdConnectUrl\";\n\x17MutualTlsSecurityScheme\x12 \n\x0b\x64\x65scription\x18\x01 \x01(\tR\x0b\x64\x65scription\"\xb0\x02\n\nOAuthFlows\x12S\n\x12\x61uthorization_code\x18\x01 \x01(\x0b\x32\".a2a.v1.AuthorizationCodeOAuthFlowH\x00R\x11\x61uthorizationCode\x12S\n\x12\x63lient_credentials\x18\x02 \x01(\x0b\x32\".a2a.v1.ClientCredentialsOAuthFlowH\x00R\x11\x63lientCredentials\x12\x37\n\x08implicit\x18\x03 \x01(\x0b\x32\x19.a2a.v1.ImplicitOAuthFlowH\x00R\x08implicit\x12\x37\n\x08password\x18\x04 \x01(\x0b\x32\x19.a2a.v1.PasswordOAuthFlowH\x00R\x08passwordB\x06\n\x04\x66low\"\x8a\x02\n\x1a\x41uthorizationCodeOAuthFlow\x12+\n\x11\x61uthorization_url\x18\x01 \x01(\tR\x10\x61uthorizationUrl\x12\x1b\n\ttoken_url\x18\x02 \x01(\tR\x08tokenUrl\x12\x1f\n\x0brefresh_url\x18\x03 \x01(\tR\nrefreshUrl\x12\x46\n\x06scopes\x18\x04 \x03(\x0b\x32..a2a.v1.AuthorizationCodeOAuthFlow.ScopesEntryR\x06scopes\x1a\x39\n\x0bScopesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xdd\x01\n\x1a\x43lientCredentialsOAuthFlow\x12\x1b\n\ttoken_url\x18\x01 \x01(\tR\x08tokenUrl\x12\x1f\n\x0brefresh_url\x18\x02 \x01(\tR\nrefreshUrl\x12\x46\n\x06scopes\x18\x03 \x03(\x0b\x32..a2a.v1.ClientCredentialsOAuthFlow.ScopesEntryR\x06scopes\x1a\x39\n\x0bScopesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xdb\x01\n\x11ImplicitOAuthFlow\x12+\n\x11\x61uthorization_url\x18\x01 \x01(\tR\x10\x61uthorizationUrl\x12\x1f\n\x0brefresh_url\x18\x02 \x01(\tR\nrefreshUrl\x12=\n\x06scopes\x18\x03 \x03(\x0b\x32%.a2a.v1.ImplicitOAuthFlow.ScopesEntryR\x06scopes\x1a\x39\n\x0bScopesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xcb\x01\n\x11PasswordOAuthFlow\x12\x1b\n\ttoken_url\x18\x01 \x01(\tR\x08tokenUrl\x12\x1f\n\x0brefresh_url\x18\x02 \x01(\tR\nrefreshUrl\x12=\n\x06scopes\x18\x03 \x03(\x0b\x32%.a2a.v1.PasswordOAuthFlow.ScopesEntryR\x06scopes\x1a\x39\n\x0bScopesEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\tR\x05value:\x02\x38\x01\"\xc1\x01\n\x12SendMessageRequest\x12.\n\x07request\x18\x01 \x01(\x0b\x32\x0f.a2a.v1.MessageB\x03\xe0\x41\x02R\x07message\x12\x46\n\rconfiguration\x18\x02 \x01(\x0b\x32 .a2a.v1.SendMessageConfigurationR\rconfiguration\x12\x33\n\x08metadata\x18\x03 \x01(\x0b\x32\x17.google.protobuf.StructR\x08metadata\"P\n\x0eGetTaskRequest\x12\x17\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x04name\x12%\n\x0ehistory_length\x18\x02 \x01(\x05R\rhistoryLength\"\'\n\x11\x43\x61ncelTaskRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\":\n$GetTaskPushNotificationConfigRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"=\n\'DeleteTaskPushNotificationConfigRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"\xa9\x01\n\'CreateTaskPushNotificationConfigRequest\x12\x1b\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02R\x06parent\x12 \n\tconfig_id\x18\x02 \x01(\tB\x03\xe0\x41\x02R\x08\x63onfigId\x12?\n\x06\x63onfig\x18\x03 \x01(\x0b\x32\".a2a.v1.TaskPushNotificationConfigB\x03\xe0\x41\x02R\x06\x63onfig\"-\n\x17TaskSubscriptionRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\"{\n%ListTaskPushNotificationConfigRequest\x12\x16\n\x06parent\x18\x01 \x01(\tR\x06parent\x12\x1b\n\tpage_size\x18\x02 \x01(\x05R\x08pageSize\x12\x1d\n\npage_token\x18\x03 \x01(\tR\tpageToken\"\x15\n\x13GetAgentCardRequest\"m\n\x13SendMessageResponse\x12\"\n\x04task\x18\x01 \x01(\x0b\x32\x0c.a2a.v1.TaskH\x00R\x04task\x12\'\n\x03msg\x18\x02 \x01(\x0b\x32\x0f.a2a.v1.MessageH\x00R\x07messageB\t\n\x07payload\"\xfa\x01\n\x0eStreamResponse\x12\"\n\x04task\x18\x01 \x01(\x0b\x32\x0c.a2a.v1.TaskH\x00R\x04task\x12\'\n\x03msg\x18\x02 \x01(\x0b\x32\x0f.a2a.v1.MessageH\x00R\x07message\x12\x44\n\rstatus_update\x18\x03 \x01(\x0b\x32\x1d.a2a.v1.TaskStatusUpdateEventH\x00R\x0cstatusUpdate\x12J\n\x0f\x61rtifact_update\x18\x04 \x01(\x0b\x32\x1f.a2a.v1.TaskArtifactUpdateEventH\x00R\x0e\x61rtifactUpdateB\t\n\x07payload\"\x8e\x01\n&ListTaskPushNotificationConfigResponse\x12<\n\x07\x63onfigs\x18\x01 \x03(\x0b\x32\".a2a.v1.TaskPushNotificationConfigR\x07\x63onfigs\x12&\n\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken*\xfa\x01\n\tTaskState\x12\x1a\n\x16TASK_STATE_UNSPECIFIED\x10\x00\x12\x18\n\x14TASK_STATE_SUBMITTED\x10\x01\x12\x16\n\x12TASK_STATE_WORKING\x10\x02\x12\x18\n\x14TASK_STATE_COMPLETED\x10\x03\x12\x15\n\x11TASK_STATE_FAILED\x10\x04\x12\x18\n\x14TASK_STATE_CANCELLED\x10\x05\x12\x1d\n\x19TASK_STATE_INPUT_REQUIRED\x10\x06\x12\x17\n\x13TASK_STATE_REJECTED\x10\x07\x12\x1c\n\x18TASK_STATE_AUTH_REQUIRED\x10\x08*;\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\r\n\tROLE_USER\x10\x01\x12\x0e\n\nROLE_AGENT\x10\x02\x32\xbb\n\n\nA2AService\x12\x63\n\x0bSendMessage\x12\x1a.a2a.v1.SendMessageRequest\x1a\x1b.a2a.v1.SendMessageResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v1/message:send:\x01*\x12k\n\x14SendStreamingMessage\x12\x1a.a2a.v1.SendMessageRequest\x1a\x16.a2a.v1.StreamResponse\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/v1/message:stream:\x01*0\x01\x12R\n\x07GetTask\x12\x16.a2a.v1.GetTaskRequest\x1a\x0c.a2a.v1.Task\"!\xda\x41\x04name\x82\xd3\xe4\x93\x02\x14\x12\x12/v1/{name=tasks/*}\x12[\n\nCancelTask\x12\x19.a2a.v1.CancelTaskRequest\x1a\x0c.a2a.v1.Task\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/v1/{name=tasks/*}:cancel:\x01*\x12s\n\x10TaskSubscription\x12\x1f.a2a.v1.TaskSubscriptionRequest\x1a\x16.a2a.v1.StreamResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v1/{name=tasks/*}:subscribe0\x01\x12\xc5\x01\n CreateTaskPushNotificationConfig\x12/.a2a.v1.CreateTaskPushNotificationConfigRequest\x1a\".a2a.v1.TaskPushNotificationConfig\"L\xda\x41\rparent,config\x82\xd3\xe4\x93\x02\x36\",/v1/{parent=tasks/*/pushNotificationConfigs}:\x06\x63onfig\x12\xae\x01\n\x1dGetTaskPushNotificationConfig\x12,.a2a.v1.GetTaskPushNotificationConfigRequest\x1a\".a2a.v1.TaskPushNotificationConfig\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=tasks/*/pushNotificationConfigs/*}\x12\xbe\x01\n\x1eListTaskPushNotificationConfig\x12-.a2a.v1.ListTaskPushNotificationConfigRequest\x1a..a2a.v1.ListTaskPushNotificationConfigResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=tasks/*}/pushNotificationConfigs\x12P\n\x0cGetAgentCard\x12\x1b.a2a.v1.GetAgentCardRequest\x1a\x11.a2a.v1.AgentCard\"\x10\x82\xd3\xe4\x93\x02\n\x12\x08/v1/card\x12\xa8\x01\n DeleteTaskPushNotificationConfig\x12/.a2a.v1.DeleteTaskPushNotificationConfigRequest\x1a\x16.google.protobuf.Empty\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=tasks/*/pushNotificationConfigs/*}Bl\n\ncom.a2a.v1B\x0b\x41\x32\x61V03ProtoP\x01Z\x18google.golang.org/a2a/v1\xa2\x02\x03\x41XX\xaa\x02\x06\x41\x32\x61.V1\xca\x02\x06\x41\x32\x61\\V1\xe2\x02\x12\x41\x32\x61\\V1\\GPBMetadata\xea\x02\x07\x41\x32\x61::V1b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'a2a_v0_3_pb2', _globals) +if not _descriptor._USE_C_DESCRIPTORS: + _globals['DESCRIPTOR']._loaded_options = None + _globals['DESCRIPTOR']._serialized_options = b'\n\ncom.a2a.v1B\013A2aV03ProtoP\001Z\030google.golang.org/a2a/v1\242\002\003AXX\252\002\006A2a.V1\312\002\006A2a\\V1\342\002\022A2a\\V1\\GPBMetadata\352\002\007A2a::V1' + _globals['_AGENTCARD_SECURITYSCHEMESENTRY']._loaded_options = None + _globals['_AGENTCARD_SECURITYSCHEMESENTRY']._serialized_options = b'8\001' + _globals['_AGENTCARDSIGNATURE'].fields_by_name['protected']._loaded_options = None + _globals['_AGENTCARDSIGNATURE'].fields_by_name['protected']._serialized_options = b'\340A\002' + _globals['_AGENTCARDSIGNATURE'].fields_by_name['signature']._loaded_options = None + _globals['_AGENTCARDSIGNATURE'].fields_by_name['signature']._serialized_options = b'\340A\002' + _globals['_SECURITY_SCHEMESENTRY']._loaded_options = None + _globals['_SECURITY_SCHEMESENTRY']._serialized_options = b'8\001' + _globals['_AUTHORIZATIONCODEOAUTHFLOW_SCOPESENTRY']._loaded_options = None + _globals['_AUTHORIZATIONCODEOAUTHFLOW_SCOPESENTRY']._serialized_options = b'8\001' + _globals['_CLIENTCREDENTIALSOAUTHFLOW_SCOPESENTRY']._loaded_options = None + _globals['_CLIENTCREDENTIALSOAUTHFLOW_SCOPESENTRY']._serialized_options = b'8\001' + _globals['_IMPLICITOAUTHFLOW_SCOPESENTRY']._loaded_options = None + _globals['_IMPLICITOAUTHFLOW_SCOPESENTRY']._serialized_options = b'8\001' + _globals['_PASSWORDOAUTHFLOW_SCOPESENTRY']._loaded_options = None + _globals['_PASSWORDOAUTHFLOW_SCOPESENTRY']._serialized_options = b'8\001' + _globals['_SENDMESSAGEREQUEST'].fields_by_name['request']._loaded_options = None + _globals['_SENDMESSAGEREQUEST'].fields_by_name['request']._serialized_options = b'\340A\002' + _globals['_GETTASKREQUEST'].fields_by_name['name']._loaded_options = None + _globals['_GETTASKREQUEST'].fields_by_name['name']._serialized_options = b'\340A\002' + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['parent']._loaded_options = None + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['parent']._serialized_options = b'\340A\002' + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['config_id']._loaded_options = None + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['config_id']._serialized_options = b'\340A\002' + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['config']._loaded_options = None + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST'].fields_by_name['config']._serialized_options = b'\340A\002' + _globals['_A2ASERVICE'].methods_by_name['SendMessage']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['SendMessage']._serialized_options = b'\202\323\344\223\002\025\"\020/v1/message:send:\001*' + _globals['_A2ASERVICE'].methods_by_name['SendStreamingMessage']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['SendStreamingMessage']._serialized_options = b'\202\323\344\223\002\027\"\022/v1/message:stream:\001*' + _globals['_A2ASERVICE'].methods_by_name['GetTask']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['GetTask']._serialized_options = b'\332A\004name\202\323\344\223\002\024\022\022/v1/{name=tasks/*}' + _globals['_A2ASERVICE'].methods_by_name['CancelTask']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['CancelTask']._serialized_options = b'\202\323\344\223\002\036\"\031/v1/{name=tasks/*}:cancel:\001*' + _globals['_A2ASERVICE'].methods_by_name['TaskSubscription']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['TaskSubscription']._serialized_options = b'\202\323\344\223\002\036\022\034/v1/{name=tasks/*}:subscribe' + _globals['_A2ASERVICE'].methods_by_name['CreateTaskPushNotificationConfig']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['CreateTaskPushNotificationConfig']._serialized_options = b'\332A\rparent,config\202\323\344\223\0026\",/v1/{parent=tasks/*/pushNotificationConfigs}:\006config' + _globals['_A2ASERVICE'].methods_by_name['GetTaskPushNotificationConfig']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['GetTaskPushNotificationConfig']._serialized_options = b'\332A\004name\202\323\344\223\002.\022,/v1/{name=tasks/*/pushNotificationConfigs/*}' + _globals['_A2ASERVICE'].methods_by_name['ListTaskPushNotificationConfig']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['ListTaskPushNotificationConfig']._serialized_options = b'\332A\006parent\202\323\344\223\002.\022,/v1/{parent=tasks/*}/pushNotificationConfigs' + _globals['_A2ASERVICE'].methods_by_name['GetAgentCard']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['GetAgentCard']._serialized_options = b'\202\323\344\223\002\n\022\010/v1/card' + _globals['_A2ASERVICE'].methods_by_name['DeleteTaskPushNotificationConfig']._loaded_options = None + _globals['_A2ASERVICE'].methods_by_name['DeleteTaskPushNotificationConfig']._serialized_options = b'\332A\004name\202\323\344\223\002.*,/v1/{name=tasks/*/pushNotificationConfigs/*}' + _globals['_TASKSTATE']._serialized_start=8071 + _globals['_TASKSTATE']._serialized_end=8321 + _globals['_ROLE']._serialized_start=8323 + _globals['_ROLE']._serialized_end=8382 + _globals['_SENDMESSAGECONFIGURATION']._serialized_start=207 + _globals['_SENDMESSAGECONFIGURATION']._serialized_end=429 + _globals['_TASK']._serialized_start=432 + _globals['_TASK']._serialized_end=673 + _globals['_TASKSTATUS']._serialized_start=676 + _globals['_TASKSTATUS']._serialized_end=829 + _globals['_PART']._serialized_start=832 + _globals['_PART']._serialized_end=1001 + _globals['_FILEPART']._serialized_start=1004 + _globals['_FILEPART']._serialized_end=1151 + _globals['_DATAPART']._serialized_start=1153 + _globals['_DATAPART']._serialized_end=1208 + _globals['_MESSAGE']._serialized_start=1211 + _globals['_MESSAGE']._serialized_end=1466 + _globals['_ARTIFACT']._serialized_start=1469 + _globals['_ARTIFACT']._serialized_end=1687 + _globals['_TASKSTATUSUPDATEEVENT']._serialized_start=1690 + _globals['_TASKSTATUSUPDATEEVENT']._serialized_end=1888 + _globals['_TASKARTIFACTUPDATEEVENT']._serialized_start=1891 + _globals['_TASKARTIFACTUPDATEEVENT']._serialized_end=2126 + _globals['_PUSHNOTIFICATIONCONFIG']._serialized_start=2129 + _globals['_PUSHNOTIFICATIONCONFIG']._serialized_end=2277 + _globals['_AUTHENTICATIONINFO']._serialized_start=2279 + _globals['_AUTHENTICATIONINFO']._serialized_end=2359 + _globals['_AGENTINTERFACE']._serialized_start=2361 + _globals['_AGENTINTERFACE']._serialized_end=2425 + _globals['_AGENTCARD']._serialized_start=2428 + _globals['_AGENTCARD']._serialized_end=3396 + _globals['_AGENTCARD_SECURITYSCHEMESENTRY']._serialized_start=3306 + _globals['_AGENTCARD_SECURITYSCHEMESENTRY']._serialized_end=3396 + _globals['_AGENTPROVIDER']._serialized_start=3398 + _globals['_AGENTPROVIDER']._serialized_end=3467 + _globals['_AGENTCAPABILITIES']._serialized_start=3470 + _globals['_AGENTCAPABILITIES']._serialized_end=3622 + _globals['_AGENTEXTENSION']._serialized_start=3625 + _globals['_AGENTEXTENSION']._serialized_end=3770 + _globals['_AGENTSKILL']._serialized_start=3773 + _globals['_AGENTSKILL']._serialized_end=4017 + _globals['_AGENTCARDSIGNATURE']._serialized_start=4020 + _globals['_AGENTCARDSIGNATURE']._serialized_end=4159 + _globals['_TASKPUSHNOTIFICATIONCONFIG']._serialized_start=4162 + _globals['_TASKPUSHNOTIFICATIONCONFIG']._serialized_end=4300 + _globals['_STRINGLIST']._serialized_start=4302 + _globals['_STRINGLIST']._serialized_end=4334 + _globals['_SECURITY']._serialized_start=4337 + _globals['_SECURITY']._serialized_end=4484 + _globals['_SECURITY_SCHEMESENTRY']._serialized_start=4406 + _globals['_SECURITY_SCHEMESENTRY']._serialized_end=4484 + _globals['_SECURITYSCHEME']._serialized_start=4487 + _globals['_SECURITYSCHEME']._serialized_end=4973 + _globals['_APIKEYSECURITYSCHEME']._serialized_start=4975 + _globals['_APIKEYSECURITYSCHEME']._serialized_end=5079 + _globals['_HTTPAUTHSECURITYSCHEME']._serialized_start=5081 + _globals['_HTTPAUTHSECURITYSCHEME']._serialized_end=5200 + _globals['_OAUTH2SECURITYSCHEME']._serialized_start=5203 + _globals['_OAUTH2SECURITYSCHEME']._serialized_end=5349 + _globals['_OPENIDCONNECTSECURITYSCHEME']._serialized_start=5351 + _globals['_OPENIDCONNECTSECURITYSCHEME']._serialized_end=5461 + _globals['_MUTUALTLSSECURITYSCHEME']._serialized_start=5463 + _globals['_MUTUALTLSSECURITYSCHEME']._serialized_end=5522 + _globals['_OAUTHFLOWS']._serialized_start=5525 + _globals['_OAUTHFLOWS']._serialized_end=5829 + _globals['_AUTHORIZATIONCODEOAUTHFLOW']._serialized_start=5832 + _globals['_AUTHORIZATIONCODEOAUTHFLOW']._serialized_end=6098 + _globals['_AUTHORIZATIONCODEOAUTHFLOW_SCOPESENTRY']._serialized_start=6041 + _globals['_AUTHORIZATIONCODEOAUTHFLOW_SCOPESENTRY']._serialized_end=6098 + _globals['_CLIENTCREDENTIALSOAUTHFLOW']._serialized_start=6101 + _globals['_CLIENTCREDENTIALSOAUTHFLOW']._serialized_end=6322 + _globals['_CLIENTCREDENTIALSOAUTHFLOW_SCOPESENTRY']._serialized_start=6041 + _globals['_CLIENTCREDENTIALSOAUTHFLOW_SCOPESENTRY']._serialized_end=6098 + _globals['_IMPLICITOAUTHFLOW']._serialized_start=6325 + _globals['_IMPLICITOAUTHFLOW']._serialized_end=6544 + _globals['_IMPLICITOAUTHFLOW_SCOPESENTRY']._serialized_start=6041 + _globals['_IMPLICITOAUTHFLOW_SCOPESENTRY']._serialized_end=6098 + _globals['_PASSWORDOAUTHFLOW']._serialized_start=6547 + _globals['_PASSWORDOAUTHFLOW']._serialized_end=6750 + _globals['_PASSWORDOAUTHFLOW_SCOPESENTRY']._serialized_start=6041 + _globals['_PASSWORDOAUTHFLOW_SCOPESENTRY']._serialized_end=6098 + _globals['_SENDMESSAGEREQUEST']._serialized_start=6753 + _globals['_SENDMESSAGEREQUEST']._serialized_end=6946 + _globals['_GETTASKREQUEST']._serialized_start=6948 + _globals['_GETTASKREQUEST']._serialized_end=7028 + _globals['_CANCELTASKREQUEST']._serialized_start=7030 + _globals['_CANCELTASKREQUEST']._serialized_end=7069 + _globals['_GETTASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_start=7071 + _globals['_GETTASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_end=7129 + _globals['_DELETETASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_start=7131 + _globals['_DELETETASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_end=7192 + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_start=7195 + _globals['_CREATETASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_end=7364 + _globals['_TASKSUBSCRIPTIONREQUEST']._serialized_start=7366 + _globals['_TASKSUBSCRIPTIONREQUEST']._serialized_end=7411 + _globals['_LISTTASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_start=7413 + _globals['_LISTTASKPUSHNOTIFICATIONCONFIGREQUEST']._serialized_end=7536 + _globals['_GETAGENTCARDREQUEST']._serialized_start=7538 + _globals['_GETAGENTCARDREQUEST']._serialized_end=7559 + _globals['_SENDMESSAGERESPONSE']._serialized_start=7561 + _globals['_SENDMESSAGERESPONSE']._serialized_end=7670 + _globals['_STREAMRESPONSE']._serialized_start=7673 + _globals['_STREAMRESPONSE']._serialized_end=7923 + _globals['_LISTTASKPUSHNOTIFICATIONCONFIGRESPONSE']._serialized_start=7926 + _globals['_LISTTASKPUSHNOTIFICATIONCONFIGRESPONSE']._serialized_end=8068 + _globals['_A2ASERVICE']._serialized_start=8385 + _globals['_A2ASERVICE']._serialized_end=9724 +# @@protoc_insertion_point(module_scope) diff --git a/src/a2a/compat/v0_3/a2a_v0_3_pb2.pyi b/src/a2a/compat/v0_3/a2a_v0_3_pb2.pyi new file mode 100644 index 000000000..06005e850 --- /dev/null +++ b/src/a2a/compat/v0_3/a2a_v0_3_pb2.pyi @@ -0,0 +1,574 @@ +import datetime + +from google.api import annotations_pb2 as _annotations_pb2 +from google.api import client_pb2 as _client_pb2 +from google.api import field_behavior_pb2 as _field_behavior_pb2 +from google.protobuf import empty_pb2 as _empty_pb2 +from google.protobuf import struct_pb2 as _struct_pb2 +from google.protobuf import timestamp_pb2 as _timestamp_pb2 +from google.protobuf.internal import containers as _containers +from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import message as _message +from collections.abc import Iterable as _Iterable, Mapping as _Mapping +from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union + +DESCRIPTOR: _descriptor.FileDescriptor + +class TaskState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + TASK_STATE_UNSPECIFIED: _ClassVar[TaskState] + TASK_STATE_SUBMITTED: _ClassVar[TaskState] + TASK_STATE_WORKING: _ClassVar[TaskState] + TASK_STATE_COMPLETED: _ClassVar[TaskState] + TASK_STATE_FAILED: _ClassVar[TaskState] + TASK_STATE_CANCELLED: _ClassVar[TaskState] + TASK_STATE_INPUT_REQUIRED: _ClassVar[TaskState] + TASK_STATE_REJECTED: _ClassVar[TaskState] + TASK_STATE_AUTH_REQUIRED: _ClassVar[TaskState] + +class Role(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): + __slots__ = () + ROLE_UNSPECIFIED: _ClassVar[Role] + ROLE_USER: _ClassVar[Role] + ROLE_AGENT: _ClassVar[Role] +TASK_STATE_UNSPECIFIED: TaskState +TASK_STATE_SUBMITTED: TaskState +TASK_STATE_WORKING: TaskState +TASK_STATE_COMPLETED: TaskState +TASK_STATE_FAILED: TaskState +TASK_STATE_CANCELLED: TaskState +TASK_STATE_INPUT_REQUIRED: TaskState +TASK_STATE_REJECTED: TaskState +TASK_STATE_AUTH_REQUIRED: TaskState +ROLE_UNSPECIFIED: Role +ROLE_USER: Role +ROLE_AGENT: Role + +class SendMessageConfiguration(_message.Message): + __slots__ = ("accepted_output_modes", "push_notification", "history_length", "blocking") + ACCEPTED_OUTPUT_MODES_FIELD_NUMBER: _ClassVar[int] + PUSH_NOTIFICATION_FIELD_NUMBER: _ClassVar[int] + HISTORY_LENGTH_FIELD_NUMBER: _ClassVar[int] + BLOCKING_FIELD_NUMBER: _ClassVar[int] + accepted_output_modes: _containers.RepeatedScalarFieldContainer[str] + push_notification: PushNotificationConfig + history_length: int + blocking: bool + def __init__(self, accepted_output_modes: _Optional[_Iterable[str]] = ..., push_notification: _Optional[_Union[PushNotificationConfig, _Mapping]] = ..., history_length: _Optional[int] = ..., blocking: _Optional[bool] = ...) -> None: ... + +class Task(_message.Message): + __slots__ = ("id", "context_id", "status", "artifacts", "history", "metadata") + ID_FIELD_NUMBER: _ClassVar[int] + CONTEXT_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + ARTIFACTS_FIELD_NUMBER: _ClassVar[int] + HISTORY_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + id: str + context_id: str + status: TaskStatus + artifacts: _containers.RepeatedCompositeFieldContainer[Artifact] + history: _containers.RepeatedCompositeFieldContainer[Message] + metadata: _struct_pb2.Struct + def __init__(self, id: _Optional[str] = ..., context_id: _Optional[str] = ..., status: _Optional[_Union[TaskStatus, _Mapping]] = ..., artifacts: _Optional[_Iterable[_Union[Artifact, _Mapping]]] = ..., history: _Optional[_Iterable[_Union[Message, _Mapping]]] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class TaskStatus(_message.Message): + __slots__ = ("state", "update", "timestamp") + STATE_FIELD_NUMBER: _ClassVar[int] + UPDATE_FIELD_NUMBER: _ClassVar[int] + TIMESTAMP_FIELD_NUMBER: _ClassVar[int] + state: TaskState + update: Message + timestamp: _timestamp_pb2.Timestamp + def __init__(self, state: _Optional[_Union[TaskState, str]] = ..., update: _Optional[_Union[Message, _Mapping]] = ..., timestamp: _Optional[_Union[datetime.datetime, _timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... + +class Part(_message.Message): + __slots__ = ("text", "file", "data", "metadata") + TEXT_FIELD_NUMBER: _ClassVar[int] + FILE_FIELD_NUMBER: _ClassVar[int] + DATA_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + text: str + file: FilePart + data: DataPart + metadata: _struct_pb2.Struct + def __init__(self, text: _Optional[str] = ..., file: _Optional[_Union[FilePart, _Mapping]] = ..., data: _Optional[_Union[DataPart, _Mapping]] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class FilePart(_message.Message): + __slots__ = ("file_with_uri", "file_with_bytes", "mime_type", "name") + FILE_WITH_URI_FIELD_NUMBER: _ClassVar[int] + FILE_WITH_BYTES_FIELD_NUMBER: _ClassVar[int] + MIME_TYPE_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + file_with_uri: str + file_with_bytes: bytes + mime_type: str + name: str + def __init__(self, file_with_uri: _Optional[str] = ..., file_with_bytes: _Optional[bytes] = ..., mime_type: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ... + +class DataPart(_message.Message): + __slots__ = ("data",) + DATA_FIELD_NUMBER: _ClassVar[int] + data: _struct_pb2.Struct + def __init__(self, data: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class Message(_message.Message): + __slots__ = ("message_id", "context_id", "task_id", "role", "content", "metadata", "extensions") + MESSAGE_ID_FIELD_NUMBER: _ClassVar[int] + CONTEXT_ID_FIELD_NUMBER: _ClassVar[int] + TASK_ID_FIELD_NUMBER: _ClassVar[int] + ROLE_FIELD_NUMBER: _ClassVar[int] + CONTENT_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + EXTENSIONS_FIELD_NUMBER: _ClassVar[int] + message_id: str + context_id: str + task_id: str + role: Role + content: _containers.RepeatedCompositeFieldContainer[Part] + metadata: _struct_pb2.Struct + extensions: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, message_id: _Optional[str] = ..., context_id: _Optional[str] = ..., task_id: _Optional[str] = ..., role: _Optional[_Union[Role, str]] = ..., content: _Optional[_Iterable[_Union[Part, _Mapping]]] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., extensions: _Optional[_Iterable[str]] = ...) -> None: ... + +class Artifact(_message.Message): + __slots__ = ("artifact_id", "name", "description", "parts", "metadata", "extensions") + ARTIFACT_ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + PARTS_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + EXTENSIONS_FIELD_NUMBER: _ClassVar[int] + artifact_id: str + name: str + description: str + parts: _containers.RepeatedCompositeFieldContainer[Part] + metadata: _struct_pb2.Struct + extensions: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, artifact_id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., parts: _Optional[_Iterable[_Union[Part, _Mapping]]] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., extensions: _Optional[_Iterable[str]] = ...) -> None: ... + +class TaskStatusUpdateEvent(_message.Message): + __slots__ = ("task_id", "context_id", "status", "final", "metadata") + TASK_ID_FIELD_NUMBER: _ClassVar[int] + CONTEXT_ID_FIELD_NUMBER: _ClassVar[int] + STATUS_FIELD_NUMBER: _ClassVar[int] + FINAL_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + task_id: str + context_id: str + status: TaskStatus + final: bool + metadata: _struct_pb2.Struct + def __init__(self, task_id: _Optional[str] = ..., context_id: _Optional[str] = ..., status: _Optional[_Union[TaskStatus, _Mapping]] = ..., final: _Optional[bool] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class TaskArtifactUpdateEvent(_message.Message): + __slots__ = ("task_id", "context_id", "artifact", "append", "last_chunk", "metadata") + TASK_ID_FIELD_NUMBER: _ClassVar[int] + CONTEXT_ID_FIELD_NUMBER: _ClassVar[int] + ARTIFACT_FIELD_NUMBER: _ClassVar[int] + APPEND_FIELD_NUMBER: _ClassVar[int] + LAST_CHUNK_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + task_id: str + context_id: str + artifact: Artifact + append: bool + last_chunk: bool + metadata: _struct_pb2.Struct + def __init__(self, task_id: _Optional[str] = ..., context_id: _Optional[str] = ..., artifact: _Optional[_Union[Artifact, _Mapping]] = ..., append: _Optional[bool] = ..., last_chunk: _Optional[bool] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class PushNotificationConfig(_message.Message): + __slots__ = ("id", "url", "token", "authentication") + ID_FIELD_NUMBER: _ClassVar[int] + URL_FIELD_NUMBER: _ClassVar[int] + TOKEN_FIELD_NUMBER: _ClassVar[int] + AUTHENTICATION_FIELD_NUMBER: _ClassVar[int] + id: str + url: str + token: str + authentication: AuthenticationInfo + def __init__(self, id: _Optional[str] = ..., url: _Optional[str] = ..., token: _Optional[str] = ..., authentication: _Optional[_Union[AuthenticationInfo, _Mapping]] = ...) -> None: ... + +class AuthenticationInfo(_message.Message): + __slots__ = ("schemes", "credentials") + SCHEMES_FIELD_NUMBER: _ClassVar[int] + CREDENTIALS_FIELD_NUMBER: _ClassVar[int] + schemes: _containers.RepeatedScalarFieldContainer[str] + credentials: str + def __init__(self, schemes: _Optional[_Iterable[str]] = ..., credentials: _Optional[str] = ...) -> None: ... + +class AgentInterface(_message.Message): + __slots__ = ("url", "transport") + URL_FIELD_NUMBER: _ClassVar[int] + TRANSPORT_FIELD_NUMBER: _ClassVar[int] + url: str + transport: str + def __init__(self, url: _Optional[str] = ..., transport: _Optional[str] = ...) -> None: ... + +class AgentCard(_message.Message): + __slots__ = ("protocol_version", "name", "description", "url", "preferred_transport", "additional_interfaces", "provider", "version", "documentation_url", "capabilities", "security_schemes", "security", "default_input_modes", "default_output_modes", "skills", "supports_authenticated_extended_card", "signatures", "icon_url") + class SecuritySchemesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: SecurityScheme + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[SecurityScheme, _Mapping]] = ...) -> None: ... + PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + URL_FIELD_NUMBER: _ClassVar[int] + PREFERRED_TRANSPORT_FIELD_NUMBER: _ClassVar[int] + ADDITIONAL_INTERFACES_FIELD_NUMBER: _ClassVar[int] + PROVIDER_FIELD_NUMBER: _ClassVar[int] + VERSION_FIELD_NUMBER: _ClassVar[int] + DOCUMENTATION_URL_FIELD_NUMBER: _ClassVar[int] + CAPABILITIES_FIELD_NUMBER: _ClassVar[int] + SECURITY_SCHEMES_FIELD_NUMBER: _ClassVar[int] + SECURITY_FIELD_NUMBER: _ClassVar[int] + DEFAULT_INPUT_MODES_FIELD_NUMBER: _ClassVar[int] + DEFAULT_OUTPUT_MODES_FIELD_NUMBER: _ClassVar[int] + SKILLS_FIELD_NUMBER: _ClassVar[int] + SUPPORTS_AUTHENTICATED_EXTENDED_CARD_FIELD_NUMBER: _ClassVar[int] + SIGNATURES_FIELD_NUMBER: _ClassVar[int] + ICON_URL_FIELD_NUMBER: _ClassVar[int] + protocol_version: str + name: str + description: str + url: str + preferred_transport: str + additional_interfaces: _containers.RepeatedCompositeFieldContainer[AgentInterface] + provider: AgentProvider + version: str + documentation_url: str + capabilities: AgentCapabilities + security_schemes: _containers.MessageMap[str, SecurityScheme] + security: _containers.RepeatedCompositeFieldContainer[Security] + default_input_modes: _containers.RepeatedScalarFieldContainer[str] + default_output_modes: _containers.RepeatedScalarFieldContainer[str] + skills: _containers.RepeatedCompositeFieldContainer[AgentSkill] + supports_authenticated_extended_card: bool + signatures: _containers.RepeatedCompositeFieldContainer[AgentCardSignature] + icon_url: str + def __init__(self, protocol_version: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., url: _Optional[str] = ..., preferred_transport: _Optional[str] = ..., additional_interfaces: _Optional[_Iterable[_Union[AgentInterface, _Mapping]]] = ..., provider: _Optional[_Union[AgentProvider, _Mapping]] = ..., version: _Optional[str] = ..., documentation_url: _Optional[str] = ..., capabilities: _Optional[_Union[AgentCapabilities, _Mapping]] = ..., security_schemes: _Optional[_Mapping[str, SecurityScheme]] = ..., security: _Optional[_Iterable[_Union[Security, _Mapping]]] = ..., default_input_modes: _Optional[_Iterable[str]] = ..., default_output_modes: _Optional[_Iterable[str]] = ..., skills: _Optional[_Iterable[_Union[AgentSkill, _Mapping]]] = ..., supports_authenticated_extended_card: _Optional[bool] = ..., signatures: _Optional[_Iterable[_Union[AgentCardSignature, _Mapping]]] = ..., icon_url: _Optional[str] = ...) -> None: ... + +class AgentProvider(_message.Message): + __slots__ = ("url", "organization") + URL_FIELD_NUMBER: _ClassVar[int] + ORGANIZATION_FIELD_NUMBER: _ClassVar[int] + url: str + organization: str + def __init__(self, url: _Optional[str] = ..., organization: _Optional[str] = ...) -> None: ... + +class AgentCapabilities(_message.Message): + __slots__ = ("streaming", "push_notifications", "extensions") + STREAMING_FIELD_NUMBER: _ClassVar[int] + PUSH_NOTIFICATIONS_FIELD_NUMBER: _ClassVar[int] + EXTENSIONS_FIELD_NUMBER: _ClassVar[int] + streaming: bool + push_notifications: bool + extensions: _containers.RepeatedCompositeFieldContainer[AgentExtension] + def __init__(self, streaming: _Optional[bool] = ..., push_notifications: _Optional[bool] = ..., extensions: _Optional[_Iterable[_Union[AgentExtension, _Mapping]]] = ...) -> None: ... + +class AgentExtension(_message.Message): + __slots__ = ("uri", "description", "required", "params") + URI_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + REQUIRED_FIELD_NUMBER: _ClassVar[int] + PARAMS_FIELD_NUMBER: _ClassVar[int] + uri: str + description: str + required: bool + params: _struct_pb2.Struct + def __init__(self, uri: _Optional[str] = ..., description: _Optional[str] = ..., required: _Optional[bool] = ..., params: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class AgentSkill(_message.Message): + __slots__ = ("id", "name", "description", "tags", "examples", "input_modes", "output_modes", "security") + ID_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + TAGS_FIELD_NUMBER: _ClassVar[int] + EXAMPLES_FIELD_NUMBER: _ClassVar[int] + INPUT_MODES_FIELD_NUMBER: _ClassVar[int] + OUTPUT_MODES_FIELD_NUMBER: _ClassVar[int] + SECURITY_FIELD_NUMBER: _ClassVar[int] + id: str + name: str + description: str + tags: _containers.RepeatedScalarFieldContainer[str] + examples: _containers.RepeatedScalarFieldContainer[str] + input_modes: _containers.RepeatedScalarFieldContainer[str] + output_modes: _containers.RepeatedScalarFieldContainer[str] + security: _containers.RepeatedCompositeFieldContainer[Security] + def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., tags: _Optional[_Iterable[str]] = ..., examples: _Optional[_Iterable[str]] = ..., input_modes: _Optional[_Iterable[str]] = ..., output_modes: _Optional[_Iterable[str]] = ..., security: _Optional[_Iterable[_Union[Security, _Mapping]]] = ...) -> None: ... + +class AgentCardSignature(_message.Message): + __slots__ = ("protected", "signature", "header") + PROTECTED_FIELD_NUMBER: _ClassVar[int] + SIGNATURE_FIELD_NUMBER: _ClassVar[int] + HEADER_FIELD_NUMBER: _ClassVar[int] + protected: str + signature: str + header: _struct_pb2.Struct + def __init__(self, protected: _Optional[str] = ..., signature: _Optional[str] = ..., header: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class TaskPushNotificationConfig(_message.Message): + __slots__ = ("name", "push_notification_config") + NAME_FIELD_NUMBER: _ClassVar[int] + PUSH_NOTIFICATION_CONFIG_FIELD_NUMBER: _ClassVar[int] + name: str + push_notification_config: PushNotificationConfig + def __init__(self, name: _Optional[str] = ..., push_notification_config: _Optional[_Union[PushNotificationConfig, _Mapping]] = ...) -> None: ... + +class StringList(_message.Message): + __slots__ = ("list",) + LIST_FIELD_NUMBER: _ClassVar[int] + list: _containers.RepeatedScalarFieldContainer[str] + def __init__(self, list: _Optional[_Iterable[str]] = ...) -> None: ... + +class Security(_message.Message): + __slots__ = ("schemes",) + class SchemesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: StringList + def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[StringList, _Mapping]] = ...) -> None: ... + SCHEMES_FIELD_NUMBER: _ClassVar[int] + schemes: _containers.MessageMap[str, StringList] + def __init__(self, schemes: _Optional[_Mapping[str, StringList]] = ...) -> None: ... + +class SecurityScheme(_message.Message): + __slots__ = ("api_key_security_scheme", "http_auth_security_scheme", "oauth2_security_scheme", "open_id_connect_security_scheme", "mtls_security_scheme") + API_KEY_SECURITY_SCHEME_FIELD_NUMBER: _ClassVar[int] + HTTP_AUTH_SECURITY_SCHEME_FIELD_NUMBER: _ClassVar[int] + OAUTH2_SECURITY_SCHEME_FIELD_NUMBER: _ClassVar[int] + OPEN_ID_CONNECT_SECURITY_SCHEME_FIELD_NUMBER: _ClassVar[int] + MTLS_SECURITY_SCHEME_FIELD_NUMBER: _ClassVar[int] + api_key_security_scheme: APIKeySecurityScheme + http_auth_security_scheme: HTTPAuthSecurityScheme + oauth2_security_scheme: OAuth2SecurityScheme + open_id_connect_security_scheme: OpenIdConnectSecurityScheme + mtls_security_scheme: MutualTlsSecurityScheme + def __init__(self, api_key_security_scheme: _Optional[_Union[APIKeySecurityScheme, _Mapping]] = ..., http_auth_security_scheme: _Optional[_Union[HTTPAuthSecurityScheme, _Mapping]] = ..., oauth2_security_scheme: _Optional[_Union[OAuth2SecurityScheme, _Mapping]] = ..., open_id_connect_security_scheme: _Optional[_Union[OpenIdConnectSecurityScheme, _Mapping]] = ..., mtls_security_scheme: _Optional[_Union[MutualTlsSecurityScheme, _Mapping]] = ...) -> None: ... + +class APIKeySecurityScheme(_message.Message): + __slots__ = ("description", "location", "name") + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + LOCATION_FIELD_NUMBER: _ClassVar[int] + NAME_FIELD_NUMBER: _ClassVar[int] + description: str + location: str + name: str + def __init__(self, description: _Optional[str] = ..., location: _Optional[str] = ..., name: _Optional[str] = ...) -> None: ... + +class HTTPAuthSecurityScheme(_message.Message): + __slots__ = ("description", "scheme", "bearer_format") + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + SCHEME_FIELD_NUMBER: _ClassVar[int] + BEARER_FORMAT_FIELD_NUMBER: _ClassVar[int] + description: str + scheme: str + bearer_format: str + def __init__(self, description: _Optional[str] = ..., scheme: _Optional[str] = ..., bearer_format: _Optional[str] = ...) -> None: ... + +class OAuth2SecurityScheme(_message.Message): + __slots__ = ("description", "flows", "oauth2_metadata_url") + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + FLOWS_FIELD_NUMBER: _ClassVar[int] + OAUTH2_METADATA_URL_FIELD_NUMBER: _ClassVar[int] + description: str + flows: OAuthFlows + oauth2_metadata_url: str + def __init__(self, description: _Optional[str] = ..., flows: _Optional[_Union[OAuthFlows, _Mapping]] = ..., oauth2_metadata_url: _Optional[str] = ...) -> None: ... + +class OpenIdConnectSecurityScheme(_message.Message): + __slots__ = ("description", "open_id_connect_url") + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + OPEN_ID_CONNECT_URL_FIELD_NUMBER: _ClassVar[int] + description: str + open_id_connect_url: str + def __init__(self, description: _Optional[str] = ..., open_id_connect_url: _Optional[str] = ...) -> None: ... + +class MutualTlsSecurityScheme(_message.Message): + __slots__ = ("description",) + DESCRIPTION_FIELD_NUMBER: _ClassVar[int] + description: str + def __init__(self, description: _Optional[str] = ...) -> None: ... + +class OAuthFlows(_message.Message): + __slots__ = ("authorization_code", "client_credentials", "implicit", "password") + AUTHORIZATION_CODE_FIELD_NUMBER: _ClassVar[int] + CLIENT_CREDENTIALS_FIELD_NUMBER: _ClassVar[int] + IMPLICIT_FIELD_NUMBER: _ClassVar[int] + PASSWORD_FIELD_NUMBER: _ClassVar[int] + authorization_code: AuthorizationCodeOAuthFlow + client_credentials: ClientCredentialsOAuthFlow + implicit: ImplicitOAuthFlow + password: PasswordOAuthFlow + def __init__(self, authorization_code: _Optional[_Union[AuthorizationCodeOAuthFlow, _Mapping]] = ..., client_credentials: _Optional[_Union[ClientCredentialsOAuthFlow, _Mapping]] = ..., implicit: _Optional[_Union[ImplicitOAuthFlow, _Mapping]] = ..., password: _Optional[_Union[PasswordOAuthFlow, _Mapping]] = ...) -> None: ... + +class AuthorizationCodeOAuthFlow(_message.Message): + __slots__ = ("authorization_url", "token_url", "refresh_url", "scopes") + class ScopesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + AUTHORIZATION_URL_FIELD_NUMBER: _ClassVar[int] + TOKEN_URL_FIELD_NUMBER: _ClassVar[int] + REFRESH_URL_FIELD_NUMBER: _ClassVar[int] + SCOPES_FIELD_NUMBER: _ClassVar[int] + authorization_url: str + token_url: str + refresh_url: str + scopes: _containers.ScalarMap[str, str] + def __init__(self, authorization_url: _Optional[str] = ..., token_url: _Optional[str] = ..., refresh_url: _Optional[str] = ..., scopes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class ClientCredentialsOAuthFlow(_message.Message): + __slots__ = ("token_url", "refresh_url", "scopes") + class ScopesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + TOKEN_URL_FIELD_NUMBER: _ClassVar[int] + REFRESH_URL_FIELD_NUMBER: _ClassVar[int] + SCOPES_FIELD_NUMBER: _ClassVar[int] + token_url: str + refresh_url: str + scopes: _containers.ScalarMap[str, str] + def __init__(self, token_url: _Optional[str] = ..., refresh_url: _Optional[str] = ..., scopes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class ImplicitOAuthFlow(_message.Message): + __slots__ = ("authorization_url", "refresh_url", "scopes") + class ScopesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + AUTHORIZATION_URL_FIELD_NUMBER: _ClassVar[int] + REFRESH_URL_FIELD_NUMBER: _ClassVar[int] + SCOPES_FIELD_NUMBER: _ClassVar[int] + authorization_url: str + refresh_url: str + scopes: _containers.ScalarMap[str, str] + def __init__(self, authorization_url: _Optional[str] = ..., refresh_url: _Optional[str] = ..., scopes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class PasswordOAuthFlow(_message.Message): + __slots__ = ("token_url", "refresh_url", "scopes") + class ScopesEntry(_message.Message): + __slots__ = ("key", "value") + KEY_FIELD_NUMBER: _ClassVar[int] + VALUE_FIELD_NUMBER: _ClassVar[int] + key: str + value: str + def __init__(self, key: _Optional[str] = ..., value: _Optional[str] = ...) -> None: ... + TOKEN_URL_FIELD_NUMBER: _ClassVar[int] + REFRESH_URL_FIELD_NUMBER: _ClassVar[int] + SCOPES_FIELD_NUMBER: _ClassVar[int] + token_url: str + refresh_url: str + scopes: _containers.ScalarMap[str, str] + def __init__(self, token_url: _Optional[str] = ..., refresh_url: _Optional[str] = ..., scopes: _Optional[_Mapping[str, str]] = ...) -> None: ... + +class SendMessageRequest(_message.Message): + __slots__ = ("request", "configuration", "metadata") + REQUEST_FIELD_NUMBER: _ClassVar[int] + CONFIGURATION_FIELD_NUMBER: _ClassVar[int] + METADATA_FIELD_NUMBER: _ClassVar[int] + request: Message + configuration: SendMessageConfiguration + metadata: _struct_pb2.Struct + def __init__(self, request: _Optional[_Union[Message, _Mapping]] = ..., configuration: _Optional[_Union[SendMessageConfiguration, _Mapping]] = ..., metadata: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ... + +class GetTaskRequest(_message.Message): + __slots__ = ("name", "history_length") + NAME_FIELD_NUMBER: _ClassVar[int] + HISTORY_LENGTH_FIELD_NUMBER: _ClassVar[int] + name: str + history_length: int + def __init__(self, name: _Optional[str] = ..., history_length: _Optional[int] = ...) -> None: ... + +class CancelTaskRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class GetTaskPushNotificationConfigRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class DeleteTaskPushNotificationConfigRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class CreateTaskPushNotificationConfigRequest(_message.Message): + __slots__ = ("parent", "config_id", "config") + PARENT_FIELD_NUMBER: _ClassVar[int] + CONFIG_ID_FIELD_NUMBER: _ClassVar[int] + CONFIG_FIELD_NUMBER: _ClassVar[int] + parent: str + config_id: str + config: TaskPushNotificationConfig + def __init__(self, parent: _Optional[str] = ..., config_id: _Optional[str] = ..., config: _Optional[_Union[TaskPushNotificationConfig, _Mapping]] = ...) -> None: ... + +class TaskSubscriptionRequest(_message.Message): + __slots__ = ("name",) + NAME_FIELD_NUMBER: _ClassVar[int] + name: str + def __init__(self, name: _Optional[str] = ...) -> None: ... + +class ListTaskPushNotificationConfigRequest(_message.Message): + __slots__ = ("parent", "page_size", "page_token") + PARENT_FIELD_NUMBER: _ClassVar[int] + PAGE_SIZE_FIELD_NUMBER: _ClassVar[int] + PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + parent: str + page_size: int + page_token: str + def __init__(self, parent: _Optional[str] = ..., page_size: _Optional[int] = ..., page_token: _Optional[str] = ...) -> None: ... + +class GetAgentCardRequest(_message.Message): + __slots__ = () + def __init__(self) -> None: ... + +class SendMessageResponse(_message.Message): + __slots__ = ("task", "msg") + TASK_FIELD_NUMBER: _ClassVar[int] + MSG_FIELD_NUMBER: _ClassVar[int] + task: Task + msg: Message + def __init__(self, task: _Optional[_Union[Task, _Mapping]] = ..., msg: _Optional[_Union[Message, _Mapping]] = ...) -> None: ... + +class StreamResponse(_message.Message): + __slots__ = ("task", "msg", "status_update", "artifact_update") + TASK_FIELD_NUMBER: _ClassVar[int] + MSG_FIELD_NUMBER: _ClassVar[int] + STATUS_UPDATE_FIELD_NUMBER: _ClassVar[int] + ARTIFACT_UPDATE_FIELD_NUMBER: _ClassVar[int] + task: Task + msg: Message + status_update: TaskStatusUpdateEvent + artifact_update: TaskArtifactUpdateEvent + def __init__(self, task: _Optional[_Union[Task, _Mapping]] = ..., msg: _Optional[_Union[Message, _Mapping]] = ..., status_update: _Optional[_Union[TaskStatusUpdateEvent, _Mapping]] = ..., artifact_update: _Optional[_Union[TaskArtifactUpdateEvent, _Mapping]] = ...) -> None: ... + +class ListTaskPushNotificationConfigResponse(_message.Message): + __slots__ = ("configs", "next_page_token") + CONFIGS_FIELD_NUMBER: _ClassVar[int] + NEXT_PAGE_TOKEN_FIELD_NUMBER: _ClassVar[int] + configs: _containers.RepeatedCompositeFieldContainer[TaskPushNotificationConfig] + next_page_token: str + def __init__(self, configs: _Optional[_Iterable[_Union[TaskPushNotificationConfig, _Mapping]]] = ..., next_page_token: _Optional[str] = ...) -> None: ... diff --git a/src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py b/src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py new file mode 100644 index 000000000..3bbd4dec7 --- /dev/null +++ b/src/a2a/compat/v0_3/a2a_v0_3_pb2_grpc.py @@ -0,0 +1,511 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + +from . import a2a_v0_3_pb2 as a2a__v0__3__pb2 +from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 + + +class A2AServiceStub(object): + """A2AService defines the gRPC version of the A2A protocol. This has a slightly + different shape than the JSONRPC version to better conform to AIP-127, + where appropriate. The nouns are AgentCard, Message, Task and + TaskPushNotificationConfig. + - Messages are not a standard resource so there is no get/delete/update/list + interface, only a send and stream custom methods. + - Tasks have a get interface and custom cancel and subscribe methods. + - TaskPushNotificationConfig are a resource whose parent is a task. + They have get, list and create methods. + - AgentCard is a static resource with only a get method. + """ + + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.SendMessage = channel.unary_unary( + '/a2a.v1.A2AService/SendMessage', + request_serializer=a2a__v0__3__pb2.SendMessageRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.SendMessageResponse.FromString, + _registered_method=True) + self.SendStreamingMessage = channel.unary_stream( + '/a2a.v1.A2AService/SendStreamingMessage', + request_serializer=a2a__v0__3__pb2.SendMessageRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.StreamResponse.FromString, + _registered_method=True) + self.GetTask = channel.unary_unary( + '/a2a.v1.A2AService/GetTask', + request_serializer=a2a__v0__3__pb2.GetTaskRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.Task.FromString, + _registered_method=True) + self.CancelTask = channel.unary_unary( + '/a2a.v1.A2AService/CancelTask', + request_serializer=a2a__v0__3__pb2.CancelTaskRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.Task.FromString, + _registered_method=True) + self.TaskSubscription = channel.unary_stream( + '/a2a.v1.A2AService/TaskSubscription', + request_serializer=a2a__v0__3__pb2.TaskSubscriptionRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.StreamResponse.FromString, + _registered_method=True) + self.CreateTaskPushNotificationConfig = channel.unary_unary( + '/a2a.v1.A2AService/CreateTaskPushNotificationConfig', + request_serializer=a2a__v0__3__pb2.CreateTaskPushNotificationConfigRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.TaskPushNotificationConfig.FromString, + _registered_method=True) + self.GetTaskPushNotificationConfig = channel.unary_unary( + '/a2a.v1.A2AService/GetTaskPushNotificationConfig', + request_serializer=a2a__v0__3__pb2.GetTaskPushNotificationConfigRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.TaskPushNotificationConfig.FromString, + _registered_method=True) + self.ListTaskPushNotificationConfig = channel.unary_unary( + '/a2a.v1.A2AService/ListTaskPushNotificationConfig', + request_serializer=a2a__v0__3__pb2.ListTaskPushNotificationConfigRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.ListTaskPushNotificationConfigResponse.FromString, + _registered_method=True) + self.GetAgentCard = channel.unary_unary( + '/a2a.v1.A2AService/GetAgentCard', + request_serializer=a2a__v0__3__pb2.GetAgentCardRequest.SerializeToString, + response_deserializer=a2a__v0__3__pb2.AgentCard.FromString, + _registered_method=True) + self.DeleteTaskPushNotificationConfig = channel.unary_unary( + '/a2a.v1.A2AService/DeleteTaskPushNotificationConfig', + request_serializer=a2a__v0__3__pb2.DeleteTaskPushNotificationConfigRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + _registered_method=True) + + +class A2AServiceServicer(object): + """A2AService defines the gRPC version of the A2A protocol. This has a slightly + different shape than the JSONRPC version to better conform to AIP-127, + where appropriate. The nouns are AgentCard, Message, Task and + TaskPushNotificationConfig. + - Messages are not a standard resource so there is no get/delete/update/list + interface, only a send and stream custom methods. + - Tasks have a get interface and custom cancel and subscribe methods. + - TaskPushNotificationConfig are a resource whose parent is a task. + They have get, list and create methods. + - AgentCard is a static resource with only a get method. + """ + + def SendMessage(self, request, context): + """Send a message to the agent. This is a blocking call that will return the + task once it is completed, or a LRO if requested. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SendStreamingMessage(self, request, context): + """SendStreamingMessage is a streaming call that will return a stream of + task update events until the Task is in an interrupted or terminal state. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTask(self, request, context): + """Get the current state of a task from the agent. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CancelTask(self, request, context): + """Cancel a task from the agent. If supported one should expect no + more task updates for the task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TaskSubscription(self, request, context): + """TaskSubscription is a streaming call that will return a stream of task + update events. This attaches the stream to an existing in process task. + If the task is complete the stream will return the completed task (like + GetTask) and close the stream. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateTaskPushNotificationConfig(self, request, context): + """Set a push notification config for a task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetTaskPushNotificationConfig(self, request, context): + """Get a push notification config for a task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListTaskPushNotificationConfig(self, request, context): + """Get a list of push notifications configured for a task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAgentCard(self, request, context): + """GetAgentCard returns the agent card for the agent. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteTaskPushNotificationConfig(self, request, context): + """Delete a push notification config for a task. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + +def add_A2AServiceServicer_to_server(servicer, server): + rpc_method_handlers = { + 'SendMessage': grpc.unary_unary_rpc_method_handler( + servicer.SendMessage, + request_deserializer=a2a__v0__3__pb2.SendMessageRequest.FromString, + response_serializer=a2a__v0__3__pb2.SendMessageResponse.SerializeToString, + ), + 'SendStreamingMessage': grpc.unary_stream_rpc_method_handler( + servicer.SendStreamingMessage, + request_deserializer=a2a__v0__3__pb2.SendMessageRequest.FromString, + response_serializer=a2a__v0__3__pb2.StreamResponse.SerializeToString, + ), + 'GetTask': grpc.unary_unary_rpc_method_handler( + servicer.GetTask, + request_deserializer=a2a__v0__3__pb2.GetTaskRequest.FromString, + response_serializer=a2a__v0__3__pb2.Task.SerializeToString, + ), + 'CancelTask': grpc.unary_unary_rpc_method_handler( + servicer.CancelTask, + request_deserializer=a2a__v0__3__pb2.CancelTaskRequest.FromString, + response_serializer=a2a__v0__3__pb2.Task.SerializeToString, + ), + 'TaskSubscription': grpc.unary_stream_rpc_method_handler( + servicer.TaskSubscription, + request_deserializer=a2a__v0__3__pb2.TaskSubscriptionRequest.FromString, + response_serializer=a2a__v0__3__pb2.StreamResponse.SerializeToString, + ), + 'CreateTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler( + servicer.CreateTaskPushNotificationConfig, + request_deserializer=a2a__v0__3__pb2.CreateTaskPushNotificationConfigRequest.FromString, + response_serializer=a2a__v0__3__pb2.TaskPushNotificationConfig.SerializeToString, + ), + 'GetTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler( + servicer.GetTaskPushNotificationConfig, + request_deserializer=a2a__v0__3__pb2.GetTaskPushNotificationConfigRequest.FromString, + response_serializer=a2a__v0__3__pb2.TaskPushNotificationConfig.SerializeToString, + ), + 'ListTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler( + servicer.ListTaskPushNotificationConfig, + request_deserializer=a2a__v0__3__pb2.ListTaskPushNotificationConfigRequest.FromString, + response_serializer=a2a__v0__3__pb2.ListTaskPushNotificationConfigResponse.SerializeToString, + ), + 'GetAgentCard': grpc.unary_unary_rpc_method_handler( + servicer.GetAgentCard, + request_deserializer=a2a__v0__3__pb2.GetAgentCardRequest.FromString, + response_serializer=a2a__v0__3__pb2.AgentCard.SerializeToString, + ), + 'DeleteTaskPushNotificationConfig': grpc.unary_unary_rpc_method_handler( + servicer.DeleteTaskPushNotificationConfig, + request_deserializer=a2a__v0__3__pb2.DeleteTaskPushNotificationConfigRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'a2a.v1.A2AService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers('a2a.v1.A2AService', rpc_method_handlers) + + + # This class is part of an EXPERIMENTAL API. +class A2AService(object): + """A2AService defines the gRPC version of the A2A protocol. This has a slightly + different shape than the JSONRPC version to better conform to AIP-127, + where appropriate. The nouns are AgentCard, Message, Task and + TaskPushNotificationConfig. + - Messages are not a standard resource so there is no get/delete/update/list + interface, only a send and stream custom methods. + - Tasks have a get interface and custom cancel and subscribe methods. + - TaskPushNotificationConfig are a resource whose parent is a task. + They have get, list and create methods. + - AgentCard is a static resource with only a get method. + """ + + @staticmethod + def SendMessage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/SendMessage', + a2a__v0__3__pb2.SendMessageRequest.SerializeToString, + a2a__v0__3__pb2.SendMessageResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def SendStreamingMessage(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/a2a.v1.A2AService/SendStreamingMessage', + a2a__v0__3__pb2.SendMessageRequest.SerializeToString, + a2a__v0__3__pb2.StreamResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetTask(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/GetTask', + a2a__v0__3__pb2.GetTaskRequest.SerializeToString, + a2a__v0__3__pb2.Task.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CancelTask(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/CancelTask', + a2a__v0__3__pb2.CancelTaskRequest.SerializeToString, + a2a__v0__3__pb2.Task.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def TaskSubscription(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream( + request, + target, + '/a2a.v1.A2AService/TaskSubscription', + a2a__v0__3__pb2.TaskSubscriptionRequest.SerializeToString, + a2a__v0__3__pb2.StreamResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def CreateTaskPushNotificationConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/CreateTaskPushNotificationConfig', + a2a__v0__3__pb2.CreateTaskPushNotificationConfigRequest.SerializeToString, + a2a__v0__3__pb2.TaskPushNotificationConfig.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetTaskPushNotificationConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/GetTaskPushNotificationConfig', + a2a__v0__3__pb2.GetTaskPushNotificationConfigRequest.SerializeToString, + a2a__v0__3__pb2.TaskPushNotificationConfig.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def ListTaskPushNotificationConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/ListTaskPushNotificationConfig', + a2a__v0__3__pb2.ListTaskPushNotificationConfigRequest.SerializeToString, + a2a__v0__3__pb2.ListTaskPushNotificationConfigResponse.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def GetAgentCard(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/GetAgentCard', + a2a__v0__3__pb2.GetAgentCardRequest.SerializeToString, + a2a__v0__3__pb2.AgentCard.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) + + @staticmethod + def DeleteTaskPushNotificationConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary( + request, + target, + '/a2a.v1.A2AService/DeleteTaskPushNotificationConfig', + a2a__v0__3__pb2.DeleteTaskPushNotificationConfigRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True) diff --git a/src/a2a/types/a2a.json b/src/a2a/types/a2a.json new file mode 100644 index 000000000..851f44a4d --- /dev/null +++ b/src/a2a/types/a2a.json @@ -0,0 +1,2266 @@ +{ + "swagger": "2.0", + "info": { + "title": "a2a.proto", + "version": "version not set" + }, + "tags": [ + { + "name": "A2AService" + } + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "paths": { + "/extendedAgentCard": { + "get": { + "summary": "Gets the extended agent card for the authenticated agent.", + "operationId": "A2AService_GetExtendedAgentCard", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AgentCard" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/message:send": { + "post": { + "summary": "Sends a message to an agent.", + "operationId": "A2AService_SendMessage", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SendMessageResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "Represents a request for the `SendMessage` method.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SendMessageRequest" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/message:stream": { + "post": { + "summary": "Sends a streaming message to an agent, allowing for real-time interaction and status updates.\nStreaming version of `SendMessage`", + "operationId": "A2AService_SendStreamingMessage", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1StreamResponse" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1StreamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "body", + "description": "Represents a request for the `SendMessage` method.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1SendMessageRequest" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks": { + "get": { + "summary": "Lists tasks that match the specified filter.", + "operationId": "A2AService_ListTasks", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTasksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "contextId", + "description": "Filter tasks by context ID to get tasks from a specific conversation or session.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status", + "description": "Filter tasks by their current status state.\n\n - TASK_STATE_UNSPECIFIED: The task is in an unknown or indeterminate state.\n - TASK_STATE_SUBMITTED: Indicates that a task has been successfully submitted and acknowledged.\n - TASK_STATE_WORKING: Indicates that a task is actively being processed by the agent.\n - TASK_STATE_COMPLETED: Indicates that a task has finished successfully. This is a terminal state.\n - TASK_STATE_FAILED: Indicates that a task has finished with an error. This is a terminal state.\n - TASK_STATE_CANCELED: Indicates that a task was canceled before completion. This is a terminal state.\n - TASK_STATE_INPUT_REQUIRED: Indicates that the agent requires additional user input to proceed. This is an interrupted state.\n - TASK_STATE_REJECTED: Indicates that the agent has decided to not perform the task.\nThis may be done during initial task creation or later once an agent\nhas determined it can't or won't proceed. This is a terminal state.\n - TASK_STATE_AUTH_REQUIRED: Indicates that authentication is required to proceed. This is an interrupted state.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "TASK_STATE_UNSPECIFIED", + "TASK_STATE_SUBMITTED", + "TASK_STATE_WORKING", + "TASK_STATE_COMPLETED", + "TASK_STATE_FAILED", + "TASK_STATE_CANCELED", + "TASK_STATE_INPUT_REQUIRED", + "TASK_STATE_REJECTED", + "TASK_STATE_AUTH_REQUIRED" + ], + "default": "TASK_STATE_UNSPECIFIED" + }, + { + "name": "pageSize", + "description": "The maximum number of tasks to return. The service may return fewer than this value.\nIf unspecified, at most 50 tasks will be returned.\nThe minimum value is 1.\nThe maximum value is 100.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token, received from a previous `ListTasks` call.\n`ListTasksResponse.next_page_token`.\nProvide this to retrieve the subsequent page.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "historyLength", + "description": "The maximum number of messages to include in each task's history.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "statusTimestampAfter", + "description": "Filter tasks which have a status updated after the provided timestamp in ISO 8601 format (e.g., \"2023-10-27T10:00:00Z\").\nOnly tasks with a status timestamp time greater than or equal to this value will be returned.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "includeArtifacts", + "description": "Whether to include artifacts in the returned tasks.\nDefaults to false to reduce payload size.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks/{id}": { + "get": { + "summary": "Gets the latest state of a task.", + "operationId": "A2AService_GetTask", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Task" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The resource ID of the task to retrieve.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "historyLength", + "description": "The maximum number of most recent messages from the task's history to retrieve. An\nunset value means the client does not impose any limit. A value of zero is\na request to not include any messages. The server MUST NOT return more\nmessages than the provided value, but MAY apply a lower limit.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks/{id}:cancel": { + "post": { + "summary": "Cancels a task in progress.", + "operationId": "A2AService_CancelTask", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Task" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The resource ID of the task to cancel.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceCancelTaskBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks/{id}:subscribe": { + "get": { + "summary": "Subscribes to task updates for tasks not in a terminal state.\nReturns `UnsupportedOperationError` if the task is already in a terminal state (completed, failed, canceled, rejected).", + "operationId": "A2AService_SubscribeToTask", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1StreamResponse" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1StreamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "description": "The resource ID of the task to subscribe to.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks/{taskId}/pushNotificationConfigs": { + "get": { + "summary": "Get a list of push notifications configured for a task.", + "operationId": "A2AService_ListTaskPushNotificationConfigs", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTaskPushNotificationConfigsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "pageSize", + "description": "The maximum number of configurations to return.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token received from a previous `ListTaskPushNotificationConfigsRequest` call.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + }, + "post": { + "summary": "Creates a push notification config for a task.", + "operationId": "A2AService_CreateTaskPushNotificationConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TaskPushNotificationConfig" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "taskId", + "description": "The ID of the task this configuration is associated with.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceCreateTaskPushNotificationConfigBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/tasks/{taskId}/pushNotificationConfigs/{id}": { + "get": { + "summary": "Gets a push notification config for a task.", + "operationId": "A2AService_GetTaskPushNotificationConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TaskPushNotificationConfig" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "id", + "description": "The resource ID of the configuration to retrieve.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + }, + "delete": { + "summary": "Deletes a push notification config for a task.", + "operationId": "A2AService_DeleteTaskPushNotificationConfig", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "id", + "description": "The resource ID of the configuration to delete.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/extendedAgentCard": { + "get": { + "summary": "Gets the extended agent card for the authenticated agent.", + "operationId": "A2AService_GetExtendedAgentCard2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1AgentCard" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/message:send": { + "post": { + "summary": "Sends a message to an agent.", + "operationId": "A2AService_SendMessage2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1SendMessageResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceSendMessageBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/message:stream": { + "post": { + "summary": "Sends a streaming message to an agent, allowing for real-time interaction and status updates.\nStreaming version of `SendMessage`", + "operationId": "A2AService_SendStreamingMessage2", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1StreamResponse" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1StreamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceSendStreamingMessageBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks": { + "get": { + "summary": "Lists tasks that match the specified filter.", + "operationId": "A2AService_ListTasks2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTasksResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "contextId", + "description": "Filter tasks by context ID to get tasks from a specific conversation or session.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "status", + "description": "Filter tasks by their current status state.\n\n - TASK_STATE_UNSPECIFIED: The task is in an unknown or indeterminate state.\n - TASK_STATE_SUBMITTED: Indicates that a task has been successfully submitted and acknowledged.\n - TASK_STATE_WORKING: Indicates that a task is actively being processed by the agent.\n - TASK_STATE_COMPLETED: Indicates that a task has finished successfully. This is a terminal state.\n - TASK_STATE_FAILED: Indicates that a task has finished with an error. This is a terminal state.\n - TASK_STATE_CANCELED: Indicates that a task was canceled before completion. This is a terminal state.\n - TASK_STATE_INPUT_REQUIRED: Indicates that the agent requires additional user input to proceed. This is an interrupted state.\n - TASK_STATE_REJECTED: Indicates that the agent has decided to not perform the task.\nThis may be done during initial task creation or later once an agent\nhas determined it can't or won't proceed. This is a terminal state.\n - TASK_STATE_AUTH_REQUIRED: Indicates that authentication is required to proceed. This is an interrupted state.", + "in": "query", + "required": false, + "type": "string", + "enum": [ + "TASK_STATE_UNSPECIFIED", + "TASK_STATE_SUBMITTED", + "TASK_STATE_WORKING", + "TASK_STATE_COMPLETED", + "TASK_STATE_FAILED", + "TASK_STATE_CANCELED", + "TASK_STATE_INPUT_REQUIRED", + "TASK_STATE_REJECTED", + "TASK_STATE_AUTH_REQUIRED" + ], + "default": "TASK_STATE_UNSPECIFIED" + }, + { + "name": "pageSize", + "description": "The maximum number of tasks to return. The service may return fewer than this value.\nIf unspecified, at most 50 tasks will be returned.\nThe minimum value is 1.\nThe maximum value is 100.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token, received from a previous `ListTasks` call.\n`ListTasksResponse.next_page_token`.\nProvide this to retrieve the subsequent page.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "historyLength", + "description": "The maximum number of messages to include in each task's history.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "statusTimestampAfter", + "description": "Filter tasks which have a status updated after the provided timestamp in ISO 8601 format (e.g., \"2023-10-27T10:00:00Z\").\nOnly tasks with a status timestamp time greater than or equal to this value will be returned.", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "includeArtifacts", + "description": "Whether to include artifacts in the returned tasks.\nDefaults to false to reduce payload size.", + "in": "query", + "required": false, + "type": "boolean" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks/{id}": { + "get": { + "summary": "Gets the latest state of a task.", + "operationId": "A2AService_GetTask2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Task" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "description": "The resource ID of the task to retrieve.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "historyLength", + "description": "The maximum number of most recent messages from the task's history to retrieve. An\nunset value means the client does not impose any limit. A value of zero is\na request to not include any messages. The server MUST NOT return more\nmessages than the provided value, but MAY apply a lower limit.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks/{id}:cancel": { + "post": { + "summary": "Cancels a task in progress.", + "operationId": "A2AService_CancelTask2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1Task" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "description": "The resource ID of the task to cancel.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceCancelTaskBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks/{id}:subscribe": { + "get": { + "summary": "Subscribes to task updates for tasks not in a terminal state.\nReturns `UnsupportedOperationError` if the task is already in a terminal state (completed, failed, canceled, rejected).", + "operationId": "A2AService_SubscribeToTask2", + "responses": { + "200": { + "description": "A successful response.(streaming responses)", + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/definitions/v1StreamResponse" + }, + "error": { + "$ref": "#/definitions/rpcStatus" + } + }, + "title": "Stream result of v1StreamResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "id", + "description": "The resource ID of the task to subscribe to.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks/{taskId}/pushNotificationConfigs": { + "get": { + "summary": "Get a list of push notifications configured for a task.", + "operationId": "A2AService_ListTaskPushNotificationConfigs2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1ListTaskPushNotificationConfigsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "pageSize", + "description": "The maximum number of configurations to return.", + "in": "query", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "pageToken", + "description": "A page token received from a previous `ListTaskPushNotificationConfigsRequest` call.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "A2AService" + ] + }, + "post": { + "summary": "Creates a push notification config for a task.", + "operationId": "A2AService_CreateTaskPushNotificationConfig2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TaskPushNotificationConfig" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskId", + "description": "The ID of the task this configuration is associated with.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/A2AServiceCreateTaskPushNotificationConfigBody" + } + } + ], + "tags": [ + "A2AService" + ] + } + }, + "/{tenant}/tasks/{taskId}/pushNotificationConfigs/{id}": { + "get": { + "summary": "Gets a push notification config for a task.", + "operationId": "A2AService_GetTaskPushNotificationConfig2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1TaskPushNotificationConfig" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "id", + "description": "The resource ID of the configuration to retrieve.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + } + ], + "tags": [ + "A2AService" + ] + }, + "delete": { + "summary": "Deletes a push notification config for a task.", + "operationId": "A2AService_DeleteTaskPushNotificationConfig2", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object", + "properties": {} + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "tenant", + "description": "Optional. Tenant ID, provided as a path parameter.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "taskId", + "description": "The parent task resource ID.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + }, + { + "name": "id", + "description": "The resource ID of the configuration to delete.", + "in": "path", + "required": true, + "type": "string", + "pattern": "[^/]+" + } + ], + "tags": [ + "A2AService" + ] + } + } + }, + "definitions": { + "A2AServiceCancelTaskBody": { + "type": "object", + "properties": { + "metadata": { + "type": "object", + "description": "A flexible key-value map for passing additional context or parameters." + } + }, + "description": "Represents a request for the `CancelTask` method." + }, + "A2AServiceCreateTaskPushNotificationConfigBody": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The push notification configuration details.\nA unique identifier (e.g. UUID) for this push notification configuration." + }, + "url": { + "type": "string", + "description": "The URL where the notification should be sent." + }, + "token": { + "type": "string", + "description": "A token unique for this task or session." + }, + "authentication": { + "$ref": "#/definitions/v1AuthenticationInfo", + "description": "Authentication information required to send the notification." + } + }, + "description": "A container associating a push notification configuration with a specific task.", + "required": [ + "url" + ] + }, + "A2AServiceSendMessageBody": { + "type": "object", + "properties": { + "message": { + "$ref": "#/definitions/v1Message", + "description": "The message to send to the agent." + }, + "configuration": { + "$ref": "#/definitions/v1SendMessageConfiguration", + "description": "Configuration for the send request." + }, + "metadata": { + "type": "object", + "description": "A flexible key-value map for passing additional context or parameters." + } + }, + "description": "Represents a request for the `SendMessage` method.", + "required": [ + "message" + ] + }, + "A2AServiceSendStreamingMessageBody": { + "type": "object", + "properties": { + "message": { + "$ref": "#/definitions/v1Message", + "description": "The message to send to the agent." + }, + "configuration": { + "$ref": "#/definitions/v1SendMessageConfiguration", + "description": "Configuration for the send request." + }, + "metadata": { + "type": "object", + "description": "A flexible key-value map for passing additional context or parameters." + } + }, + "description": "Represents a request for the `SendMessage` method.", + "required": [ + "message" + ] + }, + "protobufAny": { + "type": "object", + "properties": { + "@type": { + "type": "string" + } + }, + "additionalProperties": {} + }, + "protobufNullValue": { + "type": "string", + "enum": [ + "NULL_VALUE" + ], + "default": "NULL_VALUE", + "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." + }, + "rpcStatus": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + }, + "details": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/protobufAny" + } + } + } + }, + "v1APIKeySecurityScheme": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "An optional description for the security scheme." + }, + "location": { + "type": "string", + "description": "The location of the API key. Valid values are \"query\", \"header\", or \"cookie\"." + }, + "name": { + "type": "string", + "description": "The name of the header, query, or cookie parameter to be used." + } + }, + "description": "Defines a security scheme using an API key.", + "required": [ + "location", + "name" + ] + }, + "v1AgentCapabilities": { + "type": "object", + "properties": { + "streaming": { + "type": "boolean", + "description": "Indicates if the agent supports streaming responses." + }, + "pushNotifications": { + "type": "boolean", + "description": "Indicates if the agent supports sending push notifications for asynchronous task updates." + }, + "extensions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentExtension" + }, + "description": "A list of protocol extensions supported by the agent." + }, + "extendedAgentCard": { + "type": "boolean", + "description": "Indicates if the agent supports providing an extended agent card when authenticated." + } + }, + "description": "Defines optional capabilities supported by an agent." + }, + "v1AgentCard": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "A human readable name for the agent.\nExample: \"Recipe Agent\"" + }, + "description": { + "type": "string", + "title": "A human-readable description of the agent, assisting users and other agents\nin understanding its purpose.\nExample: \"Agent that helps users with recipes and cooking.\"" + }, + "supportedInterfaces": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentInterface" + }, + "description": "Ordered list of supported interfaces. The first entry is preferred." + }, + "provider": { + "$ref": "#/definitions/v1AgentProvider", + "description": "The service provider of the agent." + }, + "version": { + "type": "string", + "title": "The version of the agent.\nExample: \"1.0.0\"" + }, + "documentationUrl": { + "type": "string", + "description": "A URL providing additional documentation about the agent." + }, + "capabilities": { + "$ref": "#/definitions/v1AgentCapabilities", + "description": "A2A Capability set supported by the agent." + }, + "securitySchemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1SecurityScheme" + }, + "description": "The security scheme details used for authenticating with this agent." + }, + "securityRequirements": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1SecurityRequirement" + }, + "description": "Security requirements for contacting the agent." + }, + "defaultInputModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\nThe set of interaction modes that the agent supports across all skills.\nThis can be overridden per skill. Defined as media types." + }, + "defaultOutputModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The media types supported as outputs from this agent." + }, + "skills": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentSkill" + }, + "description": "Skills represent the abilities of an agent.\nIt is largely a descriptive concept but represents a more focused set of behaviors that the\nagent is likely to succeed at." + }, + "signatures": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1AgentCardSignature" + }, + "description": "JSON Web Signatures computed for this `AgentCard`." + }, + "iconUrl": { + "type": "string", + "description": "Optional. A URL to an icon for the agent." + } + }, + "title": "A self-describing manifest for an agent. It provides essential\nmetadata including the agent's identity, capabilities, skills, supported\ncommunication methods, and security requirements.\nNext ID: 20", + "required": [ + "name", + "description", + "supportedInterfaces", + "version", + "capabilities", + "defaultInputModes", + "defaultOutputModes", + "skills" + ] + }, + "v1AgentCardSignature": { + "type": "object", + "properties": { + "protected": { + "type": "string", + "description": "\nRequired. The protected JWS header for the signature. This is always a\nbase64url-encoded JSON object." + }, + "signature": { + "type": "string", + "description": "Required. The computed signature, base64url-encoded." + }, + "header": { + "type": "object", + "description": "The unprotected JWS header values." + } + }, + "description": "AgentCardSignature represents a JWS signature of an AgentCard.\nThis follows the JSON format of an RFC 7515 JSON Web Signature (JWS).", + "required": [ + "protected", + "signature" + ] + }, + "v1AgentExtension": { + "type": "object", + "properties": { + "uri": { + "type": "string", + "description": "The unique URI identifying the extension." + }, + "description": { + "type": "string", + "description": "A human-readable description of how this agent uses the extension." + }, + "required": { + "type": "boolean", + "description": "If true, the client must understand and comply with the extension's requirements." + }, + "params": { + "type": "object", + "description": "Optional. Extension-specific configuration parameters." + } + }, + "description": "A declaration of a protocol extension supported by an Agent." + }, + "v1AgentInterface": { + "type": "object", + "properties": { + "url": { + "type": "string", + "title": "The URL where this interface is available. Must be a valid absolute HTTPS URL in production.\nExample: \"https://api.example.com/a2a/v1\", \"https://grpc.example.com/a2a\"" + }, + "protocolBinding": { + "type": "string", + "description": "The protocol binding supported at this URL. This is an open form string, to be\neasily extended for other protocol bindings. The core ones officially\nsupported are `JSONRPC`, `GRPC` and `HTTP+JSON`." + }, + "tenant": { + "type": "string", + "description": "Tenant ID to be used in the request when calling the agent." + }, + "protocolVersion": { + "type": "string", + "title": "The version of the A2A protocol this interface exposes.\nUse the latest supported minor version per major version.\nExamples: \"0.3\", \"1.0\"" + } + }, + "description": "Declares a combination of a target URL, transport and protocol version for interacting with the agent.\nThis allows agents to expose the same functionality over multiple protocol binding mechanisms.", + "required": [ + "url", + "protocolBinding", + "protocolVersion" + ] + }, + "v1AgentProvider": { + "type": "object", + "properties": { + "url": { + "type": "string", + "title": "A URL for the agent provider's website or relevant documentation.\nExample: \"https://ai.google.dev\"" + }, + "organization": { + "type": "string", + "title": "The name of the agent provider's organization.\nExample: \"Google\"" + } + }, + "description": "Represents the service provider of an agent.", + "required": [ + "url", + "organization" + ] + }, + "v1AgentSkill": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the agent's skill." + }, + "name": { + "type": "string", + "description": "A human-readable name for the skill." + }, + "description": { + "type": "string", + "description": "A detailed description of the skill." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A set of keywords describing the skill's capabilities." + }, + "examples": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Example prompts or scenarios that this skill can handle." + }, + "inputModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of supported input media types for this skill, overriding the agent's defaults." + }, + "outputModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The set of supported output media types for this skill, overriding the agent's defaults." + }, + "securityRequirements": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1SecurityRequirement" + }, + "description": "Security schemes necessary for this skill." + } + }, + "description": "Represents a distinct capability or function that an agent can perform.", + "required": [ + "id", + "name", + "description", + "tags" + ] + }, + "v1Artifact": { + "type": "object", + "properties": { + "artifactId": { + "type": "string", + "description": "Unique identifier (e.g. UUID) for the artifact. It must be unique within a task." + }, + "name": { + "type": "string", + "description": "A human readable name for the artifact." + }, + "description": { + "type": "string", + "description": "Optional. A human readable description of the artifact." + }, + "parts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Part" + }, + "description": "The content of the artifact. Must contain at least one part." + }, + "metadata": { + "type": "object", + "description": "Optional. Metadata included with the artifact." + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The URIs of extensions that are present or contributed to this Artifact." + } + }, + "description": "Artifacts represent task outputs.", + "required": [ + "artifactId", + "parts" + ] + }, + "v1AuthenticationInfo": { + "type": "object", + "properties": { + "scheme": { + "type": "string", + "description": "HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).\nExamples: `Bearer`, `Basic`, `Digest`.\nScheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1)." + }, + "credentials": { + "type": "string", + "description": "Push Notification credentials. Format depends on the scheme (e.g., token for Bearer)." + } + }, + "description": "Defines authentication details, used for push notifications.", + "required": [ + "scheme" + ] + }, + "v1AuthorizationCodeOAuthFlow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "description": "The authorization URL to be used for this flow." + }, + "tokenUrl": { + "type": "string", + "description": "The token URL to be used for this flow." + }, + "refreshUrl": { + "type": "string", + "description": "The URL to be used for obtaining refresh tokens." + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme." + }, + "pkceRequired": { + "type": "boolean", + "description": "Indicates if PKCE (RFC 7636) is required for this flow.\nPKCE should always be used for public clients and is recommended for all clients." + } + }, + "description": "Defines configuration details for the OAuth 2.0 Authorization Code flow.", + "required": [ + "authorizationUrl", + "tokenUrl", + "scopes" + ] + }, + "v1ClientCredentialsOAuthFlow": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "description": "The token URL to be used for this flow." + }, + "refreshUrl": { + "type": "string", + "description": "The URL to be used for obtaining refresh tokens." + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme." + } + }, + "description": "Defines configuration details for the OAuth 2.0 Client Credentials flow.", + "required": [ + "tokenUrl", + "scopes" + ] + }, + "v1DeviceCodeOAuthFlow": { + "type": "object", + "properties": { + "deviceAuthorizationUrl": { + "type": "string", + "description": "The device authorization endpoint URL." + }, + "tokenUrl": { + "type": "string", + "description": "The token URL to be used for this flow." + }, + "refreshUrl": { + "type": "string", + "description": "The URL to be used for obtaining refresh tokens." + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme." + } + }, + "description": "Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628).\nThis flow is designed for input-constrained devices such as IoT devices,\nand CLI tools where the user authenticates on a separate device.", + "required": [ + "deviceAuthorizationUrl", + "tokenUrl", + "scopes" + ] + }, + "v1HTTPAuthSecurityScheme": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "An optional description for the security scheme." + }, + "scheme": { + "type": "string", + "description": "The name of the HTTP Authentication scheme to be used in the Authorization header,\nas defined in RFC7235 (e.g., \"Bearer\").\nThis value should be registered in the IANA Authentication Scheme registry." + }, + "bearerFormat": { + "type": "string", + "description": "A hint to the client to identify how the bearer token is formatted (e.g., \"JWT\").\nPrimarily for documentation purposes." + } + }, + "description": "Defines a security scheme using HTTP authentication.", + "required": [ + "scheme" + ] + }, + "v1ImplicitOAuthFlow": { + "type": "object", + "properties": { + "authorizationUrl": { + "type": "string", + "title": "The authorization URL to be used for this flow. This MUST be in the\nform of a URL. The OAuth2 standard requires the use of TLS" + }, + "refreshUrl": { + "type": "string", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the\nform of a URL. The OAuth2 standard requires the use of TLS." + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the\nscope name and a short description for it. The map MAY be empty." + } + }, + "description": "Deprecated: Use Authorization Code + PKCE instead." + }, + "v1ListTaskPushNotificationConfigsResponse": { + "type": "object", + "properties": { + "configs": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1TaskPushNotificationConfig" + }, + "description": "The list of push notification configurations." + }, + "nextPageToken": { + "type": "string", + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list." + } + }, + "description": "Represents a successful response for the `ListTaskPushNotificationConfigs`\nmethod." + }, + "v1ListTasksResponse": { + "type": "object", + "properties": { + "tasks": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Task" + }, + "description": "Array of tasks matching the specified criteria." + }, + "nextPageToken": { + "type": "string", + "description": "A token to retrieve the next page of results, or empty if there are no more results in the list." + }, + "pageSize": { + "type": "integer", + "format": "int32", + "description": "The page size used for this response." + }, + "totalSize": { + "type": "integer", + "format": "int32", + "description": "Total number of tasks available (before pagination)." + } + }, + "description": "Result object for `ListTasks` method containing an array of tasks and pagination information.", + "required": [ + "tasks", + "nextPageToken", + "pageSize", + "totalSize" + ] + }, + "v1Message": { + "type": "object", + "properties": { + "messageId": { + "type": "string", + "description": "The unique identifier (e.g. UUID) of the message. This is created by the message creator." + }, + "contextId": { + "type": "string", + "description": "Optional. The context id of the message. If set, the message will be associated with the given context." + }, + "taskId": { + "type": "string", + "description": "Optional. The task id of the message. If set, the message will be associated with the given task." + }, + "role": { + "$ref": "#/definitions/v1Role", + "description": "Identifies the sender of the message." + }, + "parts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Part" + }, + "description": "Parts is the container of the message content." + }, + "metadata": { + "type": "object", + "description": "Optional. Any metadata to provide along with the message." + }, + "extensions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The URIs of extensions that are present or contributed to this Message." + }, + "referenceTaskIds": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of task IDs that this message references for additional context." + } + }, + "description": "`Message` is one unit of communication between client and server. It can be\nassociated with a context and/or a task. For server messages, `context_id` must\nbe provided, and `task_id` only if a task was created. For client messages, both\nfields are optional, with the caveat that if both are provided, they have to\nmatch (the `context_id` has to be the one that is set on the task). If only\n`task_id` is provided, the server will infer `context_id` from it.", + "required": [ + "messageId", + "role", + "parts" + ] + }, + "v1MutualTlsSecurityScheme": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "An optional description for the security scheme." + } + }, + "description": "Defines a security scheme using mTLS authentication." + }, + "v1OAuth2SecurityScheme": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "An optional description for the security scheme." + }, + "flows": { + "$ref": "#/definitions/v1OAuthFlows", + "description": "An object containing configuration information for the supported OAuth 2.0 flows." + }, + "oauth2MetadataUrl": { + "type": "string", + "description": "URL to the OAuth2 authorization server metadata [RFC 8414](https://datatracker.ietf.org/doc/html/rfc8414).\nTLS is required." + } + }, + "description": "Defines a security scheme using OAuth 2.0.", + "required": [ + "flows" + ] + }, + "v1OAuthFlows": { + "type": "object", + "properties": { + "authorizationCode": { + "$ref": "#/definitions/v1AuthorizationCodeOAuthFlow", + "description": "Configuration for the OAuth Authorization Code flow." + }, + "clientCredentials": { + "$ref": "#/definitions/v1ClientCredentialsOAuthFlow", + "description": "Configuration for the OAuth Client Credentials flow." + }, + "implicit": { + "$ref": "#/definitions/v1ImplicitOAuthFlow", + "description": "Deprecated: Use Authorization Code + PKCE instead." + }, + "password": { + "$ref": "#/definitions/v1PasswordOAuthFlow", + "description": "Deprecated: Use Authorization Code + PKCE or Device Code." + }, + "deviceCode": { + "$ref": "#/definitions/v1DeviceCodeOAuthFlow", + "description": "Configuration for the OAuth Device Code flow." + } + }, + "description": "Defines the configuration for the supported OAuth 2.0 flows." + }, + "v1OpenIdConnectSecurityScheme": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "An optional description for the security scheme." + }, + "openIdConnectUrl": { + "type": "string", + "description": "The [OpenID Connect Discovery URL](https://openid.net/specs/openid-connect-discovery-1_0.html) for the OIDC provider's metadata." + } + }, + "description": "Defines a security scheme using OpenID Connect.", + "required": [ + "openIdConnectUrl" + ] + }, + "v1Part": { + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "The string content of the `text` part." + }, + "raw": { + "type": "string", + "format": "byte", + "description": "The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string." + }, + "url": { + "type": "string", + "description": "A `url` pointing to the file's content." + }, + "data": { + "description": "Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null)." + }, + "metadata": { + "type": "object", + "description": "Optional. metadata associated with this part." + }, + "filename": { + "type": "string", + "description": "An optional `filename` for the file (e.g., \"document.pdf\")." + }, + "mediaType": { + "type": "string", + "description": "The `media_type` (MIME type) of the part content (e.g., \"text/plain\", \"application/json\", \"image/png\").\nThis field is available for all part types." + } + }, + "description": "`Part` represents a container for a section of communication content.\nParts can be purely textual, some sort of file (image, video, etc) or\na structured data blob (i.e. JSON)." + }, + "v1PasswordOAuthFlow": { + "type": "object", + "properties": { + "tokenUrl": { + "type": "string", + "description": "The token URL to be used for this flow. This MUST be in the form of a URL.\nThe OAuth2 standard requires the use of TLS." + }, + "refreshUrl": { + "type": "string", + "description": "The URL to be used for obtaining refresh tokens. This MUST be in the\nform of a URL. The OAuth2 standard requires the use of TLS." + }, + "scopes": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "The available scopes for the OAuth2 security scheme. A map between the\nscope name and a short description for it. The map MAY be empty." + } + }, + "description": "Deprecated: Use Authorization Code + PKCE or Device Code." + }, + "v1Role": { + "type": "string", + "enum": [ + "ROLE_UNSPECIFIED", + "ROLE_USER", + "ROLE_AGENT" + ], + "default": "ROLE_UNSPECIFIED", + "description": "Defines the sender of a message in A2A protocol communication.\n\n - ROLE_UNSPECIFIED: The role is unspecified.\n - ROLE_USER: The message is from the client to the server.\n - ROLE_AGENT: The message is from the server to the client." + }, + "v1SecurityRequirement": { + "type": "object", + "properties": { + "schemes": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/v1StringList" + }, + "description": "A map of security schemes to the required scopes." + } + }, + "description": "Defines the security requirements for an agent." + }, + "v1SecurityScheme": { + "type": "object", + "properties": { + "apiKeySecurityScheme": { + "$ref": "#/definitions/v1APIKeySecurityScheme", + "description": "API key-based authentication." + }, + "httpAuthSecurityScheme": { + "$ref": "#/definitions/v1HTTPAuthSecurityScheme", + "description": "HTTP authentication (Basic, Bearer, etc.)." + }, + "oauth2SecurityScheme": { + "$ref": "#/definitions/v1OAuth2SecurityScheme", + "description": "OAuth 2.0 authentication." + }, + "openIdConnectSecurityScheme": { + "$ref": "#/definitions/v1OpenIdConnectSecurityScheme", + "description": "OpenID Connect authentication." + }, + "mtlsSecurityScheme": { + "$ref": "#/definitions/v1MutualTlsSecurityScheme", + "description": "Mutual TLS authentication." + } + }, + "title": "Defines a security scheme that can be used to secure an agent's endpoints.\nThis is a discriminated union type based on the OpenAPI 3.2 Security Scheme Object.\nSee: https://spec.openapis.org/oas/v3.2.0.html#security-scheme-object" + }, + "v1SendMessageConfiguration": { + "type": "object", + "properties": { + "acceptedOutputModes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of media types the client is prepared to accept for response parts.\nAgents SHOULD use this to tailor their output." + }, + "taskPushNotificationConfig": { + "$ref": "#/definitions/v1TaskPushNotificationConfig", + "description": "Configuration for the agent to send push notifications for task updates.\nTask id should be empty when sending this configuration in a `SendMessage` request." + }, + "historyLength": { + "type": "integer", + "format": "int32", + "description": "The maximum number of most recent messages from the task's history to retrieve in\nthe response. An unset value means the client does not impose any limit. A\nvalue of zero is a request to not include any messages. The server MUST NOT\nreturn more messages than the provided value, but MAY apply a lower limit." + }, + "returnImmediately": { + "type": "boolean", + "description": "If `true`, the operation returns immediately after creating the task,\neven if processing is still in progress.\nIf `false` (default), the operation MUST wait until the task reaches a\nterminal (`COMPLETED`, `FAILED`, `CANCELED`, `REJECTED`) or interrupted\n(`INPUT_REQUIRED`, `AUTH_REQUIRED`) state before returning." + } + }, + "description": "Configuration of a send message request." + }, + "v1SendMessageRequest": { + "type": "object", + "properties": { + "tenant": { + "type": "string", + "description": "Optional. Tenant ID, provided as a path parameter." + }, + "message": { + "$ref": "#/definitions/v1Message", + "description": "The message to send to the agent." + }, + "configuration": { + "$ref": "#/definitions/v1SendMessageConfiguration", + "description": "Configuration for the send request." + }, + "metadata": { + "type": "object", + "description": "A flexible key-value map for passing additional context or parameters." + } + }, + "description": "Represents a request for the `SendMessage` method.", + "required": [ + "message" + ] + }, + "v1SendMessageResponse": { + "type": "object", + "properties": { + "task": { + "$ref": "#/definitions/v1Task", + "description": "The task created or updated by the message." + }, + "message": { + "$ref": "#/definitions/v1Message", + "description": "A message from the agent." + } + }, + "description": "Represents the response for the `SendMessage` method." + }, + "v1StreamResponse": { + "type": "object", + "properties": { + "task": { + "$ref": "#/definitions/v1Task", + "description": "A Task object containing the current state of the task." + }, + "message": { + "$ref": "#/definitions/v1Message", + "description": "A Message object containing a message from the agent." + }, + "statusUpdate": { + "$ref": "#/definitions/v1TaskStatusUpdateEvent", + "description": "An event indicating a task status update." + }, + "artifactUpdate": { + "$ref": "#/definitions/v1TaskArtifactUpdateEvent", + "description": "An event indicating a task artifact update." + } + }, + "description": "A wrapper object used in streaming operations to encapsulate different types of response data." + }, + "v1StringList": { + "type": "object", + "properties": { + "list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The individual string values." + } + }, + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\nA list of strings." + }, + "v1Task": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier (e.g. UUID) for the task, generated by the server for a\nnew task." + }, + "contextId": { + "type": "string", + "description": "Unique identifier (e.g. UUID) for the contextual collection of interactions\n(tasks and messages)." + }, + "status": { + "$ref": "#/definitions/v1TaskStatus", + "description": "The current status of a `Task`, including `state` and a `message`." + }, + "artifacts": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Artifact" + }, + "description": "A set of output artifacts for a `Task`." + }, + "history": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1Message" + }, + "description": "protolint:disable REPEATED_FIELD_NAMES_PLURALIZED\nThe history of interactions from a `Task`." + }, + "metadata": { + "type": "object", + "description": "protolint:enable REPEATED_FIELD_NAMES_PLURALIZED\nA key/value object to store custom metadata about a task." + } + }, + "description": "`Task` is the core unit of action for A2A. It has a current status\nand when results are created for the task they are stored in the\nartifact. If there are multiple turns for a task, these are stored in\nhistory.", + "required": [ + "id", + "status" + ] + }, + "v1TaskArtifactUpdateEvent": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "description": "The ID of the task for this artifact." + }, + "contextId": { + "type": "string", + "description": "The ID of the context that this task belongs to." + }, + "artifact": { + "$ref": "#/definitions/v1Artifact", + "description": "The artifact that was generated or updated." + }, + "append": { + "type": "boolean", + "description": "If true, the content of this artifact should be appended to a previously\nsent artifact with the same ID." + }, + "lastChunk": { + "type": "boolean", + "description": "If true, this is the final chunk of the artifact." + }, + "metadata": { + "type": "object", + "description": "Optional. Metadata associated with the artifact update." + } + }, + "description": "A task delta where an artifact has been generated.", + "required": [ + "taskId", + "contextId", + "artifact" + ] + }, + "v1TaskPushNotificationConfig": { + "type": "object", + "properties": { + "tenant": { + "type": "string", + "description": "Optional. Tenant ID." + }, + "id": { + "type": "string", + "description": "The push notification configuration details.\nA unique identifier (e.g. UUID) for this push notification configuration." + }, + "taskId": { + "type": "string", + "description": "The ID of the task this configuration is associated with." + }, + "url": { + "type": "string", + "description": "The URL where the notification should be sent." + }, + "token": { + "type": "string", + "description": "A token unique for this task or session." + }, + "authentication": { + "$ref": "#/definitions/v1AuthenticationInfo", + "description": "Authentication information required to send the notification." + } + }, + "description": "A container associating a push notification configuration with a specific task.", + "required": [ + "url" + ] + }, + "v1TaskState": { + "type": "string", + "enum": [ + "TASK_STATE_UNSPECIFIED", + "TASK_STATE_SUBMITTED", + "TASK_STATE_WORKING", + "TASK_STATE_COMPLETED", + "TASK_STATE_FAILED", + "TASK_STATE_CANCELED", + "TASK_STATE_INPUT_REQUIRED", + "TASK_STATE_REJECTED", + "TASK_STATE_AUTH_REQUIRED" + ], + "default": "TASK_STATE_UNSPECIFIED", + "description": "Defines the possible lifecycle states of a `Task`.\n\n - TASK_STATE_UNSPECIFIED: The task is in an unknown or indeterminate state.\n - TASK_STATE_SUBMITTED: Indicates that a task has been successfully submitted and acknowledged.\n - TASK_STATE_WORKING: Indicates that a task is actively being processed by the agent.\n - TASK_STATE_COMPLETED: Indicates that a task has finished successfully. This is a terminal state.\n - TASK_STATE_FAILED: Indicates that a task has finished with an error. This is a terminal state.\n - TASK_STATE_CANCELED: Indicates that a task was canceled before completion. This is a terminal state.\n - TASK_STATE_INPUT_REQUIRED: Indicates that the agent requires additional user input to proceed. This is an interrupted state.\n - TASK_STATE_REJECTED: Indicates that the agent has decided to not perform the task.\nThis may be done during initial task creation or later once an agent\nhas determined it can't or won't proceed. This is a terminal state.\n - TASK_STATE_AUTH_REQUIRED: Indicates that authentication is required to proceed. This is an interrupted state." + }, + "v1TaskStatus": { + "type": "object", + "properties": { + "state": { + "$ref": "#/definitions/v1TaskState", + "description": "The current state of this task." + }, + "message": { + "$ref": "#/definitions/v1Message", + "description": "A message associated with the status." + }, + "timestamp": { + "type": "string", + "format": "date-time", + "title": "ISO 8601 Timestamp when the status was recorded.\nExample: \"2023-10-27T10:00:00Z\"" + } + }, + "title": "A container for the status of a task", + "required": [ + "state" + ] + }, + "v1TaskStatusUpdateEvent": { + "type": "object", + "properties": { + "taskId": { + "type": "string", + "description": "The ID of the task that has changed." + }, + "contextId": { + "type": "string", + "description": "The ID of the context that the task belongs to." + }, + "status": { + "$ref": "#/definitions/v1TaskStatus", + "description": "The new status of the task." + }, + "metadata": { + "type": "object", + "description": "Optional. Metadata associated with the task update." + } + }, + "description": "An event sent by the agent to notify the client of a change in a task's status.", + "required": [ + "taskId", + "contextId", + "status" + ] + } + } +}