Skip to content

Commit 2133d5b

Browse files
committed
add files
1 parent c81edae commit 2133d5b

3 files changed

Lines changed: 325 additions & 0 deletions

File tree

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,216 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from __future__ import annotations
17+
18+
from typing import MutableMapping, MutableSequence
19+
20+
import proto # type: ignore
21+
22+
__protobuf__ = proto.module(
23+
package="google.cloud.ces.v1",
24+
manifest={
25+
"AgentCard",
26+
"AgentInterface",
27+
"AgentSkill",
28+
"RemoteAgentTool",
29+
},
30+
)
31+
32+
33+
class AgentCard(proto.Message):
34+
r"""AgentCard conveys key information about a remote agent.
35+
It is a trimmed version of the AgentCard defined in the A2A
36+
protocol
37+
https://a2a-protocol.org/dev/specification/#441-agentcard
38+
39+
Attributes:
40+
name (str):
41+
Required. A human-readable name for the
42+
agent.
43+
description (str):
44+
Required. A description of the agent's domain
45+
of action/solution space.
46+
supported_interfaces (MutableSequence[google.cloud.ces_v1.types.AgentInterface]):
47+
Required. Ordered list of supported
48+
interfaces. The first entry is preferred.
49+
version (str):
50+
Required. The version of the agent.
51+
skills (MutableSequence[google.cloud.ces_v1.types.AgentSkill]):
52+
Required. Skills represent a unit of ability
53+
an agent can perform. This may somewhat abstract
54+
but represents a more focused set of actions
55+
that the agent is highly likely to succeed at.
56+
"""
57+
58+
name: str = proto.Field(
59+
proto.STRING,
60+
number=1,
61+
)
62+
description: str = proto.Field(
63+
proto.STRING,
64+
number=2,
65+
)
66+
supported_interfaces: MutableSequence["AgentInterface"] = proto.RepeatedField(
67+
proto.MESSAGE,
68+
number=3,
69+
message="AgentInterface",
70+
)
71+
version: str = proto.Field(
72+
proto.STRING,
73+
number=5,
74+
)
75+
skills: MutableSequence["AgentSkill"] = proto.RepeatedField(
76+
proto.MESSAGE,
77+
number=6,
78+
message="AgentSkill",
79+
)
80+
81+
82+
class AgentInterface(proto.Message):
83+
r"""Declares a combination of a target URL, transport and
84+
protocol version for interacting with the agent. This allows
85+
agents to expose the same functionality over multiple protocol
86+
binding mechanisms.
87+
88+
Attributes:
89+
url (str):
90+
Required. The URL where this interface is
91+
available. Must be a valid absolute HTTPS URL in
92+
production. Example:
93+
94+
"https://api.example.com/a2a/v1",
95+
"https://grpc.example.com/a2a".
96+
protocol_binding (str):
97+
Required. The protocol binding supported at this URL. This
98+
is an open form string, to be easily extended for other
99+
protocol bindings. The core ones officially supported are
100+
``JSONRPC``, ``GRPC`` and ``HTTP+JSON``.
101+
tenant (str):
102+
Tenant ID to be used in the request when
103+
calling the agent.
104+
protocol_version (str):
105+
Required. The version of the A2A protocol
106+
this interface exposes. Use the latest supported
107+
minor version per major version. Examples:
108+
"0.3", "1.0".
109+
"""
110+
111+
url: str = proto.Field(
112+
proto.STRING,
113+
number=1,
114+
)
115+
protocol_binding: str = proto.Field(
116+
proto.STRING,
117+
number=2,
118+
)
119+
tenant: str = proto.Field(
120+
proto.STRING,
121+
number=3,
122+
)
123+
protocol_version: str = proto.Field(
124+
proto.STRING,
125+
number=4,
126+
)
127+
128+
129+
class AgentSkill(proto.Message):
130+
r"""Represents a distinct capability or function that an agent
131+
can perform.
132+
133+
Attributes:
134+
id (str):
135+
Required. A unique identifier for the agent's
136+
skill.
137+
name (str):
138+
Required. A human-readable name for the
139+
skill.
140+
description (str):
141+
Required. A detailed description of the
142+
skill.
143+
tags (MutableSequence[str]):
144+
Required. A set of keywords describing the
145+
skill's capabilities.
146+
examples (MutableSequence[str]):
147+
Example prompts or scenarios that this skill
148+
can handle.
149+
input_modes (MutableSequence[str]):
150+
The set of supported input media types for
151+
this skill, overriding the agent's defaults.
152+
output_modes (MutableSequence[str]):
153+
The set of supported output media types for
154+
this skill, overriding the agent's defaults.
155+
"""
156+
157+
id: str = proto.Field(
158+
proto.STRING,
159+
number=1,
160+
)
161+
name: str = proto.Field(
162+
proto.STRING,
163+
number=2,
164+
)
165+
description: str = proto.Field(
166+
proto.STRING,
167+
number=3,
168+
)
169+
tags: MutableSequence[str] = proto.RepeatedField(
170+
proto.STRING,
171+
number=4,
172+
)
173+
examples: MutableSequence[str] = proto.RepeatedField(
174+
proto.STRING,
175+
number=5,
176+
)
177+
input_modes: MutableSequence[str] = proto.RepeatedField(
178+
proto.STRING,
179+
number=6,
180+
)
181+
output_modes: MutableSequence[str] = proto.RepeatedField(
182+
proto.STRING,
183+
number=7,
184+
)
185+
186+
187+
class RemoteAgentTool(proto.Message):
188+
r"""Represents a tool that allows the agent to call another
189+
remote agent.
190+
191+
Attributes:
192+
name (str):
193+
Required. The name of the tool.
194+
description (str):
195+
Required. The description of the tool.
196+
agent_card (google.cloud.ces_v1.types.AgentCard):
197+
Required. The agent card of the remote agent
198+
that this tool invokes.
199+
"""
200+
201+
name: str = proto.Field(
202+
proto.STRING,
203+
number=1,
204+
)
205+
description: str = proto.Field(
206+
proto.STRING,
207+
number=2,
208+
)
209+
agent_card: "AgentCard" = proto.Field(
210+
proto.MESSAGE,
211+
number=3,
212+
message="AgentCard",
213+
)
214+
215+
216+
__all__ = tuple(sorted(__protobuf__.manifest))
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2026 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
from __future__ import annotations
17+
18+
from typing import MutableMapping, MutableSequence
19+
20+
import google.protobuf.struct_pb2 as struct_pb2 # type: ignore
21+
import proto # type: ignore
22+
23+
from google.cloud.ces_v1.types import toolset_tool
24+
25+
__protobuf__ = proto.module(
26+
package="google.cloud.ces.v1",
27+
manifest={
28+
"MockedToolCall",
29+
},
30+
)
31+
32+
33+
class MockedToolCall(proto.Message):
34+
r"""A mocked tool call.
35+
36+
Expresses the target tool + a pattern to match against that
37+
tool's args / inputs. If the pattern matches, then the mock
38+
response will be returned.
39+
40+
This message has `oneof`_ fields (mutually exclusive fields).
41+
For each oneof, at most one member field can be set at the same time.
42+
Setting any member of the oneof automatically clears all other
43+
members.
44+
45+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
46+
47+
Attributes:
48+
tool_id (str):
49+
Optional. The name of the tool to mock. Format:
50+
``projects/{project}/locations/{location}/apps/{app}/tools/{tool}``
51+
52+
This field is a member of `oneof`_ ``tool_identifier``.
53+
toolset (google.cloud.ces_v1.types.ToolsetTool):
54+
Optional. The toolset to mock.
55+
56+
This field is a member of `oneof`_ ``tool_identifier``.
57+
tool (str):
58+
Optional. Deprecated. Use tool_identifier instead.
59+
expected_args_pattern (google.protobuf.struct_pb2.Struct):
60+
Required. A pattern to match against the args
61+
/ inputs of all dispatched tool calls. If the
62+
tool call inputs match this pattern, then mock
63+
output will be returned.
64+
mock_response (google.protobuf.struct_pb2.Struct):
65+
Optional. The mock response / output to
66+
return if the tool call args / inputs match the
67+
pattern.
68+
"""
69+
70+
tool_id: str = proto.Field(
71+
proto.STRING,
72+
number=4,
73+
oneof="tool_identifier",
74+
)
75+
toolset: toolset_tool.ToolsetTool = proto.Field(
76+
proto.MESSAGE,
77+
number=5,
78+
oneof="tool_identifier",
79+
message=toolset_tool.ToolsetTool,
80+
)
81+
tool: str = proto.Field(
82+
proto.STRING,
83+
number=1,
84+
)
85+
expected_args_pattern: struct_pb2.Struct = proto.Field(
86+
proto.MESSAGE,
87+
number=2,
88+
message=struct_pb2.Struct,
89+
)
90+
mock_response: struct_pb2.Struct = proto.Field(
91+
proto.MESSAGE,
92+
number=3,
93+
message=struct_pb2.Struct,
94+
)
95+
96+
97+
__all__ = tuple(sorted(__protobuf__.manifest))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# We use the constraints file for the latest Python version
2+
# (currently this file) to check that the latest
3+
# major versions of dependencies are supported in setup.py.
4+
# List all library dependencies and extras in this file.
5+
# Require the latest major version be installed for each dependency.
6+
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0",
7+
# Then this file should have google-cloud-foo>=1
8+
google-api-core>=2
9+
google-auth>=2
10+
grpcio>=1
11+
proto-plus>=1
12+
protobuf>=7

0 commit comments

Comments
 (0)