You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Port of adcontextprotocol/adcp-client-python#251 to Go. That PR added auto-retention of contextId and taskId across multi-turn A2A calls on the Python side. Without a Go equivalent, Go buyers can't speak A2A — half of AdCP's transport surface — and we can't run Go-side conformance against A2A agents.
Depends on a Go A2A server to test against (see #69). Can test against Python reference agents in the interim.
What
New package adcp/a2aclient mirroring the Python ADCPClient A2A adapter's API shape so the two stay legible together.
API
c:=a2aclient.New(cfg,
a2aclient.WithContextID("resume-or-self-named"), // seed for resume across restarts
)
resp, err:=c.SendMessage(ctx, msg) // auto-injects contextId + pending taskIdc.ContextID() // current, server-authoritativec.PendingTaskID() // empty when last response was terminalc.ResetContext() // clearc.ResetContext("id") // clear + seed
Retention rules
Auto-adopt whatever contextId the server returns (supports ADK-style rewriting transparently).
Retain taskId only while last response status ∈ {submitted, working, input-required, auth-required}.
Clear taskId on terminal states.
Default on — document the "one Client per conversation" rule on the type; last-write-wins under concurrent use.
Error behavior
WithContextID / ResetContext(id) on a non-A2A-configured client return a typed error (symmetric writes).
ContextID() / PendingTaskID() return empty strings when unset (lenient reads; safe in generic code).
Tests
Unit: auto-retain, inject, reset, server rebinding, taskId retention in each non-terminal state, taskId clearing on terminal states.
Why
Port of adcontextprotocol/adcp-client-python#251 to Go. That PR added auto-retention of
contextIdandtaskIdacross multi-turn A2A calls on the Python side. Without a Go equivalent, Go buyers can't speak A2A — half of AdCP's transport surface — and we can't run Go-side conformance against A2A agents.Depends on a Go A2A server to test against (see #69). Can test against Python reference agents in the interim.
What
New package
adcp/a2aclientmirroring the PythonADCPClientA2A adapter's API shape so the two stay legible together.API
Retention rules
contextIdthe server returns (supports ADK-style rewriting transparently).taskIdonly while last response status ∈ {submitted,working,input-required,auth-required}.taskIdon terminal states.Error behavior
WithContextID/ResetContext(id)on a non-A2A-configured client return a typed error (symmetric writes).ContextID()/PendingTaskID()return empty strings when unset (lenient reads; safe in generic code).Tests
contextIdpersists across sends and HITLinput-required→ resume path works.Scope
message/send+tasks/getto start. Streaming added later.Non-goals
Sequence