Cereal docs
TypeScript SDKTypeScript signatures

CerealSessionState

Public TypeScript declaration from @trycereal/sdk/browser.

Import from @trycereal/sdk/browser. Generated from the repository SDK declarations (package version 0.0.0); not from HTTP request schemas.

export interface CerealSessionState {
    readonly messages: ReadonlyArray<CerealMessage>;
    readonly drafts: Readonly<Record<string, string>>;
    readonly reasoning: Readonly<Record<string, string>>;
    readonly toolCalls: ReadonlyArray<CerealToolCall>;
    readonly pendingApprovals: ReadonlyArray<CerealPendingApproval>;
    readonly status: "running" | "idle" | "terminated" | "connecting";
    readonly stopReason?: string | undefined;
    readonly cursor: number;
}

See SDK setup, authoring, client behavior, and the API/SDK map for usage. Domain types are described in schema reference.

Related SDK types: CerealMessage, CerealPendingApproval, CerealToolCall.