v8.0.1 · Interface
client
Host-capability callbacks invoked by the agent on the client side:
permission prompts, file system access, and terminal control.
All methods are called by the agent and implemented by the client.
Maps to the JSON-RPC methods listed under "Client" in the protocol
overview:
Type Aliases
T
error
TA protocol error.
session-id
TUnique identifier for an active session, returned by <code>new-session</code>.
session-update
TA single item in [<code>agent.prompt-turn.updates</code>]'s stream.
request-permission-request
Trequest-permission-response
Tread-text-file-request
TParameters to <code>read-text-file</code>.
read-text-file-response
TResponse to <code>read-text-file</code>.
write-text-file-request
TParameters to <code>write-text-file</code>.
create-terminal-request
TParameters to <code>create-terminal</code>.
terminal-exit-status
How a terminal command finished.
Functions
F
notify-session
FOne-way out-of-turn session notification. Mirrors the legacy
request-permission
FAsk the user to authorize a tool call. Returns the user's
read-text-file
FRead a text file from the client's environment, including any
write-text-file
Write a text file in the client's environment. Creates the file