tools: form field is 'source' on /v1/agents/from-tarball, not 'tarball'
All checks were successful
build / build (push) Successful in 3s

This commit is contained in:
robert
2026-05-11 21:30:47 -03:00
parent f5205a017a
commit 640d1b89ca

View File

@@ -202,11 +202,13 @@ def build_tools(ctx: ToolContext) -> list[Any]:
# Read the entrypoint from a2a.yaml so we can pass it verbatim. # Read the entrypoint from a2a.yaml so we can pass it verbatim.
entrypoint = _read_entrypoint(bundle_bytes) or f"agent:{_class_name(name)}" entrypoint = _read_entrypoint(bundle_bytes) or f"agent:{_class_name(name)}"
files = {"tarball": (f"{name}.tar.gz", bundle_bytes, "application/gzip")} # NOTE: the CP from-tarball endpoint names the file field
# ``source`` (see apps/control-plane/control_plane/routes/agents.py).
files = {"source": (f"{name}.tar.gz", bundle_bytes, "application/gzip")}
data = { data = {
"name": name, "version": version, "name": name, "version": version,
"entrypoint": entrypoint, "public": "true" if public else "false", "entrypoint": entrypoint, "public": "true" if public else "false",
"description": f"Built by agent-builder.", "description": "Built by agent-builder.",
} }
try: try:
async with httpx.AsyncClient(timeout=60.0) as c: async with httpx.AsyncClient(timeout=60.0) as c: