feat(agentregistry): add package foundation and REST transport#1122
Open
wolo-lab wants to merge 1 commit into
Open
feat(agentregistry): add package foundation and REST transport#1122wolo-lab wants to merge 1 commit into
wolo-lab wants to merge 1 commit into
Conversation
e6fe607 to
a0f3254
Compare
12ddefb to
016e6f5
Compare
Introduce the agentregistry package client foundation: Config/Client/New, an authenticated REST Transport to agentregistry.googleapis.com using Application Default Credentials with mTLS endpoint selection, a typed APIError, the service wire types and list options, and the resolution helpers (connectionURI, cleanName, transport-binding map) ported from adk-python for behavioral parity. Bug: 530514942
016e6f5 to
3ef6255
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
adk-go has no client for the Google Cloud Agent Registry
(
agentregistry.googleapis.com) — the governed catalog of A2A agents, MCPservers, and model endpoints. adk-python already ships one, so we need a Go
equivalent with matching behavior to discover and construct agents/toolsets from
the registry.
Solution:
Add the
agentregistrypackage foundation — everything the discoverymethods and the RemoteAgent/McpToolset factory helpers (follow-up PRs in this
stack) build on. This PR is additive: a new package, no changes to existing
public APIs.
Config,Client, andNew— ADC-authenticated bydefault, or a caller-supplied
*http.Client.Transporttoagentregistry.googleapis.com, resolving resource paths (absoluteprojects/...vs. parent-relative), setting thex-goog-user-projectquotaheader, and returning non-2xx responses as a typed
*APIError.Transportisan interface seam so alternative transports can back the same
Client.GOOGLE_API_USE_MTLS_ENDPOINT(
auto/always/never). Inauto, the mTLS endpoint is chosen only whenclient-cert use is opted in (
GOOGLE_API_USE_CLIENT_CERTIFICATE) and adefault client-certificate source is actually present on the machine —
matching adk-python /
google-auth(has_default_client_cert_source) andavoiding targeting the mTLS endpoint with no client cert.
x-goog-user-projectprefers the ADC credentials' quotaproject (
GOOGLE_CLOUD_QUOTA_PROJECT→ credentials JSONquota_project_id)and falls back to the configured
ProjectID, matching adk-python'scredentials.quota_project_id or project_id.Agent,McpServer,Endpoint,Protocol,Interface,Skill,Card, the*Pagelist responses, andListOptions(
WithFilter/WithPageSize/WithPageToken).connectionURI(
_get_connection_uri),cleanName(_clean_name), and theprotocol-binding → A2A transport map (
_TRANSPORT_MAPPING).