Expand description
Session resource types and methods mirroring the JS SDK’s resources/session.ts.
Structs§
- Agent
Part - An agent delegation part within a message.
- Agent
Part Input - An agent input part for the chat endpoint.
- Agent
Part Source - Source information for an
AgentPart. - Assistant
Message - An assistant-generated message.
- Assistant
Message Path - Filesystem paths for an
AssistantMessage. - Assistant
Message Time - Timing information for an
AssistantMessage. - Assistant
Message Tokens - Token usage breakdown for an
AssistantMessage. - Compaction
Part - A compaction marker part within a message.
- File
Diff - A file diff within a session summary.
- File
Part - A file attachment part within a message.
- File
Part Input - A file input part for the chat endpoint.
- File
Part Source Text - Text content extracted from a source.
- File
Source - A file-based source.
- Patch
Part - A patch describing file modifications.
- Permission
Rule - A permission rule governing tool access.
- Reasoning
Part - A reasoning/thinking step part within a message.
- Reasoning
Part Time - Timing information for a
ReasoningPart. - Retry
Part - A retry part within a message, indicating a failed attempt.
- Retry
Part Time - Timing information for a
RetryPart. - Session
- A conversation session.
- Session
Chat Model - Model selection for the chat endpoint.
- Session
Chat Params - Parameters for the chat endpoint (
POST /session/{id}/message). - Session
Init Params - Parameters for session initialisation (
POST /session/{id}/init). - Session
Messages Response Item - A single item in the session messages response.
- Session
Resource - Provides access to the Session-related API endpoints.
- Session
Revert - Revert metadata attached to a
Session. - Session
Revert Params - Parameters for reverting a session (
POST /session/{id}/revert). - Session
Share - Share metadata attached to a
Session. - Session
Summarize Params - Parameters for summarising a session (
POST /session/{id}/summarize). - Session
Summary - Summary of changes in a session.
- Session
Time - Timing information for a
Session. - Snapshot
Part - A snapshot of the session state.
- Step
Finish Part - Marks the end of a reasoning step with cost and token info.
- Step
Finish Tokens - Token usage for a
StepFinishPart. - Step
Start Part - Marks the beginning of a reasoning step.
- Subtask
Part - A subtask delegation part within a message.
- Subtask
Part Input - A subtask input part for the chat endpoint.
- Subtask
Part Model - Model information for a
SubtaskPart. - Symbol
Source - A symbol-based source (e.g. function, class).
- Symbol
Source Position - A line/character position within a file.
- Symbol
Source Range - Range of a
SymbolSource. - Text
Part - A text part within a message.
- Text
Part Input - A text input part for the chat endpoint.
- Text
Part Input Time - Timing information for a
TextPartInput. - Text
Part Time - Timing information for a
TextPart. - Token
Cache - Cache token breakdown.
- Tool
Part - A tool invocation part within a message.
- Tool
State Completed - A successfully completed tool invocation.
- Tool
State Completed Time - Timing for
ToolStateCompleted. - Tool
State Error - A tool invocation that resulted in an error.
- Tool
State Error Time - Timing for
ToolStateError. - Tool
State Pending - A pending tool invocation.
- Tool
State Running - A currently-running tool invocation.
- Tool
State Running Time - Timing for
ToolStateRunning. - User
Message - A user-sent message.
- User
Message Model - Model information for a user message.
- User
Message Summary - Summary information for a user message.
- User
Message Time - Timing information for a
UserMessage.
Enums§
- File
Diff Status - Status of a file diff.
- File
Part Source - Source of a file part — either a file or a symbol.
- Message
- A message in a session — either from the user or the assistant.
- Output
Format - Output format specification — text or JSON schema.
- Part
- A part within a message — discriminated by
type. - Part
Input - An input part — text, file, agent, or subtask — discriminated by
type. - Tool
State - The current state of a tool invocation — discriminated by
status.
Type Aliases§
- Permission
Ruleset - A set of permission rules.
- Session
Abort Response - Response type for aborting a session.
- Session
Delete Response - Response type for deleting a session.
- Session
Init Response - Response type for initialising a session.
- Session
List Response - Response type for listing sessions.
- Session
Messages Response - Response type for listing session messages.
- Session
Summarize Response - Response type for summarising a session.