Skip to main content
Complete TypeScript type definitions and SSE event types for the Jade SDK.

Core Types

ConversationEntry

A single entry in a conversation.

ProcessedEntry

A conversation entry processed for display.

MediaInfo

Metadata about generated media.

Client Configuration

AgentClientConfig

Configuration for the Jade client.

JadeClientConfig

Alias for AgentClientConfig (web package).

Session Types

SessionSummary

Summary of a session for list views.

SessionStatusResponse

Session streaming status.

UpdateSessionRequest

Request to update session metadata.

Request/Response Types

MessagesRequest

Request to start a new conversation.

SessionListResponse

Response from listing sessions.

SessionConversationResponse

Response from getting a session.

SuccessResponse

Generic success response.

Tool Types

ToolDefinition

Definition of a tool in the registry.

ParsedToolInput

Parsed tool input data.

ParsedToolResult

Parsed tool result data.

StreamingToolCall

Information about a streaming tool call.

ToolResult

Result from a completed tool execution.

Processing Types

ProcessingOptions

Options for conversation processing.

TextSegment

A segment of text for rendering.

ParsedSuggestion

A parsed suggestion from text.

SuggestionParseResult

Result of parsing suggestions from text.

Hook Types

UseJadeSessionOptions

Options for the useJadeSession hook.

UseJadeSessionReturn

Return value from the useJadeSession hook.

Storage Types (React Native)

StorageAdapter

Interface for storage backends.

Storage Keys

Predefined storage key constants.

SSE Events

The Jade SDK uses Server-Sent Events (SSE) for real-time streaming.

Event Flow

A typical streaming session follows this flow:

Event Types

session_id

Emitted when a session ID is assigned (first message only).
Payload: string - The unique session ID

text_delta

Emitted when new text content is received.
Payload: string - Incremental text content Notes:
  • Called multiple times as text streams in
  • Concatenate deltas for full text
  • May be empty between tool calls

tool_call

Emitted when a tool execution starts.
Payload: StreamingToolCall

tool_input_delta

Emitted as tool input JSON streams in.
Payload: string - Incremental JSON input

tool_result

Emitted when a tool completes execution.
Payload: ToolResult Media Result Example:

complete

Emitted when the full response is complete.
Payload: ConversationEntry[] - The full conversation history

error

Emitted when an error occurs.
Payload: Error - The error object Common Errors:

Event Emitter Interface


Importing Types

Import types from the appropriate package: