Skip to content

historyError

const historyError: object

Defined in: packages/engine/src/lib/errors.ts:276

Per-operation factories for HistoryError. Each constructor pins its operation literal at the type level, so an in-package call site can no longer tag (for example) a record_turn failure as add_assistant_message by passing the wrong string.

Prefer these over hand-constructing the discriminated union directly. The type itself remains structurally exported for consumers’ pattern-matching; the constructor-only guarantee applies to in-package construction only.

readonly addAssistantMessage: (message, cause) => HistoryError

string

unknown

HistoryError

readonly clear: (message, cause) => HistoryError

string

unknown

HistoryError

readonly getHistory: (message, cause) => HistoryError

string

unknown

HistoryError

readonly getLLMContext: (message, cause) => HistoryError

string

unknown

HistoryError

readonly leaderPipeline: (message, cause) => HistoryError

string

unknown

HistoryError

readonly recordTurn: (message, cause) => HistoryError

string

unknown

HistoryError