historyError
consthistoryError: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.
Type Declaration
Section titled “Type Declaration”addAssistantMessage
Section titled “addAssistantMessage”
readonlyaddAssistantMessage: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”
readonlyclear: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”getHistory
Section titled “getHistory”
readonlygetHistory: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”getLLMContext
Section titled “getLLMContext”
readonlygetLLMContext: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”leaderPipeline
Section titled “leaderPipeline”
readonlyleaderPipeline: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown
Returns
Section titled “Returns”recordTurn
Section titled “recordTurn”
readonlyrecordTurn: (message,cause) =>HistoryError
Parameters
Section titled “Parameters”message
Section titled “message”string
unknown