Skip to main content

Type Alias: WunderlandSession

WunderlandSession = object

Defined in: .source/wunderland/src/public/types.ts:230

Properties

checkpoint

checkpoint: () => Promise<string>

Defined in: .source/wunderland/src/public/types.ts:246

Persist the current session message history as a named checkpoint. Returns an opaque checkpoint ID that can be passed to WunderlandSession.resume.

Returns

Promise<string>


id

readonly id: string

Defined in: .source/wunderland/src/public/types.ts:231


messages

messages: () => WunderlandMessage[]

Defined in: .source/wunderland/src/public/types.ts:232

Returns

WunderlandMessage[]


resume

resume: (checkpointId) => Promise<void>

Defined in: .source/wunderland/src/public/types.ts:251

Restore this session's message history from a previously saved checkpoint. Throws if the checkpoint ID is not found.

Parameters

checkpointId

string

Returns

Promise<void>


sendText

sendText: (text, opts?) => Promise<WunderlandTurnResult>

Defined in: .source/wunderland/src/public/types.ts:233

Parameters

text

string

opts?

WunderlandSendTextOpts

Returns

Promise<WunderlandTurnResult>


stream

stream: (text, opts?) => AsyncIterable<generateText>

Defined in: .source/wunderland/src/public/types.ts:241

Execute a turn and yield graph-style GraphEvent objects. Useful for UI/event consumers that want the same event contract as graph runs without wiring up a full AgentGraph.

Parameters

text

string

opts?

WunderlandSendTextOpts

Returns

AsyncIterable<generateText>


usage

usage: () => Promise<WunderlandUsageSummary>

Defined in: .source/wunderland/src/public/types.ts:235

Read durable token/cost usage aggregated for this session ID.

Returns

Promise<WunderlandUsageSummary>