Wasm Directoryalpha
Variant

session-update

A single item in [agent.prompt-turn.updates]'s stream. Variants follow the sessionUpdate discriminator in the JSON wire protocol.

variant session-update {
  user-message-chunk(content-block),
  agent-message-chunk(content-block),
  agent-thought-chunk(content-block),
  tool-call(tool-call-snapshot),
  tool-call-update(tool-call-snapshot),
  plan(plan),
  current-mode-update(session-mode-id),
  session-info-update(session-info-update),
  available-commands-update(list​<available-command>),
  usage-update(usage-update),
}

Cases

CasePayloadDescription
user-message-chunkcontent-block
agent-message-chunkcontent-block
agent-thought-chunkcontent-block
tool-calltool-call-snapshotA new tool call has been initiated. Emitted automatically when a [tools.tool-call] resource is constructed.
tool-call-updatetool-call-snapshotAn update to an existing tool call. Emitted automatically when [tools.tool-call.update] is invoked. The snapshot carries the tool-call's post-update state.
planplan
current-mode-updatesession-mode-id
session-info-updatesession-info-update
available-commands-updatelist​<available-command>
usage-updateusage-updateToken usage for the session context, so the client can show a "context %" indicator (context % = used / size).