Skip to content

Message

Transcript messages: what an entry contributes to model context (EntryRecord.model). The shapes follow pi-ai’s, so a transcript can record what effect/ai cannot express in its Prompt: an assistant message’s stop reason and usage, and positional system messages that patch named prompt sections and the offered tools. Generation converts a derived context to an effect/ai Prompt at request time.

Since v0.0.0


Signature

declare const AssistantMessage: any

Source

Since v0.0.0

Signature

type AssistantMessage = typeof AssistantMessage.Type

Source

Since v0.0.0

Signature

declare const ImageContent: any

Source

Since v0.0.0

Signature

type ImageContent = typeof ImageContent.Type

Source

Since v0.0.0

Signature

declare const Message: any

Source

Since v0.0.0

Signature

type Message = typeof Message.Type

Source

Since v0.0.0

Why an assistant message ended; pending while it streams. Context derivation never sends aborted, error or deferred messages again.

Signature

declare const StopReason: any

Source

Since v0.0.0

Signature

type StopReason = typeof StopReason.Type

Source

Since v0.0.0

A positional change of the system prompt and tool set. sections is an ordered patch: a string adds or replaces a section, null removes it; toolsRemoved applies before toolsAdded. Replaying every system message in order yields the prompt and tools in effect. The harness always writes content: "".

Signature

declare const SystemMessage: any

Source

Since v0.0.0

Signature

type SystemMessage = typeof SystemMessage.Type

Source

Since v0.0.0

Signature

declare const TextContent: any

Source

Since v0.0.0

Signature

type TextContent = typeof TextContent.Type

Source

Since v0.0.0

Model reasoning, with an opaque provider signature for replay.

Signature

declare const ThinkingContent: any

Source

Since v0.0.0

Signature

type ThinkingContent = typeof ThinkingContent.Type

Source

Since v0.0.0

A call the model made. arguments is the parsed JSON object.

Signature

declare const ToolCall: any

Source

Since v0.0.0

Signature

type ToolCall = typeof ToolCall.Type

Source

Since v0.0.0

A tool as offered to the model. parameters is a JSON Schema.

Signature

declare const ToolDeclaration: any

Source

Since v0.0.0

Signature

type ToolDeclaration = typeof ToolDeclaration.Type

Source

Since v0.0.0

Signature

declare const ToolResultMessage: any

Source

Since v0.0.0

Signature

type ToolResultMessage = typeof ToolResultMessage.Type

Source

Since v0.0.0

Tokens and cost of one request or tool execution.

Signature

declare const Usage: any

Source

Since v0.0.0

Signature

type Usage = typeof Usage.Type

Source

Since v0.0.0

Signature

declare const UserMessage: any

Source

Since v0.0.0

Signature

type UserMessage = typeof UserMessage.Type

Source

Since v0.0.0

Signature

declare const emptyUsage: () => Usage

Source

Since v0.0.0

The text of a message’s text parts, joined.

Signature

declare const text: (message: Message | undefined) => string

Source

Since v0.0.0

The tool calls of an assistant message, in order.

Signature

declare const toolCalls: (message: Message | undefined) => ReadonlyArray<ToolCall>

Source

Since v0.0.0