Skip to main content
Type definitions and Zod schemas for the EnclaveJS streaming protocol.

Installation

Stream Events

StreamEvent

Union type of all possible stream events.

SessionInitEvent

Session initialization event.

StdoutEvent

Console output event.

LogEvent

Structured log event.

ToolCallEvent

Tool execution request event.

ToolResultAppliedEvent

Tool result confirmation event.

HeartbeatEvent

Keep-alive event.

FinalEvent

Execution completion event.

ErrorEvent

Execution error event.

Execution Types

ExecutionStats

ErrorCode

Request Types

ExecuteRequest

ToolResultRequest

EventFilter

Session Types

Session

Encryption Types

EncryptedPayload

KeyExchange

Zod Schemas

All types have corresponding Zod schemas for runtime validation.

Schema Examples

Type Guards

Constants

Complete Example