FakeAgentSnapshotPatch
Snapshot fields a test may replace. Omitted fields keep their value; an
explicit undefined for any field but status, messages and toolCalls
removes the field. state replaces the whole state and is checked against the
session's stateType when that is a schema.
import type { FakeAgentSnapshotPatch } from '@threadplane/angular/chat/testing';Declaration
export interface FakeAgentSnapshotPatch<TTools extends {
[K in keyof TTools]: ToolContract;
} = Record<string, ToolContract>, TState = unknown> {
readonly checkpoints?: readonly AgentCheckpoint[];
readonly error?: AgentError;
readonly errorDiagnostic?: AgentErrorDiagnostic;
readonly inputBlocked?: AgentInputBlock;
readonly interrupts?: readonly AgentInterrupt[];
readonly messageCheckpoints?: Readonly<Record<string, string>>;
readonly messages?: readonly FakeMessageInput[];
readonly pendingClientTools?: readonly ToolCall<TTools>[];
readonly plan?: readonly AgentPlanStep[];
readonly state?: NoInfer<TState> | DeepReadonly<NoInfer<TState>>;
readonly status?: AgentStatus;
readonly streamingToolCalls?: readonly StreamingToolCall[];
readonly subagents?: readonly FakeSubagentInput[];
readonly toolCalls?: readonly ToolCall<TTools>[];
readonly usage?: AgentUsage;
}Type parameters
TTools{ [K in keyof TTools]: ToolContract; }Default:Record<string, ToolContract>TStateDefault:unknown
Members
checkpoints
readonly checkpoints?: readonly AgentCheckpoint[];error
readonly error?: AgentError;errorDiagnostic
readonly errorDiagnostic?: AgentErrorDiagnostic;inputBlocked
readonly inputBlocked?: AgentInputBlock;interrupts
readonly interrupts?: readonly AgentInterrupt[];messageCheckpoints
readonly messageCheckpoints?: Readonly<Record<string, string>>;messages
readonly messages?: readonly FakeMessageInput[];pendingClientTools
readonly pendingClientTools?: readonly ToolCall<TTools>[];plan
readonly plan?: readonly AgentPlanStep[];state
readonly state?: NoInfer<TState> | DeepReadonly<NoInfer<TState>>;status
readonly status?: AgentStatus;streamingToolCalls
readonly streamingToolCalls?: readonly StreamingToolCall[];subagents
readonly subagents?: readonly FakeSubagentInput[];toolCalls
readonly toolCalls?: readonly ToolCall<TTools>[];usage
readonly usage?: AgentUsage;