Session ID returned by session/new.
Mode state returned when the session was created, if the agent provided it.
Metadata returned when the session was created.
Full response returned by session/new.
Sends a prompt to this session.
Strings are converted to one text content block. A single content block is
wrapped in an array. The returned promise resolves with the final
PromptResponse, and the same completion is also queued as a stop
message for nextUpdate().
Reads the next update or stop message for this session.
Reads text chunks until the current prompt turn stops.
Only agent_message_chunk updates with text content are appended. Other
update types are ignored by this helper; use nextUpdate() when you need
tool calls, plans, or the final PromptResponse.
Stops routing updates to this active-session helper.
This does not close the ACP session on the agent. Use ClientContext
session lifecycle methods when the protocol session itself should be closed
or deleted.
Supports explicit resource management with using.
Convenience wrapper for an active ACP session.
An active session routes
session/updatenotifications for one session ID into an async queue. Useprompt(...)to send user content, then read updates withnextUpdate()until astopmessage is returned.